Source: tor Severity: wishlist Tags: patch
Dear maintainer, In effort to simplify creation and maintenance of derivate packages with custom set of optional features disabled, here are patches that enabling/disabling of optional feature is matter of changing exactly one line in debian/rules. Applied together, these patches do not alter default configuration (e.g what is generated by dpkg-buildpackage) is any way, they just make futher modifications simplier. From 40ebe9118b90f7524c0b693a457baa430e84ffb4 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov <kact...@debian.org> Date: Sat, 14 Sep 2019 01:06:42 +0000 Subject: [PATCH 1/3] Simplify package patching to disable systemd integration --- debian/config/systemd.mk | 5 +++++ debian/rules | 7 ++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/config/systemd.mk b/debian/config/systemd.mk new file mode 100644 index 0000000..1248ce0 --- /dev/null +++ b/debian/config/systemd.mk @@ -0,0 +1,5 @@ +ifeq ($(DEB_HOST_ARCH_OS),linux) + dhoptions += --with systemd + confflags += --enable-systemd +endif + diff --git a/debian/rules b/debian/rules index def6107..898bf83 100755 --- a/debian/rules +++ b/debian/rules @@ -1,5 +1,6 @@ #!/usr/bin/make -f # -*- makefile -*- +include debian/config/systemd.mk DH_VERBOSE ?= 1 @@ -14,11 +15,6 @@ ifneq (,$(findstring enable-openbsd-malloc,$(DEB_BUILD_OPTIONS))) confflags += --enable-openbsd-malloc endif -ifeq ($(DEB_HOST_ARCH_OS),linux) - dhoptions += --with systemd - confflags += --enable-systemd -endif - %: dh \ $@ \ @@ -32,6 +28,7 @@ endif override_dh_auto_configure: ! [ -e debian/micro-revision.i ] || cp debian/micro-revision.i ./micro-revision.i dh_auto_configure -- \ + --disable-systemd \ $(confflags) \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ From f099d7efbf18e62e5842d10a56bde7577a7a78a3 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov <kact...@debian.org> Date: Sat, 14 Sep 2019 01:28:03 +0000 Subject: [PATCH 2/3] Simplify package patching to disable runit integration --- debian/config/runit.mk | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/config/runit.mk b/debian/config/runit.mk new file mode 100644 index 0000000..7eea147 --- /dev/null +++ b/debian/config/runit.mk @@ -0,0 +1 @@ +dhoptions += --with runit diff --git a/debian/rules b/debian/rules index 898bf83..12c65a2 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,7 @@ #!/usr/bin/make -f # -*- makefile -*- include debian/config/systemd.mk +include debian/config/runit.mk DH_VERBOSE ?= 1 @@ -20,7 +21,6 @@ endif $@ \ --with quilt \ --with autoreconf \ - --with runit \ $(dhoptions) \ --builddirectory=build \ --parallel From 5d5cac651f89756a44b889a2c65085519eac74c7 Mon Sep 17 00:00:00 2001 From: Dmitry Bogatov <kact...@debian.org> Date: Mon, 16 Sep 2019 18:23:05 +0000 Subject: [PATCH 3/3] Simplify package patching to disable libseccomp integration --- debian/config/seccomp.mk | 5 +++++ debian/rules | 3 +++ 2 files changed, 8 insertions(+) diff --git a/debian/config/seccomp.mk b/debian/config/seccomp.mk new file mode 100644 index 0000000..07ee2d4 --- /dev/null +++ b/debian/config/seccomp.mk @@ -0,0 +1,5 @@ +# This feature is required for "Sandbox" option. + +ifneq (,$(findstring $(DEB_BUILD_ARCH),amd64 i386)) + confflags += --enable-seccomp +endif diff --git a/debian/rules b/debian/rules index 12c65a2..28ca273 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,9 @@ #!/usr/bin/make -f # -*- makefile -*- +include /usr/share/dpkg/default.mk include debian/config/systemd.mk include debian/config/runit.mk +include debian/config/seccomp.mk DH_VERBOSE ?= 1 @@ -29,6 +31,7 @@ override_dh_auto_configure: ! [ -e debian/micro-revision.i ] || cp debian/micro-revision.i ./micro-revision.i dh_auto_configure -- \ --disable-systemd \ + --disable-seccomp \ $(confflags) \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ -- Note, that I send and fetch email in batch, once in a few days. Please, mention in body of your reply when you add or remove recepients.