sonatype-nexus-community / nexus-repository-apt

A Nexus Repository 3 plugin that allows usage of apt repositories
Eclipse Public License 1.0
105 stars 50 forks source link

Group support #10

Closed ghost closed 4 years ago

ghost commented 7 years ago

Before I start, just want to say this is a great plugin and has been really helpful!

I was just wondering whether there were any plans for adding support for repository groups? I'm using both local and proxy repositories and would love to be able to combine them so I only have to add a single line to my sources.list files.

mpoindexter commented 7 years ago

Yes, this is definitely something I plan to do! I have a branch with it partially implemented, but I've been too busy to complete it. Unfortunately I don't have an ETA on this, but hearing that other people want it moves it up my priority list.

ghost commented 7 years ago

Great to hear, and I completely get the being too busy!!

Looking forward to seeing it some time in the (hopefully) near future!

arunvc commented 7 years ago

Looking forward to see the groups implementation.

Pytry commented 7 years ago

I'm just trying this plugin out and I'm loving it as well. To make it so that my operations will use it, I would need the group support.

So what I'm asking is, "Want some help?" I could totally spend a couple hours every few days to try and get it done. Just let me know what needs worked on.

mpoindexter commented 7 years ago

If anyone wants to take a stab at this, PRs are welcome.

A word of fair warning: this is likely to be a difficult problem. Since the Apt lists have to be signed, and can be quite large, it argues against rebuilding them on the fly, so there needs to be some way to generate the group lists on changes in the component repositories, and store/cache that. That's not so bad itself, but it starts to interact very badly with how proxy repositories currently work. So most of my work on this to date has been refactoring the proxy repo to have a much deeper knowledge of the data its fetching to know when to signal that we need to rebuild group repos, and making the proxy and hosted repos conform to a common interface that supports this. I've put probably 20 or so hours into the infrastructure to properly support this before I tabled it, and I'd estimate I'm 30-50% done.

For my usage of this I simply write multiple sources in sources.list or multiple files in sources.list.d to basically get around the need for a group repo. Since all of our hosts are under configuration management, this isn't so terrible since new repos, etc can be added via configuration management instead.

One limitation of group repos that I think will never be solvable is the handling of the NotAutomatic and ButAutomaticUpgrades flags (https://wiki.debian.org/DebianRepository/Format#NotAutomatic_and_ButAutomaticUpgrades).

Since the processing of these flags is client side, there's no good way to mix repos that have these flags set and not set into a group.

Pytry commented 7 years ago

Could you share what you have done so far in a feature branch? I can only see the one "master" branch in the repository.

mpoindexter commented 7 years ago

It wouldn't be much help: it's a broken state of an incomplete major refactor, definitely not the sort of thing that would make sense for someone else to pick up and run with in its current state.

Pytry commented 7 years ago

@mpoindexter Do you have a code-style readme/document that I could follow, or a file I could import into my IDE? I'm hoping for something like an ".editorConfig" file, IntelliJ's "codestyle.xml", or eclipses "org.eclipse.jdt.ui.prefs"?

mpoindexter commented 7 years ago

It should mostly follow https://github.com/sonatype/codestyle at this point.

DarthHater commented 7 years ago

+1 to using the @sonatype codestyle @Pytry @mpoindexter (just helps us in case we need to jump in and help out).

Pytry commented 7 years ago

I'm not really seeing a way to do this consistently either. The "group" concept just does not work well with the debian and yum repository concepts,

flamein commented 5 years ago

I'm not really seeing a way to do this consistently either. The "group" concept just does not work well with the debian and yum repository concepts,

Well, as default nexus already supports yum groups, that is no issue. But in a yum repository it's the packages themselves that are signed, so that is fundamentally different.

bhamail commented 4 years ago

APT is now part of Nexus Repository Manager. Version 3.17.0 includes the APT plugin by default. If this is still an issue if using 3.17.0 or later please file an issue at https://issues.sonatype.org/. Links to the new source code location are in the top level README.md