From 1ca1a0a645ed4f1c5632db5e97f229258de6e4da Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Wed, 27 Aug 2014 19:18:31 +0200 Subject: profiles/common: Add a generic way to drop unneeded man pages and to install custom configuration files --- .../syslog-ng-3.4.8/etc/syslog-ng/syslog-ng.conf | 100 +++++++++++++++++++++ .../syslog-ng-3.5.5/etc/syslog-ng/syslog-ng.conf | 100 +++++++++++++++++++++ .../app-editors/vim-core/etc/vim/vimrc.local | 8 ++ 3 files changed, 208 insertions(+) create mode 100644 factory-default/app-admin/syslog-ng-3.4.8/etc/syslog-ng/syslog-ng.conf create mode 100644 factory-default/app-admin/syslog-ng-3.5.5/etc/syslog-ng/syslog-ng.conf create mode 100644 factory-default/app-editors/vim-core/etc/vim/vimrc.local (limited to 'factory-default') diff --git a/factory-default/app-admin/syslog-ng-3.4.8/etc/syslog-ng/syslog-ng.conf b/factory-default/app-admin/syslog-ng-3.4.8/etc/syslog-ng/syslog-ng.conf new file mode 100644 index 00000000..5091896b --- /dev/null +++ b/factory-default/app-admin/syslog-ng-3.4.8/etc/syslog-ng/syslog-ng.conf @@ -0,0 +1,100 @@ +@version: 3.4 + +@module system-source + +options { + flush_lines (0); + time_reopen (10); + log_fifo_size (10000); + use_dns (no); + use_fqdn (no); + create_dirs (yes); + keep_hostname (no); + log_msg_size (2048); + chain_hostnames (no); + + # The default action of syslog-ng is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 1 hour so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats_freq(3600); + + # The default action of syslog-ng is to log a MARK line + # to the file every 20 minutes. That's seems high for most + # people so turn it down to once an hour. Set it to zero + # if you don't want the functionality at all. + mark_freq(3600); +}; + +source s_local { + # To collect warnings, errors and notices from syslog-ng itself + internal(); + + # Automatically collect the system-specific log messages of the host + # on a number of platforms + # + # Linux: + # unix-dgram("/dev/log"); + # file("/proc/kmsg" program-override("kernel") flags(kernel)); + system(); + + # BSD syslog protocol + udp(ip(127.0.0.1)); +}; + +template t_logformat { template("${S_ISODATE}/${R_ISODATE} ${FACILITY}.${PRIORITY} ${HOST} ${MSGHDR}${MSGONLY}\n"); }; + +filter f_auth { facility(auth, authpriv); }; +filter f_cron { facility(cron); }; +filter f_daemon { facility(daemon); }; +filter f_kernel { facility(kern); }; +filter f_mail { facility(mail); }; +filter f_user { facility(user); }; +filter f_emerg { level(emerg); }; +filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); }; + +filter f_firewall { facility(kern) and match("IN=" value("MESSAGE")); }; +filter f_haproxy { program("haproxy"); }; +filter f_apache_access { program("httpd") and facility(local2); }; +filter f_apache_error { program("httpd") and facility(local3); }; +filter f_php_error { program("apache2") and facility(user); }; + +destination d_auth { file("/var/log/auth.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_cron { file("/var/log/cron.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_daemon { file("/var/log/daemon.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_kernel { file("/var/log/kern.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_mail { file("/var/log/mail.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_messages { file("/var/log/messages" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_user { file("/var/log/user.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_debug { file("/var/log/debug.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; + +destination d_firewall { file("/var/log/firewall.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_apache_access { file("/var/log/apache2/access.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_apache_error { file("/var/log/apache2/error.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_haproxy { file("/var/log/haproxy.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; + +destination d_net { + syslog("log.as29.net" + transport(tls) + tls(ca_dir("/etc/ssl/certs") + peer_verify(optional-trusted)) + ); +}; + +log { source(s_local); destination(d_net); }; + +log { source(s_local); filter(f_firewall); destination(d_firewall); flags(final); }; +log { source(s_local); filter(f_haproxy); destination(d_haproxy); flags(final); }; +log { source(s_local); filter(f_apache_access); destination(d_apache_access); flags(final); }; +log { source(s_local); filter(f_apache_error); destination(d_apache_error); flags(final); }; +log { source(s_local); filter(f_php_error); destination(d_apache_error); flags(final); }; + +log { source(s_local); filter(f_auth); destination(d_auth); flags(final); }; +log { source(s_local); filter(f_cron); destination(d_cron); flags(final); }; +log { source(s_local); filter(f_daemon); destination(d_daemon); flags(final); }; +log { source(s_local); filter(f_kernel); destination(d_kernel); flags(final); }; +log { source(s_local); filter(f_mail); destination(d_mail); flags(final); }; +log { source(s_local); filter(f_user); destination(d_user); flags(final); }; +log { source(s_local); filter(f_debug); destination(d_debug); flags(final); }; + +log { source(s_local); destination(d_messages); }; diff --git a/factory-default/app-admin/syslog-ng-3.5.5/etc/syslog-ng/syslog-ng.conf b/factory-default/app-admin/syslog-ng-3.5.5/etc/syslog-ng/syslog-ng.conf new file mode 100644 index 00000000..5e6471ae --- /dev/null +++ b/factory-default/app-admin/syslog-ng-3.5.5/etc/syslog-ng/syslog-ng.conf @@ -0,0 +1,100 @@ +@version: 3.5 + +@module system-source + +options { + flush_lines (0); + time_reopen (10); + log_fifo_size (10000); + use_dns (no); + use_fqdn (no); + create_dirs (yes); + keep_hostname (no); + log_msg_size (2048); + chain_hostnames (no); + + # The default action of syslog-ng is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 1 hour so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats_freq(3600); + + # The default action of syslog-ng is to log a MARK line + # to the file every 20 minutes. That's seems high for most + # people so turn it down to once an hour. Set it to zero + # if you don't want the functionality at all. + mark_freq(3600); +}; + +source s_local { + # To collect warnings, errors and notices from syslog-ng itself + internal(); + + # Automatically collect the system-specific log messages of the host + # on a number of platforms + # + # Linux: + # unix-dgram("/dev/log"); + # file("/proc/kmsg" program-override("kernel") flags(kernel)); + system(); + + # BSD syslog protocol + udp(ip(127.0.0.1)); +}; + +template t_logformat { template("${S_ISODATE}/${R_ISODATE} ${FACILITY}.${PRIORITY} ${HOST} ${MSGHDR}${MSGONLY}\n"); }; + +filter f_auth { facility(auth, authpriv); }; +filter f_cron { facility(cron); }; +filter f_daemon { facility(daemon); }; +filter f_kernel { facility(kern); }; +filter f_mail { facility(mail); }; +filter f_user { facility(user); }; +filter f_emerg { level(emerg); }; +filter f_debug { level(debug) and not facility(auth, authpriv, news, mail); }; + +filter f_firewall { facility(kern) and match("IN=" value("MESSAGE")); }; +filter f_haproxy { program("haproxy"); }; +filter f_apache_access { program("httpd") and facility(local2); }; +filter f_apache_error { program("httpd") and facility(local3); }; +filter f_php_error { program("apache2") and facility(user); }; + +destination d_auth { file("/var/log/auth.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_cron { file("/var/log/cron.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_daemon { file("/var/log/daemon.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_kernel { file("/var/log/kern.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_mail { file("/var/log/mail.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_messages { file("/var/log/messages" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_user { file("/var/log/user.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_debug { file("/var/log/debug.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; + +destination d_firewall { file("/var/log/firewall.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_apache_access { file("/var/log/apache2/access.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_apache_error { file("/var/log/apache2/error.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; +destination d_haproxy { file("/var/log/haproxy.log" template(t_logformat) perm(0640) owner("root") group("wheel")); }; + +destination d_net { + syslog("log.as29.net" + transport(tls) + tls(ca_dir("/etc/ssl/certs") + peer_verify(optional-trusted)) + ); +}; + +log { source(s_local); destination(d_net); }; + +log { source(s_local); filter(f_firewall); destination(d_firewall); flags(final); }; +log { source(s_local); filter(f_haproxy); destination(d_haproxy); flags(final); }; +log { source(s_local); filter(f_apache_access); destination(d_apache_access); flags(final); }; +log { source(s_local); filter(f_apache_error); destination(d_apache_error); flags(final); }; +log { source(s_local); filter(f_php_error); destination(d_apache_error); flags(final); }; + +log { source(s_local); filter(f_auth); destination(d_auth); flags(final); }; +log { source(s_local); filter(f_cron); destination(d_cron); flags(final); }; +log { source(s_local); filter(f_daemon); destination(d_daemon); flags(final); }; +log { source(s_local); filter(f_kernel); destination(d_kernel); flags(final); }; +log { source(s_local); filter(f_mail); destination(d_mail); flags(final); }; +log { source(s_local); filter(f_user); destination(d_user); flags(final); }; +log { source(s_local); filter(f_debug); destination(d_debug); flags(final); }; + +log { source(s_local); destination(d_messages); }; diff --git a/factory-default/app-editors/vim-core/etc/vim/vimrc.local b/factory-default/app-editors/vim-core/etc/vim/vimrc.local new file mode 100644 index 00000000..6b460c04 --- /dev/null +++ b/factory-default/app-editors/vim-core/etc/vim/vimrc.local @@ -0,0 +1,8 @@ +" Number of spaces that a in the file counts for. +set tabstop=8 + +" Do not convert to spaces +set noexpandtab + +set modeline +set pastetoggle= -- cgit v1.2.3