[csw-devel] SF.net SVN: gar:[10647] csw/mgar/pkg/stunnel/trunk

skayser at users.sourceforge.net skayser at users.sourceforge.net
Thu Jul 29 00:31:13 CEST 2010


Revision: 10647
          http://gar.svn.sourceforge.net/gar/?rev=10647&view=rev
Author:   skayser
Date:     2010-07-28 22:31:13 +0000 (Wed, 28 Jul 2010)

Log Message:
-----------
stunnel: working towards 4.27

Modified Paths:
--------------
    csw/mgar/pkg/stunnel/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/stunnel/trunk/files/0001-Make-stunnel.conf-sample.in-honor-sysconfdir-localst.patch

Removed Paths:
-------------
    csw/mgar/pkg/stunnel/trunk/files/gar-base.diff

Modified: csw/mgar/pkg/stunnel/trunk/Makefile
===================================================================
--- csw/mgar/pkg/stunnel/trunk/Makefile	2010-07-28 22:11:37 UTC (rev 10646)
+++ csw/mgar/pkg/stunnel/trunk/Makefile	2010-07-28 22:31:13 UTC (rev 10647)
@@ -17,19 +17,15 @@
   the daemon's code. 
 endef
 
+VENDOR_URL   = http://www.stunnel.org
 MASTER_SITES = http://www.stunnel.org/download/stunnel/src/
-DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
+DISTFILES    = $(GARNAME)-$(GARVERSION).tar.gz
+UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
 
-SPKG_SOURCEURL = http://www.stunnel.org
-SPKG_CLASSES = none cswcpsampleconf cswinitsmf
-
 RUNTIME_DEP_PKGS = CSWzlib CSWosslrt CSWtcpwrap CSWcswclassutils
 
-# 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
+PATCHFILES = 0001-Make-stunnel.conf-sample.in-honor-sysconfdir-localst.patch
 
 CONFIGURE_ARGS = $(DIRPATHS)
 CONFIGURE_ARGS += --with-ssl=/opt/csw
@@ -40,12 +36,17 @@
 # No test target available
 TEST_SCRIPTS =
 
-PROTOTYPE_FILTER  = awk '\
-	$$$$3 ~ /cswstunnel$$$$/ { $$$$2 = "cswinitsmf" } \
-	$$$$3 ~ /stunnel.pem.CSW$$$$/ { $$$$2 = "cswcpsampleconf" } \
-	$$$$3 ~ /\/var\/opt\/csw\/lib\/stunnel/ { $$$$5 = "nobody"; $$$$6 = "nogroup" } \
-	{ print }'
+sysconfdir=/etc/opt/csw
+localstatedir=/var/opt/csw
 
+INITSMF = $(sysconfdir)/init.d/cswstunnel
+SAMPLECONF = $(sysconfdir)/stunnel.pem
+
+PROTOTYPE_MODIFIERS = restrict
+PROTOTYPE_FILES_restrict = $(localstatedir)/lib/stunnel.*
+PROTOTYPE_USER_restrict  = nobody
+PROTOTYPE_GROUP_restrict = nobody
+
 include gar/category.mk
 
 # 1) Suppress prompts for openssl sample cert generation (-batch)
@@ -61,19 +62,17 @@
 post-install-modulated: DOCS=AUTHORS BUGS CREDITS ChangeLog TODO
 post-install-modulated: DOCS+= doc/stunnel.*html
 post-install-modulated:
-	@ginstall -d $(DESTDIR)/etc/opt/csw/init.d
-	@ginstall -m 755 $(FILEDIR)/CSWstunnel.cswstunnel \
-		$(DESTDIR)/etc/opt/csw/init.d/cswstunnel
-	@mv $(DESTDIR)$(sysconfdir)/stunnel/stunnel.pem \
-		$(DESTDIR)$(sysconfdir)/stunnel/stunnel.pem.CSW
+	ginstall -d $(DESTDIR)$(sysconfdir)/init.d
+	ginstall -m 755 $(FILEDIR)/CSWstunnel.cswstunnel \
+		$(DESTDIR)$(sysconfdir)/init.d/cswstunnel
 
 	# create pidfile directory
-	@ginstall -d $(DESTDIR)/var/opt/csw/run/stunnel
+	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)
+	rm -rf $(DOCDEST)/*
+	$(foreach D,$(DOCS),cp $(WORKSRC)/$(D) $(DOCDEST);)
+	cp $(FILEDIR)/changelog.CSW $(DOCDEST)
 	@$(MAKECOOKIE)

Added: csw/mgar/pkg/stunnel/trunk/files/0001-Make-stunnel.conf-sample.in-honor-sysconfdir-localst.patch
===================================================================
--- csw/mgar/pkg/stunnel/trunk/files/0001-Make-stunnel.conf-sample.in-honor-sysconfdir-localst.patch	                        (rev 0)
+++ csw/mgar/pkg/stunnel/trunk/files/0001-Make-stunnel.conf-sample.in-honor-sysconfdir-localst.patch	2010-07-28 22:31:13 UTC (rev 10647)
@@ -0,0 +1,53 @@
+From afc5fc671d32cb128ef08bfb8b044b45d653e104 Mon Sep 17 00:00:00 2001
+From: Sebastian Kayser <skayser at opencsw.org>
+Date: Tue, 20 Jul 2010 01:13:20 +0200
+Subject: [PATCH] Make stunnel.conf-sample.in honor --sysconfdir, --localstatedir
+
+In case someone ./configured with a --sysconfdir or --localstatedir
+rooted elsewhere than prefix, stunnel.conf-sample.in would have
+disregarded it, because it only honors --prefix. This patch
+introduces handling for the more specific --sysconfdir/--localstatedir.
+---
+ tools/stunnel.conf-sample.in |   10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/tools/stunnel.conf-sample.in b/tools/stunnel.conf-sample.in
+index 29acdfc..8791f69 100644
+--- a/tools/stunnel.conf-sample.in
++++ b/tools/stunnel.conf-sample.in
+@@ -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 @@ socket = r:TCP_NODELAY=1
+ ; 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
+-- 
+1.7.1
+

Deleted: csw/mgar/pkg/stunnel/trunk/files/gar-base.diff
===================================================================
--- csw/mgar/pkg/stunnel/trunk/files/gar-base.diff	2010-07-28 22:11:37 UTC (rev 10646)
+++ csw/mgar/pkg/stunnel/trunk/files/gar-base.diff	2010-07-28 22:31:13 UTC (rev 10647)
@@ -1,36 +0,0 @@
-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


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