OBS User unknown 2007-05-25 15:22:10 +00:00 committed by Git OBS Bridge
parent bde43395ac
commit 531e464c17
11 changed files with 168 additions and 17 deletions

View File

@ -1,9 +1,10 @@
Build convertdb1 as static binary so that it always works.
Build convertdb1, too.
diff -ur ./tools/Makefile.am ../rpm-4.4.2.orig/tools/Makefile.am
--- ./tools/Makefile.am 2006-09-21 19:35:56.000000000 +0200
+++ ../rpm-4.4.2.orig/tools/Makefile.am 2006-09-21 20:59:01.000000000 +0200
@@ -18,22 +18,26 @@
Index: tools/Makefile.am
===================================================================
--- tools/Makefile.am.orig
+++ tools/Makefile.am
@@ -18,22 +18,26 @@ INCLUDES = -I. \
EXTRA_DIST = rpminject.c rpmsort.c rpmxml.c rpmxp.c rpmxp.h hashtab.h
@ -26,7 +27,7 @@ diff -ur ./tools/Makefile.am ../rpm-4.4.2.orig/tools/Makefile.am
bin_PROGRAMS = rpmgraph
convertdb1_SOURCES = convertdb1.c
+convertdb1_LDFLAGS = $(staticLDFLAGS)
+#convertdb1_LDFLAGS = $(staticLDFLAGS)
+convertdb1_LDADD = \
+ $(top_builddir)/lib/librpm.la \
+ @WITH_LIBELF_LIB@

View File

