[csw-devel] SF.net SVN: gar:[4283] csw/mgar/pkg/vsftpd/trunk

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sun Apr 12 15:19:37 CEST 2009


Revision: 4283
          http://gar.svn.sourceforge.net/gar/?rev=4283&view=rev
Author:   chninkel
Date:     2009-04-12 13:19:37 +0000 (Sun, 12 Apr 2009)

Log Message:
-----------
vsftpd: gar v2 fixes

Modified Paths:
--------------
    csw/mgar/pkg/vsftpd/trunk/Makefile
    csw/mgar/pkg/vsftpd/trunk/checksums
    csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec
    csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype

Added Paths:
-----------
    csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec
    csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall

Removed Paths:
-------------
    csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch

Modified: csw/mgar/pkg/vsftpd/trunk/Makefile
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/Makefile	2009-04-12 12:59:04 UTC (rev 4282)
+++ csw/mgar/pkg/vsftpd/trunk/Makefile	2009-04-12 13:19:37 UTC (rev 4283)
@@ -80,11 +80,11 @@
 
 ##### Build and installation information #####
 
+GARCOMPILER = SUN
+
 CONFIGURE_ARGS = $(DIRPATHS)
-CONFIGURE_SCRIPTS = fake
 
-GARCOMPILER = SUN
-
+CONFIGURE_SCRIPTS =
 TEST_SCRIPTS =
 
 include gar/category.mk
@@ -99,24 +99,29 @@
 
 INSTALL_ENV += INSTALL="ginstall"
 
-# no configure step with vsftpd
-configure-fake:
-	$(MAKECOOKIE)
 
 # we create the csw directory hierarchy 
-pre-install:
+pre-install-modulated:
 	@echo "Creating csw directories"
-	( install -d $(DESTDIR)$(sbindir); \
-	 install -d $(DESTDIR)$(mandir)/man5; \
-	 install -d $(DESTDIR)$(mandir)/man8; \
+	( ginstall -d $(DESTDIR)$(sbindir); \
+	 ginstall -d $(DESTDIR)$(mandir)/man5; \
+	 ginstall -d $(DESTDIR)$(mandir)/man8; \
 	 ln -sf $(DESTDIR)$(mandir) $(DESTDIR)$(prefix)/man; \
-	 install -d $(DESTDIR)$(docdir)/vsftpd )
+	 ginstall -d $(DESTDIR)$(docdir)/vsftpd )
 
 
+post-merge: merge-doc-files merge-config-files merge-class-files
 
-post-install:
-	cd $(WORKSRC) && \
+merge-config-files:
+	ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.conf" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.conf.CSW"
+	ginstall -D "$(WORKDIR_FIRSTMOD)/vsftpd.userlist" "$(PKGROOT)$(sysconfdir)/vsftpd/vsftpd.userlist"
+
+merge-doc-files:
 	for FILE in $(DOCFILES); do \
-		ginstall -D $$FILE $(DESTDIR)$(docdir)/vsftpd/$$FILE; \
+		ginstall -D "$(WORKSRC_FIRSTMOD)/$$FILE" "$(PKGROOT)$(docdir)/vsftpd/$$FILE"; \
 	done
+	ginstall -D "$(WORKDIR_FIRSTMOD)/changelog.CSW" "$(PKGROOT)$(docdir)/vsftpd/changelog.CSW"
+	ginstall -D "$(WORKDIR_FIRSTMOD)/README.CSW" "$(PKGROOT)$(docdir)/vsftpd/README.CSW"
 
+merge-class-files:
+	ginstall "$(DOWNLOADDIR)/"*.conf $(WORKDIR)/

Modified: csw/mgar/pkg/vsftpd/trunk/checksums
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/checksums	2009-04-12 12:59:04 UTC (rev 4282)
+++ csw/mgar/pkg/vsftpd/trunk/checksums	2009-04-12 13:19:37 UTC (rev 4283)
@@ -1,20 +1,20 @@
-7890b54e7ffa6106ffbdfda53f47fa41  download/vsftpd-2.1.0.tar.gz
-ad51a44007f43ed9ff736a38c764352b  download/CSWvsftpd.gspec
-eb9b4f253fa90f3b6187e44375306010  download/CSWvsftpd.prototype
+314e73654490c2abe742b7ed7be798b1  download/CSWvsftpd.csw_usrgrp_config
+81319e5dd110b08a476c3b31af2fd573  download/CSWvsftpd.depend
+598e429baa86555a44a3da6581a78704  download/CSWvsftpd.gspec
 a2f5b70fe49839b0463c9d90af0f11dd  download/CSWvsftpd.preinstall
