clone 609736 -1 reassign -1 tech-ctte retitle -1 Please override isdnutils maintainer's decision to not fix the broken isdnutils package in wheezy thanks
Hi, I hereby ask the technical committee to overrule the decision of the maintainer of isdnutils re applying the patch in #609736, and to authorize me to upload the patch below via (sponsored) non-maintainer upload. This patch is based on the one at <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=609736#55>. Currently, isdnlog doesn't work out of the box anymore, as the device nodes are no longer created, neither (for static /dev) in postinst nor (for udev) in an init script helper. Be reminded the underlying i4l kernel modules lack sysfs support so udev cannot create the device files. The code for device node creation in several postinst files and the "init.d.functions" init script helper was intentionally removed by the maintainer in 1:3.9.20060704+dfsg.2-8, and without providing an appropriate replacement. Other binary packages built by src:isdnutils are also affected for the same reason. This is a regression compared to the current stable release. See the bug mentioned above for details and a longish discussion. The patch below, based on the wheezy (and sid) version of isdnutils 1:3.25+dfsg1-3wheezy1, restores the old behaviour so the device nodes are created as needed, in the spirit of Policy 10.6. However, the maintainer refuses to apply the patch, see multiple mails from him in the bug report. He would prefer patches to kernel and udev to get this done; until then he proposes that users add their own init scripts to create the device nodes. Though having device nodes created via kernel and udev would be nice, I don't think we do our users a service by not applying a workaround till then. As I assume any patches against the kernel wouldn't get through in time for the stable release, the approach of overriding the maintainer's decision seems the only option to me for wheezy. For jessie, there is enough time to get things handled in the kernel. Additionally, my main concern is to have a usable isdnutils package in wheezy. As the release is rather close, I am asking you to decide this question with some urgency. Regards, Christoph PS: In case you want to test things on real hardware: You might see segmentation faults or glibc backtraces from isdnlog. They have been fixed in the experimental version 1:3.25+dfsg1-6, see #696830 for details. commit a5555b4162fd333cac4f208a787efc5b2edb978d Author: Christoph Biedl <debian.a...@manchmal.in-ulm.de> Date: Fri Jan 18 23:58:06 2013 +0100 Re-add calls to MAKEDEV to *.postinst and init.d.functions. Closes: #609736 The usage of MAKEDEV was removed although the sysfs function calls that trigger udev to create the device files instead do not exist in the underlying kernel modules yet. Therefore, the special device files are missing, violating words and spirit of policy 10.6. This rendered at least isdnlog, ipppd, and isdnvboxserver unusable as they rely on these devices files. The capiutils package might or might not have been affected. This patch restores the old behaviour known to work up to and including squeeze. Basically it reverts commit 2fbdbd3 of the isdnutils Debian package git[0] where necessary, does some minor corrections, and adds required dependencies on makedev. Some remarks: * init.d.functions The MAKEDEV parameters isdn-io, isdn-tty, and isdn-ippp were not restored as they are already covered by isdnmodem and isdnbri, at least in the squeeze and wheezy version of MAKEDEV. The patch aims to be clear, therefore also the references to devfs are restored although horribly outdated. * isdnutils-base.postinst There was no need to resurrect isdnutils-base.postinst. The postinst created automatically by debhelper calls isdnutils.init which creates the device nodes anyway via init.d.functions. * ipppd.postinst Since the ipppd.postinst file had been removed later entirely, it is resurrected here. The old check for /dev/isdn-tty is considered bogus or legacy, MAKEDEV does not create such a device. So MAKEDEV was always called but created the device files only if udev was not running. Probably the device files always already existed from an earlier isdnutils-base configuration so this never caused harm. This applies to isdnvboxserver.postinst, too. The MAKEDEV invocation was enhanced by the 'WRITE_ON_UDEV=1' setting that enforces device file creation even if udev is running. The ipppd.postinst script needs the devices files later. On systems running udev these device files are re-created at boot time by isdnutils-base.init which ipppd depends on. * capiutils Also the capituils.postinst file had been removed later and is resurrected here. Actually, it's very likely not necessary to revert that removal. At first, "MAKEDEV capi" creates /dev/capi20. But capiutils.init also creates it if missing, that mknod call had not been removed in the commit mentioned above. To add more confusion, capi _does_ have sysfs support but udev creates a different device file /dev/capi, with the same numbers and permissions. However, "MAKEDEV capi" also creates /dev/capi20.$I where $I is in `seq -w 0 19`. This creation only happened if udev was not running, so virtually never. Appearently no one missed these files but this patch creates them anyway just in case anybody out there running a static /dev needs them. [0] git://git.debian.org/git/collab-maint/isdnutils.git The commit is also available via gitweb: http://anonscm.debian.org/gitweb/?p=collab-maint/isdnutils.git;a=commitdiff;h=2fbdbd318252b7b703fa63a79e3d08035f65b319 diff --git a/debian/capiutils.postinst b/debian/capiutils.postinst new file mode 100644 index 0000000..e5ff124 --- /dev/null +++ b/debian/capiutils.postinst @@ -0,0 +1,26 @@ +#! /bin/sh +# postinst script for capiutils + +set -e + +case "$1" in + configure) + if [ ! -c /dev/capi ] ; then + if [ ! -d /dev/.udev/ ] && [ ! -d /run/udev/ ] ; then + cd /dev + echo "Note: running MAKEDEV to create CAPI devices in /dev..." + /sbin/MAKEDEV capi + fi + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac + +#DEBHELPER# +exit 0 diff --git a/debian/control b/debian/control index 7b02d83..e478469 100644 --- a/debian/control +++ b/debian/control @@ -18,7 +18,7 @@ Package: isdnutils-base Priority: optional Architecture: linux-any Pre-Depends: debconf (>= 1.2.9) | debconf-2.0 -Depends: ${shlibs:Depends}, lsb-base (>= 1.3-9ubuntu3), ${misc:Depends} +Depends: ${shlibs:Depends}, lsb-base (>= 1.3-9ubuntu3), makedev, ${misc:Depends} Suggests: ipppd, isdnlog, isdnutils-doc, isdnutils-xtools, isdnvboxserver, isdnvboxclient Description: ISDN utilities - minimal set This package provides the basic set of ISDN utilities needed to make use @@ -117,7 +117,7 @@ Description: ISDN utilities - answering machine server Package: capiutils Architecture: linux-any Depends: libcapi20-3 (= ${binary:Version}), ${shlibs:Depends}, - lsb-base (>= 1.3-9ubuntu3), ${misc:Depends} + lsb-base (>= 1.3-9ubuntu3), makedev, ${misc:Depends} Section: net Description: ISDN utilities - tools for CAPI-capable cards Some ISDN cards (notably the AVM active cards, and the AVM passive cards diff --git a/debian/init.d.functions b/debian/init.d.functions index 1979cab..ced3500 100644 --- a/debian/init.d.functions +++ b/debian/init.d.functions @@ -80,15 +80,26 @@ check_isdncards() { if $isdncards_unchecked; then isdncards_unchecked=false - # see discussion in bug 609736 regarding use of if and ln in the next three lines - if [ ! -e /dev/isdnctrl -a -e /dev/isdnctrl0 ]; then - ln -sf /dev/isdnctrl0 /dev/isdnctrl - fi - if [ -e /dev/isdninfo ]; then ISDNINFO=/dev/isdninfo elif [ -e /dev/isdn/isdninfo ]; then ISDNINFO=/dev/isdn/isdninfo + elif [ -d /dev/.udev/ ] || [ -d /run/udev/ ] ; then + # udev is running + old_pwd="$(pwd)" + cd /dev + WRITE_ON_UDEV=1 /sbin/MAKEDEV isdnmodem isdnbri dcbri + cd "$old_pwd" + if [ -e /dev/isdninfo ]; then + ISDNINFO=/dev/isdninfo + elif [ -e /dev/isdn/isdninfo ]; then + ISDNINFO=/dev/isdn/isdninfo + fi + fi + + # see discussion in bug 609736 regarding use of if and ln in the next three lines + if [ ! -e /dev/isdnctrl -a -e /dev/isdnctrl0 ]; then + ln -sf /dev/isdnctrl0 /dev/isdnctrl fi if [ -z "$ISDNINFO" ]; then @@ -266,6 +277,15 @@ start_devices() { extraopts='master' fi for device in $master $slaves; do + # if the device doesn't exist in /dev nor in /dev/isdn, + # then this is (obviously?) not a devfs system, thus + # the device needs to be created. + if [ ! -c /dev/$device -a ! -c /dev/isdn/$device ]; then + cd /dev + /bin/echo -e " (creating /dev/$device)\c" + WRITE_ON_UDEV=1 /sbin/MAKEDEV $device || true + cd /etc/isdn + fi if [ `expr "$extraopts" : 'slave'` -eq 5 ]; then device=${master}+${device##????} # slaves can't be added if the master interface diff --git a/debian/ipppd.postinst b/debian/ipppd.postinst index 8a6ca81..ccf442d 100644 --- a/debian/ipppd.postinst +++ b/debian/ipppd.postinst @@ -19,6 +19,18 @@ trap 'rm -f "$tempfile"' EXIT case "$1" in configure) + old_pwd="$(pwd)" + if [ ! -c /dev/ttyI0 ]; then + cd /dev + echo "Note: running MAKEDEV to create ISDN devices in /dev..." + WRITE_ON_UDEV=1 /sbin/MAKEDEV isdn-tty isdn-io isdn-ippp + fi + # FIXME BUG! MAKEDEV should create the link by itself + if [ ! -d /dev/.udev/ ] && [ ! -d /run/udev ] ; then + rm -f isdnctrl + ln -s isdnctrl0 isdnctrl + fi + cd "$old_pwd" forcerestart=false RET=ippp0 db_get ipppd/whichif || true diff --git a/debian/isdnvboxserver.postinst b/debian/isdnvboxserver.postinst index 81d2207..a15d2bd 100644 --- a/debian/isdnvboxserver.postinst +++ b/debian/isdnvboxserver.postinst @@ -13,6 +13,12 @@ DEVDIR=/dev if [ ! -c $DEVDIR/ttyI6 ]; then if grep 'type devfs' /proc/mounts >/dev/null; then DEVDIR=/dev/isdn + else + if [ ! -c /dev/ttyI6 ]; then + cd /dev + echo "Note: running MAKEDEV to create ISDN tty devices in /dev..." + WRITE_ON_UDEV=1 /sbin/MAKEDEV isdn-tty + fi fi fi
signature.asc
Description: Digital signature