Update to solaris package creation
Ben Lindstrom
mouring at etoh.eviladmin.org
Fri Mar 1 01:56:00 EST 2002
Can someone else from the Solaris realm that uses our package system
verify that this should be done? It looks right, but I want
another opinion before commiting.
- Ben
> On Wed, 27 Feb 2002, Antonio Navarro wrote:
>
>> Hi Ben,
>>
>> I have made some modifications to the buildpkg.sh script that is
>> distributed with openssh.
>>
>> I am sending it to you in case you find my modification useful.
>>
>> BTW, nice script!
>>
>> The modifications are:
>> - the rc?.d scripts are hard links not soft links
>> - removed one of the BASEDIR entries in the pkginfo
>> - modified the awk script that filters the prototype so that the system
>> directories are marked as shared (using ? for permissions, owner and group)
>>
>> that's more or less about it.
--- buildpkg.sh.orig Fri Oct 19 15:36:24 2001
+++ buildpkg.sh Thu Feb 28 08:50:09 2002
@@ -42,10 +42,10 @@
../opensshd.in > $FAKE_ROOT/etc/init.d/opensshd
chmod 711 $FAKE_ROOT/etc/init.d/opensshd
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rcS.d/K30opensshd
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rc0.d/K30opensshd
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rc1.d/K30opensshd
-ln -s ../init.d/opensshd $FAKE_ROOT/etc/rc2.d/S98opensshd
+ln $FAKE_ROOT/etc/init.d/opensshd $FAKE_ROOT/etc/rcS.d/K30opensshd
+ln $FAKE_ROOT/etc/init.d/opensshd $FAKE_ROOT/etc/rc0.d/K30opensshd
+ln $FAKE_ROOT/etc/init.d/opensshd $FAKE_ROOT/etc/rc1.d/K30opensshd
+ln $FAKE_ROOT/etc/init.d/opensshd $FAKE_ROOT/etc/rc2.d/S98opensshd
## Ok, this is outright wrong, but it will work. I'm tired of pkgmk
@@ -61,7 +61,6 @@
NAME=OpenSSH Portable for Solaris
DESC="Secure Shell remote access utility; replaces telnet and rlogin/rsh."
VENDOR="OpenSSH Portable Team - http://www.openssh.com/portable.html"
-BASEDIR=$FAKE_ROOT
ARCH=$ARCH
VERSION=$VERSION
CATEGORY=Security
@@ -72,9 +71,15 @@
echo "Building prototype file..."
find . | egrep -v "prototype|pkginfo" | sort | pkgproto $PROTO_ARGS | \
awk '
- BEGIN { print "i pkginfo" }
- { $5="root"; $6="sys"; }
- { print; }' > prototype
+ BEGIN { print "i pkginfo"; \
+ split("/opt /etc /etc/init.d /etc/rcS.d /etc/rd0.d /etc/rc1.d /etc/rc2.d",sys_files); }
+ {
+ for (dir in sys_files) { if ( $3 != sys_files[dir] )
+ { $5="root"; $6="sys"; }
+ else
+ { $4="?"; $5="?"; $6="?"; break;}
+ } }
+ { print; }' > prototype
## Step back a directory and now build the package.
echo "Building package.."
More information about the openssh-unix-dev
mailing list