-81319e5dd110b08a476c3b31af2fd573  download/CSWvsftpd.depend
-314e73654490c2abe742b7ed7be798b1  download/CSWvsftpd.csw_usrgrp_config
+c3916a9a49d6167fc67c07754d8aa980  download/CSWvsftpd.prototype
+eeaf77528b2da0c7730323838f30b7ef  download/README.CSW
+281c51282cabd9475cceef363bbc699b  download/build_options.patch
 68178673c7d33baead2d7b97e878ed79  download/changelog.CSW
-eeaf77528b2da0c7730323838f30b7ef  download/README.CSW
-f6ce22a6959b93e500a4ae800295c2ee  download/vsftpd.conf
-60c736802e2ce00c531953b01e4a26f6  download/vsftpd.userlist
+54c1c39c6bfa8747a4457f135fd5bca1  download/csw_build_system.patch
+a9e994d2b57999b76a0e03503745c01a  download/csw_paths.patch
 8a11892757760e07534a4a455f051e84  download/cswvsftpd
 5d093652c802b21dd00a52b2d012d977  download/cswvsftpd.xml
-32905b27a67ac3d4c93a52e10a3a80fd  download/svc-cswvsftpd
+73e59f9ada47d3d20199f7c97849fb13  download/destdir.patch
 9b2ae27f98333b73ff2b16ed98ee896a  download/i.conf
 5d9e9fb1a5b6af82ce915f72ebc5e3b7  download/r.conf
-281c51282cabd9475cceef363bbc699b  download/build_options.patch
-a9e994d2b57999b76a0e03503745c01a  download/csw_paths.patch
-54c1c39c6bfa8747a4457f135fd5bca1  download/csw_build_system.patch
 a9a65f55cbfd01f9d72d1de25e67148d  download/set_priv_sep_user.patch
-73e59f9ada47d3d20199f7c97849fb13  download/destdir.patch
+32905b27a67ac3d4c93a52e10a3a80fd  download/svc-cswvsftpd
+7890b54e7ffa6106ffbdfda53f47fa41  download/vsftpd-2.1.0.tar.gz
+f6ce22a6959b93e500a4ae800295c2ee  download/vsftpd.conf
+60c736802e2ce00c531953b01e4a26f6  download/vsftpd.userlist

Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec	2009-04-12 12:59:04 UTC (rev 4282)
+++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.gspec	2009-04-12 13:19:37 UTC (rev 4283)
@@ -4,4 +4,4 @@
 %copyright      url file://%{WORKSRC}/LICENSE
 %var		SERVICE_CONF_FILES /opt/csw/etc/vsftpd/vsftpd.conf
 %include  	url file://%{PKGLIB}/smf_enabled.gspec
-%include  	url file://%{PKGLIB}/csw_usrgrp.gspec
+%include  	url file://files/csw_usrgrp.gspec

Modified: csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype	2009-04-12 12:59:04 UTC (rev 4282)
+++ csw/mgar/pkg/vsftpd/trunk/files/CSWvsftpd.prototype	2009-04-12 13:19:37 UTC (rev 4283)
@@ -1,8 +1,8 @@
 i i.conf
 i r.conf
 d none /opt/csw/etc/vsftpd 0755 root bin
-f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW=vsftpd.conf 0755 root bin
-e conf /opt/csw/etc/vsftpd/vsftpd.userlist=vsftpd.userlist 0755 root bin
+f none /opt/csw/etc/vsftpd/vsftpd.conf.CSW 0755 root bin
+e conf /opt/csw/etc/vsftpd/vsftpd.userlist 0755 root bin
 f none /opt/csw/sbin/vsftpd 0755 root bin
 d none /opt/csw/share/doc/vsftpd 0755 root bin
 d none /opt/csw/share/doc/vsftpd/EXAMPLE 0755 root bin
@@ -24,8 +24,8 @@
 f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/vsftpd.xinetd 0644 root bin
 f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/README 0644 root bin
 f none /opt/csw/share/doc/vsftpd/EXAMPLE/INTERNET_SITE/vsftpd.conf 0644 root bin
-f none /opt/csw/share/doc/vsftpd/README.CSW=README.CSW 0755 root bin
-f none /opt/csw/share/doc/vsftpd/changelog.CSW=changelog.CSW 0644 root bin
+f none /opt/csw/share/doc/vsftpd/README.CSW 0755 root bin
+f none /opt/csw/share/doc/vsftpd/changelog.CSW 0644 root bin
 f none /opt/csw/share/doc/vsftpd/AUDIT 0644 root bin
 f none /opt/csw/share/doc/vsftpd/BENCHMARKS 0644 root bin
 f none /opt/csw/share/doc/vsftpd/BUGS 0644 root bin

