Source: file Version: 1:5.14-2 Severity: wishlist Tags: patch
As the subject says: the attached patch adds the ability to bootstrap the file package at an early stage of a system bootstrap where Python is not yet available. Also, since this is a bootstrap, it makes sure to run the version of file that was just built, so that you'll get the proper shlibdeps even if there's no version of file installed on the system yet. -- Daniel Schepler
diff -urN file-5.14.old/debian/rules file-5.14/debian/rules --- file-5.14.old/debian/rules 2013-03-13 09:39:57.000000000 -0700 +++ file-5.14/debian/rules 2013-05-23 11:34:20.737160230 -0700 @@ -21,7 +21,11 @@ PYTHON3_VERSIONS=$(shell py3versions -r debian/control) %: +ifeq ($(DEB_BUILD_PROFILE),stage1) + dh ${@} --with autotools_dev -Npython-magic -Npython3-magic +else dh ${@} --with autotools_dev,python2,python3 +endif override_dh_auto_clean: dh_auto_clean @@ -82,7 +86,23 @@ dh_install --fail-missing override_dh_shlibdeps: +ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + # use just built file in dh_shlibdeps + PATH=$(CURDIR)/debian/file/usr/bin:$$PATH \ + LD_LIBRARY_PATH=$(CURDIR)/debian/libmagic1/usr/lib/$(DEB_HOST_MULTIARCH)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}} \ + MAGIC=$(CURDIR)/debian/libmagic1/usr/share/file/magic.mgc \ + dh_shlibdeps -Llibmagic1 -ldebian/libmagic1/usr/lib +else dh_shlibdeps -Llibmagic1 -ldebian/libmagic1/usr/lib +endif override_dh_strip: +ifeq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + # use just built file in dh_strip + PATH=$(CURDIR)/debian/file/usr/bin:$$PATH \ + LD_LIBRARY_PATH=$(CURDIR)/debian/libmagic1/usr/lib/$(DEB_HOST_MULTIARCH)$${LD_LIBRARY_PATH+:$${LD_LIBRARY_PATH}} \ + MAGIC=$(CURDIR)/debian/libmagic1/usr/share/file/magic.mgc \ + dh_strip --dbg-package=file-dbg +else dh_strip --dbg-package=file-dbg +endif