# # spec file for package rpm # # Copyright (c) 2011 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: rpm License: GPLv2+ Group: System/Packages BuildRequires: file-devel libbz2-devel libelf-devel libselinux-devel libsemanage-devel lua-devel ncurses-devel xz-devel zlib-devel BuildRequires: popt-devel BuildRequires: libacl-devel libcap-devel #!BuildIgnore: rpmlint-Factory Provides: rpminst PreReq: %insserv_prereq %fillup_prereq permissions AutoReqProv: on Summary: The RPM Package Manager Version: 4.9.1 Release: 25 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 Source4: rpm-suse_macros Source5: rpmsort Source6: symset-table Source8: rpmconfigcheck Source9: sysconfig.services-rpm Source10: beecrypt-4.1.2.tar.bz2 Source11: db-4.8.30.tar.bz2 Source12: baselibs.conf Patch1: beecrypt-4.1.2.diff Patch2: db.diff # quilt patches start here Patch10: rpm-beecrypt.diff Patch11: debugedit.diff Patch12: localetag.diff Patch13: missingok.diff Patch14: nameversioncompare.diff Patch15: dbfsync.diff Patch16: dbrointerruptable.diff Patch17: extcond.diff Patch18: refreshtestarch.diff Patch19: rpmrctests.diff Patch20: waitlock.diff Patch21: suspendlock.diff Patch22: weakdeps.diff Patch23: autodeps.diff Patch24: brp.diff Patch25: brpcompress.diff Patch26: checkfilesnoinfodir.diff Patch27: finddebuginfo.diff Patch28: findksyms.diff Patch29: findlang.diff Patch30: macrosin.diff Patch31: modalias.diff Patch32: platformin.diff Patch33: rpmpopt.diff Patch34: rpmrc.diff Patch35: taggedfileindex.diff Patch36: rpmqpack.diff Patch37: convertdb1static.diff Patch38: build.diff Patch39: modalias-kernel_module.diff Patch40: files.diff Patch41: debugedit-comp-dir.diff Patch42: perlprov.diff Patch43: rpm-shorten-changelog.diff Patch44: debugsource-package.diff Patch45: whatrequires-doc.diff Patch46: remove-brp-strips.diff Patch47: requires-ge-macro.diff Patch48: debugedit-canon-fix.diff Patch49: finddebuginfo-absolute-links.diff Patch50: firmware.diff Patch51: specfilemacro.diff Patch52: modalias-encode.diff Patch53: disttag-macro.diff Patch54: buildidprov.diff Patch55: debugsubpkg.diff Patch56: debuglink.diff Patch57: debuginfo-mono.patch Patch58: lazystatfs.diff Patch59: repackage-nomd5.diff Patch60: safeugid.diff Patch61: noprereqdeprec.diff Patch62: pythondeps.diff Patch63: fontprovides.diff Patch64: rpm-gst-provides.patch Patch65: langnoc.diff Patch66: initscriptsprov.diff Patch67: remove-translations.diff Patch68: no_rep_autop.diff Patch69: headeradddb.diff Patch70: dbprivate.diff Patch71: nobuildcolor.diff Patch72: fileattrs.diff Patch73: nomagiccheck.diff Patch74: findsupplements.diff Patch75: assumeexec.diff Patch76: buildpipe.diff Patch77: trailslash.diff Patch78: docdefattr.diff Patch79: mono-find-requires.diff Patch80: debugedit-stabs-warning.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem %define _binary_payload w9.bzdio %description RPM Package Manager is the main tool for managing the software packages of the SuSE Linux distribution. RPM can be used to install and remove software packages. With rpm, it 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 License: GPLv2+ Group: System/Packages Requires: rpm = %{version} Requires: popt-devel %description devel This package contains the RPM C library and header files. These development files will simplify the process of writing programs which 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. Authors: -------- Erik Troan Marc Ewing %prep %setup -q -n rpm-%{version} rm -rf sqlite rm -rf beecrypt tar xjf %{SOURCE10} tar xjf %{SOURCE11} ln -s db-4.8.30 db ln -s beecrypt-4.1.2 beecrypt chmod -R u+w db/* #tar xjf %{SOURCE12} #ln -s neon-0.24.7 neon # will get linked from db3 rm -f rpmdb/db.h %patch -P 1 -P 2 %patch -P 10 -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 17 -P 18 -P 19 %patch -P 20 -P 21 -P 22 -P 23 -P 24 -P 25 -P 26 -P 27 -P 28 -P 29 %patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39 %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 %patch -P 80 #chmod 755 scripts/find-supplements{,.ksyms} #chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms #chmod 755 scripts/firmware.prov #chmod 755 scripts/debuginfo.prov tar -xjvf %{SOURCE1} tar -xjvf %{SOURCE2} if [ -s /etc/rpm/suse_macros ]; then cp -a /etc/rpm/suse_macros %{SOURCE4} fi cp -a %{SOURCE4} suse_macros rm -f m4/libtool.m4 rm -f m4/lt*.m4 %build export CFLAGS="$RPM_OPT_FLAGS -ffunction-sections" export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" %ifarch alpha export CFLAGS="-g -O0 -fno-strict-aliasing" %endif #cp -p /usr/share/gettext/config.rpath . cp autogen.sh beecrypt pushd beecrypt ./autogen.sh --with-pic --without-python make %{?_smp_mflags} popd ./autogen.sh --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \ --libdir=%{_libdir} --sysconfdir=/etc --localstatedir=/var --with-lua \ --with-selinux --with-internal-beecrypt --with-acl --with-cap --enable-shared %{?with_python: --enable-python} rm po/de.gmo 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 # 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 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 for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do mkdir -p $RPM_BUILD_ROOT/usr/src/packages/$d chmod 1777 $RPM_BUILD_ROOT/usr/src/packages/$d done for d in $RPM_BUILD_ROOT/usr/lib/rpm/platform/*-linux/macros ; do dd=${d%%-linux/macros} dd=${dd##*/} mkdir $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd chmod 1777 $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd done mkdir -p $RPM_BUILD_ROOT/var/lib/rpm gzip -9 $RPM_BUILD_ROOT/%{_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 find $RPM_BUILD_ROOT/usr/src/packages/* -type d | sed -e "s@$RPM_BUILD_ROOT@@" | sort > $RPM_BUILD_ROOT/usr/lib/rpm/permlist 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 # remove some nonsense or non-working scripts pushd $RPM_BUILD_ROOT/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 \ rpmdb_* brp-sparc64-linux brp-strip-comment-note brp-java-gcjcompile do rm -f $f done for i in /usr/share/automake-*/*; do if test -f "$i" && test -f "${i##*/}"; then rm -f "${i##*/}" fi 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 %clean rm -rf $RPM_BUILD_ROOT %post %{fillup_only -an services} %run_permissions test -f var/lib/rpm/Packages || rpm --initdb if test -s var/lib/rpm/packages.rpm ; then echo "converting rpm-3 database to rpm-4 format..." usr/lib/rpm/convertdb1 var/lib/rpm/packages.rpm mv -f var/lib/rpm/packages.rpm var/lib/rpm/packages.rpm3 rm -f var/lib/rpm/conflictsindex.rpm var/lib/rpm/fileindex.rpm var/lib/rpm/groupindex.rpm var/lib/rpm/nameindex.rpm var/lib/rpm/providesindex.rpm var/lib/rpm/requiredby.rpm var/lib/rpm/triggerindex.rpm fi # delete no longer maintained databases rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpm/Provideversion %postun %{insserv_cleanup} %verifyscript %verify_permissions -f /usr/lib/rpm/permlist %files -f rpm.lang %defattr(-,root,root) %doc CHANGES.gz COPYING GROUPS %doc doc/manual %doc RPM-HOWTO RPM-Tips /etc/rpm /bin/rpm /usr/bin/* /etc/init.d/rpmconfigcheck /usr/sbin/rcrpmconfigcheck /usr/lib/rpm %{_libdir}/rpm-plugins %{_libdir}/librpm.so.* %{_libdir}/librpmbuild.so.* %{_libdir}/librpmio.so.* %{_libdir}/librpmsign.so.* %doc %{_mandir}/man[18]/*.[18]* %dir /var/lib/rpm %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILD %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SPECS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SOURCES %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/SRPMS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/BUILDROOT %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS/* /var/adm/fillup-templates/sysconfig.services-rpm %files devel %defattr(644,root,root,755) /usr/include/rpm %{_libdir}/librpm.so %{_libdir}/librpmbuild.so %{_libdir}/librpmio.so %{_libdir}/librpmsign.so %{_libdir}/pkgconfig/rpm.pc %changelog