From: gobo72 Date: Tue, 8 Mar 2011 04:39:34 +0000 (+0000) Subject: Terminé conversion fcron.d pour tous les packages. Enlevé mailman X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=56e6ade2828debbb8210ffba1faa2193cb78d05c;p=hvlinux.git Terminé conversion fcron.d pour tous les packages. Enlevé mailman --- diff --git a/config/packages-list b/config/packages-list index cbd0625..7a198cb 100644 --- a/config/packages-list +++ b/config/packages-list @@ -294,7 +294,6 @@ LILYPOND="lilypond-2.12.3" LTSP_UTILS="ltsp-utils-0.25-0" LYNX="lynx2.8.7rel.2" -MAILMAN="mailman-2.1.8" MAKE_PACKAGE="make-3.82" MAN_DB="man-db-2.5.6" MANPAGES="man-pages-3.30" diff --git a/config/sysinfos.amd64 b/config/sysinfos.amd64 index 754f304..7561c1a 100644 --- a/config/sysinfos.amd64 +++ b/config/sysinfos.amd64 @@ -36,11 +36,14 @@ SWAP_PARTITION="/dev/sdb2" HVL_TARGET="x86_64" # Used for setting machine-specific option in CFLAGS and CPPFLAGS -MARCH_FLAGS="-march=k8" +MARCH_FLAGS="-march=k8 -mtune=k8" # Keyboard mapping (example: us) KEYBOARD="us" +# X.org driver (comment to build all drivers) +XORG_VIDEO_DRIVER="nouveau" + # Sound card support: yes or no SOUND_CARD="yes" diff --git a/config/sysinfos.atom b/config/sysinfos.atom index 7060b4a..2e8eb29 100644 --- a/config/sysinfos.atom +++ b/config/sysinfos.atom @@ -36,11 +36,14 @@ BOOT_PARTITION="/dev/sda1" HVL_TARGET="x86" # Used for setting machine-specific option in CFLAGS and CPPFLAGS -MARCH_FLAGS="-march=atom -mssse3 -mfpmath=sse -fomit-frame-pointer" +MARCH_FLAGS="-march=atom -mtune=atom" # Keyboard mapping (example: us) KEYBOARD="us" +# X.org driver (comment to build all drivers) +XORG_VIDEO_DRIVER="intel" + # Sound card support: yes or no SOUND_CARD="yes" diff --git a/stage3/hv-install-1 b/stage3/hv-install-1 index a0f6897..665f23a 100755 --- a/stage3/hv-install-1 +++ b/stage3/hv-install-1 @@ -63,6 +63,7 @@ ipkg ${BIND} "--localstatedir=/var \ ipkg ${IPTABLES} ipkg ${CURL} ipkg ${RSYNC} +ipkg -m noac ${GETDATE} if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then ipkg ${MYSQL} diff --git a/stage3/misc/hvgetdate b/stage3/misc/hvgetdate new file mode 100644 index 0000000..ebefa04 --- /dev/null +++ b/stage3/misc/hvgetdate @@ -0,0 +1,2 @@ +# Run after five minutes of execution the first time, then run every hours +@mail(false),first(5) 6h /usr/local/bin/hvgetdate diff --git a/stage3/packages-update b/stage3/packages-update index 1ce421c..5b0ffe4 100755 --- a/stage3/packages-update +++ b/stage3/packages-update @@ -54,6 +54,7 @@ fpkg -e "tar.gz" -s "$(get_pkg_ver ${BIND})" ${BIND} "http://gd.tuwien.ac.at/inf fpkg ${IPTABLES} "http://www.netfilter.org/projects/iptables/files" fpkg ${CURL} "http://curl.haxx.se/download" fpkg ${RSYNC} "http://samba.org/ftp/rsync/src" +fpkg_hv ${GETDATE} fpkg ${MYSQL} "ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-$(get_pkg_ver_base ${MYSQL})" diff --git a/stage3/pkg/getdate b/stage3/pkg/getdate new file mode 100644 index 0000000..9d6775f --- /dev/null +++ b/stage3/pkg/getdate @@ -0,0 +1,37 @@ +#!/bin/bash + +hvbuild_post() +{ + make installman + + cat > /usr/local/bin/hvgetdate << EOF +#!/bin/sh + +# Time server informations: +# US VA: nist1.aol-va.truetime.com (205.188.185.33) +# Location: AOL Time Warner facility, Dulles, Virginia +# Synchronization: Lockclock Algorithm and ACTS dial-up, GPS-stabilized oscillator for short-term stabilization +# Service Area: Eastern US +# Access Policy: Open access for up to 20 queries per hour (one-day average) from any one address, others by arrangement +# Contact: Judah Levine, jlevine@boulder.nist.gov, 303 492 7785 +NTP_HOST1=205.188.185.33 + +#CA time.nrc.ca (132.246.168.148) +#Location: National Research Council of Canada, Ottawa, Ontario, Canada +#Geographic Coordinates: 45:27N, 75:37W +#Synchronization: NTP V3 secondary (stratum 2), PC/Linux +#Service Area: Canada +#Access Policy: open access +#Contact: time@nrc.ca +#Note: time is an alias and the IP address may change; please use DNS. +NTP_HOST2=132.246.168.148 + +echo -n "Synchronizing kernel time via NTP server:" +getdate -adjust 1 600 \${NTP_HOST1} \${NTP_HOST2} +exit 0 +EOF + chmod 740 /usr/local/bin/hvgetdate + + # Adding fcrontab entry + install -m644 ${SCRDIR}/misc/hvgetdate /etc/fcron/fcron.d +} diff --git a/stage5/bootscripts/pulseaudio b/stage5/bootscripts/pulseaudio index 273b6a5..e0953f6 100755 --- a/stage5/bootscripts/pulseaudio +++ b/stage5/bootscripts/pulseaudio @@ -1,13 +1,12 @@ #!/bin/sh -# fcron +# pulseaudio # Source functions library source /etc/rc.d/init.d/functions log_script_name "$0 $*" - PULSE_SERVER="tcp:via:16002" ESPEAKER="via:16001" diff --git a/stage5/hv-install-1 b/stage5/hv-install-1 index 85bc799..c63ea98 100755 --- a/stage5/hv-install-1 +++ b/stage5/hv-install-1 @@ -191,10 +191,6 @@ if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then ipkg_cust ${MILTER_GREYLIST} cis-milter-greylist fi -# fcron needs sendmail installed. -ipkg_cust ${FCRON} cis-fcron -ipkg_cust ${GETDATE} cis-getdate - if [ "x${INST_TYPE}" = "xserver" -o "x${INST_TYPE}" = "xltsp-server" ]; then ipkg_cust ${CLAMAV} cis-clamav @@ -222,7 +218,7 @@ PERL_MOD_IO_COMPRESS_BASE="IO-Compress-Base-2.024" PERL_MOD_IO_COMPRESS_ZLIB="IO-Compress-Zlib-2.024" PERL_MOD_COMPRESS_RAW_ZLIB="Compress-Raw-Zlib-2.024" - ipkg_cust ${SPAMASSASSIN} cis-spamassassin + ipkg -m pm ${SPAMASSASSIN} ipkg_cust ${UW_IMAP} cis-uw-imap # Apache @@ -230,7 +226,6 @@ PERL_MOD_COMPRESS_RAW_ZLIB="Compress-Raw-Zlib-2.024" ipkg_cust ${PHP} cis-php ipkg_cust ${SQUIRRELMAIL} cis-squirrelmail - ipkg_cust ${MAILMAN} cis-mailman ipkg_ac ${FETCHMAIL} "--with-ssl" ipkg_ac ${MUTT} "--enable-imap --with-ssl" diff --git a/stage5/misc/freshclam b/stage5/misc/freshclam new file mode 100644 index 0000000..debab28 --- /dev/null +++ b/stage5/misc/freshclam @@ -0,0 +1,2 @@ +# Update the Clam AV database every hour +&mail(false) 0 * * * * /usr/bin/freshclam --quiet diff --git a/stage5/misc/sa-learn b/stage5/misc/sa-learn new file mode 100644 index 0000000..9628230 --- /dev/null +++ b/stage5/misc/sa-learn @@ -0,0 +1,2 @@ +# Run SpamAssassin sa-learn every hour + 25 minutes +&mail(false) 25 * * * * /usr/local/bin/mail-if-fail /usr/local/bin/hv-sa-learn diff --git a/stage5/packages-update b/stage5/packages-update index 08b8883..d9c8c48 100755 --- a/stage5/packages-update +++ b/stage5/packages-update @@ -161,10 +161,6 @@ fpkg_hv ${MILTER_SPF} fpkg ${PROCMAIL} "http://www.procmail.org" fpkg ${FETCHMAIL} "http://download.berlios.de/fetchmail" fpkg_sf ${MUTT} - -fpkg -f "${FCRON}.src" ${FCRON} "ftp://ftp.seul.org/pub/fcron" -fpkg_hv ${GETDATE} - fpkg_sf ${CLAMAV} fpkg ${PERL_MOD_HTML_TAGSET} "http://anduin.linuxfromscratch.org/sources/BLFS/svn/perl-modules" @@ -190,8 +186,6 @@ fpkg ${UW_IMAP} "ftp://ftp.cac.washington.edu/imap" fpkg ${HTTPD} "http://www.apache.org/dist/httpd" -fpkg_sf ${MAILMAN} - fpkg ${SAMBA} "ftp://ftp.samba.org/pub/samba/old-versions" fpkg ${PHP} "http://us2.php.net/distributions" diff --git a/stage5/pkg/clamav b/stage5/pkg/clamav index afdaec3..d970163 100644 --- a/stage5/pkg/clamav +++ b/stage5/pkg/clamav @@ -1,40 +1,37 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -groupadd -f clamav -hv_useradd -g clamav -s /bin/false -c Clam-AntiVirus clamav - -cd ${LFS_TMP}/${1} -SENDMAIL="/usr/sbin/sendmail" ./configure \ - --prefix=/usr \ - --sysconfdir=/etc \ - --with-dbdir=/srv/clamav \ - --enable-milter -make -make install -touch /var/log/clamd.log -chmod 600 /var/log/clamd.log -chown clamav /var/log/clamd.log -touch /var/log/freshclam.log -chmod 600 /var/log/freshclam.log -chown clamav /var/log/freshclam.log - -# Addition to /etc/fcron/fcrontab to update virus database -string_add "Update the Clam AV database every hour" /etc/fcron/fcrontab -string_add "&mail(false) 0 * * * * /usr/bin/freshclam --quiet" /etc/fcron/fcrontab - -# Configuration file -cat > /etc/clamd.conf << "EOF" +#!/bin/bash + +hvconfig_pre() +{ + groupadd -f clamav + hv_useradd -g clamav -s /bin/false -c Clam-AntiVirus clamav + + # Is this really necessary? + export SENDMAIL="/usr/sbin/sendmail" + + CONFIGURE_OPTS="\ + ${CONFIGURE_OPTS} \ + --with-dbdir=/srv/clamav \ + --enable-milter" +} + +hvconfig_post() +{ + unset SENDMAIL +} + +hvbuild_post() +{ + install -m644 ${SCRDIR}/misc/freshclam /etc/fcron/fcron.d + + touch /var/log/clamd.log + chmod 600 /var/log/clamd.log + chown clamav /var/log/clamd.log + touch /var/log/freshclam.log + chmod 600 /var/log/freshclam.log + chown clamav /var/log/freshclam.log + + # Configuration file + cat > /etc/clamd.conf << "EOF" # clamd.conf # Configuration file for the Clam AV daemon @@ -148,9 +145,8 @@ MaxRecursion 100 MaxFiles 0 EOF - -# Freshclam configuration file -cat > /etc/freshclam.conf << "EOF" + # Freshclam configuration file + cat > /etc/freshclam.conf << "EOF" # freshclam.conf # Configuration file for Freshclam @@ -194,20 +190,19 @@ DatabaseMirror database.clamav.net #OnErrorExecute command EOF -# Create the DB directory -mkdir -p /srv/clamav -chown clamav:clamav /srv/clamav -chmod 755 /srv/clamav - -# Create the run directory -mkdir -p /var/run/clamav -chown clamav:clamav /var/run/clamav -chmod 755 /var/run/clamav + # Create the DB directory + mkdir -p /srv/clamav + chown clamav:clamav /srv/clamav + chmod 755 /srv/clamav -# Bootscript -install -v -m740 ${SCRDIR}/bootscripts/clamav /etc/rc.d/init.d + # Create the run directory + mkdir -p /var/run/clamav + chown clamav:clamav /var/run/clamav + chmod 755 /var/run/clamav -# script-name start stop -bootscript_add_rc3 clamav 55 35 + # Bootscript + install -v -m740 ${SCRDIR}/bootscripts/clamav /etc/rc.d/init.d -exit $? + # script-name start stop + bootscript_add_rc3 clamav 55 35 +} diff --git a/stage5/pkg/getdate b/stage5/pkg/getdate deleted file mode 100644 index 0c7bebb..0000000 --- a/stage5/pkg/getdate +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -make -make install -make installman - -cat > /usr/local/bin/hvgetdate << EOF -#!/bin/sh - -# Time server informations: -# US VA: nist1.aol-va.truetime.com (205.188.185.33) -# Location: AOL Time Warner facility, Dulles, Virginia -# Synchronization: Lockclock Algorithm and ACTS dial-up, GPS-stabilized oscillator for short-term stabilization -# Service Area: Eastern US -# Access Policy: Open access for up to 20 queries per hour (one-day average) from any one address, others by arrangement -# Contact: Judah Levine, jlevine@boulder.nist.gov, 303 492 7785 -NTP_HOST1=205.188.185.33 - -#CA time.nrc.ca (132.246.168.148) -#Location: National Research Council of Canada, Ottawa, Ontario, Canada -#Geographic Coordinates: 45:27N, 75:37W -#Synchronization: NTP V3 secondary (stratum 2), PC/Linux -#Service Area: Canada -#Access Policy: open access -#Contact: time@nrc.ca -#Note: time is an alias and the IP address may change; please use DNS. -NTP_HOST2=132.246.168.148 - -echo -n "Synchronizing kernel time via NTP server:" -getdate -adjust 1 600 \${NTP_HOST1} \${NTP_HOST2} -exit 0 -EOF -chmod 740 /usr/local/bin/hvgetdate - -# Adding fcron entry -string_add "# Run after five minutes of execution the first time, then run every hours" \ - /etc/fcron/fcrontab -string_add "@mail(false),first(5) 6h /usr/local/bin/hvgetdate" \ - /etc/fcron/fcrontab - -exit $? diff --git a/stage5/pkg/mailman b/stage5/pkg/mailman deleted file mode 100644 index c27c30f..0000000 --- a/stage5/pkg/mailman +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -MMPREFIX="/usr/lib/mailman" - -groupadd -f mailman -hv_useradd -c "GNU-Mailman" -d ${MMPREFIX} -g mailman -s /bin/false mailman - -# Creating installation directory with correct permissions and ownerships. -install --owner=mailman --group=mailman --mode=02775 -d ${MMPREFIX} - -# Problems when using a separate build directory -cd ${LFS_TMP}/${1} -../${1}/configure \ - --prefix=${MMPREFIX} \ - --with-cgi-gid=${APACHE_USER} \ - --with-mail-gid=${SENDMAIL_GID} \ - --sysconfdir=/etc -make -make install -# Checking installation directory permissions -${MMPREFIX}/bin/check_perms -f - -# Configure the web server to enable CGI script permission in the $prefix/cgi-bin -# to run CGI scripts. -string_add "ScriptAlias /mailman/ ${MMPREFIX}/cgi-bin/" /etc/apache/httpd.conf - -# Creating directory for mailman icons with correct permissions and ownerships. -install --owner=mailman --group=mailman --mode=2775 -d /srv/www/icons/mailman -# Copy the Mailman, Python, and GNU logos to a location accessible to the web server. -cp ${MMPREFIX}/icons/*.{jpg,png} /srv/www/icons/mailman -# Specify location of icons directory in mailman configuration file. -string_add "IMAGE_LOGOS = '/icons/mailman/'" ${MMPREFIX}/Mailman/mm_cfg.py - -# Addition to /etc/apache/httpd.conf -# First, checking if section exists -if ! grep "/pipermail/" /etc/apache/httpd.conf 1> /dev/null 2>&1; then - echo "Alias /pipermail/ ${MMPREFIX}/archives/public/" >> /etc/apache/httpd.conf - echo "" >> /etc/apache/httpd.conf - echo " Options FollowSymLinks" >> /etc/apache/httpd.conf - echo " AllowOverride None" >> /etc/apache/httpd.conf - echo " AddDefaultCharset Off" >> /etc/apache/httpd.conf - echo "" >> /etc/apache/httpd.conf -fi - -# Setting default password -/usr/lib/mailman/bin/mmsitepass mailman - -# Adding cron entries -cat > /etc/fcron/mailman.crontab << "EOF" -# -# !mailto(postmaster) -# -# This is needed because the mailman user doesn't have a -# login shell defined in /etc/passwd. -SHELL = /bin/sh -# -# At 8AM every day, mail reminders to admins as to pending requests. -# They are less likely to ignore these reminders if they're mailed -# early in the morning, but of course, this is local time... ;) -0 8 * * * /usr/bin/python -S _MMPREFIX_/cron/checkdbs -# -# At 9AM, send notifications to disabled members that are due to be -# reminded to re-enable their accounts. -0 9 * * * /usr/bin/python -S _MMPREFIX_/cron/disabled -# -# Noon, mail digests for lists that do periodic as well as threshhold delivery. -0 12 * * * /usr/bin/python -S _MMPREFIX_/cron/senddigests -# -# 5 AM on the first of each month, mail out password reminders. -0 5 1 * * /usr/bin/python -S _MMPREFIX_/cron/mailpasswds -# -# Every 5 mins, try to gate news to mail. You can comment this one out -# if you don't want to allow gating, or don't have any going on right now, -# or want to exclusively use a callback strategy instead of polling. -#0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/python -S _MMPREFIX_/cron/gate_news -# -# At 3:27am every night, regenerate the gzip'd archive file. Only -# turn this on if the internal archiver is used and -# GZIP_ARCHIVE_TXT_FILES is false in mm_cfg.py -#27 3 * * * /usr/bin/python -S _MMPREFIX_/cron/nightly_gzip -EOF -sed -i -e "s!_MMPREFIX_!${MMPREFIX}!g" /etc/fcron/mailman.crontab -string_add "fcrontab -u mailman -c /etc/fcron/fcron.conf /etc/fcron/mailman.crontab" \ - /etc/fcron/configure -# Reloading cron configuration -/etc/fcron/configure - -# Bootscript -install -v -m740 ${SCRDIR}/bootscripts/mailman /etc/rc.d/init.d - -# script-name start stop -bootscript_add_rc3 mailman 75 15 - -# URL -string_add "DEFAULT_EMAIL_HOST = '_DOMAIN_'" ${MMPREFIX}/Mailman/mm_cfg.py -string_add "DEFAULT_URL_HOST = 'www._DOMAIN_'" ${MMPREFIX}/Mailman/mm_cfg.py -if test -n ${HTTPD_PORT}; then - string_add "DEFAULT_URL_PATTERN = 'http://%s:_DOMAIN_/mailman'" ${MMPREFIX}/Mailman/mm_cfg.py - string_add "PUBLIC_ARCHIVE_URL = 'http://%(hostname)s:_HTTPD_PORT_/pipermail/%(listname)s'" ${MMPREFIX}/Mailman/mm_cfg.py -fi -string_add "add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)" \ - ${MMPREFIX}/Mailman/mm_cfg.py -sed -i -e "s!_HTTPD_PORT_!${HTTPD_PORT}!g" ${MMPREFIX}/Mailman/mm_cfg.py -sed -i -e "s!_DOMAIN_!${DOMAIN}!g" ${MMPREFIX}/Mailman/mm_cfg.py - -exit $? diff --git a/stage5/pkg/spamassassin b/stage5/pkg/spamassassin index b833c0e..66ddce6 100644 --- a/stage5/pkg/spamassassin +++ b/stage5/pkg/spamassassin @@ -1,25 +1,15 @@ -#!/bin/sh -set -o errexit - -# First argument of this script is the package name - -# Reading system configuration informations, functions and package versions. -source ../sysinfos -source ../functions -source ../packages-list - -# Applying patches (if any) -apply_patches ${1} - -cd ${LFS_TMP}/${1} -perl Makefile.PL -n \ - CONTACT_ADDRESS="postmaster" \ - ENABLE_SSL="no" \ - RUN_NET_TESTS="no" -make -make install - -cat > /usr/local/bin/hv-sa-learn << "EOF" +#!/bin/bash + +hvconfig_pre() +{ + export CONTACT_ADDRESS="postmaster" + export ENABLE_SSL="no" + export RUN_NET_TESTS="no" +} + +hvbuild_post() +{ + cat > /usr/local/bin/hv-sa-learn << "EOF" #!/bin/sh SA_LEARN="/usr/bin/sa-learn" @@ -50,17 +40,14 @@ ${SA_LEARN} ${SA_LEARN_FLAGS} -C /etc/mail/spamassassin --ham /var/mail/ham || exit $? EOF -chmod 755 /usr/local/bin/hv-sa-learn + chmod 755 /usr/local/bin/hv-sa-learn -# Addition to /etc/fcron/fcrontab -string_add "# Run SpamAssassin sa-learn every hour + 25 minutes" /etc/fcron/fcrontab -string_add "&mail(false) 25 * * * * /usr/local/bin/mail-if-fail /usr/local/bin/hv-sa-learn" \ - /etc/fcron/fcrontab + install -m644 ${SCRDIR}/misc/sa-learn /etc/fcron/fcron.d -# Add rule to procmailrc... + # Add rule to procmailrc... -# Put spamassassin databases in /srv -mkdir -v -p /srv/spamassassin -sed -i -e "s!^bayes_path.*!bayes_path /srv/spamassassin/bayes!g" /etc/mail/spamassassin/local.cf - -exit $? + # Put spamassassin databases in /srv + mkdir -v -p /srv/spamassassin + sed -i -e "s!^bayes_path.*!bayes_path /srv/spamassassin/bayes!g" \ + /etc/mail/spamassassin/local.cf +}