Hello Helmut, Please find attached anew version for the patch.
Here is what I fixed:
* Remove debconf calls from ola-rdm-tests postinst. (Closes: #767676)
* Fix other seriouys issues:
- Provides missing /etc/default/ola from ola postinst script to allow
olad service control in the same way rdm_test_server is
- Update init scripts to change advice to enable olad &
drm_test_server services (dpkg-reconfigure won't work without debconf)
- add postrm scripts for packages ola & ola-rdm-tests to fully remove
configuration files & dirs so that piuparts tests can pass
As you asked:
- I didn't changed configuration file names. I thought this was a bit
"out of scope", you confirmed :)
- packages pass piuparts tests (I tested .changes file with
--no-upgrade-test since jessie package fails to install)
I also documented verbosely changes in changelog as requested by [1]
Please let me know wheter the work is satisfying or I need to iterate more.
Regards,
Jean Baptiste
[1] https://release.debian.org/jessie/freeze_policy.html
On 18/11/2014 08:15, Helmut Grohne wrote:
> On Mon, Nov 17, 2014 at 11:42:54PM +0100, Jean Baptiste Favre wrote:
>> Thanks for your advice. I'm working on a new version of the patch.
>> In the meantime, what should I do with my already uploaded NMU (on
>> mentors.debian.net). Maybe I should delete it just to be sure nobody
>> will upload it ?
>
> You can do that.
>
>> I also noticed that init scripts ask for "dpkg-reconfigure package" to
>> enable service start, which is disabled by default. I guess this was OK
>> when debconf handles /etc/default/package content, but obviously it
>> won't work anymore.
>> I can change the init script to display another message.
>
> This sounds like a documentation fix. Currently, this should be covered
> by the freeze policy. So fixing it should be ok for now.
>
>> Finally, I'm considering shipping /etc/default/ola which is not shipped
>> currently, in the same way as /etc/default/ola-rdm-tests. It controls
>> whether olad service is enabled or not.
>
> This sounds like a functional change. While it looks like an
> improvement, I do not yet see why this should be release critical. So
> better skip this for the upload targeting jessie, but you can prepare a
> separate .debdiff for Wouter to apply later if you like. (Better create
> a new bug report at lower severity then.)
>
>> And, last question, speaking about /etc/default files, I wonder which
>> are the best practices:
>> - name /etc/default/xxx file according to the init script which will use
>> them
>> - name /etc/default/xxx file according to the package which provide them
>>
>> In my case, /etc/default/ola is provided by ola package but controls
>> olad service. Same with /etc/default/ola-rdm-tests which is provided by
>> eponym package to control rdm_test_server service.
>>
>> All these would indeed increase the overall package quality, but I
>> wonder if this is not a bit "out of scope" work considering Jessie freeze.
>
> You are rightly wondering. These changes are likely not acceptable for
> jessie.
>
> It looks to me that you are looking a bit too far at the moment. This
> bug was found using piuparts. After applying your initial .debdiff,
> piuparts still rightfully complains (about other things). This is why I
> asked you to reiterate. Nothing more.
>
> Helmut
diff -Nru ola-0.9.1/debian/changelog ola-0.9.1/debian/changelog --- ola-0.9.1/debian/changelog 2014-08-17 10:07:29.000000000 +0200 +++ ola-0.9.1/debian/changelog 2014-11-18 09:47:02.000000000 +0100 @@ -1,3 +1,17 @@ +ola (0.9.1-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Remove debconf calls from ola-rdm-tests postinst. (Closes: #767676) + * Fix other seriouys issues: + - Provides missing /etc/default/ola from ola postinst script to allow + olad service control in the same way rdm_test_server is + - Update init scripts to change advice to enable olad & drm_test_server + services (dpkg-reconfigure won't work without debconf) + - add postrm scripts for packages ola & ola-rdm-tests to fully remove + configuration files & dirs so that piuparts tests can pass + + -- Jean Baptiste Favre <[email protected]> Sun, 16 Nov 2014 17:44:18 +0100 + ola (0.9.1-1) unstable; urgency=low * New upstream release diff -Nru ola-0.9.1/debian/ola.olad.init ola-0.9.1/debian/ola.olad.init --- ola-0.9.1/debian/ola.olad.init 2014-08-17 09:17:40.000000000 +0200 +++ ola-0.9.1/debian/ola.olad.init 2014-11-18 09:46:06.000000000 +0100 @@ -23,7 +23,7 @@ if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then DAEMON_ARGS="--syslog --log-level 3 --config-dir /etc/ola" elif [ "$1" = "start" ] || [ "$1" = "stop" ] ; then - echo "The init script is currently inactive;\nuse \"dpkg-reconfigure ola\" to change this." >&2 + echo "The init script is currently inactive;\nPlease update \"/etc/default/ola\" to change this." >&2 fi [ -x "$DAEMON" ] || exit 0 diff -Nru ola-0.9.1/debian/ola.postinst ola-0.9.1/debian/ola.postinst --- ola-0.9.1/debian/ola.postinst 2014-08-17 09:17:40.000000000 +0200 +++ ola-0.9.1/debian/ola.postinst 2014-11-18 09:44:04.000000000 +0100 @@ -15,6 +15,21 @@ chmod g+s ${CONF_DIR}; fi; +conffile="/etc/default/ola" + +if [ -f $conffile ] ; then + sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' $conffile +else + cat << EOF > $conffile +# Defaults for ola-rdm-tests initscript (/etc/init.d/ola-rdm-tests) +# This is a POSIX shell fragment + +# [automatically edited by postinst, do not change line format ] + +# ola-rdm-tests daemon switch. If set to true, rdm_test_server.py will run. +RUN_DAEMON="true" +EOF +fi # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. diff -Nru ola-0.9.1/debian/ola.postrm ola-0.9.1/debian/ola.postrm --- ola-0.9.1/debian/ola.postrm 1970-01-01 01:00:00.000000000 +0100 +++ ola-0.9.1/debian/ola.postrm 2014-11-18 09:44:04.000000000 +0100 @@ -0,0 +1,45 @@ +#!/bin/sh +# postrm script for ola +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + purge) + if [ -f /etc/default/ola ]; then + rm -f /etc/default/ola + fi + if [ -d /etc/ola ]; then + rm -rf /etc/ola + fi + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru ola-0.9.1/debian/ola-rdm-tests.postinst ola-0.9.1/debian/ola-rdm-tests.postinst --- ola-0.9.1/debian/ola-rdm-tests.postinst 2014-04-21 08:19:26.000000000 +0200 +++ ola-0.9.1/debian/ola-rdm-tests.postinst 2014-11-18 09:44:04.000000000 +0100 @@ -3,34 +3,12 @@ conffile="/etc/default/ola-rdm-tests" -update_config_file() { - db_field=$1 - config_field=$2 - - RET=false - db_get $db_field - if [ -n "$RET" ] ; then - if grep -q "^$config_field" $conffile ; then - # keep any admin changes, while replacing the variable content - sed "s/^[ ]*$config_field=\".*\"/$config_field=\"$RET\"/" < $conffile > $conffile.new && - mv $conffile.new $conffile - else - echo "$config_field=\"$RET\"" >> $conffile - fi - fi -} - -# Source debconf library -- we have a Depends line -# to make sure it is there... -. /usr/share/debconf/confmodule -db_version 2.0 - case "$1" in configure) - if [ -f $conffile ] ; then - sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' $conffile - else - cat << EOF > $conffile + if [ -f $conffile ] ; then + sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' $conffile + else + cat << EOF > $conffile # Defaults for ola-rdm-tests initscript (/etc/init.d/ola-rdm-tests) # This is a POSIX shell fragment @@ -39,11 +17,7 @@ # ola-rdm-tests daemon switch. If set to true, rdm_test_server.py will run. RUN_DAEMON="true" EOF - fi - - update_config_file ola-rdm-tests/daemon RUN_DAEMON - - db_stop + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff -Nru ola-0.9.1/debian/ola-rdm-tests.postrm ola-0.9.1/debian/ola-rdm-tests.postrm --- ola-0.9.1/debian/ola-rdm-tests.postrm 1970-01-01 01:00:00.000000000 +0100 +++ ola-0.9.1/debian/ola-rdm-tests.postrm 2014-11-18 09:44:04.000000000 +0100 @@ -0,0 +1,42 @@ +#!/bin/sh +# postrm script for ola-rdm-tests +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +case "$1" in + purge) + if [ -f /etc/default/ola-rdm-tests ]; then + rm -f /etc/default/ola-rdm-tests + fi + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; + +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff -Nru ola-0.9.1/debian/ola-rdm-tests.rdm_test_server.init ola-0.9.1/debian/ola-rdm-tests.rdm_test_server.init --- ola-0.9.1/debian/ola-rdm-tests.rdm_test_server.init 2014-08-17 09:17:40.000000000 +0200 +++ ola-0.9.1/debian/ola-rdm-tests.rdm_test_server.init 2014-11-18 09:44:04.000000000 +0100 @@ -24,7 +24,7 @@ if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then DAEMON_ARGS="--world-writeable" elif [ "$1" = "start" ] || [ "$1" = "stop" ] ; then - echo "The init script is currently inactive;\nuse \"dpkg-reconfigure ola-rdm-tests\" to change this." >&2 + echo "The init script is currently inactive;\nPlease update \"/etc/default/ola-rdm-tests\" to change this." >&2 fi [ -x "$DAEMON" ] || exit 0
signature.asc
Description: OpenPGP digital signature

