Accepting request 74046 from home:fcrozat:systemd

- update brp.diff to not convert /sbin/init to absolute symlink
  (needed for kiwi and systemd).

OBS-URL: https://build.opensuse.org/request/show/74046
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=130
This commit is contained in:
Cristian Rodríguez 2011-06-17 16:31:03 +00:00 committed by Git OBS Bridge
parent cea6411dc9
commit 6839977296
4 changed files with 54 additions and 19 deletions

View File

@ -1,7 +1,9 @@
SUSE specific brp script patches SUSE specific brp script patches
--- ./scripts/Makefile.am.orig 2010-12-03 12:11:57.000000000 +0000 Index: scripts/Makefile.am
+++ ./scripts/Makefile.am 2011-05-11 14:31:45.000000000 +0000 ===================================================================
--- scripts/Makefile.am.orig
+++ scripts/Makefile.am
@@ -6,6 +6,7 @@ CLEANFILES = @@ -6,6 +6,7 @@ CLEANFILES =
EXTRA_DIST = \ EXTRA_DIST = \
@ -18,8 +20,10 @@ SUSE specific brp script patches
brp-strip brp-strip-comment-note brp-python-hardlink \ brp-strip brp-strip-comment-note brp-python-hardlink \
brp-strip-shared brp-strip-static-archive \ brp-strip-shared brp-strip-static-archive \
check-files check-prereqs \ check-files check-prereqs \
--- ./scripts/brp-lib64-linux.orig 2011-05-11 14:30:08.000000000 +0000 Index: scripts/brp-lib64-linux
+++ ./scripts/brp-lib64-linux 2011-05-11 14:30:08.000000000 +0000 ===================================================================
--- /dev/null
+++ scripts/brp-lib64-linux
@@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
+#!/bin/bash +#!/bin/bash
+# script checks wether package is 64-bit clean +# script checks wether package is 64-bit clean
@ -63,8 +67,22 @@ SUSE specific brp script patches
+ fi + fi
+done +done
+exit 0 +exit 0
--- ./scripts/brp-strip-comment-note.orig 2010-12-03 12:11:57.000000000 +0000 Index: scripts/brp-strip
+++ ./scripts/brp-strip-comment-note 2011-05-11 14:30:08.000000000 +0000 ===================================================================
--- scripts/brp-strip.orig
+++ scripts/brp-strip
@@ -15,6 +15,7 @@ esac
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
grep -v ' shared object,' | \
+ grep -v '/lib/modules/' | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
$STRIP -g "$f" || :
done
Index: scripts/brp-strip-comment-note
===================================================================
--- scripts/brp-strip-comment-note.orig
+++ scripts/brp-strip-comment-note
@@ -16,6 +16,8 @@ esac @@ -16,6 +16,8 @@ esac
# for already stripped elf files in the build root # for already stripped elf files in the build root
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
@ -74,19 +92,11 @@ SUSE specific brp script patches
sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do sed -n -e 's/^\(.*\):[ ]*ELF.*, stripped/\1/p'`; do
note="-R .note" note="-R .note"
if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \ if $OBJDUMP -h $f | grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
--- ./scripts/brp-strip.orig 2010-12-03 12:11:57.000000000 +0000 Index: scripts/brp-symlink
+++ ./scripts/brp-strip 2011-05-11 14:30:08.000000000 +0000 ===================================================================
@@ -15,6 +15,7 @@ esac --- /dev/null
for f in `find $RPM_BUILD_ROOT -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ +++ scripts/brp-symlink
grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \ @@ -0,0 +1,186 @@
grep -v ' shared object,' | \
+ grep -v '/lib/modules/' | \
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
$STRIP -g "$f" || :
done
--- ./scripts/brp-symlink.orig 2011-05-11 14:30:08.000000000 +0000
+++ ./scripts/brp-symlink 2011-05-11 14:30:08.000000000 +0000
@@ -0,0 +1,184 @@
+#!/bin/sh +#!/bin/sh
+ +
+# Task: go through the files in $RPM_BUILD_ROOT and +# Task: go through the files in $RPM_BUILD_ROOT and
@ -176,6 +186,8 @@ SUSE specific brp script patches
+ continue;; + continue;;
+ */share/texmf/*|/usr/share/terminfo/*) + */share/texmf/*|/usr/share/terminfo/*)
+ continue;; + continue;;
+ /sbin/init,*) # don't create absolute symlink for /sbin/init
+ continue;;
+ *share/automake-*) + *share/automake-*)
+ echo "ERROR: link target $link points into automake directory" + echo "ERROR: link target $link points into automake directory"
+ echo " You might want to add a -c to the automake call (or just" + echo " You might want to add a -c to the automake call (or just"

View File

@ -33,6 +33,7 @@ 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
%description %description
The rpm-python package contains a module that permits applications The rpm-python package contains a module that permits applications
written in the Python programming language to use the interface written in the Python programming language to use the interface
@ -51,6 +52,7 @@ Authors:
%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 rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/lib
@ -64,11 +66,15 @@ 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 %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/python*/*/* %{_libdir}/python*/*/*
%changelog %changelog

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Jun 17 11:14:38 UTC 2011 - fcrozat@suse.com
- update brp.diff to not convert /sbin/init to absolute symlink
(needed for kiwi and systemd).
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 8 12:02:51 CEST 2011 - mls@suse.de Wed Jun 8 12:02:51 CEST 2011 - mls@suse.de

View File

@ -123,6 +123,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
# avoid bootstrapping problem # avoid bootstrapping problem
%define _binary_payload w9.bzdio %define _binary_payload w9.bzdio
%description %description
RPM Package Manager is the main tool for managing the software packages RPM Package Manager is the main tool for managing the software packages
of the SuSE Linux distribution. of the SuSE Linux distribution.
@ -146,6 +147,7 @@ Group: System/Packages
Requires: rpm = %{version} Requires: rpm = %{version}
Requires: popt-devel Requires: popt-devel
%description devel %description devel
This package contains the RPM C library and header files. These This package contains the RPM C library and header files. These
development files will simplify the process of writing programs which development files will simplify the process of writing programs which
@ -195,6 +197,7 @@ cp -a %{SOURCE4} suse_macros
rm -f m4/libtool.m4 rm -f m4/libtool.m4
rm -f m4/lt*.m4 rm -f m4/lt*.m4
%build %build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -ffunction-sections" export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -ffunction-sections"
export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections"
@ -214,6 +217,7 @@ rm po/de.gmo
make %{?_smp_mflags} make %{?_smp_mflags}
make convertdb1 make convertdb1
%install %install
mkdir -p $RPM_BUILD_ROOT/usr/lib mkdir -p $RPM_BUILD_ROOT/usr/lib
mkdir -p $RPM_BUILD_ROOT/usr/share/locale mkdir -p $RPM_BUILD_ROOT/usr/share/locale
@ -287,9 +291,11 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la
sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%post %post
%{fillup_only -an services} %{fillup_only -an services}
%run_permissions %run_permissions
@ -303,12 +309,14 @@ fi
# delete no longer maintained databases # delete no longer maintained databases
rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpm/Provideversion rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion var/lib/rpm/Provideversion
%postun %postun
%{insserv_cleanup} %{insserv_cleanup}
%verifyscript %verifyscript
%verify_permissions -f /usr/lib/rpm/permlist %verify_permissions -f /usr/lib/rpm/permlist
%files -f rpm.lang %files -f rpm.lang
%defattr(-,root,root) %defattr(-,root,root)
%doc CHANGES.gz COPYING GROUPS %doc CHANGES.gz COPYING GROUPS
@ -336,6 +344,7 @@ rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion va
%verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS/* %verify(not mode) %dir %attr(755,root,root) /usr/src/packages/RPMS/*
/var/adm/fillup-templates/sysconfig.services-rpm /var/adm/fillup-templates/sysconfig.services-rpm
%files devel %files devel
%defattr(644,root,root,755) %defattr(644,root,root,755)
/usr/include/rpm /usr/include/rpm
@ -345,4 +354,6 @@ rm -f var/lib/rpm/Filemd5s var/lib/rpm/Filedigests var/lib/rpm/Requireversion va
%{_libdir}/librpmsign.so %{_libdir}/librpmsign.so
%{_libdir}/pkgconfig/rpm.pc %{_libdir}/pkgconfig/rpm.pc
%changelog %changelog