Skip to content

Commit

Permalink
Merge pull request #30 from initrd/master
Browse files Browse the repository at this point in the history
Different plugins path for CentOS 8
  • Loading branch information
Guillaume Destuynder (:kang) authored Nov 4, 2019
2 parents c20a5e9 + 51eec2b commit 98ff567
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,22 @@
# Authors:
# Guillaume Destuynder <[email protected]>

VERSION := 2.2.7
VERSION := 2.2.8

#FPM options, suggestions:
# --replaces audisp-cef
# --rpm-digest sha512 --rpm-sign
FPMOPTS :=

# CentOS 8 moves audisp plugins into a different path. Ignore for
# all other variants
CENTOS8TEST := $(shell test -f /etc/redhat-release && grep -q release\ 8\\.0 /etc/redhat-release)
ifeq ($(.SHELLSTATUS),0)
AUDISP_PLUGINS_PATH := etc/auditd/plugins.d
else
AUDISP_PLUGINS_PATH := etc/audisp/plugins.d
endif

# Turn this on if you get issues with out of sequence messages/missing event attributes
# Only needed for some versions of libaudit - if you don't have problems, leave off.
REORDER_HACK :=
Expand Down Expand Up @@ -75,17 +84,17 @@ audisp-json.o: audisp-json.c
${GCC} -I. ${CFLAGS} ${DEBUGF} ${LIBS} ${DEFINES} -c -o audisp-json.o audisp-json.c

install: audisp-json au-json.conf audisp-json.conf
${INSTALL} -D -m 0644 au-json.conf ${DESTDIR}/${PREFIX}/etc/audisp/plugins.d/au-json.conf
${INSTALL} -D -m 0644 au-json.conf ${DESTDIR}/${PREFIX}/${AUDISP_PLUGINS_PATH}/au-json.conf
${INSTALL} -D -m 0644 audisp-json.conf ${DESTDIR}/${PREFIX}/etc/audisp/audisp-json.conf
${INSTALL} -D -m 0755 audisp-json ${DESTDIR}/${PREFIX}/sbin/audisp-json

uninstall:
rm -f ${DESTDIR}/${PREFIX}/etc/audisp/plugins.d/au-json.conf
rm -f ${DESTDIR}/${PREFIX}/${AUDISP_PLUGINS_PATH}/au-json.conf
rm -f ${DESTDIR}/${PREFIX}/etc/audisp/audisp-json.conf
rm -f ${DESTDIR}/${PREFIX}/sbin/audisp-json

packaging: audisp-json au-json.conf audisp-json.conf example_audit.rules
${INSTALL} -D -m 0644 au-json.conf tmp/etc/audisp/plugins.d/au-json.conf
${INSTALL} -D -m 0644 au-json.conf tmp/${AUDISP_PLUGINS_PATH}/au-json.conf
${INSTALL} -D -m 0644 audisp-json.conf tmp/etc/audisp/audisp-json.conf
${INSTALL} -D -m 0755 audisp-json tmp/sbin/audisp-json
${INSTALL} -D -m 0755 example_audit.rules tmp/usr/share/doc/audisp-json/rules/example_audit.rules
Expand All @@ -102,7 +111,7 @@ rpm-deps:
rpm: packaging
fpm ${FPMOPTS} -C tmp -v ${VERSION} -n audisp-json --license GPL --vendor mozilla --description "json plugin for Linux Audit" \
--url https://github.com/gdestuynder/audisp-json -d audit-libs -d libcurl \
--config-files etc/audisp/plugins.d/au-json.conf --config-files etc/audisp/audisp-json.conf -s dir -t rpm .
--config-files ${AUDISP_PLUGINS_PATH}/au-json.conf --config-files etc/audisp/audisp-json.conf -s dir -t rpm .

deb-deps:
@echo "If you want to run this on a debian|ubuntuetc build system (e.g. here, ubuntu), do this:"
Expand Down

0 comments on commit 98ff567

Please sign in to comment.