Duane,
With your help I have made a pfil package, but I had to set the ARCH to
something because it complained about it being null. I chose ARCH=SunOS64
pkgmk is still complaining about the prototype file, but I noticed that the
directories it references are all system directories, and the attributes
probably should not be changed on them anyway.
I will attempt to install the newly compiled pfil/ipfilter package out this
evening and I'll let you know how it works!
Thanks again,
Greg
--------------------------------------------------------------------------
# make package CC=gcc
i=`uname -s`; case $i in HP-UX) make hpux;; *) make $i;; esac
make SunOS`optisa sparcv9 >/dev/null 2>&1; if [ $? -eq 0 ] ; then echo "64";
els
e echo "32"; fi`
(cd SunOS; make pfil "BITS=32" OS=solaris DO=pfil "ADEF=-I.. -I. -D_KERNEL
-DSUN
DDI -DSOLARIS2="`uname -r | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/'`"
-DPFILDEBUG")
`pfil' is up to date.
/bin/rm -f SunOS/*.o
(cd SunOS; make pfil`optisa sparcv9 >/dev/null 2>&1; if [ $? -eq 0 ] ; then
echo
"64"; else echo "32"; fi` "BITS=64" OS=solaris DO=pfil64 "ADEF=-I.. -I.
-D_KERN
EL -DSUNDDI -DSOLARIS2="`uname -r | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/'`"
-DPFIL
DEBUG -m64 -mcmodel=medlow -DDO=pfil`optisa sparcv9 >/dev/null 2>&1; if [ $?
-eq
0 ] ; then echo "64"; else echo "32"; fi`")
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../pfil.c -o pfil.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c qif.c -o qif.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c pfildrv.c -o pfildrv.o
pfildrv.c: In function `pfil_precheck':
pfildrv.c:589: warning: cast from pointer to integer of different size
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../pfilstream.c -o pfilstream.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c pkt.c -o pkt.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../misc.c -o misc.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../ndd.c -o ndd.o
ld -r pfil.o qif.o pfildrv.o pfilstream.o pkt.o misc.o ndd.o -o pfil64
touch SunOS/pfil32
(cd `uname -s`; make package-`uname -s`)
ld -r pfil.o qif.o pfildrv.o pfilstream.o pkt.o misc.o ndd.o -o pfil
/bin/rm -f copyright
ln -s ../copyright .
(x=`date '+%T %D'`; sed -e "[EMAIL PROTECTED]@$x@" pkginfo.dist>pkginfo)
cat prototype.dist > prototype
if [ -f pfil64 ] ; then \
echo 'd none kernel/strmod/sparcv9 ? root sys' >> prototype; \
echo 'l none kernel/strmod/sparcv9/pfil=../../drv/sparcv9/pfil' >>
proto
type; \
echo 'd none kernel/drv/sparcv9 ? root sys' >> prototype; \
echo 'f none kernel/drv/sparcv9/pfil=pfil64 ? root sys' >>
prototype; \
fi
pkgmk -o -d /tmp
## Building pkgmap from package prototype file.
WARNING: attributes set to ? ? ? for <etc>
WARNING: attributes set to ? ? ? for <etc/init.d>
WARNING: attributes set to ? ? ? for <etc/rcS.d>
WARNING: attributes set to ? ? ? for <etc/rc2.d>
WARNING: attributes set to ? ? ? for <etc/opt>
WARNING: attributes set to ? ? ? for <kernel>
WARNING: attributes set to ? ? ? for <kernel/drv>
WARNING: attributes set to ? ? ? for <kernel/strmod>
WARNING: attributes set to ? ? ? for <usr>
WARNING: attributes set to ? ? ? for <usr/include>
WARNING: attributes set to ? ? ? for <usr/include/net>
## Processing pkginfo file.
## Attempting to volumize 25 entries in pkgmap.
part 1 -- 564 blocks, 25 entries
## Packaging one part.
/tmp/pfil/pkgmap
/tmp/pfil/pkginfo
/tmp/pfil/install/copyright
/tmp/pfil/reloc/etc/init.d/pfil
/tmp/pfil/reloc/etc/opt/pfil/iu.ap
/tmp/pfil/reloc/kernel/drv/pfil
/tmp/pfil/reloc/kernel/drv/pfil.conf
/tmp/pfil/reloc/kernel/drv/sparcv9/pfil
/tmp/pfil/install/postinstall
/tmp/pfil/install/postremove
/tmp/pfil/install/preinstall
/tmp/pfil/reloc/usr/include/net/pfil.h
/tmp/pfil/reloc/usr/include/net/qif.h
## Validating control scripts.
## Packaging complete.
pkgtrans -s /tmp pfil.pkg pfil
Transferring <pfil> package instance
#
--------------------------------------------------------------------------
From: "Barb, Duane" <[EMAIL PROTECTED]>
To: "'Greg Brown'" <[EMAIL PROTECTED]>
Subject: RE: IP Filter 4.1.8 package compiles OK, but problem with pfil
2.1.6
Date: Fri, 17 Jun 2005 08:09:13 -0400
ARCH_updated_by_sed_when_package_is_bui
lt>
If you vi the pkginfo file you can get rid of this error as well, just chop
off everything after "ARCH", I know it says that sed updates it during the
pkg make but it doesn't. Glad I could help!
P.S. Totally unrelated but I think it is applicable to most on this list.
The June Patch cluster from Sun for SunOS 5.9 includes a patch # 118305-04
that made some security fixes to the kernel TCP driver, those changes also
break X11 forwarding in SSH. SSH can't open a socket for some reason with
the mods made to the driver. Sun claims that backing the patch out to
118305-03 fixes it, but I still had the same problem on my machines and had
to back both patches out.
Duane
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Greg Brown
Sent: Thursday, June 16, 2005 6:07 PM
To: [email protected]
Subject: RE: IP Filter 4.1.8 package compiles OK, but problem with pfil
2.1.6
Duane,
Thanks for responding. I did copy Makefile.gcc to Makefile, but what made
it work better was typing:
make package CC=gcc
That caused pfil to compile! (see below)
But the package build (pkgmk and pkginfo) after that failed.
Do you, or does anyone else, know what to do to push the process past this
point? I'm almost there...
Greg
# pwd
/usr/share/src/pfil
# ls
compat.h Makefile.gcc pfil.c README
copyright Makefile.orig pfil.h S25fw1boot.diff
HP-UX misc.c pfilstream.c sum.c
Makefile ndd.c qif.h SunOS
# make package CC=gcc
i=`uname -s`; case $i in HP-UX) make hpux;; *) make $i;; esac
make SunOS`optisa sparcv9 >/dev/null 2>&1; if [ $? -eq 0 ] ; then echo
"64";
els
e echo "32"; fi`
(cd SunOS; make pfil "BITS=32" OS=solaris DO=pfil "ADEF=-I.. -I. -D_KERNEL
-DSUN
DDI -DSOLARIS2="`uname -r | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/'`"
-DPFILDEBUG")
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c ../pfil.c -o
pfil.
o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c qif.c -o
qif.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c pfildrv.c -o
pfild
rv.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c
../pfilstream.c -o
pfilstream.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c pkt.c -o
pkt.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c ../misc.c -o
misc.
o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c ../ndd.c -o
ndd.o
ld -r pfil.o qif.o pfildrv.o pfilstream.o pkt.o misc.o ndd.o -o pfil32
/bin/rm -f SunOS/*.o
(cd SunOS; make pfil`optisa sparcv9 >/dev/null 2>&1; if [ $? -eq 0 ] ; then
echo
"64"; else echo "32"; fi` "BITS=64" OS=solaris DO=pfil64 "ADEF=-I.. -I.
-D_KERN
EL -DSUNDDI -DSOLARIS2="`uname -r | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/'`"
-DPFIL
DEBUG -m64 -mcmodel=medlow -DDO=pfil`optisa sparcv9 >/dev/null 2>&1; if [
$?
-eq
0 ] ; then echo "64"; else echo "32"; fi`")
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../pfil.c -o pfil.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c qif.c -o qif.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c pfildrv.c -o pfildrv.o
pfildrv.c: In function `pfil_precheck':
pfildrv.c:589: warning: cast from pointer to integer of different size
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../pfilstream.c -o pfilstream.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c pkt.c -o pkt.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../misc.c -o misc.o
gcc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -m64
-mcmodel=medlow
-DDO=pfil64 -c ../ndd.c -o ndd.o
ld -r pfil.o qif.o pfildrv.o pfilstream.o pkt.o misc.o ndd.o -o pfil64
touch SunOS/pfil32
(cd `uname -s`; make package-`uname -s`)
ld -r pfil.o qif.o pfildrv.o pfilstream.o pkt.o misc.o ndd.o -o pfil
/bin/rm -f copyright
ln -s ../copyright .
(x=`date '+%T %D'`; sed -e "[EMAIL PROTECTED]@$x@" pkginfo.dist>pkginfo)
cat prototype.dist > prototype
if [ -f pfil64 ] ; then \
echo 'd none kernel/strmod/sparcv9 ? root sys' >> prototype; \
echo 'l none kernel/strmod/sparcv9/pfil=../../drv/sparcv9/pfil' >>
proto
type; \
echo 'd none kernel/drv/sparcv9 ? root sys' >> prototype; \
echo 'f none kernel/drv/sparcv9/pfil=pfil64 ? root sys' >>
prototype; \
fi
pkgmk -o -d /tmp
## Building pkgmap from package prototype file.
WARNING: attributes set to ? ? ? for <etc>
WARNING: attributes set to ? ? ? for <etc/init.d>
WARNING: attributes set to ? ? ? for <etc/rcS.d>
WARNING: attributes set to ? ? ? for <etc/rc2.d>
WARNING: attributes set to ? ? ? for <etc/opt>
WARNING: attributes set to ? ? ? for <kernel>
WARNING: attributes set to ? ? ? for <kernel/drv>
WARNING: attributes set to ? ? ? for <kernel/strmod>
WARNING: attributes set to ? ? ? for <usr>
WARNING: attributes set to ? ? ? for <usr/include>
WARNING: attributes set to ? ? ? for <usr/include/net>
## Processing pkginfo file.
pkgmk: ERROR: length of parameter value
<ARCH_updated_by_sed_when_package_is_bui
lt> exceeds limit
## Packaging was not successful.
*** Error code 1
make: Fatal error: Command failed for target `package-SunOS'
Current working directory /usr/share/src/pfil/SunOS
*** Error code 1
make: Fatal error: Command failed for target `package'
#
>From: "Barb, Duane" <[EMAIL PROTECTED]>
>To: "'Greg Brown'" <[EMAIL PROTECTED]>
>Subject: RE: IP Filter 4.1.8 package compiles OK, but problem with pfil
>2.1.6
>Date: Thu, 16 Jun 2005 14:31:36 -0400
>
>If your using gcc as the compiler you have to mv Makefile.gcc to
Makefile.
>
>Cheers!
>
>-----Original Message-----
>From: [EMAIL PROTECTED]
>[mailto:[EMAIL PROTECTED] On Behalf Of Greg Brown
>Sent: Thursday, June 16, 2005 1:55 PM
>To: [email protected]
>Subject: IP Filter 4.1.8 package compiles OK, but problem with pfil 2.1.6
>
>Dear List,
>
>I am having a problem making the pfil package on Solaris 8. Here is my
>PATH
>
>and the debug output of the make command within the /usr/src/pfil
>directory.
>
>Would appreciate any help!
>
>Greg
>
># env
>AGENTWORKS_DIR=/opt/tng
>EDITOR=vi
>HOME=/
>HZ=100
>LC_COLLATE=en_US.ISO8859-1
>LC_CTYPE=en_US.ISO8859-1
>LC_MESSAGES=C
>LC_MONETARY=en_US.ISO8859-1
>LC_NUMERIC=en_US.ISO8859-1
>LC_TIME=en_US.ISO8859-1
>LOGNAME=root
>MAIL=/var/mail/root
>MANPATH=/usr/share/man:/opt/local/man:/usr/local/man:/usr/soe/man
>PATH=/usr/bin:/usr/sbin:/opt/local/bin:/usr/local/bin:/usr/soe/bin/SunOS_5.
8
>:/usr/soe/bin:/usr/soe/tng/bin:/opt/tng/services/bin:/opt/tng/services/tool
s
>:/opt/tng/agents/bin:/usr/ccs/bin:/usr/ucb
>SHELL=/sbin/sh
>SOE=/usr/soe
>TERM=vt100
>TMOUT=5400
>TZ=US/Pacific
>UMT_BIN=/usr/soe/tng/bin
>UMT_DIR=/usr/soe/tng
>#
>
>
># cd /usr/src/pfil
># ls
>compat.h Makefile.gcc pfil.h S25fw1boot.diff
>copyright misc.c pfilstream.c sum.c
>HP-UX ndd.c qif.h SunOS
>Makefile pfil.c README
># make package
>i=`uname -s`; case $i in HP-UX) make hpux;; *) make $i;; esac
>/bin/cp Makefile SunOS
>make SunOS`optisa sparcv9 >/dev/null 2>&1; if [ $? -eq 0 ] ; then echo
>"64";
>
>else echo "32"; fi`
>(cd SunOS; make pfil "BITS=32" OS=solaris DO=pfil "ADEF=-I.. -I.
-D_KERNEL
>-DSUNDDI -DSOLARIS2="`uname -r | sed -e 's/[0-9]*\.\([0-9]*\).*/\1/'`"
>-DPFILDEBUG")
>cc -I.. -I. -D_KERNEL -DSUNDDI -DSOLARIS2=8 -DPFILDEBUG -c ../pfil.c -o
>pfil.o
>/usr/ucb/cc: language optional software package not installed
>*** Error code 1
>make: Fatal error: Command failed for target `pfil.o'
>Current working directory /usr/share/src/pfil/SunOS
>*** Error code 1
>make: Fatal error: Command failed for target `SunOS64'
>Current working directory /usr/share/src/pfil
>*** Error code 1 (ignored)
>(cd `uname -s`; make package-`uname -s`)
>cc -c ../pfil.c -o pfil.o
>/usr/ucb/cc: language optional software package not installed
>*** Error code 1
>make: Fatal error: Command failed for target `pfil.o'
>Current working directory /usr/share/src/pfil/SunOS
>*** Error code 1
>make: Fatal error: Command failed for target `package'
>#
>