AUR web interface

Tasklist

FS#30472 - pkgname or src.tar.gz character limit size

Attached to Project: AUR web interface
Opened by Todd Partridge (Gen2ly) - Thursday, 28 June 2012, 11:04 GMT
Last edited by Lukas Fleischer (lfleischer) - Sunday, 04 November 2012, 11:45 GMT
Task Type Bug Report
Category Backend
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 1.9.1
Due in Version 2.0.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I tried to submit a "makepkg --source" file today, and got this error:

Error - source tarball may not contain files outside a directory.

By trial and error, I discovered that this was due to either the pkgname or source file tarball character limit size. I reduced the pkgname from 52 to 33 characters (gnome-shell-extension-radeon-power-profile-manager to gnome-shell-extension-radeon-ppm) and was able to upload. The error message was a bit confusing, also I spoke about this on the forum (https://bbs.archlinux.org/viewtopic.php?pid=1122679#p1122679) and it appears that the limit can be increased.
This task depends upon

Closed by  Lukas Fleischer (lfleischer)
Sunday, 04 November 2012, 11:45 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 2.0.0.
Comment by canyonknight (canyonknight) - Saturday, 30 June 2012, 18:06 GMT
There is no explicit limit for pkgname length. This is a bug resulting from not handling your .install file properly. I'm testing a fix.

It is related to the full name of your .install file being greater than 99 characters. "gnome-shell-extension-radeon-power-profile-manager/gnome-shell-extension-radeon-power-profile-manager.install" is 109 characters long. "gnome-shell-extension-radeon-ppm/gnome-shell-extension-radeon-ppm.install" works as it is only 73 characters long.

In the 109 character case, Archive_Tar tells pkgsubmit.php that the filename is "gnome-shell-extension-radeon-power-profile-manager.install". Notice the shortened name with no "/". This triggers a broken strchr() check that results in that strange error.
Comment by Todd Partridge (Gen2ly) - Sunday, 01 July 2012, 11:15 GMT
Good bug tracking. Appreciate the feedback canyonknight.
Comment by Lukas Fleischer (lfleischer) - Thursday, 12 July 2012, 06:19 GMT
canyonknight: Sounds like an Archive_Tar bug that should be reported upstream?
Comment by canyonknight (canyonknight) - Thursday, 12 July 2012, 16:25 GMT
Lukas:

I did a bit of probing and found the bug has been fixed upstream [1]. The changelog shows versions of Archive_Tar > 1.3.7 include the prefix functionality [2]. In theory, updating Archive_Tar should fix this. I'll be sending a patch that updates the documentation to require a minimum Archive_Tar version.

One thing I forgot in my initial exploration of this bug is the fact that the DB schema has a 64 character limit on pkgname. It wouldn't affect this particular package but strange things could happen if someone uploads a pkgname longer than what the DB schema allows. I'll send a patch that provides some helpful error messages for pkgnames, pkgurls, pkdescs, licenses, and pkgvers that are longer than what the DB schema allows for.

[1] https://github.com/pear/Archive_Tar/commit/1683c97ec9ae227588f245dc9f1d63cf2cebee8e
[2] http://pear.php.net/package/Archive_Tar/download/1.3.8

Loading...