[csw-devel] SF.net SVN: gar:[4919] csw/mgar/pkg/stunnel/trunk
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Sun May 17 22:03:09 CEST 2009
Revision: 4919
http://gar.svn.sourceforge.net/gar/?rev=4919&view=rev
Author: skayser
Date: 2009-05-17 20:03:09 +0000 (Sun, 17 May 2009)
Log Message:
-----------
stunnel: several packaging cleanups, mostly path fixes
Modified Paths:
--------------
csw/mgar/pkg/stunnel/trunk/Makefile
csw/mgar/pkg/stunnel/trunk/checksums
Added Paths:
-----------
csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.postinstall
csw/mgar/pkg/stunnel/trunk/files/gar-base.diff
Removed Paths:
-------------
csw/mgar/pkg/stunnel/trunk/files/postinstall
Modified: csw/mgar/pkg/stunnel/trunk/Makefile
===================================================================
--- csw/mgar/pkg/stunnel/trunk/Makefile 2009-05-17 17:55:27 UTC (rev 4918)
+++ csw/mgar/pkg/stunnel/trunk/Makefile 2009-05-17 20:03:09 UTC (rev 4919)
@@ -1,7 +1,3 @@
-# TODO
-# - Remove excessive files from $(docdir)
-# - Adjust paths in $(sysconfdir)/stunnel.conf-sample
-# - Verify /var/opt/csw/lib/stunnel/dev/zero creation in postinstall
GARNAME = stunnel
GARVERSION = 4.27
CATEGORIES = net
@@ -17,16 +13,20 @@
MASTER_SITES = http://www.stunnel.org/download/stunnel/src/
DISTFILES = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += postinstall
+DISTFILES += CSWstunnel.postinstall
SPKG_SOURCEURL = http://www.stunnel.org
+REQUIRED_PKGS = CSWzlib CSWosslrt CSWtcpwrap
+
# We define upstream file regex so we can be notifed of new upstream software release
UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
+# Make stunnel.conf-sample.in honor $localstatedir adjustments
+PATCHFILES = gar-base.diff
+
CONFIGURE_ARGS = $(DIRPATHS)
CONFIGURE_ARGS += --with-ssl=/opt/csw
-#CONFIGURE_ARGS += --with-cert-dir=/opt/csw/ssl/certs/
CONFIGURE_ARGS += --enable-ipv6
CONFIGURE_ARGS += --enable-dh
CONFIGURE_ARGS += --localstatedir=/var/opt/csw
@@ -40,14 +40,22 @@
# 2) Disable creation of /dev/zero (needs root privs, moved to postinstall)
pre-build-modulated:
perl -pi -e '\
- s|/bin/openssl|/bin/openssl -batch|; \
+ s|\$$\(openssl\) req|\$$\(openssl\) req -batch|; \
s|^|#| if (m|/dev/zero|);' \
$(WORKSRC)/tools/Makefile
@$(MAKECOOKIE)
post-install-modulated: DOCDEST=$(DESTDIR)$(docdir)/$(GARNAME)
+post-install-modulated: DOCS=AUTHORS BUGS CREDITS ChangeLog TODO
+post-install-modulated: DOCS+= doc/stunnel.*html
post-install-modulated:
- @ginstall -d $(DOCDEST)
- @cp $(WORKSRC)/BUGS $(WORKSRC)/ChangeLog $(DOCDEST)
+ # create pidfile directory
+ @ginstall -d $(DESTDIR)/var/opt/csw/run/stunnel
+
+ # stunnel installs several random sample scripts, cgi scripts, and
+ # a .spec file with unadjusted paths. Leave them out for now and
+ # only include specific files
+ @rm -rf $(DOCDEST)/*
+ @$(foreach D,$(DOCS),cp $(WORKSRC)/$(D) $(DOCDEST);)
@cp $(FILEDIR)/changelog.CSW $(DOCDEST)
@$(MAKECOOKIE)
Modified: csw/mgar/pkg/stunnel/trunk/checksums
===================================================================
--- csw/mgar/pkg/stunnel/trunk/checksums 2009-05-17 17:55:27 UTC (rev 4918)
+++ csw/mgar/pkg/stunnel/trunk/checksums 2009-05-17 20:03:09 UTC (rev 4919)
@@ -1 +1,3 @@
+b3f085499896129ad6813b1bda46113c download/CSWstunnel.postinstall
+b73143a6ffa7d55f4dffcd3d6fa0544a download/gar-base.diff
3c655d815576f50046a1c28744b88681 download/stunnel-4.27.tar.gz
Copied: csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.postinstall (from rev 4802, csw/mgar/pkg/stunnel/trunk/files/postinstall)
===================================================================
--- csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.postinstall (rev 0)
+++ csw/mgar/pkg/stunnel/trunk/files/CSWstunnel.postinstall 2009-05-17 20:03:09 UTC (rev 4919)
@@ -0,0 +1,9 @@
+#!/bin/sh
+#
+# Create required /dev/zero in stunnel chroot directory
+#
+# Taken from stunnel Makefile. mknod can only be run as root and thus needs
+# to be run from postinstall (packaging is done as non-root user).
+#
+/usr/sbin/mknod /var/opt/csw/lib/stunnel/dev/zero c 13 12
+chmod 666 /var/opt/csw/lib/stunnel/dev/zero
Added: csw/mgar/pkg/stunnel/trunk/files/gar-base.diff
===================================================================
--- csw/mgar/pkg/stunnel/trunk/files/gar-base.diff (rev 0)
+++ csw/mgar/pkg/stunnel/trunk/files/gar-base.diff 2009-05-17 20:03:09 UTC (rev 4919)
@@ -0,0 +1,52 @@
+diff --speed-large-files --minimal -Nru stunnel-4.27.orig/tools/stunnel.conf-sample.in stunnel-4.27/tools/stunnel.conf-sample.in
+--- stunnel-4.27.orig/tools/stunnel.conf-sample.in 2009-04-16 11:10:09.000000000 +0200
++++ stunnel-4.27/tools/stunnel.conf-sample.in 2009-05-17 12:19:56.297735281 +0200
+@@ -3,14 +3,14 @@
+ ; Please make sure you understand them (especially the effect of the chroot jail)
+
+ ; Certificate/key is needed in server mode and optional in client mode
+-cert = @prefix@/etc/stunnel/mail.pem
+-;key = @prefix@/etc/stunnel/mail.pem
++cert = @sysconfdir@/stunnel/mail.pem
++;key = @sysconfdir@/stunnel/mail.pem
+
+ ; Protocol version (all, SSLv2, SSLv3, TLSv1)
+ sslVersion = SSLv3
+
+ ; Some security enhancements for UNIX systems - comment them out on Win32
+-chroot = @prefix@/var/lib/stunnel/
++chroot = @localstatedir@/lib/stunnel/
+ setuid = nobody
+ setgid = @DEFAULT_GROUP@
+ ; PID is created inside the chroot jail
+@@ -30,12 +30,12 @@
+ ; CApath is located inside chroot jail
+ ;CApath = /certs
+ ; It's often easier to use CAfile
+-;CAfile = @prefix@/etc/stunnel/certs.pem
++;CAfile = @sysconfdir/stunnel/certs.pem
+ ; Don't forget to c_rehash CRLpath
+ ; CRLpath is located inside chroot jail
+ ;CRLpath = /crls
+ ; Alternatively you can use CRLfile
+-;CRLfile = @prefix@/etc/stunnel/crls.pem
++;CRLfile = @sysconfdir@/stunnel/crls.pem
+
+ ; Some debugging stuff useful for troubleshooting
+ ;debug = 7
+diff --speed-large-files --minimal -Nru stunnel-4.27.orig/tools/stunnel.init.in stunnel-4.27/tools/stunnel.init.in
+--- stunnel-4.27.orig/tools/stunnel.init.in 2008-09-17 20:53:46.000000000 +0200
++++ stunnel-4.27/tools/stunnel.init.in 2009-05-17 12:21:18.360927513 +0200
+@@ -2,9 +2,9 @@
+ # Sample stunnel SysV startup file
+ # Copyright by Michal Trojnara 2002,2007,2008
+
+-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+-DAEMON=@prefix@/bin/stunnel
+-PIDFILE=@prefix@/var/run/stunnel/stunnel.pid
++PATH=@sbindir@:@bindir@:/sbin:/bin:/usr/sbin:/usr/bin
++DAEMON=@bindir@/stunnel
++PIDFILE=@localstatedir@/run/stunnel/stunnel.pid
+
+ test -f $DAEMON || exit 0
+
Deleted: csw/mgar/pkg/stunnel/trunk/files/postinstall
===================================================================
--- csw/mgar/pkg/stunnel/trunk/files/postinstall 2009-05-17 17:55:27 UTC (rev 4918)
+++ csw/mgar/pkg/stunnel/trunk/files/postinstall 2009-05-17 20:03:09 UTC (rev 4919)
@@ -1,10 +0,0 @@
-#!/bin/bash
-#
-# Create required /dev/zero in chroot directory
-#
-# Taken from stunnel Makefile. mknod can only be run as root and thus needs
-# to be run from postinstall (packaging is done as non-root user).
-#
-mkdir -p /var/opt/csw/lib/stunnel/dev
-mknod /var/opt/csw/lib/stunnel/dev/zero c 13 12
-chmod 666 /var/opt/csw/lib/stunnel/dev/zero
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list