Publishing multiple snapshots

14 views
Skip to first unread message

David Leader

unread,
Aug 10, 2023, 10:01:50 AM8/10/23
to aptly-discuss
I have been working ok with snapshots created from mirrors of the ubuntu repo.  However I have just added a new mirror from microsoft.  This has worked and created a snapshot OK, but having problems publishing it.

Here are my mirror lists

List of mirrors:
 * [jammy-main]: http://archive.ubuntu.com/ubuntu/ jammy
 * [jammy-restricted]: http://archive.ubuntu.com/ubuntu/ jammy
 * [jammy-security-main]: http://archive.ubuntu.com/ubuntu/ jammy-security
 * [jammy-security-restricted]: http://archive.ubuntu.com/ubuntu/ jammy-security
 * [jammy-updates-main]: http://archive.ubuntu.com/ubuntu/ jammy-updates
 * [jammy-updates-restricted]: http://archive.ubuntu.com/ubuntu/ jammy-updates
 * [microsoft-defender]: https://packages.microsoft.com/ubuntu/22.04/prod/ jammy


and snapshot list

List of snapshots:
 * [jammy-main]: Snapshot from mirror [jammy-main]: http://archive.ubuntu.com/ubuntu/ jammy
 * [jammy-restricted]: Snapshot from mirror [jammy-restricted]: http://archive.ubuntu.com/ubuntu/ jammy
 * [jammy-security-main]: Snapshot from mirror [jammy-security-main]: http://archive.ubuntu.com/ubuntu/ jammy-security
 * [jammy-security-restricted]: Snapshot from mirror [jammy-security-restricted]: http://archive.ubuntu.com/ubuntu/ jammy-security
 * [jammy-updates-main]: Snapshot from mirror [jammy-updates-main]: http://archive.ubuntu.com/ubuntu/ jammy-updates
 * [jammy-updates-restricted]: Snapshot from mirror [jammy-updates-restricted]: http://archive.ubuntu.com/ubuntu/ jammy-updates
 * [microsoft-defender]: Snapshot from mirror [microsoft-defender]: https://packages.microsoft.com/ubuntu/22.04/prod/ jammy


Here is the publish list as it was

Published repositories:
  * ./jammy (origin: Ubuntu) [amd64] publishes {main: [jammy-main]: Snapshot from mirror [jammy-main]: http://archive.ubuntu.com/ubuntu/ jammy}, {restricted: [jammy-restricted]: Snapshot from mirror [jammy-restricted]: http://archive.ubuntu.com/ubuntu/ jammy}
  * ./jammy-security (origin: Ubuntu) [amd64] publishes {main: [jammy-security-main]: Snapshot from mirror [jammy-security-main]: http://archive.ubuntu.com/ubuntu/ jammy-security}, {restricted: [jammy-security-restricted]: Snapshot from mirror [jammy-security-restricted]: http://archive.ubuntu.com/ubuntu/ jammy-security}
  * ./jammy-updates (origin: Ubuntu) [amd64] publishes {main: [jammy-updates-main]: Snapshot from mirror [jammy-updates-main]: http://archive.ubuntu.com/ubuntu/ jammy-updates}, {restricted: [jammy-updates-restricted]: Snapshot from mirror [jammy-updates-restricted]: http://archive.ubuntu.com/ubuntu/ jammy-update
s}

When I try and publish the Microsoft snapshot I get the following error

ERROR: prefix/distribution already used by another published repo: ./jammy (origin: Ubuntu) [amd64] publishes {main: [jammy-main]: Snapshot from mirror [jammy-main]: http://archive.ubuntu.com/ubuntu/ jammy}, {restricted: [jammy-restricted]: Snapshot from mirror [jammy-restricted]: http://archive.ubuntu.com/ubuntu/ jammy}

If I drop the jammy and add the microsoft snopshot to the command it creates but calls is a funny name that I can't then use -raw and xargs to refresh

* microsoft-defender/jammy (origin: Ubuntu) [amd64] publishes {main: [jammy-main]: Snapshot from mirror [jammy-main]: http://archive.ubuntu.com/ubuntu/ jammy}, {restricted: [jammy-restricted]: Snapshot from mirror [jammy-restricted]: http://archive.ubuntu.com/ubuntu/ jammy}

If I move the list around in the publish command I get a different number of packages and name.

Todd Goodman

unread,
Aug 10, 2023, 12:11:24 PM8/10/23
to aptly-...@googlegroups.com

Hi David,

We use prefixes based on the mirrors or repos we're publishing.

For example, we publish snapshots from Ubuntu mirrors under the ubuntu prefix and we would have the distribution as jammy in your example.

For the microsoft mirror we'd probably publish with a prefix of microsoft or microsoft-defender

We don't use ./ in front of our prefixes and have rootDir defined in our aptly.conf file

Just how we've been doing it so we don't publish unrelated things to the same prefixes.

It's natural having multiple distributions under a prefix to support multiple Ubuntu releases for example (e.g., xenial, bionic, focal, jammy.)

Todd

--
You received this message because you are subscribed to the Google Groups "aptly-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to aptly-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/aptly-discuss/4cedf50c-c110-4b03-ac7f-293c200e3c9cn%40googlegroups.com.

David Leader

unread,
Aug 11, 2023, 3:34:44 AM8/11/23
to aptly-discuss
We have got a rootDir set in the config file.

How do you do the publish a prefix?  As you can see the snapshots are working OK by the looks of it.

Todd Goodman

unread,
Aug 11, 2023, 12:45:00 PM8/11/23
to aptly-...@googlegroups.com

I just mean that we'd publish your ubuntu snapshots with the ubuntu prefix:

aptly publish snapshot -distribution jammy jammy-main ubuntu

(we also always timestamp snapshots as we don't want to remove snapshots that were used to release software so we keep the referenced packages around.)

Actually, for multi-component publishing we do it as described at https://www.aptly.info/doc/feature/multi-component/

And then we'd publish microsoft defender with a different prefix:

aptly publish snapshot -distribution jammy microsoft-defender microsoft

Hopefully that's clearer.

Todd

Reply all
Reply to author
Forward
0 new messages