Package: libgphoto2 Version: 2.4.11-3.1 Severity: normal Tags: patch Hello!
In an effort to reach the Multi-Arch release goal, here is a patch to build libgphoto2 for Multi-Arch, along with a few other subtle fixes. :) Thanks! -Kees -- Kees Cook @debian.org
diff -Nru libgphoto2-2.4.11/debian/changelog libgphoto2-2.4.11/debian/changelog --- libgphoto2-2.4.11/debian/changelog 2011-09-10 08:11:31.000000000 -0700 +++ libgphoto2-2.4.11/debian/changelog 2011-12-24 17:25:34.000000000 -0800 @@ -1,3 +1,14 @@ +libgphoto2 (2.4.11-3.2) UNRELEASED; urgency=low + + * debian/{control,rules,compat,*.install}: Build for Multi-arch, fix + CFLAGS handling, move "print-camera-list" ELF from libgphoto2-2 to + libgphoto2-2-dev. + * debian/libgphoto2-2-dev.install: + - drop use of {}, since it is not technically supported. + * debian/patches/71_format-security.patch: fix missing "%s" in printf(). + + -- Kees Cook <k...@debian.org> Sat, 24 Dec 2011 16:25:52 -0800 + libgphoto2 (2.4.11-3.1) unstable; urgency=low * Non-maintainer upload. diff -Nru libgphoto2-2.4.11/debian/compat libgphoto2-2.4.11/debian/compat --- libgphoto2-2.4.11/debian/compat 2011-02-26 04:08:20.000000000 -0800 +++ libgphoto2-2.4.11/debian/compat 2011-12-24 16:28:51.000000000 -0800 @@ -1 +1 @@ -7 +9 diff -Nru libgphoto2-2.4.11/debian/control libgphoto2-2.4.11/debian/control --- libgphoto2-2.4.11/debian/control 2011-09-10 07:54:54.000000000 -0700 +++ libgphoto2-2.4.11/debian/control 2011-12-24 17:10:25.000000000 -0800 @@ -6,7 +6,7 @@ , David Paleino <da...@debian.org> , Gürkan Sengün <gur...@phys.ethz.ch> Build-Depends: - debhelper (>= 7.0.50) + debhelper (>= 8.1.3~) , libtool , libltdl-dev , zlib1g-dev @@ -35,6 +35,8 @@ , libc-dev , pkg-config , ${misc:Depends} +Breaks: libgphoto2-2 (<< 2.4.11-3.2) +Replaces: libgphoto2-2 (<< 2.4.11-3.2) Description: gphoto2 digital camera library (development files) The gphoto2 library can be used by applications to access various digital camera models, via standard protocols such as USB Mass Storage @@ -55,10 +57,12 @@ Package: libgphoto2-port0 Architecture: any +Multi-Arch: same Provides: libgphoto2port Replaces: libgphoto2port Conflicts: libgphoto2port Breaks: gphoto2 (<= 2.1.1) +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends} , ${misc:Depends} @@ -72,7 +76,9 @@ Package: libgphoto2-2 Architecture: any +Multi-Arch: same Breaks: gphoto2 (<= 2.1.1) +Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends} , ${misc:Depends} @@ -93,6 +99,7 @@ Package: libgphoto2-l10n Section: localization Architecture: all +Multi-Arch: foreign Breaks: libgphoto2-2 (<= 2.4.10.1-4) Replaces: libgphoto2-2 (<= 2.4.10.1-4) Depends: ${misc:Depends} diff -Nru libgphoto2-2.4.11/debian/libgphoto2-2-dev.install libgphoto2-2.4.11/debian/libgphoto2-2-dev.install --- libgphoto2-2.4.11/debian/libgphoto2-2-dev.install 2011-04-13 02:32:26.000000000 -0700 +++ libgphoto2-2.4.11/debian/libgphoto2-2-dev.install 2011-12-24 17:09:37.000000000 -0800 @@ -1,11 +1,17 @@ usr/share/man/man3/libgphoto2.3 usr/share/man/man3/libgphoto2_port.3 -usr/lib/libgphoto2_port.{so,a} -usr/lib/libgphoto2_port/*/{serial,usb,disk,ptpip}.a -usr/lib/libgphoto2.{so,a} -usr/lib/pkgconfig/libgphoto2.pc -usr/lib/pkgconfig/libgphoto2_port.pc -usr/lib/libgphoto2/*/*.a +usr/lib/*/libgphoto2_port.so +usr/lib/*/libgphoto2_port.a +usr/lib/*/libgphoto2_port/*/serial.a +usr/lib/*/libgphoto2_port/*/usb.a +usr/lib/*/libgphoto2_port/*/disk.a +usr/lib/*/libgphoto2_port/*/ptpip.a +usr/lib/*/libgphoto2.so +usr/lib/*/libgphoto2.a +usr/lib/*/pkgconfig/libgphoto2.pc +usr/lib/*/pkgconfig/libgphoto2_port.pc +usr/lib/*/libgphoto2/*/*.a +usr/lib/*/libgphoto2/print-camera-list usr/include/gphoto2/*.h usr/bin/gphoto2-port-config usr/bin/gphoto2-config diff -Nru libgphoto2-2.4.11/debian/libgphoto2-2.install libgphoto2-2.4.11/debian/libgphoto2-2.install --- libgphoto2-2.4.11/debian/libgphoto2-2.install 2011-02-27 08:03:30.000000000 -0800 +++ libgphoto2-2.4.11/debian/libgphoto2-2.install 2011-12-24 17:09:05.000000000 -0800 @@ -4,6 +4,5 @@ usr/share/doc/libgphoto2/README usr/share/doc/libgphoto2-2 usr/share/doc/libgphoto2/camlibs/ usr/share/doc/libgphoto2-2 usr/share/libgphoto2/*/konica/* -usr/lib/libgphoto2/*/*.so -usr/lib/libgphoto2.so.* -usr/lib/libgphoto2/print-camera-list +usr/lib/*/libgphoto2/*/*.so +usr/lib/*/libgphoto2.so.* diff -Nru libgphoto2-2.4.11/debian/libgphoto2-port0.install libgphoto2-2.4.11/debian/libgphoto2-port0.install --- libgphoto2-2.4.11/debian/libgphoto2-port0.install 2011-04-18 09:04:58.000000000 -0700 +++ libgphoto2-2.4.11/debian/libgphoto2-port0.install 2011-12-24 16:31:21.000000000 -0800 @@ -2,5 +2,5 @@ usr/share/doc/libgphoto2_port/AUTHORS usr/share/doc/libgphoto2-port0 usr/share/doc/libgphoto2_port/README usr/share/doc/libgphoto2-port0 usr/share/doc/libgphoto2_port/NEWS usr/share/doc/libgphoto2-port0 -usr/lib/libgphoto2_port.so.* -usr/lib/libgphoto2_port/*/*.so +usr/lib/*/libgphoto2_port.so.* +usr/lib/*/libgphoto2_port/*/*.so 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 1969-12-31 16:00:00.000000000 -0800 +++ libgphoto2-2.4.11/debian/patches/71_format-security.patch 2011-12-24 17:25:02.000000000 -0800 @@ -0,0 +1,16 @@ +Description: avoid -Wformat-security warnings. +Author: Kees Cook <k...@debian.org> + +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 2011-04-18 08:33:31.000000000 -0700 +++ libgphoto2-2.4.11/debian/patches/series 2011-12-24 17:24:23.000000000 -0800 @@ -1,3 +1,4 @@ #10_disable_cache #11_hurd_no_path_max_bsdsource 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 2011-02-26 04:08:20.000000000 -0800 +++ libgphoto2-2.4.11/debian/rules 2011-12-24 17:15:52.000000000 -0800 @@ -9,22 +9,11 @@ ifeq ($(DEB_HOST_ARCH_OS),hurd) CONFIGURE_OPTIONS += --without-libusb endif - -### CFLAGS handling: -CFLAGS = -g -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif -ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - INSTALL_PROGRAM += -s -endif - +DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) ### Overrides: override_dh_auto_configure: - CFLAGS="$(CFLAGS)" dh_auto_configure -- --with-drivers=all --enable-static $(CONFIGURE_OPTIONS) + dh_auto_configure -- --with-drivers=all --enable-static $(CONFIGURE_OPTIONS) override_dh_auto_install: LIBRARY_PATH=$(CURDIR)/debian/tmp/usr/lib $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr @@ -49,7 +38,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/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 136 mode 0664 group plugdev > debian/libgphoto2-$(major).udev dh_installudev rm debian/libgphoto2-$(major).udev endif