stable-point-release.txt 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. Rough Guide to doing Stable Point Releases in Debian
  2. ----------------------------------------------------
  3. TRY THE NEW pointrelease SCRIPT INSTEAD!
  4. - Mirror tmux session on public host:
  5. # ssh ftp-master.debian.org 'tail -f -c +0 ~dak/tmuxoutput.1-0' | ssh mirror.ftp-master.debian.org 'cat > tmuxout'
  6. - sudo to dak
  7. - bash:
  8. suitename=jessie
  9. newrev=8.7
  10. export SCRIPTVARS=/srv/ftp-master.debian.org/dak/config/debian/vars
  11. . $SCRIPTVARS
  12. . "${configdir}/common"
  13. . "${configdir}/dinstall.functions"
  14. umask 022
  15. export LANG=C
  16. export LC_ALL=C
  17. suite=$(psql -qAtc "SELECT suite_name FROM suite WHERE codename='${suitename}'")
  18. oldrev=$(psql -qAtc "SELECT version FROM suite WHERE codename='${suitename}'")
  19. case "${suite}" in
  20. stable) pusuite=proposed-updates ;;
  21. oldstable) pusuite=oldstable-proposed-updates ;;
  22. *) pusuite=INVALID ;;
  23. esac
  24. echo "Point release for ${suite} (${suitename}); old version: ${oldrev}, new: ${newrev}"
  25. echo "Updates come from ${pusuite}"
  26. pg_timestamp pre_${suite}_${newrev}
  27. cd ~
  28. mkdir -p ${suitename}_${newrev}
  29. cd ${suitename}_${newrev}
  30. dak control-suite -l ${pusuite} > ${pusuite}.list
  31. dak control-suite -l ${suite} > ${suite}.list
  32. - ask SRMs if there is anything to be skipped from this release. If so
  33. edit ${pusuite}.list (and later the Changelog too)
  34. - bash:
  35. # skip: list of *source* packages to skip, whitespace separated
  36. skip=""
  37. if [ -n "${skip}" ]; then
  38. mv ${pusuite}.list ${pusuite}.list.ori
  39. grep -vFf <(dak ls -f heidi -S -s ${pusuite} ${skip}) ${pusuite}.list.ori > ${pusuite}.list
  40. fi
  41. tmpfile=$(mktemp -p "${TMPDIR}" changelog.XXXXXX)
  42. dak make-changelog -s ${pusuite} -b ${suite} | cat - ${ftpdir}/dists/${suite}/ChangeLog > ${tmpfile}
  43. chmod 0644 ${tmpfile}
  44. mv ${tmpfile} ${ftpdir}/dists/${suite}/ChangeLog
  45. if [ -n "${skip}" ]; then
  46. $EDITOR ${ftpdir}/dists/${suite}/ChangeLog
  47. fi
  48. dak control-suite --add ${suite} < ${pusuite}.list
  49. dak control-suite --remove ${pusuite} < ${pusuite}.list
  50. - clean up *.changes from proposed-updates:
  51. # Be careful if uploads were not included in the point release.
  52. pumorguedir="${base}/morgue/queues/$(date +%Y/%m)"
  53. mkdir -p "${pumorguedir}"
  54. cd ${ftpdir}/dists/${pusuite}
  55. mv -t "${pumorguedir}" -n -- *.changes
  56. if [ -n "${skip}" ]; then
  57. for pack in ${skip}; do
  58. mv -t "${ftpdir}/dists/${pusuite}" ${pumorguedir}/${pack}*.changes
  59. done
  60. fi
  61. # do r0 and propups, if any
  62. cd ~/${suitename}_${newrev}
  63. # rsync data to from-release.d.o
  64. # from /srv/release.debian.org/www/${suitename}/${newrev%%.*}/${newrev}
  65. control_r0=from-release.d.o/${suitename}-r0-additions.cs
  66. if [[ -f ${control_r0} ]]; then
  67. cp ${control_r0} .
  68. read -p "Please check ${control_r0##*/}"
  69. dak control-suite --add ${suitename}-r0 < ${suitename}-r0-additions.cs
  70. fi
  71. control_unstable=from-release.d.o/propups.unstable
  72. if [[ -f ${control_unstable} ]]; then
  73. cp ${control_unstable} .
  74. read -p "Please check ${control_unstable##*/}"
  75. dak control-suite --force --add unstable <propups.unstable
  76. fi
  77. control_testing=from-release.d.o/propups.testing
  78. if [[ -f ${control_testing} ]]; then
  79. cp ${control_testing} .
  80. read -p "Please check ${control_testing##*/}"
  81. dak control-suite --force --add testing <propups.testing
  82. fi
  83. - ask rms if they have RMs to do.
  84. # dak rm -s ${suite} -R -p -d ### -m '###' ###
  85. - Copy in entries from /srv/ftp.debian.org/web/removals.txt:
  86. # $EDITOR ${ftpdir}/dists/${suite}/ChangeLog
  87. - and then check if they have a d-i update. if so, bash:
  88. diver=20150422+deb8u4+b2
  89. dak copy-installer -s ${pusuite} -d ${suite} ${diver}
  90. # set dioldver to "empty" if there is no old to remove
  91. dioldver=20150422+deb8u4+b1
  92. if [ "${dioldver}" != "empty" ]; then
  93. cd $ftpdir/dists/${suite}/main
  94. for iarch in $(dak admin s-a list-arch ${suite}); do
  95. if [ -d "installer-${iarch}/${dioldver}" ]; then
  96. echo "Moving installer-${iarch}/${dioldver} to morgue"
  97. mkdir -p "${base}/morgue/d-i/installer-${iarch}/"
  98. mv "installer-${iarch}/${dioldver}" "${base}/morgue/d-i/installer-${iarch}/"
  99. fi
  100. done
  101. # Remove old version also from proposed-updates
  102. cd $ftpdir/dists/${pusuite}/main
  103. for iarch in $(dak admin s-a list-arch ${suite}); do
  104. rm -rf -- "installer-${iarch}/${dioldver}"
  105. done
  106. fi
  107. cd $ftpdir/dists/${suite}
  108. - Updates for win32-loader?
  109. cd ${ftpdir}/tools/win32-loader
  110. if [ -d ${suitename}-proposed-updates ]; then
  111. rm -r ${suite}
  112. mv ${suitename}-proposed-updates ${suite}
  113. fi
  114. cd ${ftpdir}
  115. - Update version number in README, README.html and dists/README,
  116. Clean up dists/stable/ChangeLog (add header, basically). bash:
  117. cd ${ftpdir}/dists/${suite}
  118. date_long=$(date "+%A, %-dth %B %Y" | sed 's/1th/1st/; s/2th/2nd/; s/3th/3rd/')
  119. date_iso=$(date "+%Y-%m-%d")
  120. date_short=$(date "+%a, %d %b %Y")
  121. sed -e "1i======================================\n${date_short} - Debian ${newrev} released\n======================================" -i ChangeLog
  122. sed -e "/^${suite}/ s/Debian ${oldrev}/Debian ${newrev}/" -i ../README
  123. sed -e "s/Debian ${oldrev}/Debian ${newrev}/g; /Debian ${newrev}/ s/released .*\\./released ${date_long}./" -i ../../README
  124. sed -e "s/Debian ${oldrev}/Debian ${newrev}/g; /Debian ${newrev}/ s/released .*\\./released ${date_long}./; /meta name=\"Modified\"/ s/content=\".*\"/content=\"${date_iso}\"/" -i ../../README.html
  125. # Inspect changes. Regular expressions might be a bit fragile.
  126. for f in README README.html dists/README dists/${suite}/ChangeLog; do
  127. diff -u ${mirrordir}/ftp-master/${f} ${ftpdir}/${f}
  128. done
  129. # If changes are needed:
  130. cd ${ftpdir}/dists/${suite}
  131. $EDITOR ChangeLog ../README ../../README ../../README.html
  132. rm -f -- ./*~ ../*~ ../../*~
  133. - Update the 'Debian<n>.<n>r<n>' symlink in dists/
  134. cd $ftpdir/dists/
  135. rm -f Debian${oldrev}
  136. ln -s ${suitename} Debian${newrev}
  137. - Update fields in suite table in postgresql.
  138. bash:
  139. mdate=$(date +"%d %B %Y")
  140. psql projectb <<EOF
  141. begin;
  142. update suite set version = '${newrev}' where suite_name = '${suite}';
  143. update suite set description = 'Debian ${newrev} Released ${mdate}' where suite_name = '${suite}';
  144. commit;
  145. EOF
  146. - prepare for gps. bash:
  147. dak dominate --force -s ${suite}
  148. - check output from cruft report:
  149. dak cruft-report -s ${suite}
  150. - if cruft was removed: go back to run dominate again
  151. - if cruft was removed: update changelog from /srv/ftp.debian.org/web/removals.txt:
  152. # $EDITOR ${ftpdir}/dists/${suite}/ChangeLog
  153. - Let SRM see if all is ok
  154. - then:
  155. dak generate-packages-sources2 --force -s ${suite},${pusuite}
  156. dak contents generate -f -s ${suite} -a ftp-master
  157. ${scriptsdir}/sync-release ${suitename}
  158. - For wheezy: update main/i18n/Index
  159. if [[ ${suitename} == wheezy ]]; then
  160. ${scriptsdir}/generate-i18n-Index "${ftpdir}/dists/${suite}"
  161. fi
  162. - Generate Releases:
  163. dak generate-releases -f -s ${suite} ${pusuite}
  164. # Remove InRelease: Release can be signed by both ftpmaster & stable release keys
  165. rm ${ftpdir}/dists/${suite}/InRelease
  166. ${scriptsdir}/sync-release ${suitename}
  167. cd ${ftpdir}/dists/${suite}
  168. while :; do
  169. if [[ -f /srv/release.debian.org/www/${suitename}/${newrev%%.*}/${newrev}/Release-${newrev}.gpg ]]; then
  170. cat /srv/release.debian.org/www/${suitename}/${newrev%%.*}/${newrev}/Release-${newrev}.gpg >> Release.gpg
  171. gpg --no-default-keyring --keyring /usr/share/keyrings/debian-archive-keyring.gpg --trust-model=always --verify Release.gpg Release
  172. break
  173. else
  174. sleep 10
  175. continue
  176. fi
  177. done
  178. echo "Done"
  179. wget --ca-directory=/etc/ssl/ca-debian https://release.debian.org/proposed-updates/8/8.7/Release-${newrev}.gpg
  180. cat Release-${newrev}.gpg >> ${ftpdir}/dists/${suite}/Release.gpg
  181. cd ${ftpdir}/dists/${suite}
  182. gpg --no-default-keyring --keyring /usr/share/keyrings/debian-archive-keyring.gpg --trust-model=always --verify Release.gpg Release
  183. - Check if a mirror push is needed or next dinstall is enough. for a push, bash:
  184. cd
  185. ${configdir}/cronscript mirror