From e44872927ec9e14d9d7efff3dd61753a88e28d0f Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sun, 5 Feb 2012 19:26:15 +0000 Subject: [PATCH] Backport: aix: Add a set of build scripts that make packages suitable for installp on the AIX platform. Submitted by: Michael Felt git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1240780 13f79535-47bb-0310-9956-ffa450edef68 --- build/aix/README | 32 +++++++++++++++++ build/aix/aixproto.ksh | 78 ++++++++++++++++++++++++++++++++++++++++++ build/aix/buildaix.ksh | 53 ++++++++++++++++++++++++++++ 3 files changed, 163 insertions(+) create mode 100644 build/aix/README create mode 100755 build/aix/aixproto.ksh create mode 100755 build/aix/buildaix.ksh diff --git a/build/aix/README b/build/aix/README new file mode 100644 index 0000000000..8cc75a5903 --- /dev/null +++ b/build/aix/README @@ -0,0 +1,32 @@ +The script buildaix.ksh will attempt to build a AIX installp fileset +out of a source tree for httpd. + +REQUIREMENTS: +fileset bos.adt.insttools + +RECOMMENDED: +Toolbox filesets zlib and zlib-devel +Toolbox fileset coreutils + +To build a package, make sure you are in the root of the source tree, +and run: + +build/aix/buildaix.ksh + +## coming - argument to leave the DESTDIR results for manual +## modifications to the template (to create seperate filesets) + +An AIX fileset named ....I will be +created in the build/aix directory. Also included is the .template file. + +KNOWN issues: +on AIX libtool is known to have issues with the install command. +many of these issues can be resolved by inserting the GNU install command +earlier in the PATH variable. Testing has shown that this may still +have issues when installing to DESTDIR. To compensate for this +the buildaix.ksh also does a "regular" make install before executing +the make DESTDIR=$TEMPDIR install command + +TODO +Add Apache LICENSE to fileset and require acceptance +Add test for bos.adt.insttools at start of build script diff --git a/build/aix/aixproto.ksh b/build/aix/aixproto.ksh new file mode 100755 index 0000000000..5c5c471a72 --- /dev/null +++ b/build/aix/aixproto.ksh @@ -0,0 +1,78 @@ +#!/usr/bin/ksh +TEMPDIR=$1 +BUILD=`pwd` +. build/aix/pkginfo + +package=$PKG +name=$NAME +vrmf=$VERSION +descr="$VENDOR $NAME for $ARCH" +umask 022 +INFO=$BUILD/build/aix/.info +mkdir -p $INFO + +template=${INFO}/${PKG}.${NAME}.${vrmf}.template +>$template + +cd ${TEMPDIR} +rm -rf .info lpp_name tmp +# get the directory sizes in blocks +for d in etc opt var +do + set `du -s $d/${NAME}` + let sz$d=$1+1 +done +set `du -s usr/share/man` +szman=$1+1 + +files=./httpd-root +cd ${TEMPDIR}/.. +find ${files} -type d -exec chmod og+rx {} \; +chmod -R go+r ${files} +chown -R 0:0 ${files} + +cat - <>$template +Package Name: ${package}.${NAME} +Package VRMF: ${vrmf}.0 +Update: N +Fileset + Fileset Name: ${package}.${NAME}.rte + Fileset VRMF: ${vrmf}.0 + Fileset Description: ${descr} + USRLIBLPPFiles + EOUSRLIBLPPFiles + Bosboot required: N + License agreement acceptance required: N + Include license files in this package: N + Requisites: + Upsize: /usr/share/man ${szman}; + Upsize: /etc/${NAME} $szetc; + Upsize: /opt/${NAME} $szopt; + Upsize: /var/${NAME} $szvar; + USRFiles +EOF + +find ${files} | sed -e s#^${files}## | sed -e "/^$/d" >>$template + +cat - <>$template + EOUSRFiles + ROOT Part: N + ROOTFiles + EOROOTFiles + Relocatable: N +EOFileset +EOF + +cp ${template} ${BUILD}/build/aix + +# use mkinstallp to create the fileset. result is in ${TEMPDIR}/tmp +mkinstallp -d ${TEMPDIR} -T ${template} + +cp ${TEMPDIR}/tmp/$PKG.$NAME.$VERSION.0.bff ${BUILD}/build/aix +cd $BUILD/build/aix +rm -f $PKG.$NAME.$VERSION.$ARCH.I +mv $PKG.$NAME.$VERSION.0.bff $PKG.$NAME.$VERSION.$ARCH.I +rm .toc +inutoc . +installp -d . -ap ${PKG}.${NAME} +installp -d . -L diff --git a/build/aix/buildaix.ksh b/build/aix/buildaix.ksh new file mode 100755 index 0000000000..a7caa6ba21 --- /dev/null +++ b/build/aix/buildaix.ksh @@ -0,0 +1,53 @@ +#!/usr/bin/ksh +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# + +# buildaix.ksh: This script builds an AIX fileset + +LAYOUT=AIX +TEMPDIR=/var/tmp/$USER/httpd-root +rm -rf $TEMPDIR + +## strange interaction between install and libtool requires a regular install +## for all the links to succeed in the TEMPDIR +## httpd-2.0 does not include ssl by default +## will make a seperate build for that later + +> nohup.out +./configure \ + --enable-layout=$LAYOUT \ + --enable-module=so \ + --enable-proxy \ + --enable-cache \ + --enable-disk-cache \ + --with-mpm=worker \ + --enable-mods-shared=all | tee nohup.out + +make | tee -a nohup.out + +make install > install.log +make install DESTDIR=$TEMPDIR + +# will make use of the pkginfo data as input for mkinstallp template +cp build/aix/pkginfo $TEMPDIR + +## no seperate filesets for man pages, documents, etc. + +build/aix/aixproto.ksh $TEMPDIR + +# rm -rf $TEMPDIR +ls -ltr build/aix | grep -i aix -- 2.50.1