Skip to content

Instantly share code, notes, and snippets.

@sahya
Created March 2, 2019 02:09
Show Gist options
  • Select an option

  • Save sahya/b663b57db2d9ff66e8f644fb4f9d4fc3 to your computer and use it in GitHub Desktop.

Select an option

Save sahya/b663b57db2d9ff66e8f644fb4f9d4fc3 to your computer and use it in GitHub Desktop.
how to build command that omhttp module of rsyslog.
# how to command ofbuilding rsyslog.
# env: Ubuntu, 4.15.0-1027-gcp #28~16.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
# date: Fri Jan 18 10:10:51 UTC 2019
# cloning repo rsyslog
git clone https://github.com/rsyslog/rsyslog
cd ./rsyslog
sudo apt update
sudo apt install autoconf automake libtool
vim ./configure.ac
## add LT_INIT, AC_PROG_RANLIB
# example:
# AC_DEFINE(VERSION_MONTH, 1, [month part of real rsyslog version])
# AC_PROG_RANLIB # <-- add
# LT_INIT # <-- add
#
# AM_INIT_AUTOMAKE([subdir-objects])
# prepare for build
autoheader
aclocal
automake -a -c
autoreconf -iv
sudo add-apt-repository ppa:adiscon/v8-stable
sudo apt-get update
sudo apt-get install pkg-config rsyslog libcurl4-openssl-dev \
flex bison python-docutils uuid-dev libgcrypt20-dev \
zlib1g-dev libfastjson-dev libestr-dev
ls -l /usr/share/aclocal/pkg.m4
aclocal --print-ac-dir
ACLOCAL_PATH=/usr/share/aclocal ./autogen.sh
./configure --enable-omhttp # check last message of build enabled omhttp
make
ls -la ./contrib/omhttp/.libs/omhttp.so
sudo cp ./contrib/omhttp/.libs/omhttp.so /usr/lib/rsyslog/
ls -la /usr/lib/rsyslog/omhttp.so
# set omhttp settings by rsyslog : https://www.rsyslog.com/doc/v8-stable/configuration/modules/omhttp.html#example-1
@neilyalowitz
Copy link
Copy Markdown

neilyalowitz commented Jan 5, 2023

This was very helpful, thanks. I also formatted this as a Dockerfile.

FROM ubuntu:22.04
RUN apt-get -y update && \
    apt-get -y install git apt-utils make software-properties-common && \
    git clone https://github.com/rsyslog/rsyslog && \
    cd rsyslog && \
    apt-get -y update && \
    apt-get -y install autoconf automake libtool && \
    sed -i '8i AC_PROG_RANLIB' /rsyslog/configure.ac && \
    sed -i '9i LT_INIT' /rsyslog/configure.ac && \
    autoheader && \
    aclocal
#RUN cd rsyslog && automake -a -c  # causes failures
#RUN cd rsyslog && autoreconf -iv   # causes failures
RUN cd rsyslog && add-apt-repository ppa:adiscon/v8-stable && \
    apt-get -y update && \
    apt-get -y install pkg-config rsyslog libcurl4-openssl-dev \
         flex bison python3-docutils uuid-dev libgcrypt20-dev \
         zlib1g-dev libfastjson-dev libestr-dev && \
    aclocal --print-ac-dir && \
    ACLOCAL_PATH=/usr/share/aclocal ./autogen.sh
RUN cd rsyslog && \
    ./configure --enable-omhttp && \
    make && \
    cp ./contrib/omhttp/.libs/omhttp.so /usr/lib/rsyslog/ && \
    ls -la /usr/lib/rsyslog/omhttp.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment