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 request: option to generate a lastupdate file during aptly publish #1229

Open
Grimler91 opened this issue Nov 3, 2023 · 2 comments

Comments

@Grimler91
Copy link

Detailed Description

To keep traffic to a minimum some mirrors would like to have a lastupdate file with timestamp of latest repo update. The mirror can then check this file before rsync'ing.

Context

See for example lastupdate check in archlinux's repo sync template (not an apt repo, but principle is the same).

Possible Implementation

I'm not very fluent in golang, but seems to me like it should be possible to (optionally) generate or update a lastupdate file in repo root (or perhaps a configurable subfolder) every time repo is re-published. From shell we can run date +%s > /path/to/aptly/published/folder/lastupdate to generate a lastupdate file with timestamp.

Your Environment

@neolynx
Copy link
Member

neolynx commented Dec 20, 2023

Hi,

could this be achieved by exploring the Release.gpg file ? A HTTP HEAD command returns the last modified:

$ curl --head http://aptlyserver/patch/dists/stable/Release.gpg
HTTP/1.1 200 OK
Server: nginx/1.22.1
Date: Wed, 20 Dec 2023 13:07:15 GMT
Content-Type: application/octet-stream
Content-Length: 516
Last-Modified: Wed, 20 Dec 2023 13:01:45 GMT
...

@Grimler91
Copy link
Author

Grimler91 commented Dec 23, 2023

Hi @neolynx, I think for mirrors it would be useful with a lastupdate file, as that might be what they are used to. I can run a cronjob on the server and parse the Release file to generate a lastupdate file easily though, thanks for the idea!

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

2 participants