buildaix and /usr/sbin/mkinstallp PDF Print E-mail
User Rating: / 1
Written by Michael Felt   

My buildaix package (available at and as a sourceforge project) uses the program /usr/sbin/mkinstallp for creatign the installp package. A change somewhere in the last years removed (probably a new test, not a modification of one) prohibits the inclusion of symbolic links when packaging from a non-root base directory.

Below is a simple patch/hack that will help out - from the project README!

PATCH that might be needed!

I have had issues with assigning symbolic links in the packages - default /usr/sbin/mkinstallp
no longer likes these and exits with an error. Use following patch to "fix it"

Note: before applying the patch you may want/need to remove /usr/sbin/mkinstallp from /etc/security/tsd/tsd.dat using
# trustchk -d /usr/sbin/mkinstallp

because the checksum will no longer be correct. I also needed to change the file mode before applying the patch
# chmod u+w /usr/sbin/mkinstallp

--- /usr/sbin/mkinstallp    2010-06-10 01:04:37.000000000 +0200
+++ ../mkinstallp   2012-09-24 12:34:17.000000000 +0200
@@ -2350,12 +2350,13 @@

        # Make sure we have a valid file
-       if [[ ! -e $ROOT_DIR/${FILE_LINE#[ ]*} ]]; then
+       # or symbolic link -- note -- this is a quick hack for existence of the link, not what it points at!
+       if [[ ! -e $ROOT_DIR/${FILE_LINE#[ ]*} && ! -L $ROOT_DIR/${FILE_LINE#[ ]*} ]]; then
          MESG=`/usr/bin/dspmsg -s 20 87 "0503-881 %s: Invalid filename (%s)\n \
  \tin %s\n" "$CMDNAME" "${FILE_LINE#[ ]*}" "$TEMPLATE_FILE"`
          print >&2 "$MESG"
          exit 1;
-       fi
+       fi
        # Write out the al file, stripping leading spaces if they appear. Note
        #  that the file paths are relative, so prepend a dot to the filename.
< Prev   Next >