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
This commit is contained in:
Stephan Kulow 2012-01-18 14:30:38 +00:00 committed by Git OBS Bridge
parent 34f6371575
commit 181c95e8cd
6 changed files with 92 additions and 91 deletions

View File

@ -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 Mon Jan 9 17:12:41 CET 2012 - dmueller@suse.de

View File

@ -15,7 +15,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: python3-rpm 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: file-devel
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libbz2-devel BuildRequires: libbz2-devel
@ -30,14 +38,7 @@ BuildRequires: popt-devel
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: xz-devel BuildRequires: xz-devel
BuildRequires: zlib-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} Requires: rpm = %{version}
Source99: rpm.spec
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)}
%global with_python 1 %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 This package should be installed if you want to develop Python programs
that will manipulate RPM packages and databases. that will manipulate RPM packages and databases.
Authors:
--------
Erik Troan <ewt@redhat.com>
Marc Ewing <marc@redhat.com>
%prep %prep
%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} %{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')}
%install %install
rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}%{_prefix}/lib
mkdir -p $RPM_BUILD_ROOT/usr/lib
# only installing in python/ does not work because rpm links against # only installing in python/ does not work because rpm links against
# installed libs at install time # installed libs at install time
make DESTDIR="$RPM_BUILD_ROOT" install %make_install
find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm 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 pushd %{buildroot}/%{_libdir}/python3*/site-packages/rpm
rm -f _rpmmodule.a _rpmmodule.la rm -f _rpmmodule.a _rpmmodule.la
python3 %_libdir/python3*/py_compile.py *.py python3 %{_libdir}/python3*/py_compile.py *.py
python3 -O %_libdir/python3*/py_compile.py *.py python3 -O %{_libdir}/python3*/py_compile.py *.py
popd popd
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/python*/*/* %{_libdir}/python*/*/*

View File

@ -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 Sun Dec 11 09:28:28 UTC 2011 - coolo@suse.com

View File

@ -15,7 +15,15 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: rpm-python 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: file-devel
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libbz2-devel BuildRequires: libbz2-devel
@ -30,15 +38,8 @@ BuildRequires: popt-devel
BuildRequires: python-devel BuildRequires: python-devel
BuildRequires: xz-devel BuildRequires: xz-devel
BuildRequires: zlib-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} Requires: rpm = %{version}
%py_requires %py_requires
Source99: rpm.spec
%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)}
%global with_python 1 %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 This package should be installed if you want to develop Python programs
that will manipulate RPM packages and databases. that will manipulate RPM packages and databases.
Authors:
--------
Erik Troan <ewt@redhat.com>
Marc Ewing <marc@redhat.com>
%prep %prep
%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} %{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')}
%install %install
rm -rf $RPM_BUILD_ROOT mkdir -p %{buildroot}%{_prefix}/lib
mkdir -p $RPM_BUILD_ROOT/usr/lib
# only installing in python/ does not work because rpm links against # only installing in python/ does not work because rpm links against
# installed libs at install time # installed libs at install time
make DESTDIR="$RPM_BUILD_ROOT" install %make_install
find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm 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 pushd %{buildroot}/%py_sitedir/rpm
rm -f _rpmmodule.a _rpmmodule.la rm -f _rpmmodule.a _rpmmodule.la
python %py_libdir/py_compile.py *.py python %py_libdir/py_compile.py *.py
python -O %py_libdir/py_compile.py *.py python -O %py_libdir/py_compile.py *.py
popd popd
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/python*/*/* %{_libdir}/python*/*/*

View File

@ -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 Mon Jan 16 16:18:59 UTC 2012 - lnussel@suse.de

View File

@ -15,6 +15,7 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
Name: rpm Name: rpm
BuildRequires: file-devel BuildRequires: file-devel
BuildRequires: libacl-devel BuildRequires: libacl-devel
@ -211,7 +212,7 @@ rm -f m4/libtool.m4
rm -f m4/lt*.m4 rm -f m4/lt*.m4
%build %build
export CFLAGS="$RPM_OPT_FLAGS -ffunction-sections" export CFLAGS="%{optflags} -ffunction-sections"
export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections"
%ifarch alpha armv5tel %ifarch alpha armv5tel
export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections" export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
@ -242,58 +243,58 @@ make %{?_smp_mflags}
make convertdb1 make convertdb1
%install %install
mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p %{buildroot}/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/share/locale mkdir -p %{buildroot}/usr/share/locale
ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale ln -s ../share/locale %{buildroot}/usr/lib/locale
make DESTDIR="$RPM_BUILD_ROOT" install %make_install
install -m 755 convertdb1 $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 convertdb1 %{buildroot}/usr/lib/rpm
install -m 644 db3/db.h $RPM_BUILD_ROOT/usr/include/rpm install -m 644 db3/db.h %{buildroot}/usr/include/rpm
# remove .la file and the static variant of libpopt # remove .la file and the static variant of libpopt
# have to remove the dependency from other .la files as well # 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 sed -i -e "s,/%_lib/libpopt.la,-lpopt,g" $f
done done
mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p %{buildroot}/etc/init.d
install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/etc/init.d install -m 755 %{SOURCE8} %{buildroot}/etc/init.d
mkdir -p $RPM_BUILD_ROOT/usr/sbin mkdir -p %{buildroot}/usr/sbin
ln -sf ../../etc/init.d/rpmconfigcheck $RPM_BUILD_ROOT/usr/sbin/rcrpmconfigcheck ln -sf ../../etc/init.d/rpmconfigcheck %{buildroot}/usr/sbin/rcrpmconfigcheck
cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm cp -a suse_macros %{buildroot}/usr/lib/rpm
mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/suse mkdir -p %{buildroot}/usr/lib/rpm/suse
ln -s ../suse_macros $RPM_BUILD_ROOT/usr/lib/rpm/suse/macros ln -s ../suse_macros %{buildroot}/usr/lib/rpm/suse/macros
for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
mkdir -p $RPM_BUILD_ROOT/usr/src/packages/$d mkdir -p %{buildroot}/usr/src/packages/$d
chmod 755 $RPM_BUILD_ROOT/usr/src/packages/$d chmod 755 %{buildroot}/usr/src/packages/$d
done 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=${d%%-linux/macros}
dd=${dd##*/} dd=${dd##*/}
mkdir $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd mkdir %{buildroot}/usr/src/packages/RPMS/$dd
chmod 755 $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd chmod 755 %{buildroot}/usr/src/packages/RPMS/$dd
done done
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm mkdir -p %{buildroot}/var/lib/rpm
gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18] gzip -9 %{buildroot}/%{_mandir}/man[18]/*.[18]
export RPM_BUILD_ROOT export RPM_BUILD_ROOT
%ifarch s390x %ifarch s390x
[ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux [ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux
%endif %endif
chmod 755 doc/manual chmod 755 doc/manual
rm -rf doc/manual/Makefile* rm -rf doc/manual/Makefile*
rm -f $RPM_BUILD_ROOT/usr/lib/rpmpopt rm -f %{buildroot}/usr/lib/rpmpopt
rm -rf $RPM_BUILD_ROOT%{_mandir}/{fr,ja,ko,pl,ru,sk} rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk}
rm -f $RPM_BUILD_ROOT%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo rm -f %{buildroot}%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates mkdir -p %{buildroot}/var/adm/fillup-templates
install -c -m0644 %{SOURCE9} $RPM_BUILD_ROOT/var/adm/fillup-templates/ install -c -m0644 %{SOURCE9} %{buildroot}/var/adm/fillup-templates/
rm -f $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute2 rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2
install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE6} %{buildroot}/usr/lib/rpm
install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm
install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm
install -m 755 scripts/debuginfo.prov $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm
rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc rm -f %{buildroot}/usr/lib/locale %{buildroot}/usr/lib/rpmrc
mkdir -p $RPM_BUILD_ROOT/etc/rpm mkdir -p %{buildroot}/etc/rpm
chmod 755 $RPM_BUILD_ROOT/etc/rpm chmod 755 %{buildroot}/etc/rpm
# remove some nonsense or non-working scripts # 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 \ 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 \ magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \
brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ 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 done
popd popd
gzip -9 CHANGES gzip -9 CHANGES
rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} rm -rf %{buildroot}/%{_libdir}/python%{py_ver}
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la rm -f %{buildroot}%{_libdir}/rpm-plugins/*.la
sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm sh %{buildroot}/usr/lib/rpm/find-lang.sh %{buildroot} rpm
%ifarch armv7hl %ifarch armv7hl
# rpm is using the host_cpu as default for the platform, but armv7hl is not known by the kernel. # 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. # 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. # 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 %endif
%clean
rm -rf $RPM_BUILD_ROOT
%post %post
%{fillup_only -an services} %{fillup_only -an services}
test -f var/lib/rpm/Packages || rpm --initdb test -f var/lib/rpm/Packages || rpm --initdb