rpms/rpm/devel rpm-4.7.90-spec-allow-unexpanded-macros.patch, NONE, 1.1 rpm.spec, 1.373, 1.374
Panu Matilainen
pmatilai at fedoraproject.org
Thu Dec 17 06:54:52 UTC 2009
Author: pmatilai
Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv12235
Modified Files:
rpm.spec
Added Files:
rpm-4.7.90-spec-allow-unexpanded-macros.patch
Log Message:
- permit unexpanded macros when parsing spec (#547997)
rpm-4.7.90-spec-allow-unexpanded-macros.patch:
parsePreamble.c | 4 ++--
parseReqs.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--- NEW FILE rpm-4.7.90-spec-allow-unexpanded-macros.patch ---
commit 507f21f6bb4bf7029a0bca255cfe4aae3361f358
Author: Panu Matilainen <pmatilai at redhat.com>
Date: Thu Dec 17 08:43:31 2009 +0200
Permit unexpanded macros to slip through spec tag sanity checks (RhBug:547997)
- For now, let %{} characters through our valid character set checks
on specs. This isn't right really, but unexpanded, unrelated macros
in spec can now cause failure to parse out buildrequires which would
allow those macros to be expanded. This needs a better fix.
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index 82744fd..b5f1780 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -517,13 +517,13 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag,
switch (tag) {
case RPMTAG_NAME:
SINGLE_TOKEN_ONLY;
- if (rpmCharCheck(spec, field, strlen(field), ".-_+") != RPMRC_OK) return RPMRC_FAIL;
+ if (rpmCharCheck(spec, field, strlen(field), ".-_+%{}") != RPMRC_OK) return RPMRC_FAIL;
headerPutString(pkg->header, tag, field);
break;
case RPMTAG_VERSION:
case RPMTAG_RELEASE:
SINGLE_TOKEN_ONLY;
- if (rpmCharCheck(spec, field, strlen(field), "._+") != RPMRC_OK) return RPMRC_FAIL;
+ if (rpmCharCheck(spec, field, strlen(field), "._+%{}") != RPMRC_OK) return RPMRC_FAIL;
headerPutString(pkg->header, tag, field);
break;
case RPMTAG_URL:
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 1a657a6..d12aca3 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -168,7 +168,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTag tagN,
}
EVR = xmalloc((ve-v) + 1);
rstrlcpy(EVR, v, (ve-v) + 1);
- if (rpmCharCheck(spec, EVR, ve-v, ".-_+:")) goto exit;
+ if (rpmCharCheck(spec, EVR, ve-v, ".-_+:%{}")) goto exit;
re = ve; /* ==> next token after EVR string starts here */
} else
EVR = NULL;
Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.373
retrieving revision 1.374
diff -u -p -r1.373 -r1.374
--- rpm.spec 9 Dec 2009 13:16:52 -0000 1.373
+++ rpm.spec 17 Dec 2009 06:54:51 -0000 1.374
@@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
-Release: 0.%{snapver}.3
+Release: 0.%{snapver}.4
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -39,6 +39,7 @@ Patch3: rpm-4.7.90-fedora-specspo.patch
# Patches already in upstream
Patch200: rpm-4.7.90-python-bytecompile.patch
Patch201: rpm-4.7.90-python-refcounts.patch
+Patch202: rpm-4.7.90-spec-allow-unexpanded-macros.patch
# These are not yet upstream
Patch301: rpm-4.6.0-niagara.patch
@@ -185,6 +186,7 @@ packages on a system.
%patch200 -p1 -b .python-bytecompile
%patch201 -p1 -b .python-refcounts
+%patch202 -p1 -b .spec-unexpanded-macros
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@@ -399,6 +401,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
+* Thu Dec 17 2009 Panu Matilainen <pmatilai at redhat.com> - 4.8.0-0.beta1.4
+- permit unexpanded macros when parsing spec (#547997)
+
* Wed Dec 09 2009 Panu Matilainen <pmatilai at redhat.com> - 4.8.0-0.beta1.3
- fix a bunch of python refcount-errors causing major memory leaks
More information about the fedora-extras-commits
mailing list