- Split SUSE macros and some helpers into rpm-config-SUSE

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=472
This commit is contained in:
Michael Schröder 2018-07-04 12:04:51 +00:00 committed by Git OBS Bridge
parent 0dd6570819
commit 7e6b724231
13 changed files with 59 additions and 896 deletions

View File

@ -1,13 +1,3 @@
--- ./scripts/Makefile.am.orig 2017-10-05 10:04:57.571602038 +0000
+++ ./scripts/Makefile.am 2017-12-01 14:29:56.760975726 +0000
@@ -27,6 +27,7 @@ EXTRA_DIST = \
rpmconfig_SCRIPTS = \
brp-compress brp-python-bytecompile brp-java-gcjcompile \
brp-strip brp-strip-comment-note brp-python-hardlink \
+ brp-suse \
brp-strip-shared brp-strip-static-archive \
check-files check-prereqs \
check-buildroot check-rpaths check-rpaths-worker \
--- ./scripts/brp-strip-comment-note.orig 2017-08-10 08:08:07.150108692 +0000
+++ ./scripts/brp-strip-comment-note 2017-12-01 14:29:56.761975721 +0000
@@ -16,6 +16,8 @@ esac
@ -29,19 +19,3 @@
sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped.*/\1/p'`; do
$STRIP -g "$f" || :
done
--- ./scripts/brp-suse.orig 2017-12-01 14:29:56.762975717 +0000
+++ ./scripts/brp-suse 2017-12-01 14:29:56.761975721 +0000
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+# If using normal root, avoid changing anything:
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+ exit 0
+fi
+
+for script in /usr/lib/rpm/brp-suse.d/brp*; do
+ if test -x "$script"; then
+ echo "calling $script"
+ $script || exit 1
+ fi
+done

View File

