You are not logged in.

#1 2016-09-21 07:24:23

klingt.net
Member
Registered: 2014-03-10
Posts: 25

Can't update repo because source URL is too long

Today I wanted to update caddy-full-bin to 0.9.2 which adds a number of extensions to the source URL.
Unfortunately, I can't push the updated repo to the AUR because the .SRCINFO check fails:

remote: Traceback (most recent call last):
remote:   File "hooks/update", line 389, in <module>
remote:     save_metadata(metadata, conn, user)
remote:   File "hooks/update", line 135, in save_metadata
remote:     [pkgid, source_info['value'], source_info['arch']])
remote:   File "/srv/http/vhosts/aur.archlinux.org/public/git-interface/db.py", line 43, in execute
remote:     cur.execute(query, params)
remote:   File "/usr/lib/python3.5/site-packages/mysql/connector/cursor.py", line 515, in execute
remote:     self._handle_result(self._connection.cmd_query(stmt))
remote:   File "/usr/lib/python3.5/site-packages/mysql/connector/connection.py", line 488, in cmd_query
remote:     result = self._handle_result(self._send_cmd(ServerCmd.QUERY, query))
remote:   File "/usr/lib/python3.5/site-packages/mysql/connector/connection.py", line 395, in _handle_result
remote:     raise errors.get_exception(packet)
remote: mysql.connector.errors.DataError: 1406 (22001): Data too long for column 'Source' at row 1
remote: error: hook declined to update refs/heads/master
To git+ssh://aur.archlinux.org/caddy-full-bin.git

It looks like this can't be fixed without altering the database schema by changing the column width.
The .SRCINFO in question looks like this:

# Generated by mksrcinfo v8
# Wed Sep 21 07:14:28 UTC 2016
pkgbase = caddy-full-bin
	pkgdesc = A configurable, general-purpose HTTP/2 web server for any platform (All features enabled)
	pkgver = 0.9.2
	pkgrel = 1
	url = https://caddyserver.com
	install = caddy-full-bin.install
	arch = i686
	arch = x86_64
	arch = armv7h
	arch = aarch64
	license = Apache
	provides = caddy
	conflicts = caddy
	conflicts = caddy-git
	conflicts = caddy-all-features
	source_i686 = caddy.tar.gz::https://caddyserver.com/download/build?os=linux&features=awslambda,cors,filemanager,git,hugo,ipfilter,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload,cloudflare,digitalocean,dnsimple,dyn,gandi,googlecloud,namecheap,rfc2136,route53,vultr&arch=386
	md5sums_i686 = SKIP
	source_x86_64 = caddy.tar.gz::https://caddyserver.com/download/build?os=linux&features=awslambda,cors,filemanager,git,hugo,ipfilter,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload,cloudflare,digitalocean,dnsimple,dyn,gandi,googlecloud,namecheap,rfc2136,route53,vultr&arch=amd64
	md5sums_x86_64 = SKIP
	source_armv7h = caddy.tar.gz::https://caddyserver.com/download/build?os=linux&features=awslambda,cors,filemanager,git,hugo,ipfilter,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload,cloudflare,digitalocean,dnsimple,dyn,gandi,googlecloud,namecheap,rfc2136,route53,vultr&arch=arm
	md5sums_armv7h = SKIP
	source_aarch64 = caddy.tar.gz::https://caddyserver.com/download/build?os=linux&features=awslambda,cors,filemanager,git,hugo,ipfilter,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload,cloudflare,digitalocean,dnsimple,dyn,gandi,googlecloud,namecheap,rfc2136,route53,vultr&arch=arm64
	md5sums_aarch64 = SKIP

pkgname = caddy-full-bin

Offline

#2 2016-09-21 08:00:21

a821
Member
Registered: 2012-10-31
Posts: 381

Re: Can't update repo because source URL is too long

Edit: this doesn't work. see posts below.

I went to the site and found out that this shorter URL works (I didn't try with all platforms)

$ curl "https://caddyserver.com/download/build?os=linux&arch=amd64" > caddy.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 4700k    0 4700k    0     0   487k      0 --:--:--  0:00:09 --:--:-- 1139k

No idea about the AUR error though.

Last edited by a821 (2016-09-21 09:15:24)

Offline

#3 2016-09-21 08:14:13

klingt.net
Member
Registered: 2014-03-10
Posts: 25

Re: Can't update repo because source URL is too long

The shorter URL will download a caddy build /wo extensions because they have to be specified explicitly.

Offline

#4 2016-09-21 09:13:33

a821
Member
Registered: 2012-10-31
Posts: 381

Re: Can't update repo because source URL is too long

OK. I missed the part where you select the features :-)

An obvious workaround will be using a URL shortener. Also try asking in the AUR mailing list,

Offline

#5 2016-09-21 09:23:34

klingt.net
Member
Registered: 2014-03-10
Posts: 25

Re: Can't update repo because source URL is too long

I've send a message to the AUR mailing list.
The idea using an URL shortener is convenient but I would not like to use it because of security concerns.

Offline

#6 2016-09-21 11:51:44

klingt.net
Member
Registered: 2014-03-10
Posts: 25

Re: Can't update repo because source URL is too long

Even worse, the server published the old PKGBUILD as new version while crashing on the source URL check and claiming to reject the push.
This is an AUR bug.

Offline

#7 2016-09-21 14:15:48

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Can't update repo because source URL is too long

What if you quote the url?

source_i686 = "caddy.tar.gz::https://caddyserver.com/download/build?os=linux&features=awslambda,cors,filemanager,git,hugo,ipfilter,jwt,locale,mailout,minify,multipass,prometheus,ratelimit,realip,search,upload,cloudflare,digitalocean,dnsimple,dyn,gandi,googlecloud,namecheap,rfc2136,route53,vultr&arch=386"

R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#8 2016-09-21 14:28:00

klingt.net
Member
Registered: 2014-03-10
Posts: 25

Re: Can't update repo because source URL is too long

Quoted URLs doesn't solve the problem.
EDIT: I've tested it.

Last edited by klingt.net (2016-09-21 14:28:33)

Offline

#9 2016-09-21 17:25:28

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: Can't update repo because source URL is too long

Post full pkgbuild so others can test. What if instead of double quotes you use single quotes?


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2016-09-21 20:01:25

klingt.net
Member
Registered: 2014-03-10
Posts: 25

Re: Can't update repo because source URL is too long

Offline

Board footer

Powered by FluxBB