SHA256
3
0
forked from pool/rpm
OBS User unknown 2008-08-21 15:44:07 +00:00 committed by Git OBS Bridge
parent 87bfedae71
commit 2e8ff90a4b
5 changed files with 110 additions and 200 deletions

View File

@ -24,7 +24,7 @@ License: GPL v2 or later
Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages
Version: 4.4.2
Release: 265
Release: 273
Requires: rpm = %{version}
%py_requires
Source99: rpm.spec

View File

@ -203,11 +203,9 @@
# instead of package name)
# -f (skip fillup parts)
# -i (skip insserv parts)
# -s (specify START_ variable names, otherwise tr a-z A-Z is used)
# -y (default start-variable value to yes)
# Used only if X-UnitedLinux-Default-Enabled is not specified
# in the init script
# -p (ignored for backwards compatibility)
# -Y (force_yes: always activate, discard setting before update)
# arguments:
# [if "-n" first argument as package name]
@ -218,37 +216,27 @@
#
# template for variables into etc/sysconfig/package:
# var/adm/fillup-templates/sysconfig.package
# template for variables into etc/rc.config:
# var/adm/fillup-templates/rc.config.package
%fillup_and_insserv(finpsyY) \
test -n "$FIRST_ARG" || FIRST_ARG=$1 \
%{-Y:FORCE_YES=1}%{!-Y:FORCE_YES=0} \
REMOVED_START=no \
set -- %{?*} \
%{-n:PNAME=$1 ; shift }%{!-n:PNAME=%{name}} \
INSSRV_ARRAY="" \
while [ ${#*} -gt 0 ] ; do \
SCRIPTNAME=$1 \
shift \
%{-s:STARTVAR=$1 ; shift} \
%{!-s:STARTVAR=START_`echo $SCRIPTNAME | tr a-z.- A-Z__`} \
SV_B='^### BEGIN INIT INFO' \
SV_E='^### END INIT INFO' \
SV_KW=X-UnitedLinux-Default-Enabled \
SV_VAL=`sed -n -e "/$SV_B/,/$SV_E/{/^# $SV_KW:[[:space:]]*\\([^[:space:]]*\\).*/s//\\1/p;}" < etc/init.d/$SCRIPTNAME` \
test -n "$SV_VAL" || SV_VAL=%{-y:"yes"}%{!-y:"no"} \
eval $STARTVAR=$SV_VAL \
test -n "$STARTVAR" -a -n "$SCRIPTNAME" || { \
echo "STARTVARIABLE or SCRIPTNAME unknown" \
exit 1 \
} \
INSSRV_ARRAY="$INSSRV_ARRAY $SCRIPTNAME $STARTVAR" \
%{!-f:%{!-i:grep -q "$STARTVAR=" var/adm/fillup-templates/rc.config.$PNAME.del 2>/dev/null || \
echo -e "#\\n# Start service $SCRIPTNAME\\n#\\n$STARTVAR=\\"${!STARTVAR}\\"\\n\\n" >> var/adm/fillup-templates/rc.config.$PNAME.del } } \
done \
%{!-f: %{do_real_fillup}} \
%{!-i: %{add_start_if_needed $INSSRV_ARRAY } } \
%nil
%{-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 -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
@ -256,71 +244,30 @@
%do_real_fillup() \
TEMPLATE_DIR=var/adm/fillup-templates \
SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME \
RC_TEMPLATE=$TEMPLATE_DIR/rc.config.$PNAME \
SD_NAME="" \
if [ -x bin/fillup ] ; then \
%{sysc_fillup} \
# remove the START_ variables from the base fillup template \
if [ -f $RC_TEMPLATE.del -a -f $RC_TEMPLATE ] ; then \
bin/fillup -q -r -i $RC_TEMPLATE $RC_TEMPLATE.del /dev/null \
mv $RC_TEMPLATE.new $RC_TEMPLATE \
fi \
if [ -f etc/rc.config ] ; then \
%{rc_fillup} \
# remove the deprecated START_ variables from rc.config \
if [ -f $TEMPLATE_DIR/rc.config.$PNAME.del ] ; then \
rm -f etc/rc.config.xtract \
bin/fillup -q -r -i etc/rc.config $RC_TEMPLATE.del etc/rc.config.xtract \
if [ -f etc/rc.config.xtract ] ; then \
. etc/rc.config.xtract \
fi \
rm -f etc/rc.config.xtract $RC_TEMPLATE.del \
if [ -f etc/rc.config.new ] ; then \
cmp -s etc/rc.config.new etc/rc.config || REMOVED_START=yes \
mv etc/rc.config.new etc/rc.config \
fi \
fi \
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
%{sysc_fillup}
# add_start_if_needed: internally used by fillup_and_insserv
%add_start_if_needed() \
set -- %{?*} \
set -- %{?*} \
while [ ${#*} -gt 0 ] ; do \
SCRIPTNAME=$1 \
STARTVAR=$2 \
SV_VALUE=$2 \
shift 2 \
test -n "$STARTVAR" -a -n "$SCRIPTNAME" || { \
echo "STARTVAR or SCRIPTNAME unknown" \
exit 1 \
} \
if test "$FIRST_ARG" = "1" -o "$REMOVED_START" = "yes" -o "$FORCE_YES" = "1" ; then \
if test -n "$YAST_IS_RUNNING" ; then \
INSSERV_FORCE="-f" \
else \
INSSERV_FORCE="" \
fi \
if test "${!STARTVAR}" = "yes" -o "$FORCE_YES" = "1" ; then \
sbin/insserv $INSSERV_FORCE etc/init.d/$SCRIPTNAME \
else \
sbin/insserv $INSSERV_FORCE -r etc/init.d/$SCRIPTNAME \
fi \
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
# only here to be able to define this to nil
# for versions prior to 7.1
%insserv_cleanup() \
sbin/insserv etc/init.d
sbin/insserv etc/init.d
# macro: fillup_only
# do the fillup for sysconfig files and if needed extraction
# of older variables from rc.config and rc.config.d
# do the fillup for sysconfig files
# template naming convention:
# .../fillup-templates/sysconfig.$NAME1[-$NAME2]
# NAME1: the name of the sysconfig-file
@ -333,149 +280,91 @@
# -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}}} \
%{-n:PNAME=%{1}}%{!-n:PNAME=%{name}} \
%{-s:SUBPNAME=-%{2}}%{!-s:SUBPNAME=%{-a:-%{name}}} \
TEMPLATE_DIR=var/adm/fillup-templates \
SYSC_TEMPLATE=$TEMPLATE_DIR/sysconfig.$PNAME$SUBPNAME \
RC_TEMPLATE=$TEMPLATE_DIR/rc.config.$PNAME \
SD_NAME="" \
%{-d:%{-s:SD_NAME=%{3}/}%{!-s:SD_NAME=%{2}/}} \
if [ -x bin/fillup ] ; then \
%{sysc_fillup} \
%{rc_fillup} \
else \
echo "ERROR: fillup not found. This should not happen. Please compare" \
echo "etc/sysconfig/$SD_NAME$PNAME and $SYSC_TEMPLATE and" \
echo "update by hand." \
fi \
%{sysc_fillup} \
%nil
# internal only: rc_fillup
%rc_fillup() \
# maybe the fillup template for rc.config is old, make sure we do not readd stuff here \
if [ -f $SYSC_TEMPLATE -a -f $RC_TEMPLATE ] ; then \
bin/fillup -q -r -i $RC_TEMPLATE $SYSC_TEMPLATE /dev/null \
mv $RC_TEMPLATE.new $RC_TEMPLATE \
fi \
# do the normal fillup for the rc.config variables \
if [ -f $RC_TEMPLATE ] ; then \
bin/fillup -q -d = etc/rc.config $RC_TEMPLATE \
fi
# internal only: sysc_fillup
%sysc_fillup() \
if [ -x bin/fillup ] ; then \
if [ -f $SYSC_TEMPLATE ] ; then \
echo "Updating etc/sysconfig/$SD_NAME$PNAME..." \
if [ ! -d etc/sysconfig/$SD_NAME ] ; then \
mkdir -p etc/sysconfig/$SD_NAME \
fi \
if [ -f etc/rc.config.d/$PNAME.rc.config ] ; then \
if [ -f etc/sysconfig/$SD_NAME$PNAME ] ; then \
bin/fillup -q etc/sysconfig/$SD_NAME$PNAME etc/rc.config.d/$PNAME.rc.config \
rm -f etc/rc.config.d/$PNAME.rc.config \
else \
mv etc/rc.config.d/$PNAME.rc.config etc/sysconfig/$SD_NAME$PNAME \
fi \
fi \
if [ ! -f etc/rc.config ] ; then \
test -f etc/sysconfig/$SD_NAME$PNAME || touch etc/sysconfig/$SD_NAME$PNAME \
bin/fillup -q etc/sysconfig/$SD_NAME$PNAME $SYSC_TEMPLATE \
else \
if [ ! -f etc/sysconfig/$SD_NAME$PNAME ] ; then \
bin/fillup -q -r -i etc/rc.config $SYSC_TEMPLATE etc/sysconfig/$SD_NAME$PNAME \
else \
bin/fillup -q -r -i etc/rc.config $SYSC_TEMPLATE etc/sysconfig/$SD_NAME$PNAME.tmp \
bin/fillup -q etc/sysconfig/$SD_NAME$PNAME etc/sysconfig/$SD_NAME$PNAME.tmp \
rm -f etc/sysconfig/$SD_NAME$PNAME.tmp \
fi \
if [ -f etc/rc.config.new ] ; then \
mv etc/rc.config.new etc/rc.config \
fi \
fi\
fi
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 rc.config
# or with -f in the given file
# as the name says, rename a variable in the file given with -f
%rename_sysconfig_variable(f:) \
%{!-f:FILE=etc/rc.config}%{-f:FILE=%{-f*}} \
if [ -f $FILE ] ; then \
sed -e "s/^%{1}=/%{2}=/" $FILE > $FILE.new \
mv $FILE.new $FILE \
fi
# macro: save_rc_config_d_was_in_filelist
# only used for packages that erroneously had the rc.config.d file
# in their filelist
%save_rc_config_d_was_in_filelist(n) \
%{-n:PNAME=%{?*}}%{!-n:PNAME=%{name}} \
mkdir -p etc/sysconfig \
if [ -f etc/rc.config.d/$PNAME.rc.config -a ! -f etc/sysconfig/$PNAME ] ; then \
cp etc/rc.config.d/$PNAME.rc.config etc/sysconfig/$PNAME \
fi
%{!-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 rc.config and sysconfig.$NAME
# 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=var/adm/fillup-templates/$PNAME.del \
rm -f $DEL_TEMPL \
for var in %{?*} ; do \
echo -e "#\\n$var=$DEF_VAL\\n" >> $DEL_TEMPL \
done \
if [ -f etc/rc.config ] ; then \
bin/fillup -q -t -r -i -d "=" etc/rc.config $DEL_TEMPL etc/rc.config.xtract \
test -f etc/rc.config.new && mv etc/rc.config.new etc/rc.config \
fi \
if [ -f etc/sysconfig/$PNAME ] ; then \
bin/fillup -q -t -r -i -d "=" etc/sysconfig/$PNAME $DEL_TEMPL etc/rc.config.xtract.too \
test -f etc/sysconfig/$PNAME.new && mv etc/sysconfig/$PNAME.new etc/sysconfig/$PNAME \
fi \
for i in $DEL_TEMPL etc/rc.config.xtract etc/rc.config.xtract.too ; do \
if [ -f $i ] ; then \
. $i \
rm -f $i \
fi \
done
%{-n:PNAME=%{-n*}}%{!-n:PNAME=%{name}} \
DEF_VAL=%{-y:"yes"}%{!-y:"no"} \
DEL_TEMPL=var/adm/fillup-templates/$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() \
if test -n "$YAST_IS_RUNNING" ; then \
INSSERV_FORCE="-f" \
else \
INSSERV_FORCE="" \
fi \
sbin/insserv $INSSERV_FORCE %{?*}
sbin/insserv ${YAST_IS_RUNNING:+-f} %{?*}
%run_ldconfig /sbin/ldconfig
%install_info(:-:) \
ALL_ARGS=(%{**}) \
NUM_ARGS=${#ALL_ARGS[@]} \
if test -x sbin/install-info ; then \
if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
sbin/install-info "${ALL_ARGS[@]}" \
fi \
fi ;
ALL_ARGS=(%{**}) \
NUM_ARGS=${#ALL_ARGS[@]} \
if test -x sbin/install-info ; then \
if test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
sbin/install-info "${ALL_ARGS[@]}" \
fi \
fi ;
%install_info_delete(:-:) \
ALL_ARGS=(%{**}) \
NUM_ARGS=${#ALL_ARGS[@]} \
if test -x sbin/install-info ; then \
if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
fi ; \
fi ;
ALL_ARGS=(%{**}) \
NUM_ARGS=${#ALL_ARGS[@]} \
if test -x sbin/install-info ; then \
if ! test -e "${ALL_ARGS[$((NUM_ARGS-1))]}" ; then \
sbin/install-info --quiet --delete "${ALL_ARGS[@]}" \
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)}
%{expand:%(if ! rpm -q kernel-syms > /dev/null; then echo "%fail Please add the kernel-syms package to BuildRequires"; fi)}
%suse_version 1031
%suse_version 1110
%sles_version 0
%ul_version 0

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Aug 21 01:49:00 CEST 2008 - ro@suse.de
- update rpm-suse_macros
-------------------------------------------------------------------
Wed Aug 20 12:39:53 CEST 2008 - agruen@suse.de
- rpmconfigcheck: set Required-Stop to $null; this init script
only performs some checks when started.
- /usr/lib/python* belongs to the rpm-python package; remove from
the main rpm package.
-------------------------------------------------------------------
Mon Jun 30 14:02:35 CEST 2008 - dmueller@suse.de

View File

@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions
AutoReqProv: on
Summary: The RPM Package Manager
Version: 4.4.2
Release: 209
Release: 212
Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
@ -164,7 +164,7 @@ Authors:
Marc Ewing <marc@redhat.com>
%package devel
Summary: Include Files and Libraries mandatory for Development.
Summary: Include Files and Libraries mandatory for Development
License: GPL v2 or later
Group: System/Packages
Requires: rpm = %{version}
@ -301,6 +301,7 @@ for i in /usr/share/automake-*/*; do
done
popd
gzip -9 CHANGES
rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}
%clean
rm -rf $RPM_BUILD_ROOT
@ -360,7 +361,7 @@ Summary: A C library for parsing command line parameters
License: LGPL v2.1 or later
Group: System/Libraries
Version: 1.7
Release: 437
Release: 440
#
%description -n popt
@ -383,7 +384,7 @@ Summary: C Library for Parsing Command Line Parameters
License: LGPL v2.1 or later
Group: System/Libraries
Version: 1.7
Release: 437
Release: 440
Requires: popt = 1.7
Requires: glibc-devel
@ -418,6 +419,13 @@ Authors:
%doc %{_mandir}/man3/popt.3*
%changelog
* Thu Aug 21 2008 ro@suse.de
- update rpm-suse_macros
* Wed Aug 20 2008 agruen@suse.de
- rpmconfigcheck: set Required-Stop to $null; this init script
only performs some checks when started.
- /usr/lib/python* belongs to the rpm-python package; remove from
the main rpm package.
* Mon Jun 30 2008 dmueller@suse.de
- add a requires_ge macro as well
* Thu Jun 26 2008 schwab@suse.de

View File

@ -11,7 +11,7 @@
### BEGIN INIT INFO
# Provides: rpmconfigcheck
# Required-Start: $remote_fs
# Required-Stop:
# Required-Stop: $null
# Default-Start: 2 3 5
# Default-Stop:
# Description: rpm config file scan