First check in
This commit is contained in:
149
Makefile
Normal file
149
Makefile
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
# This file is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
|
# published by the Free Software Foundation here:
|
||||||
|
# (http://www.gnu.org/licenses/gpl-2.0.html)
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# Some, but not all of variables are required. The following list
|
||||||
|
# describes the required variables:
|
||||||
|
#
|
||||||
|
# * URL: The main website of the upstream project
|
||||||
|
# * REPO: The location of the package on the source pacakge
|
||||||
|
# server. This might be one of core, main, dev, or
|
||||||
|
# perhaps others.
|
||||||
|
# * BRIEF: Short description, should be 50 chars or less
|
||||||
|
# * SNAPVER: This is the package version. When a package is
|
||||||
|
# changed, but no changes are made to the source code
|
||||||
|
# this value should be increased. This would include
|
||||||
|
# things like usher being modified, changes to default
|
||||||
|
# configuration files, file permissions, etc.
|
||||||
|
# * ARCHIVE: The default commands that set this variable should
|
||||||
|
# work in most cases, but in some cases it may need
|
||||||
|
# to be modified. This variable should contain the
|
||||||
|
# path to the source of the package (./SRC/filename)
|
||||||
|
# * TYPE: This is probably not really needed due to the
|
||||||
|
# ability of gnu tar to figure it out on its own.
|
||||||
|
# Should probably be removed at some point.
|
||||||
|
# * SRCDIR: This is the name of the source directory after the
|
||||||
|
# package source is extracted. The default command
|
||||||
|
# should in most cases set this automatically.
|
||||||
|
# * PATCHDIR: This directory should be ./SRC/patches and is
|
||||||
|
# required, whether or not patches are used.
|
||||||
|
# * VERSION: This should be set automatically based on the
|
||||||
|
# version string in the source directory and SNAPVER.
|
||||||
|
# The default command here should work in many cases,
|
||||||
|
# but certain packages may need to use a different
|
||||||
|
# method.
|
||||||
|
#
|
||||||
|
# Variables that aren't required:
|
||||||
|
#
|
||||||
|
# * ARCH: This should be populated for packages which contain
|
||||||
|
# compiled binaries. If it is not populated the ARCH
|
||||||
|
# will be set to 'noarch'.
|
||||||
|
# * DEPENDS: If any other packages are required for this package
|
||||||
|
# to function then they need to be listed here,
|
||||||
|
# preferably in alphabetical order.
|
||||||
|
# * BUILDDEPS: Any package beyond packages from the core repo
|
||||||
|
# need to be listed here. The idea is that we
|
||||||
|
# can automate building and testing packages
|
||||||
|
# from clean core systems. The core repo is
|
||||||
|
# intended to include only the base minimum
|
||||||
|
# packages which provide a functional system.
|
||||||
|
# * SRCPKG: By default this is populated automatically with
|
||||||
|
# the name of the package (current directory). If
|
||||||
|
# the source package is used to generate multiple
|
||||||
|
# packages then this variable should contain the
|
||||||
|
# name of the git repo that tracks the source.
|
||||||
|
# * DESC: This is to be used to provide a longer description
|
||||||
|
# of the package.
|
||||||
|
|
||||||
|
ARCH = x86_64
|
||||||
|
DEPENDS = e2fsprogs,glibc,gmp,krb5,libgnutls,libnettle,zlib
|
||||||
|
BUILDDEPS =
|
||||||
|
SRCPKG =
|
||||||
|
URL = https://www.rsyslog.com/
|
||||||
|
REPO = main
|
||||||
|
BRIEF = RSYSLOG is the rocket-fast system for log processing
|
||||||
|
DESC = RSYSLOG is the rocket-fast system for log processing
|
||||||
|
SNAPVER = 0
|
||||||
|
|
||||||
|
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||||
|
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||||
|
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
||||||
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
|
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')-$(SNAPVER)
|
||||||
|
|
||||||
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
|
$(SRCDIR)/configure: $(ARCHIVE)
|
||||||
|
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
|
||||||
|
tar -jxf $(ARCHIVE); \
|
||||||
|
elif [ '$(TYPE)' == 'application/x-gzip' ]; then \
|
||||||
|
tar -zxf $(ARCHIVE); \
|
||||||
|
elif [ '$(TYPE)' == 'application/x-tar' ]; then \
|
||||||
|
tar -xf $(ARCHIVE); \
|
||||||
|
elif [ '$(TYPE)' == 'application/x-xz' ]; then \
|
||||||
|
tar -xf $(ARCHIVE); \
|
||||||
|
else \
|
||||||
|
echo 'Unable to determine archive type'; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
@touch $(SRCDIR)/configure
|
||||||
|
|
||||||
|
$(SRCDIR)/config.log: $(SRCDIR)/configure
|
||||||
|
@cd $(SRCDIR) && \
|
||||||
|
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
|
||||||
|
patch --verbose -Np1 -i $$patch; \
|
||||||
|
done
|
||||||
|
@cd $(SRCDIR); \
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--enable-imptcp \
|
||||||
|
--enable-mail \
|
||||||
|
--enable-klog \
|
||||||
|
--enable-gssapi-krb5 \
|
||||||
|
--enable-gnutls \
|
||||||
|
--build=x86_64-snap-linux-gnu \
|
||||||
|
--host=x86_64-snap-linux-gnu \
|
||||||
|
--target=x86_64-snap-linux-gnu
|
||||||
|
|
||||||
|
# binfile should be replaced with a file generated by the
|
||||||
|
# make process. It won't really break anything if not
|
||||||
|
# set to a valid file, but the source make process will
|
||||||
|
# be re-executed even if it isn't necessary
|
||||||
|
|
||||||
|
$(SRCDIR)/tools/rsyslogd: $(SRCDIR)/config.log
|
||||||
|
@cd $(SRCDIR) && make
|
||||||
|
|
||||||
|
$(ROOT): $(SRCDIR)/tools/rsyslogd
|
||||||
|
@if [ -d $(ROOT) ]; then \
|
||||||
|
touch $(ROOT); \
|
||||||
|
else \
|
||||||
|
mkdir -v $(ROOT); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
|
||||||
|
install -v -d -m 0755 $(ROOT)/etc/init.d && \
|
||||||
|
install -v -d -m 0755 $(ROOT)/etc/rsyslog.d && \
|
||||||
|
install -v -d -m 0755 $(ROOT)/usr/share/$(PACKAGE) && \
|
||||||
|
install -v -d -m 0755 $(ROOT)/var/spool/rsyslog && \
|
||||||
|
install -v -m 0644 $(SNAPDIR)/rsyslog.conf \
|
||||||
|
$(ROOT)/usr/share/$(PACKAGE)/rsyslog.conf && \
|
||||||
|
install -v -m 0755 $(SNAPDIR)/rsyslog.init \
|
||||||
|
$(ROOT)/etc/init.d/rsyslog
|
||||||
|
|
||||||
|
test: $(ROOT)
|
||||||
|
@cd $(SRCDIR); \
|
||||||
|
make check
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@rm -rvf $(ROOT) \
|
||||||
|
$(SNAPINFO) \
|
||||||
|
$(MANIFEST) \
|
||||||
|
$(FILES) \
|
||||||
|
$(SRCDIR)
|
||||||
|
|
||||||
5
SNAP/README
Normal file
5
SNAP/README
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
This is the directory where the manifest, snapinfo,
|
||||||
|
and files.tar.gz files will be created. It is also
|
||||||
|
where the usher file should be placed if it is
|
||||||
|
required by the package. Any other files that need
|
||||||
|
to be included could also be placed here.
|
||||||
121
SNAP/rsyslog.conf
Normal file
121
SNAP/rsyslog.conf
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
# /etc/rsyslog.conf Configuration file for rsyslog.
|
||||||
|
#
|
||||||
|
# For more information see
|
||||||
|
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
#### MODULES ####
|
||||||
|
#################
|
||||||
|
|
||||||
|
$ModLoad imuxsock # provides support for local system logging
|
||||||
|
$ModLoad imklog # provides kernel logging support
|
||||||
|
#$ModLoad immark # provides --MARK-- message capability
|
||||||
|
|
||||||
|
# provides UDP syslog reception
|
||||||
|
#$ModLoad imudp
|
||||||
|
#$UDPServerRun 514
|
||||||
|
|
||||||
|
# provides TCP syslog reception
|
||||||
|
#$ModLoad imtcp
|
||||||
|
#$InputTCPServerRun 514
|
||||||
|
|
||||||
|
|
||||||
|
###########################
|
||||||
|
#### GLOBAL DIRECTIVES ####
|
||||||
|
###########################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use traditional timestamp format.
|
||||||
|
# To enable high precision timestamps, comment out the following line.
|
||||||
|
#
|
||||||
|
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set the default permissions for all log files.
|
||||||
|
#
|
||||||
|
$FileOwner root
|
||||||
|
$FileGroup adm
|
||||||
|
$FileCreateMode 0640
|
||||||
|
$DirCreateMode 0755
|
||||||
|
$Umask 0022
|
||||||
|
|
||||||
|
#
|
||||||
|
# Where to place spool and state files
|
||||||
|
#
|
||||||
|
$WorkDirectory /var/spool/rsyslog
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include all config files in /etc/rsyslog.d/
|
||||||
|
#
|
||||||
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
|
###############
|
||||||
|
#### RULES ####
|
||||||
|
###############
|
||||||
|
|
||||||
|
#
|
||||||
|
# First some standard log files. Log by facility.
|
||||||
|
#
|
||||||
|
auth,authpriv.* /var/log/auth.log
|
||||||
|
*.*;auth,authpriv.none -/var/log/syslog
|
||||||
|
#cron.* /var/log/cron.log
|
||||||
|
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
|
||||||
|
|
||||||
|
#
|
||||||
|
# Logging for the mail system. Split it up so that
|
||||||
|
# it is easy to write scripts to parse these files.
|
||||||
|
#
|
||||||
|
mail.info -/var/log/mail.info
|
||||||
|
mail.warn -/var/log/mail.warn
|
||||||
|
mail.err /var/log/mail.err
|
||||||
|
|
||||||
|
#
|
||||||
|
# Logging for INN news system.
|
||||||
|
#
|
||||||
|
news.crit /var/log/news/news.crit
|
||||||
|
news.err /var/log/news/news.err
|
||||||
|
news.notice -/var/log/news/news.notice
|
||||||
|
|
||||||
|
#
|
||||||
|
# Some "catch-all" log files.
|
||||||
|
#
|
||||||
|
*.=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
|
||||||
|
|
||||||
|
#
|
||||||
|
# Emergencies are sent to everybody logged in.
|
||||||
|
#
|
||||||
|
*.emerg :omusrmsg:*
|
||||||
|
|
||||||
|
#
|
||||||
|
# I like to have messages displayed on the console, but only on a virtual
|
||||||
|
# console I usually leave idle.
|
||||||
|
#
|
||||||
|
#daemon,mail.*;\
|
||||||
|
# news.=crit;news.=err;news.=notice;\
|
||||||
|
# *.=debug;*.=info;\
|
||||||
|
# *.=notice;*.=warn /dev/tty8
|
||||||
|
|
||||||
|
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
|
||||||
|
# you must invoke `xconsole' with the `-file' option:
|
||||||
|
#
|
||||||
|
# $ xconsole -file /dev/xconsole [...]
|
||||||
|
#
|
||||||
|
# NOTE: adjust the list below, or you'll go crazy if you have a reasonably
|
||||||
|
# busy site..
|
||||||
|
#
|
||||||
|
daemon.*;mail.*;\
|
||||||
|
news.err;\
|
||||||
|
*.=debug;*.=info;\
|
||||||
|
*.=notice;*.=warn |/dev/xconsole
|
||||||
50
SNAP/rsyslog.init
Normal file
50
SNAP/rsyslog.init
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: $syslog
|
||||||
|
# Required-Start: $local_fs $network
|
||||||
|
# Required-Stop: $local_fs $network sendsignals
|
||||||
|
# Should-Start:
|
||||||
|
# Should-Stop:
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Starts the log daemon.
|
||||||
|
# X-Required: true
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
DAEMON="/usr/sbin/rsyslogd"
|
||||||
|
PIDFILE="/var/run/rsyslogd.pid"
|
||||||
|
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
[ -r /etc/default/rsyslogd ] && . /etc/default/rsyslogd
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_init_msg "Starting system log daemon"
|
||||||
|
start_daemon "$DAEMON" "$RSYSLOGD_OPTIONS" && log_success_msg || \
|
||||||
|
log_failure_msg
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_init_msg "Stopping system log daemon"
|
||||||
|
killproc -p "$PIDFILE" "$DAEMON" && log_success_msg || log_failure_msg
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
log_init_msg "Reloading system log daemon config file"
|
||||||
|
killproc -p "$PIDFILE" "$DAEMON" -HUP && log_success_msg || \
|
||||||
|
log_failure_msg
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
$0 stop
|
||||||
|
sleep 1
|
||||||
|
$0 start
|
||||||
|
;;
|
||||||
|
|
||||||
|
status)
|
||||||
|
status_of_proc -p "$PIDFILE" "$DAEMON"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 [start|stop|reload|restart|status]"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
||||||
24
SNAP/usher
Executable file
24
SNAP/usher
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
preinst)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postinst)
|
||||||
|
if [ ! -f /etc/rsyslog.conf ]; then
|
||||||
|
cp /usr/share/rsyslog/rsyslog.conf /etc/rsyslog.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
/etc/init.d/rsyslog status 2>&1 > /dev/null && /etc/init.d/rsyslog restart
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
prerm)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postrm)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
3
SRC/patches/README
Normal file
3
SRC/patches/README
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
Place any patch files here and preface each with a
|
||||||
|
number indicating the order of execution. Patch
|
||||||
|
files are expected to use a .patch extension.
|
||||||
BIN
SRC/rsyslog-5.10.1.tar.gz
Normal file
BIN
SRC/rsyslog-5.10.1.tar.gz
Normal file
Binary file not shown.
1
SRC/rsyslog-5.10.1.tar.gz.sha256
Normal file
1
SRC/rsyslog-5.10.1.tar.gz.sha256
Normal file
@@ -0,0 +1 @@
|
|||||||
|
2f643a2c613d5b09f242affd32a90cf4fb7a9ac4557dc80f218e6f3e5affb4c8
|
||||||
Reference in New Issue
Block a user