From d1bdbe15038a15bc69f44ee92fc4c0cf249708e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Sat, 7 Sep 2013 04:46:54 +0200 Subject: [PATCH] base-seblu: Mutiple updates - add lz4, diffutils, sed - Setup basic seblu.net config files --- PKGBUILD | 164 +++++++++++++++++++++++---------------------- base-seblu.install | 53 +++++++++++++-- 2 files changed, 131 insertions(+), 86 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index baf0885..d87d70f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Sébastien Luttringer pkgname=base-seblu -pkgver=2013.07.05 +pkgver=2013.09.06 pkgrel=1 pkgdesc='Provide depends on minimal seblu hosts packages' arch=('any') @@ -11,86 +11,92 @@ install=$pkgname.install package() { depends=( -archutils-git -arptables -bash -bash-completion -bridge-utils -conntrack-tools -dmidecode -dnsutils -dstat -ebtables -ethtool -fcron -ferm -figlet -git -glances -gptfdisk -hddtemp -hdparm -hping -htop -iftop -iftop -ipcalc -iperf -iperf -ipset -iptraf-ng -iptstate -ipython -iw -links -lm_sensors -lrzsz -lshw -lsof -lsscsi -ltrace -most -mtr -munin-node -ndisc6 -netperf -nfacct -nload -nmap -ntp -numactl -openssh -openvpn -pacman-contrib -parted -perl-rename -pv -pwgen -rsync -rsync -rxvt-unicode-terminfo -screen -sdparm -smartmontools -strace -stress -sudo -systemd-sysvcompat -tcpdump -traceroute -tree -vi-killer -vim -whois -wget -zsh + archutils-git + arptables + bash + bash-completion + bridge-utils + conntrack-tools + diffutils + dmidecode + dnsutils + dstat + ebtables + ethtool + fcron + ferm + figlet + git + glances + gptfdisk + hddtemp + hdparm + hping + htop + iftop + iftop + ipcalc + iperf + iperf + ipset + iptraf-ng + iptstate + ipython + iw + links + lm_sensors + lrzsz + lshw + lsof + lsscsi + ltrace + lz4 + most + mtr + munin-node + ndisc6 + netperf + nfacct + nload + nmap + ntp + numactl + openssh + openvpn + pacman-contrib + parted + perl-rename + pv + pwgen + rsync + rsync + rxvt-unicode-terminfo + screen + sdparm + sed + smartmontools + strace + stress + sudo + systemd-sysvcompat + tcpdump + traceroute + tree + vi-killer + vim + watchdog + whois + wget + zsh + ) + optdepends=( ) conflicts=( -consolekit -initscripts -systemd-arch-units -sysvinit -tcp_wrappers + consolekit + initscripts + systemd-arch-units + sysvinit + tcp_wrappers ) install -dm755 "$pkgdir"/{usr/bin,etc/sysctl.d} # perl-rename shortcut diff --git a/base-seblu.install b/base-seblu.install index e8e27e5..df6ae84 100644 --- a/base-seblu.install +++ b/base-seblu.install @@ -1,16 +1,55 @@ # vim:set ts=2 sw=2 et: -p() { - echo - for i in $(seq 1 ${#1}); do echo -n '='; done; echo - echo "$1" - for i in $(seq 1 ${#1}); do echo -n '='; done; echo +# $1: the string to be +# $2: the file to update +check_file() { + if [[ ! -e "$2" ]] || ! diff "$2" <(printf "%s" "$1") >/dev/null; then + printf "%s" "$1" > "$2" + echo "** file $2 updated" + fi +} + +# $1: the link target +# $2: the link himself +check_link() { + _ct="$(readlink "$2")" + if (( $? != 0 )) || [[ "$_ct" != "$1" ]]; then + ln -vsnf "$1" "$2" + fi } # arg 1: the new package version post_install() { - _out="$(pacman -Qdt)" && p 'Unused dependencies' && echo "$_out" - _out="$(pacman -Qm)" && p 'Local-only packages' && echo "$_out" + # motd + check_file "" /etc/motd + + # issue + rm -f /etc/issue.net + check_file "\n (\s \r) on \l"$'\n' /etc/issue + + # vconsole + check_file 'KEYMAP=fr'$'\n' /etc/vconsole.conf + + # localtime + check_link '/usr/share/zoneinfo/Europe/Paris' /etc/localtime + + # locale.conf + check_file 'LANG=fr_FR.UTF-8'$'\n''LC_MESSAGES=en_US.UTF8'$'\n' /etc/locale.conf + + # locales + _md5="$(md5sum /etc/locale.gen)" + sed -ri 's/#(en_US|fr_FR)/\1/' /etc/locale.gen + [[ "$_md5" != "$(md5sum /etc/locale.gen)" ]] && locale-gen + + # check full hostname + grep -q \. /etc/hostname || echo '!! /etc/hostname without FQDN' + + # sbin must be a symlink + [[ -L /usr/local/sbin ]] || echo '!! /usr/local/sbin is not a symlink' + + # display depency info + echo '-- Unused dependencies:'; pacman -Qdt + echo '-- Local-only packages'; pacman -Qm true } -- GitLab