From a8b744d4aeea0db612df50cfae1c992cec27f06db5c2d32ca8732417a54757f4 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 9 Jan 2012 16:12:23 +0000 Subject: [PATCH 1/9] - add a python3-rpm subspecfile OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=171 --- python3-abi-kind.diff | 11 ++++++ python3-rpm.spec | 83 +++++++++++++++++++++++++++++++++++++++++++ rpm-python.spec | 1 + rpm.changes | 5 +++ rpm.spec | 5 ++- 5 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 python3-abi-kind.diff create mode 100644 python3-rpm.spec diff --git a/python3-abi-kind.diff b/python3-abi-kind.diff new file mode 100644 index 0000000..5ed4310 --- /dev/null +++ b/python3-abi-kind.diff @@ -0,0 +1,11 @@ +--- configure.ac ++++ configure.ac +@@ -537,7 +537,7 @@ + ]) + CPPFLAGS="$save_CPPFLAGS" + save_LIBS="$LIBS" +- AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION} python],[ ++ AC_SEARCH_LIBS([Py_Main],[python${PYTHON_VERSION}mu python${PYTHON_VERSION} python],[ + WITH_PYTHON_LIB="$ac_res" + ],[AC_MSG_ERROR([missing python library]) + ]) diff --git a/python3-rpm.spec b/python3-rpm.spec new file mode 100644 index 0000000..e0c01e5 --- /dev/null +++ b/python3-rpm.spec @@ -0,0 +1,83 @@ +# +# spec file for package python3-rpm +# +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: python3-rpm +BuildRequires: file-devel +BuildRequires: libacl-devel +BuildRequires: libbz2-devel +BuildRequires: libcap-devel +BuildRequires: libelf-devel +BuildRequires: libselinux-devel +BuildRequires: libsemanage-devel +BuildRequires: libtool +BuildRequires: lua51-devel +BuildRequires: ncurses-devel +BuildRequires: popt-devel +BuildRequires: python3-devel +BuildRequires: xz-devel +BuildRequires: zlib-devel +#!BuildIgnore: rpmlint-Factory +Summary: Python Bindings for Manipulating RPM Packages +License: GPL-2.0+ +Group: System/Packages +Version: 4.9.1.2 +Release: 0 +Requires: rpm = %{version} +Source99: rpm.spec +%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} +%global with_python 1 + +%description +The python3-rpm package contains a module that permits applications +written in the Python programming language to use the interface +supplied by RPM Package Manager libraries. + +This package should be installed if you want to develop Python programs +that will manipulate RPM packages and databases. + + + +Authors: +-------- + Erik Troan + Marc Ewing + +%prep +%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT/usr/lib +# only installing in python/ does not work because rpm links against +# installed libs at install time +make DESTDIR="$RPM_BUILD_ROOT" install +find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm +pushd $RPM_BUILD_ROOT/%_libdir/python3*/site-packages/rpm +rm -f _rpmmodule.a _rpmmodule.la +python3 %_libdir/python3*/py_compile.py *.py +python3 -O %_libdir/python3*/py_compile.py *.py +popd + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%{_libdir}/python*/*/* + +%changelog diff --git a/rpm-python.spec b/rpm-python.spec index 4178715..a3dbe6f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm-python BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm.changes b/rpm.changes index 9929626..7bff3de 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 9 17:12:05 CET 2012 - dmueller@suse.de + +- add a python3-rpm subspecfile + ------------------------------------------------------------------- Sat Jan 7 10:50:31 CET 2012 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index cde3558..93ac95d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel @@ -122,6 +123,7 @@ Patch77: mono-find-requires.diff Patch78: debugedit-stabs-warning.diff Patch79: headerchk.diff Patch80: rpm-deptracking.patch +Patch81: python3-abi-kind.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -183,7 +185,8 @@ rm -f rpmdb/db.h %patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %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 -P 80 +%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 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From 1144680c3b39c4f25f7b1160fdf6b9861fae33a9078ac1958204898912ea7070 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 9 Jan 2012 16:12:49 +0000 Subject: [PATCH 2/9] OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=172 --- python3-rpm.spec | 1 - rpm-python.spec | 1 - rpm.spec | 1 - 3 files changed, 3 deletions(-) diff --git a/python3-rpm.spec b/python3-rpm.spec index e0c01e5..806d504 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: python3-rpm BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm-python.spec b/rpm-python.spec index a3dbe6f..4178715 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: rpm-python BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm.spec b/rpm.spec index 93ac95d..ba047ef 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel From 172a33701c68be4a5d70a7751272342eb42a826c2429100cf2b2ae3dda86ce1f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 9 Jan 2012 16:12:58 +0000 Subject: [PATCH 3/9] OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=173 --- python3-rpm.spec | 1 + rpm-python.spec | 1 + rpm.spec | 1 + 3 files changed, 3 insertions(+) diff --git a/python3-rpm.spec b/python3-rpm.spec index 806d504..e0c01e5 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: python3-rpm BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm-python.spec b/rpm-python.spec index 4178715..a3dbe6f 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm-python BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm.spec b/rpm.spec index ba047ef..93ac95d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel From 9be655316ee6537ec469a3c9ffa73af7f23e4a378a08c423ba61cce88a9de917 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 9 Jan 2012 16:13:29 +0000 Subject: [PATCH 4/9] - Initial package OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=174 --- python3-rpm.changes | 5 +++++ python3-rpm.spec | 1 - rpm-python.spec | 1 - rpm.spec | 1 - 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 python3-rpm.changes diff --git a/python3-rpm.changes b/python3-rpm.changes new file mode 100644 index 0000000..76d3e01 --- /dev/null +++ b/python3-rpm.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Jan 9 17:12:41 CET 2012 - dmueller@suse.de + +- Initial package + diff --git a/python3-rpm.spec b/python3-rpm.spec index e0c01e5..806d504 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: python3-rpm BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm-python.spec b/rpm-python.spec index a3dbe6f..4178715 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: rpm-python BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm.spec b/rpm.spec index 93ac95d..ba047ef 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel From 187a9380a1854db30a8f9cdca86561562f94a562740f6662378884c869bc9772 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Mon, 16 Jan 2012 14:16:18 +0000 Subject: [PATCH 5/9] . OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=177 --- perl-python-attr.patch | 32 ++++++++++++++++++++++++++++++++ rpm.changes | 6 ++++++ rpm.spec | 3 ++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 perl-python-attr.patch diff --git a/perl-python-attr.patch b/perl-python-attr.patch new file mode 100644 index 0000000..4d422e2 --- /dev/null +++ b/perl-python-attr.patch @@ -0,0 +1,32 @@ +commit 9ddcc23d2b7ecaf5336530dbe37195b0057d0396 +Author: Ville Skyttä +Date: Tue Jan 10 10:48:13 2012 +0200 + + Adapt perl and python fileattrs to file 5.10 magics + + - file 5.10 has changed magics at least for perl and python scripts, samples: + + 5.09: a /usr/bin/perl -w script, ASCII text executable, with very long lines + 5.10: Perl script, ASCII text executable, with very long lines + + 5.09: a /usr/bin/python script, ASCII text executable + 5.10: Python script, ASCII text executable + + Signed-off-by: Panu Matilainen + +--- fileattrs/perl.attr ++++ fileattrs/perl.attr 2012-01-16 14:09:35.455146647 +0000 +@@ -1,4 +1,4 @@ + # disabled for now + #%__perl_requires %{_rpmconfigdir}/perl.req +-%__perl_magic ^.*perl .*$ ++%__perl_magic ^.*[Pp]erl .*$ + %__perl_flags exeonly +--- fileattrs/python.attr ++++ fileattrs/python.attr 2012-01-16 14:09:35.455146647 +0000 +@@ -1,4 +1,4 @@ + %__python_provides %{_rpmconfigdir}/pythondeps.sh --provides + %__python_requires %{_rpmconfigdir}/pythondeps.sh --requires + %__python_path ^((/usr/lib(64)?/python[[:digit:]]\\.[[:digit:]]/.*\\.(py[oc]?|so))|(%{_bindir}/python[[:digit:]]\\.[[:digit:]]))$ +-%__python_magic ^python.*(executable|byte-compiled)$ ++%__python_magic ^[Pp]ython.*(executable|byte-compiled)$ diff --git a/rpm.changes b/rpm.changes index 7bff3de..2d55f48 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 16 14:12:58 UTC 2012 - werner@suse.de + +- Add patch from upstream to reflect changes of perl and python + fileattrs to file 5.10 magics + ------------------------------------------------------------------- Mon Jan 9 17:12:05 CET 2012 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index ba047ef..a785f3d 100644 --- a/rpm.spec +++ b/rpm.spec @@ -123,6 +123,7 @@ Patch78: debugedit-stabs-warning.diff Patch79: headerchk.diff Patch80: rpm-deptracking.patch Patch81: python3-abi-kind.diff +Patch82: perl-python-attr.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -185,7 +186,7 @@ rm -f rpmdb/db.h %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %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 +%patch -P 80 -P 81 -P 82 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov From f55d3e12666283ac28c0683d283fa0f9c4d3eb5a6f5a8d8eb258274dcaa18ac5 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 17 Jan 2012 11:12:35 +0000 Subject: [PATCH 6/9] Accepting request 100282 from home:lnussel:branches:Base:System - fix automatic kernel supplements (bnc#741543) OBS-URL: https://build.opensuse.org/request/show/100282 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=178 --- fileattrs.diff | 6 +++--- python3-rpm.spec | 2 ++ rpm-python.spec | 2 ++ rpm.changes | 5 +++++ rpm.spec | 2 ++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/fileattrs.diff b/fileattrs.diff index 35f2335..a122d87 100644 --- a/fileattrs.diff +++ b/fileattrs.diff @@ -37,9 +37,9 @@ Index: fileattrs/ksyms.attr --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ fileattrs/ksyms.attr 2011-12-15 13:47:26.787456907 +0100 @@ -0,0 +1,4 @@ -+%__ksyms_provides %{_rpmconfigdir}/find-provides.ksyms %name -+%__ksyms_requires %{_rpmconfigdir}/find-requires.ksyms %name -+%__ksyms_supplements %{_rpmconfigdir}/find-supplements.ksyms %name ++%__ksyms_provides %{__set_helper_env}%{_rpmconfigdir}/find-provides.ksyms %name ++%__ksyms_requires %{__set_helper_env}%{_rpmconfigdir}/find-requires.ksyms %name ++%__ksyms_supplements %{__set_helper_env}%{_rpmconfigdir}/find-supplements.ksyms %name +%__ksyms_path (/lib/modules/.*\.ko(\.gz)?)|(/boot/vmlinu[xz].*)$ Index: fileattrs/Makefile.am =================================================================== diff --git a/python3-rpm.spec b/python3-rpm.spec index 806d504..1444831 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,6 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: python3-rpm BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm-python.spec b/rpm-python.spec index 4178715..c639994 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,6 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: rpm-python BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm.changes b/rpm.changes index 2d55f48..c33be40 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 16 16:18:59 UTC 2012 - lnussel@suse.de + +- fix automatic kernel supplements (bnc#741543) + ------------------------------------------------------------------- Mon Jan 16 14:12:58 UTC 2012 - werner@suse.de diff --git a/rpm.spec b/rpm.spec index a785f3d..63ae315 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,6 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + + Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel From b53b37a0b2e1198c5967f3314183bd26c54060c1e0e05afc3fc98b1f3af84832 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 17 Jan 2012 11:13:52 +0000 Subject: [PATCH 7/9] Accepting request 100375 from home:coolo:branches:openSUSE:Factory - split rpmbuild into a package of its own, which then requires basic tools to build rpms OBS-URL: https://build.opensuse.org/request/show/100375 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=179 --- rpm.changes | 6 ++++++ rpm.spec | 39 ++++++++++++++++++++++++++++----------- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/rpm.changes b/rpm.changes index c33be40..40548e0 100644 --- a/rpm.changes +++ b/rpm.changes @@ -9,6 +9,12 @@ Mon Jan 16 14:12:58 UTC 2012 - werner@suse.de - Add patch from upstream to reflect changes of perl and python fileattrs to file 5.10 magics +------------------------------------------------------------------- +Fri Jan 13 14:16:14 UTC 2012 - coolo@suse.com + +- split rpmbuild into a package of its own, which then requires basic + tools to build rpms + ------------------------------------------------------------------- Mon Jan 9 17:12:05 CET 2012 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index 63ae315..b3bd21c 100644 --- a/rpm.spec +++ b/rpm.spec @@ -140,17 +140,12 @@ is easy to update packages. RPM keeps track of all these manipulations in a central database. This way it is possible to get an overview of all installed packages. RPM also supports database queries. - - -Authors: --------- - Erik Troan - Marc Ewing - %package devel Summary: Include Files and Libraries mandatory for Development Group: System/Packages Requires: rpm = %{version} +# for people confusing the one with the other +Recommends: rpm-build = %{version} Requires: popt-devel %description devel @@ -160,12 +155,29 @@ manipulate RPM packages and databases and are intended to make it easier to create graphical package managers or any other tools that need an intimate knowledge of RPM packages in order to function. +%package build +Summary: Tools and Scripts to create rpm packages +Group: System/Packages +Requires: rpm = %{version} +Provides: rpmbuild rpm:%_bindir/rpmbuild +# SUSE's build essentials +Requires: bzip2 +Requires: xz +Requires: gzip +Requires: binutils +Requires: make +Requires: gcc +Requires: gettext-tools +Requires: findutils +Requires: patch +Requires: glibc-devel +Requires: perl-base +%description build +If you want to build a rpm, you need this package. It provides rpmbuild +and requires some packages that are usually required -Authors: --------- - Erik Troan - Marc Ewing +%package -n build-essentials %prep %setup -q -n rpm-%{version} @@ -337,6 +349,7 @@ rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion va /etc/rpm /bin/rpm /usr/bin/* + %exclude /usr/bin/rpmbuild /etc/init.d/rpmconfigcheck /usr/sbin/rcrpmconfigcheck /usr/lib/rpm @@ -356,6 +369,10 @@ rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion va %dir %attr(755,root,root) /usr/src/packages/RPMS/* /var/adm/fillup-templates/sysconfig.services-rpm +%files build +%defattr(-,root,root) +/usr/bin/rpmbuild + %files devel %defattr(644,root,root,755) /usr/include/rpm From 34f63715757adf37da0cb7af8e8d78fb18a329f3447e06c2dc1506e16c0a217f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 18 Jan 2012 07:57:26 +0000 Subject: [PATCH 8/9] didn't mean to add that OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=180 --- python3-rpm.spec | 2 -- rpm-python.spec | 2 -- rpm.spec | 4 ---- 3 files changed, 8 deletions(-) diff --git a/python3-rpm.spec b/python3-rpm.spec index 1444831..806d504 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,8 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: python3-rpm BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm-python.spec b/rpm-python.spec index c639994..4178715 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,8 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: rpm-python BuildRequires: file-devel BuildRequires: libacl-devel diff --git a/rpm.spec b/rpm.spec index b3bd21c..d6dbda7 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,8 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - - Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel @@ -177,8 +175,6 @@ Requires: perl-base If you want to build a rpm, you need this package. It provides rpmbuild and requires some packages that are usually required -%package -n build-essentials - %prep %setup -q -n rpm-%{version} rm -rf sqlite From 181c95e8cd1c96c6b6ed1f52dce3b6233ac0b02686ed5ecdb2e3aa55da7aac65 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 18 Jan 2012 14:30:38 +0000 Subject: [PATCH 9/9] Accepting request 100523 from home:saschpe:branches:Base:System OBS-URL: https://build.opensuse.org/request/show/100523 OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=181 --- python3-rpm.changes | 8 +++++ python3-rpm.spec | 38 ++++++++------------ rpm-python.changes | 8 +++++ rpm-python.spec | 34 +++++++----------- rpm.changes | 7 ++++ rpm.spec | 88 ++++++++++++++++++++++----------------------- 6 files changed, 92 insertions(+), 91 deletions(-) diff --git a/python3-rpm.changes b/python3-rpm.changes index 76d3e01..04d7fe1 100644 --- a/python3-rpm.changes +++ b/python3-rpm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 17 10:29:20 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Don't rm -rf %{buildroot} + * Removed %clean section + * Removed authors from description + ------------------------------------------------------------------- Mon Jan 9 17:12:41 CET 2012 - dmueller@suse.de diff --git a/python3-rpm.spec b/python3-rpm.spec index 806d504..5b826aa 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,7 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: python3-rpm +Version: 4.9.1.2 +Release: 0 +#!BuildIgnore: rpmlint-Factory +Summary: Python Bindings for Manipulating RPM Packages +License: GPL-2.0+ +Group: System/Packages +Source99: rpm.spec BuildRequires: file-devel BuildRequires: libacl-devel BuildRequires: libbz2-devel @@ -30,14 +38,7 @@ BuildRequires: popt-devel BuildRequires: python3-devel BuildRequires: xz-devel BuildRequires: zlib-devel -#!BuildIgnore: rpmlint-Factory -Summary: Python Bindings for Manipulating RPM Packages -License: GPL-2.0+ -Group: System/Packages -Version: 4.9.1.2 -Release: 0 Requires: rpm = %{version} -Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} %global with_python 1 @@ -49,32 +50,21 @@ supplied by RPM Package Manager libraries. This package should be installed if you want to develop Python programs that will manipulate RPM packages and databases. - - -Authors: --------- - Erik Troan - Marc Ewing - %prep %{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/lib +mkdir -p %{buildroot}%{_prefix}/lib # only installing in python/ does not work because rpm links against # installed libs at install time -make DESTDIR="$RPM_BUILD_ROOT" install -find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm -pushd $RPM_BUILD_ROOT/%_libdir/python3*/site-packages/rpm +%make_install +find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm +pushd %{buildroot}/%{_libdir}/python3*/site-packages/rpm rm -f _rpmmodule.a _rpmmodule.la -python3 %_libdir/python3*/py_compile.py *.py -python3 -O %_libdir/python3*/py_compile.py *.py +python3 %{_libdir}/python3*/py_compile.py *.py +python3 -O %{_libdir}/python3*/py_compile.py *.py popd -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root) %{_libdir}/python*/*/* diff --git a/rpm-python.changes b/rpm-python.changes index b332280..14132e7 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 17 10:28:42 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Don't rm -rf %{buildroot} + * Removed %clean section + * Removed authors from description + ------------------------------------------------------------------- Sun Dec 11 09:28:28 UTC 2011 - coolo@suse.com diff --git a/rpm-python.spec b/rpm-python.spec index 4178715..5af67c9 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,7 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm-python +Version: 4.9.1.2 +Release: 0 +#!BuildIgnore: rpmlint-Factory +Summary: Python Bindings for Manipulating RPM Packages +License: GPL-2.0+ +Group: System/Packages +Source99: rpm.spec BuildRequires: file-devel BuildRequires: libacl-devel BuildRequires: libbz2-devel @@ -30,15 +38,8 @@ BuildRequires: popt-devel BuildRequires: python-devel BuildRequires: xz-devel BuildRequires: zlib-devel -#!BuildIgnore: rpmlint-Factory -Summary: Python Bindings for Manipulating RPM Packages -License: GPL-2.0+ -Group: System/Packages -Version: 4.9.1.2 -Release: 0 Requires: rpm = %{version} %py_requires -Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} %global with_python 1 @@ -50,32 +51,21 @@ supplied by RPM Package Manager libraries. This package should be installed if you want to develop Python programs that will manipulate RPM packages and databases. - - -Authors: --------- - Erik Troan - Marc Ewing - %prep %{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/lib +mkdir -p %{buildroot}%{_prefix}/lib # only installing in python/ does not work because rpm links against # installed libs at install time -make DESTDIR="$RPM_BUILD_ROOT" install -find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm -pushd $RPM_BUILD_ROOT/%py_sitedir/rpm +%make_install +find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm +pushd %{buildroot}/%py_sitedir/rpm rm -f _rpmmodule.a _rpmmodule.la python %py_libdir/py_compile.py *.py python -O %py_libdir/py_compile.py *.py popd -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root) %{_libdir}/python*/*/* diff --git a/rpm.changes b/rpm.changes index 40548e0..4fd283c 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 17 10:28:00 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Removed authors from description + * Spec-cleaner + ------------------------------------------------------------------- Mon Jan 16 16:18:59 UTC 2012 - lnussel@suse.de diff --git a/rpm.spec b/rpm.spec index d6dbda7..7d0e027 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel @@ -211,7 +212,7 @@ rm -f m4/libtool.m4 rm -f m4/lt*.m4 %build -export CFLAGS="$RPM_OPT_FLAGS -ffunction-sections" +export CFLAGS="%{optflags} -ffunction-sections" export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" %ifarch alpha armv5tel export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections" @@ -242,58 +243,58 @@ make %{?_smp_mflags} make convertdb1 %install -mkdir -p $RPM_BUILD_ROOT/usr/lib -mkdir -p $RPM_BUILD_ROOT/usr/share/locale -ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale -make DESTDIR="$RPM_BUILD_ROOT" install -install -m 755 convertdb1 $RPM_BUILD_ROOT/usr/lib/rpm -install -m 644 db3/db.h $RPM_BUILD_ROOT/usr/include/rpm +mkdir -p %{buildroot}/usr/lib +mkdir -p %{buildroot}/usr/share/locale +ln -s ../share/locale %{buildroot}/usr/lib/locale +%make_install +install -m 755 convertdb1 %{buildroot}/usr/lib/rpm +install -m 644 db3/db.h %{buildroot}/usr/include/rpm # remove .la file and the static variant of libpopt # have to remove the dependency from other .la files as well -for f in $RPM_BUILD_ROOT/%{_libdir}/*.la; do +for f in %{buildroot}/%{_libdir}/*.la; do sed -i -e "s,/%_lib/libpopt.la,-lpopt,g" $f done -mkdir -p $RPM_BUILD_ROOT/etc/init.d -install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/etc/init.d -mkdir -p $RPM_BUILD_ROOT/usr/sbin -ln -sf ../../etc/init.d/rpmconfigcheck $RPM_BUILD_ROOT/usr/sbin/rcrpmconfigcheck -cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm -mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/suse -ln -s ../suse_macros $RPM_BUILD_ROOT/usr/lib/rpm/suse/macros +mkdir -p %{buildroot}/etc/init.d +install -m 755 %{SOURCE8} %{buildroot}/etc/init.d +mkdir -p %{buildroot}/usr/sbin +ln -sf ../../etc/init.d/rpmconfigcheck %{buildroot}/usr/sbin/rcrpmconfigcheck +cp -a suse_macros %{buildroot}/usr/lib/rpm +mkdir -p %{buildroot}/usr/lib/rpm/suse +ln -s ../suse_macros %{buildroot}/usr/lib/rpm/suse/macros for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do - mkdir -p $RPM_BUILD_ROOT/usr/src/packages/$d - chmod 755 $RPM_BUILD_ROOT/usr/src/packages/$d + mkdir -p %{buildroot}/usr/src/packages/$d + chmod 755 %{buildroot}/usr/src/packages/$d done -for d in $RPM_BUILD_ROOT/usr/lib/rpm/platform/*-linux/macros ; do +for d in %{buildroot}/usr/lib/rpm/platform/*-linux/macros ; do dd=${d%%-linux/macros} dd=${dd##*/} - mkdir $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd - chmod 755 $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd + mkdir %{buildroot}/usr/src/packages/RPMS/$dd + chmod 755 %{buildroot}/usr/src/packages/RPMS/$dd done -mkdir -p $RPM_BUILD_ROOT/var/lib/rpm -gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18] +mkdir -p %{buildroot}/var/lib/rpm +gzip -9 %{buildroot}/%{_mandir}/man[18]/*.[18] export RPM_BUILD_ROOT %ifarch s390x [ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux %endif chmod 755 doc/manual rm -rf doc/manual/Makefile* -rm -f $RPM_BUILD_ROOT/usr/lib/rpmpopt -rm -rf $RPM_BUILD_ROOT%{_mandir}/{fr,ja,ko,pl,ru,sk} -rm -f $RPM_BUILD_ROOT%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo -mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates -install -c -m0644 %{SOURCE9} $RPM_BUILD_ROOT/var/adm/fillup-templates/ -rm -f $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute2 -install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/debuginfo.prov $RPM_BUILD_ROOT/usr/lib/rpm -rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc -mkdir -p $RPM_BUILD_ROOT/etc/rpm -chmod 755 $RPM_BUILD_ROOT/etc/rpm +rm -f %{buildroot}/usr/lib/rpmpopt +rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk} +rm -f %{buildroot}%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo +mkdir -p %{buildroot}/var/adm/fillup-templates +install -c -m0644 %{SOURCE9} %{buildroot}/var/adm/fillup-templates/ +rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2 +install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm +install -m 755 %{SOURCE6} %{buildroot}/usr/lib/rpm +install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm +install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm +install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm +rm -f %{buildroot}/usr/lib/locale %{buildroot}/usr/lib/rpmrc +mkdir -p %{buildroot}/etc/rpm +chmod 755 %{buildroot}/etc/rpm # remove some nonsense or non-working scripts -pushd $RPM_BUILD_ROOT/usr/lib/rpm/ +pushd %{buildroot}/usr/lib/rpm/ for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \ magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \ brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ @@ -308,20 +309,17 @@ for i in /usr/share/automake-*/*; do done popd gzip -9 CHANGES -rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la -sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm +rm -rf %{buildroot}/%{_libdir}/python%{py_ver} +rm -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/rpm-plugins/*.la +sh %{buildroot}/usr/lib/rpm/find-lang.sh %{buildroot} rpm %ifarch armv7hl # rpm is using the host_cpu as default for the platform, but armv7hl is not known by the kernel. # so we need to enforce the platform here. # We don't want to use armv7l because it would make us incompatible to Fedora and MeeGo plattforms. -echo -n armv7hl-suse-linux> $RPM_BUILD_ROOT/etc/rpm/platform +echo -n armv7hl-suse-linux> %{buildroot}/etc/rpm/platform %endif -%clean -rm -rf $RPM_BUILD_ROOT - %post %{fillup_only -an services} test -f var/lib/rpm/Packages || rpm --initdb