[arch-commits] Commit in systemd/trunk (5 files)
Dave Reisner
dreisner at archlinux.org
Mon Jun 4 14:01:00 UTC 2012
Date: Monday, June 4, 2012 @ 10:00:59
Author: dreisner
Revision: 160711
upgpkg: systemd 184-3
- backport bugfixes
- https://bbs.archlinux.org/viewtopic.php?pid=1110249#p1110249
- FS#30108
- FS#30130
Added:
systemd/trunk/0001-0002-avoid-mangling-fstab-source-paths.patch
systemd/trunk/0001-unit-name-never-create-a-unit-name-with-a-leading.patch
Modified:
systemd/trunk/PKGBUILD
systemd/trunk/initcpio-hook-udev
Deleted:
systemd/trunk/os-release
--------------------------------------------------------------+
0001-0002-avoid-mangling-fstab-source-paths.patch | 80 ++++++++++
0001-unit-name-never-create-a-unit-name-with-a-leading.patch | 77 +++++++++
PKGBUILD | 32 ++--
initcpio-hook-udev | 2
os-release | 5
5 files changed, 181 insertions(+), 15 deletions(-)
Added: 0001-0002-avoid-mangling-fstab-source-paths.patch
===================================================================
--- 0001-0002-avoid-mangling-fstab-source-paths.patch (rev 0)
+++ 0001-0002-avoid-mangling-fstab-source-paths.patch 2012-06-04 14:00:59 UTC (rev 160711)
@@ -0,0 +1,80 @@
+From 2b71016a3c3d4c088e8edd170fe6eb8431fd71fa Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay at vrfy.org>
+Date: Mon, 4 Jun 2012 12:52:14 +0200
+Subject: [PATCH] fstab-generator: avoid mangling of non-path mount source and
+ dest
+
+This can invalidate otherwise valid source paths with trailing slashes,
+such as "host:/" in the case of a network mount.
+
+Based on a patch from Dave Reisner <dreisner at archlinux.org>, which
+removed the slash mangling entirely.
+
+Changed it to match on the leading slash to exclude non-path values.
+---
+ src/fstab-generator/fstab-generator.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
+index 8419a0c..0746724 100644
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -470,10 +470,10 @@ static int parse_fstab(void) {
+ goto finish;
+ }
+
+- if (is_path(what))
++ if (path_is_absolute(what))
+ path_kill_slashes(what);
+
+- if (is_path(where))
++ if (path_is_absolute(where))
+ path_kill_slashes(where);
+
+ log_debug("Found entry what=%s where=%s type=%s", what, where, me->mnt_type);
+--
+1.7.10.3
+
+From ec6ceb18663940efb1963704923430be0e83f1f7 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay at vrfy.org>
+Date: Mon, 4 Jun 2012 15:21:05 +0200
+Subject: [PATCH] fstab-generator: avoid mangling of mount source string
+
+This is a valid source entry in /etc/fstab:
+ //192.168.6.10/data /data cifs noperm,auto
+
+On Mon, Jun 4, 2012 at 2:04 PM, Dave Reisner <d at falconindy.com> wrote:
+> On Mon, Jun 04, 2012 at 12:57:47PM +0200, Kay Sievers wrote:
+>>
+>> Changed it to use:
+>> path_is_absolute()
+>> instead of:
+>> is_path(),
+>> so that we still sanitize the input we might match against.
+>>
+>> Let me know, if you think that could still cause any problems?
+
+> Yes, this will still break CIFS shares.
+---
+ src/fstab-generator/fstab-generator.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
+index 0746724..d9ba3e3 100644
+--- a/src/fstab-generator/fstab-generator.c
++++ b/src/fstab-generator/fstab-generator.c
+@@ -470,10 +470,7 @@ static int parse_fstab(void) {
+ goto finish;
+ }
+
+- if (path_is_absolute(what))
+- path_kill_slashes(what);
+-
+- if (path_is_absolute(where))
++ if (is_path(where))
+ path_kill_slashes(where);
+
+ log_debug("Found entry what=%s where=%s type=%s", what, where, me->mnt_type);
+--
+1.7.10.3
+
Added: 0001-unit-name-never-create-a-unit-name-with-a-leading.patch
===================================================================
--- 0001-unit-name-never-create-a-unit-name-with-a-leading.patch (rev 0)
+++ 0001-unit-name-never-create-a-unit-name-with-a-leading.patch 2012-06-04 14:00:59 UTC (rev 160711)
@@ -0,0 +1,77 @@
+From 4b7126538c25268c79ff10d166920934f149a329 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay at vrfy.org>
+Date: Mon, 4 Jun 2012 14:57:24 +0200
+Subject: [PATCH] unit-name: never create a unit name with a leading '.'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Supposed to prevent creating unit files like:
+ ├── dev-sda1.device.wants
+ │ └── .dot.mount -> /run/systemd/generator/.dot.mount
+ ├── .dot.mount
+from:
+ # cat /etc/fstab
+ /dev/sda1 /.dot vfat ro 1 3
+
+which we later skip reading because of the leading '.'.
+---
+ src/shared/unit-name.c | 29 ++++++++++++++++++++---------
+ 1 file changed, 20 insertions(+), 9 deletions(-)
+
+diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c
+index e0a18d1..1440d2f 100644
+--- a/src/shared/unit-name.c
++++ b/src/shared/unit-name.c
+@@ -179,19 +179,30 @@ char *unit_name_build(const char *prefix, const char *instance, const char *suff
+ return join(prefix, "@", instance, suffix, NULL);
+ }
+
+-static char* do_escape(const char *f, char *t) {
++static char *do_escape_char(char c, char *t) {
++ *(t++) = '\\';
++ *(t++) = 'x';
++ *(t++) = hexchar(c >> 4);
++ *(t++) = hexchar(c);
++ return t;
++}
++
++static char *do_escape(const char *f, char *t) {
+ assert(f);
+ assert(t);
+
++ /* do not create units with a leading '.', like for "/.dotdir" mount points */
++ if (*f == '.') {
++ t = do_escape_char(*f, t);
++ f++;
++ }
++
+ for (; *f; f++) {
+ if (*f == '/')
+ *(t++) = '-';
+- else if (*f == '-' || *f == '\\' || !strchr(VALID_CHARS, *f)) {
+- *(t++) = '\\';
+- *(t++) = 'x';
+- *(t++) = hexchar(*f >> 4);
+- *(t++) = hexchar(*f);
+- } else
++ else if (*f == '-' || *f == '\\' || !strchr(VALID_CHARS, *f))
++ t = do_escape_char(*f, t);
++ else
+ *(t++) = *f;
+ }
+
+@@ -209,8 +220,8 @@ char *unit_name_build_escape(const char *prefix, const char *instance, const cha
+ * suffix and makes a nice string suitable as unit name of it,
+ * escaping all weird chars on the way.
+ *
+- * / becomes ., and all chars not allowed in a unit name get
+- * escaped as \xFF, including \ and ., of course. This
++ * / becomes -, and all chars not allowed in a unit name get
++ * escaped as \xFF, including \ and -, of course. This
+ * escaping is hence reversible.
+ *
+ * This is primarily useful to make nice unit names from
+--
+1.7.10.3
+
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2012-06-04 09:14:43 UTC (rev 160710)
+++ PKGBUILD 2012-06-04 14:00:59 UTC (rev 160711)
@@ -4,7 +4,7 @@
pkgbase=systemd
pkgname=('systemd' 'libsystemd' 'systemd-tools' 'systemd-sysvcompat')
pkgver=184
-pkgrel=2
+pkgrel=3
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2' 'LGPL2.1' 'MIT')
@@ -16,14 +16,16 @@
'initcpio-install-udev'
'initcpio-install-timestamp'
'0001-Reinstate-TIMEOUT-handling.patch'
- 'os-release'
+ '0001-unit-name-never-create-a-unit-name-with-a-leading.patch'
+ '0001-0002-avoid-mangling-fstab-source-paths.patch'
'locale.sh')
md5sums=('6be0a2519fd42b988a1a2a56e5bd40c1'
- 'e99e9189aa2f6084ac28b8ddf605aeb8'
+ '5f9a26b6ec86609dd3f01333aee6df7c'
'59e91c4d7a69b7bf12c86a9982e37ced'
'df69615503ad293c9ddf9d8b7755282d'
'5543be25f205f853a21fa5ee68e03f0d'
- '752636def0db3c03f121f8b4f44a63cd'
+ '7d6adfe650f9e218af56d79069452202'
+ '4c220b076f167f01c1bd491226bad2d7'
'f15956945052bb911e5df81cf5e7e5dc')
build() {
@@ -32,6 +34,21 @@
# still waiting on ipw2x00 to get fixed...
patch -Np1 <"$srcdir/0001-Reinstate-TIMEOUT-handling.patch"
+ # upstream commits:
+ # ae5b21eaba2e716034b852c00fc68f98392a2eb7
+ # 7ff5404be1bad93cb8facbcae0bc78f77f9e067d
+ sed -i \
+ -e '1s|^#|#!|' \
+ -e 's|@pkglibexecdir@|/usr/lib/udev|' src/udev/keymap/keyboard-force-release.sh
+
+ # upstream commit 4b7126538c25268c79ff10d166920934f149a329
+ patch -Np1 < "$srcdir/0001-unit-name-never-create-a-unit-name-with-a-leading.patch"
+
+ # upstream commits:
+ # 2b71016a3c3d4c088e8edd170fe6eb8431fd71fa
+ # ec6ceb18663940efb1963704923430be0e83f1f7
+ patch -Np1 < "$srcdir/0001-0002-avoid-mangling-fstab-source-paths.patch"
+
./configure \
--libexecdir=/usr/lib \
--localstatedir=/var \
@@ -71,11 +88,8 @@
etc/systemd/journald.conf)
install="systemd.install"
- cd "$pkgname-$pkgver"
+ make -C "$pkgname-$pkgver" DESTDIR="$pkgdir" install
- make DESTDIR="$pkgdir" install
-
- install -Dm644 "$srcdir/os-release" "$pkgdir/etc/os-release"
printf "d /run/console 0755 root root\n" > "$pkgdir/usr/lib/tmpfiles.d/console.conf"
install -dm755 "$pkgdir/bin"
@@ -115,7 +129,7 @@
"$srcdir"/_tools/etc/udev \
"$srcdir"/_tools/usr/bin \
"$srcdir"/_tools/usr/include \
- "$srcdir"/_tools/usr/lib/{systemd/system,udev} \
+ "$srcdir"/_tools/usr/lib/udev \
"$srcdir"/_tools/usr/lib/systemd/system/{sysinit,sockets}.target.wants \
"$srcdir"/_tools/usr/lib/girepository-1.0 \
"$srcdir"/_tools/usr/share/pkgconfig \
Modified: initcpio-hook-udev
===================================================================
--- initcpio-hook-udev 2012-06-04 09:14:43 UTC (rev 160710)
+++ initcpio-hook-udev 2012-06-04 14:00:59 UTC (rev 160711)
@@ -2,7 +2,7 @@
run_earlyhook() {
udevd --daemon --resolve-names=never
- udevd_running=1
+ export udevd_running=1
}
run_hook() {
Deleted: os-release
===================================================================
--- os-release 2012-06-04 09:14:43 UTC (rev 160710)
+++ os-release 2012-06-04 14:00:59 UTC (rev 160711)
@@ -1,5 +0,0 @@
-NAME="Arch Linux"
-ID=arch
-PRETTY_NAME="Arch Linux"
-ANSI_COLOR="1;36"
-
More information about the arch-commits
mailing list