]> git.pld-linux.org Git - packages/rc-scripts.git/commitdiff
- shared patch not needed - option can be passed to make
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 12 Aug 2003 21:42:01 +0000 (21:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- ulimitc hack replaced by ulimits patch - full support for services limits
  (experimental stuff yet, not for Ra)
- added acct patch to use new rc.acct script
- release 14

Changed files:
    rc-scripts-acct.patch -> 1.1
    rc-scripts-shared.patch -> 1.2
    rc-scripts-ulimitc.patch -> 1.2
    rc-scripts-ulimits.patch -> 1.1
    rc-scripts.spec -> 1.120

rc-scripts-acct.patch [new file with mode: 0644]
rc-scripts-shared.patch [deleted file]
rc-scripts-ulimitc.patch [deleted file]
rc-scripts-ulimits.patch [new file with mode: 0644]
rc-scripts.spec

diff --git a/rc-scripts-acct.patch b/rc-scripts-acct.patch
new file mode 100644 (file)
index 0000000..36be993
--- /dev/null
@@ -0,0 +1,29 @@
+diff -Nur rc-scripts-0.3.1.orig/rc.d/rc.shutdown rc-scripts-0.3.1/rc.d/rc.shutdown
+--- rc-scripts-0.3.1.orig/rc.d/rc.shutdown     2002-01-27 03:13:29.000000000 +0100
++++ rc-scripts-0.3.1/rc.d/rc.shutdown  2003-08-12 22:10:22.520436368 +0200
+@@ -29,8 +29,9 @@
+ halt -w
+ # Turn off swap, then unmount file systems.
+-run_cmd "Turning off swap and accounting" swapoff -a
+-[ -x /sbin/accton ] && LC_ALL=C /sbin/accton 2>&1 | grep -v "not implemented"
++run_cmd "Turning off swap" swapoff -a
++
++[ -x /etc/rc.d/rc.acct ] && /etc/rc.d/rc.acct stop
+ if [ -x /sbin/quotaoff ]; then
+       run_cmd "Turning off quotas for local filesystems" /sbin/quotaoff -a
+diff -Nur rc-scripts-0.3.1.orig/rc.d/rc.sysinit rc-scripts-0.3.1/rc.d/rc.sysinit
+--- rc-scripts-0.3.1.orig/rc.d/rc.sysinit      2003-08-12 22:06:07.000000000 +0200
++++ rc-scripts-0.3.1/rc.d/rc.sysinit   2003-08-12 22:08:49.104637728 +0200
+@@ -550,8 +550,8 @@
+ fi
+ # Turn on process accounting
+-if [ -x /sbin/accton ] ; then
+-        run_cmd "Turning on process accounting" /sbin/accton /var/log/pacct
++if [ -x /etc/rc.d/rc.acct ] ; then
++      /etc.rc.d/rc.acct start
+ fi
+ # Set the clock if timezone definition wasn't available (eg. /usr not mounted)
diff --git a/rc-scripts-shared.patch b/rc-scripts-shared.patch
deleted file mode 100644 (file)
index bc4c434..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- rc-scripts-0.2.10/src/Makefile.am~ Mon Apr  3 16:49:40 2000
-+++ rc-scripts-0.2.10/src/Makefile.am  Wed Dec 27 03:32:07 2000
-@@ -47,7 +47,7 @@
- getkey_SOURCES = getkey.c
- ppp_watch_SOURCES = ppp-watch.c shvar.c shvar.h
--ppp_watch_LDADD = /usr/lib/libglib.a
-+ppp_watch_LDADD = -lglib
- INCLUDES = `glib-config --cflags`
- consoletype_SOURCES = consoletype.c
diff --git a/rc-scripts-ulimitc.patch b/rc-scripts-ulimitc.patch
deleted file mode 100644 (file)
index 665d3ce..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- rc-scripts-0.3.1/rc.d/init.d/functions.orig        Sun Jan 13 04:40:42 2002
-+++ rc-scripts-0.3.1/rc.d/init.d/functions     Wed Jun 26 12:07:57 2002
-@@ -275,7 +275,13 @@
-       # make sure it doesn't core dump anywhere; while this could mask
-       # problems with the daemon, it also closes some security problems
--      ulimit -c 0
-+
-+      # use ULIMIT_C variable - allow to use other limit for some daemons
-+      # (e.g. for sshd with privsep or for debugging purposes)
-+      if [ "$ULIMIT_C" = "" ]; then
-+              ULIMIT_C="-c 0"
-+      fi
-+      ulimit $ULIMIT_C
-       # Make sure daemons will be able to fork.
-       # Limits are set via pam_limits.
diff --git a/rc-scripts-ulimits.patch b/rc-scripts-ulimits.patch
new file mode 100644 (file)
index 0000000..25bd037
--- /dev/null
@@ -0,0 +1,84 @@
+diff -Nur rc-scripts-0.3.1.orig/rc.d/init.d/functions rc-scripts-0.3.1/rc.d/init.d/functions
+--- rc-scripts-0.3.1.orig/rc.d/init.d/functions        2002-01-13 04:40:42.000000000 +0100
++++ rc-scripts-0.3.1/rc.d/init.d/functions     2003-08-12 23:35:08.555241552 +0200
+@@ -238,13 +238,19 @@
+       return $exit_code
+ }
+-# A function to start a program (now it's usefull on read-only filesystem too)
++# A function to start a program (now it's useful on read-only filesystem too)
+ daemon() 
+ {
+-      typeset errors="" prog=""
++      typeset errors="" prog="" limits_hard="" limits_soft=""
+       typeset -i exit_code=0
+       [ -z "$DEFAULT_SERVICE_RUN_NICE_LEVEL" ] && DEFAULT_SERVICE_RUN_NICE_LEVEL=0
+-      # Test syntax. Don't use -o instead || here - this will broke ksh --misiek
++      # "-u unlimited" (-p for ksh) to make sure daemons will be able to fork.
++      # "-c 0" to make sure it doesn't core dump anywhere; while this could mask
++      # problems with the daemon, it also closes some security problems.
++      # Users' limits are set via pam_limits.
++      [ -z "$DEFAULT_SERVICE_LIMITS_HARD" ] && DEFAULT_SERVICE_LIMITS_HARD="-c 0"
++      [ -z "$DEFAULT_SERVICE_LIMITS_SOFT" ] && DEFAULT_SERVICE_LIMITS_SOFT="-u unlimited -c 0"
++      # Test syntax. Don't use -o instead || here - this will break ksh --misiek
+       while [ "$1" != "${1##-}" ] || [ "$1" != "${1##+}" ]; do
+               case $1 in
+               '')     msg_usage " daemon [--user user] [+/-nicelevel] {program}"
+@@ -273,20 +279,26 @@
+               prog="$prog $*"
+       fi
+-      # make sure it doesn't core dump anywhere; while this could mask
+-      # problems with the daemon, it also closes some security problems
+-      ulimit -c 0
+-
+-      # Make sure daemons will be able to fork.
+-      # Limits are set via pam_limits.
+       if [ -n "$KSH_VERSION" ]; then
+-              ulimit -p unlimited
++              limits_hard="`echo ${SERVICE_LIMITS_HARD:-$DEFAULT_SERVICE_LIMITS_HARD} | sed -e 's/-u/-p/'`"
++              limits_soft="`echo ${SERVICE_LIMITS_SOFT:-$DEFAULT_SERVICE_LIMITS_SOFT} | sed -e 's/-u/-p/'`"
+       elif [ -n "$ZSH_VERSION" ]; then
+-              ulimit -u unlimited
++              limits_hard="${SERVICE_LIMITS_HARD:-$DEFAULT_SERVICE_LIMITS_HARD}"
++              limits_soft="${SERVICE_LIMITS_SOFT:-$DEFAULT_SERVICE_LIMITS_SOFT}"
+       elif [ -n "$BASH_VERSION" ]; then
+-              ulimit -u unlimited
++              limits_hard="${SERVICE_LIMITS_HARD:-$DEFAULT_SERVICE_LIMITS_HARD}"
++              limits_soft="${SERVICE_LIMITS_SOFT:-$DEFAULT_SERVICE_LIMITS_SOFT}"
+ #     elif [ -n "`$SH -c 'echo ${.sh.version}' 2>/dev/null`" ]; then
+       fi
++      # soft limits first - it's impossible to set hard limit lower than existing soft
++      while echo "$limits_soft" | grep -q '[^ ]'; do
++              ulimit -S `echo ${limits_soft} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\1/'`
++              limits_soft="`echo ${limits_soft} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\2/'`"
++      done
++      while echo "$limits_hard" | grep -q '[^ ]'; do
++              ulimit -H `echo ${limits_hard} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\1/'`
++              limits_hard="`echo ${limits_hard} | sed -e 's/^ *\(-[^-]*\)\(-.*\)\?$/\2/'`"
++      done
+       # And start it up.
+       busy
+diff -Nur rc-scripts-0.3.1.orig/sysconfig/system rc-scripts-0.3.1/sysconfig/system
+--- rc-scripts-0.3.1.orig/sysconfig/system     2001-05-15 18:05:59.000000000 +0200
++++ rc-scripts-0.3.1/sysconfig/system  2003-08-12 23:32:38.022126064 +0200
+@@ -17,6 +17,18 @@
+ # $SERVICE_RUN_NICE_LEVEL is not defined in /etc/sysconfig/<service>
+ DEFAULT_SERVICE_RUN_NICE_LEVEL=0
++# Default limits set before running demons (hard and soft) if
++# $SERVICE_LIMITS_{HARD,SOFT} are not defined in /etc/sysconfig/<service>
++# Use "-u" for process limits (automatically translated to "-p" for ksh).
++# Advised limits are:
++# "-u unlimited" to make sure daemons will be able to fork;
++# "-c 0" to make sure it doesn't core dump anywhere; while this could mask
++# problems with the daemon, it also closes some security problems;
++# users' limits are set via pam_limits.
++# NOTE: soft limit MUST NOT exceed hard!
++DEFAULT_SERVICE_LIMITS_HARD="-u unlimited -c 0"
++DEFAULT_SERVICE_LIMITS_SOFT="-c 0"
++
+ # Run isapnp at system startup ?
+ RUN_ISAPNP=yes
index 8e2102101c99aa66afd9f3dff721bab45d422915..7fe69bc744cb595598e6bf3641719e6f82a12785 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: rc-scripts.spec,v 1.119 2003-08-04 11:35:58 qboosh Exp $
+# $Id: rc-scripts.spec,v 1.120 2003-08-12 21:42:00 qboosh Exp $
 Summary:       inittab and /etc/rc.d scripts
 Summary(de):   inittab und /etc/rc.d Scripts
 Summary(fr):   inittab et scripts /etc/rc.d
