public inbox for ipfire-scm@lists.ipfire.org
 help / color / mirror / Atom feed
From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 3.x development tree branch, master, updated. 17bafa6d3d16363d07f85fecfedb47fee9268685
Date: Tue, 21 May 2013 22:26:34 +0200	[thread overview]
Message-ID: <20130521202635.57148201A1@argus.ipfire.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 5029 bytes --]

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 3.x development tree".

The branch, master has been updated
       via  17bafa6d3d16363d07f85fecfedb47fee9268685 (commit)
      from  184b18707e9c2d1e406caf6992f565690ffb6dc8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 17bafa6d3d16363d07f85fecfedb47fee9268685
Author: Stefan Schantl <stefan.schantl(a)ipfire.org>
Date:   Sun May 19 21:49:15 2013 +0200

    systemd: Add upstream patch to support "is-enabled" for templated units.

-----------------------------------------------------------------------

Summary of changes:
 ...emctl-is-enabled-work-for-templated-units.patch | 72 ++++++++++++++++++++++
 systemd/systemd.nm                                 |  2 +-
 2 files changed, 73 insertions(+), 1 deletion(-)
 create mode 100644 systemd/patches/0001-Make-systemctl-is-enabled-work-for-templated-units.patch

Difference in files:
diff --git a/systemd/patches/0001-Make-systemctl-is-enabled-work-for-templated-units.patch b/systemd/patches/0001-Make-systemctl-is-enabled-work-for-templated-units.patch
new file mode 100644
index 0000000..55dfe86
--- /dev/null
+++ b/systemd/patches/0001-Make-systemctl-is-enabled-work-for-templated-units.patch
@@ -0,0 +1,72 @@
+From 67820a0cbdc9d72a1074debf8b2bc72203c775cc Mon Sep 17 00:00:00 2001
+From: Michael Tremer <michael.tremer(a)ipfire.org>
+Date: Sun, 19 May 2013 13:45:48 +0000
+Subject: systemctl: make systemctl is-enabled work for templated units
+
+Patch resolves the problem that 'systemctl is-enabled' does
+not work for templated units.
+
+Without this patch, systemctl is-enabled something(a)abc.service
+returned "No such file or directory", because it first checked
+if /usr/lib/systemd/system/something(a)abc.service, etc. exists.
+If systemctl is-enabled is called for templated units, this
+check should be omitted and it should search for symlinks in
+the .wants dirs right away.
+
+This patch fixes the broken behaviour and resolves
+  https://bugs.freedesktop.org/show_bug.cgi?id=55318.
+
+[zj: fixed the patch to still check for broken symlinks and
+     masked instances. Also removed untrue assumptions from
+     the patch description.]
+---
+diff --git a/src/shared/install.c b/src/shared/install.c
+index edf4d2a..8f27c6d 100644
+--- a/src/shared/install.c
++++ b/src/shared/install.c
+@@ -1609,24 +1609,29 @@ UnitFileState unit_file_get_state(
+                 if (!path)
+                         return -ENOMEM;
+ 
++                /*
++                 * Search for a unit file in our default paths, to
++                 * be sure, that there are no broken symlinks.
++                 */
+                 if (lstat(path, &st) < 0) {
+                         r = -errno;
+-                        if (errno == ENOENT)
+-                                continue;
+-
+-                        return -errno;
+-                }
++                        if (errno != ENOENT)
++                                return r;
+ 
+-                if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode))
+-                        return -ENOENT;
++                        if (!unit_name_is_instance(name))
++                                continue;
++                } else {
++                        if (!S_ISREG(st.st_mode) && !S_ISLNK(st.st_mode))
++                                return -ENOENT;
+ 
+-                r = null_or_empty_path(path);
+-                if (r < 0 && r != -ENOENT)
+-                        return r;
+-                else if (r > 0) {
+-                        state = path_startswith(*i, "/run") ?
+-                                UNIT_FILE_MASKED_RUNTIME : UNIT_FILE_MASKED;
+-                        return state;
++                        r = null_or_empty_path(path);
++                        if (r < 0 && r != -ENOENT)
++                                return r;
++                        else if (r > 0) {
++                                state = path_startswith(*i, "/run") ?
++                                        UNIT_FILE_MASKED_RUNTIME : UNIT_FILE_MASKED;
++                                return state;
++                        }
+                 }
+ 
+                 r = find_symlinks_in_scope(scope, root_dir, name, &state);
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/systemd/systemd.nm b/systemd/systemd.nm
index 969951d..cc9c056 100644
--- a/systemd/systemd.nm
+++ b/systemd/systemd.nm
@@ -5,7 +5,7 @@
 
 name       = systemd
 version    = 204
-release    = 1
+release    = 2
 
 maintainer = Stefan Schantl <stefan.schantl(a)ipfire.org>
 groups     = System/Base


hooks/post-receive
--
IPFire 3.x development tree

                 reply	other threads:[~2013-05-21 20:26 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130521202635.57148201A1@argus.ipfire.org \
    --to=git@ipfire.org \
    --cc=ipfire-scm@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox