- update to 4.8.0 final

This commit is contained in:
Panu Matilainen 2010-01-08 09:42:34 +00:00
parent fb64f7cd5d
commit 6cc39b9acc
6 changed files with 8 additions and 155 deletions

View File

@ -1 +1 @@
rpm-4.8.0-beta1.tar.bz2
rpm-4.8.0.tar.bz2

View File

@ -1,30 +0,0 @@
commit 3ffc0373c4db9824a72a6356d04d862e51f42be0
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Tue Dec 8 15:58:51 2009 +0200
Avoid noise from python bytecompile on non-python pkgs (RhBug:539635)
- If a pattern doesn't match, we'd prefer an empty list instead of
unexpanded garbage thank you... nullglob shell option is just what the
doctor ordered but unfortunately its a bash-specific thing. Otoh there
are number of other bash-specific scripts in rpm so probably not
much of an issue...
(cherry picked from commit d6bda5a1665d8d04526aea299781570ee7486b2e)
diff --git a/scripts/brp-python-bytecompile b/scripts/brp-python-bytecompile
index 1faa6db..9fac5a7 100644
--- a/scripts/brp-python-bytecompile
+++ b/scripts/brp-python-bytecompile
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# If using normal root, avoid changing anything.
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
@@ -32,6 +32,7 @@ fi
# For example, below /usr/lib/python2.6/, we're targetting /usr/bin/python2.6
# and below /usr/lib/python3.1/, we're targetting /usr/bin/python3.1
+shopt -s nullglob
for python_libdir in $RPM_BUILD_ROOT/usr/lib*/python*/ ;
do
python_binary=/usr/bin/$(basename $python_libdir)

View File

@ -1,70 +0,0 @@
diff --git a/python/header-py.c b/python/header-py.c
index 0416058..539db0d 100644
--- a/python/header-py.c
+++ b/python/header-py.c
@@ -139,7 +139,9 @@ static PyObject * hdrKeyList(hdrObject * s)
rpmTag tag;
while ((tag = headerNextTag(hi)) != RPMTAG_NOT_FOUND) {
- PyList_Append(keys, PyInt_FromLong(tag));
+ PyObject *to = PyInt_FromLong(tag);
+ PyList_Append(keys, to);
+ Py_DECREF(to);
}
headerFreeIterator(hi);
diff --git a/python/rpmtd-py.c b/python/rpmtd-py.c
index eef35fe..1ba3a3d 100644
--- a/python/rpmtd-py.c
+++ b/python/rpmtd-py.c
@@ -46,7 +46,9 @@ PyObject *rpmtd_AsPyobj(rpmtd td)
if (array) {
res = PyList_New(0);
while (rpmtdNext(td) >= 0) {
- PyList_Append(res, rpmtd_ItemAsPyobj(td, class));
+ PyObject *item = rpmtd_ItemAsPyobj(td, class);
+ PyList_Append(res, item);
+ Py_DECREF(item);
}
} else {
res = rpmtd_ItemAsPyobj(td, class);
diff --git a/python/rpmts-py.c b/python/rpmts-py.c
index f774818..745b526 100644
--- a/python/rpmts-py.c
+++ b/python/rpmts-py.c
@@ -351,6 +351,7 @@ rpmts_HdrFromFdno(rpmtsObject * s, PyObject *arg)
if (rpmrc == RPMRC_OK) {
ho = hdr_Wrap(&hdr_Type, h);
+ h = headerFree(h); /* ref held by python object */
} else {
Py_INCREF(Py_None);
ho = Py_None;
@@ -518,6 +519,7 @@ rpmts_Problems(rpmtsObject * s)
while (rpmpsNextIterator(psi) >= 0) {
PyObject *prob = rpmprob_Wrap(&rpmProblem_Type, rpmpsGetProblem(psi));
PyList_Append(problems, prob);
+ Py_DECREF(prob);
}
rpmpsFreeIterator(psi);
rpmpsFree(ps);
diff --git a/python/spec-py.c b/python/spec-py.c
index e162bb3..f5a4b33 100644
--- a/python/spec-py.c
+++ b/python/spec-py.c
@@ -177,6 +177,7 @@ static PyObject * spec_get_sources(specObject *s, void *closure)
PyObject *srcUrl = Py_BuildValue("(sii)", source->fullSource,
source->num, source->flags);
PyList_Append(sourceList, srcUrl);
+ Py_DECREF(srcUrl);
}
return sourceList;
@@ -192,6 +193,7 @@ static PyObject * spec_get_packages(specObject *s, void *closure)
for (pkg = spec->packages; pkg; pkg = pkg->next) {
PyObject *po = specPkg_Wrap(&specPkg_Type, pkg);
PyList_Append(pkgList, po);
+ Py_DECREF(po);
}
return pkgList;
}

View File

@ -1,43 +0,0 @@
commit 507f21f6bb4bf7029a0bca255cfe4aae3361f358
Author: Panu Matilainen <pmatilai@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;

View File

@ -12,8 +12,8 @@
%define rpmhome /usr/lib/rpm
%define rpmver 4.8.0
%define snapver beta1
%define srcver %{rpmver}-%{snapver}
%define snapver %{nil}
%define srcver %{rpmver}
%define bdbver 4.8.24
%define dbprefix db
@ -21,7 +21,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
Release: 0.%{snapver}.6
Release: 1
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@ -37,9 +37,6 @@ Patch2: rpm-4.5.90-gstreamer-provides.patch
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
@ -184,10 +181,6 @@ packages on a system.
%patch2 -p1 -b .gstreamer-prov
%patch3 -p1 -b .fedora-specspo
%patch200 -p1 -b .python-bytecompile
%patch201 -p1 -b .python-refcounts
%patch202 -p1 -b .spec-unexpanded-macros
%patch301 -p1 -b .niagara
%patch302 -p1 -b .geode
@ -401,6 +394,9 @@ exit 0
%doc doc/librpm/html/*
%changelog
* Fri Jan 08 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-1
- update to 4.8.0 final (http://rpm.org/wiki/Releases/4.8.0)
* Thu Jan 07 2010 Panu Matilainen <pmatilai@redhat.com> - 4.8.0-0.beta1.6
- pull out macro scoping "fix" for now, it breaks font package macros

View File

@ -1 +1 @@
dfe8f6b28d85b85b66ddacf712904fc1 rpm-4.8.0-beta1.tar.bz2
04b586910243cb2475ac16becd862731 rpm-4.8.0.tar.bz2