@@ -6,15 +6,14 @@ Summary(pl):  inittab i skrypty startowe z katalogu /etc/rc.d
 Summary(tr):   inittab ve /etc/rc.d dosyalarý
 Name:          rc-scripts
 Version:       0.3.1
-Release:       13
+Release:       14
 License:       GPL
-Vendor:                PLD rc-scripts Team <pld-rc-scripts@pld.org.pl>
+Vendor:                PLD rc-scripts Team <pld-rc-scripts@pld-linux.org>
 Group:         Base
 Source0:       %{name}-%{version}.tar.gz
 # Source0-md5: c032946a4ea2c81b92c70b26f65b18d9
-Patch0:                %{name}-shared.patch
 Patch1:                %{name}-ipx_fix.patch
-Patch2:                %{name}-ulimitc.patch
+Patch2:                %{name}-ulimits.patch
 Patch3:                %{name}-killgnu.patch
 Patch4:                %{name}-wlan.patch
 Patch5:                %{name}-arp-any.patch
@@ -28,13 +27,15 @@ Patch12:    %{name}-pl.po_typo.patch
 Patch13:       %{name}-reboot.patch
 Patch14:       %{name}-pl.po_duplicate.patch
 Patch15:       %{name}-timezone-posix.patch
-URL:           http://cvs.pld.org.pl/index.cgi/rc-scripts/
+Patch16:       %{name}-acct.patch
+URL:           http://cvs.pld-linux.org/rc-scripts/
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: gettext-devel
 BuildRequires: glib-devel
 %{!?_without_static:BuildRequires:     glib-static}
 BuildRequires: popt-devel
+Requires(post):        fileutils
 Requires:      /bin/awk
 Requires:      /bin/basename
 Requires:      /bin/gettext
@@ -59,11 +60,12 @@ Requires:   sh-utils
 Requires:      textutils
 Requires:      utempter
 Requires:      util-linux
-Obsoletes:     initscripts
 Provides:      initscripts
-Requires(post):        fileutils
+Obsoletes:     initscripts
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 Conflicts:     LPRng < 3.8.0-2
+Conflicts:     psacct < 6.3.5-10
+Conflicts:     openssh-server < 2:3.6.1p2-4
 
 %define                _prefix         /usr
 %define                _exec_prefix    /
@@ -98,7 +100,6 @@ programc
 
 %prep
 %setup -q
-%{!?_without_static:#}%patch0 -p1
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
@@ -114,6 +115,7 @@ programc
 %patch13 -p1
 %patch14 -p1
 %patch15 -p1
+%patch16 -p1
 
 %build
 %{__aclocal}
@@ -121,7 +123,8 @@ programc
 %{__autoconf}
 %configure \
        --with-localedir=%{localedir}
-%{__make}
+%{__make} \
+       %{?_without_static:ppp_watch_LDADD="-lglib"}
 
 %install
 rm -rf $RPM_BUILD_ROOT
This page took 0.13938 seconds and 4 git commands to generate.