summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac8
-rw-r--r--packaging/rpm-tizen_macros29
-rw-r--r--packaging/rpm.spec23
-rw-r--r--rpm.am5
-rw-r--r--scripts/find-debuginfo.sh3
5 files changed, 40 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index af593fed5..9fe27029f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -886,7 +886,13 @@ else
usrprefix=$prefix
fi
-RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"
+RPMCONFIGDIR=
+AC_ARG_WITH([rpmconfigdir],
+ [AS_HELP_STRING([--with-rpmconfigdir],
+ [Set up rpm config not into /usr/lib/rpm @<:@default=check@:>@])],
+ [RPMCONFIGDIR=$withval],
+ [RPMCONFIGDIR="`echo ${usrprefix}/lib/rpm`"])
+
AC_SUBST(RPMCONFIGDIR)
AC_SUBST(OBJDUMP)
diff --git a/packaging/rpm-tizen_macros b/packaging/rpm-tizen_macros
index d20c04d66..94824bb3e 100644
--- a/packaging/rpm-tizen_macros
+++ b/packaging/rpm-tizen_macros
@@ -21,23 +21,23 @@
%kernel_release %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel))
%kernel_name %(/bin/rpm -q --queryformat '%{RPMTAG_NAME}' $(/bin/rpm -q --whatprovides kernel))
-# this script calls all scripts in /usr/lib/rpm/brp-tizen.d
-%__arch_install_post /usr/lib/rpm/check-buildroot
+# this script calls all scripts in %{_rpmconfigdir}/brp-tizen.d
+%__arch_install_post %{_rpmconfigdir}/check-buildroot
%__strip_install_post \
- %{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}} \
- /usr/lib/rpm/brp-strip-static-archive %{__strip} \
-# /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump} \
+ %{!?__debug_package:%{_rpmconfigdir}/brp-strip %{__strip}} \
+ %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
+# %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
%{nil}
%__os_install_post \
- /usr/lib/rpm//brp-compress \
+ %{_rpmconfigdir}//brp-compress \
%{!?_rpm_strip_disable:%{__strip_install_post}}\
- /usr/lib/rpm/brp-python-hardlink \
- %{!?disable_docs_package:/usr/lib/rpm/tizen/find-docs.sh %{buildroot}} \
+ %{_rpmconfigdir}/brp-python-hardlink \
+ %{!?disable_docs_package:%{_rpmconfigdir}/tizen/find-docs.sh %{buildroot}} \
%{nil}
-# /usr/lib/rpm/tizen/brp-implant-ident-static
+# %{_rpmconfigdir}/tizen/brp-implant-ident-static
%__spec_install_post\
%{?__debug_package:%{__debug_install_post}}\
@@ -65,7 +65,7 @@
if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
/sbin/install-info "${ALL_ARGS[@]}" \
fi \
- fi ;
+ fi ;
%install_info_delete(:-:) \
ALL_ARGS=(%{**}) \
@@ -74,7 +74,7 @@
if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
/sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
fi ; \
- fi ;
+ fi ;
# find-supplements.ksyms parses this macro directly out of the spec file:
%supplements_kernel_module() \
@@ -237,8 +237,8 @@ mkdir -p %{?buildroot:%{buildroot}} \
rm -rf %{?buildroot:%{buildroot}} \
%{nil}
-%find_lang /usr/lib/rpm/find-lang.sh %{buildroot}
-%find_docs /usr/lib/rpm/tizen/find-docs.sh %{buildroot}
+%find_lang %{_rpmconfigdir}/find-lang.sh %{buildroot}
+%find_docs %{_rpmconfigdir}/tizen/find-docs.sh %{buildroot}
@@ -275,7 +275,7 @@ rm -rf %{?buildroot:%{buildroot}} \
# actually set up the filtering bits
%filter_setup %{expand: \
%global _use_internal_dependency_generator 0 \
-%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
+%global __deploop() while read FILE; do %{_rpmconfigdir}/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
%global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
%global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
}
@@ -321,4 +321,3 @@ This package provides header files and other developer releated files for packag
%devel_desc This package contains all necessary include files and libraries needed \
to develop applications that require %{name}.\
%{nil}
-
diff --git a/packaging/rpm.spec b/packaging/rpm.spec
index 5db9ef79c..ca213854f 100644
--- a/packaging/rpm.spec
+++ b/packaging/rpm.spec
@@ -1,4 +1,4 @@
-%define rpmlibdir %{_prefix}/lib
+%define rpmlibdir %{_libdir}
%define rpmhome %{rpmlibdir}/rpm
Name: rpm
@@ -102,10 +102,10 @@ This package contains the MSM security plugin for rpm that performs
security-related functionality.
%post security-plugin
-echo "%__transaction_plugins msm" >> /usr/lib/rpm/macros
-echo "%__plugindir %{_libdir}/rpm-plugins" >> /usr/lib/rpm/macros
-echo "%__transaction_msm %{__plugindir}/msm.so" >> /usr/lib/rpm/macros
-echo "%__transaction_msm_default_policy %{_libdir}/rpm-plugins/msm-device-sec-policy" >> /usr/lib/rpm/macros
+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
@@ -137,6 +137,10 @@ cp -a %{SOURCE4} tizen_macros
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
@@ -154,7 +158,8 @@ export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections"
--enable-shared \
--enable-python \
--with-vendor=tizen \
- --with-msm
+ --with-msm \
+ --with-rpmconfigdir=%{rpmhome}
make %{?_smp_mflags}
@@ -214,8 +219,8 @@ for i in %{_datadir}/automake-*/*; do
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
@@ -231,6 +236,8 @@ sh %{buildroot}%{rpmhome}/find-lang.sh %{buildroot} rpm
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
diff --git a/rpm.am b/rpm.am
index d3bad8796..5722e1f10 100644
--- a/rpm.am
+++ b/rpm.am
@@ -1,7 +1,6 @@
# Internal binaries
-## HACK: It probably should be $(libexecdir)/rpm or $(libdir)/rpm
-rpmlibexecdir = $(prefix)/lib/rpm
+rpmlibexecdir = $(libdir)/rpm
# Host independent config files
## HACK: it probably should be $(datadir)/rpm
-rpmconfigdir = $(prefix)/lib/rpm
+rpmconfigdir = $(libdir)/rpm
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index e8ff02f02..84629dc04 100644
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -110,6 +110,7 @@ LINKSFILE="$BUILDDIR/debuglinks.list"
> "$LINKSFILE"
debugdir="${RPM_BUILD_ROOT}/usr/lib/debug"
+tooldir=$(rpm --eval %{_rpmconfigdir})
strip_to_debug()
{
@@ -311,7 +312,7 @@ while read nlinks inum f; do
echo "extracting debug info from $f"
id=$($(DEBUGEDIT=$(which debugedit 2>/dev/null); \
- echo ${DEBUGEDIT:-/usr/lib/rpm/debugedit}) -b "$RPM_BUILD_DIR" \
+ echo ${DEBUGEDIT:-${tooldir}/debugedit}) -b "$RPM_BUILD_DIR" \
-d /usr/src/debug -i -l "$SOURCEFILE" "$f") || exit
if [ $nlinks -gt 1 ]; then
eval linkedid_$inum=\$id