[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#924161: unblock: lirc/0.10.1-5.1



Hi abe,


On Mon, Mar 11, 2019 at 12:31:42AM +0100, Andreas Beckmann wrote:
> This needs a lot of more work :-(
> 
> * is this usage of --link-doc valid? the packages don't have a strictly
> versioned Depends: lirc (= ${binary:version}), so I can install *only*
> liblirc0 and have a dangling /usr/share/doc/liblirc0 and e.g. no
> copyright file

Right, that should have been liblirc0 (which they all depend on, transitively,
except for lirc-doc). However, I now noticed an interaction with lirc-doc which
makes --link-doc particularly unadvisable (see below).

Note to self: see if it's possible to detect that error automatically in lintian.


> * in all the *.maintscript files, add 0.10.1-5.1~ as 'prior-version'
> argument - you don't want to run this stuff again on *every* upgrade
> 
> * lirc.maintscript has typos: /etx/...

Thanks :)

I didn't get yelled at by piuparts, so it went right through my testing...


> * does the override_dh_installdocs target work with
>   dpkg-buildpackage -A/-B (i.e. building arch and indep packages separately)

Yes, I tested that, build went fine  :)

(To be precise, sbuild --no-arch-all --arch-any && sbuild --arch-all --no-arch-any)


> * lirc.postinst: using wildcards looks very fragile

I tried using `-p lirc` but that didn't work, probably for the same reason
dh-python wasn't doing it automatically in the first place.

Would you prefer leaving #924158 open and not doing manually?


> * lirc.posztrm: why do you manually delete conffiles on purge? dpkg does
> that already. (If they are not conffiles, you can't use
> dpkg-maintscript-helper on them.)

The package was previously doing that, and I didn't touch that part of the
postrm script, but I could remove the unecessary conffile handling if you'd
like.

I suspect that's the because the package previously installed the conffiles with
a spurious .dist extension, and copied them to the right location during
postinst, for some unscrutable reason.

debian/rules had a comment saying it was “not to overwrite conffiles” but that
makes little sense: dpkg won't overwrite user-modified conffiles by default.


> PS: I hate cleaning up after misuse of --link-doc. Save brain cycles,
> not bits on disks. Right now I'm afraid that you are turning a mess into
> a greater mess.

I'm not super keen on --link-doc either, but I didn't want to completely ignore
the original package maintainer's intent. However, I just noticed additional
complications -- lirc-doc shipping things in /usr/share/doc/lirc -- which make
it a bad idea (or at least more annoying to implement than I care to), so I just
reverted the change.

On the other hand, I can agree this is a mess and I might not have a mop large
enough...


> PPS: I only looked at the debdiff, not at the package itself

Appreciated regardless.  :)


