From 044322b4dca1135671a93ebfe1601214f7f6e655 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Mon, 26 Aug 2013 13:39:57 +0200 Subject: Remove old API compatibility C++ support code --- debian/rules | 1 - 1 file changed, 1 deletion(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index c6c3e053..b2da3003 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,6 @@ #!/usr/bin/make -f # Should be include-links, but that somehow fails. export DEBVER=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') -# For compatibility, add -DCOMPAT_0_7 export CFLAGS=-Wno-write-strings export PATH := $(CURDIR)/utils:$(PATH) export pyversions := $(CURDIR)/utils/pyversions -- cgit v1.2.3 From a80bbc568413466f9f24f28e85825e1ddc27751d Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 23 Oct 2013 20:19:14 +0200 Subject: debian: Upgrade to debhelper 9 (and dpkg-buildflags) This gives us some more hardening, amongst other things. --- debian/compat | 2 +- debian/control | 2 +- debian/rules | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'debian/rules') diff --git a/debian/compat b/debian/compat index 7f8f011e..ec635144 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index 55837ac5..e79b58ce 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ XS-Python-Version: >= 2.6 X-Python3-Version: >= 3.1 Build-Depends: apt (>= 0.9.6), apt-utils, - debhelper (>= 7.3.5), + debhelper (>= 9), fakeroot, libapt-pkg-dev (>= 0.8.11), python-all-dev (>= 2.6.6-3~), diff --git a/debian/rules b/debian/rules index b2da3003..4a33c533 100755 --- a/debian/rules +++ b/debian/rules @@ -1,12 +1,12 @@ #!/usr/bin/make -f # Should be include-links, but that somehow fails. export DEBVER=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') -export CFLAGS=-Wno-write-strings +export DEB_CFLAGS_MAINT_APPEND=-Wno-write-strings export PATH := $(CURDIR)/utils:$(PATH) export pyversions := $(CURDIR)/utils/pyversions %: - dh --with python2,python3 $@ + dh $@ --with python2,python3 override_dh_auto_build: dh_auto_build -- cgit v1.2.3 From e8a92cc40e35c8ab95bd70caf6fa813564b235b1 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sun, 26 Jan 2014 00:37:34 +0100 Subject: debian/rules: Use dh_sphinxdoc integration This ensures that we do not include JavaScript from Sphinx in our binary package. Adjust debian/control to include the dependencies created by dh_sphinxdoc. --- debian/control | 2 +- debian/rules | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'debian/rules') diff --git a/debian/control b/debian/control index 5992884c..4bc26ff3 100644 --- a/debian/control +++ b/debian/control @@ -76,7 +76,7 @@ Package: python-apt-doc Priority: optional Architecture: all Section: doc -Depends: libjs-jquery, libjs-underscore, ${misc:Depends} +Depends: libjs-jquery, libjs-underscore, ${misc:Depends}, ${sphinxdoc:Depends} Enhances: python-apt Replaces: python-apt (<< 0.7.94) Description: Python interface to libapt-pkg (API documentation) diff --git a/debian/rules b/debian/rules index 4a33c533..37366324 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ export PATH := $(CURDIR)/utils:$(PATH) export pyversions := $(CURDIR)/utils/pyversions %: - dh $@ --with python2,python3 + dh $@ --with python2,python3,sphinxdoc override_dh_auto_build: dh_auto_build -- cgit v1.2.3 From 7daf0144f4809b8f27d56d49d3a61ca67d77ead1 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 22 Feb 2014 20:32:48 +0100 Subject: debian/rules: Do not run dh_sphinxdoc -a Running dh_sphinxdoc -a causes the build to FTBFS on buildds, because the sphinx documentation is not built. Only run dh_sphinxdoc if we are building the sphinx documentation. --- debian/rules | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 37366324..3ceeb205 100755 --- a/debian/rules +++ b/debian/rules @@ -15,6 +15,11 @@ override_dh_install: dh_movefiles dh_install +override_dh_sphinxdoc: + set -e; if [ -z $(filter -a,$(DH_INTERNAL_OPTIONS)) ]; then \ + dh_sphinxdoc; \ + fi + override_dh_installdocs: set -e; if [ -z $(filter -a,$(DH_INTERNAL_OPTIONS)) ]; then \ python setup.py build_sphinx; \ -- cgit v1.2.3 From 515204913c9168e8db77c96fdd7c29feba5bb6f4 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 30 Sep 2014 15:32:08 +0200 Subject: Embed changelog entry date and time instead of build date and time This makes reproducible builds possible. For non-package builds, simply use the start of the Unix time. Also make sure that all time values are in the UTC timezone. Closes: #762674 --- debian/rules | 8 +++++++- python/apt_pkgmodule.cc | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 3ceeb205..20a3fa25 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,13 @@ #!/usr/bin/make -f # Should be include-links, but that somehow fails. export DEBVER=$(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') -export DEB_CFLAGS_MAINT_APPEND=-Wno-write-strings +export DATETIME:=$(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p') +export DATE_CMD:=env TZ=UTC LC_ALL=C.UTF-8 date +export DATE:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%b %_d %Y") +export TIME:=$(shell $(DATE_CMD) --date="$(DATETIME)" "+%H:%M:%S") +export DEB_CFLAGS_MAINT_APPEND=-Wno-write-strings \ + -DDATE=\""$(DATE)"\" \ + -DTIME=\""$(TIME)"\" export PATH := $(CURDIR)/utils:$(PATH) export pyversions := $(CURDIR)/utils/pyversions diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index 5f211b3e..ca20ef18 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -880,8 +880,13 @@ extern "C" void initapt_pkg() // Version.. PyModule_AddStringConstant(Module,"VERSION",(char *)pkgVersion); PyModule_AddStringConstant(Module,"LIB_VERSION",(char *)pkgLibVersion); - PyModule_AddStringConstant(Module,"DATE",__DATE__); - PyModule_AddStringConstant(Module,"TIME",__TIME__); +#ifdef DATE + PyModule_AddStringConstant(Module,"DATE",DATE); + PyModule_AddStringConstant(Module,"TIME",TIME); +#else + PyModule_AddStringConstant(Module,"DATE", "Jan 1 1970"); + PyModule_AddStringConstant(Module,"TIME", "00:00:00"); +#endif // My constants PyModule_AddIntConstant(Module,"PRI_IMPORTANT",pkgCache::State::Important); -- cgit v1.2.3 From 91e4be065371c1fb6aa224eb180155e312cb1750 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 10 Jun 2015 14:18:19 +0200 Subject: Do not link documentation from Architecture: all to Architecture: any This was breaking binNMUs. --- debian/rules | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian/rules') diff --git a/debian/rules b/debian/rules index 20a3fa25..abf92519 100755 --- a/debian/rules +++ b/debian/rules @@ -32,9 +32,9 @@ override_dh_installdocs: dh_installdirs -ppython-apt-doc usr/share/doc/python-apt; \ fi dh_installdirs -ppython-apt-dev usr/share/doc/python-apt - dh_installdocs -Npython-apt-common -Npython3-apt -Npython3-apt-dbg --link-doc=python-apt + dh_installdocs -p python-apt -p python-apt-dbg --link-doc=python-apt dh_installdocs -p python3-apt -p python3-apt-dbg --link-doc=python3-apt - dh_installdocs -p python-apt-common + dh_installdocs --remaining-packages override_dh_strip: dh_strip -p python-apt --dbg-package=python-apt-dbg -- cgit v1.2.3