Share

pkgbuild

Tracker: Bugs

5 Regex characters need quoting - ID: 1786439
Last Update: Comment added ( nobody )

On line 1110 of pkgbuild.pl, the package name is matched against. If it
contains regex metacharacters like +.[] Perl can complain. Specifically,
when I attempted to build a package named libsigc++, Perl died with an
error:
Nested quantifiers in regex; marked by <-- HERE in
m/^/var/tmp/pkgbuild-will/libsigc++ <-- HERE -2.0.17-build/ at
/usr/bin/../lib/pkgbuild-1.2.0/pkgbuild.pl line 1112.

I modified the pkgbuild.pl file like this:
$protoline = "v $class_name $relpath=/dev/null $mode $user
$group";
} elsif ($type eq 's') {
my $linkpoint = readlink ($fname);
my $reg = $buildroot;
$reg =~ s/[\+\*\[\]\(\)]/\\\1/g;
if ($linkpoint =~ /^$reg/) {
fatal ("ERROR: /$fname is an absolute symlink that points to
\$RPM_BUILD_ROOT");
} elsif ($linkpoint =~ /^\//) {


Nobody/Anonymous ( nobody ) - 2007-09-01 21:23

5

Closed

Fixed

Laszlo (Laca) Peter

general

None

Public


Comments ( 12 )




Date: 2009-03-22 06:36
Sender: nobody

rjVaMk <a href="http://lkdjvtsrbqip.com/">lkdjvtsrbqip</a>,
[url=http://siqopzybkqpc.com/]siqopzybkqpc[/url],
[link=http://yrnmuexbmreb.com/]yrnmuexbmreb[/link],
http://xqlsvoiwjech.com/


Date: 2008-12-06 07:42
Sender: nobody

L372jm <a href="http://hfuqldxjhrbo.com/">hfuqldxjhrbo</a>,
[url=http://swyaolazoojx.com/]swyaolazoojx[/url],
[link=http://qfewnyxrtsiw.com/]qfewnyxrtsiw[/link],
http://lqwziyftzchq.com/


Date: 2008-12-04 22:53
Sender: nobody

eMbCAX <a href="http://atisilndqkfl.com/">atisilndqkfl</a>,
[url=http://alohfbnvsubb.com/]alohfbnvsubb[/url],
[link=http://gmgdaxdjmpim.com/]gmgdaxdjmpim[/link],
http://xbesdovxrjmx.com/


Date: 2008-11-25 19:37
Sender: nobody

GxnqU7 <a href="http://xjortqlatprx.com/">xjortqlatprx</a>,
[url=http://ueukewouylem.com/]ueukewouylem[/url],
[link=http://owkqwlqypwkr.com/]owkqwlqypwkr[/link],
http://jkkyyrgujqaw.com/


Date: 2008-11-20 00:29
Sender: nobody

DcHnea <a href="http://zpiuhbcostob.com/">zpiuhbcostob</a>,
[url=http://qrubndmitjut.com/]qrubndmitjut[/url],
[link=http://nnombyrmhntk.com/]nnombyrmhntk[/link],
http://sqfjmwqjgzhk.com/


Date: 2008-10-03 19:14
Sender: nobody

fE0gam <a href="http://xgdjmgipfxmv.com/">xgdjmgipfxmv</a>,
[url=http://zbxisnmruqzo.com/]zbxisnmruqzo[/url],
[link=http://nfcqlowslctb.com/]nfcqlowslctb[/link],
http://lindkavkcxri.com/


Date: 2008-10-03 07:07
Sender: nobody

o1Ctvo <a href="http://vzgwiizqcrau.com/">vzgwiizqcrau</a>,
[url=http://mdjrrijhejht.com/]mdjrrijhejht[/url],
[link=http://udnpvfvhefvy.com/]udnpvfvhefvy[/link],
http://fcpcctokrymp.com/


Date: 2008-09-27 03:59
Sender: nobody

8Zo44D <a href="http://aaollgioqcvd.com/">aaollgioqcvd</a>,
[url=http://rykbpyluqmjr.com/]rykbpyluqmjr[/url],
[link=http://yvgqdgbdkorh.com/]yvgqdgbdkorh[/link],
http://mvzfkvqpgxgm.com/


Date: 2008-06-02 18:39
Sender: nobody

Logged In: NO

hdgLhq <a href="http://fhdzfrgtbiig.com/">fhdzfrgtbiig</a>,
[url=http://sccdjsnxwjhd.com/]sccdjsnxwjhd[/url],
[link=http://mwafamyzksbs.com/]mwafamyzksbs[/link],
http://lddarmqspfzf.com/


Date: 2008-06-02 06:30
Sender: nobody

Logged In: NO

j95eE5 <a href="http://ngmfiltqyqku.com/">ngmfiltqyqku</a>,
[url=http://ehunmlgvzjfr.com/]ehunmlgvzjfr[/url],
[link=http://eiebfjhfxgsd.com/]eiebfjhfxgsd[/link],
http://tbkjftzmcwtb.com/


Date: 2008-01-06 09:18
Sender: laca_Project Admin


Thanks for the patch, committed with minor changes.


Date: 2007-09-01 22:20
Sender: nobody

Logged In: NO

Update: The above doesn't work. Here's a patch that does:
diff pkgbuild.pl.orig pkgbuild.pl
425a426,427
> my $re_quoted_pkg = $pkg;
> $re_quoted_pkg =~ s/([\+\*\(\)\[\]])/\\$1/g;
434c436,437
< if ($dep =~ /^$pkg\s*(=|<=|=<|>=|=>)\s*(\S*),REV=(\S*)\s*$/) {
---
>
> if ($dep =~
/^$re_quoted_pkg\s*(=|<=|=<|>=|=>)\s*(\S*),REV=(\S*)\s*$/) {
447c450
< } elsif ($dep =~ /^$pkg\s*(=|<=|=<|>=|=>)\s*(\S*)\s*$/) {
---
> } elsif ($dep =~ /^$re_quoted_pkg\s*(=|<=|=<|>=|=>)\s*(\S*)\s*$/) {
456c459
< } elsif ($dep =~ /^$pkg\s*(=S|<=S|=<S|>=S|=>S)\s*(\S*)\s*$/) {
---
> } elsif ($dep =~
/^$re_quoted_pkg\s*(=S|<=S|=<S|>=S|=>S)\s*(\S*)\s*$/) {
465c468
< } elsif ($dep =~ /^$pkg\s*$/) {
---
> } elsif ($dep =~ /^$re_quoted_pkg\s*$/) {
1110c1113,1115
< if ($linkpoint =~ /^$buildroot/) {
---
> my $reg = $buildroot;
> $reg =~ s/([\+\*\[\]\(\)])/\\$1/g;
> if ($linkpoint =~ /^$reg/) {



Log in to comment.




Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2008-01-06 09:18 laca_
resolution_id None 2008-01-06 09:18 laca_
close_date - 2008-01-06 09:18 laca_