AIX, Linux and POWER Portal

AIX => Administration => Topic started by: eckertd on November 21, 2016, 04:38:51 PM

Title: mkisntallp templatefile
Post by: eckertd on November 21, 2016, 04:38:51 PM
Greetings.

Trying to get Net-SNMP built with a post-install script (AIX 6100-09-08-1642). I have the following in the templatefile

Post-installation Script: /gpl_dev/builds/AIX6/net-snmp-5.7.3.1/opt/freeware/tmp/post_i

But when I run 'mkinstallp' I get this

Using templatefile as the template file.
0503-878 mkinstallp: Unknown keyword (Post-installation Script)
                                                in templatefile

Not sure why it's doing this, as this is the keyword syntax according to /usr/lpp/bos/README.MKINSTALLP
Title: Re: mkisntallp templatefile
Post by: eckertd on November 22, 2016, 06:44:22 PM
I think I found it. After taking a look at the /usr/sbin/mkinstallp script itself, it appears that the pre/post install keywords must appear between USRLIBLPPFiles & EOUSRLIBLPPFiles keywords in the templatefile.

Title: Re: mkisntallp templatefile
Post by: Michael on November 23, 2016, 09:51:53 AM

A couple of things when using buildaix.

Title: Re: mkinstallp templatefile
Post by: Michael on November 23, 2016, 10:21:06 AM
Actually, I remember now why I did not get this packaged LONG ago.

Code: [Select]
root@x064:[/data/prj/sourceforge/net-snmp/net-snmp-5.7.3]buildaix
VRMF 5.7.3.0
do_configure: using existing Makefile
do_configure: run distclean to get a standard AIX configure

-rwxrwx--- 1 root    system   32166 Mar 19  2015 ./Makefile
-rwxrwx--- 1 michael felt     45044 Dec  8  2014 config.guess
-rwxrwx--- 1 root    system 2566769 Mar 19  2015 config.log
-rwxrwx--- 1 root    system   79796 Mar 19  2015 config.status
-rwxrwx--- 1 michael felt     35070 Dec  8  2014 config.sub

+  > .buildaix/make.out
+ make install DESTDIR=/var/aixtools/sourceforge/net-snmp/5.7.3.0 > .buildaix/install.out
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: relinking `libnetsnmpagent.la'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: relinking `libnetsnmpmibs.la'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: relinking `libnetsnmptrapd.la'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: relinking `libnetsnmpagent.la'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: relinking `libnetsnmpmibs.la'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: `libnetsnmpagent.la' has not been installed in `/opt/lib'
libtool: install: warning: `libnetsnmpmibs.la' has not been installed in `/opt/lib'
libtool: install: warning: `/data/prj/sourceforge/net-snmp/net-snmp-5.7.3/agent/libnetsnmpagent.la' has not been insta      lled in `/opt/lib'
libtool: install: warning: `/data/prj/sourceforge/net-snmp/net-snmp-5.7.3/snmplib/libnetsnmp.la' has not been installe      d in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: relinking `libnetsnmptrapd.la'
libtool: install: warning: remember to run `libtool --finish /opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../agent/libnetsnmpmibs.la' has not been installed in `/opt/lib'
libtool: install: warning: `/data/prj/sourceforge/net-snmp/net-snmp-5.7.3/agent/libnetsnmpagent.la' has not been insta      lled in `/opt/lib'
libtool: install: warning: `../agent/libnetsnmpagent.la' has not been installed in `/opt/lib'
libtool: install: warning: `/data/prj/sourceforge/net-snmp/net-snmp-5.7.3/snmplib/libnetsnmp.la' has not been installe      d in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `libnetsnmptrapd.la' has not been installed in `/opt/lib'
libtool: install: warning: `/data/prj/sourceforge/net-snmp/net-snmp-5.7.3/agent/libnetsnmpmibs.la' has not been instal      led in `/opt/lib'
libtool: install: warning: `../agent/libnetsnmpmibs.la' has not been installed in `/opt/lib'
libtool: install: warning: `/data/prj/sourceforge/net-snmp/net-snmp-5.7.3/agent/libnetsnmpagent.la' has not been insta      lled in `/opt/lib'
libtool: install: warning: `../agent/libnetsnmpagent.la' has not been installed in `/opt/lib'
libtool: install: warning: `/data/prj/sourceforge/net-snmp/net-snmp-5.7.3/snmplib/libnetsnmp.la' has not been installe      d in `/opt/lib'
libtool: install: warning: `../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
libtool: install: warning: `../../snmplib/libnetsnmp.la' has not been installed in `/opt/lib'
+ mkinstallp.ksh /var/aixtools/sourceforge/net-snmp/5.7.3.0 > .buildaix/mkinstallp.out
renamed:./usr/share/man/man3/NetSNMP::TrapReceiver.3:./usr/share/man/man3/NetSNMP_TrapReceiver.3
renamed:./usr/share/man/man3/NetSNMP::ASN.3:./usr/share/man/man3/NetSNMP_ASN.3
renamed:./usr/share/man/man3/NetSNMP::agent::default_store.3:./usr/share/man/man3/NetSNMP_agent_default_store.3
renamed:./usr/share/man/man3/NetSNMP::agent.3:./usr/share/man/man3/NetSNMP_agent.3
renamed:./usr/share/man/man3/NetSNMP::OID.3:./usr/share/man/man3/NetSNMP_OID.3
renamed:./usr/share/man/man3/NetSNMP::netsnmp_request_infoPtr.3:./usr/share/man/man3/NetSNMP_netsnmp_request_infoPtr.3
renamed:./usr/share/man/man3/NetSNMP::default_store.3:./usr/share/man/man3/NetSNMP_default_store.3
==============================
aixtools.sourceforge.net-snmp:aixtools.sourceforge.net-snmp.man.en_US:5.7.3.0::I:T:::::N:sourceforge net-snmp man page      s::::0::
aixtools.sourceforge.net-snmp:aixtools.sourceforge.net-snmp.rte:5.7.3.0::I:T:::::N:sourceforge net-snmp 23-Nov-2016:::      :0::
aixtools.sourceforge.net-snmp:aixtools.sourceforge.net-snmp.share:5.7.3.0::I:T:::::N:sourceforge net-snmp universal fi      les::::0::
==============================
root@x064:[/data/prj/sourceforge/net-snmp/net-snmp-5.7.3]

In short, some the file names include the colon character ':' and that messes up the template. Since then I have added some things to the template builder (mkinstallp.ksh) to rename those files. I am working on something 'better' to rename them (in a generic way) back after the install, but that will take some additional time.

I put my packaging at http://download.aixtools.net/test/aixtools.sourceforge.net-snmp.5.7.3.0.I - and I would be grateful for your feedback as I do not know net-snmp. Maybe, because of perl specifics (the Config.pm) the package will be AIX specific (5.8.2 is AIX 5.3, 5.8.8 is AIX 6.1, etc..)

Thanks for your interest!

Many thanks for your feedback