You are not logged in.

#1 2023-09-26 21:46:32

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

[Solved, workaroud] Pacman, package names with + and S3

I have a custom repo hosted as a bucket on Amazon S3.

Turns out pacman -S is unable to download packages from S3 whose filename contains a +.

Example: `avahi-1:0.8+r127+g55d783d-1-x86_64.pkg.tar.zst`

It appears that pacman does not escape the pluses in the URL, while the S3 http frontend expects those to be escaped. Reading RFC 3986, pacman appears to be in the right here ("+" is in the list of "sub-delims" which are valid unescaped for "pchars" in "paths").

The download URL for the package as shown on aws.amazon.com/s3 ends is .../avahi-1%3A0.8%2Br127%2Bg55d783d-1-x86_64.pkg.tar.zst  . Replacing the %3A with colon still works, but not the %2B.


Anybody else have that problem, or have any good ideas what to do here?

Last edited by jernst (2023-09-27 20:30:54)

Offline

#2 2023-09-27 07:48:56

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,809

Offline

#3 2023-09-27 16:15:10

jernst
Member
From: Silicon Valley
Registered: 2014-03-04
Posts: 303
Website

Re: [Solved, workaroud] Pacman, package names with + and S3

Ha! I hadn't known about that option.

curl -o $2 $( echo $1 | sed -e 's!+!%2B!g')

in a separate shell script seems to do the trick.

Offline

#4 2023-09-27 16:24:16

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,809

Re: [Solved, workaroud] Pacman, package names with + and S3

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB