Koha-clms/debian
Martin Renvoize 0bdb94bfbb
Bug 40901: (QA follow-up) Harden the service abstraction in koha-functions.sh
- koha_init_backend relied on "systemctl list-unit-files" exiting
  non-zero when nothing matches. That behaviour is version dependent,
  and on a systemd host running koha-sysv a false positive would send
  every koha-* helper to units that do not exist. Test for the
  koha-plack@.service unit file instead: unambiguous, and no systemctl
  fork per call. The _KOHA_INIT_BACKEND cache is dropped; every caller
  ran the function in a $(...) subshell so it never took effect anyway.
- The _sysv_worker and _sysv_z3950 code moved here from bash-only
  scripts brought "((error_count++))" and "[[ ! $VAR ]]" into a
  #!/bin/sh library that koha-disable, koha-enable, koha-remove,
  koha-list and the init script source under dash. Use POSIX
  equivalents.
- _sysv_restart_zebra and _sysv_restart_sip lost the explicit
  "return 0" of the original quiet not-running branch, so a start
  failure now aborted the caller's whole instance loop under set -e
  (including the init script's restart across all instances). Restore
  it.
- systemctl status is run with --no-pager from koha_service_ctl and
  koha-systemd-ctl so the helpers never block on a pager.
- koha-plack --enable/--disable ran systemctl before editing the Apache
  configuration, so a systemctl failure under set -e left the vhost
  untouched. Do the systemd half after the Apache edits and warn
  instead of aborting.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-29 09:02:35 +00:00
..
docs Bug 32736: Add --all-queues switch to koha-worker 2026-01-12 10:26:06 -07:00
scripts Bug 40901: (QA follow-up) Harden the service abstraction in koha-functions.sh 2026-09-29 09:02:35 +00:00
source
…
systemd Bug 40901: (QA follow-up) Harden the service abstraction in koha-functions.sh 2026-09-29 09:02:35 +00:00
templates Bug 40901: (QA follow-up) Remove redundant unit files ( koha-sysv.service, koha-worker@.service ) 2026-09-29 09:02:13 +00:00
README.build
…
bd-to-depends
…
build-git-snapshot Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
changelog
…
clean
…
compat
…
control Bug 40901: (QA follow-up) Install units to /lib/systemd/system and tidy control 2026-09-29 09:02:28 +00:00
control.in Bug 40901: (QA follow-up) Install units to /lib/systemd/system and tidy control 2026-09-29 09:02:28 +00:00
copyright Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-common.README.Debian
…
koha-common.docs Bug 35713: Remove outdated debian/docs/LEEME.Debian file 2024-01-11 12:10:45 +01:00
koha-common.maintscript Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-common.postinst Bug 40901: (QA follow-up) Restore the RabbitMQ and memcached steps in koha-common.postinst 2026-09-29 09:02:25 +00:00
koha-common.preinst Bug 40901: (testing follow-up) Remove / rename koha-common to koha-core 2026-09-29 09:01:25 +00:00
koha-core.bash-completion Bug 40901: (testing follow-up) Remove / rename koha-common to koha-core 2026-09-29 09:01:25 +00:00
koha-core.config Bug 40901: (QA follow-up) Migrate debconf answers from koha-common to koha-core 2026-09-29 09:02:26 +00:00
koha-core.dirs
…
koha-core.docs Bug 35713: Remove outdated debian/docs/LEEME.Debian file 2024-01-11 12:10:45 +01:00
koha-core.install
…
koha-core.koha-common.cron.d Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.koha-common.cron.daily Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.koha-common.cron.hourly Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.koha-common.cron.monthly Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.koha-common.default Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.koha-common.logrotate Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.links Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.maintscript Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.postinst Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.preinst Bug 40901: (QA follow-up) Keep /etc conffiles under their koha-common names 2026-09-29 09:02:24 +00:00
koha-core.templates
…
koha-full.postinst Bug 40901: (QA follow-up) Restore the RabbitMQ and memcached steps in koha-common.postinst 2026-09-29 09:02:25 +00:00
koha-post-install-setup Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
koha-systemd.README.Debian Bug 40901: Add koha-systemd package with native systemd units 2026-09-29 09:01:21 +00:00
koha-systemd.dirs Bug 40901: (QA follow-up) Install units to /lib/systemd/system and tidy control 2026-09-29 09:02:28 +00:00
koha-systemd.install Bug 40901: (QA follow-up) Install units to /lib/systemd/system and tidy control 2026-09-29 09:02:28 +00:00
koha-systemd.postinst Bug 40901: (QA follow-up) Fix the koha-systemd migration, upgrade and removal paths 2026-09-29 09:02:34 +00:00
koha-systemd.postrm Bug 40901: (QA follow-up) Fix the koha-systemd migration, upgrade and removal paths 2026-09-29 09:02:34 +00:00
koha-systemd.prerm Bug 40901: (QA follow-up) Fix the koha-systemd migration, upgrade and removal paths 2026-09-29 09:02:34 +00:00
koha-sysv.koha-common.init Bug 40901: (QA follow-up) Install the SysV init script through dh_installinit 2026-09-29 09:02:22 +00:00
koha-sysv.postinst Bug 40901: (QA follow-up) Install the SysV init script through dh_installinit 2026-09-29 09:02:22 +00:00
koha.README.Debian
…
koha.apache-ports
…
koha.config
…
koha.dirs
…
koha.install
…
koha.postinst Bug 25691: Replace link to non-existing README with wiki link 2024-01-16 12:06:08 +01:00
koha.postrm
…
koha.prerm
…
list-deps Bug 40163: (follow-up) Fix wrong GNU links and update test 2025-09-24 09:25:04 -06:00
rules Bug 40901: (QA follow-up) Install units to /lib/systemd/system and tidy control 2026-09-29 09:02:28 +00:00
unavailable.html
…
update-control
…

README.build

In order to build .deb packages, following debian packages need to be present
(installed): 
devscripts
pbuilder
dh-make
fakeroot

As root (or sudo) execute:
pbuilder create

Executing build-git-snapshot without any arguments will leave package and the
rest in some pbuilder dir, eg. /var/cache/pbuilder/result It is highly
recommended that --buildresult option is used.