Added: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec	                        (rev 0)
+++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.gspec	2009-04-12 13:19:37 UTC (rev 4283)
@@ -0,0 +1,3 @@
+%prototype:merge
+i csw_usrgrp_config=CSW%{bitname}.csw_usrgrp_config
+%preinstall:merge       url file://files/csw_usrgrp.preinstall

Added: csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall	                        (rev 0)
+++ csw/mgar/pkg/vsftpd/trunk/files/csw_usrgrp.preinstall	2009-04-12 13:19:37 UTC (rev 4283)
@@ -0,0 +1,79 @@
+################################################################################
+# Start csw_usrgrp.postinstall
+################################################################################
+
+# This was once based upon the preinstallation script from vsftpd
+
+set -e
+
+##################################################
+# create the given group if it doesn't exist
+##################################################
+create_group()
+{
+    NAME=$1
+
+    if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent group $NAME > /dev/null; then 
+        /usr/bin/echo "Group already exist: $NAME"
+    else 
+        /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/groupadd $NAME
+        /usr/bin/echo "Group created: $NAME"
+    fi
+}
+
+##################################################
+# create the given user if it doesn't exist
+# paramters are: userid gid home shell gecos
+##################################################
+create_user()
+{
+    NAME=$1
+    GROUP=$2
+    HOME=$3
+    SHELL=$4
+    COMMENT="$5"
+
+    if /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/getent passwd $NAME > /dev/null; then 
+        /usr/bin/echo "User already exists: $NAME"
+    else 
+        /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/sbin/useradd -g "$GROUP" -c "$COMMENT" -d $HOME -s $SHELL $NAME
+        /usr/sbin/chroot "$PKG_INSTALL_ROOT" /usr/bin/pwconv
+        /usr/bin/echo "User created: $NAME"
+    fi
+}
+
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-/}
+
+CSW_USRGRP_CONFIG="$PKGSAV/../install/csw_usrgrp_config"
+
+# Note to self: do not replace this with a "return" as additional scripts can be merged after this script
+if [ -r "$CSW_USRGRP_CONFIG" ]
+then
+    # Read the csw_usrgrp_config file and make sure that it has the correct version
+    set +e
+    version=`grep "^version=" "$CSW_USRGRP_CONFIG"`
+    set -e
+
+    if [ "$version" != "version=1" ]
+    then
+      echo "ERROR: invalid csw_usrgrp_config file. Expected version=1" 
+      exit 1
+    fi
+
+    OIFS="$IFS"; 
+    IFS=":"
+    sed -n "s/^group=//p" "$CSW_USRGRP_CONFIG" | while read NAME
+    do
+      create_group "$NAME"
+    done
+  
+    sed -n "s/^user=//p" "$CSW_USRGRP_CONFIG" | while read NAME GROUP HOME SHELL COMMENT
+    do
+      create_user "$NAME" "$GROUP" "$HOME" "$SHELL" "$COMMENT"
+    done
+    IFS="$OIFS"
+fi
+
+################################################################################
+# End csw_usrgrp.postinstall
+################################################################################

Deleted: csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch
===================================================================
--- csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch	2009-04-12 12:59:04 UTC (rev 4282)
+++ csw/mgar/pkg/vsftpd/trunk/files/tm_gmtoff.patch	2009-04-12 13:19:37 UTC (rev 4283)
@@ -1,23 +0,0 @@
-diff --speed-large-files --minimal -Nru vsftpd-2.0.4.orig/sysutil.c vsftpd-2.0.4/sysutil.c
---- vsftpd-2.0.4.orig/sysutil.c	2006-04-12 18:45:16.969532000 -0400
-+++ vsftpd-2.0.4/sysutil.c	2006-04-12 18:44:48.196361000 -0400
-@@ -2475,10 +2475,19 @@
- {
-   time_t the_time = 0;
-   struct tm* p_tm;
-+#if defined (__SVR4) && defined (__sun)
-+  struct tm* p_tm_utc;
-+#endif
-+
-   tzset();
-   the_time = time(NULL);
-   p_tm = localtime(&the_time);
-+#if defined (__SVR4) && defined (__sun)
-+  p_tm_utc = gmtime(&the_time);
-+  s_timezone = -(mktime(p_tm) - mktime(p_tm_utc));
-+#else
-   s_timezone = -p_tm->tm_gmtoff;
-+#endif
- }
- 
- const char*


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