[csw-devel] SF.net SVN: gar:[4063] csw/mgar/pkg/openssh/trunk

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sun Mar 29 20:02:20 CEST 2009


Revision: 4063
          http://gar.svn.sourceforge.net/gar/?rev=4063&view=rev
Author:   chninkel
Date:     2009-03-29 18:02:20 +0000 (Sun, 29 Mar 2009)

Log Message:
-----------
openssh: switched to cswpreserveconf class for configuration files handling

Modified Paths:
--------------
    csw/mgar/pkg/openssh/trunk/Makefile
    csw/mgar/pkg/openssh/trunk/files/CSWossh.prototype
    csw/mgar/pkg/openssh/trunk/files/CSWosshclient.prototype
    csw/mgar/pkg/openssh/trunk/files/CSWosshlpk.prototype

Removed Paths:
-------------
    csw/mgar/pkg/openssh/trunk/files/i.conf
    csw/mgar/pkg/openssh/trunk/files/r.conf

Modified: csw/mgar/pkg/openssh/trunk/Makefile
===================================================================
--- csw/mgar/pkg/openssh/trunk/Makefile	2009-03-29 17:59:20 UTC (rev 4062)
+++ csw/mgar/pkg/openssh/trunk/Makefile	2009-03-29 18:02:20 UTC (rev 4063)
@@ -78,9 +78,10 @@
 DOCFILES += README.platform README.privsep README.smartcard README.tun TODO WARNING.RNG    
 DOCDIRS = openssh openssh_client
 
-SPKG_CLASSES = none conf
+# we're using conf handling class from the cswclassutils package
+REQUIRED_PKGS += CSWcswclassutils
+SPKG_CLASSES = none cswpreserveconf
 
-
 # little hack to be able to still use old smf support with gar v2
 # until openssh is migrated to cswclassutils init system
 DISTFILES += openssh_dyngspec.fakespec
@@ -105,9 +106,8 @@
 ifdef LPK
 	PACKAGES = CSWosshlpk
 	CATALOGNAME_CSWosshlpk = openssh_lpk
-	SPKG_DESC_CSWosshlpk = OpenSSH Secure Shell server with ldap public key support
+	SPKG_DESC_CSWosshlpk = $(SPKG_DESC_CSWossh) with ldap public key support
 	REQUIRED_PKGS_CSWosshlpk = $(REQUIRED_PKGS_CSWossh) CSWoldaprt
-	DESCRIPTION = OpenSSH Secure Shell with Ldap Public Key support
 	MASTER_SITES += http://openssh-lpk.googlecode.com/svn/trunk/patch/contrib/
 	PATCHFILES += contrib-openssh-lpk-5.2p1-0.3.9.patch
 	CONFIGURE_ARGS += --with-ldap
@@ -125,10 +125,9 @@
 	@$(MAKECOOKIE)
 
 # adding documentation files
