Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/debianize #1339

Merged
merged 35 commits into from
Sep 24, 2024
Merged

Feature/debianize #1339

merged 35 commits into from
Sep 24, 2024

Conversation

neolynx
Copy link
Member

@neolynx neolynx commented Sep 14, 2024

Fixes #1199, #960, #1108, #1287, #934, #425

Description of the Change

Debianize aptly and be compatible with official debian package.

This PR improved building and packaging and also improvides the apt repository structure

  • replace goxc and use go directly for debian builds
  • debianize and use dpkg-buildpackage for building debian packages
  • build for architectures: arm64, arm64, armhf, i386
  • read go version from go.mod everywhere
  • read package version from debian/changelog
  • build FreeBSD, MacOS and Linux separately
  • introduce new apt repository structure on repo.aptly.info
  • support Ubuntu 24.04 (noble) and Debian testing (trixie) builds
  • use go 1.22
  • downgrade/upgrade go modules to match versions available in Debian/trixie (see Google Spreadsheet)

APT Repositories

Aptly is now available on repo.aptly.info for:

  • Debian buster, bullseye, bookworm, trixie
  • Ubuntu focal, jammy
  • Architectures: arm64, arm64, armhf, i386

Repo Key

sudo wget http://repo.aptly.info/pubkey.txt -O /etc/apt/keyrings/aptly.asc

New CI repo:

deb [signed-by=/etc/apt/keyrings/aptly.asc] http://repo.aptly.info/ci bookworm main

New Release repo:

deb [signed-by=/etc/apt/keyrings/aptly.asc] http://repo.aptly.info/release bookworm main

TODO

  • cleanup debian package / service
    • zsh completion
  • be compatible with official debian package (switching without loosing config/data)
  • CI prod release use dpkg-buildpackage
  • Include /usr/local/etc/aptly.conf on FreeBSD #1108
  • check /etc/aptly.conf readability
  • check upgrade from debian version 1.5.0+ds1-1+b4
  • check upgrade from previous nightly builds
  • check contents in non deb builds are the same

@neolynx neolynx self-assigned this Sep 14, 2024
@neolynx neolynx requested a review from a team September 14, 2024 10:00
@neolynx neolynx mentioned this pull request Sep 14, 2024
5 tasks
@neolynx neolynx added needs review Ready for review & merge and removed needs implementation WIP labels Sep 14, 2024
Copy link

codecov bot commented Sep 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.87%. Comparing base (372ce3c) to head (dc7fa1c).
Report is 35 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1339      +/-   ##
==========================================
+ Coverage   74.51%   74.87%   +0.36%     
==========================================
  Files         150      150              
  Lines       16994    16999       +5     
==========================================
+ Hits        12663    12728      +65     
+ Misses       3322     3258      -64     
- Partials     1009     1013       +4     
Flag Coverage Δ
74.87% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@neolynx neolynx force-pushed the feature/debianize branch 2 times, most recently from ce5334d to c533df8 Compare September 14, 2024 21:04
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
@iofq
Copy link
Contributor

iofq commented Sep 15, 2024

I have a few commits in https://github.com/iofq/aptly master branch that may fit well.

Namely added release workflow to gitlab CI (which means we can completely remove goxc as I think it wasn't quite working for this anyway)

@neolynx
Copy link
Member Author

neolynx commented Sep 15, 2024

oh, great. goxc is still in bcs of the MacOS, FreeBSD and legacy linux builds...
have you been able to build them without goxc ?

@iofq
Copy link
Contributor

iofq commented Sep 15, 2024

Yep here is an example release: https://github.com/iofq/aptly/releases/tag/v1.15.0

Still cleaning it up and trying to figure out a changelog

@neolynx neolynx force-pushed the feature/debianize branch 4 times, most recently from bf86188 to 8ea4c6a Compare September 16, 2024 14:43
@neolynx neolynx force-pushed the feature/debianize branch 3 times, most recently from 3cffdd4 to ed02dab Compare September 17, 2024 14:23
- fix make version on debian
- update gitignore
- add aptly-api and service
- install zsh completion
- add debug package
- move aptly data from orig deb package
- do not add shell for service user
- use 8080 as default port
config rfiles are read in the following order:

1) ~/.aptly.conf
2) /usr/local/etc/aptly.conf
3) /etc/aptly.conf
gpgv: can't allocate lock for '/home/runner/.gnupg/aptlytest.gpg'

this forced running local system tessts in /home/runner, as it is
in the gitgub actions.
- abort docker scripts on error
- generate version in system tests
- build debian packages in docker
- add make clean target
- fix lint
@neolynx neolynx force-pushed the feature/debianize branch 5 times, most recently from 68b8bc3 to ab243ca Compare September 21, 2024 12:57
@neolynx
Copy link
Member Author

neolynx commented Sep 21, 2024

I think CI and release build are OK now :)

However, since this is a PR and not on master branch, could you maybe test in your iofq:master branch if the correct version is built, debian release upload and gh-release are running ?

Thanks in advance !

disable tests if env secrets are empty

- detect emtpy aws token
- upload: check for aptly creds
@iofq
Copy link
Contributor

iofq commented Sep 21, 2024

@neolynx
Copy link
Member Author

neolynx commented Sep 21, 2024

thanks a lot !

I added some more checks to not publish a release version to ci and prod...

please approve, then I can merge and update documentation 👍

this should not build release if pipeline triggered on master and master also has a version tag. avoid building same version twice and uploading to ci and release repos.
@neolynx neolynx removed the needs review Ready for review & merge label Sep 24, 2024
@neolynx neolynx merged commit eaa363e into master Sep 24, 2024
46 checks passed
@neolynx neolynx deleted the feature/debianize branch September 24, 2024 13:19
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.

[Feature] Add arm64 deb builds to main repo
2 participants