From: Michael Prokop Date: Thu, 13 Dec 2018 11:34:33 +0000 (+0100) Subject: Rework debian/, following current best practices X-Git-Tag: v0.33.0~2 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=421ba622ec1bf4068fc78b85f8a38cece6355f61 Rework debian/, following current best practices * Switch to minimal debhelper approach, Build-Depend on debhelper >= 10 * Switch from Priority 'extra' to 'optional' (deprecated as of Debian Policy v4.0.1) * Drop unused GPL-2 section from debian/copyright * Update copyright year information in debian/copyright * Refresh lintian overrides * Add postinst/postrm maintainer scripts for dpkg-maintscript-helper support --- diff --git a/debian/control b/debian/control index d240a5d..859d519 100644 --- a/debian/control +++ b/debian/control @@ -1,8 +1,8 @@ Source: grml-live Section: grml -Priority: extra +Priority: optional Maintainer: Michael Prokop -Build-Depends: debhelper (>= 9) +Build-Depends: debhelper (>= 10) Build-Depends-Indep: asciidoc, docbook-xsl, xsltproc diff --git a/debian/copyright b/debian/copyright index 98b6759..a04f208 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,7 +4,7 @@ Upstream-Contact: Michael Prokop Source: https://github.com/grml/grml-live/ Files: * -Copyright: 2007-2017 Michael Prokop +Copyright: 2007-2018 Michael Prokop License: GPL-2+ Files: fonts/graphicoreBitmapFont0-Light.otf @@ -27,10 +27,6 @@ Copyright: 2012 Red Hat, Inc Comment: /usr/lib/shim/shimx64.efi.signed from http://de.archive.ubuntu.com/ubuntu/pool/main/s/shim-signed/shim-signed_1.32~17.04.1+0.9+1474479173.6c180c6-1ubuntu1_amd64.deb License: BSD-2-Clause -License: GPL-2 - On Debian systems the full text of the GNU General Public License can be - found in the `/usr/share/common-licenses/GPL-2' file. - License: GPL-2+ On Debian systems the full text of the GNU General Public License can be found in the `/usr/share/common-licenses/GPL-2' file. diff --git a/debian/grml-live-db.install b/debian/grml-live-db.install index ff4810d..7631f55 100644 --- a/debian/grml-live-db.install +++ b/debian/grml-live-db.install @@ -1,3 +1,2 @@ db/db-to-fai usr/share/grml-live-db/scripts/ db/dpkg-to-db usr/share/grml-live-db/scripts/ -docs/grml-live-db.8 usr/share/man/man8/ diff --git a/debian/grml-live-db.lintian-overrides b/debian/grml-live-db.lintian-overrides new file mode 100644 index 0000000..0c19f9e --- /dev/null +++ b/debian/grml-live-db.lintian-overrides @@ -0,0 +1,2 @@ +grml-live-db: unknown-section grml +grml-live-db: bugs-field-does-not-refer-to-debian-infrastructure mailto:bugs@grml.org diff --git a/debian/grml-live-db.manpages b/debian/grml-live-db.manpages new file mode 100644 index 0000000..1be5958 --- /dev/null +++ b/debian/grml-live-db.manpages @@ -0,0 +1 @@ +docs/grml-live-db.8 diff --git a/debian/overrides.grml-live b/debian/grml-live.lintian-overrides similarity index 55% rename from debian/overrides.grml-live rename to debian/grml-live.lintian-overrides index afd8701..b163159 100644 --- a/debian/overrides.grml-live +++ b/debian/grml-live.lintian-overrides @@ -1,7 +1,11 @@ +grml-live: bugs-field-does-not-refer-to-debian-infrastructure mailto:bugs@grml.org grml-live: executable-not-elf-or-script usr/share/grml-live/templates/windows/autostart/autorun.inf grml-live: extra-license-file usr/share/grml-live/templates/GRML/LICENSE.txt grml-live: font-in-non-font-package usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf -grml-live: privacy-breach-generic usr/share/grml-live/templates/GRML/index.html (http://grml.org/) +grml-live: font-outside-font-dir usr/share/grml-live/fonts/graphicoreBitmapFont0-Light.otf +grml-live: privacy-breach-generic usr/share/grml-live/templates/GRML/index.html [] (http://grml.org/) grml-live: script-not-executable usr/share/grml-live/scripts/bootgrub.mksh grml-live: script-not-executable usr/share/grml-live/scripts/bootilnx.mksh grml-live: unknown-section grml +grml-live: uses-dpkg-database-directly etc/grml/fai/config/scripts/GRMLBASE/98-clean-chroot +grml-live: uses-dpkg-database-directly usr/sbin/grml-live diff --git a/debian/grml-live.manpages b/debian/grml-live.manpages new file mode 100644 index 0000000..f98382d --- /dev/null +++ b/debian/grml-live.manpages @@ -0,0 +1,2 @@ +docs/grml-live.8 +docs/grml-live-remaster.8 diff --git a/debian/overrides.grml-live-db b/debian/overrides.grml-live-db deleted file mode 100644 index 5946edd..0000000 --- a/debian/overrides.grml-live-db +++ /dev/null @@ -1 +0,0 @@ -grml-live-db: unknown-section grml diff --git a/debian/postinst b/debian/postinst new file mode 100644 index 0000000..38bb1a8 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +#DEBHELPER# + +exit 0 diff --git a/debian/postrm b/debian/postrm new file mode 100644 index 0000000..38bb1a8 --- /dev/null +++ b/debian/postrm @@ -0,0 +1,7 @@ +#!/bin/bash + +set -e + +#DEBHELPER# + +exit 0 diff --git a/debian/rules b/debian/rules index 329a430..8787428 100755 --- a/debian/rules +++ b/debian/rules @@ -1,96 +1,28 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -b=$(CURDIR)/debian/build -VERSION:=$(shell dpkg-parsechangelog | awk '/Version: / { print $$2 }') +include /usr/share/dpkg/pkg-info.mk -build: build-arch build-indep +%: + dh $@ -build-arch: build-stamp +override_dh_binary: + dh_binary -build-indep: build-stamp - -build-stamp: - dh_testdir +override_dh_install: egrep -q "GRML_LIVE_VERSION=.*UNRELEASED" grml-live || \ (echo "Wrong version in grml-live" && exit 2) + # build docs cd docs && $(MAKE) && cd ../ - touch $@ - -clean: - dh_testdir - dh_testroot - rm -f build-stamp - - # Add here commands to clean up after the build process. - cd docs && $(MAKE) clean && cd ../ - - dh_clean - # clean up the stuff dh_clean leaves behind - -rm -rf debian/build - -install: build - dh_testdir - dh_testroot - dh_prep - dh_installdirs + # adjust version number inside grml-live executable + sed -i -e "s/GRML_LIVE_VERSION='\*\*\*UNRELEASED\*\*\*'/GRML_LIVE_VERSION='$(DEB_VERSION)'/" grml-live + find . -name grml-live.8 + dh_install -grml-live: install - @echo "--- Building: $@" - dh_installdirs -p$@ -P$(b)/$@ - dh_link -p$@ -P$(b)/$@ - dh_installdocs -p$@ -P$(b)/$@ - dh_installchangelogs -p$@ -P$(b)/$@ - dh_install -p$@ -P$(b)/$@ - sed -i -e "s/GRML_LIVE_VERSION='\*\*\*UNRELEASED\*\*\*'/GRML_LIVE_VERSION='$(VERSION)'/" $(b)/$@/usr/sbin/grml-live - dh_strip -p$@ -P$(b)/$@ - dh_compress -p$@ -P$(b)/$@ - mkdir -p $(b)/$(@)/usr/share/lintian/overrides/ - cp -av debian/overrides.$(@) $(b)/$(@)/usr/share/lintian/overrides/$(@) - dh_fixperms -p$@ -P$(b)/$@ +override_dh_fixperms: + dh_fixperms # make sure they are executable: - chmod 755 $(b)/$(@)/etc/grml/fai/config/hooks/* - dh_makeshlibs -p$@ -P$(b)/$@ -V - dh_installdeb -p$@ -P$(b)/$@ - dh_shlibdeps -p$@ -P$(b)/$@ - dh_installdebconf -p$@ -P$(b)/$@ - dh_gencontrol -p$@ -P$(b)/$@ - dh_md5sums -p$@ -P$(b)/$@ - dh_builddeb -p$@ -P$(b)/$@ - -grml-live-db: install - @echo "--- Building: $@" - dh_installdirs -p$@ -P$(b)/$@ - dh_link -p$@ -P$(b)/$@ - dh_installdocs -p$@ -P$(b)/$@ - dh_installchangelogs -p$@ -P$(b)/$@ - dh_install -p$@ -P$(b)/$@ - dh_strip -p$@ -P$(b)/$@ - dh_compress -p$@ -P$(b)/$@ - mkdir -p $(b)/$(@)/usr/share/lintian/overrides/ - cp -av debian/overrides.$(@) $(b)/$(@)/usr/share/lintian/overrides/$(@) - dh_fixperms -p$@ -P$(b)/$@ - dh_makeshlibs -p$@ -P$(b)/$@ -V - dh_installdeb -p$@ -P$(b)/$@ - dh_shlibdeps -p$@ -P$(b)/$@ - dh_installdebconf -p$@ -P$(b)/$@ - dh_gencontrol -p$@ -P$(b)/$@ - dh_md5sums -p$@ -P$(b)/$@ - dh_builddeb -p$@ -P$(b)/$@ - -# Build architecture-dependent files here. -binary-all: build install - -# Build architecture-independent files here. -binary-indep: build install grml-live grml-live-db - -binary: binary-indep binary-arch -.PHONY: build clean binary-indep binary-arch binary install + chmod 755 debian/grml-live/etc/grml/fai/config/hooks/* diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 0000000..fc11cd9 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,3 @@ +grml-live source: source-contains-prebuilt-windows-binary templates/EFI/BOOT/grubx64.efi.signed +grml-live source: source-contains-prebuilt-windows-binary templates/EFI/BOOT/shimx64.efi.signed +grml-live source: vcs-field-uses-insecure-uri vcs-git git://git.grml.org/grml-live.git