[arch-commits] Commit in sslh/trunk (6 files)

Sébastien Luttringer seblu at archlinux.org
Tue Sep 27 23:41:36 UTC 2016


    Date: Tuesday, September 27, 2016 @ 23:41:36
  Author: seblu
Revision: 190692

Various

- move config to sslh.cfg (upstream preference)
- add preleminary support for systemd socket activation
- add manpages for sslh-fork & sslh-select

Added:
  sslh/trunk/sslh.cfg
    (from rev 190691, sslh/trunk/sslh.conf)
Modified:
  sslh/trunk/PKGBUILD
  sslh/trunk/sslh-fork.service
  sslh/trunk/sslh-select.service
  sslh/trunk/sslh.install
Deleted:
  sslh/trunk/sslh.conf

---------------------+
 PKGBUILD            |   33 +++++++++++++++++++++++----------
 sslh-fork.service   |    2 +-
 sslh-select.service |    2 +-
 sslh.cfg            |   29 +++++++++++++++++++++++++++++
 sslh.conf           |   29 -----------------------------
 sslh.install        |    6 ++++++
 6 files changed, 60 insertions(+), 41 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-09-27 23:10:43 UTC (rev 190691)
+++ PKGBUILD	2016-09-27 23:41:36 UTC (rev 190692)
@@ -5,33 +5,43 @@
 
 pkgname=sslh
 pkgver=1.18
-pkgrel=1
+pkgrel=1.1
 pkgdesc='SSL/SSH/OpenVPN/XMPP/tinc port multiplexer'
 arch=('i686' 'x86_64')
 url='http://www.rutschle.net/tech/sslh.shtml'
 license=('GPL2')
-depends=('libcap' 'libconfig')
-backup=('etc/sslh.conf')
+makedepends=('systemd')
+depends=('libcap' 'libconfig' 'libsystemd')
+backup=('etc/sslh.cfg')
 install=$pkgname.install
 source=("http://www.rutschle.net/tech/sslh/$pkgname-v$pkgver.tar.gz"
-        'sslh.conf'
+        'sslh.cfg'
         'sslh.sysusers'
+        'sslh.service'
         'sslh-select.service'
         'sslh-fork.service')
 md5sums=('0e3568d5d234516c634d4df156473298'
          'd5405c7ca7e1813e4d49a473e5834640'
          'f39544277a30595d4b7476b3f87ebbcf'
-         '0f3f9e3ac2ac4b576d684b21b566aeb9'
-         '4e64f0850ec9bd44071ae8d5369316e5')
+         '42fa125c3af845ada9fe9efaba51e521'
+         '1b6b8cfeb36de7f76f3a7f156365ce28'
+         'b81ef5e6a9086593ccb2e2eaad4793fc')
 
 build() {
   cd $pkgname-v$pkgver
-  make VERSION=\"v$pkgver\" USELIBCAP=1
+  #FIXME: https://github.com/yrutschle/sslh/issues/103
+  export CFLAGS=''
+  make VERSION=\"v$pkgver\" USELIBCAP=1 USESYSTEMD=1 all systemd-sslh-generator
 }
 
+#check() {
+#  cd $pkgname-v$pkgver
+#  make test
+#}
+
 package() {
   # default arch config
-  install -Dm 644 sslh.conf "$pkgdir/etc/sslh.conf"
+  install -Dm 644 sslh.cfg "$pkgdir/etc/sslh.cfg"
   # manually install to have both ssl-fork and ssl-select
   cd $pkgname-v$pkgver
   install -Dm 755 sslh-fork "$pkgdir/usr/bin/sslh-fork"
@@ -39,13 +49,16 @@
   ln -s sslh-fork "$pkgdir/usr/bin/sslh"
   # install manpage
   install -Dm 644 sslh.8.gz "$pkgdir/usr/share/man/man8/sslh.8.gz"
+  ln -s sslh.8.gz "$pkgdir/usr/share/man/man8/sslh-fork.8.gz"
+  ln -s sslh.8.gz "$pkgdir/usr/share/man/man8/sslh-select.8.gz"
   # install examples files
   install -Dm 644 basic.cfg "$pkgdir/usr/share/doc/$pkgname/basic.cfg"
   install -Dm 644 example.cfg "$pkgdir/usr/share/doc/$pkgname/example.cfg"
   # systemd
+  install -dm 755 "$pkgdir"/usr/lib/{systemd/system,sysusers.d}
+  install -Dm 755 systemd-sslh-generator "$pkgdir/usr/lib/systemd/system-generators/systemd-sslh-generator"
   cd "$pkgdir"
-  install -dm 755 usr/lib/{systemd/system,sysusers.d}
-  install -Dm 644 "$srcdir"/sslh-{fork,select}.service usr/lib/systemd/system
+  install -Dm 644 "$srcdir"/sslh{,-fork,-select}.service usr/lib/systemd/system
   install -Dm 644 "$srcdir"/sslh.sysusers usr/lib/sysusers.d/sslh.conf
 }
 