@ -1,6 +1,6 @@
--- ./lib/transaction.c.orig 2017-12-01 16:02:14.150972487 +0000
+++ ./lib/transaction.c 2017-12-01 16:02:56.139850122 +0000
@@ -1460,7 +1460,9 @@ rpmRC runScript(rpmts ts, rpmte te, Head
--- ./lib/transaction.c.orig 2018-07-02 14:51:41.328051671 +0000
+++ ./lib/transaction.c 2018-07-02 14:51:46.264038824 +0000
@@ -1462,7 +1462,9 @@ rpmRC runScript(rpmts ts, rpmte te, Head
int warn_only = (stag != RPMTAG_PREIN &&
stag != RPMTAG_PREUN &&
stag != RPMTAG_PRETRANS &&
@ -11,9 +11,9 @@
rpmdb rdb = rpmtsGetRdb(ts);
/* Fake up a transaction element for triggers from rpmdb */
--- ./macros.in.orig 2017-12-01 16:02:14.170972428 +0000
+++ ./macros.in 2017-12-01 16:02:56.140850119 +0000
@@ -1468,6 +1468,11 @@ end}
--- ./macros.in.orig 2018-07-02 14:51:41.340051640 +0000
+++ ./macros.in 2018-07-02 14:51:46.264038824 +0000
@@ -1290,5 +1290,10 @@ end}
%{expand:%__scm_setup_%{__scm} %{!-v:-q}}\
%{!-N:%autopatch %{-v} %{-p:-p%{-p*}}}
@ -24,4 +24,3 @@
+
# \endverbatim
#*/

View File

@ -5,7 +5,7 @@
debuginfo.attr desktop.attr elf.attr font.attr libtool.attr metainfo.attr \
perl.attr perllib.attr pkgconfig.attr python.attr ocaml.attr script.attr \
- mono.attr
+ mono.attr elflib.attr firmware.attr kernel.attr kmp.attr sysvinit.attr
+ mono.attr elflib.attr
EXTRA_DIST = $(fattrs_DATA)
--- ./fileattrs/elf.attr.orig 2017-12-01 15:46:28.171720501 +0000
@ -24,23 +24,6 @@
+%__elflib_requires %{_rpmconfigdir}/elfdeps --assume-exec --requires %{?__filter_GLIBC_PRIVATE:--filter-private}
+%__elflib_magic ^(setuid )?(setgid )?(sticky )?ELF (32|64)-bit.*shared object
+%__elflib_exclude_path ^/usr/lib/debug/
--- ./fileattrs/firmware.attr.orig 2017-12-01 15:46:28.171720501 +0000
+++ ./fileattrs/firmware.attr 2017-12-01 15:46:28.171720501 +0000
@@ -0,0 +1,2 @@
+%__firmware_provides %{_rpmconfigdir}/firmware.prov
+%__firmware_path /lib/firmware/
--- ./fileattrs/kernel.attr.orig 2017-12-01 15:46:28.172720497 +0000
+++ ./fileattrs/kernel.attr 2017-12-01 15:46:28.172720497 +0000
@@ -0,0 +1,2 @@
+%__kernel_provides %{_rpmconfigdir}/find-provides.ksyms --tumbleweed %{?sle_version:0}%{!?sle_version:1}
+%__kernel_path ^(/lib/modules/[^/]*/kernel/.*\.ko(\.gz)?|/boot/vmlinu[xz].*)$
--- ./fileattrs/kmp.attr.orig 2017-12-01 15:46:28.172720497 +0000
+++ ./fileattrs/kmp.attr 2017-12-01 15:46:28.172720497 +0000
@@ -0,0 +1,4 @@
+%__kmp_provides %{_rpmconfigdir}/find-provides.ksyms --tumbleweed %{?sle_version:0}%{!?sle_version:1}
+%__kmp_requires %{_rpmconfigdir}/find-requires.ksyms --tumbleweed %{?sle_version:0}%{!?sle_version:1}
+%__kmp_supplements %{_rpmconfigdir}/find-supplements.ksyms
+%__kmp_path ^/lib/modules/[^/]*/(updates|extra)/.*\.ko(\.gz)?
--- ./fileattrs/perl.attr.orig 2017-08-10 08:08:07.113108701 +0000
+++ ./fileattrs/perl.attr 2017-12-01 15:46:28.172720497 +0000
@@ -1,3 +1,4 @@
@ -59,8 +42,3 @@
%__perllib_magic ^Perl[[:digit:]] module source.*
%__perllib_path \\.pm$
%__perllib_flags magic_and_path
--- ./fileattrs/sysvinit.attr.orig 2017-12-01 15:46:28.172720497 +0000
+++ ./fileattrs/sysvinit.attr 2017-12-01 15:46:28.172720497 +0000
@@ -0,0 +1,2 @@
+%__sysvinit_provides %{_rpmconfigdir}/sysvinitdeps.sh --provides
+%__sysvinit_path ^/etc/init\.d/

View File

@ -1,134 +0,0 @@
--- ./scripts/Makefile.am.orig 2018-02-14 09:42:12.958726157 +0000
+++ ./scripts/Makefile.am 2018-02-14 09:43:26.605515718 +0000
@@ -19,6 +19,7 @@ EXTRA_DIST = \
tgpg vpkg-provides.sh \
find-requires find-provides \
find-requires.php find-provides.php \
+ find-requires.ksyms find-provides.ksyms \
mono-find-requires mono-find-provides \
ocaml-find-requires.sh ocaml-find-provides.sh \
pkgconfigdeps.sh libtooldeps.sh metainfo.prov \
@@ -36,6 +37,7 @@ rpmconfig_SCRIPTS = \
find-lang.sh find-requires find-provides \
perl.prov perl.req pythondeps.sh pythondistdeps.py \
python-macro-helper \
+ find-requires.ksyms find-provides.ksyms \
metainfo.prov \
mono-find-requires mono-find-provides \
pkgconfigdeps.sh libtooldeps.sh \
--- ./scripts/find-provides.ksyms.orig 2018-02-14 09:42:54.757606752 +0000
+++ ./scripts/find-provides.ksyms 2018-02-14 09:42:39.165651303 +0000
@@ -0,0 +1,81 @@
+#! /bin/bash
+
+IFS=$'\n'
+
+is_tumbleweed=false
+
+if test "$1" = "--tumbleweed"; then
+ if test "$2" -gt 0; then
+ is_tumbleweed=true
+ fi
+ shift 2
+fi
+
+if ! $is_tumbleweed; then
+ trap 'rm -f "$tmp"' EXIT
+ tmp=$(mktemp)
+fi
+
+
+while read f; do
+ test -e "$f" || continue
+ is_module=""
+ case "$f" in
+ *.debug)
+ continue
+ ;;
+ */boot/vmlinu[xz]-*)
+ flavor=${f##*/vmlinu[xz]-}
+ flavor=${flavor%.gz}
+ echo "kernel-uname-r = $flavor"
+ version=${flavor}
+ flavor=${flavor##*-}
+ ;;
+ */lib/modules/*/*.ko | */lib/modules/*/*.ko.gz | */boot/vmlinu[xz]*)
+ is_module="1"
+ ;;
+ *)
+ continue
+ esac
+ if $is_tumbleweed; then
+ continue
+ fi
+ unzip=false
+ case "$f" in
+ *.gz | */boot/vmlinuz*)
+ unzip=true
+ esac
+ if $unzip && gzip -cd "$f" >"$tmp"; then
+ f=$tmp
+ fi
+ if test -z "$flavor" -a -n "$is_module" ; then
+ flavor=$(/sbin/modinfo -F vermagic "$f")
+ flavor=${flavor%% *}
+ version=${flavor}
+ flavor=${flavor##*-}
+ fi
+ if test -z "$flavor"; then
+ echo "warning: cannot determine kernel flavor from $(/sbin/modinfo -F vermagic "$f" 2>&1)" >&2
+ continue
+ fi
+ objdir=$(readlink /lib/modules/$version/build)
+ objdir_build=$RPM_BUILD_ROOT$(readlink $RPM_BUILD_ROOT/lib/modules/$version/build)
+ for i in $objdir_build $objdir ; do
+ ksym_provides=$i/scripts/mod/ksym-provides
+ [ -x $ksym_provides ] && break
+ done
+ if [ -x $ksym_provides ] ; then
+ $ksym_provides $flavor $f
+ else
+ major=${version%%.*}
+ sub=${version#*.}
+ sub=${sub%%.*}
+ if [ "$major" -ge 4 -a "$sub" -ge 10 ] ; then
+ echo "error: cannot determine ksym provides of $f - missing ksym-povides tool." >&2
+ else
+ nm "$f" \
+ | sed -r -ne "s/^0*([0-9a-f]+) A __crc_(.+)/ksym($flavor:\\2) = \\1/p"
+ fi
+ fi
+done \
+| sort -u
--- ./scripts/find-requires.ksyms.orig 2018-02-14 09:43:00.437590470 +0000
+++ ./scripts/find-requires.ksyms 2018-02-14 09:42:45.621632854 +0000
@@ -0,0 +1,29 @@
+#! /bin/bash
+
+IFS=$'\n'
+
+is_tumbleweed=false
+
+if test "$1" = "--tumbleweed"; then
+ if test "$2" -gt 0; then
+ is_tumbleweed=true
+ fi
+ shift 2
+fi
+
+if ! $is_tumbleweed && ! test -e /sbin/modprobe; then
+ cat > /dev/null
+ exit 0
+fi
+
+for f in $(grep -E '/lib/modules/.+\.ko$' | grep -v '/lib/modules/[^/]*/kernel/'); do
+ flavor=${f#*/lib/modules/}
+ flavor=${flavor%%/*}
+ if $is_tumbleweed; then
+ echo "kernel-uname-r = $flavor"
+ continue
+ fi
+ flavor=${flavor##*-}
+ /sbin/modprobe --dump-modversions "$f" \
+ | sed -r -ne "s/^0x0*([0-9a-f]+)[[:blank:]]+(.+)/ksym($flavor:\\2) = \\1/p"
+done | sort -u

26
findsupplements.diff Normal file
View File

@ -0,0 +1,26 @@
--- ./scripts/Makefile.am.orig 2018-07-02 14:43:19.345357110 +0000
+++ ./scripts/Makefile.am 2018-07-02 14:43:47.245284542 +0000
@@ -17,7 +17,7 @@ EXTRA_DIST = \
python-macro-helper \
rpmdb_loadcvt rpm.daily rpm.log rpm.supp rpm2cpio.sh \
tgpg vpkg-provides.sh \
- find-requires find-provides \
+ find-requires find-provides find-supplements \
find-requires.php find-provides.php \
mono-find-requires mono-find-provides \
ocaml-find-requires.sh ocaml-find-provides.sh \
@@ -32,7 +32,7 @@ rpmconfig_SCRIPTS = \
check-files check-prereqs \
check-buildroot check-rpaths check-rpaths-worker \
debuginfo.prov \
- find-lang.sh find-requires find-provides \
+ find-lang.sh find-requires find-provides find-supplements \
perl.prov perl.req pythondeps.sh pythondistdeps.py \
python-macro-helper \
metainfo.prov \
--- ./scripts/find-supplements.orig 2018-07-02 14:43:12.877373928 +0000
+++ ./scripts/find-supplements 2018-07-02 14:43:59.325253127 +0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/lib/rpm/rpmdeps --define="_use_internal_dependency_generator 1" --supplements

View File

@ -1,13 +0,0 @@
Index: scripts/firmware.prov
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ scripts/firmware.prov 2011-06-08 13:28:33.117204009 +0200
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Add firmware files in /lib/firmware into RPM provides
+
+while read instfile ; do
+ case $instfile in
+ */lib/firmware/*) test -f "$instfile" && echo "firmware(${instfile##*/lib/firmware/})" ;;
+ esac
+done

View File

@ -1,38 +0,0 @@
--- ./scripts/Makefile.am.orig 2017-12-01 15:44:10.626118239 +0000
+++ ./scripts/Makefile.am 2017-12-01 15:44:14.182107984 +0000
@@ -23,6 +23,7 @@ EXTRA_DIST = \
ocaml-find-requires.sh ocaml-find-provides.sh \
pkgconfigdeps.sh libtooldeps.sh metainfo.prov \
fontconfig.prov desktop-file.prov script.req \
+ sysvinitdeps.sh \
macros.perl macros.php macros.python
rpmconfig_SCRIPTS = \
@@ -41,6 +42,7 @@ rpmconfig_SCRIPTS = \
pkgconfigdeps.sh libtooldeps.sh \
ocaml-find-requires.sh ocaml-find-provides.sh \
fontconfig.prov desktop-file.prov script.req \
+ sysvinitdeps.sh \
rpmdb_loadcvt rpm2cpio.sh tgpg
rpmconfig_DATA = \
--- ./scripts/sysvinitdeps.sh.orig 2017-12-01 15:44:14.183107975 +0000
+++ ./scripts/sysvinitdeps.sh 2017-12-01 15:44:14.183107975 +0000
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+[ "$1" = '-P' -o "$1" = '--provides' ] || {
+ cat > /dev/null
+ exit 0
+}
+
+while read file; do
+ case $file in
+ */etc/init.d/*)
+ provs=`grep '^# *Provides:' $file | sed 's,^.*:,,'`
+ for p in $provs; do
+ echo "sysvinit($p)"
+ done
+ ;;
+ esac
+done

View File

@ -1,5 +1,5 @@
--- ./macros.in.orig 2018-05-07 14:27:45.991050600 +0000
+++ ./macros.in 2018-05-07 14:28:12.426978605 +0000
--- ./macros.in.orig 2018-07-02 14:46:14.912900534 +0000
+++ ./macros.in 2018-07-02 14:50:35.356223235 +0000
@@ -184,7 +184,7 @@
%{?_unique_build_ids:--build-id-seed "%{VERSION}-%{RELEASE}"} \\\
%{?_unique_debug_names:--unique-debug-suffix "-%{VERSION}-%{RELEASE}.%{_arch}"} \\\
@ -80,7 +80,7 @@
#
# Use internal dependency generator rather than external helpers?
@@ -566,16 +581,22 @@ package or when debugging this package.\
@@ -566,6 +581,10 @@ package or when debugging this package.\
# Directories whose contents should be considered as documentation.
%__docdir_path %{_datadir}/doc:%{_datadir}/man:%{_datadir}/info:%{_datadir}/gtk-doc/html:%{?_docdir}:%{?_mandir}:%{?_infodir}:%{?_javadocdir}:/usr/doc:/usr/man:/usr/info:/usr/X11R6/man
@ -91,21 +91,15 @@
#
# Path to scripts to autogenerate package dependencies,
#
# Note: Used iff _use_internal_dependency_generator is zero.
#%__find_provides %{_rpmconfigdir}/rpmdeps --provides
#%__find_requires %{_rpmconfigdir}/rpmdeps --requires
-%__find_provides %{_rpmconfigdir}/find-provides
-%__find_requires %{_rpmconfigdir}/find-requires
+%__find_provides %{_rpmconfigdir}/find-provides %name
+%__find_requires %{_rpmconfigdir}/find-requires %name
@@ -576,6 +595,7 @@ package or when debugging this package.\
%__find_requires %{_rpmconfigdir}/find-requires
#%__find_conflicts ???
#%__find_obsoletes ???
+#%__find_supplements ???
+#%__find_enhances ???
+%__find_supplements %{_rpmconfigdir}/find-supplements
#
# Path to file attribute classifications for automatic dependency
@@ -654,10 +675,10 @@ package or when debugging this package.\
@@ -654,10 +674,10 @@ package or when debugging this package.\
# Misc BDB tuning options
%__dbi_other mp_mmapsize=128Mb mp_size=1Mb
@ -118,7 +112,7 @@
#==============================================================================
# ---- GPG/PGP/PGP5 signature macros.
@@ -969,7 +990,7 @@ package or when debugging this package.\
@@ -969,7 +989,7 @@ package or when debugging this package.\
%_build_vendor %{_host_vendor}
%_build_os %{_host_os}
%_host @host@
@ -127,7 +121,7 @@
%_host_cpu @host_cpu@
%_host_vendor @host_vendor@
%_host_os @host_os@
@@ -1095,7 +1116,9 @@ package or when debugging this package.\
@@ -1095,7 +1115,9 @@ package or when debugging this package.\
#------------------------------------------------------------------------------
# arch macro for all supported ARM processors
@ -138,212 +132,3 @@
#------------------------------------------------------------------------------
# arch macro for 32-bit MIPS processors
@@ -1125,6 +1148,183 @@ package or when debugging this package.\
# arch macro for all supported Alpha processors
%alpha alpha alphaev56 alphaev6 alphaev67
+# More useful perl macros (from Raul Dias <rsd@swi.com.br>)
+#
+%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!")
+%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!")
+%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!")
+%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!")
+%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!")
+%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!")
+%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!")
+%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")
+%perl_prefix %{buildroot}
+
+#------------------------------------------------------------------------------
+# Python specific macro definitions (originally from PLD).
+#
+%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
+%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
+%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
+%py_incdir %{py_prefix}/include/python%{py_ver}
+%py_sitedir %{py_libdir}/site-packages
+%py_compile(O) \
+find %1 -name '*.pyc' -exec rm -f {} \\; \
+python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
+%{-O: \
+find %1 -name '*.pyo' -exec rm -f {} \\; \
+python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
+}
+%py_requires(d) \
+%define minver %py_ver \
+%define maxver %(python -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \
+BuildRequires: python %{-d:python-devel} \
+PreReq: python >= %minver, python < %maxver
+
+#------------------------------------------------------------------------------
+#
+# RPM macros for Java applications.
+#
+# JPackage Project <http://www.jpackage.org/>
+# David Walluck <david@anti-microsoft.org>
+# Ville Skyttä <ville.skytta@iki.fi>
+# Nicolas Mailhot <Nicolas.Mailhot@laPoste.net>
+#
+# $Id: macros.jpackage,v 1.1.2.5 2003/08/30 13:24:58 scop Exp $
+#
+
+# ---- default Java directories
+
+#
+# Root directory where all Java VMs/SDK/JREs are installed.
+#
+%_jvmdir %{_libdir}/jvm
+
+#
+# Root directory where all Java VMs/SDK/JREs expose their jars
+#
+%_jvmjardir %{_libdir}/jvm-exports
+
+#
+# Root directory for all Java VM/SDK/JRE's private things.
+#
+%_jvmprivdir %{_libdir}/jvm-private
+
+#
+# Directory where arch and version independent jars are installed.
+# This has already been integrated in RH macros following our request.
+#
+# By extension:
+# %{_javadir}-ext:
+# - version dependent jars
+# %{_javadir}-x.y.z:
+# - jars for Java standard x.y.z (usually symlinks to %{_javadir}-ext)
+# %{_javadir}-utils:
+# - Java-related scripts
+#
+# To simplify things only %{_javadir} is defined.
+#
+%_javadir %{_datadir}/java
+
+#
+# Directory where arch-specific (JNI) version-independent jars are installed.
+#
+# By extension:
+# %{_jnidir}-ext:
+# - version dependent jars
+# %{_jnidir}-x.y.z:
+# - jars for Java standard x.y.z (usually symlinks to %{_jnidir}-ext)
+# To simplify things only %{_jnidir} is defined.
+#
+%_jnidir %{_libdir}/java
+
+#
+# Root directory where all javadoc is installed. Also already in RH macros.
+#
+%_javadocdir %{_datadir}/javadoc
+
+#
+# Current default JVM home.
+#
+%java_home %(. %{_javadir}-utils/java-functions; set_jvm; echo $JAVA_HOME)
+
+# ---- default Java commands
+
+%ant JAVA_HOME=%{java_home} ant
+%jar %{java_home}/bin/jar
+%java %(. %{_javadir}-utils/java-functions; set_javacmd; echo $JAVACMD)
+%javac %{java_home}/bin/javac
+%javadoc %{java_home}/bin/javadoc
+
+# ---- Java extension handling macros
+
+#
+# add_jvm_extension should be used in %install by extension packages to declare
+# what extension jars they provide.
+#
+# For example a package that provides foo.jar which is the bar extension
+# under java 1.2 and 1.3 should do a:
+#
+# %install
+# ... # create foo.jar in %{javadir}-ext
+# %add_jvm_extension foo bar 1.2 1.3
+#
+# %files
+# %{javadir}-ext/foo.jar
+# %{javadir}-*/bar.jar
+#
+%add_jvm_extension JAVA_LIBDIR=%{buildroot}/%{_javadir} %{_bindir}/jvmjar -l
+
+#
+# Standard JPackage script
+#
+# This is kind of tasteless and should be moved to an external template
+#
+# %1 main class
+# %2 flags
+# %3 options
+# %4 jars (separated by ':')
+# %5 the name of script you wish to create
+# %6 whether to prefer a jre over a sdk when finding a jvm
+#
+%jpackage_script() \
+install -d -m 755 $RPM_BUILD_ROOT%{_bindir}\
+cat > $RPM_BUILD_ROOT%{_bindir}/%5 << EOF \
+#!/bin/sh\
+#\
+# %{name} script\
+# JPackage Project <http://www.jpackage.org/>\
+\
+# Source functions library\
+_prefer_jre="%{?6}"\
+. %{_javadir}-utils/java-functions\
+\
+# Source system prefs\
+if [ -f %{_sysconfdir}/java/%{name}.conf ] ; then\
+ . %{_sysconfdir}/java/%{name}.conf\
+fi\
+\
+# Source user prefs\
+if [ -f \\$HOME/.%{name}rc ] ; then\
+ . \\$HOME/.%{name}rc\
+fi\
+\
+# Configuration\
+MAIN_CLASS=%1\
+BASE_FLAGS=%2\
+BASE_OPTIONS=%3\
+BASE_JARS="%(echo %4 | sed -e 's,:, ,g')"\
+\
+# Set parameters\
+set_jvm\
+set_classpath \\$BASE_JARS\
+set_flags \\$BASE_FLAGS\
+set_options \\$BASE_OPTIONS\
+\
+# Let's start\
+run "\\$@"\
+EOF
+
#------------------------------------------------------------------------------
# arch macro for all supported PowerPC 64 processors
%power64 ppc64 ppc64p7 ppc64le
@@ -1257,3 +1457,24 @@ end}
# \endverbatim
#*/
+
+
+#------------------------------------------------------------------------
+# standard build service macros
+#
+%ext_info .gz
+%ext_man .gz
+
+%info_add() test -x /sbin/install-info -a -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
+%{nil}
+
+%info_del() test -x /sbin/install-info -a ! -f %{?2}%{?!2:%{_infodir}}/%{1}%ext_info && /sbin/install-info --quiet --delete --info-dir=%{?2}%{?!2:%{_infodir}} %{?2}%{?!2:%{_infodir}}/%{1}%ext_info \
+%{nil}
+
+%service_add() %{fillup_and_insserv %{1}}
+
+%user_group_add() \
+/usr/sbin/groupadd -r %{1} 2>/dev/null || :\
+/usr/sbin/useradd -r -g %{1} -d %{2} -s %{3} -c %{4} %{1} 2>/dev/null || :\
+%{nil}
+

View File

@ -1,35 +0,0 @@
Module aliases (modinfo -F alias <module>) may contain special characters
that rpm does not allow in dependencies, such as commas. Encode those as
%XX to avoid generating broken dependencies.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
--- scripts/find-supplements.ksyms.orig
+++ scripts/find-supplements.ksyms
@@ -35,10 +35,26 @@ combine_modaliases() {
print_modaliases "$class" "$variants" "$pos"
}
+# Encode all characters other than [*:a-zA-Z0-9] in stdin as %XX.
+# (This includes the % character itself, which becomes %25.)
+hexenc() {
+ local line hex
+
+ while read line; do
+ set -- "" "$line"
+ while [[ "$2" =~ ([*:a-zA-Z0-9]*)([^*:a-zA-Z0-9])(.*) ]]; do
+ hex=$(echo -n "${BASH_REMATCH[2]}" | hexdump -e '"%X"')
+ set -- "$1${BASH_REMATCH[1]}%$hex" "${BASH_REMATCH[3]}"
+ done
+ echo "$1$2"
+ done
+}
+
for module in $(grep -E '/lib/modules/.+\.ko$' | grep -v '/lib/modules/[^/]*/kernel/'); do
vermagic=$(/sbin/modinfo -F vermagic "$module")
krel=${vermagic%% *}
/sbin/modinfo -F alias "$module" \
+ | hexenc \
| sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p"
done \
| sort -u \

View File

@ -1,76 +0,0 @@
--- macros.in.orig
+++ macros.in
@@ -487,7 +487,7 @@ package or when debugging this package.\
%__find_requires %{_rpmconfigdir}/find-requires %name
#%__find_conflicts ???
#%__find_obsoletes ???
-#%__find_supplements ???
+%__find_supplements %{_rpmconfigdir}/find-supplements %name
#%__find_enhances ???
#
--- /dev/null
+++ scripts/find-supplements
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# This script reads filenames from STDIN and outputs any relevant provides
+# information that needs to be included in the package.
+IFS=$'\n'
+filelist=($(cat))
+
+#
+# --- Kernel module hardware identifiers
+# (e.g., modalias(pci:v0000109Ed00000878sv00000070sd0000FF01bc*sc*i*)
+[ -x /usr/lib/rpm/find-supplements.ksyms ] &&
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/find-supplements.ksyms "$@"
+
+exit 0
--- /dev/null
+++ scripts/find-supplements.ksyms
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+IFS=$'\n'
+
+print_modaliases() {
+ declare class=$1 variants=$2 pos=$3
+ if [ -n "$variants" ]; then
+ echo "${class:0:pos}[$variants]${class:pos+1}"
+ else
+ [ -z "$class" ] || echo "$class"
+ fi
+}
+
+combine_modaliases() {
+ declare tag class variants pos n
+ read class
+ while read tag; do
+ for ((n=0; n<${#class}; n++)); do
+ if [ "*" != "${class:n:1}" -a \
+ "${class:0:n}" = "${tag:0:n}" -a \
+ "${class:n+1}" = "${tag:n+1}" ] &&
+ ( [ -z "$pos" ] || [ $n = $pos ] ); then
+ variants="${variants:-${class:n:1}}${tag:n:1}"
+ pos=$n
+ break
+ fi
+ done
+ if [ $n -eq ${#class} ]; then
+ print_modaliases "$class" "$variants" "$pos"
+ variants=
+ pos=
+ class=$tag
+ fi
+ done
+ print_modaliases "$class" "$variants" "$pos"
+}
+
+for module in $(grep -E '/lib/modules/.+\.ko$' | grep -v '/lib/modules/[^/]*/kernel/'); do
+ vermagic=$(/sbin/modinfo -F vermagic "$module")
+ krel=${vermagic%% *}
+ /sbin/modinfo -F alias "$module" \
+ | sed -nre "s,(.+:.+),modalias(kernel-${krel##*-}:\\1),p"
+done \
+| sort -u \
+| combine_modaliases

View File

@ -1,287 +0,0 @@
# need to keep this around for a while
%suse_check %{nil}
# directories
%_infodir %{_prefix}/share/info
%_mandir %{_prefix}/share/man
%_sysconfdir /etc
%_localstatedir /var
%_defaultdocdir %{_usr}/share/doc/packages
%_fillupdir %{_usr}/share/fillup-templates
# package build macros
%make_install make install DESTDIR=%{?buildroot}
%makeinstall make DESTDIR=%{?buildroot:%{buildroot}} install
%insserv_prereq insserv sed
%fillup_prereq fillup coreutils grep diffutils
%install_info_prereq info
# this script calls all scripts in /usr/lib/rpm/brp-suse.d
%__os_install_post \
/usr/lib/rpm/brp-compress \
/usr/lib/rpm/brp-suse \
%{nil}
%restart_on_update() %{expand::%%service_del_postun %{?**}}
%stop_on_removal() %{expand:%%service_del_preun %{?**}}
# macro: %configure_kernel_source
#
#
%configure_kernel_source() \
if test -d /usr/src/linux ; then \
pushd /usr/src/linux \
test -f .config || cp arch/%_arch/defconfig.default .config \
yes "" | make oldconfig \
make dep \
popd \
fi \
%nil
%is_plus %(if test -f /.buildenv ; then source /.buildenv ; if [[ "$BUILD_BASENAME" == *+kde ]] ; then echo 1 ; else echo 0 ; fi ; else echo 0 ; fi)
%set_permissions(f:) \
if [ -x /usr/bin/chkstat ]; then \
/usr/bin/chkstat -n --set --system %{**} \
fi \
%nil
%verify_permissions(e:f:) \
/usr/bin/chkstat -n --warn --system %{**} 1>&2 \
%nil
%suse_update_libdir() \
if [ %_lib != lib ]; then \
for file in %{?*} ; do \
[ ! -e $file ] && echo "Error: $file does not exist!" && exit -1 \
[ -e $file.nolib64 ] && echo "Error: $file.nolib64 already exists!" && exit -1 \
cp $file $file.nolib64 \
echo "patching $file" \
sed -e "s,/lib\\\>,/%_lib,g" $file.nolib64 | sed -e "s,/%_lib/cpp,/lib/cpp,; s,/usr/%_lib/perl,/usr/lib/perl, ; s,/%_lib\\([\$-]\\),/lib\\1,g" > $file \
diff -u $file.nolib64 $file \
rm -f $file.nolib64 \
done; \
fi ; \
# macro: fillup_and_insserv
# do the fillup and insserv calls for postinstall
# options:
# -n (use first argument as name for fillup template filenames
# instead of package name)
# -f (skip fillup parts)
# -i (skip insserv parts)
# -y (default start-variable value to yes)
# Used only if X-UnitedLinux-Default-Enabled is not specified
# in the init script
# -Y (force_yes: always activate, discard setting before update)
# arguments:
# [if "-n" first argument as package name]
# Pairs of:
# main script name
# and
# name of (old) START variable (unless -s is given)
#
# template for variables into /etc/sysconfig/package:
# /usr/share/fillup-templates/sysconfig.package
%fillup_and_insserv(finpsyY) \
%{-p:echo "-p option for fillup_and_insserv no longer supported (ever only used on SL8.0)"; exit 1;} \
%{-s:echo "STARTVAR for fillup_and_insserv no longer supported (rc.config is gone since SL8.0)"; exit 1;} \
test -n "$FIRST_ARG" || FIRST_ARG=$1 \
%{-Y:FORCE_YES=1}%{!-Y:FORCE_YES=0} \
set -- %{?*} \
%{-n:PNAME=$1 ; shift }%{!-n:PNAME=%{name}} \
INSSRV_ARRAY="" \
while [ ${#*} -gt 0 ] ; do \
SCRIPTNAME=$1 \
shift \
SV_B='^### BEGIN INIT INFO' \
SV_E='^### END INIT INFO' \
SV_KW=Default-Enabled \
SV_VALUE=`sed -n -e "/$SV_B/,/$SV_E/{/^# [^[:space:]]*$SV_KW:[[:space:]]*\\([^[:space:]]*\\).*/s//\\1/p;}" < /etc/init.d/$SCRIPTNAME` \
test "$FORCE_YES" = "1" && SV_VALUE="yes" \
test -n "$SV_VALUE" || SV_VALUE=%{-y:"yes"}%{!-y:"no"} \
INSSRV_ARRAY="$INSSRV_ARRAY $SCRIPTNAME $SV_VALUE" \
done \
%{!-f: %{do_real_fillup}} \
%{!-i: %{add_start_if_needed $INSSRV_ARRAY } } \
%nil
# do_real_fillup: internal macro
# this part really calls fillup for the appropriate files
#
%do_real_fillup() \
SYSC_TEMPLATE=%{_fillupdir}/sysconfig.$PNAME \
# If template not in new %{_fillupdir}, fallback to old TEMPLATE_DIR \
if [ ! -f $SYSC_TEMPLATE ] ; then \
TEMPLATE_DIR=/var/adm/fillup-templates \
SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME \
fi \
SD_NAME="" \
%{sysc_fillup}
# add_start_if_needed: internally used by fillup_and_insserv
%add_start_if_needed() \
set -- %{?*} \
while [ ${#*} -gt 0 ] ; do \
SCRIPTNAME=$1 \
SV_VALUE=$2 \
shift 2 \
test -n "$SCRIPTNAME" -a -n "$SV_VALUE" || { echo "SCRIPTNAME or SV_VALUE unknown"; exit 1;} \
if test "$FIRST_ARG" = "1" -a "$SV_VALUE" = "no" ; then \
/sbin/insserv ${YAST_IS_RUNNING:+-f} -r /etc/init.d/$SCRIPTNAME \
elif test "$FIRST_ARG" = "1" -o "$FORCE_YES" = "1" ; then \
/sbin/insserv ${YAST_IS_RUNNING:+-f} /etc/init.d/$SCRIPTNAME \
fi \
done
# macro: insserv_cleanup
%insserv_cleanup() \
/sbin/insserv /etc/init.d
# macro: fillup_only
# do the fillup for sysconfig files
# template naming convention:
# .../fillup-templates/sysconfig.$NAME1[-$NAME2]
# NAME1: the name of the sysconfig-file
# NAME2: if needed (if more packages fill the
# same sysconfig file) the package name
# options:
# -n set sysconfig name manually
# -a use package name as $NAME2
# -s use second arg as package-name
# -d use a subdirectory of sysconfig
# (last arg as directory name)
%fillup_only(dans) \
%{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} \
%{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} \
SYSC_TEMPLATE=%{_fillupdir}/sysconfig.$PNAME$SUBPNAME \
# If template not in new %{_fillupdir}, fallback to old TEMPLATE_DIR \
if [ ! -f $SYSC_TEMPLATE ] ; then \
TEMPLATE_DIR=/var/adm/fillup-templates \
SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME \
fi \
SD_NAME="" \
%{-d:%{-s:SD_NAME=%{3}/}%{!-s:SD_NAME=%{2}/}} \
%{sysc_fillup} \
%nil
# internal only: sysc_fillup
%sysc_fillup() \
if [ -x /bin/fillup ] ; then \
if [ -f $SYSC_TEMPLATE ] ; then \
echo "Updating /etc/sysconfig/$SD_NAME$PNAME ..." \
mkdir -p /etc/sysconfig/$SD_NAME \
touch /etc/sysconfig/$SD_NAME$PNAME \
/bin/fillup -q /etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \
fi \
else \
echo "ERROR: fillup not found. This should not happen. Please compare" \
echo "/etc/sysconfig/$PNAME and $TEMPLATE_DIR/sysconfig.$PNAME and" \
echo "update by hand." \
fi
# macro: rename_sysconfig_variable
# as the name says, rename a variable in the file given with -f
%rename_sysconfig_variable(f:) \
%{!-f:echo "missing argument for rename_sysconfig_variable"; exit 1; }%{-f:FILE=%{-f*}} \
if [ -f $FILE ] ; then \
sed -i -e "s/^%{1}=/%{2}=/" $FILE \
fi
# macro: remove_and_set
# remove variables from sysconfig.$NAME
# (both if existant) and set them in the environment
# for further handling in postinstall
# options: -n set package name
# -y default to yes if not found (otherwise no)
%remove_and_set(n:y) \
%{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \
DEF_VAL=%{-y:"yes"}%{!-y:"no"} \
DEL_TEMPL=%{_fillupdir}/$PNAME.del \
rm -f $DEL_TEMPL \
for var in %{?*} ; do \
echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \
done \
if [ -f /etc/sysconfig/$PNAME ] ; then \
/bin/fillup -q -t -r -i -d "=" /etc/sysconfig/$PNAME $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ \
test -f /etc/sysconfig/$PNAME.new && mv /etc/sysconfig/$PNAME.new /etc/sysconfig/$PNAME \
fi \
for i in $DEL_TEMPL /etc/sysconfig/$PNAME.deleted.$$ ; do \
if [ -f $i ] ; then \
. $i \
rm -f $i \
fi \
done
%insserv_force_if_yast() \
/sbin/insserv ${YAST_IS_RUNNING:+-f} %{?*}
%run_ldconfig /sbin/ldconfig
# for %post
%install_info(:-:) \
ALL_ARGS=(%{**}) \
if test -x /sbin/install-info ; then \
/sbin/install-info "${ALL_ARGS[@]}" || : \
fi ;
# for %preun
%install_info_delete(:-:) \
test -n "$FIRST_ARG" || FIRST_ARG=$1 \
if test -x /sbin/install-info ; then \
if [ "$FIRST_ARG" = 0 ]; then \
/sbin/install-info --quiet --delete %{**} || : \
fi ; \
fi ;
# find-supplements.ksyms parses this macro directly out of the spec file:
%supplements_kernel_module() \
%{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)}
%suse_version @suse_version@
%sles_version @sles_version@
%ul_version @ul_version@
%is_opensuse @is_opensuse@
%sle_version @sle_version@
%leap_version @leap_version@
%do_profiling 1
%cflags_profile_generate -fprofile-update=atomic -fprofile-generate
%cflags_profile_feedback -fprofile-use
%suse_install_update_message() \
install -D -m 644 %1 %buildroot/var/adm/update-messages/%{name}-%{version}-%{release}-%(basename %1).txt \
%nil
%suse_install_update_script() \
install -D -m 755 %1 %buildroot/var/adm/update-scripts/%{name}-%{version}-%{release}-%(basename %1).txt \
%nil
# Template for lang sub-package.
%lang_package(n:r:) \
%package %{-n:-n %{-n*}-}lang \
Summary: Translations for package %{name} \
Group: System/Localization \
Requires: %{-n:%{-n*}}%{!-n:%{name}} = %{version} \
%{-r:Requires: %{-r*}} \
Provides: %{-n:%{-n*}}%{!-n:%{name}}-lang-all = %{version} \
Supplements: %{-n:%{-n*}}%{!-n:%{name}} \
BuildArch: noarch \
%description %{-n:-n %{-n*}-}lang \
Provides translations for the \"%{name}\" package.
# package version comparison macros
# compare two versions, returns -1, 0, 1, ~~~
%rpm_vercmp() %{lua:print(rpm.expand('%1') == '~~~' and '~~~' or rpm.vercmp(rpm.expand('%1'), rpm.expand('%2')))}
# expand to the installed version of a package/provides
%pkg_version() %(LC_ALL=C rpm -q --whatprovides --qf "%%{version}" "%1" | sed -e "s/^no package provides .*/~~~/")
# compare the installed version to a value. returns -1, 0, 1, ~~~
%pkg_version_cmp() %{expand:%{expand:%%%%{rpm_vercmp %%{pkg_version %1} %%2}}}
# convenience/readability
%pkg_vcmp() (%{expand:%%{pkg_version_cmp %1 %3}} %2 0)

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jul 2 16:30:51 CEST 2018 - mls@suse.de
- Split SUSE macros and some helpers into rpm-config-SUSE
package. This is based on the work of Neil Gompa, thanks!
new patch: findsupplements.diff
dropped files: rpm-suse_macros
dropped patches: firmware.diff, initscriptsprov.diff,
modalias-encode.diff, modalias.diff
-------------------------------------------------------------------
Fri Jun 15 12:46:10 UTC 2018 - msuchanek@suse.com

View File

@ -48,6 +48,7 @@ BuildRequires: zlib-devel
#!BuildIgnore: rpmlint-Factory
Provides: rpminst
Requires(post): %fillup_prereq
Requires: rpm-config-SUSE
Summary: The RPM Package Manager
License: GPL-2.0-or-later
Group: System/Packages
@ -55,7 +56,6 @@ Version: 4.14.1
Release: 0
Source: http://ftp.rpm.org/releases/rpm-4.14.x/rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source4: rpm-suse_macros
Source5: rpmsort
Source8: rpmconfigcheck
Source9: sysconfig.services-rpm
@ -82,10 +82,8 @@ 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
@ -97,9 +95,7 @@ Patch45: whatrequires-doc.diff
Patch46: remove-brp-strips.diff
Patch47: requires-ge-macro.diff
Patch49: finddebuginfo-absolute-links.diff
Patch50: firmware.diff
Patch51: specfilemacro.diff
Patch52: modalias-encode.diff
Patch53: disttag-macro.diff
Patch55: debugsubpkg.diff
Patch56: debuglink.diff
@ -107,7 +103,6 @@ Patch57: debuginfo-mono.patch
Patch58: lazystatfs.diff
Patch60: safeugid.diff
Patch61: noprereqdeprec.diff
Patch65: initscriptsprov.diff
Patch66: remove-translations.diff
Patch67: headeradddb.diff
Patch68: dbprivate.diff
@ -134,6 +129,7 @@ Patch113: debugedit-riscv.patch
Patch114: source_date_epoch_buildtime.diff
Patch115: safesymlinks.diff
Patch116: verifynodup.diff
Patch117: findsupplements.diff
Patch6464: auto-config-update-aarch64-ppc64le.diff
Patch6465: auto-config-update-riscv64.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -222,16 +218,16 @@ rm -f rpmdb/db.h
%patch -P 4
%patch5 -p1
%patch -P 11 -P 12 -P 13 -P 14 -P 15 -P 16 -P 18
%patch -P 20 -P 21 -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 38
%patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 29
%patch -P 30 -P 32 -P 33 -P 34 -P 35 -P 36 -P 38
%patch -P 43 -P 45 -P 46 -P 47 -P 49
%patch -P 50 -P 51 -P 52 -P 53 -P 55 -P 56 -P 57 -P 58
%patch -P 60 -P 61 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 51 -P 53 -P 55 -P 56 -P 57 -P 58
%patch -P 60 -P 61 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 77 -P 78
%patch -P 85
%patch -P 93 -P 94 -P 99
%patch -P 100 -P 102 -P 103 -P 108
%patch -P 109 -P 111 -P 112 -P 113 -P 114 -P 115 -P 116
%patch -P 109 -P 111 -P 112 -P 113 -P 114 -P 115 -P 116 -P 117
%ifarch aarch64 ppc64le riscv64
%patch6464
@ -242,25 +238,7 @@ rm -f rpmdb/db.h
cp config.guess config.sub db/dist/
cp config.guess config.sub beecrypt/
#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}
sed -e 's/@suse_version@/%{?suse_version}%{!?suse_version:0}/' \
-e 's/@sles_version@/%{?sles_version}%{!?sles_version:0}/' \
-e 's/@ul_version@/%{?ul_version}%{!?ul_version:0}/' \
-e '/@is_opensuse@%{?is_opensuse:nomatch}/d' \
-e 's/@is_opensuse@/%{?is_opensuse}%{!?is_opensuse:0}/' \
-e '/@leap_version@%{?leap_version:nomatch}/d' \
-e 's/@leap_version@/%{?leap_version}%{!?leap_version:0}/' \
%if 0%{?is_opensuse}
-e '/@sle_version@%{?sle_version:nomatch}/d' \
-e 's/@sle_version@/%{?sle_version}%{!?sle_version:0}/' \
%else
-e '/@sle_version@/d' \
%endif
< %{SOURCE4} > suse_macros
rm -f m4/libtool.m4
rm -f m4/lt*.m4
@ -314,10 +292,8 @@ mkdir -p %{buildroot}/usr/sbin
install -m 755 %{SOURCE8} %{buildroot}/usr/sbin
mkdir -p %{buildroot}/usr/lib/systemd/system
install -m 644 %{SOURCE13} %{buildroot}/usr/lib/systemd/system/
cp -a suse_macros %{buildroot}/usr/lib/rpm
mkdir -p %{buildroot}/usr/lib/rpm/macros.d
mkdir -p %{buildroot}/usr/lib/rpm/suse
ln -s ../suse_macros %{buildroot}/usr/lib/rpm/suse/macros
for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do
mkdir -p %{buildroot}/usr/src/packages/$d
chmod 755 %{buildroot}/usr/src/packages/$d
@ -344,8 +320,6 @@ mkdir -p %{buildroot}%{_fillupdir}
install -c -m0644 %{SOURCE9} %{buildroot}%{_fillupdir}/
rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2
install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm
install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm
install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm
install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm
rm -f %{buildroot}/usr/lib/locale %{buildroot}/usr/lib/rpmrc
mkdir -p %{buildroot}/etc/rpm