Skip to content

Commit

Permalink
Upgrade nxlog to 2.9.1347 (Ubuntu 14.04 DEB)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpb587 committed Aug 27, 2015
1 parent 3a491f1 commit 4dd8e03
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 77 deletions.
20 changes: 4 additions & 16 deletions config/blobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,15 @@ source/apr-1.5.1.tar.gz:
object_id: 6b6b4ae6-fbe6-44a4-8c1f-4141818a06c8
sha: 9caa83e3f50f3abc9fab7c4a3f2739a12b14c3a3
size: 1020833
source/expat-2.1.0.tar.gz:
object_id: 026d9d75-d181-46fe-a0d2-a07191d2c1c4
sha: b08197d146930a5543a7b99e871cba3da614f6f0
size: 562616
source/logstash-forwarder--69142e788f.zip:
object_id: 7f21eabc-3648-44ed-a84b-970836af0da3
sha: 64bb246491b8e9c9751525fe5528da48c8d0e4e6
size: 1848918
source/nxlog-ce-2.8.1248.tar.gz:
object_id: bfb3e3d8-b7a8-4f74-a1c2-4cd19928c4b8
sha: 91f187cec141819cf46f448418e5818fb68b4d38
size: 2552618
source/openssl-1.0.1h.tar.gz:
object_id: 9e3cb9c8-0547-4f59-acac-509c4c22f2de
sha: b2239599c8bf8f7fc48590a55205c26abe560bf8
size: 4475692
source/pcre-8.35.tar.gz:
object_id: 58cde95b-4b9d-4d46-8d7b-f5dabd9799d8
sha: 5a0efc7332c6741114372020a60acfed22befcb9
size: 1996552
source/collectd-5.4.1.tar.gz:
object_id: a5d77875-63bf-46d9-bf78-21b5b102491f
sha: faaccac4daf48449bcefc9d6f9236f98a5dd5b4b
size: 1894132
source/nxlog-ce_2.9.1347_ubuntu_1404_amd64.deb:
object_id: 24ec0add-7a46-4c62-aada-26de4a2e493a
sha: 3751854f76b34b19fac29b292a3d2edb01a769ca
size: 1520716
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ baseconf.each do | config |
end
end

$stdout.puts "ModuleDir /var/vcap/packages/logsearch-nxlog/usr/lib/nxlog/modules"
$stdout.puts "CacheDir /var/vcap/data/logsearch-shipper/logs"
#$stdout.puts "Group vcap"
$stdout.puts "PidFile /var/vcap/sys/run/logsearch-shipper/logs-nxlog.pid"
Expand Down
79 changes: 24 additions & 55 deletions packages/logsearch-nxlog/packaging
Original file line number Diff line number Diff line change
Expand Up @@ -9,76 +9,45 @@ CPUS=$(grep -c ^processor /proc/cpuinfo)


tar -xzf source/apr-1.5.1.tar.gz
tar -xzf source/expat-2.1.0.tar.gz
tar -xzf source/nxlog-ce-2.8.1248.tar.gz
tar -xzf source/openssl-1.0.1h.tar.gz
tar -xzf source/pcre-8.35.tar.gz


pushd apr-1.5.1
( cd apr-1.5.1

./configure \
--prefix=${BOSH_INSTALL_TARGET}/external/apr
./configure \
--prefix=${BOSH_INSTALL_TARGET}/external/apr

make -j${CPUS}
make install
make -j${CPUS}
make install

popd
)


pushd expat-2.1.0
( cd openssl-1.0.1h

./configure \
--prefix=${BOSH_INSTALL_TARGET}/external/expat
./config \

This comment has been minimized.

Copy link
@mrdavidlaing

mrdavidlaing Aug 28, 2015

Member

@dpb587 - Looks like it wasn't quite as simple as "extract files from .deb". Thanks for figuring out how to make it work!

-DSSL_ALLOW_ADH \
--shared \
--prefix=${BOSH_INSTALL_TARGET}/external/openssl \
--openssldir=${BOSH_INSTALL_TARGET}/external/openssldir

make -j${CPUS}
make install
make
make install

popd
)


pushd openssl-1.0.1h
dpkg -x source/nxlog-ce_2.9.1347_ubuntu_1404_amd64.deb $BOSH_INSTALL_TARGET

./config \
-DSSL_ALLOW_ADH \
--shared \
--prefix=${BOSH_INSTALL_TARGET}/external/openssl \
--openssldir=${BOSH_INSTALL_TARGET}/external/openssldir
mkdir $BOSH_INSTALL_TARGET/bin

make
make install
cat > $BOSH_INSTALL_TARGET/bin/nxlog <<'EOF'
#!/bin/sh
popd
export PATH="/var/vcap/packages/logsearch-nxlog/usr/bin:$PATH"
export LD_LIBRARY_PATH="/var/vcap/packages/logsearch-nxlog/external/apr/lib:/var/vcap/packages/logsearch-nxlog/external/openssl/lib:${LD_LIBRARY_PATH:-}"
exec nxlog $@
EOF

pushd pcre-8.35

./configure \
--prefix=${BOSH_INSTALL_TARGET}/external/pcre \
--enable-utf

make -j${CPUS}
make install

popd


pushd nxlog-ce-2.8.1248

export APRCONFIG="${BOSH_INSTALL_TARGET}/external/apr/bin/apr-1-config"
export PCRECONFIG="${BOSH_INSTALL_TARGET}/external/pcre/bin/pcre-config"
export CPPFLAGS="-I${PWD}/../expat-2.1.0/lib -I${BOSH_INSTALL_TARGET}/external/openssl/include -I${PWD}/../pcre-8.35"
export LDFLAGS="-L${BOSH_INSTALL_TARGET}/external/expat/lib -L${BOSH_INSTALL_TARGET}/external/openssl/lib"

./configure \
--prefix=${BOSH_INSTALL_TARGET}

make -j${CPUS}
make install

unset LDFLAGS
unset CPPFLAGS
unset PCRECONFIG
unset APRCONFIG

popd
chmod +x $BOSH_INSTALL_TARGET/bin/nxlog
7 changes: 1 addition & 6 deletions packages/logsearch-nxlog/spec
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
---
name: "logsearch-nxlog"
files:
- "source/nxlog-ce_2.9.1347_ubuntu_1404_amd64.deb"
# http://apache.tradebit.com/pub//apr/apr-1.5.1.tar.gz
- "source/apr-1.5.1.tar.gz"
# http://hivelocity.dl.sourceforge.net/project/expat/expat/2.1.0/expat-2.1.0.tar.gz
- "source/expat-2.1.0.tar.gz"
# http://softlayer-dal.dl.sourceforge.net/project/nxlog-ce/nxlog-ce-2.8.1248.tar.gz
- "source/nxlog-ce-2.8.1248.tar.gz"
# https://www.openssl.org/source/openssl-1.0.1h.tar.gz
- "source/openssl-1.0.1h.tar.gz"
# ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.35.tar.gz
- "source/pcre-8.35.tar.gz"

0 comments on commit 4dd8e03

Please sign in to comment.