diff -Nru libgphoto2-2.4.11/debian/changelog libgphoto2-2.4.11/debian/changelog --- libgphoto2-2.4.11/debian/changelog 2012-01-04 01:15:45.000000000 +0000 +++ libgphoto2-2.4.11/debian/changelog 2012-01-24 19:58:08.000000000 +0000 @@ -1,3 +1,25 @@ +libgphoto2 (2.4.11-4ubuntu1) precise; urgency=low + + * Merge from Debian testing, remaining changes: + - Build-depend on libgd2-xpm-dev instead of libgd2-noxpm-dev + * Dropped changes, included in Debian: + - Build for multiarch + - drop use of {} in debian/libgphoto2-2-dev.install + - debian/patches/71_format-security.patch + - pass an explicit -X option to dh_makeshlibs + + -- Steve Langasek Tue, 24 Jan 2012 11:58:07 -0800 + +libgphoto2 (2.4.11-4) unstable; urgency=low + + * Acknowledge NMU. + * Avoid -Wformat-security warnings, thanks to Kees Cook. + * Multi-Archified package, thanks to Kees Cook and Steve Langasek + (Closes: #653198) + * Support (and recommend) udev >= 175 (Closes: #649137) + + -- David Paleino Fri, 30 Dec 2011 01:30:11 +0100 + libgphoto2 (2.4.11-3.1ubuntu2) precise; urgency=low * Build-depend on libgd2-xpm-dev instead of libgd2-noxpm-dev, so that diff -Nru libgphoto2-2.4.11/debian/patches/00-format_security.patch libgphoto2-2.4.11/debian/patches/00-format_security.patch --- libgphoto2-2.4.11/debian/patches/00-format_security.patch 1970-01-01 00:00:00.000000000 +0000 +++ libgphoto2-2.4.11/debian/patches/00-format_security.patch 2012-01-24 19:49:03.000000000 +0000 @@ -0,0 +1,20 @@ +From: Kees Cook +Subject: avoid -Wformat-security warnings +Origin: vendor +Forwarded: no + +--- + packaging/generic/print-camera-list.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- libgphoto2.orig/packaging/generic/print-camera-list.c ++++ libgphoto2/packaging/generic/print-camera-list.c +@@ -506,7 +506,7 @@ udev_begin_func (const func_params_t *pa + version_str); + print_version_comment(stdout, "# ", "\n", NULL, "#\n"); + printf ("# this file is autogenerated, local changes will be LOST on upgrades\n"); +- printf (pdata->begin_string); ++ printf ("%s", pdata->begin_string); + + if (pdata->version == UDEV_136) { + if (pdata->mode != NULL || pdata->owner != NULL || pdata->group != NULL) { diff -Nru libgphoto2-2.4.11/debian/patches/01-support_udev_175.patch libgphoto2-2.4.11/debian/patches/01-support_udev_175.patch --- libgphoto2-2.4.11/debian/patches/01-support_udev_175.patch 1970-01-01 00:00:00.000000000 +0000 +++ libgphoto2-2.4.11/debian/patches/01-support_udev_175.patch 2012-01-24 19:49:03.000000000 +0000 @@ -0,0 +1,82 @@ +From: David Paleino +Subject: usb_id, from udev 175, is a builtin +Origin: vendor, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649137 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=649137 +Forwarded: no + +--- + packaging/generic/print-camera-list.c | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) + +--- libgphoto2.orig/packaging/generic/print-camera-list.c ++++ libgphoto2/packaging/generic/print-camera-list.c +@@ -369,13 +369,15 @@ idlist_camera_func (const func_params_t + typedef enum { + UDEV_PRE_0_98 = 0, + UDEV_0_98 = 1, +- UDEV_136 = 2 ++ UDEV_136 = 2, ++ UDEV_175 = 3 + } 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 }, ++ { "175", UDEV_175 }, + { NULL, 0 } + }; + +@@ -414,6 +416,16 @@ udev_parse_params (const func_params_t * + "ENV{ID_USB_INTERFACES}==\"*:08*:*\", GOTO=\"libgphoto2_usb_end\"\n" + /* shortcut the most common camera driver, ptp class, so we avoid parsing 1000 + * more rules . It will be completed in udev_begin_func() */ ++ "ENV{ID_USB_INTERFACES}==\"*:060101:*\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"PTP\", ", ++ /* UDEV_175 */ ++ "ACTION!=\"add\", GOTO=\"libgphoto2_rules_end\"\n" ++ "SUBSYSTEM!=\"usb\", GOTO=\"libgphoto2_usb_end\"\n" ++ "ENV{DEVTYPE}!=\"usb_device\", GOTO=\"libgphoto2_usb_end\"\n\n" ++ "ENV{ID_USB_INTERFACES}==\"\", IMPORT{builtin}=\"usb_id\"\n" ++ /* ignore mass storage class having devices in mark-up */ ++ "ENV{ID_USB_INTERFACES}==\"*:08*:*\", GOTO=\"libgphoto2_usb_end\"\n" ++ /* shortcut the most common camera driver, ptp class, so we avoid parsing 1000 ++ * more rules . It will be completed in udev_begin_func() */ + "ENV{ID_USB_INTERFACES}==\"*:060101:*\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"PTP\", " + }; + static const char * const usbcam_strings[] = { +@@ -422,6 +434,8 @@ udev_parse_params (const func_params_t * + /* UDEV_0_98 */ + "ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\"", + /* UDEV_136 */ ++ "ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"proprietary\"", ++ /* UDEV_175 */ + "ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"proprietary\"" + }; + static const char * const usbdisk_strings[] = { +@@ -430,6 +444,8 @@ udev_parse_params (const func_params_t * + /* UDEV_0_98 */ + "KERNEL==\"%s\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\"", + /* UDEV_136 */ ++ "KERNEL==\"%s\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"proprietary\"", ++ /* UDEV_175 */ + "KERNEL==\"%s\", ATTRS{idVendor}==\"%04x\", ATTRS{idProduct}==\"%04x\", ENV{ID_GPHOTO2}=\"1\", ENV{GPHOTO2_DRIVER}=\"proprietary\"" + }; + udev_persistent_data_t *pdata; +@@ -508,7 +524,7 @@ udev_begin_func (const func_params_t *pa + printf ("# this file is autogenerated, local changes will be LOST on upgrades\n"); + printf ("%s", pdata->begin_string); + +- if (pdata->version == UDEV_136) { ++ if (pdata->version == UDEV_136 || pdata->version == UDEV_175) { + if (pdata->mode != NULL || pdata->owner != NULL || pdata->group != NULL) { + if (pdata->mode != NULL) { + printf("MODE=\"%s\", ", pdata->mode); +@@ -599,7 +615,7 @@ udev_camera_func (const func_params_t *p + + 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)) { +- if (pdata->version == UDEV_136) { ++ if (pdata->version == UDEV_136 || pdata->version == UDEV_175) { + 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); diff -Nru libgphoto2-2.4.11/debian/patches/71_format-security.patch libgphoto2-2.4.11/debian/patches/71_format-security.patch --- libgphoto2-2.4.11/debian/patches/71_format-security.patch 2012-01-03 23:20:24.000000000 +0000 +++ libgphoto2-2.4.11/debian/patches/71_format-security.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Description: avoid -Wformat-security warnings. -Author: Kees Cook - -Index: libgphoto2-2.4.11/packaging/generic/print-camera-list.c -=================================================================== ---- libgphoto2-2.4.11.orig/packaging/generic/print-camera-list.c 2011-12-24 17:24:28.081326412 -0800 -+++ libgphoto2-2.4.11/packaging/generic/print-camera-list.c 2011-12-24 17:24:39.841493885 -0800 -@@ -506,7 +506,7 @@ - version_str); - print_version_comment(stdout, "# ", "\n", NULL, "#\n"); - printf ("# this file is autogenerated, local changes will be LOST on upgrades\n"); -- printf (pdata->begin_string); -+ printf ("%s", pdata->begin_string); - - if (pdata->version == UDEV_136) { - if (pdata->mode != NULL || pdata->owner != NULL || pdata->group != NULL) { diff -Nru libgphoto2-2.4.11/debian/patches/series libgphoto2-2.4.11/debian/patches/series --- libgphoto2-2.4.11/debian/patches/series 2012-01-03 23:20:24.000000000 +0000 +++ libgphoto2-2.4.11/debian/patches/series 2012-01-24 19:52:21.000000000 +0000 @@ -1,4 +1,5 @@ #10_disable_cache #11_hurd_no_path_max_bsdsource +00-format_security.patch +01-support_udev_175.patch 70_increase_max_entries -71_format-security.patch diff -Nru libgphoto2-2.4.11/debian/rules libgphoto2-2.4.11/debian/rules --- libgphoto2-2.4.11/debian/rules 2012-01-03 23:20:24.000000000 +0000 +++ libgphoto2-2.4.11/debian/rules 2012-01-24 19:49:40.000000000 +0000 @@ -9,6 +9,7 @@ ifeq ($(DEB_HOST_ARCH_OS),hurd) CONFIGURE_OPTIONS += --without-libusb endif + DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) ### Overrides: @@ -38,7 +39,7 @@ # No longer needed with current udev. But check with non-Linux architectures stuff: # rm debian/libgphoto2-2/lib/udev/check-ptp-camera # Generate the udev file, get it installed, and clean: - CAMLIBS=`ls -d debian/libgphoto2-$(major)/usr/lib/$(DEB_HOST_MULTIARCH)/libgphoto2/2*` ./packaging/generic/print-camera-list udev-rules version 136 mode 0664 group plugdev > debian/libgphoto2-$(major).udev + CAMLIBS=`ls -d debian/libgphoto2-$(major)/usr/lib/$(DEB_HOST_MULTIARCH)/libgphoto2/2*` ./packaging/generic/print-camera-list udev-rules version 175 mode 0664 group plugdev > debian/libgphoto2-$(major).udev dh_installudev rm debian/libgphoto2-$(major).udev endif @@ -56,7 +57,7 @@ ifeq (linux,$(DEB_HOST_ARCH_OS)) override_dh_gencontrol: dh_gencontrol - dh_gencontrol -plibgphoto2-$(major) -- -Vudev-hotplug='udev (>= 0.136)' + dh_gencontrol -plibgphoto2-$(major) -- -Vudev-hotplug='udev (>= 0.175)' endif %: