import-into-debian-archive.txt 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ROOT=/srv/archive.debian.org
  2. etcdir=${ROOT:?}/etc
  3. logdir=${ROOT:?}/log
  4. export PATH="${ROOT}/bin:$PATH"
  5. export RSYNC_SSL_PORT=1873
  6. export RSYNC_SSL_CA_CERT=/etc/ssl/ca-debian/ca-certificates.crt
  7. export RSYNC_USER=...
  8. export RSYNC_PASSWORD=...
  9. cd ${logdir}
  10. debmirror \
  11. --progress \
  12. --nocleanup \
  13. --method=rsync --user="${RSYNC_USER:?}" --host=security-master.debian.org --root=debian-security \
  14. --omit-suite-symlinks \
  15. --dist=jessie/updates \
  16. --arch=amd64,armel,armhf,i386 \
  17. --section=main,contrib,non-free,main/debian-installer,contrib/debian-installer,non-free/debian-installer \
  18. --i18n --getcontents \
  19. --checksums \
  20. --check-gpg --keyring=/usr/share/keyrings/debian-archive-stretch-security-automatic.gpg \
  21. --diff=none --rsync-extra=none \
  22. ${ROOT:?}/debian-archive/debian-security \
  23. > ${logdir}/2023-02-18-debmirror-jessie-security.txt 2>&1
  24. cd ${logdir}
  25. debmirror \
  26. --progress \
  27. --nocleanup \
  28. --method=rsync --user="${RSYNC_USER:?}" --host=security-master.debian.org --root=debian-security \
  29. --omit-suite-symlinks \
  30. --dist=stretch/updates \
  31. --arch=amd64,arm64,armel,armhf,i386 \
  32. --section=main,contrib,non-free,main/debian-installer,contrib/debian-installer,non-free/debian-installer \
  33. --i18n --getcontents \
  34. --checksums \
  35. --check-gpg --keyring=/usr/share/keyrings/debian-archive-stretch-security-automatic.gpg \
  36. --diff=none --rsync-extra=none \
  37. ${ROOT:?}/debian-archive/debian-security \
  38. > ${logdir}/2023-02-18-debmirror-stretch-security.txt 2>&1
  39. # jdupes: --order=time to get timestamp of oldest file
  40. # Note: jdupes feels veeeery slow (hours): it reads beginning of all files
  41. # first, but then identifying potential copies is fast. There is no feedback
  42. # while it reads data.
  43. cd ${ROOT}
  44. time jdupes --order=time --noempty --printwithsummary --recurse debian-archive > ${logdir}/2023-03-30-archive-jdupes-test.txt 2>&1
  45. time jdupes --order=time --noempty --linkhard --recurse debian-archive > ${logdir}/2023-03-30-archive-jdupes.txt 2>&1
  46. # For later:
  47. cd ${logdir}
  48. # suite=stretch keyring=/usr/share/keyrings/debian-archive-stretch-automatic.gpg di_opts="--di-dist=dists --di-arch=arches"
  49. # suite=stretch-proposed-updates keyring=/usr/share/keyrings/debian-archive-buster-automatic.gpg di_opts=" "
  50. suite=stretch-backports keyring=/usr/share/keyrings/debian-archive-buster-automatic.gpg di_opts=" "
  51. suite=stretch-backports-sloppy keyring=/usr/share/keyrings/debian-archive-buster-automatic.gpg di_opts=" "
  52. time debmirror \
  53. --progress \
  54. --nocleanup \
  55. --method=rsync --user="${RSYNC_USER:?}" --host=ftp-master.debian.org --root=debian \
  56. --omit-suite-symlinks \
  57. --dist=${suite:?} \
  58. --arch=amd64,arm64,armel,armhf,i386,mips,mips64el,mipsel,ppc64el,s390x \
  59. ${di_opts:?} \
  60. --section=main,contrib,non-free,main/debian-installer,contrib/debian-installer,non-free/debian-installer \
  61. --i18n --getcontents \
  62. --checksums \
  63. --check-gpg --keyring=${keyring:?} \
  64. --diff=none --rsync-extra=none \
  65. ${ROOT:?}/debian-archive/debian \
  66. > ${logdir:?}/2023-03-30-debmirror-${suite:?}.txt 2>&1
  67. # Copied dists/ tree as otherwise older installer versions and ChangeLog were missing.
  68. # Only difference after this: Release{,.gpg} are real files, not symlinks to zzz-dists
  69. cd ${ROOT:?}/debian-archive/debian/dists/${suite:?}
  70. rm -rf main contrib non-free
  71. cp -a /srv/ftp-master.debian.org/ftp/dists/${suite:?}/{ChangeLog,main,contrib,non-free} .
  72. # check DEP11 data?
  73. # + stretch-debug
  74. suite=stretch-debug keyring=/usr/share/keyrings/debian-archive-stretch-automatic.gpg di_opts=" "
  75. suite=stretch-backports-debug keyring=/usr/share/keyrings/debian-archive-buster-automatic.gpg di_opts=" "
  76. suite=stretch-backports-sloppy-debug keyring=/usr/share/keyrings/debian-archive-buster-automatic.gpg di_opts=" "
  77. time debmirror \
  78. --progress \
  79. --nocleanup \
  80. --method=rsync --user="${RSYNC_USER:?}" --host=ftp-master.debian.org --root=debian-debug \
  81. --omit-suite-symlinks \
  82. --dist=${suite:?} \
  83. --arch=amd64,arm64,armel,armhf,i386,mips,mips64el,mipsel,ppc64el,s390x \
  84. ${di_opts:?} \
  85. --section=main,contrib,non-free,main/debian-installer,contrib/debian-installer,non-free/debian-installer \
  86. --i18n --getcontents \
  87. --checksums \
  88. --check-gpg --keyring=${keyring:?} \
  89. --diff=none --rsync-extra=none \
  90. ${ROOT:?}/debian-archive/debian-debug \
  91. > ${logdir:?}/2023-03-30-debmirror-${suite:?}.txt 2>&1
  92. cd ${ROOT:?}/debian-archive/debian/dists
  93. for d in stretch-backports stretch-backports-sloppy; do
  94. ( set -e; cd ${d}; rm -rf main contrib non-free; /usr/bin/rsync -a /srv/ftp-master.debian.org/ftp/dists/${d}/{main,contrib,non-free} .; );
  95. done
  96. cd ${ROOT:?}/debian-archive/debian-debug/dists
  97. for d in stretch-backports-debug stretch-backports-sloppy-debug; do
  98. ( set -e; cd ${d}; rm -rf main contrib non-free; /usr/bin/rsync -a /srv/ftp-master.debian.org/archive/debian-debug/dists/${d}/{main,contrib,non-free} .; );
  99. done
  100. # + jdupes again
  101. # Remind webmaster to update the corresponding pages in www.debian.org and remove stuff from packages.d.o