@ -272,17 +272,19 @@ Index: lib/query.c
if ((rc = qva->qva_showPackage(qva, ts, h)) != 0)
ec = rc;
if (qva->qva_source == RPMQV_DBOFFSET)
@@ -685,7 +708,15 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A
@@ -685,7 +708,17 @@ int rpmcliArgIter(rpmts ts, QVA_t qva, A
switch (qva->qva_source) {
case RPMQV_ALL:
- qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0);
+ if ((!argv || !*argv) && (qva->qva_flags & QUERY_FOR_PATCHES) != 0) {
+ qva->qva_gi = rpmgiNew(ts, RPMTAG_REQUIRENAME, "rpmlib(PatchRPMs)", 0);
+ qva->qva_gi->mi = rpmtsInitIterator(qva->qva_gi->ts, qva->qva_gi->tag, qva->qva_gi->keyp, qva->qva_gi->keylen);
+ if (qva->qva_gi->mi == NULL) {
+ rpmError(RPMERR_QUERYINFO, _("no patch-rpm installed\n"));
+ break;
+ }
+ qva->qva_gi->mi = rpmdbFreeIterator(qva->qva_gi->mi);
+ } else {
+ qva->qva_gi = rpmgiNew(ts, RPMDBI_PACKAGES, NULL, 0);
+ }

41
perlprov.diff Normal file
View File

@ -0,0 +1,41 @@
Index: scripts/perl.prov
===================================================================
--- scripts/perl.prov.orig
+++ scripts/perl.prov
@@ -127,7 +127,11 @@ sub process_file {
if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
$package=$1;
undef $version;
- $require{$package}=undef;
+ if ($package eq 'main') {
+ undef $package;
+ } else {
+ $require{$package}=undef;
+ }
}
# after we found the package name take the first assignment to
@@ -158,7 +162,7 @@ sub process_file {
$version= $1;
}
- $require{$package}=$version;
+ $require{$package} ||= $version;
}
# Allow someone to have a variable that defines virtual packages
Index: scripts/perldeps.pl
===================================================================
--- scripts/perldeps.pl.orig
+++ scripts/perldeps.pl
@@ -150,6 +150,10 @@ sub add_provide {
return if(exists($self->{'provides_check'}->{$params{'-provide'}}));
#
+ # Skip some common false positives
+ return if $params{'-provide'} eq 'main';
+
+ #
# Created dependency object
my $dep = new Dependency "provide", $params{-provide};
$dep->filename($params{-filename});

13
pythonunicode.diff Normal file
View File

@ -0,0 +1,13 @@
Index: python/rpmts-py.c
===================================================================
--- python/rpmts-py.c.orig
+++ python/rpmts-py.c
@@ -1367,7 +1367,7 @@ fprintf(stderr, "*** rpmts_Match(%p) ts
if (Key) {
/*@-branchstate@*/
- if (PyString_Check(Key)) {
+ if (PyString_Check(Key) || PyUnicode_Check(Key)) {
key = PyString_AsString(Key);
len = PyString_Size(Key);
} else if (PyInt_Check(Key)) {

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri May 25 16:20:53 CEST 2007 - mls@suse.de
- fix unicode queries
-------------------------------------------------------------------
Fri Mar 30 15:06:28 CEST 2007 - rguenther@suse.de

View File

@ -16,7 +16,7 @@ License: GNU General Public License (GPL)
Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages
Version: 4.4.2
Release: 117
Release: 122
Requires: rpm = %{version}
%py_requires
@ -62,6 +62,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/python*
%changelog
* Fri May 25 2007 - mls@suse.de
- fix unicode queries
* Fri Mar 30 2007 - rguenther@suse.de
- add ncurses-devel and zlib-devel BuildRequires.
* Wed Oct 18 2006 - mls@suse.de

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri May 25 16:18:07 CEST 2007 - mls@suse.de
- fix patch-rpm query
- do not link convertdb1 statically [#274694]
- use --wildcards option for tar [#272519]
- fix perl.prov [#255009]
- show pre/posttrans scripts in --scripts query [#253620]
- remove popt version requires [#246871]
- fix missing file error
-------------------------------------------------------------------
Wed May 16 12:16:44 CEST 2007 - mls@suse.de

View File

@ -16,11 +16,11 @@ Group: System/Packages
BuildRequires: libbz2-devel ncurses-devel zlib-devel
Provides: rpminst
%define popt_version 1.7
PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permissions
PreReq: %insserv_prereq %fillup_prereq permissions
Autoreqprov: on
Summary: The RPM Package Manager
Version: 4.4.2
Release: 107
Release: 110
Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
@ -121,6 +121,10 @@ Patch91: po-file-fixes.diff
Patch92: files.diff
Patch93: popt-to-lib.diff
Patch94: debugedit-comp-dir.diff
Patch95: pythonunicode.diff
Patch96: tarwildcards.diff
Patch97: perlprov.diff
Patch98: showtransscripts.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -190,7 +194,7 @@ rm -f rpmdb/db.h
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89
%patch -P 90 -P 91 -P 92 -P 93 -P 94
%patch -P 90 -P 91 -P 92 -P 93 -P 94 -P 95 -P 96 -P 97 -P 98
chmod 755 scripts/find-supplements{,.ksyms}
chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
tar -xjvf %{SOURCE1}
@ -321,7 +325,7 @@ Summary: A C library for parsing command line parameters
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: System/Libraries
Version: 1.7
Release: 335
Release: 338
#
%description -n popt
@ -344,7 +348,7 @@ Summary: C Library for Parsing Command Line Parameters
License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: System/Libraries
Version: 1.7
Release: 335
Release: 338
Requires: popt = 1.7
Requires: glibc-devel
@ -380,6 +384,14 @@ Authors:
%doc %{_mandir}/man3/popt.3*
%changelog
* Fri May 25 2007 - mls@suse.de
- fix patch-rpm query
- do not link convertdb1 statically [#274694]
- use --wildcards option for tar [#272519]
- fix perl.prov [#255009]
- show pre/posttrans scripts in --scripts query [#253620]
- remove popt version requires [#246871]
- fix missing file error
* Wed May 16 2007 - mls@suse.de
- fix autodeps.diff mono logic
* Mon May 14 2007 - coolo@suse.de

49
showtransscripts.diff Normal file
View File

@ -0,0 +1,49 @@
Index: rpmpopt.in
===================================================================
--- rpmpopt.in.orig
+++ rpmpopt.in
@@ -33,6 +33,14 @@ rpm alias --scripts --qf '\
{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
\
%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
+\
+%|PRETRANS?{pretrans scriptlet\
+%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\
+{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\
+\
+%|POSTTRANS?{posttrans scriptlet\
+%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\
+{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\
' \
--POPTdesc=$"list install/erase scriptlets from package(s)"
@@ -343,6 +351,14 @@ rpmq alias --scripts --qf '\
{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
\
%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
+\
+%|PRETRANS?{pretrans scriptlet\
+%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\
+{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\
+\
+%|POSTTRANS?{posttrans scriptlet\
+%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\
+{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\
' \
--POPTdesc=$"list install/erase scriptlets from package(s)"
@@ -462,6 +478,14 @@ rpmquery alias --scripts --qf '\
{%|POSTUNPROG?{postuninstall program: %{POSTUNPROG}\n}|}|\
\
%|VERIFYSCRIPT?{verify scriptlet:\n%{VERIFYSCRIPT}\n}|\
+\
+%|PRETRANS?{pretrans scriptlet\
+%|PRETRANSPROG?{ (using %{PRETRANSPROG})}|:\n%{PRETRANS}\n}:\
+{%|PRETRANSPROG?{pretrans program: %{PRETRANSPROG}\n}|}|\
+\
+%|POSTTRANS?{posttrans scriptlet\
+%|POSTTRANSPROG?{ (using %{POSTTRANSPROG})}|:\n%{POSTTRANS}\n}:\
+{%|POSTTRANSPROG?{posttrans program: %{POSTTRANSPROG}\n}|}|\
' \
--POPTdesc=$"list install/erase scriptlets from package(s)"

13
tarwildcards.diff Normal file
View File

@ -0,0 +1,13 @@
Index: build.c
===================================================================
--- build.c.orig
+++ build.c
@@ -161,7 +161,7 @@ static int buildForTarget(rpmts ts, cons
/* Try again */
(void) pclose(fp);
- sprintf(cmd, "%s < %s | tar xOvf - \\*.spec 2>&1 > %s",
+ sprintf(cmd, "%s < %s | tar xOvf - --wildcards \\*.spec 2>&1 > %s",
zcmds[res & 0x3], arg, tmpSpecFile);
if (!(fp = popen(cmd, "r"))) {
rpmError(RPMERR_POPEN, _("Failed to open tar pipe: %m\n"));

View File

@ -1,12 +1,14 @@
Tell user the reason why the lstat failed in a verify operation.
--- ./lib/verify.c.orig 2005-12-15 15:17:41.000000000 +0000
+++ ./lib/verify.c 2005-12-15 15:24:48.000000000 +0000
Index: lib/verify.c
===================================================================
--- lib/verify.c.orig
+++ lib/verify.c
@@ -327,6 +327,10 @@ static int verifyHeader(QVA_t qva, const
(fileAttrs & RPMFILE_README) ? 'r' : ' '),
rpmfiFN(fi));
te += strlen(te);
+ if ((rc & RPMVERIFY_LSTATFAIL) != 0) {
+ if ((verifyResult & RPMVERIFY_LSTATFAIL) != 0 && errno != ENOENT) {
+ sprintf(te, " (%s)", strerror(errno));
+ te += strlen(te);
+ }