From 94fe1dd7b4fed9cab2c7580d04dbe1252fefc7ff Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 17:09:37 +0200 Subject: Building individual subpackages for every set of tools. Signed-off-by: Daniel Baumann --- debian/control | 322 ++++++++++----------- ...n-infrastructure-apache-tools.lintian-overrides | 4 + debian/open-infrastructure-apache-tools.postinst | 30 ++ debian/open-infrastructure-apache-tools.prerm | 26 ++ ...-infrastructure-service-tools.lintian-overrides | 4 - debian/open-infrastructure-service-tools.postinst | 30 -- debian/open-infrastructure-service-tools.prerm | 26 -- debian/rules | 20 +- 8 files changed, 230 insertions(+), 232 deletions(-) create mode 100644 debian/open-infrastructure-apache-tools.lintian-overrides create mode 100755 debian/open-infrastructure-apache-tools.postinst create mode 100755 debian/open-infrastructure-apache-tools.prerm delete mode 100644 debian/open-infrastructure-service-tools.lintian-overrides delete mode 100755 debian/open-infrastructure-service-tools.postinst delete mode 100755 debian/open-infrastructure-service-tools.prerm diff --git a/debian/control b/debian/control index 4ac1243..03bd649 100644 --- a/debian/control +++ b/debian/control @@ -19,187 +19,175 @@ Vcs-Git: https://git.progress-linux.org/packages/graograman-backports/open-infra XSBC-Original-Vcs-Browser: https://git.progress-linux.org/users/daniel.baumann/debian/packages/open-infrastructure-service-tools XSBC-Original-Vcs-Git: https://git.progress-linux.org/users/daniel.baumann/debian/packages/open-infrastructure-service-tools -Package: open-infrastructure-service-tools +Package: open-infrastructure-apache-tools Section: admin Architecture: all Depends: apache2-data, ${misc:Depends}, -Description: additional tools to ease system administration and integration - This package contains some usefull tools, e.g.: - . - * alternative icons for Apache autoindex (Tango Icons and Font Awesome - based themes) +Provides: + apache-tools, +Enhances: + apache2, +Description: additional tools for Apache HTTP server + This package contains additional tools for the Apache HTTP server. -#Package: open-infrastructure-apache-tools -#Section: admin -#Architecture: all -#Depends: -# apache2-data, -# ${misc:Depends}, -#Provides: -# apache-tools, -#Enhances: -# apache, -#Description: additional tools for Apache HTTP server -# This package contains additional tools for the Apache HTTP server. - -#Package: open-infrastructure-apt-tools -#Section: admin -#Architecture: all -#Depends: -# apt, -# ${misc:Depends}, -#Provides: -# apt-tools, -#Enhances: -# apt, -#Description: additional tools for apt -# This package contains additional tools for apt. +Package: open-infrastructure-apt-tools +Section: admin +Architecture: all +Depends: + apt, + ${misc:Depends}, +Provides: + apt-tools, +Enhances: + apt, +Description: additional tools for apt + This package contains additional tools for apt. -#Package: open-infrastructure-dehydrated-tools -#Section: admin -#Architecture: all -#Depends: -# dehydrated, -# ssl-cert, -# ${misc:Depends}, -#Provides: -# dehydrated-tools, -#Enhances: -# dehydrated, -#Description: additional tools for dehydrated Letsencrypt client -# This package contains additional tools for the dehydrated Letsencrypt client. +Package: open-infrastructure-dehydrated-tools +Section: admin +Architecture: all +Depends: + dehydrated, + ssl-cert, + ${misc:Depends}, +Provides: + dehydrated-tools, +Enhances: + dehydrated, +Description: additional tools for dehydrated Letsencrypt client + This package contains additional tools for the dehydrated Letsencrypt client. -#Package: open-infrastructure-dnsdist-tools -#Section: admin -#Architecture: all -#Depends: -# dnsdist, -# ${misc:Depends}, -#Provides: -# dnsdist-tools, -#Enhances: -# dnsdist, -#Description: additional tools for dnsdist -# This package contains additional tools for the dnsdist. +Package: open-infrastructure-dnsdist-tools +Section: admin +Architecture: all +Depends: + dnsdist, + ${misc:Depends}, +Provides: + dnsdist-tools, +Enhances: + dnsdist, +Description: additional tools for dnsdist + This package contains additional tools for the dnsdist. -#Package: open-infrastructure-git-tools -#Section: admin -#Architecture: all -#Depends: -# git, -# ${misc:Depends}, -#Provides: -# git-tools, -#Enhances: -# git, -#Description: additional tools for Git version control system -# This package contains additional tools for the Git version control system. +Package: open-infrastructure-git-tools +Section: admin +Architecture: all +Depends: + git, + ${misc:Depends}, +Provides: + git-tools, +Enhances: + git, +Description: additional tools for Git version control system + This package contains additional tools for the Git version control system. -#Package: open-infrastructure-irker-tools -#Section: admin -#Architecture: all -#Depends: -# irker, -# ${misc:Depends}, -#Provides: -# irker-tools, -#Enhances: -# irker, -#Description: additional tools for irker IRC notification daemon -# This package contains additional tools for the irker IRC notification daemon: +Package: open-infrastructure-irker-tools +Section: admin +Architecture: all +Depends: + irker, + ${misc:Depends}, +Provides: + irker-tools, +Enhances: + irker, +Description: additional tools for irker IRC notification daemon + This package contains additional tools for the irker IRC notification daemon: -#Package: open-infrastructure-kea-tools -#Section: admin -#Architecture: all -#Depends: -# kea, -# ${misc:Depends}, -#Provides: -# kea-tools, -#Enhances: -# kea, -#Description: additional tools for kea DHCP server -# This package contains additional tools for the kea DHCP server. +Package: open-infrastructure-kea-tools +Section: admin +Architecture: all +Depends: + kea, + ${misc:Depends}, +Provides: + kea-tools, +Enhances: + kea, +Description: additional tools for kea DHCP server + This package contains additional tools for the kea DHCP server. -#Package: open-infrastructure-knot-tools -#Section: admin -#Architecture: all -#Depends: -# knot, -# ${misc:Depends}, -#Provides: -# knot-tools, -#Enhances: -# knot, -#Description: additional tools for knot DNS server -# This package contains additional tools for the knot DNS server. +Package: open-infrastructure-knot-tools +Section: admin +Architecture: all +Depends: + knot, + ${misc:Depends}, +Provides: + knot-tools, +Enhances: + knot, +Description: additional tools for knot DNS server + This package contains additional tools for the knot DNS server. -#Package: open-infrastructure-knot-resolver-tools -#Section: admin -#Architecture: all -#Depends: -# knot-resolver, -# socat, -# ${misc:Depends}, -#Provides: -# knot-resolver-tools, -#Enhances: -# knot-resolver, -#Description: additional tools for knot DNS resolver -# This package contains additional tools for the knot DNS resolver. +Package: open-infrastructure-knot-resolver-tools +Section: admin +Architecture: all +Depends: + knot-resolver, + socat, + ${misc:Depends}, +Provides: + knot-resolver-tools, +Enhances: + knot-resolver, +Description: additional tools for knot DNS resolver + This package contains additional tools for the knot DNS resolver. -#Package: open-infrastructure-linux-tools -#Section: admin -#Architecture: all -#Depends: -# ethtool, -# ${misc:Depends}, -#Provides: -# linux-tools, -#Enhances: -# ethtool, -#Description: additional tools for Linux kernel related things -# This package contains additional tools for the Linux kernel. +Package: open-infrastructure-linux-tools +Section: admin +Architecture: all +Depends: + ethtool, + ${misc:Depends}, +Provides: + linux-tools, +Enhances: + ethtool, +Description: additional tools for Linux kernel related things + This package contains additional tools for the Linux kernel. -#Package: open-infrastructure-supermicro-tools -#Section: admin -#Architecture: all -#Depends: -# ipcalc-ng, -# knot-dnsutils | bind9-dnsutils, -# supermicro-ipmicfg, -# ${misc:Depends}, -#Provides: -# supermicro-tools, -#Enhances: -# supermicro-ipmicfg, -#Description: additional tools for Supermicro servers -# This package contains additional tools for Supermicro servers. +Package: open-infrastructure-supermicro-tools +Section: admin +Architecture: all +Depends: + ipcalc-ng, + knot-dnsutils | bind9-dnsutils, + supermicro-ipmicfg, + ${misc:Depends}, +Provides: + supermicro-tools, +Enhances: + supermicro-ipmicfg, +Description: additional tools for Supermicro servers + This package contains additional tools for Supermicro servers. -#Package: open-infrastructure-vim-tools -#Section: admin -#Architecture: all -#Depends: -# vim, -# ${misc:Depends}, -#Provides: -# vim-tools, -#Enhances: -# vim, -#Description: additional tools for vim text editor -# This package contains additional tools for the vim text editor. +Package: open-infrastructure-vim-tools +Section: admin +Architecture: all +Depends: + vim, + ${misc:Depends}, +Provides: + vim-tools, +Enhances: + vim, +Description: additional tools for vim text editor + This package contains additional tools for the vim text editor. -#Package: open-infrastructure-znuny-tools -#Section: admin -#Architecture: all -#Depends: -# znuny | otrs2, -# ${misc:Depends}, -#Provides: -# znuny-tools, -#Enhances: -# znuny | otrs2, -#Description: additional tools for znuny ticketing system -# This package contains additional tools for the znuny ticketing system. +Package: open-infrastructure-znuny-tools +Section: admin +Architecture: all +Depends: + znuny, + ${misc:Depends}, +Provides: + znuny-tools, +Enhances: + znuny, +Description: additional tools for znuny ticketing system + This package contains additional tools for the znuny ticketing system. diff --git a/debian/open-infrastructure-apache-tools.lintian-overrides b/debian/open-infrastructure-apache-tools.lintian-overrides new file mode 100644 index 0000000..a73033e --- /dev/null +++ b/debian/open-infrastructure-apache-tools.lintian-overrides @@ -0,0 +1,4 @@ +# '000-' prefix is required to keep order of apache parsing working +open-infrastructure-apache-tools: non-standard-apache2-configuration-name +# apache-tools is for apache2 only +open-infrastructure-apache-tools: web-application-depends-on-apache2-data-package diff --git a/debian/open-infrastructure-apache-tools.postinst b/debian/open-infrastructure-apache-tools.postinst new file mode 100755 index 0000000..2cd7822 --- /dev/null +++ b/debian/open-infrastructure-apache-tools.postinst @@ -0,0 +1,30 @@ +#!/bin/sh + +set -e + +case "${1}" in + configure) + update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/apache2/icons 1000 + update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/awesome-png 2000 \ + --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/awesome-png.conf + update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/awesome-svg 3000 \ + --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/awesome-svg.conf + update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/tango-png 4000 \ + --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/tango-png.conf + update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/tango-svg 5000 \ + --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/tango-svg.conf + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/open-infrastructure-apache-tools.prerm b/debian/open-infrastructure-apache-tools.prerm new file mode 100755 index 0000000..b580074 --- /dev/null +++ b/debian/open-infrastructure-apache-tools.prerm @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +case "${1}" in + remove|upgrade|deconfigure) + update-alternatives --quiet --remove apache-icons /usr/share/apache2/icons + update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/awesome-png + update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/awesome-svg + update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/tango-png + update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/tango-svg + ;; + + failed-upgrade) + + ;; + + *) + echo "prerm called with unknown argument \`${1}'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 diff --git a/debian/open-infrastructure-service-tools.lintian-overrides b/debian/open-infrastructure-service-tools.lintian-overrides deleted file mode 100644 index 9970e45..0000000 --- a/debian/open-infrastructure-service-tools.lintian-overrides +++ /dev/null @@ -1,4 +0,0 @@ -# '000-' prefix is required to keep order of apache parsing working -open-infrastructure-service-tools: non-standard-apache2-configuration-name -# service-tools is for apache2 only -open-infrastructure-service-tools: web-application-depends-on-apache2-data-package diff --git a/debian/open-infrastructure-service-tools.postinst b/debian/open-infrastructure-service-tools.postinst deleted file mode 100755 index 2cd7822..0000000 --- a/debian/open-infrastructure-service-tools.postinst +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -set -e - -case "${1}" in - configure) - update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/apache2/icons 1000 - update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/awesome-png 2000 \ - --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/awesome-png.conf - update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/awesome-svg 3000 \ - --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/awesome-svg.conf - update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/tango-png 4000 \ - --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/tango-png.conf - update-alternatives --quiet --install /usr/share/open-infrastructure/apache-icons/default apache-icons /usr/share/open-infrastructure/apache-icons/tango-svg 5000 \ - --slave /usr/share/open-infrastructure/apache-icons/default.conf apache-icons.conf /usr/share/open-infrastructure/apache-icons/tango-svg.conf - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - - ;; - - *) - echo "postinst called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/open-infrastructure-service-tools.prerm b/debian/open-infrastructure-service-tools.prerm deleted file mode 100755 index b580074..0000000 --- a/debian/open-infrastructure-service-tools.prerm +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -set -e - -case "${1}" in - remove|upgrade|deconfigure) - update-alternatives --quiet --remove apache-icons /usr/share/apache2/icons - update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/awesome-png - update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/awesome-svg - update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/tango-png - update-alternatives --quiet --remove apache-icons /usr/share/open-infrastructure/apache-icons/tango-svg - ;; - - failed-upgrade) - - ;; - - *) - echo "prerm called with unknown argument \`${1}'" >&2 - exit 1 - ;; -esac - -#DEBHELPER# - -exit 0 diff --git a/debian/rules b/debian/rules index 62c4dda..b3924c0 100755 --- a/debian/rules +++ b/debian/rules @@ -1,13 +1,23 @@ #!/usr/bin/make -f +PACKAGES := $(shell dh_listpackages | cut -d '-' -f 3- | sed -e 's|-tools$$||') + %: dh ${@} --with apache2 override_dh_auto_install: + for PACKAGE in $(PACKAGES); \ + do \ + $(MAKE) -C $${PACKAGE} DESTDIR=$(CURDIR)/debian/open-infrastructure-$${PACKAGE}-tools install; \ + done + # apache-tools - $(MAKE) -C apache DESTDIR=$(CURDIR)/debian/open-infrastructure-service-tools install + rm -f debian/open-infrastructure-apache-tools/usr/share/doc/apache-tools/CHANGELOG.txt + rm -f debian/open-infrastructure-apache-tools/usr/share/doc/apache-tools/LICENSE.txt + -mv debian/open-infrastructure-apache-tools/usr/share/doc/* debian/open-infrastructure-apache-tools/usr/share/doc/open-infrastructure-apache-tools - # service-tools - rm -f debian/open-infrastructure-service-tools/usr/share/doc/service-tools/CHANGELOG.txt - rm -f debian/open-infrastructure-service-tools/usr/share/doc/service-tools/LICENSE.txt - -mv debian/open-infrastructure-service-tools/usr/share/doc/* debian/open-infrastructure-service-tools/usr/share/doc/open-infrastructure-service-tools +ifeq (open-infrastructure-linux-tools,$(findstring open-infrastructure-linux-tools,$(PACKAGES))) +override_dh_installsystemd: + dh_installsystemd -p open-infrastructure-linux-tools --no-restart-after-upgrade --no-start --no-stop-on-upgrade + dh_installsystemd --remaining-packages +endif -- cgit v1.2.3