Solaris pkgmk -> prototype errors...

I'm attempting to create another package (i.e. for utilizing pkgadd/pkgrm/pkgchk/etc.)

But after creating the prototype file, I noticed that some of my files begin with the '=' character. How do I get pkgmk to interpret the "/path/=file" as a single file, rather than interpreting it as "/path/"="file"? I would argue that having an '=' character within the filename is undesireable, but unfortunately I have no control over this.

Exactly how are you creating the prototype file? And how are you using it (within a script, command line)?

Possibly you need to \ the = so the shell does not interpert...but more info is required.

#
#
# --> DECLARATIONS
#
PKGDIR=` echo '/var/tmp/tas_bkup'`; export PKGDIR;
#
#
# --> PRELIMINARY STEPS
#
if [ ! -d $PKGDIR ];
then mkdir $PKGDIR;
fi;
#
#
# --> CREATE .../prototype
#
echo "1 i pkginfo" > $PKGDIR/prototype;
echo "1 i copyright" >> $PKGDIR/prototype;
echo "1 i checkinstall" >> $PKGDIR/prototype;
echo "1 i preinstall" >> $PKGDIR/prototype;
echo "1 i postinstall" >> $PKGDIR/prototype;
echo "1 i prototype" >> $PKGDIR/prototype;

find /etc/opt/totalnet /etc/totalnet /opt/totalnet /var/opt/totalnet | sort | uniq | pkgproto >> $PKGDIR/prototype;

echo "1 f none /etc/init.d/TAS 0555 totalnet totalnet" >> $PKGDIR/prototype;

echo "1 d none /usr/kernel/drv/sparc9 0755 root sys" >> $PKGDIR/prototype;

echo "1 d none /usr/kernel/strmod/sparc9 0755 root sys" >> $PKGDIR/prototype;

After commenting out all of the offending lines (i.e. lines with files containint the "=" character), I am then able to run pkgmk successfully.

I then uncommented the following offending line - which caused pkgmk to then fail ...
1 f none '/var/opt/totalnet/tndb/=flock.file' 0664 totalnet totalnet

I tried altering this to the following, but it failed...
1 f none '/var/opt/totalnet/tndb/\=flock.file' 0664 totalnet totalnet

I tried this also, and it failed as well...
1 f none '/var/opt/totalnet/tndb/==flock.file' 0664 totalnet totalnet

P.S. I realize that the "=flock.file" is not an important file, but I do have other files, files containing configuration info, which also have the "=" character in them...

Instead of
1 f none '/var/opt/totalnet/tndb/=flock.file' 0664 totalnet totalnet

try
1 f none '/var/opt/totalnet/tndb/flock.file' 0664 totalnet totalnet

(assuming from the examples on the man page this is what you are attempting {and that flock.file is in that path}:

f none /usr/wrap/bin/INSTALL 0755 root bin
f none /usr/wrap/bin/REMOVE 0755 root bin
f none /usr/wrap/bin/addpkg 0755 root bin

Check out the man page for prototype.

# pkgmk -o -r /
## Building pkgmap from package prototype file.
ERROR in prototype:
no object for <'/var/opt/totalnet/tndb/flock.file'> found in root directory
pkgmk: ERROR: unable to build pkgmap from prototype file
## Packaging was not successful.

Trouble is, the object should be '/var/opt/totalnet/tndb/=flock.file'> since the file is "=flock.file" and not "flock.file".

I may need to tar these to an appropriate filename, and then have the tar file untar'ed through the postinstall. This would be a compromise, but it may get me further than I've gotten so far - unless we have other ideas... <:)

The only thing I can think of is the \ to let the program know not to look at the next character as special. You would have to rename the file unless someone else has an idea on this one.