Marcus Rueckert
43997482be
-> OBS-URL: https://build.opensuse.org/request/show/70563 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=128
347 lines
12 KiB
RPMSpec
347 lines
12 KiB
RPMSpec
#
|
|
# 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.0
|
|
Release: 1
|
|
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: chownwarn.diff
|
|
Patch16: dbfsync.diff
|
|
Patch17: dbrointerruptable.diff
|
|
Patch18: extcond.diff
|
|
Patch19: refreshtestarch.diff
|
|
Patch20: rpmrctests.diff
|
|
Patch21: waitlock.diff
|
|
Patch22: suspendlock.diff
|
|
Patch23: weakdeps.diff
|
|
Patch24: autodeps.diff
|
|
Patch25: brp.diff
|
|
Patch26: brpcompress.diff
|
|
Patch27: checkfilesnoinfodir.diff
|
|
Patch28: finddebuginfo.diff
|
|
Patch29: findksyms.diff
|
|
Patch30: findlang.diff
|
|
Patch31: macrosin.diff
|
|
Patch32: modalias.diff
|
|
Patch33: platformin.diff
|
|
Patch34: rpmpopt.diff
|
|
Patch35: rpmrc.diff
|
|
Patch36: taggedfileindex.diff
|
|
Patch37: rpmqpack.diff
|
|
Patch38: convertdb1static.diff
|
|
Patch39: build.diff
|
|
Patch40: modalias-kernel_module.diff
|
|
Patch41: files.diff
|
|
Patch42: debugedit-comp-dir.diff
|
|
Patch43: perlprov.diff
|
|
Patch44: rpm-shorten-changelog.diff
|
|
Patch45: debugsource-package.diff
|
|
Patch46: whatrequires-doc.diff
|
|
Patch47: remove-brp-strips.diff
|
|
Patch48: requires-ge-macro.diff
|
|
Patch49: mimetype.diff
|
|
Patch50: debugedit-canon-fix.diff
|
|
Patch51: finddebuginfo-absolute-links.diff
|
|
Patch52: firmware.diff
|
|
Patch53: specfilemacro.diff
|
|
Patch54: modalias-encode.diff
|
|
Patch55: disttag-macro.diff
|
|
Patch56: buildidprov.diff
|
|
Patch57: debugsubpkg.diff
|
|
Patch58: debuglink.diff
|
|
Patch59: debuginfo-mono.patch
|
|
Patch60: lazystatfs.diff
|
|
Patch61: repackage-nomd5.diff
|
|
Patch62: safeugid.diff
|
|
Patch63: noprereqdeprec.diff
|
|
Patch64: pythondeps.diff
|
|
Patch65: fontprovides.diff
|
|
Patch66: rpm-gst-provides.patch
|
|
Patch67: langnoc.diff
|
|
Patch68: initscriptsprov.diff
|
|
Patch69: remove-translations.diff
|
|
Patch70: no_rep_autop.diff
|
|
Patch71: headeradddb.diff
|
|
Patch72: rpmdb_get_open_flags.diff
|
|
Patch73: verify_p.diff
|
|
Patch74: dbprivate.diff
|
|
Patch75: nobuildcolor.diff
|
|
Patch76: fileattrs.diff
|
|
Patch77: emptyprep.diff
|
|
Patch78: nomagiccheck.diff
|
|
Patch79: findsupplements.diff
|
|
Patch80: magic_and_path.diff
|
|
Patch81: safemacro.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 <ewt@redhat.com>
|
|
Marc Ewing <marc@redhat.com>
|
|
|
|
%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 <ewt@redhat.com>
|
|
Marc Ewing <marc@redhat.com>
|
|
|
|
%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 -P 81
|
|
#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 -fno-strict-aliasing -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
|