import-into-debian-archive.txt 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  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}/2024-03-14-archive-jdupes-test.txt 2>&1
  45. time jdupes --order=time --noempty --linkhard --recurse debian-archive > ${logdir}/2024-03-14-archive-jdupes.txt 2>&1
  46. # For later:
  47. cd ${logdir}
  48. suite=buster keyring=/usr/share/keyrings/debian-archive-buster-automatic.gpg di_opts=(--di-dist=dists --di-arch=arches)
  49. # suite=buster-proposed-updates keyring=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg di_opts=()
  50. # suite=buster-updates keyring=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg di_opts=()
  51. # suite=buster-backports keyring=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg di_opts=()
  52. # suite=buster-backports-sloppy keyring=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg di_opts=()
  53. dry_run=1
  54. time debmirror \
  55. ${dry_run:+--dry-run} \
  56. --progress \
  57. --nocleanup \
  58. --method=rsync ${RSYNC_USER:+--user="${RSYNC_USER:?}"} --host=127.0.0.1 --root=debian \
  59. --omit-suite-symlinks \
  60. --dist=${suite:?} \
  61. --arch=amd64,arm64,armel,armhf,i386,mips,mips64el,mipsel,ppc64el,s390x \
  62. "${di_opts[@]}" \
  63. --section=main,contrib,non-free,main/debian-installer,contrib/debian-installer,non-free/debian-installer \
  64. --i18n --getcontents \
  65. --checksums \
  66. --check-gpg --keyring=${keyring:?} \
  67. --diff=none --rsync-extra=none \
  68. ${ROOT:?}/debian-archive/debian \
  69. > ${logdir:?}/2024-03-10-debmirror-${suite:?}${dry_run:+-dry-run}.txt 2>&1
  70. # Copied dists/ tree as otherwise older installer versions and ChangeLog were missing.
  71. # Only difference after this: Release{,.gpg} are real files, not symlinks to zzz-dists
  72. for suite in buster buster-proposed-updates buster-updates buster-backports buster-backports-sloppy; do
  73. (
  74. set -e
  75. cd ${ROOT:?}/debian-archive/debian/dists/${suite:?}
  76. rm -rf main contrib non-free
  77. cp -a /srv/ftp-master.debian.org/ftp/dists/${suite:?}/{main,contrib,non-free} .
  78. if [ "$suite" = buster ]; then
  79. cp -a /srv/ftp-master.debian.org/ftp/dists/${suite:?}/ChangeLog .
  80. fi
  81. if [ "$suite" = buster-proposed-updates ]; then
  82. cp -a /srv/ftp-master.debian.org/ftp/dists/${suite:?}/*.changes .
  83. fi
  84. )
  85. done
  86. # check DEP11 data?
  87. # + stretch-debug
  88. suite=buster-debug keyring=/usr/share/keyrings/debian-archive-buster-automatic.gpg di_opts=()
  89. suite=buster-proposed-updates-debug keyring=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg di_opts=()
  90. suite=buster-backports-debug keyring=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg di_opts=()
  91. suite=buster-backports-sloppy-debug keyring=/usr/share/keyrings/debian-archive-bullseye-automatic.gpg di_opts=()
  92. dry_run=1
  93. time debmirror \
  94. ${dry_run:+--dry-run} \
  95. --progress \
  96. --nocleanup \
  97. --method=rsync ${RSYNC_USER:+--user="${RSYNC_USER:?}"} --host=127.0.0.1 --root=debian-debug \
  98. --omit-suite-symlinks \
  99. --dist=${suite:?} \
  100. --arch=amd64,arm64,armel,armhf,i386,mips,mips64el,mipsel,ppc64el,s390x \
  101. "${di_opts[@]}" \
  102. --section=main,contrib,non-free,main/debian-installer,contrib/debian-installer,non-free/debian-installer \
  103. --i18n --getcontents \
  104. --checksums \
  105. --check-gpg --keyring=${keyring:?} \
  106. --diff=none --rsync-extra=none \
  107. ${ROOT:?}/debian-archive/debian-debug \
  108. > ${logdir:?}/2024-03-14-debmirror-${suite:?}${dry_run:+-dry-run}.txt 2>&1
  109. cd ${ROOT:?}/debian-archive/debian/dists
  110. for d in buster buster-updates buster-proposed-updates buster-backports buster-backports-sloppy; do
  111. (
  112. set -e
  113. cd ${d}
  114. rm -rf main contrib non-free
  115. /usr/bin/rsync -a /srv/ftp-master.debian.org/ftp/dists/${d}/{main,contrib,non-free} .
  116. if [ -e /srv/ftp-master.debian.org/ftp/dists/${d}/non-free-firmware ]; then
  117. /usr/bin/rsync -a /srv/ftp-master.debian.org/ftp/dists/${d}/non-free-firmware .
  118. fi
  119. )
  120. done
  121. cd ${ROOT:?}/debian-archive/debian-debug/dists
  122. for d in buster-debug buster-proposed-updates-debug buster-backports-debug buster-backports-sloppy-debug; do
  123. (
  124. set -e
  125. cd ${d}
  126. rm -rf main contrib non-free non-free-firmware
  127. /usr/bin/rsync -a /srv/ftp-master.debian.org/archive/debian-debug/dists/${d}/{main,contrib,non-free} .
  128. if [ -e /srv/ftp-master.debian.org/archive/debian-debug/dists/${d}/non-free-firmware ]; then
  129. /usr/bin/rsync -a /srv/ftp-master.debian.org/archive/debian-debug/dists/${d}/non-free-firmware .
  130. fi
  131. )
  132. done
  133. # + jdupes again
  134. date > ${ROOT:?}/debian-archive/project/trace/master
  135. # Remind webmaster to update the corresponding pages in www.debian.org and remove stuff from packages.d.o