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

Bug#744037: attr: please build udebs for use by live-installer



Package: attr
Version: 1:2.4.47-1
Severity: normal
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch trusty

Hi,

The following patch adds udebs to attr which can be used in
live-installer to copy extended attributes.  We need this because some
packages have started to configure themselves in their postinsts to use
xattrs, which they do while we're building the squashfs, and then we
fail to copy the xattrs to the target system so we get bugs like
/bin/ping only being usable by root (see
https://lists.debian.org/debian-boot/2014/04/msg00061.html).

  * Add attr-udeb and libattr1-udeb binary packages, for use by
    live-installer to copy extended attributes.

diff -Nru attr-2.4.47/debian/control attr-2.4.47/debian/control
--- attr-2.4.47/debian/control	2012-06-13 09:36:50.000000000 +0100
+++ attr-2.4.47/debian/control	2014-04-09 14:51:46.000000000 +0100
@@ -50,3 +50,19 @@
 Description: Extended attribute shared library
  Contains the runtime environment required by programs that make use
  of extended attributes.
+
+Package: attr-udeb
+Package-Type: udeb
+Depends: ${shlibs:Depends}, ${misc:Depends}, libattr1-udeb (= ${binary:Version})
+Section: debian-installer
+Architecture: any
+Multi-Arch: foreign
+Description: Utilities for manipulating filesystem extended attributes
+
+Package: libattr1-udeb
+Package-Type: udeb
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Section: debian-installer
+Architecture: any
+Multi-Arch: same
+Description: Extended attribute shared library
diff -Nru attr-2.4.47/debian/rules attr-2.4.47/debian/rules
--- attr-2.4.47/debian/rules	2013-05-20 12:40:01.000000000 +0100
+++ attr-2.4.47/debian/rules	2014-04-09 14:58:38.000000000 +0100
@@ -13,13 +13,19 @@
 package = attr
 develop = lib$(package)1-dev
 library = lib$(package)1
+udeb    = $(package)-udeb
+libudeb = $(library)-udeb
 
 dirme  = debian/$(package)
 dirdev = debian/$(develop)
 dirlib = debian/$(library)
+diru   = debian/$(udeb)
+dirlu  = debian/$(libudeb)
 pkgme  = DIST_ROOT=`pwd`/$(dirme);  export DIST_ROOT;
 pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
 pkglib = DIST_ROOT=`pwd`/$(dirlib); export DIST_ROOT;
+pkgu   = DIST_ROOT=`pwd`/$(diru);   export DIST_ROOT;
+pkglu  = DIST_ROOT=`pwd`/$(dirlu);  export DIST_ROOT;
 stdenv = @GZIP=-q; export GZIP;
 
 options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
@@ -57,7 +63,7 @@
 	$(checkdir)
 	-rm -f built .census
 	$(MAKE) distclean
-	-rm -rf $(dirme) $(dirdev) $(dirlib) debian/tmp
+	-rm -rf $(dirme) $(dirdev) $(dirlib) $(diru) $(dirlu) debian/tmp
 	-rm -f debian/*substvars debian/files* debian/*.debhelper
 
 binary-indep:
@@ -69,6 +75,8 @@
 	$(pkgme)  $(MAKE) -C . install
 	$(pkgdev) $(MAKE) -C . install-dev
 	$(pkglib) $(MAKE) -C . install-lib
+	$(pkgu)   $(MAKE) -C . install
+	$(pkglu)  $(MAKE) -C . install-lib
 	$(pkgme)  $(MAKE) -C package src-manifest
 
 	rm -f $(dirdev)/usr/lib/$(DEB_HOST_MULTIARCH)/libattr.la
@@ -79,6 +87,8 @@
 	-rm -rf $(dirlib)/usr/share/locale
 	-rm -rf $(dirlib)/usr/share/man
 	-rm -rf $(dirlib)/usr/bin
+	-rm -rf $(diru)/usr/share
+	-rm -rf $(dirlu)/usr
 
 	dh_installdocs
 	dh_installchangelogs
@@ -86,7 +96,7 @@
 	dh_compress
 	dh_fixperms
 	dh_makeshlibs -N $(library)
-	dh_makeshlibs -p $(library) -V 'libattr1 (>= 1:2.4.46-8)'
+	dh_makeshlibs -p $(library) -V 'libattr1 (>= 1:2.4.46-8)' --add-udeb libattr1-udeb
 	dh_installdeb
 	dh_shlibdeps
 	dh_gencontrol
@@ -94,7 +104,7 @@
 	dh_md5sums
 	dh_builddeb -p$(package) -- -Zbzip2 -z9
 	dh_builddeb -p$(develop) -- -Zbzip2 -z9
-	dh_builddeb -p$(library)
+	dh_builddeb -p$(library) -p$(udeb) -p$(libudeb)
 
 binary: binary-indep binary-arch
 

Thanks,

-- 
Colin Watson                                       [cjwatson@ubuntu.com]


Reply to: