summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2002-03-17 14:05:24 -0800
committerTim Rice <tim@multitalents.net>2002-03-17 14:05:24 -0800
commit3a4234699e662e1e611b31829ea898029b66a6f4 (patch)
tree28970ddb14951a7f817ba00c47a412f64e99ad2a /contrib
parent88f2ab5efb73cdce241b15cf2bf7ae477f8dd3ed (diff)
[contrib/aix/buildbff.sh contrib/aix/inventory.sh] AIX package
build fixes. Patch by Darren Tucker <dtucker@zip.com.au> [contrib/solaris/buildpkg.sh] add missing dirs to SYSTEM_DIR. Have postinstall check for $piddir and add if necessary.
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/aix/buildbff.sh37
-rwxr-xr-xcontrib/aix/inventory.sh2
-rwxr-xr-xcontrib/solaris/buildpkg.sh5
3 files changed, 33 insertions, 11 deletions
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh
index 6c7aaf454..409588484 100755
--- a/contrib/aix/buildbff.sh
+++ b/contrib/aix/buildbff.sh
@@ -11,21 +11,14 @@
11 11
12umask 022 12umask 022
13PKGNAME=openssh 13PKGNAME=openssh
14PKGDIR=package
14 15
15PATH=$PATH:`pwd` # set path for external tools 16PATH=`pwd`:$PATH # set path for external tools
16export PATH 17export PATH
17 18
18## Extract common info requires for the 'info' part of the package. 19# Clean build directory
19VERSION=`tail -1 ../../version.h | sed -e 's/.*_\([0-9]\)/\1/g' | sed 's/\"$//'`
20BFFVERSION=`echo $VERSION | sed 's/p/./g'`
21
22echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
23PKGDIR=package
24
25# Clean build directory and package file
26rm -rf $PKGDIR 20rm -rf $PKGDIR
27mkdir $PKGDIR 21mkdir $PKGDIR
28rm -f $PKGNAME-$VERSION.bff
29 22
30if [ ! -f ../../Makefile ] 23if [ ! -f ../../Makefile ]
31then 24then
@@ -40,6 +33,29 @@ FAKE_ROOT=$START/$PKGDIR
40cd ../.. 33cd ../..
41make install-nokeys DESTDIR=$FAKE_ROOT 34make install-nokeys DESTDIR=$FAKE_ROOT
42 35
36if [ $? -gt 0 ]
37then
38 echo "Fake root install failed, stopping."
39 exit 1
40fi
41
42#
43# Extract common info requires for the 'info' part of the package.
44# AIX requires 4-part version numbers
45#
46VERSION=`./ssh -V 2>&1 | sed -e 's/,.*//' | cut -f 2 -d _`
47MAJOR=`echo $VERSION | cut -f 1 -d p | cut -f 1 -d .`
48MINOR=`echo $VERSION | cut -f 1 -d p | cut -f 2 -d .`
49PATCH=`echo $VERSION | cut -f 1 -d p | cut -f 3 -d .`
50PORTABLE=`echo $VERSION | cut -f 2 -d p`
51if [ "$PATCH" = "" ]
52then
53 PATCH=0
54fi
55BFFVERSION=`printf "%d.%d.%d.%d" $MAJOR $MINOR $PATCH $PORTABLE`
56
57echo "Building BFF for $PKGNAME $VERSION (package version $BFFVERSION)"
58
43# 59#
44# Fill in some details, like prefix and sysconfdir 60# Fill in some details, like prefix and sysconfdir
45# the eval also expands variables like sysconfdir=${prefix}/etc 61# the eval also expands variables like sysconfdir=${prefix}/etc
@@ -175,6 +191,7 @@ mv ../lpp_name .
175# file list on the fly and feed it to backup using -i 191# file list on the fly and feed it to backup using -i
176# 192#
177echo Creating $PKGNAME-$VERSION.bff with backup... 193echo Creating $PKGNAME-$VERSION.bff with backup...
194rm -f $PKGNAME-$VERSION.bff
178( 195(
179 echo "./lpp_name" 196 echo "./lpp_name"
180 find . ! -name lpp_name -a ! -name . -print 197 find . ! -name lpp_name -a ! -name . -print
diff --git a/contrib/aix/inventory.sh b/contrib/aix/inventory.sh
index aa44ab9d4..78df0d16e 100755
--- a/contrib/aix/inventory.sh
+++ b/contrib/aix/inventory.sh
@@ -52,7 +52,7 @@ find . ! -name . -print | perl -ne '{
52 } elsif ( -f $_ ) { 52 } elsif ( -f $_ ) {
53 # Entry is File 53 # Entry is File
54 print "\ttype=FILE\n"; 54 print "\ttype=FILE\n";
55 print "\tsize=VOLATILE\n"; 55 print "\tsize=$sz\n";
56 print "\tchecksum=VOLATILE\n"; 56 print "\tchecksum=VOLATILE\n";
57 } elsif ( -d $_ ) { 57 } elsif ( -d $_ ) {
58 # Entry is Directory 58 # Entry is Directory
diff --git a/contrib/solaris/buildpkg.sh b/contrib/solaris/buildpkg.sh
index 20f8544aa..1be6ed8d1 100755
--- a/contrib/solaris/buildpkg.sh
+++ b/contrib/solaris/buildpkg.sh
@@ -29,6 +29,7 @@ SYSTEM_DIR="/etc \
29/etc/rc0.d \ 29/etc/rc0.d \
30/etc/rc1.d \ 30/etc/rc1.d \
31/etc/rc2.d \ 31/etc/rc2.d \
32/etc/opt \
32/opt \ 33/opt \
33/opt/bin \ 34/opt/bin \
34/usr \ 35/usr \
@@ -49,6 +50,7 @@ SYSTEM_DIR="/etc \
49/usr/local/sbin \ 50/usr/local/sbin \
50/usr/local/share \ 51/usr/local/share \
51/var \ 52/var \
53/var/opt \
52/var/run \ 54/var/run \
53/var/tmp \ 55/var/tmp \
54/tmp" 56/tmp"
@@ -201,6 +203,9 @@ installf ${PKGNAME} $TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d
201 installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l 203 installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
202fi 204fi
203 205
206# If piddir doesn't exist we add it. (Ie. --with-pid-dir=/var/opt/ssh)
207[ -d $piddir ] || installf ${PKGNAME} $TEST_DIR$piddir d 755 root sys
208
204installf -f ${PKGNAME} 209installf -f ${PKGNAME}
205 210
206[ "\${POST_INS_START}" = "yes" ] && ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start 211[ "\${POST_INS_START}" = "yes" ] && ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start