diff --git a/debian/koha-common.maintscript b/debian/koha-common.maintscript index 13514fda1f..d27d8abd31 100644 --- a/debian/koha-common.maintscript +++ b/debian/koha-common.maintscript @@ -1 +1,2 @@ rm_conffile /etc/init.d/koha-common 26.06~ +rm_conffile /etc/koha/koha-worker@.service 26.06~ diff --git a/debian/koha-core.cron.d b/debian/koha-core.koha-common.cron.d similarity index 100% rename from debian/koha-core.cron.d rename to debian/koha-core.koha-common.cron.d diff --git a/debian/koha-core.cron.daily b/debian/koha-core.koha-common.cron.daily similarity index 100% rename from debian/koha-core.cron.daily rename to debian/koha-core.koha-common.cron.daily diff --git a/debian/koha-core.cron.hourly b/debian/koha-core.koha-common.cron.hourly similarity index 100% rename from debian/koha-core.cron.hourly rename to debian/koha-core.koha-common.cron.hourly diff --git a/debian/koha-core.cron.monthly b/debian/koha-core.koha-common.cron.monthly similarity index 100% rename from debian/koha-core.cron.monthly rename to debian/koha-core.koha-common.cron.monthly diff --git a/debian/koha-core.default b/debian/koha-core.koha-common.default similarity index 95% rename from debian/koha-core.default rename to debian/koha-core.koha-common.default index 6c108e4fe1..bbe7524ab7 100644 --- a/debian/koha-core.default +++ b/debian/koha-core.koha-common.default @@ -1,4 +1,4 @@ -## General koha-core default options file +## General koha-common default options file PERL5LIB="/usr/share/koha/lib" KOHA_HOME="/usr/share/koha" @@ -57,4 +57,4 @@ ES_VERBOSE="no" # Equivalent to '--where' #ES_WHERE_QUERY_SQL="" -## End of general koha-core default options +## End of general koha-common default options diff --git a/debian/koha-core.logrotate b/debian/koha-core.koha-common.logrotate similarity index 100% rename from debian/koha-core.logrotate rename to debian/koha-core.koha-common.logrotate diff --git a/debian/koha-core.links b/debian/koha-core.links index 31ecd3f14c..f330f5b745 100644 --- a/debian/koha-core.links +++ b/debian/koha-core.links @@ -4,5 +4,3 @@ usr/sbin/koha-zebra usr/sbin/koha-restart-zebra usr/sbin/koha-sip usr/sbin/koha-enable-sip usr/sbin/koha-sip usr/sbin/koha-start-sip usr/sbin/koha-sip usr/sbin/koha-stop-sip -usr/sbin/koha-sip usr/sbin/koha-stop-sip -etc/default/koha-core etc/default/koha-common diff --git a/debian/koha-core.maintscript b/debian/koha-core.maintscript new file mode 100644 index 0000000000..d2b9df418d --- /dev/null +++ b/debian/koha-core.maintscript @@ -0,0 +1,5 @@ +# The experimental pre-split koha-core shipped its own init script and +# defaults file. The defaults now live under the koha-common name shared with +# every other install; the init script is provided by koha-sysv/koha-systemd. +mv_conffile /etc/default/koha-core /etc/default/koha-common 26.06~ +rm_conffile /etc/init.d/koha-core 26.06~ diff --git a/debian/koha-core.postinst b/debian/koha-core.postinst index 3b312507c4..2862c705df 100644 --- a/debian/koha-core.postinst +++ b/debian/koha-core.postinst @@ -13,6 +13,12 @@ if [ -r $CONFIG ]; then . $CONFIG fi +# The pre-split koha-core shipped /etc/init.d/koha-core; the file itself is +# removed by koha-core.maintscript, drop its rc.d links as well. +if [ "$1" = "configure" ] && dpkg --compare-versions "$2" lt-nl 26.06~; then + update-rc.d koha-core remove >/dev/null 2>&1 || true +fi + conf=/etc/mysql/koha-common.cnf if [ ! -e "$conf" ] && [ ! -L "$conf" ]; then ln -s debian.cnf "$conf" diff --git a/debian/koha-core.preinst b/debian/koha-core.preinst index 648a2e1632..0e73b369ba 100644 --- a/debian/koha-core.preinst +++ b/debian/koha-core.preinst @@ -8,4 +8,6 @@ set -e # Bug 25485: remove the tiny_mce symlink if there's one in the way preventing upgrades [ -h /usr/share/koha/intranet/htdocs/intranet-tmpl/lib/tiny_mce ] && rm /usr/share/koha/intranet/htdocs/intranet-tmpl/lib/tiny_mce +#DEBHELPER# + exit 0 diff --git a/debian/rules b/debian/rules index 852a5a2b9b..05c9eb23db 100755 --- a/debian/rules +++ b/debian/rules @@ -8,13 +8,24 @@ export PERL_MM_USE_DEFAULT=1 %: dh $@ --fail-missing --with bash-completion -# koha-sysv ships the SysV init script under its historical name so that -# dpkg hands /etc/init.d/koha-common over from the old monolithic koha-common -# package and debhelper generates the matching update-rc.d/invoke-rc.d code. +# Files under /etc keep their historical koha-common names: koha-core takes +# them over from the old monolithic koha-common package (Replaces), so dpkg +# transfers the admin's edited conffiles instead of leaving obsolete copies +# behind next to freshly named ones. koha-sysv ships the SysV init script +# under the same name so debhelper generates the update-rc.d/invoke-rc.d +# handling for /etc/init.d/koha-common. override_dh_installinit: - dh_installinit -pkoha-sysv --name=koha-common + dh_installinit -pkoha-core -pkoha-sysv --name=koha-common dh_installinit --remaining-packages +override_dh_installcron: + dh_installcron -pkoha-core --name=koha-common + dh_installcron --remaining-packages + +override_dh_installlogrotate: + dh_installlogrotate -pkoha-core --name=koha-common + dh_installlogrotate --remaining-packages + override_dh_gencontrol: debian/bd-to-depends >> debian/koha-common.substvars debian/bd-to-depends >> debian/koha-core.substvars diff --git a/debian/scripts/koha-generate-env b/debian/scripts/koha-generate-env index 6b908afb49..fe05cfdadc 100755 --- a/debian/scripts/koha-generate-env +++ b/debian/scripts/koha-generate-env @@ -75,13 +75,10 @@ EOF ;; indexer) - # Read from /etc/default/koha-core (fall back to the legacy - # /etc/default/koha-common name on systems upgrading from the - # pre-split packaging). + # /etc/default/koha-common is the defaults file shared by every + # koha-* helper (shipped by koha-core under its historical name). INDEXER_TIMEOUT=5 - if [ -f /etc/default/koha-core ]; then - . /etc/default/koha-core - elif [ -f /etc/default/koha-common ]; then + if [ -f /etc/default/koha-common ]; then . /etc/default/koha-common fi