Here is the diff compared to the previous proposed version, the full debdiff is
attached:

  diff --git c/debian/changelog w/debian/changelog
  index 4681945..32b2dc1 100644
  --- c/debian/changelog
  +++ w/debian/changelog
  @@ -3,16 +3,19 @@ lirc (0.10.1-5.1) unstable; urgency=medium
     * Non-maintainer upload
   
     * debian/rules
  -    + Replace rdfind-based dedup with dh_installdocs --link-doc
  -      - This achieves the same effect (copyright, changelog, ... aren't
  -        duplicated) cleanly and without RC-buggyness.  (Closes: #919843)
  -      - Add missing maintscripts for dir-to-symlink migration.
  -        Thanks to Niels Thykier for spotting the bug.
  +    + Remove rdfind-based dedup (Closes: #919843)
  +      Using dh_installdocs --link-docs was investigated, and rejected due to
  +      - limited benefits;
  +      - interactions between lirc-docs shipping files under /usr/share/doc/lirc,
  +        but liblirc0 being the obvious candidate due to dependencies.
   
       + Do not install conffiles in a dummy location
         dpkg will, by default, not overwrite users' conffiles,
         so shipping them in a different location is superfluous.
   
  +  * Removed liblircclient{0,-dev}
  +    They were obsolete transitional packages that predated the stretch release.
  +
     * Rename debian/post{inst,rm} to lirc.post{inst,rm}
     * debian/lirc.{postinst,prerm}: Recompile and remove Python bytecode as needed
       Closes: #924158
  @@ -23,7 +26,7 @@ lirc (0.10.1-5.1) unstable; urgency=medium
   
     * debian/changelog: Fix spelling in v0.10.1-4
   
  - -- Nicolas Braud-Santoni <nicoo@debian.org>  Sun, 10 Mar 2019 00:28:01 +0100
  + -- Nicolas Braud-Santoni <nicoo@debian.org>  Tue, 12 Mar 2019 01:33:40 +0100
   
   lirc (0.10.1-5) unstable; urgency=medium
   
  diff --git c/debian/control w/debian/control
  index 1fc9231..8711007 100644
  --- c/debian/control
  +++ w/debian/control
  @@ -34,6 +34,7 @@ Build-Depends:
    xsltproc
   # libjs-jquery
   
  +
   Package: lirc
   Architecture: any
   Depends:
  @@ -104,24 +105,6 @@ Description: Infra-red remote control support - Run-time libraries
    LIRC applications (lirc_private.so*)
   
   
  -Package: liblircclient0
  -Architecture: any
  -Section: libs
  -Depends: liblirc-client0, ${misc:Depends}
  -Description: Transitional placeholder for obsoleted liblircclient0
  - Virtual, empty package used in the process of renaming liblircclient0
  - to liblirc-client0.
  -
  -
  -Package: liblircclient-dev
  -Architecture: any
  -Section: libdevel
  -Depends: liblirc-dev, ${misc:Depends}
  -Description: Transitional placeholder for obsoleted liblircclient-dev
  - Virtual, empty package used in the process of incorporating
  - liblircclient-dev in new package liblirc-dev.
  -
  -
   Package: liblirc-dev
   Architecture: any
   #Multi-Arch: same
  diff --git c/debian/liblirc-client0.maintscript w/debian/liblirc-client0.maintscript
  deleted file mode 100644
  index 284ff9f..0000000
  --- c/debian/liblirc-client0.maintscript
  +++ /dev/null
  @@ -1 +0,0 @@
  -dir_to_symlink /usr/share/doc/liblirc-client0 /usr/share/doc/lirc
  diff --git c/debian/liblirc-dev.maintscript w/debian/liblirc-dev.maintscript
  deleted file mode 100644
  index 3ae1649..0000000
  --- c/debian/liblirc-dev.maintscript
  +++ /dev/null
  @@ -1 +0,0 @@
  -dir_to_symlink /usr/share/doc/liblirc-dev /usr/share/doc/lirc
  diff --git c/debian/liblirc0.maintscript w/debian/liblirc0.maintscript
  deleted file mode 100644
  index 6e2c3b8..0000000
  --- c/debian/liblirc0.maintscript
  +++ /dev/null
  @@ -1 +0,0 @@
  -dir_to_symlink /usr/share/doc/liblirc0 /usr/share/doc/lirc
  diff --git c/debian/liblircclient-dev.maintscript w/debian/liblircclient-dev.maintscript
  deleted file mode 100644
  index effdab2..0000000
  --- c/debian/liblircclient-dev.maintscript
  +++ /dev/null
  @@ -1 +0,0 @@
  -dir_to_symlink /usr/share/doc/liblircclient-dev /usr/share/doc/lirc
  diff --git c/debian/liblircclient0.maintscript w/debian/liblircclient0.maintscript
  deleted file mode 100644
  index be49fcd..0000000
  --- c/debian/liblircclient0.maintscript
  +++ /dev/null
  @@ -1 +0,0 @@
  -dir_to_symlink /usr/share/doc/liblircclient0 /usr/share/doc/lirc
  diff --git c/debian/lirc-x.maintscript w/debian/lirc-x.maintscript
  deleted file mode 100644
  index fdeebbe..0000000
  --- c/debian/lirc-x.maintscript
  +++ /dev/null
  @@ -1 +0,0 @@
  -dir_to_symlink /usr/share/doc/lirc-x /usr/share/doc/lirc
  diff --git c/debian/lirc.maintscript w/debian/lirc.maintscript
  index 56fb4f0..f26aaa2 100644
  --- c/debian/lirc.maintscript
  +++ w/debian/lirc.maintscript
  @@ -1,4 +1,4 @@
  -mv_conffile /etx/lirc/lircd.conf.dist /etc/lirc/lircd.conf
  -mv_conffile /etx/lirc/lircmd.conf.dist /etc/lirc/lircmd.conf
  -mv_conffile /etx/lirc/irexec.lircrc.dist /etc/lirc/irexec.lircrc
  -mv_conffile /etx/lirc/lirc_options.conf.dist /etc/lirc/lirc_options.conf
  +mv_conffile /etc/lirc/lircd.conf.dist /etc/lirc/lircd.conf 0.10.1-5.1~
  +mv_conffile /etc/lirc/lircmd.conf.dist /etc/lirc/lircmd.conf 0.10.1-5.1~
  +mv_conffile /etc/lirc/irexec.lircrc.dist /etc/lirc/irexec.lircrc 0.10.1-5.1~
  +mv_conffile /etc/lirc/lirc_options.conf.dist /etc/lirc/lirc_options.conf 0.10.1-5.1~
  diff --git c/debian/rules w/debian/rules
  index 89cec3a..84787ef 100755
  --- c/debian/rules
  +++ w/debian/rules
  @@ -57,11 +57,6 @@ ifneq "nocheck"  "$(findstring nocheck,$(DEB_BUILD_OPTIONS))"
   	esac
   endif
   
  -
  -override_dh_installdocs:
  -	dh_installdocs --link-doc=lirc -a
  -	dh_installdocs -p lirc-doc
  -
   override_dh_installsystemd:
   ifeq ($(DEB_BUILD_ARCH_OS), linux)
   	dh_installsystemd -p lirc lircd.socket


Best,

  nicoo
diff -Nru lirc-0.10.1/debian/changelog lirc-0.10.1/debian/changelog
--- lirc-0.10.1/debian/changelog	2019-01-01 15:19:01.000000000 +0100
+++ lirc-0.10.1/debian/changelog	2019-03-12 01:33:40.000000000 +0100
@@ -1,3 +1,33 @@
+lirc (0.10.1-5.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+
+  * debian/rules
+    + Remove rdfind-based dedup (Closes: #919843)
+      Using dh_installdocs --link-docs was investigated, and rejected due to
+      - limited benefits;
+      - interactions between lirc-docs shipping files under /usr/share/doc/lirc,
+        but liblirc0 being the obvious candidate due to dependencies.
+
+    + Do not install conffiles in a dummy location
+      dpkg will, by default, not overwrite users' conffiles,
+      so shipping them in a different location is superfluous.
+
+  * Removed liblircclient{0,-dev}
+    They were obsolete transitional packages that predated the stretch release.
+
+  * Rename debian/post{inst,rm} to lirc.post{inst,rm}
+  * debian/lirc.{postinst,prerm}: Recompile and remove Python bytecode as needed
+    Closes: #924158
+
+  * debian/control: Fix relationships on liblirc{,client}-dev.
+    This should be Breaks+Replaces, not Conflict+Replaces.
+    Using the former should ensure that upgrading from stretch works smoothly.
+
+  * debian/changelog: Fix spelling in v0.10.1-4
+
+ -- Nicolas Braud-Santoni <nicoo@debian.org>  Tue, 12 Mar 2019 01:33:40 +0100
+
 lirc (0.10.1-5) unstable; urgency=medium
 
   * Fix upstream #343, --connect parsing error.
@@ -11,7 +41,7 @@
 lirc (0.10.1-4) unstable; urgency=medium
 
   [ Alec Leamas ]
-  * Dont use broken LOG_CONS syslog flag, closes: #872749.
+  * Don't use broken LOG_CONS syslog flag, closes: #872749.
 
   [ Pino Toscano ]
   * Fix build on !linux OS, restrict systemd only to linux OS. closes: #912400
diff -Nru lirc-0.10.1/debian/control lirc-0.10.1/debian/control
--- lirc-0.10.1/debian/control	2019-01-01 15:19:01.000000000 +0100
+++ lirc-0.10.1/debian/control	2019-03-12 01:33:40.000000000 +0100
@@ -29,12 +29,12 @@
  python3-dev (>= 3.5),
  python3-setuptools,
  python3-yaml,
- rdfind,
  socat [!hurd-any],
  systemd [linux-any],
  xsltproc
 # libjs-jquery
 
+
 Package: lirc
 Architecture: any
 Depends:
@@ -105,30 +105,12 @@
  LIRC applications (lirc_private.so*)
 
 
-Package: liblircclient0
-Architecture: any
-Section: libs
-Depends: liblirc-client0, ${misc:Depends}
-Description: Transitional placeholder for obsoleted liblircclient0
- Virtual, empty package used in the process of renaming liblircclient0
- to liblirc-client0.
-
-
-Package: liblircclient-dev
-Architecture: any
-Section: libdevel
-Depends: liblirc-dev, ${misc:Depends}
-Description: Transitional placeholder for obsoleted liblircclient-dev
- Virtual, empty package used in the process of incorporating
- liblircclient-dev in new package liblirc-dev.
-
-
 Package: liblirc-dev
 Architecture: any
 #Multi-Arch: same
 Section: libdevel
 Provides: liblircclient-dev
-Conflicts: liblircclient-dev (<< 0.9.1)
+Breaks: liblircclient-dev (<< 0.9.1)
 Replaces: liblircclient-dev (<< 0.9.1)
 Depends:
  liblirc0 (= ${binary:Version}),
diff -Nru lirc-0.10.1/debian/lirc.maintscript lirc-0.10.1/debian/lirc.maintscript
--- lirc-0.10.1/debian/lirc.maintscript	1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.10.1/debian/lirc.maintscript	2019-03-12 01:33:40.000000000 +0100
@@ -0,0 +1,4 @@
+mv_conffile /etc/lirc/lircd.conf.dist /etc/lirc/lircd.conf 0.10.1-5.1~
+mv_conffile /etc/lirc/lircmd.conf.dist /etc/lirc/lircmd.conf 0.10.1-5.1~
+mv_conffile /etc/lirc/irexec.lircrc.dist /etc/lirc/irexec.lircrc 0.10.1-5.1~
+mv_conffile /etc/lirc/lirc_options.conf.dist /etc/lirc/lirc_options.conf 0.10.1-5.1~
diff -Nru lirc-0.10.1/debian/lirc.postinst lirc-0.10.1/debian/lirc.postinst
--- lirc-0.10.1/debian/lirc.postinst	1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.10.1/debian/lirc.postinst	2019-03-12 01:33:40.000000000 +0100
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+set -e
+
+rm -f /etc/init.d/lirc
+
+if which systemd-tmpfiles >/dev/null; then
+    systemd-tmpfiles --create /usr/lib/tmpfiles.d/lirc.conf || :
+fi
+
+# distutils' sysconfig.get_python_lib is broken - #911038. Furthermore, the
+# first iteration of this fix did not remove the links in postrm. So:
+find /usr/lib/python3/dist-packages -maxdepth 1 -type l -name lirc -delete
+find /usr/lib/python3/dist-packages -maxdepth 1 -type l -name lirc-setup -delete
+ln -s /usr/lib/*/python*/site-packages/lirc \
+    /usr/lib/python3/dist-packages
+ln -s /usr/lib/*/python*/site-packages/lirc-setup \
+    /usr/lib/python3/dist-packages
+
+# Recompile Python bytecode as needed
+py3compile /usr/lib/*/python3.*/site-packages/lirc
+py3compile /usr/lib/*/python3.*/site-packages/lirc-setup
+
+#DEBHELPER#
diff -Nru lirc-0.10.1/debian/lirc.postrm lirc-0.10.1/debian/lirc.postrm
--- lirc-0.10.1/debian/lirc.postrm	1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.10.1/debian/lirc.postrm	2019-03-12 01:33:40.000000000 +0100
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = 'purge'; then
+    for f in lircd.conf lircmd.conf irexec.lircrc lirc_options.conf; do
+	rm -f /etc/lirc/$f;
+    done || :
+    find /etc/lirc -type d -empty -delete || :
+    rm -f /usr/lib/python3/dist-packages/lirc
+    rm -f /usr/lib/python3/dist-packages/lirc-setup
+fi
+
+
+#DEBHELPER#
+
diff -Nru lirc-0.10.1/debian/lirc.prerm lirc-0.10.1/debian/lirc.prerm
--- lirc-0.10.1/debian/lirc.prerm	1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.10.1/debian/lirc.prerm	2019-03-12 01:33:40.000000000 +0100
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+# Remove Python bytecode as needed
+py3clean -p lirc
+
+
+#DEBHELPER#
diff -Nru lirc-0.10.1/debian/postinst lirc-0.10.1/debian/postinst
--- lirc-0.10.1/debian/postinst	2019-01-01 15:19:01.000000000 +0100
+++ lirc-0.10.1/debian/postinst	1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-#!/bin/sh
-
-set -e
-
-rm -f /etc/init.d/lirc
-
-if which systemd-tmpfiles >/dev/null; then
-    systemd-tmpfiles --create /usr/lib/tmpfiles.d/lirc.conf || :
-fi
-
-for f in lircd.conf lircmd.conf irexec.lircrc lirc_options.conf; do
-    test -e /etc/lirc/$f || cp /etc/lirc/${f}.dist /etc/lirc/$f || :
-done
-
-# distutils' sysconfig.get_python_lib is broken - #911038. Furthermore, the
-# first iteration of this fix did not remove the links in postrm. So:
-find /usr/lib/python3/dist-packages -maxdepth 1 -type l -name lirc -delete
-find /usr/lib/python3/dist-packages -maxdepth 1 -type l -name lirc-setup -delete
-ln -s /usr/lib/*/python*/site-packages/lirc \
-    /usr/lib/python3/dist-packages
-ln -s /usr/lib/*/python*/site-packages/lirc-setup \
-    /usr/lib/python3/dist-packages
-
-#DEBHELPER#
diff -Nru lirc-0.10.1/debian/postrm lirc-0.10.1/debian/postrm
--- lirc-0.10.1/debian/postrm	2019-01-01 15:14:43.000000000 +0100
+++ lirc-0.10.1/debian/postrm	1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if test "$1" = 'purge'; then
-    for f in lircd.conf lircmd.conf irexec.lircrc lirc_options.conf; do
-	rm -f /etc/lirc/$f;
-    done || :
-    find /etc/lirc -type d -empty -delete || :
-    rm -f /usr/lib/python3/dist-packages/lirc
-    rm -f /usr/lib/python3/dist-packages/lirc-setup
-fi
-
-
-#DEBHELPER#
-
diff -Nru lirc-0.10.1/debian/rules lirc-0.10.1/debian/rules
--- lirc-0.10.1/debian/rules	2019-01-01 15:19:01.000000000 +0100
+++ lirc-0.10.1/debian/rules	2019-03-12 01:33:40.000000000 +0100
@@ -42,12 +42,6 @@
 endif
 	# Temporary postinstall 0.9.4 script.
 	cp debian/lirc-old2new debian/tmp/usr/share/lirc
-	# Don't overwrite existing config files.
-	for f in lircd.conf lircmd.conf irexec.lircrc lirc_options.conf; do \
-	    mv debian/tmp/etc/lirc/$$f debian/tmp/etc/lirc/$$f.dist; \
-	done
-	# De-duplicate docs
-	rdfind -makesymlinks true debian/tmp/usr/share/doc/lirc
 
 override_dh_auto_test:
 ifneq "nocheck"  "$(findstring nocheck,$(DEB_BUILD_OPTIONS))"
@@ -63,7 +57,6 @@
 	esac
 endif
 
-
 override_dh_installsystemd:
 ifeq ($(DEB_BUILD_ARCH_OS), linux)
 	dh_installsystemd -p lirc lircd.socket

Attachment: signature.asc
Description: PGP signature


Reply to: