jhogarth pushed to sslh (el5). "spec and patch tweaking for el5 requirements"
notifications at fedoraproject.org
notifications at fedoraproject.org
Sat Apr 18 00:30:44 UTC 2015
>From 094e59aee3c180cb83391a521c1ed993b132a945 Mon Sep 17 00:00:00 2001
From: James Hogarth <james.hogarth at gmail.com>
Date: Sat, 18 Apr 2015 01:30:13 +0100
Subject: spec and patch tweaking for el5 requirements
diff --git a/patch-el5.patch b/patch-el5.patch
index 12faf4c..9d568b8 100644
--- a/patch-el5.patch
+++ b/patch-el5.patch
@@ -12,7 +12,7 @@ index 526ffbf..4234a5d 100644
diff --git a/scripts/etc.rc.d.init.d.sslh.centos b/scripts/etc.rc.d.init.d.sslh.centos
-index 6549545..7911277 100755
+index 6549545..105d36c 100755
--- a/scripts/etc.rc.d.init.d.sslh.centos
+++ b/scripts/etc.rc.d.init.d.sslh.centos
@@ -9,11 +9,12 @@
@@ -29,16 +29,63 @@ index 6549545..7911277 100755
# Source function library.
. /etc/init.d/functions
-@@ -23,10 +24,10 @@ if [ -f /etc/sysconfig/sslh ]; then
+@@ -23,10 +24,9 @@ if [ -f /etc/sysconfig/sslh ]; then
fi
PROGNAME=sslh
-SSLH=${SSLH:-/usr/sbin/sslh-select}
+SSLH=${SSLH:-/usr/sbin/sslh}
SSLH_LANG=${SSLH_LANG:-C}
- CONFIG=${CONFIG:-/etc/sslh.cfg}
+-CONFIG=${CONFIG:-/etc/sslh.cfg}
-PIDFILE=${PIDFILE:-/var/run/sslh/sslh.pid}
+PIDFILE=${PIDFILE:-/var/run/sslh.pid}
LOCKFILE=${LOCKFILE:-/var/lock/subsys/sslh}
STOP_TIMEOUT=${STOP_TIMEOUT:-10}
RETVAL=0
+@@ -35,7 +35,7 @@ start() {
+ echo -n "Starting $PROGNAME: "
+ LANG=$SSLH_LANG daemon --pidfile="$PIDFILE" \
+ ${SSLH_USER:+--user="${SSLH_USER}"} \
+- "$SSLH" ${CONFIG:+-F "$CONFIG"} "$OPTIONS"
++ "$SSLH" "$OPTIONS"
+ RETVAL=$?
+ echo
+ [ $RETVAL = 0 ] && touch "$LOCKFILE"
+diff --git a/scripts/etc.sysconfig.sslh b/scripts/etc.sysconfig.sslh
+index d9eeed5..e4ac97a 100644
+--- a/scripts/etc.sysconfig.sslh
++++ b/scripts/etc.sysconfig.sslh
+@@ -1,6 +1,6 @@
+ #
+-# The default processing model uses select
+-# A fork model is also available
++# The default processing model uses fork
++# A select model is also available
+ #
+ #SSLH=/usr/sbin/sslh-select
+
+@@ -12,15 +12,9 @@
+ #setcap cap_net_bind_service,cap_net_admin=+ep $SSLH
+
+ #
+-# Configuration file for sslh
+-# Set empty to disable configuration file support
+-#
+-#CONFIG=/etc/sslh.cfg
+-
+-#
+-# Extra option to pass on comand line
+-# Those can supersede configuration file settings
+-#
++# Options to pass on comand line
++# EL5 has no libconfig so configure the bindings
++# via the options that get passed to the init file
+ #OPTIONS=
+
+ #
+@@ -33,4 +27,4 @@
+ # If an alternate location is specified in configuration
+ # file, it needs to be reported here
+ #
+-#PIDFILE=/var/run/sslh/sslh.pid
++#PIDFILE=/var/run/sslh.pid
diff --git a/sslh.spec b/sslh.spec
index 16d07de..abc9a06 100644
--- a/sslh.spec
+++ b/sslh.spec
@@ -9,15 +9,18 @@ Version: 1.17
Release: 1%{?dist}
Summary: Applicative protocol(SSL/SSH) multiplexer
License: GPLv2
+Group: Applications/System
URL: http://www.rutschle.net/tech/sslh.shtml
Source0: http://www.rutschle.net/tech/%{name}-v%{version}.tar.gz
-Patch: patch-el5.patch
+Patch: patch-el5.patch
+
+BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildRequires: libcap-devel
BuildRequires: tcp_wrappers-devel
-Requires(pre): shadow-utils
-Requires(post): chkconfig
+Requires(pre): shadow-utils
+Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
@@ -49,6 +52,7 @@ touch -r ChangeLog ChangeLog.conv && \
mv ChangeLog.conv ChangeLog
%install
+rm -rf %{buildroot}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_sysconfdir}
mkdir -p %{buildroot}%{_pkgdocdir}
@@ -61,6 +65,9 @@ cp -p {README.md,COPYING,ChangeLog} %{buildroot}%{_pkgdocdir}/
cp -p %{name}.8 %{buildroot}%{_mandir}/man8/
cp -p scripts/etc.rc.d.init.d.sslh.centos %{buildroot}%{_initddir}/sslh
+%clean
+rm -rf %{buildroot}
+
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/sslh.git/commit/?h=el5&id=094e59aee3c180cb83391a521c1ed993b132a945
More information about the scm-commits
mailing list