Bug 41447

Summary: Provide an official bootstrap script to configure Koha APT repository on Debian/Ubuntu
Product: Koha Reporter: Saiful Amin <saiful>
Component: PackagingAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P1 - high CC: david, mtj
Version: unspecified   
Hardware: All   
OS: All   
GIT URL: https://github.com/saiful-semantic/KohaOnUbuntu Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Saiful Amin 2025-12-14 06:49:33 UTC
Installing Koha on Debian and Ubuntu currently requires manually performing several prerequisite steps before koha-common can be installed, including:
- Adding the Koha APT signing key
- Configuring the Koha APT repository
- Running apt update

These steps are well documented, but they are repetitive, error-prone for new users, and frequently re-implemented across third-party guides and automation scripts.

This bug proposes providing an official, minimal bootstrap script for Debian/Ubuntu only, whose sole responsibility is to:
- Install the Koha APT signing key
- Configure the Koha APT repository
- Run apt update

After this step, installation continues exactly as required:
apt install koha-common


Rationale / Motivation:
- Reduces installation friction for first-time and test installations on supported platforms
- Encourages a single, auditable implementation instead of many unofficial ones
- Simplifies automation, CI, containers, and provisioning workflows
- Keeps Koha's existing packaging and installation model unchanged


Reference Implementation:
A reference implementation currently used in production for ~2 years is available here:
https://github.com/saiful-semantic/KohaOnUbuntu

This is provided to illustrate the approach, not as a final implementation. The reference implementation is validated using GitHub Actions CI on both Ubuntu LTS (20.04, 22.04, 24.04) and Debian (11, 12).

Security Considerations:
The common 'curl | sudo bash' pattern is acknowledged as a concern, which can be mitigated by:
- Hosting the script under an official Koha domain
- Providing checksums or signature verification

Alternatively, offering a download-then-execute workflow instead of piping.
Comment 1 Saiful Amin 2026-02-26 14:22:37 UTC
Moving this from Project Infrastructure (which I guess is more related to hosting etc.) to main Koha > Release Tools. This is more appropriate I think.