diff options
4 files changed, 285 insertions, 0 deletions
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 <Tab> in the file counts for. +set tabstop=8 + +" Do not convert <Tab> to spaces +set noexpandtab + +set modeline +set pastetoggle=<F10> diff --git a/profiles/common/profile.bashrc b/profiles/common/profile.bashrc new file mode 100644 index 00000000..eafdcb86 --- /dev/null +++ b/profiles/common/profile.bashrc @@ -0,0 +1,77 @@ +function __drop-man-nls () { + if ! has noman ${FEATURES} ; then + return 0 + fi + + if [[ ! ${ED} ]] ; then + local ED="${D}" + fi + + if [[ ! -d "${ED}/usr/share/man" ]] ; then + return 0 + fi + + find "${ED}/usr/share/man" \ + -mindepth 1 -maxdepth 1 \ + -type d \ + -name 'man*' -prune -o -print | + sort | + while read ; do + einfo "Removing ${REPLY#${ED}}" + rm -rf "${REPLY}" + done +} + +function __install_own_file () { + if [[ ! ${ED} ]] ; then + local ED="${D}" + fi + + local _PROFILE_PATH="$(portageq get_repo_path / as29 2> /dev/null)" + + if [[ $? != 0 || ! ${_PROFILE_PATH} ]] ; then + return 1 + fi + + local _dir + for _dir in "${PF}" "${P}" "${PN}:${SLOT}" "${PN}" ; do + if [[ -d "${_PROFILE_PATH}/factory-default/${CATEGORY}/${_dir}" ]] ; then + _FACTORY_DIRECTORY="${_PROFILE_PATH}/factory-default/${CATEGORY}/${_dir}" + break + fi + done + + if [[ ! ${_FACTORY_DIRECTORY} ]] ; then + return 0 + fi + + find "${_FACTORY_DIRECTORY}" \ + \( -type f -or -type l \) \ + -printf '%P\n' | + sort | + while read ; do + if [[ -e "${ED}/${REPLY}" ]] ; then + einfo "Store original ${REPLY} to /usr/share/gentoo-factory/${CATEGORY}/${PF}" + install -D -m 0644 \ + "${ED}/${REPLY}" \ + "${ED}/usr/share/gentoo-factory/${CATEGORY}/${PF}/${REPLY}" \ + || die + fi + + einfo "Install ${REPLY} from factory-default" + install -D -m 0644 \ + "${_FACTORY_DIRECTORY}/${REPLY}" \ + "${ED}/${REPLY}" \ + || die + done +} + +function post_src_install () { + __install_own_file +} + +function pre_pkg_preinst () { + __drop-man-nls +} + +# vim: syntax=sh |