~vicamo/systemd/systemd

« back to all changes in this revision

Viewing changes to debian/patches/0003-Avoid-reload-and-re-start-requests-during-early-boot.patch

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2013-11-06 14:01:26 UTC
  • mfrom: (6.1.21 sid)
  • Revision ID: package-import@ubuntu.com-20131106140126-176udehi2kg210w7
Tags: 204-5ubuntu1
* Merge packaging with current Debian unstable, to greatly reduce the diff
  noise. Ubuntu changes:
  Permanently Ubuntu specific:
  - debian/control, debian/rules, debian/systemd.install,
    debian/systemd-services.install: Split out systemd-services package with
    logind, timedated, hostnamed, and localed. Add
    libpam-systemd.systemd-logind.upstart to bring up logind at boot.
  - debian/rules: Don't build systemd and systemd-sysv packages, not
    approved for universe for now.
  - debian/udev.templates, Drop debconfiscation of udev, not necessary for
    Ubuntu.
  - debian/extra/initramfs.top: Drop $ROOTDELAY, we do that in a more
    sensible way with wait-for-root. (Will get applicable to Debian once
    Debian gets wait-for-root in initramfs-tools.)
  - Add debian/extra/rules/78-graphics-card.rules: Mark graphics devices as
    PRIMARY_DEVICE_FOR_DISPLAY so that we can wait for those in plymouth.
  - Drop debian/extra/{50-udev-default.rules,75-cd-aliases-generator.rules,
    80-networking.rules,91-permissions.rules}, we don't want these in
    Ubuntu.
  - Add debian/extra/udev.py: Apport hook.
  - debian/extra/udev.startup, debian/rules: Don't install/support
    /etc/udev/links.conf, that's a hack (if you want links, create udev
    rules).
  - Various debian/patches/*, see patch headers (unmergeable with Debian).
  - Drop debian/source/{git-patches,options}, we use proper patches.
  - debian/rules: We continue to use the old net iface naming schema for the
    time being. Install old udev rule generator in debian/udev.install.
    (Reconsider post-LTS)
  - debian/rules: Don't install init.d scripts, only the upstart jobs.
  - debian/rules: Add an epoch to libgudev.
  - Drop debian/udev.dirs, not necessary.
  - Drop debian/udev.NEWS, debian/udev.maintscript: Not applicable to
    Ubuntu.
  - debian/udev.{postinst,postrm,preinst,prerm}: Keep our much simpler
    versions (all platforms must support udev, no debconf).
  - debian/libgudev-1.0-0.install: Install into /lib/ (Debian has a patch
    for this to go into /usr/lib/).
  - debian/rules: Drop doc dir symlinking. It creates havoc with dpkg
    upgrades, and we already have the automatic per-file symlinking.

  Applicable to Debian:
  - debian/control, debian/tests/: Add autopkgtest.
  - debian/extra/initramfs.hook, debian/udev.*{pre,post}inst: Divert udevadm
    to udevadm.upgrade during upgrades while udev is unconfigured.
  - Add debian/extra/60-keyboard.hwdb: Latest upstream keymaps, for easy
    backporting.
  - debian/extra/initramfs.bottom: If LVM is installed, settle udev,
    otherwise we get missing LV symlinks. (LP #1185394)
  - debian/extra/rules/75-persistent-net-generator.rules: Add Ravello
    systems (LP #1099278)
  - Add debian/extra/README-{etc,lib}-rules.d documentation, install into
    udev.
  - debian/rules: Run tests during package build.
  - debian/udev.udev-finish.upstart: Fix path to tmp-rules,
    debian/extra/rule_generator.functions creates them in /run/udev/.
  - debian/udev.upstart: Fix path to udevd.
  - debian/shlibs.local: Drop libudev; this unnecessarily generates overly
    strict dependencies, and even wrong ones for our epoched libgudev.
  - debian/udev-udeb.install: Add 64-btrfs.rules and 75-probe_mtd.rules,
    they are potentially useful in a d-i environment.

  Will go away eventually:
  - Add debian/extra/rules/40-hyperv-hotadd.rules: Workaround for LP #1233466
  - Keep debian/extra/firmware.agent and rule in
    debian/extra/rules/80-drivers.rules until this has been tested to not be
    necessary under Ubuntu kernels any more.

  Upgrade fixes, keep until 14.04 LTS release:
  - debian/control: Conflicts/Replaces libpam-xdg-support.
  - debian/libpam-systemd.postinst: Trigger reboot notification for upgrade
    from < 204, due to changed cgroup layout.
  - debian/systemd-services.maintscript: Clean up obsolete
    /etc/init/systemd-logind.conf on upgrades.

* Promote "systemd | systemd-shim" to Depends. (LP: #1221809)
* 0000-upstream-hwdb-keyboard.patch: udev-builtin-keyboard: Fix large scan
  codes on 32 bit architectures. (side issue in LP #1247676)
* Drop systemd init specific Debian patches which we don't need in Ubuntu;
  The Debian package does not track proper patches any more, so it doesn't
  help us keeping the patches around for merging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From bca8b01a7df86782b62ccdfc7e52b51387825ea8 Mon Sep 17 00:00:00 2001
2
 
From: Michael Biebl <biebl@debian.org>
3
 
Date: Thu, 18 Oct 2012 10:16:14 +0200
4
 
Subject: [PATCH 03/10] Avoid reload and (re)start requests during early boot
5
 
 which can lead to deadlocks. Closes: #624599
6
 
 
7
 
---
8
 
 src/core/manager.c |   15 +++++++++++++++
9
 
 1 file changed, 15 insertions(+)
10
 
 
11
 
diff --git a/src/core/manager.c b/src/core/manager.c
12
 
index 20e5844..1509a30 100644
13
 
--- a/src/core/manager.c
14
 
+++ b/src/core/manager.c
15
 
@@ -907,6 +907,21 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
16
 
                                 dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
17
 
                                 return -EINVAL;
18
 
                         }
19
 
+                        /* Trying to reload services from multi-user.target
20
 
+                         * during the early boot stage can lead to deadlocks.
21
 
+                         * An example is samba being reloaded by the dhcp hook
22
 
+                         * when the network is activated during rcS.
23
 
+                         * As a workaround we ignore reload or (re)start
24
 
+                         * requests while sysinit.target is queued for
25
 
+                         * services which have the DefaultDependencies option
26
 
+                         * set to yes.
27
 
+                         *
28
 
+                         * See http://bugs.debian.org/624599 */
29
 
+                        if (strcmp(j->unit->id, "sysinit.target") == 0 && unit->default_dependencies) {
30
 
+                                log_debug("sysinit.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
31
 
+                                dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "sysinit.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
32
 
+                                return -EINVAL;
33
 
+                        }
34
 
                 }
35
 
         }
36
 
 
37
 
1.7.10.4
38