-post-merge: customize_ssh_config
-	ginstall $(WORKDIR_FIRSTMOD)/*.conf $(WORKROOTDIR)/build-global/
-	ginstall -D $(DOWNLOADDIR)/sshd_config $(PKGROOT)/$(sysconfdir)/ssh/sshd_config.CSW
-	
+post-merge: merge-config-files merge-doc-files
+
+merge-doc-files:
 	for DOCDIR in $(DOCDIRS); do \
 		ginstall -d $(PKGROOT)/$(docdir)/$(DOCDIR); \
 		(cd $(WORKSRC_FIRSTMOD) && ginstall $(DOCFILES) $(PKGROOT)/$(docdir)/$(DOCDIR)/); \
@@ -136,10 +135,14 @@
 	done
 	@$(MAKECOOKIE)
 
-customize_ssh_config:
+merge-config-files:
+	ginstall $(PKGROOT)/$(sysconfdir)/ssh/ssh_config $(PKGROOT)/$(sysconfdir)/ssh/ssh_config.CSW 
+	ginstall $(PKGROOT)/$(sysconfdir)/ssh/moduli $(PKGROOT)/$(sysconfdir)/ssh/moduli.CSW 
 	# Correction des chemins
-	gsed -i -e 's,/etc/ssh/,/opt/csw/etc/ssh/,g' -e 's,/usr/libexec/,/opt/csw/libexec/,g' "$(PKGROOT)/$(sysconfdir)/ssh/sshd_config"
-	gsed -i -e 's,^ *# *UsePAM *.*,UsePAM yes,g' -e 's,^ *# *X11Forwarding *.*,X11Forwarding yes,g' "$(PKGROOT)/$(sysconfdir)/ssh/sshd_config"
+	sed -e 's,/etc/ssh/,/opt/csw/etc/ssh/,g' \
+		-e 's,/usr/libexec/,/opt/csw/libexec/,g' \
+		-e 's,^ *# *UsePAM *.*,UsePAM yes,g' \ 
+		-e 's,^ *# *X11Forwarding *.*,X11Forwarding yes,g' "$(PKGROOT)/$(sysconfdir)/ssh/sshd_config" > "$(PKGROOT)/$(sysconfdir)/ssh/sshd_config.CSW
 	@$(MAKECOOKIE)
 
 

Modified: csw/mgar/pkg/openssh/trunk/files/CSWossh.prototype
===================================================================
--- csw/mgar/pkg/openssh/trunk/files/CSWossh.prototype	2009-03-29 17:59:20 UTC (rev 4062)
+++ csw/mgar/pkg/openssh/trunk/files/CSWossh.prototype	2009-03-29 18:02:20 UTC (rev 4063)
@@ -1,7 +1,5 @@
-i i.conf=i.conf
-i r.conf=r.conf
 f none /opt/csw/etc/ssh/sshd_config.CSW 0744 root bin
-e conf /opt/csw/etc/ssh/moduli 0644 root bin
+f cswpreserveconf /opt/csw/etc/ssh/moduli.CSW 0644 root bin
 d none /opt/csw/libexec 0755 root bin
 f none /opt/csw/libexec/sftp-server 0755 root bin
 f none /opt/csw/sbin/sshd 0755 root bin

Modified: csw/mgar/pkg/openssh/trunk/files/CSWosshclient.prototype
===================================================================
--- csw/mgar/pkg/openssh/trunk/files/CSWosshclient.prototype	2009-03-29 17:59:20 UTC (rev 4062)
+++ csw/mgar/pkg/openssh/trunk/files/CSWosshclient.prototype	2009-03-29 18:02:20 UTC (rev 4063)
@@ -1,5 +1,3 @@
-i i.conf=i.conf
-i r.conf=r.conf
 f none /opt/csw/bin/scp 0755 root bin
 f none /opt/csw/bin/sftp 0755 root bin
 s none /opt/csw/bin/slogin=./ssh
@@ -8,7 +6,7 @@
 f none /opt/csw/bin/ssh-agent 0755 root bin
 f none /opt/csw/bin/ssh-keygen 0755 root bin
 f none /opt/csw/bin/ssh-keyscan 0755 root bin
-e conf /opt/csw/etc/ssh/ssh_config 0644 root bin
+f cswpreserveconf /opt/csw/etc/ssh/ssh_config.CSW 0644 root bin
 d none /opt/csw/libexec 0755 root bin
 f none /opt/csw/libexec/ssh-keysign 4711 root bin
 d none /opt/csw/share/doc/openssh_client 0755 root bin

Modified: csw/mgar/pkg/openssh/trunk/files/CSWosshlpk.prototype
===================================================================
--- csw/mgar/pkg/openssh/trunk/files/CSWosshlpk.prototype	2009-03-29 17:59:20 UTC (rev 4062)
+++ csw/mgar/pkg/openssh/trunk/files/CSWosshlpk.prototype	2009-03-29 18:02:20 UTC (rev 4063)
@@ -1,7 +1,5 @@
-i i.conf=i.conf
-i r.conf=r.conf
 f none /opt/csw/etc/ssh/sshd_config.CSW 0744 root bin
-e conf /opt/csw/etc/ssh/moduli 0644 root bin
+f cswpreserveconf /opt/csw/etc/ssh/moduli.CSW 0644 root bin
 d none /opt/csw/libexec 0755 root bin
 f none /opt/csw/libexec/sftp-server 0755 root bin
 f none /opt/csw/sbin/sshd 0755 root bin

Deleted: csw/mgar/pkg/openssh/trunk/files/i.conf
===================================================================
--- csw/mgar/pkg/openssh/trunk/files/i.conf	2009-03-29 17:59:20 UTC (rev 4062)
+++ csw/mgar/pkg/openssh/trunk/files/i.conf	2009-03-29 18:02:20 UTC (rev 4063)
@@ -1,50 +0,0 @@
-#
-# Copyright 2006 Yann Rouillard <yann at blastwave.org>
-# All rights reserved.  Use is subject to license terms.
-#
-# Redistribution and/or use, with or without modification, is
-# permitted.  This code is without warranty of any kind.  The
-# author(s) shall not be liable in the event that use of the
-# software causes damage.
-#
-# i.conf - class script which install configuration files
-#
-# If the configuration file already exists on the filesystem,
-# this script will let the existing file intact and will 
-# install a copy of the file provided in the package suffixed 
-# with .CSW
-# except for service configuration files which are always installed
-# CSW suffixed under Solaris 9 as they are used to enable/disable 
-# a service according to blastwave standards.
-#
-umask 0022
-
-while read SRC DEST; do
-	if [ -f "$DEST" ]; then
-		cp "$SRC" "$DEST.CSW"
-	else
-		cp "$SRC" "$DEST"
-	fi
-done
-
-# Unfortunately pkgadd doesn't backup the source file if the destination file is identical.
-# It's a problem with zones installation where pkgadd try to find the backup files, so
-# we do the backup manually
-awk '{ if ( $3 == "conf" ) print $2,$3,$4,$5,$6,$7  }' $INST_DATADIR/$PKG/pkgmap | \
-    while read FTYPE CLASS FPATH MODE OWNER GROUP; do
-        if echo $FPATH | grep "^/" >/dev/null; then
-            INST_PATH="$INST_DATADIR/$PKG/root/$FPATH"
-            SAVE_PATH="$PKGSAV/pspool/$PKG/root/$FPATH"
-        else
-            INST_PATH="$INST_DATADIR/$PKG/reloc/$FPATH"
-            SAVE_PATH="$PKGSAV/pspool/$PKG/reloc/$FPATH"
-        fi
-
-        if [ ! -f "$SAVE_PATH" ]; then
-            mkdir -p "`LANG=C dirname $SAVE_PATH`"
-            cp "$INST_PATH" "$SAVE_PATH"
-        fi
-     done
-
-exit 0
-

Deleted: csw/mgar/pkg/openssh/trunk/files/r.conf
===================================================================
--- csw/mgar/pkg/openssh/trunk/files/r.conf	2009-03-29 17:59:20 UTC (rev 4062)
+++ csw/mgar/pkg/openssh/trunk/files/r.conf	2009-03-29 18:02:20 UTC (rev 4063)
@@ -1,21 +0,0 @@
-#
-# Copyright 2006 Yann Rouillard <yann at blastwave.org>
-# All rights reserved.  Use is subject to license terms.
-#
-# Redistribution and/or use, with or without modification, is
-# permitted.  This code is without warranty of any kind.  The
-# author(s) shall not be liable in the event that use of the
-# software causes damage.
-#
-# r.conf - class script which removes configuration files
-#
-# This script doesn't delete config file, only backup ones 
-# installed by the package.
-# 
-
-while read DEST; do
-    if [ -f "$DEST.CSW" ]; then
-        rm "$DEST.CSW"
-    fi
-done
-


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