Skip to content

SapMachine #2216: add Debian APT repository generation script#2271

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

SapMachine #2216: add Debian APT repository generation script#2271
EdrilanBerisha wants to merge 3 commits into
SAP:sapmachinefrom
EdrilanBerisha:sapmachine

Conversation

@EdrilanBerisha

Copy link
Copy Markdown

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 #2216

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, this pull request fulfills all formal requirements.

@EdrilanBerisha

Copy link
Copy Markdown
Author

@bzed maybe you can clone this branch and test it at least and help to verify it works

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.

apt repository doesn't follow specs

2 participants