Blacklisting with aplty filters does not work

17 views
Skip to first unread message

Ascenion 24

unread,
Nov 28, 2023, 7:06:16 AM11/28/23
to aptly-discuss
Hi, I'm trying to mirror ubuntu universe, but both Packages are blocked by the infrastructure.


I tried and tons of other solutuions, no luck:

aptly mirror create -architectures=amd64 -filter="!(Name (% *masscan*))" -filter-with-deps jammy-main2 http://archive.ubuntu.com/ubuntu jammy main restricted universe

aptly mirror create -architectures=amd64 -filter='!(Name (~ .*massscan.*)),!(Name (~ .*pnscan.*)),!(Name (~ .*price.app.*)),!(Name (~ .*libclanlib.*))' -filter-with-deps jammy-main2 http://archive.ubuntu.com/ubuntu jammy main restricted universe

aptly mirror create -architectures=amd64 -filter='!(Name (= masscan_1.3.2+ds1-1_amd64.deb)),!(Name (= pnscan_1.14.1-1_amd64.deb)), !(Name (~ .*price.app.*)),!(Name (~ .*libclanlib.*))' -filter-with-deps jammy-main2 http://archive.ubuntu.com/ubuntu jammy main restricted universe


What am I doing wrong ?

Best regards

Pablo DePaulis

unread,
Dec 14, 2023, 1:04:51 PM12/14/23
to aptly-discuss
I guess you are trying to create a mirror but only with a subset of packages and their dependencies.
I think the issue in your query is the comma for one thing, should be the OR '|' instead.
This one worked for me, filtering for only two packages from component main of bookworm

$ aptly mirror create -architectures="amd64,all" -filter="$name (php)|$name (fail2ban)" -filter-with-deps  bookworm-main http://deb.debian.org/debian/ bookworm main

Note that I used "$name" instead of your !Name syntax and the OR
Just to show what happened, this is what got mirrored w/o the dependencies:

Note: haven't played with versions though since I don't have that requirement

$ aptly mirror create -architectures="amd64,all" -filter="$name (php)|$name (fail2ban)" bookworm-main http://deb.debian.org/debian/ bookworm main

$ aptly mirror update bookworm-main

...

Success downloading http://deb.debian.org/debian/pool/main/p/php8.2/php8.2_8.2.7-1~deb12u1_all.deb

Success downloading http://deb.debian.org/debian/pool/main/p/php-defaults/php_8.2+93_all.deb

Success downloading http://deb.debian.org/debian/pool/main/u/uwsgi-plugin-php/uwsgi-plugin-php_2.0.21+4+0.0.15_amd64.deb

Success downloading http://deb.debian.org/debian/pool/main/f/fail2ban/fail2ban_1.0.2-2_all.deb

Mirror `bookworm-main` has been successfully updated.

Hope this helps a bit...

Reply all
Reply to author
Forward
0 new messages