Skip to content

fix(packaging): add Debian APT repository generation script#2270

Closed
EdrilanBerisha wants to merge 3 commits into
SAP:sapmachinefrom
EdrilanBerisha:sapmachine
Closed

fix(packaging): add Debian APT repository generation script#2270
EdrilanBerisha wants to merge 3 commits into
SAP:sapmachinefrom
EdrilanBerisha:sapmachine

Conversation

@EdrilanBerisha

Copy link
Copy Markdown

Description

fixes #Issue

Fixes SAP#2216

The sapmachine apt repository at dist.sapmachine.io was non-compliant
with the Debian Repository Format specification
(https://wiki.debian.org/DebianRepository/Format):

1. The suite was './', which is not a real suite name. Most tools
   other than apt itself generate broken URLs from this.
2. The Release file at https://dist.sapmachine.io/debian/amd64//Release
   was missing the required 'Architecture:' field.

This commit adds make/scripts/generate-debian-repo.sh: a bash script
that generates a standards-compliant Debian APT repository, and
make/scripts/test-generate-debian-repo.sh: 30 unit tests covering
argument validation, suite name validation, Release file structure,
directory layout, and checksum sections.

Key fixes in the generated repository:
- Suite is a proper name (e.g. 'sapmachine', 'stable') — never './'
- Release file always includes Architecture: field
- Release file includes all required fields: Suite, Codename,
  Components, Architecture, Origin, Label, Date
- Repository follows the canonical dists/SUITE/COMPONENT/binary-ARCH/
  layout with pool/ for the .deb packages
- SHA256/SHA1/MD5Sum checksums included in Release
- GPG signing support via --gpg-key option (InRelease + Release.gpg)
The sapmachine apt repository at dist.sapmachine.io was non-compliant with the
Debian Repository Format specification (https://wiki.debian.org/DebianRepository/Format):

1. The suite was './', which is not a real suite name. Most tools other than apt
   itself generate broken URLs from this.
2. The Release file at https://dist.sapmachine.io/debian/amd64//Release was missing
   the required 'Architecture:' field.

This commit adds make/scripts/generate-debian-repo.sh: a bash script that generates a
standards-compliant Debian APT repository, and make/scripts/test-generate-debian-repo.sh:
30 unit tests covering argument validation, suite name validation, Release file structure,
directory layout, and checksum sections.

Key fixes in the generated repository:
- Suite is a proper name (e.g. 'sapmachine', 'stable') — never './'
- Release file always includes Architecture: field
- Release file includes all required fields: Suite, Codename, Components,
  Architecture, Origin, Label, Date
- Repository follows the canonical dists/SUITE/COMPONENT/binary-ARCH/ layout
  with pool/ for the .deb packages
- SHA256/SHA1/MD5Sum checksums included in Release
- GPG signing support via --gpg-key option (InRelease + Release.gpg)

fixes SAP#2216
@SapMachine

Copy link
Copy Markdown
Member

Hello @EdrilanBerisha, I'm sorry, this pull request doesn't meet the expectations. The pull request description has an invalid format.

@RealCLanger

Copy link
Copy Markdown
Member

Relates to #2216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants