Issue tracker moved to https://gitlab.archlinux.org/archlinux/aurweb/-/issues
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
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
|
DetailsI 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.
Sunday, 04 November 2012, 11:45 GMT
Reason for closing: Fixed
Additional comments about closing: Fixed in 2.0.0.
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.
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