diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2018-02-16 19:56:56 +0000 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2018-02-16 19:56:56 +0000 |
commit | 30e4a9441e4c340afa351ce608448b9b6fd3fa92 (patch) | |
tree | ec53b98061094d0bb78f79bf23a09f6d1a66f496 /debian | |
parent | 232a8f356974e7671695b58fa291eabf186f8554 (diff) | |
download | dnsmasq-30e4a9441e4c340afa351ce608448b9b6fd3fa92.tar.gz |
Debian package: add dnsmasq-base-lua binary package.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 7 | ||||
-rw-r--r-- | debian/control | 13 | ||||
-rwxr-xr-x | debian/rules | 253 |
3 files changed, 163 insertions, 110 deletions
diff --git a/debian/changelog b/debian/changelog index ca4bcfa..40f6805 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,13 +4,14 @@ dnsmasq (2.79-1) unstable; urgency=low * Fix trust-anchor regex in init script. (closes: #884347) * Fix exit code for dhcp_release6 (closes: #833596) * Add project homepage to control file. (closes: #887764) + * New binary package dnsmasq-base-lua, includes Lua support. - -- Simon Kelley <simon@thekelleys.org.uk> Thu, 8 Feb 2018 21:27:22 +0000 + -- Simon Kelley <simon@thekelleys.org.uk> Fri, 16 Feb 2018 19:54:22 +0000 dnsmasq (2.78-3) unstable; urgency=high * Make failure of pidfile chown a warning. (closes: #889857) - + -- Simon Kelley <simon@thekelleys.org.uk> Thu, 8 Feb 2018 21:26:30 +0000 dnsmasq (2.78-2) unstable; urgency=high @@ -23,7 +24,7 @@ dnsmasq (2.78-1) unstable; urgency=high * New upstream. Security fixes for CVE-2017-13704 (closes: #877102) - Security fixes for CVE-2017-14491 - CVE-2017-14496 inclusive. + Security fixes for CVE-2017-14491 - CVE-2017-14496 inclusive. -- Simon Kelley <simon@thekelleys.org.uk> Sun, 29 Sep 2017 21:34:00 +0000 diff --git a/debian/control b/debian/control index e540918..448b59d 100644 --- a/debian/control +++ b/debian/control @@ -35,6 +35,19 @@ Description: Small caching DNS proxy and DHCP/TFTP server not the infrastructure required to run it as a system daemon. For that, install the dnsmasq package. +Package: dnsmasq-base-lua +Architecture: any +Depends: adduser, ${shlibs:Depends} +Breaks: dnsmasq (<< 2.63-1~) +Replaces: dnsmasq (<< 2.63-1~) +Recommends: dns-root-data +Provides: dnsmasq-base +Description: Small caching DNS proxy and DHCP/TFTP server + This package contains the dnsmasq executable and documentation, but + not the infrastructure required to run it as a system daemon. For + that, install the dnsmasq package. This package is an alternative + to dnsmasq-base which includes the LUA interpreter. + Package: dnsmasq-utils Architecture: linux-any Depends: ${shlibs:Depends} diff --git a/debian/rules b/debian/rules index 2df656f..91435a6 100755 --- a/debian/rules +++ b/debian/rules @@ -1,6 +1,6 @@ #!/usr/bin/make -f # debian/rules file - for dnsmasq. -# Copyright 2001-2011 by Simon Kelley +# Copyright 2001-2018 by Simon Kelley # Based on the sample in the debian hello package which carries the following: # Copyright 1994,1995 by Ian Jackson. # I hereby give you perpetual unlimited permission to copy, @@ -103,128 +103,167 @@ ifneq ($(DEB_HOST_ARCH_OS),linux) LDFLAGS += -lbsd endif +define build_tree + rm -rf $1 + install -m 755 \ + -d $1/DEBIAN \ + -d $1/etc/dbus-1/system.d \ + -d $1/usr/share/doc/$(package) \ + -d $1/usr/share/doc/$(package)/examples \ + -d $1/usr/share/$(package) \ + -d $1/var/lib/misc + +endef + +define add_docs +# Need to remove paypal links in Debian Package for policy reasons. + sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >$1/usr/share/doc/$(package)/doc.html + echo "</BODY>" >>$1/usr/share/doc/$(package)/doc.html + install -m 644 setup.html $1/usr/share/doc/$(package)/. + install -m 644 dnsmasq.conf.example $1/usr/share/doc/$(package)/examples/. + install -m 644 FAQ $1/usr/share/doc/$(package)/. + gzip -9n $1/usr/share/doc/$(package)/FAQ + install -m 644 CHANGELOG $1/usr/share/doc/$(package)/changelog + gzip -9n $1/usr/share/doc/$(package)/changelog + install -m 644 CHANGELOG.archive $1/usr/share/doc/$(package)/changelog.archive + gzip -9n $1/usr/share/doc/$(package)/changelog.archive + install -m 644 dbus/DBus-interface $1/usr/share/doc/$(package)/. + gzip -9n $1/usr/share/doc/$(package)/DBus-interface + gzip -9n $1/usr/share/man/man8/dnsmasq.8 + for f in $1/usr/share/man/*; do \ + if [ -f $$f/man8/dnsmasq.8 ]; then \ + gzip -9n $$f/man8/dnsmasq.8 ; \ + fi \ + done +endef + +define add_files + install -m 644 trust-anchors.conf $1/usr/share/$(package)/. + install -m 644 debian/dnsmasq-base.conffiles $1/DEBIAN/conffiles + install -m 755 debian/dnsmasq-base.postinst $1/DEBIAN/postinst + install -m 755 debian/dnsmasq-base.postrm $1/DEBIAN/postrm + install -m 644 debian/changelog $1/usr/share/doc/$(package)/changelog.Debian + gzip -9n $1/usr/share/doc/$(package)/changelog.Debian + install -m 644 debian/readme $1/usr/share/doc/$(package)/README.Debian + install -m 644 debian/copyright $1/usr/share/doc/$(package)/copyright + install -m 644 debian/dbus.conf $1/etc/dbus-1/system.d/dnsmasq.conf +endef + clean: $(checkdir) - rm -rf debian/daemon debian/base debian/utils debian/*~ debian/files debian/substvars debian/utils-substvars - make clean + make BUILDDIR=debian/build/no-lua clean + make BUILDDIR=debian/build/lua clean make -C contrib/lease-tools clean + rm -rf debian/build debian/trees debian/*~ debian/files debian/substvars debian/utils-substvars binary-indep: checkroot $(checkdir) - rm -rf debian/daemon + rm -rf debian/trees/daemon install -m 755 \ - -d debian/daemon/DEBIAN \ - -d debian/daemon/usr/share/doc \ - -d debian/daemon/etc/init.d \ - -d debian/daemon/etc/dnsmasq.d \ - -d debian/daemon/etc/resolvconf/update.d \ - -d debian/daemon/usr/lib/resolvconf/dpkg-event.d \ - -d debian/daemon/usr/share/dnsmasq \ - -d debian/daemon/etc/default \ - -d debian/daemon/lib/systemd/system \ - -d debian/daemon/etc/insserv.conf.d - install -m 644 debian/conffiles debian/daemon/DEBIAN - install -m 755 debian/postinst debian/postrm debian/prerm debian/daemon/DEBIAN - install -m 755 debian/init debian/daemon/etc/init.d/dnsmasq - install -m 755 debian/resolvconf debian/daemon/etc/resolvconf/update.d/dnsmasq - install -m 755 debian/resolvconf-package debian/daemon/usr/lib/resolvconf/dpkg-event.d/dnsmasq - install -m 644 debian/installed-marker debian/daemon/usr/share/dnsmasq - install -m 644 debian/default debian/daemon/etc/default/dnsmasq - install -m 644 dnsmasq.conf.example debian/daemon/etc/dnsmasq.conf - install -m 644 debian/readme.dnsmasq.d debian/daemon/etc/dnsmasq.d/README - install -m 644 debian/systemd.service debian/daemon/lib/systemd/system/dnsmasq.service - install -m 644 debian/insserv debian/daemon/etc/insserv.conf.d/dnsmasq - ln -s $(package) debian/daemon/usr/share/doc/dnsmasq - cd debian/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums - dpkg-gencontrol $(PACKAGE_VERSION) -T -pdnsmasq -Pdebian/daemon - find debian/daemon -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' - chown -R root.root debian/daemon - chmod -R g-ws debian/daemon - dpkg --build debian/daemon .. + -d debian/trees/daemon/DEBIAN \ + -d debian/trees/daemon/usr/share/doc \ + -d debian/trees/daemon/etc/init.d \ + -d debian/trees/daemon/etc/dnsmasq.d \ + -d debian/trees/daemon/etc/resolvconf/update.d \ + -d debian/trees/daemon/usr/lib/resolvconf/dpkg-event.d \ + -d debian/trees/daemon/usr/share/dnsmasq \ + -d debian/trees/daemon/etc/default \ + -d debian/trees/daemon/lib/systemd/system \ + -d debian/trees/daemon/etc/insserv.conf.d + install -m 644 debian/conffiles debian/trees/daemon/DEBIAN + install -m 755 debian/postinst debian/postrm debian/prerm debian/trees/daemon/DEBIAN + install -m 755 debian/init debian/trees/daemon/etc/init.d/dnsmasq + install -m 755 debian/resolvconf debian/trees/daemon/etc/resolvconf/update.d/dnsmasq + install -m 755 debian/resolvconf-package debian/trees/daemon/usr/lib/resolvconf/dpkg-event.d/dnsmasq + install -m 644 debian/installed-marker debian/trees/daemon/usr/share/dnsmasq + install -m 644 debian/default debian/trees/daemon/etc/default/dnsmasq + install -m 644 dnsmasq.conf.example debian/trees/daemon/etc/dnsmasq.conf + install -m 644 debian/readme.dnsmasq.d debian/trees/daemon/etc/dnsmasq.d/README + install -m 644 debian/systemd.service debian/trees/daemon/lib/systemd/system/dnsmasq.service + install -m 644 debian/insserv debian/trees/daemon/etc/insserv.conf.d/dnsmasq + ln -s $(package) debian/trees/daemon/usr/share/doc/dnsmasq + cd debian/trees/daemon && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums + dpkg-gencontrol $(PACKAGE_VERSION) -T -pdnsmasq -Pdebian/trees/daemon + find debian/trees/daemon -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + chown -R root.root debian/trees/daemon + chmod -R g-ws debian/trees/daemon + dpkg --build debian/trees/daemon .. binary-arch: checkroot - $(checkdir) - rm -rf debian/base - install -m 755 \ - -d debian/base/DEBIAN \ - -d debian/base/etc/dbus-1/system.d \ - -d debian/base/usr/share/doc/$(package) \ - -d debian/base/usr/share/doc/$(package)/examples \ - -d debian/base/usr/share/$(package) \ - -d debian/base/var/lib/misc - make $(TARGET) PREFIX=/usr DESTDIR=`pwd`/debian/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) + $(call build_tree,debian/trees/base) + make $(TARGET) BUILDDIR=debian/build/no-lua PREFIX=/usr DESTDIR=`pwd`/debian/trees/base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) -# Need to remove paypal links in Debian Package for policy reasons. - sed -e /\<H2\>Donations/Q -e /icon.png/d doc.html -e /favicon.ico/d >debian/base/usr/share/doc/$(package)/doc.html - echo "</BODY>" >>debian/base/usr/share/doc/$(package)/doc.html - install -m 644 setup.html debian/base/usr/share/doc/$(package)/. - install -m 644 dnsmasq.conf.example debian/base/usr/share/doc/$(package)/examples/. - install -m 644 trust-anchors.conf debian/base/usr/share/$(package)/. - install -m 644 FAQ debian/base/usr/share/doc/$(package)/. - gzip -9n debian/base/usr/share/doc/$(package)/FAQ - install -m 644 CHANGELOG debian/base/usr/share/doc/$(package)/changelog - gzip -9n debian/base/usr/share/doc/$(package)/changelog - install -m 644 CHANGELOG.archive debian/base/usr/share/doc/$(package)/changelog.archive - gzip -9n debian/base/usr/share/doc/$(package)/changelog.archive - install -m 644 dbus/DBus-interface debian/base/usr/share/doc/$(package)/. - gzip -9n debian/base/usr/share/doc/$(package)/DBus-interface -endif - install -m 644 debian/dnsmasq-base.conffiles debian/base/DEBIAN/conffiles - install -m 755 debian/dnsmasq-base.postinst debian/base/DEBIAN/postinst - install -m 755 debian/dnsmasq-base.postrm debian/base/DEBIAN/postrm - install -m 644 debian/changelog debian/base/usr/share/doc/$(package)/changelog.Debian - gzip -9n debian/base/usr/share/doc/$(package)/changelog.Debian - install -m 644 debian/readme debian/base/usr/share/doc/$(package)/README.Debian - install -m 644 debian/copyright debian/base/usr/share/doc/$(package)/copyright - install -m 644 debian/dbus.conf debian/base/etc/dbus-1/system.d/dnsmasq.conf - gzip -9n debian/base/usr/share/man/man8/dnsmasq.8 - for f in debian/base/usr/share/man/*; do \ - if [ -f $$f/man8/dnsmasq.8 ]; then \ - gzip -9n $$f/man8/dnsmasq.8 ; \ - fi \ - done + $(call add_docs,debian/trees/base) +else + rm -rf debian/trees/base/usr/share/man +endif + $(call add_files,debian/trees/base) ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/base/usr/sbin/dnsmasq + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/base/usr/sbin/dnsmasq +endif + cd debian/trees/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums + dpkg-shlibdeps --warnings=1 debian/trees/base/usr/sbin/dnsmasq + dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/trees/base + find debian/trees/base -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + chown -R root.root debian/trees/base + chmod -R g-ws debian/trees/base + dpkg --build debian/trees/base .. + + $(call build_tree,debian/trees/lua-base) + make $(TARGET) BUILDDIR=debian/build/lua PREFIX=/usr DESTDIR=`pwd`/debian/trees/lua-base CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="-DHAVE_LUASCRIPT $(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) +ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) + $(call add_docs,debian/trees/lua-base) +else + rm -rf debian/trees/lua-base/usr/share/man endif - cd debian/base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums - dpkg-shlibdeps --warnings=1 debian/base/usr/sbin/dnsmasq - dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base -Pdebian/base - find debian/base -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' - chown -R root.root debian/base - chmod -R g-ws debian/base - dpkg --build debian/base .. + $(call add_files,debian/trees/lua-base) +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/lua-base/usr/sbin/dnsmasq +endif + cd debian/trees/lua-base && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums + dpkg-shlibdeps --warnings=1 debian/trees/lua-base/usr/sbin/dnsmasq + dpkg-gencontrol $(PACKAGE_VERSION) -pdnsmasq-base-lua -Pdebian/trees/lua-base + find debian/trees/lua-base -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + chown -R root.root debian/trees/lua-base + chmod -R g-ws debian/trees/lua-base + dpkg --build debian/trees/lua-base .. + ifeq ($(DEB_HOST_ARCH_OS),linux) - rm -rf debian/utils - install -m 755 -d debian/utils/DEBIAN \ - -d debian/utils/usr/share/man/man1 \ - -d debian/utils/usr/bin \ - -d debian/utils/usr/share/doc/dnsmasq-utils - make -C contrib/lease-tools PREFIX=/usr DESTDIR=`pwd`/debian/utils CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) - install -m 755 contrib/lease-tools/dhcp_release debian/utils/usr/bin/dhcp_release - install -m 644 contrib/lease-tools/dhcp_release.1 debian/utils/usr/share/man/man1/dhcp_release.1 - gzip -9n debian/utils/usr/share/man/man1/dhcp_release.1 - install -m 755 contrib/lease-tools/dhcp_release6 debian/utils/usr/bin/dhcp_release6 - install -m 644 contrib/lease-tools/dhcp_release6.1 debian/utils/usr/share/man/man1/dhcp_release6.1 - gzip -9n debian/utils/usr/share/man/man1/dhcp_release6.1 - install -m 755 contrib/lease-tools/dhcp_lease_time debian/utils/usr/bin/dhcp_lease_time - install -m 644 contrib/lease-tools/dhcp_lease_time.1 debian/utils/usr/share/man/man1/dhcp_lease_time.1 - install -m 644 debian/copyright debian/utils/usr/share/doc/dnsmasq-utils/copyright - install -m 644 debian/changelog debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian - gzip -9n debian/utils/usr/share/doc/dnsmasq-utils/changelog.Debian - gzip -9n debian/utils/usr/share/man/man1/dhcp_lease_time.1 + rm -rf debian/trees/utils + install -m 755 -d debian/trees/utils/DEBIAN \ + -d debian/trees/utils/usr/bin \ + -d debian/trees/utils/usr/share/doc/dnsmasq-utils +ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) + install -m 755 -d debian/trees/utils/usr/share/man/man1 +endif + make -C contrib/lease-tools PREFIX=/usr DESTDIR=`pwd`/debian/trees/utils CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" COPTS="$(DEB_COPTS)" CC=$(CC) PKG_CONFIG=$(PKG_CONFIG) + install -m 755 contrib/lease-tools/dhcp_release debian/trees/utils/usr/bin/dhcp_release + install -m 755 contrib/lease-tools/dhcp_release6 debian/trees/utils/usr/bin/dhcp_release6 + install -m 755 contrib/lease-tools/dhcp_lease_time debian/trees/utils/usr/bin/dhcp_lease_time +ifeq (,$(findstring nodocs,$(DEB_BUILD_OPTIONS))) + install -m 644 contrib/lease-tools/dhcp_release.1 debian/trees/utils/usr/share/man/man1/dhcp_release.1 + gzip -9n debian/trees/utils/usr/share/man/man1/dhcp_release.1 + install -m 644 contrib/lease-tools/dhcp_release6.1 debian/trees/utils/usr/share/man/man1/dhcp_release6.1 + gzip -9n debian/trees/utils/usr/share/man/man1/dhcp_release6.1 + install -m 644 contrib/lease-tools/dhcp_lease_time.1 debian/trees/utils/usr/share/man/man1/dhcp_lease_time.1 + gzip -9n debian/trees/utils/usr/share/man/man1/dhcp_lease_time.1 +endif + install -m 644 debian/copyright debian/trees/utils/usr/share/doc/dnsmasq-utils/copyright + install -m 644 debian/changelog debian/trees/utils/usr/share/doc/dnsmasq-utils/changelog.Debian + gzip -9n debian/trees/utils/usr/share/doc/dnsmasq-utils/changelog.Debian ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) - $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release - $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_release6 - $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/utils/usr/bin/dhcp_lease_time + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/utils/usr/bin/dhcp_release + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/utils/usr/bin/dhcp_release6 + $(DEB_HOST_GNU_TYPE)-strip -R .note -R .comment debian/trees/utils/usr/bin/dhcp_lease_time endif - cd debian/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums - dpkg-shlibdeps -Tdebian/utils-substvars debian/utils/usr/bin/dhcp_release debian/utils/usr/bin/dhcp_lease_time - dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/utils - find debian/utils -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' - chown -R root.root debian/utils - chmod -R g-ws debian/utils - dpkg --build debian/utils .. + cd debian/trees/utils && find . -type f ! -regex '.*DEBIAN/.*' -printf '%P\0' | LC_ALL=C sort -z | xargs -r0 md5sum > DEBIAN/md5sums + dpkg-shlibdeps -Tdebian/utils-substvars debian/trees/utils/usr/bin/dhcp_release debian/trees/utils/usr/bin/dhcp_release6 debian/trees/utils/usr/bin/dhcp_lease_time + dpkg-gencontrol $(PACKAGE_VERSION) -Tdebian/utils-substvars -pdnsmasq-utils -Pdebian/trees/utils + find debian/trees/utils -depth -newermt '$(BUILD_DATE)' -print0 | xargs -0r touch --no-dereference --date='$(BUILD_DATE)' + chown -R root.root debian/trees/utils + chmod -R g-ws debian/trees/utils + dpkg --build debian/trees/utils .. endif define checkdir |