Skip to content

Debian mirror dependency filter: How to include dependencies of packages from 3rd party repository? #1494

@vrzh

Description

@vrzh

Aptly is a great project, really enjoying using it! But, still very new to how it works.

Suppose I have a very basic aptly mirror M of Debian packages where I use filters to reduce the number of downloaded packages.

Then I have a package P which I get from a 3rd party repository. Is it possible to add all the dependencies of P in some automated way to the filter of M?

The closest I found in the docs is the backports example https://www.aptly.info/tutorial/pull/#backporting-nginx but there the setup is a bit different.

As a concrete example, see the list of commands below. I create a Debian mirror with almost no packages in it. Then I have another mirror from which I get the google-chrome-stable package. When I publish a merged snapshot, I want to be able to fully install google-chrome-stable with all of its dependencies.

# Create a basic Debian mirror.
aptly mirror create -architectures=amd64 -filter='Priority (required) | Priority (important) | Priority (standard)' -filter-with-deps my-mirror-debian http://free.hands.com/debian/ trixie main

# Create a basic Google Chrome mirror.
aptly mirror create -architectures=amd64 -filter='google-chrome-stable' -filter-with-deps my-mirror-chrome http://dl.google.com/linux/chrome/deb/ stable

# Download Debian packages.
aptly mirror update my-mirror-debian

# Download Google Chrome package.
aptly mirror update my-mirror-chrome

# (workaround) Get the dependencies or Google Chrome (is there a json output option?).
aptly package show google-chrome-stable

...
Depends: ca-certificates, fonts-liberation, libasound2 (>= 1.0.17), libatk-bridge2.0-0 (>= 2.5.3), libatk1.0-0 (>= 2.11.90), libatspi2.0-0 (>= 2.9.90), libc6 (>= 2.25), libcairo2 (>= 1.6.0), libcups2 (>= 1.6.0), libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3, libdbus-1-3 (>= 1.9.14), libexpat1 (>= 2.1~beta3), libgbm1 (>= 17.1.0~rc2), libglib2.0-0 (>= 2.39.4), libgtk-3-0 (>= 3.9.10) | libgtk-4-1, libnspr4 (>= 2:4.9-2~), libnss3 (>= 2:3.35), libpango-1.0-0 (>= 1.14.0), libudev1 (>= 183), libvulkan1, libx11-6 (>= 2:1.4.99.1), libxcb1 (>= 1.9.2), libxcomposite1 (>= 1:0.4.4-1), libxdamage1 (>= 1:1.1), libxext6, libxfixes3, libxkbcommon0 (>= 0.5.0), libxrandr2, wget, xdg-utils (>= 1.0.2)
...

# Edit the original mirror to include these packages.
aptly mirror edit -filter='Priority (required) | Priority (important) | Priority (standard) | ca-certificates | fonts-liberation | libasound2 | libatk-bridge2.0-0 | libatk1.0-0 | libatspi2.0-0 | libc6 | libcairo2 | libcups2 | libcurl3-gnutls | libcurl3-nss | libcurl4 | libcurl3 | libdbus-1-3 | libexpat1 | libgbm1 | libglib2.0-0 | libgtk-3-0 | libgtk-4-1 | libnspr4 | libnss3 | libpango-1.0-0 | libudev1 | libvulkan1 | libx11-6 | libxcb1 | libxcomposite1 | libxdamage1 | libxext6 | libxfixes3 | libxkbcommon0 | libxrandr2 | wget | xdg-utils' -filter-with-deps my-mirror-debian

# Download the dependencies for Google Chrome.
aptly mirror update my-mirror-debian

# Other usual commands (snapshots, merging, publishing, serving).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions