[trafficserver] - Remove trafficserver-gcc47.patch since it's fixed upstream, TS-1116. - Join trafficserver-condrest

Jan-Frode Myklebust janfrode at fedoraproject.org
Sun Jun 10 13:50:11 UTC 2012


commit c78eeb665fd25eeeb9bbb79dc9b0e9fc5e39719e
Author: Jan-Frode Myklebust <janfrode at tanso.net>
Date:   Sun Jun 10 15:49:57 2012 +0200

    - Remove trafficserver-gcc47.patch since it's fixed upstream, TS-1116.
    - Join trafficserver-condrestart.patch into trafficserver-init_scripts.patch,
      and clean out not needed junk.

 trafficserver-condrestart.patch  |   11 --
 trafficserver-gcc47.patch        |  208 --------------------------------------
 trafficserver-init_scripts.patch |  188 +++++-----------------------------
 trafficserver.spec               |   14 ++--
 4 files changed, 34 insertions(+), 387 deletions(-)
---
diff --git a/trafficserver-init_scripts.patch b/trafficserver-init_scripts.patch
index 6d4a2b8..79364d0 100644
--- a/trafficserver-init_scripts.patch
+++ b/trafficserver-init_scripts.patch
@@ -1,17 +1,14 @@
-diff --git a/rc/trafficserver.in b/rc/trafficserver.in
-index 6582984..7191cdb 100644
---- a/rc/trafficserver.in
-+++ b/rc/trafficserver.in
-@@ -15,13 +15,21 @@
- # See the License for the specific language governing permissions and
+--- trafficserver-3.0.5/rc/trafficserver.in.original	2012-05-07 23:56:06.000000000 +0200
++++ trafficserver-3.0.5/rc/trafficserver.in	2012-06-10 12:37:14.663406610 +0200
+@@ -16,12 +16,21 @@
  # limitations under the License.
  #
--# Template from /etc/init.d/skeleton on Ubuntu
+ # Template from /etc/init.d/skeleton on Ubuntu
 +# trafficserver    Startup/shutdown script for the Apache Traffic Server
 +#
 +# chkconfig: - 90 10
 +# description: TApache Traffic Server is fast, scalable and extensible  \
-+#	       HTTP/1.1 compliant caching proxy server.
++#             HTTP/1.1 compliant caching proxy server.
 +# processname: traffic_cop traffic_manager traffic_server
 +# config: /etc/trafficserver
 +# config: /etc/sysconfig/trafficserver
@@ -26,154 +23,23 @@ index 6582984..7191cdb 100644
  # Default-Stop:      S 0 1 6
  # Short-Description: Startup/shutdown script for the Apache Traffic Server
  # Description:       Apache Traffic Server is fast, scalable and extensible
-@@ -41,6 +49,33 @@ TS_PACKAGE_VERSION="@PACKAGE_VERSION@"
- TS_PACKAGE_BUGREPORT="@PACKAGE_BUGREPORT@"
- UNAME_S=$(uname -s)
- 
-+# Ubuntu: Do NOT "set -e"
-+#         PATH should only include /usr/* if it runs after the mountnfs.sh
-+PATH=/usr/sbin:/usr/bin:/sbin:/bin
-+DESC="start/stop Traffic Server"
-+NAME=trafficserver
-+
-+TC_NAME=${TC_NAME:-traffic_cop}
-+TM_NAME=${TM_NAME:-traffic_manager}
-+TS_NAME=${TS_NAME:-traffic_server}
-+TC_DAEMON=${TC_DAEMON:- at exp_bindir@/${TC_NAME}}
-+TC_DAEMON_ARGS=""
-+TM_DAEMON=${TM_DAEMON:- at exp_bindir@/${TM_NAME}}
-+TM_DAEMON_ARGS=""
-+TS_DAEMON=${TS_DAEMON:- at exp_bindir@/${TS_NAME}}
-+TS_DAEMON_ARGS=""
-+TC_PIDFILE=${TC_PIDFILE:- at exp_runtimedir@/cop.lock}
-+TM_PIDFILE=${TM_PIDFILE:- at exp_runtimedir@/manager.lock}
-+TS_PIDFILE=${TS_PIDFILE:- at exp_runtimedir@/server.lock}
+@@ -103,6 +112,7 @@
+ TC_PIDFILE=${TC_PIDFILE:-$TS_BASE at exp_runtimedir@/cop.lock}
+ TM_PIDFILE=${TM_PIDFILE:-$TS_BASE at exp_runtimedir@/manager.lock}
+ TS_PIDFILE=${TS_PIDFILE:-$TS_BASE at exp_runtimedir@/server.lock}
 +LOCKFILE=${LOCKFILE-/var/lock/subsys/trafficserver}
-+# number of times to retry check on pid lock file
-+PIDFILE_CHECK_RETRIES=${PIDFILE_CHECK_RETRIES:-30}
-+
-+HEAD=/usr/bin/head
-+test -x $HEAD || HEAD=head
-+ESED=/usr/bin/sed
-+test -x $ESED || ESED=sed
-+
- if [ -e /etc/SuSE-release ]; then
-   DISTRIB_ID="suse"
- elif [ -e /etc/fedora-release ]; then
-@@ -48,6 +83,8 @@ elif [ -e /etc/fedora-release ]; then
- elif [ -e /etc/redhat-release ]; then
-   DISTRIB_ID="redhat" # also exists on Fedora
- elif [ -e /etc/lsb-release ]; then
-+  ## TODO: here is a trap for other distributions
-+  ##       should use /usr/bin/lsb_release -i -s
-   DISTRIB_ID="ubuntu"
- elif [ -e /etc/debian_version ]; then
-   DISTRIB_ID="debian" # also exists on Ubuntu
-@@ -57,53 +94,27 @@ elif [ "$UNAME_S" = "Darwin" ]; then
-   DISTRIB_ID="Darwin"
- elif [ "$UNAME_S" = "FreeBSD" ]; then
-   DISTRIB_ID="FreeBSD"
-+else
-+  echo "This script needs to be ported to this OS"
-+  exit 1
- fi
+ # number of times to retry check on pid lock file
+ PIDFILE_CHECK_RETRIES=${PIDFILE_CHECK_RETRIES:-30}
+ # stdout file of executable
+@@ -112,6 +122,7 @@
  
--# /usr/bin/lsb_release -rd # Ubuntu release & description info
--
--HEAD=/usr/bin/head
--test -x $HEAD || HEAD=head
--ESED=/usr/bin/sed
--test -x $ESED || ESED=sed
--
--# Ubuntu: Do NOT "set -e"
--
--#Ubuntu:PATH should only include /usr/* if it runs after the mountnfs.sh script
--PATH=/usr/sbin:/usr/bin:/sbin:/bin
--DESC="start/stop Traffic Server"
--NAME=trafficserver
--TS_PREFIX="@prefix@"
--
--TS_ROOT=${TS_ROOT:-$TS_PREFIX}
--# TS_BASE is offset inside the file system from where the layout starts
--# For standard installations TS_BASE will be empty
--eval TS_BASE="`echo $TS_ROOT | ${ESED} -e 's;@prefix@$;;'`"
--
--TC_NAME=${TC_NAME:-traffic_cop}
--TM_NAME=${TM_NAME:-traffic_manager}
--TS_NAME=${TS_NAME:-traffic_server}
--TC_DAEMON=${TC_DAEMON:-$TS_BASE at exp_bindir@/traffic_cop}
--TC_DAEMON_ARGS=""
--TM_DAEMON=${TM_DAEMON:-$TS_BASE at exp_bindir@/traffic_manager}
--TM_DAEMON_ARGS=""
--TS_DAEMON=${TS_DAEMON:-$TS_BASE at exp_bindir@/traffic_server}
--TS_DAEMON_ARGS=""
--TC_PIDFILE=${TC_PIDFILE:-$TS_BASE at exp_runtimedir@/cop.lock}
--TM_PIDFILE=${TM_PIDFILE:-$TS_BASE at exp_runtimedir@/manager.lock}
--TS_PIDFILE=${TS_PIDFILE:-$TS_BASE at exp_runtimedir@/server.lock}
--# number of times to retry check on pid lock file
--PIDFILE_CHECK_RETRIES=${PIDFILE_CHECK_RETRIES:-30}
--# stdout file of executable
--STDOUTLOG=${STDOUTLOG:-$TS_BASE at exp_logdir@/traffic_server.stdout}
--# stderr file of executable
--STDERRLOG=${STDERRLOG:-$TS_BASE at exp_logdir@/traffic_server.stderr}
--
  if [ -d /etc/rc.d/init.d ]; then
--  SCRIPTNAME=/etc/rc.d/init.d/$NAME # Fedora
-+  # Fedora & Redhat
-+  SCRIPTNAME=/etc/rc.d/init.d/$NAME
-+  test -f /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions
+   SCRIPTNAME=/etc/rc.d/init.d/$NAME # Fedora
 +  test -r /etc/sysconfig/$NAME && . /etc/sysconfig/$NAME
  elif [ -d /etc/init.d ]; then
--  SCRIPTNAME=/etc/init.d/$NAME # Ubuntu
-+  # Ubuntu & Debian
-+  SCRIPTNAME=/etc/init.d/$NAME
-+  test -r /etc/default/$NAME && . /etc/default/$NAME
-+  test -f /etc/default/rcS && . /etc/default/rcS
-+  # Ubuntu: Define LSB log_* functions.
-+  #         Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
-+  test -f /lib/lsb/init-functions && . /lib/lsb/init-functions
+   SCRIPTNAME=/etc/init.d/$NAME # Ubuntu
  elif [ "$DISTRIB_ID" = "Darwin" ]; then
--  SCRIPTNAME=$0 # Darwin
-+  # Darwin
-+  SCRIPTNAME=$0
- elif [ "$DISTRIB_ID" = "FreeBSD" ]; then
-   SCRIPTNAME=$0 # FreeBSD 
- else
-@@ -111,7 +122,6 @@ else
-   exit 1
- fi
- 
--
- # Exit if the package can not be found
- if [ ! -x "$TS_DAEMON" ]; then
-   echo "Error: Can not find $TS_DAEMON using TS_ROOT=$TS_ROOT"
-@@ -119,42 +129,18 @@ if [ ! -x "$TS_DAEMON" ]; then
-   exit 0
- fi
- 
--# Ubuntu: Read configuration variable file if it is present
--test -r /etc/default/$NAME && . /etc/default/$NAME
--
--# Ubuntu: Load the VERBOSE setting and other rcS variables
--test -f /etc/default/rcS && . /etc/default/rcS
--
--# Suse: load rc.status
--test -f /etc/rc.status && . /etc/rc.status
--
--# Fedora: make avail helper functions 'action', 'killproc', 'status', etc
--test -f /etc/rc.d/init.d/functions && . /etc/rc.d/init.d/functions
--
--# Ubuntu: Define LSB log_* functions.
--#         Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
--test -f /lib/lsb/init-functions && . /lib/lsb/init-functions
--
--# FreeBSD
--# NB: FreeBSD's ports system installs a run script in /usr/local/etc/rc.d/ 
--# with native OS rc.subr(8) features.
--test -f /etc/rc.subr && . /etc/rc.subr
--
--
- #
+@@ -157,16 +168,14 @@
  # Fedora:
  #  launches $* in the background
  #  and checks if program creates its own pid lock file
@@ -192,7 +58,7 @@ index 6582984..7191cdb 100644
  
    while (( $i < $PIDFILE_CHECK_RETRIES ))
    do
-@@ -162,6 +148,7 @@ forkdaemon()
+@@ -174,6 +183,7 @@
      # check for regular file and size greater than 0
      if [[ -f $TC_PIDFILE ]] && [[ -s $TC_PIDFILE ]]
      then
@@ -200,16 +66,7 @@ index 6582984..7191cdb 100644
        success
        return 0
      fi
-@@ -265,7 +252,7 @@ case "$1" in
-     elif [ "$DISTRIB_ID" = "Darwin" ]; then
-       echo "Starting ${TS_PACKAGE_NAME}"
-       launchctl list $TC_NAME > /dev/null 2>&1 && exit 0
--      launchctl submit -l $TC_NAME -p $TC_DAEMON -o $STDOUTLOG -e $STDERRLOG -- $TC_DAEMON_ARGS
-+      launchctl submit -l $TC_NAME -p $TC_DAEMON -o /dev/null -e /dev/null -- $TC_DAEMON_ARGS
-     elif [ "$DISTRIB_ID" = "FreeBSD" ]; then
-       echo "Starting ${TS_PACKAGE_NAME}"
-       name="$TC_NAME"
-@@ -290,6 +277,7 @@ case "$1" in
+@@ -302,6 +312,7 @@
        action "Stopping ${TC_NAME}:" killproc -p $TC_PIDFILE $TC_DAEMON
        action "Stopping ${TM_NAME}:" killproc -p $TM_PIDFILE $TM_DAEMON
        action "Stopping ${TS_NAME}:" killproc -p $TS_PIDFILE $TS_DAEMON
@@ -217,3 +74,12 @@ index 6582984..7191cdb 100644
      elif [ "$DISTRIB_ID" = "suse" ]; then
        echo -n "Stopping ${TC_NAME}"
        killproc -p $TC_PIDFILE $TC_DAEMON
+@@ -410,7 +421,7 @@
+   ;;
+   condrestart)
+     if [ "$DISTRIB_ID" = "fedora" -o "$DISTRIB_ID" = "redhat" ]; then
+-      if ! $0 'status'
++      if $0 'status'
+       then
+         sh $0 'stop'
+         sh $0 'start'
diff --git a/trafficserver.spec b/trafficserver.spec
index 379ce31..a6fb9e4 100644
--- a/trafficserver.spec
+++ b/trafficserver.spec
@@ -2,8 +2,8 @@
 %define _hardened_build 1
 Summary:	Fast, scalable and extensible HTTP/1.1 compliant caching proxy server
 Name:		trafficserver
-Version:	3.0.4
-Release:	5%{?dist}
+Version:	3.0.5
+Release:	1%{?dist}
 License:	ASL 2.0
 Group:		System Environment/Daemons
 Source0:	http://www.apache.org/dist/%{name}/%{name}-%{version}.tar.bz2
@@ -29,9 +29,6 @@ Requires(postun): initscripts
 
 Patch2:		trafficserver-init_scripts.patch
 Patch7:		trafficserver_make_install.patch
-# Fixed on v3.1:
-Patch52:	trafficserver-condrestart.patch
-Patch53:	trafficserver-gcc47.patch
 
 
 %description
@@ -43,8 +40,6 @@ caching proxy server.
 
 %patch2 -p1 -b .patch2
 %patch7 -p1 -b .patch7
-%patch52 -p1 -b .patch52
-%patch53 -p1 -b .patch53
 
 %build
 ./configure --enable-layout=Gentoo --libdir=%{_libdir}/trafficserver --with-tcl=%{_libdir} --with-user=ats --with-group=ats
@@ -191,6 +186,11 @@ header files, and Apache httpd style module build system.
 %attr(0644,root,root) %{_libdir}/trafficserver/*.so
 
 %changelog
+* Sun Jun 10 2012 Jan-Frode Myklebust <janfrode at tanso.net> - 3.0.5-1
+- Remove trafficserver-gcc47.patch since it's fixed upstream, TS-1116.
+- Join trafficserver-condrestart.patch into trafficserver-init_scripts.patch,
+  and clean out not needed junk.
+
 * Fri Apr 13 2012 Jan-Frode Myklebust <janfrode at tanso.net> - 3.0.4-5
 - Add hardened build.
 


More information about the scm-commits mailing list