The rsyslog package contains programs for logging system messages, such as those given by the kernel when unusual things happen.
This package requires compiler variables to be set for the target in the environment.
export CC="${CLFS_TARGET}-gcc" export CXX="${CLFS_TARGET}-g++" export AR="${CLFS_TARGET}-ar" export AS="${CLFS_TARGET}-as" export RANLIB="${CLFS_TARGET}-ranlib" export LD="${CLFS_TARGET}-ld" export STRIP="${CLFS_TARGET}-strip"
When Cross Compiling the configure script does not does not determine the correct values for the following, Set the values manually:
cat > config.cache << EOF ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes EOF
Prepare Rsyslog for compilation:
./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \ --prefix=/usr --sbindir=/sbin \ --cache-file=config.cache
Compile the package:
make
This package does not come with a test suite.
Install the package:
make DESTDIR=${CLFS} install
Create a directory for expansion snippets:
install -dv ${CLFS}/etc/rsyslog.d
Create a new /etc/rsyslog.conf
file
by running the following:
cat > ${CLFS}/etc/rsyslog.conf << "EOF"
# Begin /etc/rsyslog.conf
# CLFS configuration of rsyslog. For more info use man rsyslog.conf
#######################################################################
# Rsyslog Modules
# Support for Local System Logging
$ModLoad imuxsock.so
# Support for Kernel Logging
$ModLoad imklog.so
#######################################################################
# Global Options
# Use traditional timestamp format.
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
# Set the default permissions for all log files.
$FileOwner root
$FileGroup root
$FileCreateMode 0640
$DirCreateMode 0755
# Provides UDP reception
$ModLoad imudp
$UDPServerRun 514
# Disable Repating of Entries
$RepeatedMsgReduction on
#######################################################################
# Include Rsyslog Config Snippets
$IncludeConfig /etc/rsyslog.d/*.conf
#######################################################################
# Standard Log Files
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
daemon.* -/var/log/daemon.log
kern.* -/var/log/kern.log
lpr.* -/var/log/lpr.log
mail.* -/var/log/mail.log
user.* -/var/log/user.log
# Catch All Logs
*.=debug;\
auth,authpriv.none;\
news.none;mail.none -/var/log/debug
*.=info;*.=notice;*.=warn;\
auth,authpriv.none;\
cron,daemon.none;\
mail,news.none -/var/log/messages
# Emergency are shown to everyone
*.emerg *
# End /etc/rsyslog.conf
EOF