Name: rpm
Summary: The Package Manager
-License: GPL-2.0+
+License: LGPL-2.0+ and GPL-2.0+
Group: Base/Package Management
-Version: 4.11.0.1
-Release: 0
+Version: 4.14.1.1
+Release: 1
Url: http://www.rpm.org
BuildRequires: binutils
BuildRequires: bzip2
BuildRequires: uthash-devel
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libsmack)
+BuildRequires: pkgconfig(libarchive)
BuildRequires: fdupes
+BuildRequires: libdw-devel
+BuildRequires: libelf-devel
+BuildRequires: pkgconfig(libzstd)
Provides: rpminst
Provides: rpm-libs
Source4: rpm-tizen_macros
Source8: rpmconfigcheck
Source13: find-docs.sh
+Source14: find-isufiles.sh
Source22: device-sec-policy
Source23: find-provides.ksyms
+Source24: debug.manifest
Source1001: rpm.manifest
Source0: rpm-%{version}.tar.bz2
+Source9: libsymlink.attr
# avoid bootstrapping problem
%define _binary_payload w9.bzdio
This package contains the MSM security plugin for rpm that performs
security-related functionality.
+%post security-plugin
+echo "%__transaction_plugins msm" >> %{rpmhome}/macros
+echo "%__plugindir %{_libdir}/rpm-plugins" >> %{rpmhome}/macros
+echo "%__transaction_msm %{__plugindir}/msm.so" >> %{rpmhome}/macros
+echo "%__transaction_msm_default_policy %{_libdir}/rpm-plugins/msm-device-sec-policy" >> %{rpmhome}/macros
+
%package -n python-rpm
Summary: Python Bindings for Manipulating RPM Packages
Requires: rpm = %{version}
rm -f m4/libtool.m4
rm -f m4/lt*.m4
+# Change hard-coded paths in man pages and .rc files
+#[[ x"/usr/lib/rpm" != x%{rpmhome} ]] && \
+ /bin/bash -c '/usr/bin/find %{_builddir} -type f -exec sed -e "s|/usr/lib/rpm|%{rpmhome}|g" -i {} \;'
+
%build
CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`"
export CPPFLAGS
-export CFLAGS="%{optflags} -ffunction-sections"
-export LDFLAGS="${LDFLAGS} -Wl,-Bsymbolic-functions -ffunction-sections"
+export CFLAGS="%{optflags} -ffunction-sections -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE"
+export LDFLAGS="${LDFLAGS} -pie -Wl,-Bsymbolic-functions -ffunction-sections"
%ifarch armv5tel
export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
%endif
--enable-shared \
--enable-python \
--with-vendor=tizen \
- --with-msm
+ --with-msm \
+ --enable-zstd \
+ --with-rpmconfigdir=%{rpmhome}
make %{?_smp_mflags}
%make_install
install -m 644 db3/db.h %{buildroot}%{_includedir}/rpm
mkdir -p %{buildroot}%{_sysconfdir}/rpm
-cp -a tizen_macros %{buildroot}%{rpmhome}
mkdir -p %{buildroot}%{rpmhome}/tizen
+cp -a tizen_macros %{buildroot}%{rpmhome}
install -m 755 %{SOURCE13} %{buildroot}%{rpmhome}/tizen
+install -m 755 %{SOURCE14} %{buildroot}%{rpmhome}/tizen
install -m 755 %{SOURCE23} %{buildroot}%{rpmhome}
+install -m 644 %{SOURCE9} %{buildroot}%{rpmhome}/fileattrs/libsymlink.attr
install -m 644 %{SOURCE22} %{buildroot}%{_sysconfdir}/device-sec-policy
install -m 644 %{SOURCE22} %{buildroot}%{__plugindir}/msm-device-sec-policy
ln -s ../tizen_macros %{buildroot}%{rpmhome}/tizen/macros
install -m 755 scripts/find-supplements.ksyms %{buildroot}%{rpmhome}
install -m 755 scripts/firmware.prov %{buildroot}%{rpmhome}
install -m 755 scripts/debuginfo.prov %{buildroot}%{rpmhome}
+install -m 644 %{SOURCE24} %{buildroot}%{rpmhome}
rm -f %{buildroot}%{rpmlibdir}/locale %{buildroot}%{rpmlibdir}/rpmrc
mkdir -p %{buildroot}%{_sysconfdir}/rpm
chmod 755 %{buildroot}%{_sysconfdir}/rpm
# remove some nonsense or non-working scripts
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
+ vpkg-provides*.sh http.req sql.req tcl.req \
+ rpmdb_* brp-sparc64-linux brp-java-gcjcompile
do
rm -f %{buildroot}%{rpmhome}/$f
done
fi
done
%ifarch aarch64 ppc64le
-install -m 755 config.guess %{buildroot}/usr/lib/rpm
-install -m 755 config.sub %{buildroot}/usr/lib/rpm
+install -m 755 config.guess %{buildroot}%{rpmhome}
+install -m 755 config.sub %{buildroot}%{rpmhome}
%endif
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{__plugindir}/*.la
echo -n %{_target_cpu}-tizen-linux-gnueabi > %{buildroot}%{_sysconfdir}/rpm/platform
%endif
+grep -Rn '/usr/lib/rpm' %{_builddir} || echo "No hard-coded paths found"
+
%post
/sbin/ldconfig
test -f %{_dbpath}/Packages || rpm --initdb
%{_bindir}/rpmquery
%{_bindir}/rpmverify
%{_bindir}/rpmqpack
+%{_bindir}/rpm2archive
%attr(0755, root, root) %dir %{rpmhome}
%{rpmhome}/macros
%{rpmhome}/macros.d
%{rpmhome}/rpmpopt*
%{rpmhome}/rpmrc
+%attr(0755, root, root) %dir %{rpmhome}/tizen
%{rpmhome}/tizen/macros
%{rpmhome}/tizen_macros
%{rpmhome}/rpm.supp
%{rpmhome}/tgpg
%{rpmhome}/platform
%dir %{__plugindir}
-%{__plugindir}/exec.so
+%{__plugindir}/ima.so
+%{__plugindir}/prioreset.so
+%{__plugindir}/syslog.so
%{_libdir}/librpm.so.*
%{_libdir}/librpmio.so.*
%{_libdir}/librpmbuild.so.*
%files build
%manifest %{name}.manifest
%defattr(-,root,root)
+%license COPYING
%{_bindir}/rpmbuild
%{_bindir}/gendiff
%{_bindir}/rpmspec
%{_bindir}/rpmsign
+%attr(0755, root, root) %dir %{rpmhome}/tizen
%{rpmhome}/tizen/find-*
%{rpmhome}/brp-*
%{rpmhome}/find-supplements*
%{rpmhome}/check-*
%{rpmhome}/debugedit
+%{rpmhome}/sepdebugcrcfix
+%{rpmhome}/python-macro-helper
%{rpmhome}/find-debuginfo.sh
%{rpmhome}/find-lang.sh
%{rpmhome}/find-provides.ksyms
%{rpmhome}/*.req
%{rpmhome}/macros.*
%{rpmhome}/fileattrs
+%{rpmhome}/debug.manifest
%ifarch aarch64 ppc64le
%{rpmhome}/config.*
%endif
%files devel
%manifest %{name}.manifest
%defattr(644,root,root,755)
+%license COPYING
%attr(755,root,root) %{_bindir}/rpmgraph
%{_includedir}/rpm
%{_libdir}/librpm.so
%files security-plugin
%manifest %{name}.manifest
%defattr(-,root,root)
+%license COPYING
%{__plugindir}/msm.so
%{__plugindir}/msm-device-sec-policy
%config(noreplace) %{_sysconfdir}/device-sec-policy
%files -n python-rpm
%defattr(-,root,root)
+%license COPYING
%{python_sitearch}/rpm
%attr(755,root,root) %{python_sitearch}/rpm/transaction.py