-
-
Notifications
You must be signed in to change notification settings - Fork 372
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
Addon files #473
Addon files #473
Conversation
I have a couple of questions before this is all complete about the checklist:
Thanks you! |
I don't think we need unit-tests for things covered with functional testing. I prefer functional tests, but some things are hard to test (e.g. retry algorithm). So if covered with functional, we don't need any unit-tests. |
4fb75fc
to
feb3ceb
Compare
I added a functional test that:
Let me know if there is anything else for this you want covered. |
As this is still open are there any future plans for this AppStream (addon files) feature? |
@btkostner @janisppc I'll take a look tomorrow |
This should be up to date, and ready to merge now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM
Probably also needs some documentation on https://github.com/aptly-dev/aptly-dev.github.io (as standalone feature page?), explaining how a user might want to use that and what the directory structure needs to look like.
deb/publish.go
Outdated
} | ||
|
||
fsPath := filepath.Join(addonDir, p.Prefix, "dists", p.Distribution, component) | ||
if err := filepath.Walk(fsPath, func(path string, info os.FileInfo, err error) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use Walk here I think it also needs to implement some level of symlink handling. I can entirely imagine people wanting to keep the data in some other dir and then ln -sf
resources it into the addon dir as they get updated.
@btkostner If you could rebase with master that'd be lovely, and maybe have a look at the symlink walking and documentation. We are also having some concerns over the name. Addon makes it sound like it's some sort of addon system for aptly in general. @sliverc suggested I'd love to get this merged soon ™️ |
Test failure is unrelated to this PR |
@apachelogger Updated and renamed to As far as the symlink walking, that is going to be a lot of extra work. As far as I know (but it's been a long time since I've touched go so I could be wrong) there is no standard way of handling symlinks. |
Opened up a basic doc PR. It might need more information. |
The system tests will make me go insane some day -.- @btkostner Thanks. You are absolutely right about the symlink, I misremembered how I'll see what can be done about the failing system test. |
I've had another look and I think this currently isn't actually up to expectations: https://wiki.debian.org/DebianRepository/Format#MD5Sum.2C_SHA1.2C_SHA256
i.e. we need to temporarily uncompress and inject the checksums of the compressed files as well, even though we do not publish them (which we ought not if they were not in the skel) You'll see this particularly affecting dep11 data created by appstream-generator. The latter only creates .xz and .gz and expects the archive software to properly create the checksums for the Release file. |
@btkostner What't the status of this feature on your side? It would be really nice if we could have this working in aptly. Missing appstream metadata is a problem right now for us. I might be able to help with some sponsorship to get this completed. |
@rhertzog Sadly I have no time to work on this. If I remember correctly, the only thing that needs to be fixed / added is uncompressed checksums not being generated. |
This would be a really nice addition and probably make Aptly stand out of the crowd, if not already ;) |
The customer that was investigating aptly at that time did not switch and as such I can't offer direct sponsorship but since this a Debian related project, you could possibly consider requesting a grant via https://salsa.debian.org/freexian-team/project-funding |
Is there any chance this ever gets finalized and merged? Thank you! |
@btkostner @rhertzog any estimate of the work needed and potential funding needed to get this merged? |
I'm not going to lie, it's been half a decade since I've looked at this code. Considering how long this has been opened, it's probably going to be easier to use some of this code as reference and open a whole new PR |
@reglim could you have a look at this? Lets discuss this next week :) |
I would like to add that Gnome Software and Ubuntu Software Center require dep11 metadata to display the software, otherwise it won't display it. In addition, I did not manage to find other repository management tool that automatically generates/incorporates this data. So, having this functionality working on aptly would be really welcome. If I got this correctly (correct me, if I'm wrong), the intention of this pull request was to merge pre-created dep11 data from the addon folder during the publish stage. Conceptually the idea seems quite straight forward and has the advantage of offloading the responsibility of creating the dep11 metadata away from aptly. Hopefully this also makes it easier to implement. As I mentioned earlier, I don't mind testing it, documenting and making the new version available through XtraDeb.net for early adopters. Cheers! |
I just migrated your changes from |
Let's close this in favour of: #1186 |
Fixes #384
Description of the Change
This is a follow up / redo of my #420 appstream PR. I realized I made the previous PR too narrow, and it touched a lot of code that it did not need to. Here is what this does:
addon
folder at.aptly/addon
that can store files you want to be in the repositoryThe addon folder mirrors the public folder, so on publish
.aptly/addon/dists/maverick/main/dep11/Components-i386.yml.gz
will create.aptly/public/dists/maverick/main/dep11/Components-i386.yml.gz
or equivalent.Checklist
unit-test added (if change is algorithm)man page updated (if applicable)documentation updatedAUTHORS