]> andersk Git - openssh.git/commitdiff
- (djm) AIX package builder update from dtucker@zip.com.au
authordjm <djm>
Mon, 10 Mar 2003 01:10:45 +0000 (01:10 +0000)
committerdjm <djm>
Mon, 10 Mar 2003 01:10:45 +0000 (01:10 +0000)
ChangeLog
contrib/aix/README
contrib/aix/buildbff.sh
contrib/aix/inventory.sh

index 13c4833bf3886b382402333abdc3dc7d5a6947ed..f0e4ee8e94d056467af674da9b138b65c4d7662e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
    CLOUSEAU
  - (djm) Bug #245: TTY problems on Solaris. Fix by stevesk@ and 
    dtucker@zip.com.au
+ - (djm) AIX package builder update from dtucker@zip.com.au
 
 20030225
  - (djm) Fix some compile errors spotted by dtucker and his fabulous 
index 033fd0a5d6ba0f2ebe3dbd04eda90a8021b0c79d..82fd8be1b12fdd62d6f0f1a01664217b947a64f3 100644 (file)
@@ -6,9 +6,15 @@ installable) openssh package.
 
 Directions:
 
+(optional) create config.local in your build dir
 ./configure [options]
-cd contrib/aix; ./buildbff.sh
+contrib/aix/buildbff.sh
 
+The file config.local or the environment is read to set the following options
+(default first):
+PERMIT_ROOT_LOGIN=[no|yes]
+X11_FORWARDING=[no|yes]
+AIX_SRC=[no|yes]
 
 Acknowledgements:
 
@@ -19,6 +25,8 @@ Jim Abbey's (GPL'ed) lppbuild-2.1 was used to learn how to build .bff's
 and for comparison with the output from this script, however no code
 from lppbuild is included and it is not required for operation.
 
+SRC support based on examples provided by Sandor Sklar and Maarten Kreuger.
+
 
 Other notes:
 
@@ -26,8 +34,7 @@ The script treats all packages as USR packages (not ROOT+USR when
 appropriate).  It seems to work, though......
 
 If there are any patches to this that have not yet been integrated they
-may be found at http://www.zip.com.au/~dtucker/openssh/ or
-http://home.usf.advantra.com.au/~dtucker/openssh/.
+may be found at http://www.zip.com.au/~dtucker/openssh/.
 
 
 Disclaimer:
index 5c09c6b758697613a31c200a6e0f3f01aa2b4475..3b369966012b163e00e948ad6fee97ab0a13a9fc 100755 (executable)
 
 #
 # Tunable configuration settings
-#      create a "config.local" in your build directory to override these.
+#      create a "config.local" in your build directory or set
+#      environment variables to override these.
 #
-PERMIT_ROOT_LOGIN=no
-X11_FORWARDING=no
+[ -z "$PERMIT_ROOT_LOGIN" ] || PERMIT_ROOT_LOGIN=no
+[ -z "$X11_FORWARDING" ] || X11_FORWARDING=no
+[ -z "$AIX_SRC" ] || AIX_SRC=no
 
 umask 022
 
@@ -166,6 +168,18 @@ This software is distributed under a BSD-style license.
 For the full text of the license, see /usr/lpp/openssh/LICENCE
 EOD
 
+#
+# openssh.size file allows filesystem expansion as required
+# generate list of directories containing files
+# then calculate disk usage for each directory and store in openssh.size
+#
+files=`find . -type f -print`
+dirs=`for file in $files; do dirname $file; done | sort -u`
+for dir in $dirs
+do
+       du $dir
+done > ../openssh.size
+
 #
 # Create postinstall script
 #
@@ -245,14 +259,42 @@ else
 fi
 echo
 
-# Add to system startup if required
-if grep $sbindir/sshd /etc/rc.tcpip >/dev/null
+# Set startup command depending on SRC support
+if [ "$AIX_SRC" = "yes" ]
+then
+       echo Creating SRC sshd subsystem.
+       rmssys -s sshd 2>&1 >/dev/null
+       mkssys -s sshd -p "$sbindir/sshd" -a '-D' -u 0 -S -n 15 -f 9 -R -G tcpip
+       startupcmd="start $sbindir/sshd \\\"\\\$src_running\\\""
+       oldstartcmd="$sbindir/sshd"
+else
+       startupcmd="$sbindir/sshd"
+       oldstartcmd="start $sbindir/sshd \\\"$src_running\\\""
+fi
+
+# If migrating to or from SRC, change previous startup command
+# otherwise add to rc.tcpip
+if egrep "^\$oldstartcmd" /etc/rc.tcpip >/dev/null
 then
-        echo "sshd found in rc.tcpip, not adding."
+       if sed "s|^\$oldstartcmd|\$startupcmd|g" /etc/rc.tcpip >/etc/rc.tcpip.new
+       then
+               chmod 0755 /etc/rc.tcpip.new
+               mv /etc/rc.tcpip /etc/rc.tcpip.old && \
+               mv /etc/rc.tcpip.new /etc/rc.tcpip
+       else
+               echo "Updating /etc/rc.tcpip failed, please check."
+       fi
 else
-        echo >>/etc/rc.tcpip
-        echo "echo Starting sshd" >>/etc/rc.tcpip
-        echo "$sbindir/sshd" >>/etc/rc.tcpip
+       # Add to system startup if required
+       if grep "^\$startupcmd" /etc/rc.tcpip >/dev/null
+       then
+               echo "sshd found in rc.tcpip, not adding."
+       else
+               echo "Adding sshd to rc.tcpip"
+               echo >>/etc/rc.tcpip
+               echo "# Start sshd" >>/etc/rc.tcpip
+               echo "\$startupcmd" >>/etc/rc.tcpip
+       fi
 fi
 EOF
 
@@ -262,7 +304,7 @@ EOF
 echo Creating liblpp.a
 (
        cd ..
-       for i in openssh.al openssh.copyright openssh.inventory openssh.post_i LICENCE README*
+       for i in openssh.al openssh.copyright openssh.inventory openssh.post_i openssh.size LICENCE README*
        do
                ar -r liblpp.a $i
                rm $i
index 78df0d16e7a7ddb09ac9c59c156a2d580a4bda25..619493ae2af47de0183b7348d8ba47a14859811d 100755 (executable)
@@ -2,9 +2,9 @@
 #
 # inventory.sh
 #
-# Originall written by Ben Lindstrom, modified by Darren Tucker to use perl
+# Originally written by Ben Lindstrom, modified by Darren Tucker to use perl
 #
-# This will produced and AIX package inventory file, which looks like:
+# This will produce an AIX package inventory file, which looks like:
 #
 # /usr/local/bin:
 #          class=apply,inventory,openssh
This page took 1.001364 seconds and 5 git commands to generate.