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

PPA repo replacement for Debian #999

Open
Firefishy opened this issue Nov 23, 2023 · 19 comments
Open

PPA repo replacement for Debian #999

Firefishy opened this issue Nov 23, 2023 · 19 comments

Comments

@Firefishy
Copy link
Member

Firefishy commented Nov 23, 2023

Create a replacement for our Ubuntu PPA build process for custom packages.

Requirements:

  • Adhoc builder for packages (ARM64 & AMD64)
  • Debian Repository for packages (Debian 12, future stable releases)

Forked from: #844

@Firefishy
Copy link
Member Author

https://packagecloud.io/ is only repo hosting, a separate builder is required.

@mmd-osm
Copy link

mmd-osm commented Dec 2, 2023

Today we have around 6 packages with OSM focus and 5-6 others which I don't really know what they're good for (seems to be some system mgmt tools): https://launchpad.net/~osmadmins/+archive/ubuntu/ppa?field.series_filter=jammy

That's covering roughly half of the OSM projects used in production, the other half has dedicated build instructions in Chef. Do we plan to change this ratio somehow, and either build everything in Chef, or use packages everywhere?

Out of these 6 packages, I believe osm2pgsql, libosmium, libapache2-mod-tile and pyosmium are already available in Debian. Are these recent enough for our purposes, or do we need our own version here?

Regarding adhoc builder for packages, osmdbt already has some relevant config. We're discussing to move CGImap to cmake, and maybe use cpack to generate .deb packages. -> already in place now!

Maybe we could try to convince https://wiki.debian.org/DebianGis that osmdbt and cgimap would be a good fit for them as well, and don't run a Debian repository on our own.

What's the plan for ARM64 like? Is that only relevant for tile rendering, or do we expect other apps to move there as well?

@mmd-osm
Copy link

mmd-osm commented Apr 22, 2024

openstreetmap/chef#659 made me curious what the current plan for 2024 is.

If we can keep using Ubuntu launchpad for PPA generation, I will put our cpack activities on low priority for now.

@tomhughes
Copy link
Member

I think we're still planning to move towards Debian but existing machines, at least in the short term, are likely to be upgraded instead hence that PR.

@Firefishy
Copy link
Member Author

As discussed with Operations team I will produce a proof of concept "PPA" GitHub action builder. The repo hosting is to be defined. ARM64 building will be backed by a Raspberry PI 5 cluster until Public Open Source GitHub Action Runners are available late 2024 / early 2025.

@grischard
Copy link
Collaborator

For whatever it's worth, the Editor Layer Index happily runs in production on github pages.

@Firefishy
Copy link
Member Author

We now have aptly running a repo at https://apt.openstreetmap.org/ Thanks @tomhughes
Does not include a method for building packages. See below.

I have started testing brief testing of GitHub Action builder methods:

  • Using debootstrap is tricky on GitHub Actions as it requires sudo or fakeroot. action/cache backup / restore runs as default action user and breaks if file permissions do not allow.
  • https://github.com/marketplace/actions/build-debian-packages looks like a nice solution (docker) and is wired directly into github repo. Uploader to apt.openstreetmap.org still needs investigation. Unsure as yet of Ubuntu compatibility.

@tomhughes
Copy link
Member

Basically options for uploading are...

  • Enable the aptly API which require some sort of layer in front to do security, then you can upload files with POST /api/files/:dir and add them to a repository with POST /api/repos/:name/file/:dir
  • Implement an https/ftp/sftp/scp/rsync upload endpoint that dput can use and then use aptly repo include to import packages from that upload queue which has the advantage that it will ignore packages that aren't signed by an authorised uploader

@grischard
Copy link
Collaborator

A third option is running apt.openstreetmap.org on github pages.

@tomhughes
Copy link
Member

Ignoring the fact that we've already implemented something else, just HTF is that supposed to work?

@tomhughes
Copy link
Member

Yes I know how to point a domain name at gihub pages.

What I don't know is how to make it generate metadata for an apt repository.

@grischard
Copy link
Collaborator

The github action that Grant mentioned above looks perfect for it:

github.com/marketplace/actions/build-debian-packages looks like a nice solution (docker) and is wired directly into github repo. Uploader to apt.openstreetmap.org still needs investigation. Unsure as yet of Ubuntu compatibility.

@tomhughes
Copy link
Member

It builds the packages sure. As far as I can see it does nothing about adding those packages to a pool tree or building a dists tree with Release and Packages files describing the available packages.

@Firefishy
Copy link
Member Author

@Firefishy
Copy link
Member Author

osmdbt deb PR openstreetmap/osmdbt#41

@mmd-osm
Copy link

mmd-osm commented Sep 7, 2024

@Firefishy : regarding mod_tile, can't we use the Debian GIS repo instead? https://salsa.debian.org/debian-gis-team/libapache2-mod-tile

@Firefishy
Copy link
Member Author

@mmd-osm OSM run some custom patches on top of the standard releases (osm2pgsql and mod_tile). The current example is size/length limits which help mitigate vandalism overloading our servers.

@mmd-osm
Copy link

mmd-osm commented Sep 9, 2024

https://salsa.debian.org/debian-gis-team/libapache2-mod-tile/-/tree/master/debian?ref_type=heads has all needed Debian config in place, which might serve as a starting point. There’s even a patches directory where you could add your changes (assuming this all is copied over to some other place to build packages for apt.osm specifically).

None of this is currently available in the original mod_tile repo.

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

No branches or pull requests

4 participants