CFEngine-3.11.0b1 install/compile on Alpha Gentoo

With my colleague @ work we have made a bet that if I would ever make a CFEngine run on Alpha systems I would get a diploma for CFEngine. So “Clouseau” here is a build of CFEngine 3.11beta running on Alpha !

Rough notes on the build / install process

Linux alpha 4.9.6-gentoo-r1 #1 SMP Fri Jun 9 09:23:26 CEST 2017 alpha EV67 Tsunami GNU/Linuxsddfds

wget https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-3.11.0b1.tar.gz

alpha cfengine-3.11.0b1 # ./configure
 <---snip---->
 checking for getconf... /usr/bin/getconf
 checking for the pthreads library -lpthreads... no
 checking whether pthreads work without any flags... no
 checking whether pthreads work with -Kthread... no
 checking whether pthreads work with -kthread... no
 checking for the pthreads library -llthread... no
 checking whether pthreads work with -pthread... yes
 checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
 checking if more special flags are required for pthreads... no
 checking for PQconnectdb in -lpq... yes
 checking libpq-fe.h usability... yes
 checking libpq-fe.h presence... yes
 checking for libpq-fe.h... yes
 which: no mysql_config in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/alpha-unknown-linux-gnu/gcc-bin/4.9.3)
 checking for mysql_real_connect in -lmysqlclient... no
 checking mysql.h usability... no
 checking mysql.h presence... no
 checking for mysql.h... no
 checking for EVP_CIPHER_CTX_init in -lmysqlclient... no
 checking for mdb_dbi_open in -llmdb... no
 configure: error: Cannot find Lightning MDB

alpha cfengine-3.11.0b1 #

wget https://github.com/LMDB/lmdb/archive/mdb.master.zip

alpha liblmdb # make
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mdb.c
 INIT: Id "hvc0" respawning too fast: disabled for 5 minutes
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c midl.c
 ar rs liblmdb.a mdb.o midl.o
 ar: creating liblmdb.a
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -fPIC -c mdb.c -o mdb.lo
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -fPIC -c midl.c -o midl.lo
 gcc -pthread -shared -o liblmdb.so mdb.lo midl.lo
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mdb_stat.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_stat.o liblmdb.a -o mdb_stat
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mdb_copy.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_copy.o liblmdb.a -o mdb_copy
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mdb_dump.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_dump.o liblmdb.a -o mdb_dump
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mdb_load.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mdb_load.o liblmdb.a -o mdb_load
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mtest.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest.o liblmdb.a -o mtest
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mtest2.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest2.o liblmdb.a -o mtest2
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mtest3.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest3.o liblmdb.a -o mtest3
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mtest4.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest4.o liblmdb.a -o mtest4
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized -c mtest5.c
 gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast -Wuninitialized mtest5.o liblmdb.a -o mtest5
 alpha liblmdb # make install
 mkdir -p /usr/local/bin
 mkdir -p /usr/local/lib
 mkdir -p /usr/local/include
 mkdir -p /usr/local/share/man/man1
 for f in mdb_stat mdb_copy mdb_dump mdb_load; do cp $f /usr/local/bin; done
 for f in liblmdb.a liblmdb.so; do cp $f /usr/local/lib; done
 for f in lmdb.h; do cp $f /usr/local/include; done
 for f in mdb_stat.1 mdb_copy.1 mdb_dump.1 mdb_load.1; do cp $f /usr/local/share/man/man1; done

alpha cfengine-3.11.0b1 # ./configure
 Summary:
 > Version: 3.11.0b1
 > Required libraries
 -> OpenSSL: default path
 -> PCRE: default path
 > Optional libraries
 -> MySQL connector: disabled
 -> PostgreSQL connector: default path
 -> DB: Lightning MDB: default path
 -> libvirt: disabled
 -> libacl: default path
 -> libcurl: disabled
 -> libyaml: default path
 -> libxml2: default path
 -> User promises: PAM/user* tools
 -> Enterprise extensions: Plugin or not included
 -> init.d script: disabled
 -> Systemd service: disabled
 -> Workdir: /var/cfengine
 -> Masterdir: default
 -> Inputdir: default
 -> Logdir: /var/cfengine
 -> Piddir: /var/cfengine
 -> Statedir: default

DONE: Configuration done. Run make/gmake to build CFEngine Community
 alpha cfengine-3.11.0b1 # make

#nano -w /etc/ld.so.conf.db/lmdb.conf
 /usr/local/lib

# ldconfig

# wget https://cfengine-package-repos.s3.amazonaws.com/tarballs/cfengine-masterfiles-3.11.0b1.tar.gz
 # cd cfengine-masterfiles-3.11.0b1
 # make
 # make install


Bootstrap

alpha cfengine # /var/cfengine/bin/cf-agent --bootstrap 10.0.2.11

Run some tests

 alpha cfengine # /var/cfengine/bin/cf-agent -KI
 info: Installing cfe_internal_non_existing_package...
 info: Q:emerge -q --quiet-bu ...:!!! Section 'x-portage' in repos.conf has location attribute set to nonexistent directory: '/space/catalyst/portage'
 info: Q:emerge -q --quiet-bu ...:!!! Invalid news item: /usr/portage/metadata/news/2017-04-10-split-and-slotted-wine/2017-04-10-split-and-slotted-wine.en.txt
 info: Q:emerge -q --quiet-bu ...:!!! line 6: News-Item-Format: 2.0
 info: Q:emerge -q --quiet-bu ...:
 info: Q:emerge -q --quiet-bu ...: * IMPORTANT: 13 config files in '/etc/portage' need updating.
 info: Q:emerge -q --quiet-bu ...:
 info: Q:emerge -q --quiet-bu ...:emerge: there are no ebuilds to satisfy "cfe_internal_non_existing_package".
 info: Q:emerge -q --quiet-bu ...:
 info: Q:emerge -q --quiet-bu ...:emerge: searching for similar names... nothing similar found.
 info: Q:emerge -q --quiet-bu ...: * See the CONFIGURATION FILES and CONFIGURATION FILES UPDATE TOOLS
 info: Q:emerge -q --quiet-bu ...: * sections of the emerge man page to learn how to update config files.

Looks like the latest CFEngine runs on the Alpha (simulated DS20E)  ,  lets collect the CFEngine diploma from Clouseau ;)

And of course some boring video to follow

Advertisements
Gallery | This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s