Move buildroot to bsp directory.

This commit is contained in:
2016-11-16 22:05:33 +01:00
parent 317c040ea8
commit 807ab03547
7408 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
# audit has some builtin per-architecture system call tables
config BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
bool
default y if BR2_aarch64 || BR2_arm || BR2_armeb || \
BR2_i386 || BR2_powerpc || BR2_x86_64
config BR2_PACKAGE_AUDIT
bool "audit"
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS
depends on !BR2_TOOLCHAIN_USES_MUSL
help
The audit package contains the user space utilities for
storing and searching the audit records generated by
the audit subsystem in the Linux 2.6 kernel
Note: The z/OS remote plugin is disabled in this package
http://people.redhat.com/sgrubb/audit/
comment "audit needs a uClibc or (e)glibc toolchain w/ threads, dynamic library"
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS \
|| BR2_TOOLCHAIN_USES_MUSL
depends on BR2_PACKAGE_AUDIT_ARCH_SUPPORTS

View File

@@ -0,0 +1,80 @@
#!/bin/sh
#
# auditd This starts and stops auditd
#
# description: This starts the Linux Auditing System Daemon,
# which collects security related events in a dedicated
# audit log. If this daemon is turned off, audit events
# will be sent to syslog.
#
NAME=auditd
DAEMON=/usr/sbin/${NAME}
CONFIG=/etc/audit/auditd.conf
PIDFILE=/var/run/${NAME}.pid
start(){
printf "Starting ${NAME}: "
# Create dir to store log files in if one doesn't exist. Create
# the directory with SELinux permissions if possible
command -v matchpathcon >/dev/null 2>&1
if [ $? = 0 ]; then
mkdir -p /var/log/audit -Z `matchpathcon -n /var/log/audit`
else
mkdir -p /var/log/audit
fi
# Run audit daemon executable
start-stop-daemon -S -q -p ${PIDFILE} --exec ${DAEMON}
if [ $? = 0 ]; then
# Load the default rules
test -f /etc/audit/rules.d/audit.rules && /usr/sbin/auditctl -R /etc/audit/rules.d/audit.rules >/dev/null
echo "OK"
else
echo "FAIL"
fi
}
stop(){
printf "Stopping ${NAME}: "
start-stop-daemon -K -q -p ${PIDFILE}
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
reload(){
printf "Reloading ${NAME} configuration: "
start-stop-daemon --stop -s 1 -p ${PIDFILE} 1>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
rotate(){
printf "Rotating ${NAME} logs: "
start-stop-daemon --stop -s 10 -p ${PIDFILE} 1>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
reload)
reload
;;
rotate)
rotate
;;
*)
echo "Usage: $0 {start|stop|restart|reload|rotate}"
exit 1
;;
esac

View File

@@ -0,0 +1,2 @@
#Locally computed
sha256 25f57f465f3230d7b1166b615ffd6748818a3dc225d0e8b396c5b2e951674e23 audit-2.4.4.tar.gz

View File

@@ -0,0 +1,60 @@
################################################################################
#
# audit
#
################################################################################
AUDIT_VERSION = 2.4.4
AUDIT_SITE = http://people.redhat.com/sgrubb/audit
AUDIT_LICENSE = GPLv2
AUDIT_LICENSE_FILES = COPYING
AUDIT_INSTALL_STAGING = YES
AUDIT_CONF_OPTS = --without-python --without-python3 --disable-zos-remote
ifeq ($(BR2_PACKAGE_LIBCAP_NG),y)
AUDIT_DEPENDENCIES += libcap-ng
AUDIT_CONF_OPTS += --with-libcap-ng=yes
else
AUDIT_CONF_OPTS += --with-libcap-ng=no
endif
# For i386, x86-64 and PowerPC, the system call tables are
# unconditionally included. However, for ARM(eb) and AArch64, then
# need to be explicitly enabled.
ifeq ($(BR2_arm)$(BR2_armeb),y)
AUDIT_CONF_OPTS += --with-arm
endif
ifeq ($(BR2_aarch64),y)
AUDIT_CONF_OPTS += --with-aarch64
endif
ifeq ($(BR2_INIT_SYSTEMD),y)
AUDIT_CONF_OPTS += --enable-systemd
else
AUDIT_CONF_OPTS += --disable-systemd
endif
define AUDIT_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/audit/S01auditd $(TARGET_DIR)/etc/init.d/S01auditd
endef
define AUDIT_INSTALL_INIT_SYSTEMD
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -fs ../../../../usr/lib/systemd/system/auditd.service \
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/auditd.service
mkdir -p $(TARGET_DIR)/usr/lib/tmpfiles.d
$(INSTALL) -D -m 644 package/audit/audit_tmpfiles.conf \
$(TARGET_DIR)/usr/lib/tmpfiles.d/audit.conf
endef
define AUDIT_INSTALL_CLEANUP
$(RM) -rf $(TARGET_DIR)/etc/rc.d
$(RM) -rf $(TARGET_DIR)/etc/sysconfig
endef
AUDIT_POST_INSTALL_TARGET_HOOKS += AUDIT_INSTALL_CLEANUP
$(eval $(autotools-package))

View File

@@ -0,0 +1 @@
d /var/log/audit 0755 - -