jhogarth pushed to sslh (el5). "make amendments to allow building on el5"

notifications at fedoraproject.org notifications at fedoraproject.org
Sat Apr 18 00:30:44 UTC 2015


>From 34900952539e3dd095cb4aa00b9e6bcb6dbe9e9a Mon Sep 17 00:00:00 2001
From: James Hogarth <james.hogarth at gmail.com>
Date: Sat, 18 Apr 2015 01:16:46 +0100
Subject: make amendments to allow building on el5


diff --git a/patch-el5.patch b/patch-el5.patch
new file mode 100644
index 0000000..12faf4c
--- /dev/null
+++ b/patch-el5.patch
@@ -0,0 +1,44 @@
+diff --git a/basic.cfg b/basic.cfg
+index 526ffbf..4234a5d 100644
+--- a/basic.cfg
++++ b/basic.cfg
+@@ -7,7 +7,7 @@ inetd: false;
+ numeric: false;
+ transparent: false;
+ timeout: "2";
+-user: "nobody";
++user: "sslh";
+ pidfile: "/var/run/sslh.pid";
+ 
+ 
+diff --git a/scripts/etc.rc.d.init.d.sslh.centos b/scripts/etc.rc.d.init.d.sslh.centos
+index 6549545..7911277 100755
+--- a/scripts/etc.rc.d.init.d.sslh.centos
++++ b/scripts/etc.rc.d.init.d.sslh.centos
+@@ -9,11 +9,12 @@
+ # processname: sslh
+ # config: /etc/sslh.cfg
+ # config: /etc/sysconfig/sslh
+-# pidfile: /var/run/sslh/sslh.pid
++# pidfile: /var/run/sslh.pid
+ #
+ # Authors:
+ # Andre Krajnik akrajnik at gmail.com - 2010-03-20
+ # Julien Thomas julthomas at free.fr - 2013-08-25
++# James Hogarth james.hogarth at gmail.com - 2015-04-18
+ 
+ # Source function library.
+ . /etc/init.d/functions
+@@ -23,10 +24,10 @@ 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}
+-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
diff --git a/patch-el6.patch b/patch-el6.patch
deleted file mode 100644
index 6d112c7..0000000
--- a/patch-el6.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff --git a/basic.cfg b/basic.cfg
-index 526ffbf..4234a5d 100644
---- a/basic.cfg
-+++ b/basic.cfg
-@@ -7,7 +7,7 @@ inetd: false;
- numeric: false;
- transparent: false;
- timeout: "2";
--user: "nobody";
-+user: "sslh";
- pidfile: "/var/run/sslh.pid";
- 
- 
-diff --git a/scripts/etc.rc.d.init.d.sslh.centos b/scripts/etc.rc.d.init.d.sslh.centos
-index 6549545..7911277 100755
---- a/scripts/etc.rc.d.init.d.sslh.centos
-+++ b/scripts/etc.rc.d.init.d.sslh.centos
-@@ -9,11 +9,12 @@
- # processname: sslh
- # config: /etc/sslh.cfg
- # config: /etc/sysconfig/sslh
--# pidfile: /var/run/sslh/sslh.pid
-+# pidfile: /var/run/sslh.pid
- #
- # Authors:
- # Andre Krajnik akrajnik at gmail.com - 2010-03-20
- # Julien Thomas julthomas at free.fr - 2013-08-25
-+# James Hogarth james.hogarth at gmail.com - 2015-04-18
- 
- # Source function library.
- . /etc/init.d/functions
-@@ -23,10 +24,10 @@ 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}
--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
-diff --git a/sslh-main.c b/sslh-main.c
-index 9cc8a06..607b44f 100644
---- a/sslh-main.c
-+++ b/sslh-main.c
-@@ -280,7 +280,10 @@ static int config_parse(char *filename, struct addrinfo **listen, struct proto *
- 
-     config_init(&config);
-     if (config_read_file(&config, filename) == CONFIG_FALSE) {
--        if (config_error_type(&config) == CONFIG_ERR_PARSE) {
-+/* If it's a parse error then there will be a line number for the failure
-+ * an I/O error (such as non-existent file) will have the error line as 0
-+ */
-+        if (config_error_line(&config) != 0) {
-             fprintf(stderr, "%s:%d:%s\n", 
-                     filename,
-                     config_error_line(&config),
diff --git a/sslh.spec b/sslh.spec
index 5a2061d..16d07de 100644
--- a/sslh.spec
+++ b/sslh.spec
@@ -1,6 +1,8 @@
 %global _hardened_build 1
 # Define pkgdocdir for releases that don't define it already
 %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}}
+# Define initddir for releases that don't define it already
+%{!?_initddir: %global _initddir %{_initrddir}}
 
 Name:    sslh
 Version: 1.17
@@ -9,9 +11,8 @@ Summary: Applicative protocol(SSL/SSH) multiplexer
 License: GPLv2
 URL:     http://www.rutschle.net/tech/sslh.shtml
 Source0: http://www.rutschle.net/tech/%{name}-v%{version}.tar.gz
-Patch: patch-el6.patch
+Patch: patch-el5.patch
 
-BuildRequires: libconfig-devel
 BuildRequires: libcap-devel
 BuildRequires: tcp_wrappers-devel
 
@@ -41,7 +42,7 @@ comes from its original function to serve SSH and HTTPS on the same port.
 
 %build
 ./genver.sh >version.h
-make %{?_smp_mflags} USELIBWRAP=1 USELIBCAP=1 CFLAGS="%{optflags}" %{name}
+make %{?_smp_mflags} USELIBCONFIG=0 USELIBWRAP=1 USELIBCAP=1 CFLAGS="%{optflags}" %{name}
 pod2man --section=8 --release=%{version} --center=" " %{name}.pod > %{name}.8
 iconv --from=ISO-8859-1 --to=UTF-8 ChangeLog > ChangeLog.conv && \
 touch -r ChangeLog ChangeLog.conv && \
@@ -56,7 +57,6 @@ mkdir -p %{buildroot}%{_unitdir}
 mkdir -p %{buildroot}%{_initddir}
 cp -p %{name}-fork %{buildroot}%{_sbindir}/%{name}
 cp -p %{name}-select %{buildroot}%{_sbindir}/%{name}-select
-cp -p basic.cfg %{buildroot}/etc/%{name}.cfg
 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
@@ -91,9 +91,6 @@ fi
 %attr(0755,root,root) %{_sbindir}/%{name}
 %attr(0755,root,root) %{_sbindir}/%{name}-select
 %attr(0755,root,root) %{_initddir}/sslh
-%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/%{name}.cfg
-
-
 
 
 %changelog
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/sslh.git/commit/?h=el5&id=34900952539e3dd095cb4aa00b9e6bcb6dbe9e9a


More information about the scm-commits mailing list