Modified: sslh-fork.service
===================================================================
--- sslh-fork.service	2016-09-27 23:10:43 UTC (rev 190691)
+++ sslh-fork.service	2016-09-27 23:41:36 UTC (rev 190692)
@@ -3,7 +3,7 @@
 After=network.target
 
 [Service]
-ExecStart=/usr/bin/sslh-fork -F/etc/sslh.conf
+ExecStart=/usr/bin/sslh-fork -F
 KillMode=process
 PIDFile=/run/sslh.pid
 

Modified: sslh-select.service
===================================================================
--- sslh-select.service	2016-09-27 23:10:43 UTC (rev 190691)
+++ sslh-select.service	2016-09-27 23:41:36 UTC (rev 190692)
@@ -3,7 +3,7 @@
 After=network.target
 
 [Service]
-ExecStart=/usr/bin/sslh-select -F/etc/sslh.conf
+ExecStart=/usr/bin/sslh-select -F
 PIDFile=/run/sslh.pid
 
 [Install]

Copied: sslh/trunk/sslh.cfg (from rev 190691, sslh/trunk/sslh.conf)
===================================================================
--- sslh.cfg	                        (rev 0)
+++ sslh.cfg	2016-09-27 23:41:36 UTC (rev 190692)
@@ -0,0 +1,29 @@
+# Default Arch configuration
+# You can find more examples in /usr/share/doc/sslh
+
+verbose: false;
+foreground: true;
+inetd: false;
+numeric: false;
+transparent: false;
+timeout: 2;
+user: "sslh";
+pidfile: "/run/sslh.pid";
+
+
+listen:
+(
+    { host: "::0"; port: "443"; }
+);
+
+protocols:
+(
+     { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; probe: "builtin"; },
+     { name: "openvpn"; host: "localhost"; port: "1194"; probe: "builtin"; },
+     { name: "xmpp"; host: "localhost"; port: "5222"; probe: "builtin"; },
+     { name: "http"; host: "localhost"; port: "80"; probe: "builtin"; },
+     { name: "ssl"; host: "localhost"; port: "8443"; probe: "builtin"; },
+     { name: "anyprot"; host: "localhost"; port: "8443"; probe: "builtin"; }
+);
+
+# vim:set ts=4 sw=4 et:

Deleted: sslh.conf
===================================================================
--- sslh.conf	2016-09-27 23:10:43 UTC (rev 190691)
+++ sslh.conf	2016-09-27 23:41:36 UTC (rev 190692)
@@ -1,29 +0,0 @@
-# Default Arch configuration
-# You can find more examples in /usr/share/doc/sslh
-
-verbose: false;
-foreground: true;
-inetd: false;
-numeric: false;
-transparent: false;
-timeout: 2;
-user: "sslh";
-pidfile: "/run/sslh.pid";
-
-
-listen:
-(
-    { host: "::0"; port: "443"; }
-);
-
-protocols:
-(
-     { name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; probe: "builtin"; },
-     { name: "openvpn"; host: "localhost"; port: "1194"; probe: "builtin"; },
-     { name: "xmpp"; host: "localhost"; port: "5222"; probe: "builtin"; },
-     { name: "http"; host: "localhost"; port: "80"; probe: "builtin"; },
-     { name: "ssl"; host: "localhost"; port: "8443"; probe: "builtin"; },
-     { name: "anyprot"; host: "localhost"; port: "8443"; probe: "builtin"; }
-);
-
-# vim:set ts=4 sw=4 et:

Modified: sslh.install
===================================================================
--- sslh.install	2016-09-27 23:10:43 UTC (rev 190691)
+++ sslh.install	2016-09-27 23:41:36 UTC (rev 190692)
@@ -20,6 +20,12 @@
 ===> sslh may runs as unprivileged sslh user. Check your setup.
 EOF
   fi
+  if (( "$(vercmp $2 1.18-2)" < 0 )); then
+    cat << EOF
+===> Default config path is now /etc/sslh.cfg (as required by systemd generator)
+===> Rename your /etc/sslh.conf into /etc/sslh.cfg
+EOF
+  fi
 }
 
 # vim:set ts=2 sw=2 ft=sh et:



More information about the arch-commits mailing list