Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Dear RT, please unblock package libgphoto2 2.4.6-2. It fixes an RC bug, and fixes a wrong Build-Dependency. I'm attaching the diff from 2.4.6-1, which is currently in testing. unblock libgphoto2/2.4.6-2 Thank you, David -- . ''`. Debian developer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/ `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
diff --git a/debian/changelog b/debian/changelog index d707f60..f6d9e47 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +libgphoto2 (2.4.6-2) unstable; urgency=low + + * Merge Ubuntu patches, by Martin Pitt (thanks!): + - Update Build-Depends: Move from libltdl3-dev to libltdl-dev + (Closes: #531974). + - Create modern udev rules at build-time instead of at install-time + thanks to a patch sent (and now merged) upstream. Drop a lot of + code from libgphoto2-2.postinst accordingly, while adding the + generation code to debian/rules. Also bump the versioned dependency + on udev from 0.113-1 to 0.136 (Closes: #531978). + * Added myself to Uploaders + + -- David Paleino <da...@debian.org> Mon, 08 Nov 2010 11:19:51 +0100 + libgphoto2 (2.4.6-1) unstable; urgency=low * New upstream release. diff --git a/debian/control b/debian/control index 6256992..2bef34b 100644 --- a/debian/control +++ b/debian/control @@ -3,11 +3,12 @@ Section: libs Priority: optional Maintainer: Debian PhotoTools Maintainers <pkg-phototools-de...@lists.alioth.debian.org> Uploaders: Frederic Peters <fpet...@debian.org>, Cyril Brulebois <k...@debian.org> + , David Paleino <da...@debian.org> Build-Depends: debhelper (>> 5.0.0), quilt, type-handling, libtool, - libltdl3-dev, + libltdl-dev, zlib1g-dev, libusb-dev (>= 1:0.1.5) [!hurd-i386], libgpmg1-dev | not+linux-gnu, diff --git a/debian/libgphoto2-2.dirs b/debian/libgphoto2-2.dirs index 86610e6..e69de29 100644 --- a/debian/libgphoto2-2.dirs +++ b/debian/libgphoto2-2.dirs @@ -1 +0,0 @@ -etc/udev/rules.d diff --git a/debian/libgphoto2-2.postinst b/debian/libgphoto2-2.postinst index 6975dd9..3fe44c2 100644 --- a/debian/libgphoto2-2.postinst +++ b/debian/libgphoto2-2.postinst @@ -16,25 +16,6 @@ case "$1" in rm -f /usr/share/hal/fdi/information/10freedesktop/10-camera-$PACKAGE.fdi rm -f /usr/share/hal/fdi/information/20thirdparty/$PACKAGE.fdi rm -f /usr/share/hal/fdi/information/10freedesktop/10-camera-$PACKAGE-device.fdi - - # create udev rules file - if [ -d /etc/udev/ ]; then - /usr/lib/$PACKAGE/print-camera-list udev-rules version 0.98 mode 0664 group plugdev > /etc/udev/$PACKAGE.rules - # install the udev file only once: - # - the first time the package is installed - # OR - the first time the package is upgraded from a version earlier than 2.1.6-5.1 - if [ -z "$2" ] || dpkg --compare-versions "$2" lt 2.1.6-5.1 ; then - ln -sf ../$PACKAGE.rules /etc/udev/rules.d/025_$PACKAGE.rules - fi - - if [ -L /etc/udev/rules.d/020_libgphoto2_generic-ptp_support.rules ]; then - rm -f /etc/udev/rules.d/020_libgphoto2_generic-ptp_support.rules - fi - - if [ -f /etc/udev/libgphoto2_generic-ptp_support.rules ]; then - rm -f /etc/udev/libgphoto2_generic-ptp_support.rules - fi - fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/patches/01_udev_rules_136 b/debian/patches/01_udev_rules_136 new file mode 100644 index 0000000..053a830 --- /dev/null +++ b/debian/patches/01_udev_rules_136 @@ -0,0 +1,108 @@ +# Description: Add a new udev mode "136" to create contemporary udev rules which will avoid using the check_ptp_camera script, and provide udev DB tags for the hal deprecation. See http://lists.freedesktop.org/archives/devkit-devel/2009-June/000191.html for discussion. +# Upstream: http://sourceforge.net/tracker/?func=detail&aid=2801117&group_id=8874&atid=308874 (in svn head) +Index: libgphoto2-2.4.6/packaging/generic/print-camera-list.c +=================================================================== +--- libgphoto2-2.4.6.orig/packaging/generic/print-camera-list.c 2009-06-05 13:34:52.000000000 +0200 ++++ libgphoto2-2.4.6/packaging/generic/print-camera-list.c 2009-06-05 13:35:17.000000000 +0200 +@@ -366,12 +366,14 @@ + + typedef enum { + UDEV_PRE_0_98 = 0, +- UDEV_0_98 = 1 ++ UDEV_0_98 = 1, ++ UDEV_136 = 2 + } udev_version_t; + + static const StringFlagItem udev_version_t_map[] = { + { "pre-0.98", UDEV_PRE_0_98 }, + { "0.98", UDEV_0_98 }, ++ { "136", UDEV_136 }, + { NULL, 0 } + }; + +@@ -399,13 +401,20 @@ + "ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n", + /* UDEV_0_98 */ + "SUBSYSTEM!=\"usb|usb_device\", GOTO=\"libgphoto2_rules_end\"\n" ++ "ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n", ++ /* UDEV_136 */ ++ "SUBSYSTEM!=\"usb\", GOTO=\"libgphoto2_rules_end\"\n" ++ "ENV{DEVTYPE}!=\"usb_device\", GOTO=\"libgphoto2_rules_end\"\n" + "ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n\n" ++ "ENV{ID_USB_INTERFACES}==\"\", IMPORT{program}=\"usb_id --export %%p\"\n\n" + }; + static const char * const usbcam_strings[] = { + /* UDEV_PRE_0_98 */ +- "SYSFS{idVendor}==\"%04x\", SYSFS{idProduct}==\"%04x\", ", ++ "SYSFS{idVendor}==\"%04x\", SYSFS{idProduct}==\"%04x\"", + /* UDEV_0_98 */ +- "ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ", ++ "ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\"", ++ /* UDEV_136 */ ++ "ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"proprietary\"" + }; + udev_persistent_data_t *pdata; + pdata = calloc(1, sizeof(udev_persistent_data_t)); +@@ -444,7 +453,8 @@ + && pdata->mode == NULL + && pdata->group == NULL + && pdata->owner == NULL +- && pdata->script == NULL) { ++ && pdata->script == NULL ++ && pdata->version <= UDEV_0_98) { + FATAL("Either <script> or <mode,group,owner> parameters must be given."); + } + if ((pdata->script != NULL) && (pdata->mode != NULL +@@ -547,7 +557,11 @@ + + if (flags & GP_USB_HOTPLUG_MATCH_INT_CLASS) { + if ((flags & (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) == (GP_USB_HOTPLUG_MATCH_INT_CLASS|GP_USB_HOTPLUG_MATCH_INT_SUBCLASS|GP_USB_HOTPLUG_MATCH_INT_PROTOCOL)) { +- printf("PROGRAM=\"check-ptp-camera %02d/%02d/%02d\", ", class, subclass, proto); ++ if (pdata->version == UDEV_136) { ++ printf("ENV{ID_USB_INTERFACES}==\"*:%02d%02d%02d:*\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"PTP\"", class, subclass, proto); ++ } else { ++ printf("PROGRAM=\"check-ptp-camera %02d/%02d/%02d\"", class, subclass, proto); ++ } + has_valid_rule = 1; + } else { + if (class == 666) { +@@ -568,6 +582,9 @@ + } + } + if (has_valid_rule != 0) { ++ if (pdata->script != NULL || pdata->mode != NULL || pdata->owner != NULL || pdata->group != NULL) ++ printf(", "); ++ + if (pdata->script != NULL) { + printf("RUN+=\"%s\"\n", pdata->script); + } else if (pdata->mode != NULL || pdata->owner != NULL || pdata->group != NULL) { +@@ -589,7 +606,8 @@ + printf("\n"); + } else { + printf("\n"); +- FATAL("udev_camera_func(): illegal branch"); ++ if (pdata->version < UDEV_136) ++ FATAL("udev_camera_func(): illegal branch"); + } + } + return 0; +@@ -1118,12 +1136,16 @@ + fdi_device_end_func + }, + {"udev-rules", +- "udev rules file either for pre-0.98 or 0.98 and later", +- "Put it into /etc/udev/rules.d/90-libgphoto2.rules, set file mode, owner, group\n" ++ "udev rules file", ++ "For modes \"pre-0.98\" and \"0.98\" (and later), put it into\n" ++ " /etc/udev/rules.d/90-libgphoto2.rules, set file mode, owner, group\n" + " or add script to run. This rule files also uses the\n" + " check-ptp-camera script included in libgphoto2 source. Either put it to\n" + " /lib/udev/check-ptp-camera or adjust the path in the generated rules file.\n" +- " If you give a script parameter, the mode, owner, group parameters will be ignored.", ++ " If you give a script parameter, the mode, owner, group parameters will be ignored.\n" ++ " For mode \"136\" put it into /lib/udev/rules.d/40-libgphoto2.rules;\n" ++ " you can still use mode/owner/group, but the preferred mode of operation\n" ++ " is to use udev-extras for dynamic access permissions.\n", + "[script <PATH_TO_SCRIPT>|version <version>|mode <mode>|owner <owner>|group <group>]*", + udev_begin_func, + udev_camera_func, diff --git a/debian/patches/series b/debian/patches/series index af45255..d8170de 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +01_udev_rules_136 10_disable_cache #11_hurd_no_path_max_bsdsource #45_increase_canon_timeout diff --git a/debian/rules b/debian/rules index aad83f4..66c52ab 100755 --- a/debian/rules +++ b/debian/rules @@ -85,8 +85,14 @@ install: build debian/libgphoto2-port0/usr/share/doc/libgphoto2-port0 ifeq ($(DEB_HOST_ARCH_OS),linux) - install -D packaging/generic/check-ptp-camera debian/libgphoto2-$(major)/lib/udev/check-ptp-camera + # we don't need this any more with current udev rm debian/tmp/usr/lib/udev/check-ptp-camera + + # create udev rules + CAMLIBS=`ls -d debian/libgphoto2-$(major)/usr/lib/libgphoto2/2*` ./packaging/generic/print-camera-list udev-rules version 136 mode 0664 group plugdev > debian/libgphoto2-$(major).udev + dh_installudev + rm debian/libgphoto2-$(major).udev + -test -e debian/tmp/usr/lib/udev/check-mtp-device && \ mkdir -p debian/libgphoto2-port0/lib/udev && \ mv debian/tmp/usr/lib/udev/check-mtp-device \ @@ -122,7 +128,7 @@ binary-arch: build install dh_gencontrol -plibgphoto2-$(major)-dev dh_gencontrol -plibgphoto2-port0 ifeq (linux,$(DEB_HOST_ARCH_OS)) - dh_gencontrol -plibgphoto2-$(major) -- -Vudev-hotplug='udev (>= 0.113-1)' + dh_gencontrol -plibgphoto2-$(major) -- -Vudev-hotplug='udev (>= 0.136)' else dh_gencontrol -plibgphoto2-$(major) endif
signature.asc
Description: PGP signature