Accepting request 540167 from home:RBrownSUSE:branches:Base:System

As discussed on https://lists.opensuse.org/opensuse-packaging/2017-11/msg00017.html

OBS-URL: https://build.opensuse.org/request/show/540167
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=412
This commit is contained in:
Richard Brown 2017-11-17 13:05:05 +00:00 committed by Git OBS Bridge
parent 98cbd7a201
commit a1e5915bc0
2 changed files with 31 additions and 10 deletions

View File

@ -7,6 +7,7 @@
%_sysconfdir /etc
%_localstatedir /var
%_defaultdocdir %{_usr}/share/doc/packages
%_fillupdir %{_usr}/share/fillup-templates
# package build macros
%make_install make install DESTDIR=%{?buildroot}
@ -82,7 +83,7 @@
# name of (old) START variable (unless -s is given)
#
# template for variables into /etc/sysconfig/package:
# /var/adm/fillup-templates/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;} \
@ -110,8 +111,12 @@
# 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}
@ -150,8 +155,12 @@
%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} \
@ -189,7 +198,11 @@
%remove_and_set(n:y) \
%{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \
DEF_VAL=%{-y:"yes"}%{!-y:"no"} \
DEL_TEMPL=%{_fillupdir}/$PNAME.del \
# If template not in new location, fallback to old location
if [ ! -f $DEL_TEMPL ] ; then \
DEL_TEMPL=/var/adm/fillup-templates/$PNAME.del \
fi \
rm -f $DEL_TEMPL \
for var in %{?*} ; do \
echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Nov 7 14:27:32 UTC 2017 - rbrown@suse.com
- Introduce new %_fillupdir macro for fillup-templates location
- Set %_fillupdir macro to /usr/share/fillup-templates
- Change fillup macros to support new %_fillupdir in addition
to old /var/adm/fillup-templates location
-------------------------------------------------------------------
Mon Nov 6 13:53:45 UTC 2017 - mls@suse.de