buildaix

From AIXTOOLS
Revision as of 08:17, 1 February 2022 by Michael Felt (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Packages|Tools|aixtools.buildaix.2.1.2.1.I
Report Issues (via Forums) and/or TWEET:@aixtools

MD5 Checksum

D77A33E05FB809867BA1ED73177AD2FF aixtools.buildaix.2.1.2.1.I

Package Details

Version: 2.1.2.3
Released: 2020-07-13
Source: - https://github.com/aixtools/buildaix
Depends on: AIX fileset bos.adt.insttools and /usr/bin/ksh

Future Developments

  • New packages (as of 2022-Feb-01) the default prefix is ${PROGRAM-buildaix}. In my environment I export PROGRAM=aixtools.
  • I'll be doing more mixed packaging - in any case, both 32 and 64-bit library support (what macOS calls fat libraries).
  • With the new packaging location - programs will link from /opt/bin to, e.g., /opt/aixtools/bin
  • eventually I plan to have both 32-bit and 64-bit applications in /opt/aixtools/(s)bin with ONE symbolic link to either the 32-bit or the 64-bit application in /opt/bin.

Contents

News

--Michael Felt (talk) 09:11, 1 February 2022 (CET) There are newer versions available (yesterday I packaged as version 2.1.5.0), but I get few requests about this package. As stated below, I am trying to do development using github. Here I'll talk about some ideas I have for improving buildaix and on the github page I'll open some enhancement issues as I prepare for them.

At present - this wiki page reads more like a ChangeLog - than anything else.

--Michael Felt (talk) 11:42, 13 July 2020 (CEST) Made my first fix using github management (using PR process). Key changes are: fixing Upsize: line in template; and modified the mkX32, mkX64, and mkXany files.

--Michael Felt (talk) 09:36, 19 December 2019 (CET) Not done a lot of things with buildaix since 2018, but time to post them. Details are in the github site. Should you find an issue - post on github but also post a reminder on the forums support page (to have enverything 'bundled') AIXTOOLS Support

--Michael Felt (talk) 12:52, 12 April 2018 (CEST) reverted the change to the default for "prefix", as there is more work to be done to get it "right" rather than half-$$$ed. :smile: Had already changed to version 2.1.0 (aka 2.0.22), so just continuing the version change. No special reason - was about time - as there are many feature differences compared with 2.0.0.

--Michael Felt (talk) 11:14, 14 February 2018 (CET) Updated to version I am using

--Michael Felt (talk) 10:27, 25 January 2018 (CET) Late adding it here, just some minor text feedback changes.

--Michael Felt (talk) 12:41, 5 December 2017 (CET) Made a bit less verbose and got better handling of the -P and -F options.

--Michael Felt (talk) 20:15, 5 October 2017 (CEST) Some bug corrections, some (hidden, i.e., undocumented) additional processing. Look at scripts for comments.

--Michael Felt (talk) 12:16, 26 September 2017 (CEST) small bug corrections

--Michael Felt (talk) 15:01, 15 June 2017 (UTC) bug fix, and recognize a 'X.YbZ" as VRMF X.Y.0.Z

--Michael Felt (talk) 22:13, 8 February 2017 (UTC) cleaned up some logic bugs - improving the -D -P -F and -V arguments

--Michael Felt (talk) 06:23, 28 September 2016 (UTC)

I have been using this version for nearly a month - so time to get it out!

For the curious I moved the the links to the OLD versions to the bottom of the page

And the changes - since I last posted the CHANGELOG contents

$Id: CHANGELOG 213 2016-08-24 21:06:16Z michael $
buildaix 2.0.11.0: 2016-08-24
 * removed remaining comments for the aborted 64-bit packaging - finishing the purge of version 2.0.8.0
 * add a call to ./buildaix/bin/prep_install.ksh, if exists, for project processing
 ** before mkinstallp packaging begins
 * add -qarch=pwr4 and -qmaxmem=-1 to CFLAGS (assumes xlc as compiler!) - bug with gcc
 * fixed bug with -p OPTARG processing
 * changed -e to not depend on ${prefix}, i.e., not always be a subdir of ${prefix}
 * Modify Fileset Description: to always include ${PRODUCT} ${FILESET}
 * make sure opt/lib/charset.alias has a unique name, TBD .post_i processing to set symbolic link

buildaix 2.0.10.1: 2016-06-06
 * make sure .I files are world-readable regadless of umask setting
 * restore a lost addition - namely to add a requisites line such as:
   ">0 { *prereq idsldap.clt32bit62.rte 6.2.0.0 *prereq idsldap.clt32bit63.rte 6.3.0.0 }"
   i.e., to add a group requisite specification of needing one or more of a group, e.g., >0 is at least 1 of { ..
. }

buildaix 2.0.10.0: 2016-05-24
 * corrected a typo in buildaix.ksh - so TARGETDIR is provided everywhere in option -D output
 * improved interaction between buildaix and mkinstallp when using buildaix -D

buildaix 2.0.9.0: 2016-04-11
 * corrected a bug where the TARGETDIR was not getting updated soon enough (-V argument processing)

--Michael Felt (talk) 11:51, 25 May 2016 (UTC) Version 2.0.10.0: Much improved option -D for packaging a directory

--Michael Felt (talk) 09:20, 11 April 2016 (UTC)

Version 2.0.9.0 - small bug corrected (-V processing)

Version 2.0.8.0 - removed Linux like attempt at lib64 processing when OBJECT_MODE=64. Shall manually combine packages with multi-proc bit-mode support is needed/expected.

--Michael Felt (talk) 22:51, 6 March 2016 (UTC) Released version 2.0.7 - See the ChangeLog for the important changes.

I shall work on a HOWTO to describe how I use buildaix - from download of a project, through debugging, to installing what has been built. Now I am getting feedback telling me it is not as straight forward as I had hoped. Real Soon!

--Michael Felt (talk) 20:13, 7 October 2015 (UTC)

$Id: CHANGELOG 193 2016-03-04 11:28:43Z michael $
buildaix 2.0.8.0: starting 2016-03-04
 * remove 64-bit 'mangling' of the filesets packaging - want autotools to modify dirnames, not buildaix scripts

buildaix 2.0.7.0: starting 2016-03-02
 * add ' ' (space) as character to catch (buildaix:filename_cleanup())
 * use ':' to seperate old:new name fo file (for later function to move files to original name)
 * TODO : put moved in lpp:root component as a file
 * remove ${AIXVER} from .I filename - might be needed in special cases! but off for now

buildaix 2.0.6.0: starting 2016-02-04
 * default uid:gid is bin:bin rather than root:system
 * finish initial proposal for argument -D|c prepare a proposal for packaging a directory

buildaix 2.0.5.0: 2016-01-19
 * look in ../src/${dirname} to make use of autotools ability to seperate source and build directories
 * make the .rte comment more human readable - was cryptic builddate numbers
 * change universale pages to universal files for .share description

buildaix 2.0.4.0: 2015-11-06
 * correct type where the requisites file got wiped with application specifics (mkinstallp.ksh)
 * initial support for discovery of and modifications for 64-bit support (not finished yet)
 ** aixinfo and buildaix.ksh
 * added bzlib.h (for libbz2 v1.05 default AIX supported version)

buildaix 2.0.3.1: 2015-10-07
 * remove the files in /tmp I had been leaving around for debug info
 * corrected error in cleanup function, reduced debug messages
 * make sure requisites file is truncated

--Michael Felt (talk) 14:15, 7 August 2015 (UTC)

  • new version of buildaix (v2.0.3)
    • the templates are activated via option -T rather than -i
    • bug corrections

--Michael Felt (talk) 12:55, 5 April 2015 (UTC)

  • Added link to new version of buildaix. To use the templates run buildaix -i. This will create two subdirectories: buildaix and buildaix/root and put copies of script templates in them. Add commands that you want executed in one of the different phases: pre_i (in user) and config (in root) are probably where you will want to spend your most effort - initially. The unconfig and unpre_i - for want you want to undo during failed install and/or removal of the software.
  • "Support" as much as I can give and/or feature requests via http://forums.rootvg.net/aixtools

--Michael Felt (talk) 16:22, 1 April 2015 (UTC)

  • Added details about a new! version 2.0 with automated script processing - see new Details section below

--Michael Felt (talk) 10:55, 12 March 2015 (UTC)

  • Currently working on a new release (V1.1). The distinguishing improvement over version 1.0 is:
    • better use of the LPP naming scheme: (LPP is IBM speak for Licensed Program Product) The new default naming scheme is buildaix.project-family.project. So, rather than be buildaix.openssh the LPP name would be buildaix.openbsd.openssh - because openssh is maintained by openbsd. Likewise, buildaix.gettext will become buildaix.gnu.gettext.
  • This will make it easy (was always possible, just messy) to have more than one project in a single LPP. Perhaps I will go a new version higher (to 1.2) when I have automated combining filesets belonging to a common project-(family|source). For example, GNU is a project-family while sourceforge is a product-source.

--Michael Felt (talk) 14:46, 29 October 2013 (CET) * download.aixtools.net/tools/aixtools.buildaix

  • For comments, feedback etc please post on rootvg.net forums[1].

--Michael Felt (talk) 22:57, 4 December 2013 (CET)

  • Updated to version 1.0.7. Now includes some .h files that are often needed by opensource -

and prevents needing to load certain RPM packages because rpm.rte (which contains a symbolic link in /usr/lib/libz.a to a libz.a in /opt/freeware/lib but does not include a link for /usr/include/zlib.h or /usr/lib/zconf.h (buildaix puts the files in /opt/include and add -I/opt/include to CFLAGS)

ABOUT

BUILDAIX simplifies the use of the AIX utility mkinstallp.

The initial goals are:

  • simplify (read automate) mkinstall template generation
  • include missing include files that autoconf is expecting -- because the libraries are already available on AIX, just not the include files that are used to test linking.
  • position the software in a location better suited for WPAR support --prefix=/opt and --localestate=/var and put man pages in /usr/share/man rather than somewhere non-standard

For most projects the instructions will be:

  1. install base AIX
  2. install bos.adt.libm, bos.adt.syscalls, bos.adt.insttools
  3. install compiler (IBM VAC/xlc or GCC) - mixing compilers creates its own issues
  4. install aixtools.buildaix.rte currently at [2]
    1. maybe also install more tools: e.g. aixtools.wget.rte, aixtools.xz.rte, aixtools.bash.rte, aixtools.autoconf.rte, and/or aixtools.automake.rte.
    2. Recommended: aixtools.coreutils.rte and/or GNU make aixtools.make.rte - as the AIX install and make do not always work as expected with GNU-model based open-source projects (i.e., use install from coreutils) and some projects require specific features in gmake.
  5. modify PATH to include compiler and /opt/bin - /opt/bin is the default PATH directory for tools, scripts, applications.
  6. download or wget an application source
  7. uncompress using gzip, bzip2, or xz (add argument -dc to decompress in place) | tar xf -
  8. cd unpacked-sources
  9. # buildaix
  10. # installp -d . -L
  • And now you can use installp -d . all (or something more selective) to install the compiled software rather than "make install".

DETAILS - Normal Behavior

Installation

Version 2.0 includes automated support for pre, post and config steps when installing, or uninstalling software.

For install (only when there is a previous version already present will the pre_rm scripts run) the order looks something like this

# installp -d . -F aixtools.something.rte

+-----------------------------------------------------------------------------+
                         Installing Software...
+-----------------------------------------------------------------------------+

installp:  APPLYING software for:
        aixtools.test.rte 1.0.0.0

+----- ------------------------------------------------------------------------+
aixtools.test.rte.pre_i /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.post_i /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
aixtools.test.rte.config /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
aixtools.test.rte.pre_i /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.post_i /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
aixtools.test.rte.config /usr/lpp/aixtools.test/inst_root
Finished processing all filesets.  (Total time:  1 secs).


So, take note - the USR scripts are run first and ROOT scripts are run last. This implies that the 'normal' non-root pre_i (pre_install) is the first script run for a new install and the root-part config script runs as very last.

Uninstall

Normal uninstall starts with the ROOT scripts, root files are removed, and then the USR scripts.

+-----------------------------------------------------------------------------+
                           Deinstalling Software...
+-----------------------------------------------------------------------------+

installp:  DEINSTALLING software for:
        aixtools.test.rte 1.0.0.0

+----- ------------------------------------------------------------------------+
./aixtools.test.rte.unconfig /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.unpost_i /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.unpre_i /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.unconfig /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.unpost_i /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.unpre_i /usr/lpp/aixtools.test
Finished processing all filesets.  (Total time:  2 secs).

Update

Update behavior occurs during an install when the same fileset already exists on the system. The key difference with an install is that "pre_rm" scripts are run before the "old" version files are removed.

nstallp:  APPLYING software for:
        aixtools.test.rte 1.0.0.0

+----- ------------------------------------------------------------------------+
./aixtools.test.rte.pre_rm /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.pre_rm /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
aixtools.test.rte.pre_i /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.post_i /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
aixtools.test.rte.config /usr/lpp/aixtools.test
+----- ------------------------------------------------------------------------+
aixtools.test.rte.pre_i /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
./aixtools.test.rte.post_i /usr/lpp/aixtools.test/inst_root
+----- ------------------------------------------------------------------------+
aixtools.test.rte.config /usr/lpp/aixtools.test/inst_root
Finished processing all filesets.  (Total time:  1 secs).

DETAILS - Recovery Behavior

Failed Install processing

When a script returns a non-zero exit status instal (spelling is correct!) has failed and the un* scripts are run.

+-----------------------------------------------------------------------------+
                         Installing Software...
+-----------------------------------------------------------------------------+

installp:  APPLYING software for:
        aixtools.something.rte 6.8.0.1

+---------------------------- PRE_RM -----------------------------------------+
+-----------------------------------------------------------------------------+
+---------------------------- PRE_RM -----------------------------------------+
+---------------------------- PRE_I ------------------------------------------+
+-----------------------------------------------------------------------------+
+---------------------------- PRE_I ------------------------------------------+
+---------------------------- POST_I -----------------------------------------+
+-----------------------------------------------------------------------------+
+---------------------------- POST_I -----------------------------------------+
+---------------------------- CONFIG -----------------------------------------+
+-----------------------------------------------------------------------------+
+---------------------------- CONFIG -----------------------------------------+
+---------------------------- PRE_I ------------------------------------------+
+-----------------------------* R O O T *-------------------------------------+
+---------------------------- PRE_I ------------------------------------------+
+---------------------------- POST_I -----------------------------------------+
+-----------------------------* R O O T *-------------------------------------+
+---------------------------- POST_I -----------------------------------------+
+---------------------------- CONFIG -----------------------------------------+
+------------------------------ R O O T --------------------------------------+
+---------------------------- CONFIG -----------------------------------------+
instal:  Failed while executing the aixtools.openbsd.openssh.rte.config script.


0503-464 installp:  The installation has FAILED for the "root" part 
        of the following filesets:
        aixtools.openbsd.openssh.rte 6.8.0.1601

installp:  Cleaning up software for:
        aixtools.something.rte 6.8.0.1

+---------------------------- UNCONFIG ---------------------------------------+
+------------------------------ R O O T --------------------------------------+
+---------------------------- UNCONFIG ---------------------------------------+
+---------------------------- UNPOST_I----------------------------------------+
+-----------------------------* R O O T *-------------------------------------+
+---------------------------- UNPOST_I----------------------------------------+
+---------------------------- UNPRE_I ----------------------------------------+
+-----------------------------* R O O T *-------------------------------------+
+---------------------------- UNPRE_I ----------------------------------------+
Finished processing all filesets.  (Total time:  2 secs).

+-----------------------------------------------------------------------------+
                                Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name                        Level           Part        Event       Result
-------------------------------------------------------------------------------
aixtools.something.rte      6.8.0.1         USR         APPLY       SUCCESS    
aixtools.something.rte      6.8.0.1         ROOT        APPLY       FAILED     
aixtools.something.rte      6.8.0.1         ROOT        CLEANUP     SUCCESS    

Post Install Verification

After a situation like this (was previously installed, root install failed) the command lslpp -l is okay while lslpp -L is not. lslpp -v gives us the details.

root@x064:[/data/prj/openbsd/openssh/openssh-6.8p1]lslpp -l aixtools.openbsd.openssh.rte
  Fileset                      Level  State      Description         
  ----------------------------------------------------------------------------
Path: /usr/lib/objrepos
  aixtools.something.rte
                          6.8.0.1     COMMITTED  1513 0401 1555
root@x064:[/data/prj/openbsd/openssh/openssh-6.8p1]lslpp -L aixtools.openbsd.openssh.rte
  Fileset                      Level  State  Type  Description (Uninstaller)
  ----------------------------------------------------------------------------
  aixtools.something.rte
                          6.8.0.1       ?     F    1513 0401 1555


State codes: 
 A -- Applied. 
 B -- Broken. 
 C -- Committed. 
 E -- EFIX Locked. 
 O -- Obsolete.  (partially migrated to newer version) 
 ? -- Inconsistent State...Run lppchk -v.

Type codes: 
 F -- Installp Fileset 
 P -- Product 
 C -- Component 
 T -- Feature 
 R -- RPM Package 
root@x064:[/data/prj/openbsd/openssh/openssh-6.8p1]lppchk -v  aixtools.openbsd.openssh.rte
lppchk:  The following filesets need to be installed or corrected to bring
         the system to a consistent state:

  aixtools.something.rte 6.8.0.1 (usr: COMMITTED, root: not installed)

Personal tools
Namespaces

Variants
Actions
Navigation
Downloads
Toolbox