Univention Bugzilla – Bug 34085
Adjust pre- and postup.sh to UCS 3.2-1
Last modified: 2014-02-18 06:35:06 CET
pre- and postup.sh should be adjusted.
* preup.sh * Updated release notes URL Removed workaround for Bug #33342 Removed check for Bug #27686 Removed workaround for Bug #32634 Fixed typo Removed packages from preup list. TODO: update disk space check * postup.sh * Removed workaround for Bug #32634 Removed workaround for Bug #33121 Moved "3.2-0-errata" component to mirror mode Enabled "3.2-1-errata" component Removed workaround message for Bug #33426 TODO: set update/reboot/required?
(In reply to Janek Walkenhorst from comment #1) > TODO: set update/reboot/required? Yes, please. We update the kernel with this update.
(In reply to Stefan Gohmann from comment #2) > (In reply to Janek Walkenhorst from comment #1) > > TODO: set update/reboot/required? > > Yes, please. We update the kernel with this update. The univention-kernel-image meta package already sets this variable in the postinst.
(In reply to Moritz Muehlenhoff from comment #3) > (In reply to Stefan Gohmann from comment #2) > > (In reply to Janek Walkenhorst from comment #1) > > > TODO: set update/reboot/required? > > > > Yes, please. We update the kernel with this update. > > The univention-kernel-image meta package already sets this variable in the > postinst. OK, I don't see another reboot reason. So you don't need to set the variable.
Created attachment 5789 [details] Findings from early QA: prune old kernels preup.sh: +160: pruneOldKernel "2.6.18" pruneOldKernel "2.6.26" pruneOldKernel "2.6.32" Should be removed, as they were already purged. pruneOldKernel "3.2" Doesn't work, as the kernel is called "3.2*.0*" pruneOldKernel "3.10.0" Should be added. BTW: "sort -n" is wrong, as it stops at the first [^0-9.] character and thus doesn't sort the "ucs#" suffix; use '-V' AKA '--version-sort'. Or remove it all-together, as the order is only relevant for get_latest_kernel_pkg(), which already correctly uses "dpkg --compare-version". The logic will also leave behind at least one 2.6.18, 2.6.26, 2.6.32, 3.2.0 and 3.10.0 kernel (if one was ever installed). Perhaps we should switch to just "pruneOldKernel \*", which leaves behind the currently running and the (second-)newest kernel.
(In reply to Janek Walkenhorst from comment #1) > TODO: update disk space check Updated to twice the required amount used by an update with full software. > TODO: set update/reboot/required? (In reply to Stefan Gohmann from comment #4) > OK, I don't see another reboot reason. So you don't need to set the variable. Removed. (In reply to Philipp Hahn from comment #5) > Created attachment 5789 [details] Good code, applied. > preup.sh: +160: > pruneOldKernel "2.6.18" > pruneOldKernel "2.6.26" > pruneOldKernel "2.6.32" > Should be removed, as they were already purged. Kept, as purge is optional and has thus not necessarily happened. > pruneOldKernel "3.2" > Doesn't work, as the kernel is called "3.2*.0*" Correct, fixed. > pruneOldKernel "3.10.0" > Should be added. Correct, added. > The logic will also leave behind at least one 2.6.18, 2.6.26, 2.6.32, 3.2.0 > and 3.10.0 kernel (if one was ever installed). Perhaps we should switch to > just "pruneOldKernel \*", which leaves behind the currently running and the > (second-)newest kernel. Good idea, seems to work, but maybe better suited for a major release. (Reopen or create a new Bug if this shall be implemented)
OK: r47750,47715, OK: <http://apt.knut.univention.de/3.2/maintained/3.2-1/all/preup.sh> OK: <http://apt.knut.univention.de/3.2/maintained/3.2-1/all/postup.sh> OK: gpgv --keyring branches/ucs-3.2/ucs-3.2-0/base/univention-archive-key/univention-archive-key-ucs-3x.gpg postup.sh.gpg postup.sh OK: gpgv --keyring branches/ucs-3.2/ucs-3.2-0/base/univention-archive-key/univention-archive-key-ucs-3x.gpg -q preup.sh.gpg preup.sh OK: ucr set update32/pruneoldkernel=yes ; univention-upgrade FAIL: Should be removed from postup.sh, as already done for 3.2-0 > # Remove VNC module; Bug #30158 > univention-remove -y --purge univention-management-console-module-vnc >>"$UPDATER_LOG" 2>&1 > > # Remove Flash plugin installer, Bug #31852 > univention-remove -y --purge univention-flashplugin >>"$UPDATER_LOG" 2>&1 FYI: Unused functions could be removed, but may be needed by custom pre-/post-update scripts and/or customized DVDs. preup.sh: conffile_is_unmodified(), #Pre-upgrade postup.sh: reinstall(), check_and_install(), check_and_reinstall() (In reply to Janek Walkenhorst from comment #6) > > preup.sh: +160: > > pruneOldKernel "2.6.18" > > pruneOldKernel "2.6.26" > > pruneOldKernel "2.6.32" > > Should be removed, as they were already purged. > Kept, as purge is optional and has thus not necessarily happened. RFC: Perhaps change it to "2.6.*" to keep only the latest two? Not urgent... FAIL: "2>/dev/null" should be added to "dpkg-query" in list_passive_kernels()
(In reply to Philipp Hahn from comment #7) > FAIL: Should be removed from postup.sh, as already done for 3.2-0 Removed > FYI: Unused functions could be removed, but may be needed by custom > pre-/post-update scripts and/or customized DVDs. > preup.sh: conffile_is_unmodified(), #Pre-upgrade > postup.sh: reinstall(), check_and_install(), check_and_reinstall() Kept for writing future releases' pre/postup scripts. > RFC: Perhaps change it to "2.6.*" to keep only the latest two? Not urgent... Changed to "2.6.*" so that the old kernel are removed; This is only done when requested anyway and does not remove the current one, so low impact. > FAIL: "2>/dev/null" should be added to "dpkg-query" in list_passive_kernels() Added
OK: r47772 OK: univention-updater_9.0.38-14.1251.201402121654 OK: ucr set update32/pruneoldkernel=yes version/patchlevel=0 ; univention-upgrade --ignoressh --ignoreterm OK: <http://apt.knut.univention.de/3.2/maintained/3.2-1/all/preup.sh> OK: <http://apt.knut.univention.de/3.2/maintained/3.2-1/all/postup.sh>
FAIL: errata-level should be reset only for minor updated, not patchlevel releases: diff --git a/branches/ucs-3.2/ucs-3.2-1/base/univention-updater/script/postup.sh b/branches/ucs-3.2/ucs-3.2-1/base/univention-updater/script/postup.sh index 4f87478..852f712 100644 --- a/branches/ucs-3.2/ucs-3.2-1/base/univention-updater/script/postup.sh +++ b/branches/ucs-3.2/ucs-3.2-1/base/univention-updater/script/postup.sh @@ -126,9 +126,6 @@ ucr set \ repository/online/component/3.2-1-errata/description="Errata updates for UCS 3.2-1" \ repository/online/component/3.2-1-errata/version="3.2" >>"$UPDATER_LOG" 2>&1 -# Reset errata level -univention-config-registry set version/erratalevel=0 >>"$UPDATER_LOG" 2>&1 - # make sure that UMC server is restarted (Bug #33426) echo -n "Restart UMC server components to finish update... " >>"$UPDATER_LOG" 2>&1 sleep 10s
(In reply to Philipp Hahn from comment #10) > FAIL: errata-level should be reset only for minor updated, not patchlevel > releases: Removed
OK: r47781 OK: univention-updater_9.0.38-15.1252.201402131339 OK: gpgv --keyring /home/phahn/GIT/branches/ucs-3.2/ucs-3.2-0/base/univention-archive-key/univention-archive-key-ucs-3x.gpg postup.sh.gpg postup.sh OK: gpgv --keyring /home/phahn/GIT/branches/ucs-3.2/ucs-3.2-0/base/univention-archive-key/univention-archive-key-ucs-3x.gpg preup.sh.gpg preup.sh OK: <http://apt.knut.univention.de/3.2/maintained/3.2-1/all/postup.sh> OK: ucr set update32/pruneoldkernel=yes version/patchlevel=0 version/erratalevel=42; univention-upgrade --ignoressh --ignoreterm
An update via UMC does not work like expected. The message "THE UPDATE HAS BEEN FINISHED SUCCESSFULLY" has been removed and the Admin only gets a message that the connection was lost. I'm not sure we could remove the UMC restart or we re-add the message again.
I've re-added the message.
(In reply to Stefan Gohmann from comment #14) > I've re-added the message. FYI: see original Bug #33426 on the rational for that OK: r47836,47837,47838 OK: <http://apt.knut.univention.de/3.2/maintained/3.2-1/all/postup.sh> OK: The message is displayed again in UMC at the end of the installation
UCS 3.2-1 has been released: http://docs.univention.de/release-notes-3.2-1-en.html http://docs.univention.de/release-notes-3.2-1-de.html If this error occurs again, please use "Clone This Bug".