-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #16861: Build agent on solaris
- Loading branch information
Showing
4 changed files
with
89 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,73 @@ | ||
# this is not the final build script just an indication of what has to be dont | ||
set -e | ||
|
||
VERSION="6.0.5" | ||
BUILD_DIR="BUILD" | ||
|
||
BASE=$(readlink -f $(dirname $0)/..) | ||
cd "${BASE}/SOURCES" | ||
|
||
# nightly get | ||
wget -q --header="accept-encoding:" -O rudder-sources.tar.bz2 "http://repository.rudder.io/sources/6.0-nightly/rudder-sources-${VERSION}~rc1-latest.tar.bz2" | ||
|
||
# 1- install build-dependencies | ||
|
||
# dependencies | ||
pkg install gcc | ||
pkg install gnu-binutils | ||
|
||
# 2- configure, make and install into tmpdir | ||
|
||
# Temporary directory | ||
cd "${BASE}." | ||
mkdir -p "${BUILD_DIR}" | ||
|
||
# use gnu tools to build | ||
export PATH=/usr/gnu/bin:/usr/gnu/x86_64-pc-solaris2.11/bin/:$PATH | ||
|
||
env="RUDDER_VERSION_TO_PACKAGE=${VERSION} USE_SYSTEM_OPENSSL=false USE_SYSTEM_ZLIB=false USE_SYSTEM_LMDB=false USE_SYSTEM_PCRE=false USE_SYSTEM_PERL=false USE_SYSTEM_FUSION=false USE_SYSTEM_CURL=false USE_SYSTEM_YAML=false USE_SYSTEM_XML=false USE_ACL=false" | ||
|
||
cd SOURCES | ||
|
||
# build | ||
gmake build RUDDER_VERSION_TO_PACKAGE=6.0.3 USE_SYSTEM_OPENSSL=false USE_SYSTEM_ZLIB=false USE_SYSTEM_LMDB=false USE_SYSTEM_PCRE=false USE_SYSTEM_PERL=false USE_SYSTEM_FUSION=false USE_SYSTEM_CURL=false USE_SYSTEM_YAML=false USE_SYSTEm_XML=false OS_FAMILY=solaris | ||
gmake build ${env} | ||
|
||
# install in a temporary directory | ||
gmake install DESTDIR=$(pwd)/tmp-build RUDDER_VERSION_TO_PACKAGE=6.0.3 USE_SYSTEM_OPENSSL=false USE_SYSTEM_ZLIB=false USE_SYSTEM_LMDB=false USE_SYSTEM_PCRE=false USE_SYSTEM_PERL=false USE_SYSTEM_FUSION=false USE_SYSTEM_CURL=false USE_SYSTEM_YAML=false USE_SYSTEM_XML=false OS_FAMILY=solaris | ||
gmake install ${env} DESTDIR="${BASE}/${BUILD_DIR}" | ||
|
||
# 3- generate package (doc, https://docs.oracle.com/cd/E26502_01/html/E21383/pkgcreate.html) | ||
|
||
cd "${BASE}" | ||
|
||
# file list | ||
pkgsend generate "${BUILD_DIR}" | pkgfmt > rudder-agent.p5m.1 | ||
|
||
# metadata | ||
pkgmogrify -DARCH=`uname -p` -DVERSION=${VERSION} -DTAG=0 rudder-agent.p5m.1 solaris/rudder-agent.metadata.mog | pkgfmt > rudder-agent.p5m.2 | ||
|
||
# dependencies | ||
pkgdepend generate -md "${BUILD_DIR}" rudder-agent.p5m.2 | pkgfmt > rudder-agent.p5m.3 | ||
pkgdepend resolve -m rudder-agent.p5m.3 | ||
|
||
# actuators | ||
pkgmogrify rudder-agent.p5m.3.res solaris/rudder-agent.postinst.mog | pkgfmt > rudder-agent.p5m.4.res | ||
|
||
# lint | ||
pkglint -c ~/solaris-reference -r http://pkg.oracle.com/solaris/release rudder-agent.p5m.4.res | ||
|
||
# generate repo | ||
pkgrepo create rudder-nightly | ||
pkgrepo -s rudder-nightly set publisher/prefix=normation | ||
pkgsend -s rudder-nightly publish -d BUILD rudder-agent.p5m.4.res | ||
|
||
# tar for easy transportation | ||
tar czf rudder-nightly.tgz rudder-nightly | ||
|
||
# create repo archive for easy transpotration to another solaris | ||
#pkgrecv -s rudder-nightly -a -d rudder-nightly.p5p rudder-agent | ||
|
||
# merge solaris + i386 into a single package : https://docs.oracle.com/cd/E26502_01/html/E29030/pkgmerge-1.html#REFMAN1pkgmerge-1 | ||
# pkgmerge -s arch=sparc,http://src1.example.com -s arch=i386,http://src2.example.com -d /path/to/target/repository | ||
|
||
# post install | ||
/opt/rudder/share/package-scripts/rudder-agent-postinst "true" "solaris" "false" "" | ||
#/opt/rudder/share/package-scripts/rudder-agent-postinst "true" "solaris" "false" "orchestrateur" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
set name=pkg.fmri value=rudder-agent@$(VERSION),5.11-$(TAG) | ||
set name=pkg.summary value="Configuration management and audit tool - agent" | ||
set name=pkg.description value=" Rudder is an open source configuration management and audit solution.\ | ||
.\ | ||
This package contains the agent that must be installed on all nodes to be\ | ||
managed by Rudder. It is based on two main components: CFEngine Community 3 and\ | ||
FusionInventory." | ||
set name=variant.arch value=$(ARCH) | ||
set name=info.classification value="org.opensolaris.category.2008:System/Administration and Configuration" | ||
<transform dir path=etc$->drop> | ||
<transform dir path=etc/bash_completion.d$->drop> | ||
<transform dir path=etc/cron.d$->drop> | ||
<transform dir path=etc/default$->drop> | ||
<transform dir path=etc/init.d$->drop> | ||
<transform dir path=etc/profile.d$->drop> | ||
<transform dir path=opt$->drop> | ||
<transform dir path=var$->drop> | ||
<transform dir path=var/log$->drop> | ||
<transform dir path=usr$->drop> | ||
<transform dir path=usr/bin$->drop> | ||
<transform file path=opt/rudder/bin/vzps.py$->drop> |
Empty file.