aptly
aptly copied to clipboard
Resolve and add automatically dependencies from a local repository to a mirror of Ubuntu
Is it possible and how to resolved and add automatically dependencies of a local repository (own .deb files) to a mirror? The scope of the mirror (of Ubuntu 20.04) is limited by filter. What is the best way to merge them?
I feel in no position about talking about the best way, but I think I know some way.
I am assuming you are either packaging packages not conflicting with what is is available in focal, or doing so with packages that are of a higher version than those distributed for focal. If you are not, I think this is what you should fix, as it is easier to change a conflicting name or bump a version than to tell aptly to do this for you.
Enough lecture, try this:
- Get a list of the packages in your local repository
- Merge a snapshot of your local repository with a snapshot of all of Ubuntu focal
- Create a filtered snapshot from this using all the packages you have in your local repository, following dependencies
You should end up with a snapshot containing exactly what your packages need, ready to be published.
I hope I could help, please close the issue if it does, otherwise, I hope to be able to help you out further.
ETA: If you want to change what you are fetching, you can apply the set of packages resulting from the third step (minus your own packages) to the next mirror update filter and use the snapshot verify feature to know you have not missed a new dependency brought in by your packages or a package they are depending on. (Please note that you will still have to catch packages that are no longer dependencies using the first-mentioned approach.)
Do you see a way to do that without a complete snapshot of Ubuntu focal? Currently I solve it by adding the dependencies of the local repository to the filter list for the filtered Ubuntu snapshot. My goal is to minimize the size.
Yes, the snapshot verify is very helpful.
As long as you have a list of the leaf-dependency packages, meaning a list of the packages that you want available on the mirror that do not depend on each other, you can pass those as a package query filter to aptly mirror create or aptly mirror edit, using the -filter-with-deps option and an or-ed list of your packages, e.g. package1|package2|package3.
Do you want to create a stand-alone ubuntu mirror or is this supposed to be an auxiliary mirror added alongside the original ubuntu mirrors?
Do you prefer omitting a complete mirror sync because of space- and/or time-constraints or do you have another reason?
Hi, I was looking for the same possibility as @BrightGum, to be able to create a snapshot with our own software deb packages, and their dependencies. Dependencies are coming from official Debian or Ubuntu repos.
I wanted to be able to do this without mirroring a full official repo, for time and storage constraints.
Is there a way to do this without having the full list of leaf-dependencies for every software ?
@ryanammoury - In your case it would seem trivial to pass all of your own packages' dependencies (as listed in control file - See Package Interrelationship fields and note that you don't want to look at all of those fields.) as a filter to aptly.
Having created a snapshot of your own packages, you can use aptly snapshot verify to get a list of packages to pass to your filter for offical Debian/Ubuntu mirrors.
Hi @r4co0n,
Thanks for your answer. It's comforting to know that, as it's the solution I opted for.
I just used chdist, and the chdist apt-rdepends command to work out all of the dependencies for me, as they are spread accross multiple repos.
I then mirror and snapshot said repos, and merge them in a final snapshot.
The aptly snapshot verify confirmed that no dependencies were missing in the final snapshot.