summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-04-16 03:47:45 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-04-16 03:47:45 +0000
commitc78a18750fc2b9df6ea94089159f4176a1f9198d (patch)
tree25be357ee503ee66fd716327dd1a9a42d5f8b235 /core
parentad45d1982b97faa9372d99e51daa687c7c09de7d (diff)
Wed Apr 16 03:42:20 UTC 2014
Diffstat (limited to 'core')
-rw-r--r--core/iproute2/PKGBUILD10
-rw-r--r--core/logrotate/PKGBUILD17
-rw-r--r--core/logrotate/logrotate.conf2
-rwxr-xr-xcore/logrotate/logrotate.cron.daily28
-rw-r--r--core/logrotate/logrotate.service9
-rw-r--r--core/logrotate/logrotate.timer7
-rw-r--r--core/man-db/PKGBUILD25
-rwxr-xr-xcore/man-db/man-db.cron.daily39
-rw-r--r--core/man-db/man-db.service11
-rw-r--r--core/man-db/man-db.timer7
-rw-r--r--core/mlocate/PKGBUILD26
-rwxr-xr-xcore/mlocate/updatedb.cron6
-rw-r--r--core/mlocate/updatedb.service9
-rw-r--r--core/mlocate/updatedb.timer7
-rw-r--r--core/shadow/PKGBUILD18
-rwxr-xr-xcore/shadow/shadow.cron.daily6
-rw-r--r--core/shadow/shadow.service10
-rw-r--r--core/shadow/shadow.timer7
-rw-r--r--core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch108
-rw-r--r--core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch38
-rw-r--r--core/systemd/0003-man-reword-Persistent-description.patch50
-rw-r--r--core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch85
-rw-r--r--core/systemd/PKGBUILD28
23 files changed, 432 insertions, 121 deletions
diff --git a/core/iproute2/PKGBUILD b/core/iproute2/PKGBUILD
index 18d1c94c6..a1b26856a 100644
--- a/core/iproute2/PKGBUILD
+++ b/core/iproute2/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 203666 2014-01-13 18:57:04Z foutrelis $
+# $Id: PKGBUILD 210619 2014-04-15 20:43:33Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
pkgname=iproute2
-pkgver=3.12.0
+pkgver=3.14.0
pkgrel=1
pkgdesc="IP Routing Utilities"
arch=('i686' 'x86_64')
@@ -22,7 +22,7 @@ backup=('etc/iproute2/ematch_map' 'etc/iproute2/rt_dsfield' 'etc/iproute2/rt_pro
source=(http://www.kernel.org/pub/linux/utils/net/$pkgname/$pkgname-$pkgver.tar.xz
iproute2-fhs.patch
unwanted-link-help.patch)
-sha1sums=('9397376e5d4dcbb1182745cd58625895fcdb868d'
+sha1sums=('0b7d9db9e17da77a5bd8c2c75f6ddd607449ba3e'
'35b8cf2dc94b73eccad427235c07596146cd6f6c'
'3b1335f4025f657f388fbf4e5a740871e3129c2a')
@@ -40,14 +40,14 @@ prepare() {
}
build() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir/$pkgname-$pkgver"
./configure
make
}
package() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir/$pkgname-$pkgver"
make DESTDIR="$pkgdir" install
diff --git a/core/logrotate/PKGBUILD b/core/logrotate/PKGBUILD
index a6cdd75d3..eeb7f37d3 100644
--- a/core/logrotate/PKGBUILD
+++ b/core/logrotate/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 196792 2013-10-19 09:14:49Z pierre $
+# $Id: PKGBUILD 210561 2014-04-14 22:14:38Z thomas $
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
pkgname=logrotate
pkgver=3.8.7
-pkgrel=1
+pkgrel=3
pkgdesc="Rotates system logs automatically"
arch=('i686' 'x86_64')
url="https://fedorahosted.org/logrotate/"
@@ -15,11 +15,12 @@ backup=('etc/logrotate.conf')
source=("https://fedorahosted.org/releases/l/o/logrotate/logrotate-${pkgver}.tar.gz"
'paths.patch'
'logrotate.conf'
- 'logrotate.cron.daily')
+ logrotate.{timer,service})
md5sums=('99e08503ef24c3e2e3ff74cc5f3be213'
'e76526bcd6fc33c9d921e1cb1eff1ffb'
- '86209d257c8b8bc0ae34d6f6ef057c0f'
- 'dd5fd26724274fd9c827eadad60ff4c5')
+ '94dae4d3eded2fab9ae879533d3680db'
+ '287c2ad9b074cb5478db7692f385827c'
+ '85560be5272ed68a88bb77a0a2293369')
build() {
cd "$srcdir/${pkgname}-${pkgver}"
@@ -41,5 +42,9 @@ package() {
install -dm755 "$pkgdir/etc/logrotate.d"
install -Dm644 "$srcdir/logrotate.conf" "$pkgdir/etc/logrotate.conf"
- install -Dm744 "$srcdir/logrotate.cron.daily" "$pkgdir/etc/cron.daily/logrotate"
+
+ install -D -m644 ${srcdir}/logrotate.timer ${pkgdir}/usr/lib/systemd/system/logrotate.timer
+ install -D -m644 ${srcdir}/logrotate.service ${pkgdir}/usr/lib/systemd/system/logrotate.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../logrotate.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/logrotate.timer
}
diff --git a/core/logrotate/logrotate.conf b/core/logrotate/logrotate.conf
index 9c1927fec..4193a3a7f 100644
--- a/core/logrotate/logrotate.conf
+++ b/core/logrotate/logrotate.conf
@@ -26,7 +26,7 @@ include /etc/logrotate.d
/var/log/wtmp {
monthly
create 0664 root utmp
- minsize 1M
+ minsize 1M
rotate 1
}
diff --git a/core/logrotate/logrotate.cron.daily b/core/logrotate/logrotate.cron.daily
deleted file mode 100755
index 11fe09c52..000000000
--- a/core/logrotate/logrotate.cron.daily
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
-NICE=19
-
-# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
-IONICE_CLASS=2
-
-# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
-IONICE_PRIORITY=7
-
-CMD_LOGROTATE="/usr/bin/logrotate /etc/logrotate.conf"
-
-if [ -x /usr/bin/nice ]; then
- CMD_LOGROTATE="/usr/bin/nice -n ${NICE:-19} ${CMD_LOGROTATE}"
-fi
-
-if [ -x /usr/bin/ionice ]; then
- IONICE_CMD="/usr/bin/ionice -c ${IONICE_CLASS:-2}"
- if [ $IONICE_CLASS -ne 3 ]; then
- IONICE_CMD="${IONICE_CMD} -n ${IONICE_PRIORITY:-7}"
- fi
- CMD_LOGROTATE="${IONICE_CMD} ${CMD_LOGROTATE}"
-fi
-
-${CMD_LOGROTATE}
-
-exit 0
diff --git a/core/logrotate/logrotate.service b/core/logrotate/logrotate.service
new file mode 100644
index 000000000..3a483c3a3
--- /dev/null
+++ b/core/logrotate/logrotate.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Rotate log files
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/logrotate /etc/logrotate.conf
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/logrotate/logrotate.timer b/core/logrotate/logrotate.timer
new file mode 100644
index 000000000..a92ba1ecc
--- /dev/null
+++ b/core/logrotate/logrotate.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily rotation of log files
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/man-db/PKGBUILD b/core/man-db/PKGBUILD
index 89ee632db..bfb1321b1 100644
--- a/core/man-db/PKGBUILD
+++ b/core/man-db/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 204740 2014-01-26 11:28:37Z andyrtr $
+# $Id: PKGBUILD 210567 2014-04-14 22:17:29Z thomas $
# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Contributor: Sergej Pupykin <sergej@aur.archlinux.org>
pkgname=man-db
-pkgver=2.6.6
+pkgver=2.6.7.1
pkgrel=1
pkgdesc="A utility for reading man pages"
arch=('i686' 'x86_64')
@@ -12,18 +12,19 @@ license=('GPL' 'LGPL')
groups=('base')
depends=( 'bash' 'gdbm' 'zlib' 'groff' 'libpipeline' 'less')
optdepends=('gzip')
-backup=('etc/man_db.conf'
- 'etc/cron.daily/man-db')
+backup=('etc/man_db.conf')
conflicts=('man')
provides=('man')
replaces=('man')
install=${pkgname}.install
-source=(http://savannah.nongnu.org/download/man-db/$pkgname-$pkgver.tar.xz{,.sig}
- convert-mans man-db.cron.daily)
-md5sums=('5d65d66191080c144437a6c854e17868'
+source=(http://download-mirror.savannah.gnu.org/releases/man-db/$pkgname-$pkgver.tar.xz{,.sig}
+ convert-mans
+ man-db.{timer,service})
+md5sums=('ce7b697f8e8016a085d9f5975ae6c4fb'
'SKIP'
'2b7662a7d5b33fe91f9f3e034361a2f6'
- '934fd047fecb915038bf4bf844ea609c')
+ 'df6d4f432e3e16c255c785fca1447346'
+ '36fb3f616e42a0e23cf7a4d284e640cd')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
@@ -54,7 +55,9 @@ package() {
# http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/man-db.html
install -D -m755 ${srcdir}/convert-mans ${pkgdir}/usr/bin/convert-mans
- #install whatis cron script
- install -D -m744 ${srcdir}/man-db.cron.daily ${pkgdir}/etc/cron.daily/man-db
+ # install man-db update timer
+ install -D -m644 ${srcdir}/man-db.timer ${pkgdir}/usr/lib/systemd/system/man-db.timer
+ install -D -m644 ${srcdir}/man-db.service ${pkgdir}/usr/lib/systemd/system/man-db.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../man-db.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/man-db.timer
}
-
diff --git a/core/man-db/man-db.cron.daily b/core/man-db/man-db.cron.daily
deleted file mode 100755
index 9b4abd894..000000000
--- a/core/man-db/man-db.cron.daily
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/sh
-
-# nicenesses range from -20 (most favorable scheduling) to 19 (least favorable)
-NICE=19
-
-# 0 for none, 1 for real time, 2 for best-effort, 3 for idle
-IONICE_CLASS=2
-
-# 0-7 (for IONICE_CLASS 1 and 2 only), 0=highest, 7=lowest
-IONICE_PRIORITY=7
-
-UPDATEMANDB="/usr/bin/mandb --quiet"
-
-# Update the "whatis" database
-#/usr/bin/makewhatis -u -w
-
-# taken from Debian
-# man-db cron daily
-set -e
-
-if ! [ -d /var/cache/man ]; then
- # Recover from deletion, per FHS.
- mkdir -p /var/cache/man
- chmod 755 /var/cache/man
-fi
-
-# regenerate man database
-
-if [ -x /usr/bin/nice ]; then
- UPDATEMANDB="/usr/bin/nice -n ${NICE:-19} ${UPDATEMANDB}"
-fi
-
-if [ -x /usr/bin/ionice ]; then
- UPDATEMANDB="/usr/bin/ionice -c ${IONICE_CLASS:-2} -n ${IONICE_PRIORITY:-7} ${UPDATEMANDB}"
-fi
-
-${UPDATEMANDB}
-
-exit 0
diff --git a/core/man-db/man-db.service b/core/man-db/man-db.service
new file mode 100644
index 000000000..be4619c4d
--- /dev/null
+++ b/core/man-db/man-db.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Update man-db cache
+RequiresMountsFor=/var/cache/man
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/mkdir -m 0755 -p /var/cache/man
+ExecStart=/usr/bin/mandb --quiet
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/man-db/man-db.timer b/core/man-db/man-db.timer
new file mode 100644
index 000000000..5d950f0e8
--- /dev/null
+++ b/core/man-db/man-db.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily man-db cache update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/mlocate/PKGBUILD b/core/mlocate/PKGBUILD
index c8d979f9a..b46a7afdb 100644
--- a/core/mlocate/PKGBUILD
+++ b/core/mlocate/PKGBUILD
@@ -1,28 +1,32 @@
-# $Id: PKGBUILD 166971 2012-09-23 22:22:21Z bisson $
+# $Id: PKGBUILD 210562 2014-04-14 22:14:39Z thomas $
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: lydgate
pkgname=mlocate
pkgver=0.26
-pkgrel=1
+pkgrel=3
pkgdesc='Merging locate/updatedb implementation'
url='https://fedorahosted.org/mlocate/'
arch=('i686' 'x86_64')
license=('GPL')
-backup=('etc/updatedb.conf'
- 'etc/cron.daily/updatedb')
+backup=('etc/updatedb.conf')
+depends=('glibc')
source=("https://fedorahosted.org/releases/m/l/mlocate/mlocate-${pkgver}.tar.xz"
'updatedb.conf'
- 'updatedb.cron')
+ updatedb.{timer,service})
sha1sums=('c6e6d81b25359c51c545f4b8ba0f3b469227fcbc'
'0150379149bf9d714bc81332d775fc273e7e3535'
- '8301e6277d27db539af6cf4bc243e8e247bffc2e')
+ '2f3a94994ece62aeb286315a6fa5e9e03203706a'
+ 'f2f71aefbf677fb1719b5c67c757cde34e3210d7')
-build() {
+prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
-
sed -i '/^groupname /s/mlocate/locate/' Makefile.in
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib
make
}
@@ -45,5 +49,9 @@ package() {
install -dm750 -g21 "${pkgdir}/var/lib/locate"
install -Dm644 ../updatedb.conf "${pkgdir}/etc/updatedb.conf"
- install -Dm744 ../updatedb.cron "${pkgdir}/etc/cron.daily/updatedb"
+
+ install -D -m644 ${srcdir}/updatedb.timer ${pkgdir}/usr/lib/systemd/system/updatedb.timer
+ install -D -m644 ${srcdir}/updatedb.service ${pkgdir}/usr/lib/systemd/system/updatedb.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../updatedb.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/updatedb.timer
}
diff --git a/core/mlocate/updatedb.cron b/core/mlocate/updatedb.cron
deleted file mode 100755
index 431cb533e..000000000
--- a/core/mlocate/updatedb.cron
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-NICE='nice -n 19'
-IONICE='ionice -c 2 -n 7'
-
-exec ${IONICE} ${NICE} updatedb -f proc
diff --git a/core/mlocate/updatedb.service b/core/mlocate/updatedb.service
new file mode 100644
index 000000000..f02edace9
--- /dev/null
+++ b/core/mlocate/updatedb.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Update locate database
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/updatedb
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/mlocate/updatedb.timer b/core/mlocate/updatedb.timer
new file mode 100644
index 000000000..c8ca33f35
--- /dev/null
+++ b/core/mlocate/updatedb.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily locate database update
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/shadow/PKGBUILD b/core/shadow/PKGBUILD
index 0ca6f5433..8134224ec 100644
--- a/core/shadow/PKGBUILD
+++ b/core/shadow/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 197840 2013-10-30 11:06:53Z allan $
+# $Id: PKGBUILD 210563 2014-04-14 22:14:41Z thomas $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Maintainer: Aaron Griffin <aaron@archlinux.org>
pkgname=shadow
pkgver=4.1.5.1
-pkgrel=7
+pkgrel=9
pkgdesc="Password and account management tool suite with support for shadow files and PAM"
arch=('i686' 'x86_64')
url='http://pkg-shadow.alioth.debian.org/'
@@ -18,7 +18,7 @@ backup=(etc/login.defs
etc/default/useradd)
options=(strip debug)
install='shadow.install'
-source=("http://pkg-shadow.alioth.debian.org/releases/$pkgname-$pkgver.tar.bz2"{,.sig}
+source=("ftp://ftp.archlinux.org/other/packages/$pkgname/$pkgname-$pkgver.tar.bz2"{,.sig}
LICENSE
chgpasswd
chpasswd
@@ -26,7 +26,7 @@ source=("http://pkg-shadow.alioth.debian.org/releases/$pkgname-$pkgver.tar.bz2"{
login.defs
newusers
passwd
- shadow.cron.daily
+ shadow.{timer,service}
useradd.defaults
xstrdup.patch
shadow-strncpy-usage.patch
@@ -40,7 +40,8 @@ sha1sums=('81f38720b953ef9c2c100c43d02dfe19cafd6c30'
'e92045fb75e0c21a3f294a00de0bd2cd252e9463'
'12427b1ca92a9b85ca8202239f0d9f50198b818f'
'611be25d91c3f8f307c7fe2485d5f781e5dee75f'
- '98f4919014b1a9eb9f01ca7731e04b1d973cedd5'
+ 'a154a94b47a3d0c6c287253b98c0d10b861226d0'
+ 'e40fc20894e69a07fb0070b41f567d0c27133720'
'9ae93de5987dd0ae428f0cc1a5a5a5cd53583f19'
'6010fffeed1fc6673ad9875492e1193b1a847b53'
'21e12966a6befb25ec123b403cd9b5c492fe5b16'
@@ -87,8 +88,11 @@ package() {
# useradd defaults
install -Dm644 "$srcdir/useradd.defaults" "$pkgdir/etc/default/useradd"
- # cron job
- install -Dm744 "$srcdir/shadow.cron.daily" "$pkgdir/etc/cron.daily/shadow"
+ # systemd timer
+ install -D -m644 ${srcdir}/shadow.timer ${pkgdir}/usr/lib/systemd/system/shadow.timer
+ install -D -m644 ${srcdir}/shadow.service ${pkgdir}/usr/lib/systemd/system/shadow.service
+ install -d -m755 ${pkgdir}/usr/lib/systemd/system/multi-user.target.wants
+ ln -s ../shadow.timer ${pkgdir}//usr/lib/systemd/system/multi-user.target.wants/shadow.timer
# login.defs
install -Dm644 "$srcdir/login.defs" "$pkgdir/etc/login.defs"
diff --git a/core/shadow/shadow.cron.daily b/core/shadow/shadow.cron.daily
deleted file mode 100755
index 1373ecde9..000000000
--- a/core/shadow/shadow.cron.daily
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-
-# Verify integrity of password and group files
-/usr/bin/pwck -r
-/usr/bin/grpck -r
-
diff --git a/core/shadow/shadow.service b/core/shadow/shadow.service
new file mode 100644
index 000000000..5c1c84583
--- /dev/null
+++ b/core/shadow/shadow.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Verify integrity of password and group files
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/pwck -r
+ExecStart=/usr/bin/grpck -r
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
diff --git a/core/shadow/shadow.timer b/core/shadow/shadow.timer
new file mode 100644
index 000000000..9cc6baaa9
--- /dev/null
+++ b/core/shadow/shadow.timer
@@ -0,0 +1,7 @@
+[Unit]
+Description=Daily verification of password and group files
+
+[Timer]
+OnCalendar=daily
+AccuracySec=12h
+Persistent=true
diff --git a/core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch b/core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch
new file mode 100644
index 000000000..c7525066e
--- /dev/null
+++ b/core/systemd/0001-backlight-do-nothing-if-max_brightness-is-0.patch
@@ -0,0 +1,108 @@
+From eab2144e7ef737e532a241bcfae432395ae8f22d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
+Date: Thu, 27 Mar 2014 23:41:59 +0100
+Subject: [PATCH 1/4] backlight: do nothing if max_brightness is 0
+
+On virtually any newer Asus mainboard, the eeepc-wmi driver is loaded.
+It exposes a backlight device despite the lack of any physical backlight
+devices. This fake backlight device has max_brightness set to 0. Since
+the introduction of the clamp_brightness function, systemd-backlight
+tries to write '1' to brightness and fails.
+
+This patch changes systemd-backlight to exit gracefully when
+max_brightness is 0 before performing any action. This affects
+both the load and save actions.
+---
+ src/backlight/backlight.c | 44 ++++++++++++++++++++++++++++++--------------
+ 1 file changed, 30 insertions(+), 14 deletions(-)
+
+diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c
+index abf8bcf..ce0385b 100644
+--- a/src/backlight/backlight.c
++++ b/src/backlight/backlight.c
+@@ -192,30 +192,37 @@ static bool validate_device(struct udev *udev, struct udev_device *device) {
+ return true;
+ }
+
+-/* Some systems turn the backlight all the way off at the lowest levels.
+- * clamp_brightness clamps the saved brightness to at least 1 or 5% of
+- * max_brightness. This avoids preserving an unreadably dim screen, which
+- * would otherwise force the user to disable state restoration. */
+-static void clamp_brightness(struct udev_device *device, char **value) {
++static unsigned get_max_brightness(struct udev_device *device) {
+ int r;
+ const char *max_brightness_str;
+- unsigned brightness, max_brightness, new_brightness;
++ unsigned max_brightness;
+
+ max_brightness_str = udev_device_get_sysattr_value(device, "max_brightness");
+ if (!max_brightness_str) {
+- log_warning("Failed to read max_brightness attribute; not checking saved brightness");
+- return;
++ log_warning("Failed to read max_brightness attribute");
++ return 0;
+ }
+
+- r = safe_atou(*value, &brightness);
++ r = safe_atou(max_brightness_str, &max_brightness);
+ if (r < 0) {
+- log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r));
+- return;
++ log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
++ return 0;
+ }
+
+- r = safe_atou(max_brightness_str, &max_brightness);
++ return max_brightness;
++}
++
++/* Some systems turn the backlight all the way off at the lowest levels.
++ * clamp_brightness clamps the saved brightness to at least 1 or 5% of
++ * max_brightness. This avoids preserving an unreadably dim screen, which
++ * would otherwise force the user to disable state restoration. */
++static void clamp_brightness(struct udev_device *device, char **value, unsigned max_brightness) {
++ int r;
++ unsigned brightness, new_brightness;
++
++ r = safe_atou(*value, &brightness);
+ if (r < 0) {
+- log_warning("Failed to parse max_brightness \"%s\": %s", max_brightness_str, strerror(-r));
++ log_warning("Failed to parse brightness \"%s\": %s", *value, strerror(-r));
+ return;
+ }
+
+@@ -239,6 +246,7 @@ int main(int argc, char *argv[]) {
+ _cleanup_udev_device_unref_ struct udev_device *device = NULL;
+ _cleanup_free_ char *saved = NULL, *ss = NULL, *escaped_ss = NULL, *escaped_sysname = NULL, *escaped_path_id = NULL;
+ const char *sysname, *path_id;
++ unsigned max_brightness;
+ int r;
+
+ if (argc != 3) {
+@@ -294,6 +302,14 @@ int main(int argc, char *argv[]) {
+ return EXIT_FAILURE;
+ }
+
++ /* If max_brightness is 0, then there is no actual backlight
++ * device. This happens on desktops with Asus mainboards
++ * that load the eeepc-wmi module.
++ */
++ max_brightness = get_max_brightness(device);
++ if (max_brightness == 0)
++ return EXIT_SUCCESS;
++
+ escaped_ss = cescape(ss);
+ if (!escaped_ss) {
+ log_oom();
+@@ -348,7 +364,7 @@ int main(int argc, char *argv[]) {
+ return EXIT_FAILURE;
+ }
+
+- clamp_brightness(device, &value);
++ clamp_brightness(device, &value, max_brightness);
+
+ r = udev_device_set_sysattr_value(device, "brightness", value);
+ if (r < 0) {
+--
+1.9.2
+
diff --git a/core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch b/core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch
new file mode 100644
index 000000000..c99756691
--- /dev/null
+++ b/core/systemd/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch
@@ -0,0 +1,38 @@
+From cad77d38e7e0544f719812af2bf5dc97d71a6f02 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Sat, 5 Apr 2014 13:59:01 -0400
+Subject: [PATCH 2/4] reduce the amount of messages logged to /dev/kmsg when
+ "debug" is specified
+
+---
+ src/core/main.c | 9 ++-------
+ 1 file changed, 2 insertions(+), 7 deletions(-)
+
+diff --git a/src/core/main.c b/src/core/main.c
+index 41605ee..feabead 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -412,18 +412,13 @@ static int parse_proc_cmdline_item(const char *key, const char *value) {
+ }
+
+ } else if (streq(key, "quiet") && !value) {
+-
+ if (arg_show_status == _SHOW_STATUS_UNSET)
+ arg_show_status = SHOW_STATUS_AUTO;
+
+ } else if (streq(key, "debug") && !value) {
+-
+- /* Log to kmsg, the journal socket will fill up before the
+- * journal is started and tools running during that time
+- * will block with every log message for for 60 seconds,
+- * before they give up. */
+ log_set_max_level(LOG_DEBUG);
+- log_set_target(detect_container(NULL) > 0 ? LOG_TARGET_CONSOLE : LOG_TARGET_KMSG);
++ if (detect_container(NULL) > 0)
++ log_set_target(LOG_TARGET_CONSOLE);
+
+ } else if (!in_initrd() && !value) {
+ unsigned i;
+--
+1.9.2
+
diff --git a/core/systemd/0003-man-reword-Persistent-description.patch b/core/systemd/0003-man-reword-Persistent-description.patch
new file mode 100644
index 000000000..feb394da8
--- /dev/null
+++ b/core/systemd/0003-man-reword-Persistent-description.patch
@@ -0,0 +1,50 @@
+From 1d83dac5adba9e1db5b058436e23ba7ac403d652 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
+Date: Mon, 7 Apr 2014 20:58:37 -0400
+Subject: [PATCH 3/4] man: reword Persistent= description
+
+I think it is easier to grok this way.
+---
+ man/systemd.timer.xml | 26 ++++++++++++--------------
+ 1 file changed, 12 insertions(+), 14 deletions(-)
+
+diff --git a/man/systemd.timer.xml b/man/systemd.timer.xml
+index 58eaab0..44f55e0 100644
+--- a/man/systemd.timer.xml
++++ b/man/systemd.timer.xml
+@@ -255,20 +255,18 @@
+ <term><varname>Persistent=</varname></term>
+
+ <listitem><para>Takes a boolean
+- argument. If true the service unit is
+- immediately triggered when the timer
+- unit is activated and the timer
+- elapsed at least once since the last
+- time the service unit has been
+- triggered by the timer unit. The time
+- when the service unit was last
+- triggered is stored on disk. This is
+- useful to catch up for missed timers
+- when a machine is shutdown temporarily
+- and then is powered up again. Note
+- that this setting only has an effect
+- on timers configured with
+- <varname>OnCalendar=</varname>.
++ argument. If true, the time when the
++ service unit was last triggered is
++ stored on disk. When the timer is
++ activated, the service unit is
++ triggered immediately if it would have
++ been triggered at least once during
++ the time when the timer was inactive.
++ This is useful to catch up on missed
++ runs of the service when the machine
++ was off. Note that this setting only
++ has an effect on timers configured
++ with <varname>OnCalendar=</varname>.
+ </para></listitem>
+ </varlistentry>
+
+--
+1.9.2
+
diff --git a/core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch b/core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch
new file mode 100644
index 000000000..741176e62
--- /dev/null
+++ b/core/systemd/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch
@@ -0,0 +1,85 @@
+From 7cee0cf1ecc18ea8a016bef48c79f7ea4fd4195a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20B=C3=A4chler?= <thomas@archlinux.org>
+Date: Wed, 2 Apr 2014 20:18:44 +0200
+Subject: [PATCH 4/4] core: Make sure a stamp file exists for all
+ Persistent=true timers
+
+If a persistent timer has no stamp file yet, it behaves just like a normal
+timer until it runs for the first time. If the system is always shut down
+while the timer is supposed to run, a stamp file is never created and
+Peristent=true has no effect.
+
+This patch fixes this by creating a stamp file with the current time
+when the timer is first started.
+---
+ src/core/timer.c | 40 ++++++++++++++++++++++++----------------
+ 1 file changed, 24 insertions(+), 16 deletions(-)
+
+diff --git a/src/core/timer.c b/src/core/timer.c
+index 6c85304..b0a9023 100644
+--- a/src/core/timer.c
++++ b/src/core/timer.c
+@@ -111,6 +111,23 @@ static int timer_add_default_dependencies(Timer *t) {
+ return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, NULL, true);
+ }
+
++static void update_stampfile(Timer *t, usec_t timestamp) {
++ _cleanup_close_ int fd = -1;
++
++ mkdir_parents_label(t->stamp_path, 0755);
++
++ /* Update the file atime + mtime, if we can */
++ fd = open(t->stamp_path, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
++ if (fd >= 0) {
++ struct timespec ts[2];
++
++ timespec_store(&ts[0], timestamp);
++ ts[1] = ts[0];
++
++ futimens(fd, ts);
++ }
++}
++
+ static int timer_setup_persistent(Timer *t) {
+ int r;
+
+@@ -496,22 +513,8 @@ static void timer_enter_running(Timer *t) {
+
+ dual_timestamp_get(&t->last_trigger);
+
+- if (t->stamp_path) {
+- _cleanup_close_ int fd = -1;
+-
+- mkdir_parents_label(t->stamp_path, 0755);
+-
+- /* Update the file atime + mtime, if we can */
+- fd = open(t->stamp_path, O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
+- if (fd >= 0) {
+- struct timespec ts[2];
+-
+- timespec_store(&ts[0], t->last_trigger.realtime);
+- ts[1] = ts[0];
+-
+- futimens(fd, ts);
+- }
+- }
++ if (t->stamp_path)
++ update_stampfile(t, t->last_trigger.realtime);
+
+ timer_set_state(t, TIMER_RUNNING);
+ return;
+@@ -539,6 +542,11 @@ static int timer_start(Unit *u) {
+
+ if (stat(t->stamp_path, &st) >= 0)
+ t->last_trigger.realtime = timespec_load(&st.st_atim);
++ else if (errno == ENOENT)
++ /* The timer has never run before,
++ * make sure a stamp file exists.
++ */
++ update_stampfile(t, now(CLOCK_REALTIME));
+ }
+
+ t->result = TIMER_SUCCESS;
+--
+1.9.2
+
diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD
index b9b1befb2..966b70596 100644
--- a/core/systemd/PKGBUILD
+++ b/core/systemd/PKGBUILD
@@ -4,7 +4,7 @@
pkgbase=systemd
pkgname=('systemd' 'libsystemd' 'systemd-sysvcompat')
pkgver=212
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
makedepends=('acl' 'cryptsetup' 'docbook-xsl' 'gobject-introspection' 'gperf'
@@ -14,11 +14,33 @@ options=('strip' 'debug')
source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'initcpio-hook-udev'
'initcpio-install-systemd'
- 'initcpio-install-udev')
+ 'initcpio-install-udev'
+ '0001-backlight-do-nothing-if-max_brightness-is-0.patch'
+ '0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch'
+ '0003-man-reword-Persistent-description.patch'
+ '0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch'
+ )
md5sums=('257a75fff826ff91cb1ce567091cf270'
'29245f7a240bfba66e2b1783b63b6b40'
'66cca7318e13eaf37c5b7db2efa69846'
- 'bde43090d4ac0ef048e3eaee8202a407')
+ 'bde43090d4ac0ef048e3eaee8202a407'
+ '4b5d61e30b423ff5a0ec38037146b61b'
+ 'd9518fc6cef154ebc76555b0fb9d4412'
+ 'c35c7f55d41c0a8b8725785b49ce6440'
+ '2e7aee18c749727c8bbc8db86f17edc0')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=3cadce7d33e263ec7a6a83c00c11144930258b22
+ patch -p1 -i "$srcdir/0001-backlight-do-nothing-if-max_brightness-is-0.patch"
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=b2103dccb354de3f38c49c14ccb637bdf665e40f
+ patch -p1 -i "$srcdir/0002-reduce-the-amount-of-messages-logged-to-dev-kmsg-whe.patch"
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=de41590a9bb370de92e4a1ed933bc6e38abb6787
+ patch -p1 -i "$srcdir/0003-man-reword-Persistent-description.patch"
+ # http://cgit.freedesktop.org/systemd/systemd/commit/?id=472fc28fdade525e700ebf4b25d026a8c907796d
+ patch -p1 -i "$srcdir/0004-core-Make-sure-a-stamp-file-exists-for-all-Persisten.patch"
+}
build() {
cd "$pkgname-$pkgver"