[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#805293: marked as done (jessie-pu: package systemd/215-17+deb8u3)



Your message dated Sat, 23 Jan 2016 13:57:15 +0000
with message-id <1453557435.1835.52.camel@adam-barratt.org.uk>
and subject line 8.3 point release cleanup
has caused the Debian Bug report #805293,
regarding jessie-pu: package systemd/215-17+deb8u3
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
805293: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=805293
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: jessie
User: release.debian.org@packages.debian.org
Usertags: pu

I'd like to update the systemd package in stable to fix a few issues
where users asked us explicitly to backport fixes from upstream.

All those issue have been fixed in sid/testing.
Full debdiff is attached.

Annotated changelog

systemd (215-17+deb8u3) stable; urgency=medium

  * Fix namespace breakage due to incorrect path sorting. (Closes: #787758)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=biebl/jessie&id=054e994dd6b7f9aec13d159793c89027ae6d91c3

While I'm not aware of any package in the archive using
ReadOnlyDirectories/ReadWriteDirectories, it's not uncommon for admins to lock
down their services via local configuration.

  * Don't timeout after 90 seconds when no password was entered for cryptsetup
    devices. (Closes: #802897)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=biebl/jessie&id=17fa29391f769426876bd51f5f6f992dc23017fd

This one fixes a bug where we timed out and failed if the user didn't enter a
password for a cryptsetup device within 90 seconds.

  * Only set the kernel's timezone when the RTC runs in local time. Otherwise,
    every daylight saving time change or time zone change by travelling will
    make the time jump, and the local time might jump backwards which creates
    unsolvable problems with file timestamps. (Closes: #759319)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=biebl/jessie&id=3918ae33299cf6798b17564e1c4af34d77fd8a18

While this change sound potentially risky, we had this in sid/testing for a while.

  * Fix incorrect handling of comma separator in systemd-delta.
    (Closes: #793477)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=biebl/jessie&id=4b90ab14dbebd1e4c8f62a051bda4a2e2c6ccbe2

Low risk change for a trivial bug.

  * Make DHCP broadcast behaviour configurable in systemd-networkd via
    RequestBroadcast=. This is a backport from upstream which doesn't change
    the default setting. (Closes: #797894)

http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=biebl/jessie&id=06aa37dea9a5b922582ebbcc380fc7e064377f2a

This backports a new feature (configuration setting) for systemd-networkd which
otherwise would be unusable in certain setups. Regression potential is low, as
it doesn't change the existing default behaviour in stable.


Please let me know if I can proceed with the upload.

Regards,
Michael


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.3.0-trunk-amd64 (SMP w/4 CPU cores)
Locale: LANG=de_DE.utf8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff --git a/debian/changelog b/debian/changelog
index e534caa..e7f31e9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,26 @@
+systemd (215-17+deb8u3) stable; urgency=medium
+
+  * Fix namespace breakage due to incorrect path sorting. (Closes: #787758)
+  * Don't timeout after 90 seconds when no password was entered for cryptsetup
+    devices. (Closes: #802897)
+  * Only set the kernel's timezone when the RTC runs in local time. Otherwise,
+    every daylight saving time change or time zone change by travelling will
+    make the time jump, and the local time might jump backwards which creates
+    unsolvable problems with file timestamps. (Closes: #759319)
+  * Fix incorrect handling of comma separator in systemd-delta.
+    (Closes: #793477)
+  * Make DHCP broadcast behaviour configurable in systemd-networkd via
+    RequestBroadcast=. This is a backport from upstream which doesn't change
+    the default setting. (Closes: #797894)
+
+ -- Michael Biebl <biebl@debian.org>  Mon, 16 Nov 2015 18:08:32 +0100
+
 systemd (215-17+deb8u2) stable; urgency=medium
 
   * Disable default DNS servers in systemd-resolved. In v215 they are always
     added to resolv.conf as fallback entries even when DNS servers were
     acquired from systemd-networkd. (Closes: #787731)
-  * Use strictly versioned dependendency on libsystemd-dev for the
+  * Use strictly versioned dependency on libsystemd-dev for the
     transitional dev packages. The .pc files of the compat libraries declare
     a strictly versioned dependency on libsystemd.pc, so reflect that in the
     package dependencies as well. (Closes: #794290)
diff --git a/debian/patches/core-namespace-fix-path-sorting.patch b/debian/patches/core-namespace-fix-path-sorting.patch
new file mode 100644
index 0000000..9fb1399
--- /dev/null
+++ b/debian/patches/core-namespace-fix-path-sorting.patch
@@ -0,0 +1,58 @@
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Mon, 16 Mar 2015 22:04:21 +0100
+Subject: core/namespace: fix path sorting
+
+The comparison function we use for qsorting paths is overly indifferent.
+Consider these 3 paths for sorting:
+ /foo
+ /bar
+ /foo/foo
+qsort() may compare:
+ "/foo" with "/bar" => 0, indifference
+ "/bar" with "/foo/foo" => 0, indifference
+and assume transitively that "/foo" and "/foo/foo" are also indifferent.
+
+But this is wrong, we want "/foo" sorted before "/foo/foo".
+The comparison function must be transitive.
+
+Use path_compare(), which behaves properly.
+
+Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1184016
+
+(cherry-picked from commit a0827e2b123010c46cfe4f03eebba57d92f9efc4)
+---
+ src/core/namespace.c | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/src/core/namespace.c b/src/core/namespace.c
+index 5466b7b..23a85df 100644
+--- a/src/core/namespace.c
++++ b/src/core/namespace.c
+@@ -89,9 +89,11 @@ static int append_mounts(BindMount **p, char **strv, MountMode mode) {
+ 
+ static int mount_path_compare(const void *a, const void *b) {
+         const BindMount *p = a, *q = b;
++        int d;
+ 
+-        if (path_equal(p->path, q->path)) {
++        d = path_compare(p->path, q->path);
+ 
++        if (!d) {
+                 /* If the paths are equal, check the mode */
+                 if (p->mode < q->mode)
+                         return -1;
+@@ -103,13 +105,7 @@ static int mount_path_compare(const void *a, const void *b) {
+         }
+ 
+         /* If the paths are not equal, then order prefixes first */
+-        if (path_startswith(p->path, q->path))
+-                return 1;
+-
+-        if (path_startswith(q->path, p->path))
+-                return -1;
+-
+-        return 0;
++        return d;
+ }
+ 
+ static void drop_duplicates(BindMount *m, unsigned *n) {
diff --git a/debian/patches/core-only-set-the-kernel-s-timezone-when-the-RTC-runs-in-.patch b/debian/patches/core-only-set-the-kernel-s-timezone-when-the-RTC-runs-in-.patch
new file mode 100644
index 0000000..7ba0885
--- /dev/null
+++ b/debian/patches/core-only-set-the-kernel-s-timezone-when-the-RTC-runs-in-.patch
@@ -0,0 +1,225 @@
+From: Kay Sievers <kay@vrfy.org>
+Date: Sun, 27 Jul 2014 00:11:08 +0200
+Subject: core: only set the kernel's timezone when the RTC runs in local time
+
+We can not reliably manage any notion of local time. Every daylight
+saving time change or time zone change by traveling will make the
+time jump, and the local time might jump backwards which creates
+unsolvable problems with file timestamps.
+
+We will no longer tell the kernel our local time zone and leave
+everything set to UTC. This will effectively turn FAT timestamps
+into UTC timestamps.
+
+If and only if the machine is configured to read the RTC in local
+time mode, the kernel's time zone will be configured, but
+systemd-timesysnc will disable the kernel's system time to RTC
+syncing. In this mode, the RTC will not be managed, and external
+tools like Windows bootups are expected to manage the RTC's time.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=81538
+
+(cherry-picked from commit c264aeab4b0e7b69f469e12e78d4a48b3ed7a66e)
+---
+ src/core/main.c            | 23 +++++++++++++++--------
+ src/shared/clock-util.c    | 15 ++++++++-------
+ src/shared/clock-util.h    |  2 +-
+ src/timedate/timedatectl.c |  7 ++++---
+ src/timesync/timesyncd.c   | 24 +++++++++++++++++++-----
+ src/timesync/timesyncd.h   |  3 +++
+ 6 files changed, 50 insertions(+), 24 deletions(-)
+
+diff --git a/src/core/main.c b/src/core/main.c
+index a732c69..904cdb8 100644
+--- a/src/core/main.c
++++ b/src/core/main.c
+@@ -1347,7 +1347,14 @@ int main(int argc, char *argv[]) {
+                         if (clock_is_localtime() > 0) {
+                                 int min;
+ 
+-                                /* The first-time call to settimeofday() does a time warp in the kernel */
++                                /*
++                                 * The very first call of settimeofday() also does a time warp in the kernel.
++                                 *
++                                 * In the rtc-in-local time mode, we set the kernel's timezone, and rely on
++                                 * external tools to take care of maintaining the RTC and do all adjustments.
++                                 * This matches the behavior of Windows, which leaves the RTC alone if the
++                                 * registry tells that the RTC runs in UTC.
++                                 */
+                                 r = clock_set_timezone(&min);
+                                 if (r < 0)
+                                         log_error("Failed to apply local time delta, ignoring: %s", strerror(-r));
+@@ -1355,19 +1362,19 @@ int main(int argc, char *argv[]) {
+                                         log_info("RTC configured in localtime, applying delta of %i minutes to system time.", min);
+                         } else if (!in_initrd()) {
+                                 /*
+-                                 * Do dummy first-time call to seal the kernel's time warp magic
++                                 * Do a dummy very first call to seal the kernel's time warp magic.
+                                  *
+                                  * Do not call this this from inside the initrd. The initrd might not
+                                  * carry /etc/adjtime with LOCAL, but the real system could be set up
+                                  * that way. In such case, we need to delay the time-warp or the sealing
+                                  * until we reach the real system.
++                                 *
++                                 * Do no set the kernel's timezone. The concept of local time cannot
++                                 * be supported reliably, the time will jump or be incorrect at every daylight
++                                 * saving time change. All kernel local time concepts will be treated
++                                 * as UTC that way.
+                                  */
+-                                clock_reset_timezone();
+-
+-                                /* Tell the kernel our timezone */
+-                                r = clock_set_timezone(NULL);
+-                                if (r < 0)
+-                                        log_error("Failed to set the kernel's timezone, ignoring: %s", strerror(-r));
++                                clock_reset_timewarp();
+                         }
+                 }
+ 
+diff --git a/src/shared/clock-util.c b/src/shared/clock-util.c
+index e66db63..fc49393 100644
+--- a/src/shared/clock-util.c
++++ b/src/shared/clock-util.c
+@@ -124,9 +124,10 @@ int clock_set_timezone(int *min) {
+         tz.tz_dsttime = 0; /* DST_NONE*/
+ 
+         /*
+-         * If the hardware clock does not run in UTC, but in local time:
+-         * The very first time we set the kernel's timezone, it will warp
+-         * the clock so that it runs in UTC instead of local time.
++         * If the RTC does not run in UTC but in local time, the very first
++         * call to settimeofday() will set the kernel's timezone and will warp the
++         * system clock, so that it runs in UTC instead of the local time we
++         * have read from the RTC.
+          */
+         if (settimeofday(tv_null, &tz) < 0)
+                 return -errno;
+@@ -135,7 +136,7 @@ int clock_set_timezone(int *min) {
+         return 0;
+ }
+ 
+-int clock_reset_timezone(void) {
++int clock_reset_timewarp(void) {
+         const struct timeval *tv_null = NULL;
+         struct timezone tz;
+ 
+@@ -143,9 +144,9 @@ int clock_reset_timezone(void) {
+         tz.tz_dsttime = 0; /* DST_NONE*/
+ 
+         /*
+-         * The very first time we set the kernel's timezone, it will warp
+-         * the clock. Do a dummy call here, so the time warping is sealed
+-         * and we set only the timezone with the next call.
++         * The very first call to settimeofday() does time warp magic. Do a
++         * dummy call here, so the time warping is sealed and all later calls
++         * behave as expected.
+          */
+         if (settimeofday(tv_null, &tz) < 0)
+                 return -errno;
+diff --git a/src/shared/clock-util.h b/src/shared/clock-util.h
+index 4deeac7..7ed371a 100644
+--- a/src/shared/clock-util.h
++++ b/src/shared/clock-util.h
+@@ -23,6 +23,6 @@
+ 
+ int clock_is_localtime(void);
+ int clock_set_timezone(int *min);
+-int clock_reset_timezone(void);
++int clock_reset_timewarp(void);
+ int clock_get_hwclock(struct tm *tm);
+ int clock_set_hwclock(const struct tm *tm);
+diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
+index a8769e4..d87e183 100644
+--- a/src/timedate/timedatectl.c
++++ b/src/timedate/timedatectl.c
+@@ -203,9 +203,10 @@ static void print_status_info(const StatusInfo *i) {
+ 
+         if (i->rtc_local)
+                 fputs("\n" ANSI_HIGHLIGHT_ON
+-                      "Warning: The RTC is configured to maintain time in the local time zone. This\n"
+-                      "         mode is not fully supported and will create various problems with time\n"
+-                      "         zone changes and daylight saving time adjustments. If at all possible, use\n"
++                      "Warning: The system is configured to read the RTC time in the local time zone. This\n"
++                      "         mode can not be fully supported. It will create various problems with time\n"
++                      "         zone changes and daylight saving time adjustments. The RTC time is never updated,\n"
++                      "         it relies on external facilities to maintain it. If at all possible, use\n"
+                       "         RTC in UTC by calling 'timedatectl set-local-rtc 0'" ANSI_HIGHLIGHT_OFF ".\n", stdout);
+ }
+ 
+diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c
+index 0fb92f1..69f6e50 100644
+--- a/src/timesync/timesyncd.c
++++ b/src/timesync/timesyncd.c
+@@ -396,9 +396,6 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
+         /*
+          * For small deltas, tell the kernel to gradually adjust the system
+          * clock to the NTP time, larger deltas are just directly set.
+-         *
+-         * Clear STA_UNSYNC, it will enable the kernel's 11-minute mode, which
+-         * syncs the system time periodically to the hardware clock.
+          */
+         if (fabs(offset) < NTP_MAX_ADJUST) {
+                 tmx.modes = ADJ_STATUS | ADJ_NANO | ADJ_OFFSET | ADJ_TIMECONST | ADJ_MAXERROR | ADJ_ESTERROR;
+@@ -409,7 +406,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
+                 tmx.esterror = 0;
+                 log_debug("  adjust (slew): %+.3f sec\n", offset);
+         } else {
+-                tmx.modes = ADJ_SETOFFSET | ADJ_NANO;
++                tmx.modes = ADJ_STATUS | ADJ_NANO | ADJ_SETOFFSET;
+ 
+                 /* ADJ_NANO uses nanoseconds in the microseconds field */
+                 tmx.time.tv_sec = (long)offset;
+@@ -425,6 +422,17 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
+                 log_debug("  adjust (jump): %+.3f sec\n", offset);
+         }
+ 
++        /*
++         * An unset STA_UNSYNC will enable the kernel's 11-minute mode,
++         * which syncs the system time periodically to the RTC.
++         *
++         * In case the RTC runs in local time, never touch the RTC,
++         * we have no way to properly handle daylight saving changes and
++         * mobile devices moving between time zones.
++         */
++        if (m->rtc_local_time)
++                tmx.status |= STA_UNSYNC;
++
+         switch (leap_sec) {
+         case 1:
+                 tmx.status |= STA_INS;
+@@ -447,7 +455,7 @@ static int manager_adjust_clock(Manager *m, double offset, int leap_sec) {
+                   "  constant     : %li\n"
+                   "  offset       : %+.3f sec\n"
+                   "  freq offset  : %+li (%i ppm)\n",
+-                  tmx.status, tmx.status & STA_UNSYNC ? "" : "sync",
++                  tmx.status, tmx.status & STA_UNSYNC ? "unsync" : "sync",
+                   tmx.time.tv_sec, (unsigned long long) (tmx.time.tv_usec / NSEC_PER_MSEC),
+                   tmx.constant,
+                   (double)tmx.offset / NSEC_PER_SEC,
+@@ -1270,6 +1278,12 @@ int main(int argc, char *argv[]) {
+                 goto out;
+         }
+ 
++        if (clock_is_localtime() > 0) {
++                log_info("The system is configured to read the RTC time in the local time zone. "
++                         "This mode can not be fully supported. All system time to RTC updates are disabled.");
++                m->rtc_local_time = true;
++        }
++
+         manager_add_server_string(m, NTP_SERVERS);
+         manager_parse_config_file(m);
+ 
+diff --git a/src/timesync/timesyncd.h b/src/timesync/timesyncd.h
+index bcd14f7..3ae7ccb 100644
+--- a/src/timesync/timesyncd.h
++++ b/src/timesync/timesyncd.h
+@@ -95,6 +95,9 @@ struct Manager {
+ 
+         /* Retry connections */
+         sd_event_source *event_retry;
++
++        /* RTC runs in local time, leave it alone */
++        bool rtc_local_time;
+ };
+ 
+ const struct ConfigPerfItem* timesyncd_gperf_lookup(const char *key, unsigned length);
diff --git a/debian/patches/cryptsetup-Fix-timeout-on-dm-device.patch b/debian/patches/cryptsetup-Fix-timeout-on-dm-device.patch
new file mode 100644
index 0000000..f7e6ff6
--- /dev/null
+++ b/debian/patches/cryptsetup-Fix-timeout-on-dm-device.patch
@@ -0,0 +1,33 @@
+From: Hugo Grostabussiat <bonstra@bonstra.fr.eu.org>
+Date: Sun, 28 Sep 2014 03:05:41 +0200
+Subject: cryptsetup: Fix timeout on dm device.
+
+Fix a bug in systemd-cryptsetup-generator which caused the drop-in
+setting the job timeout for the dm device unit to be written with a
+name different than the unit name.
+
+https://bugs.freedesktop.org/show_bug.cgi?id=84409
+
+(cherry-picked from commit a6fb0dc138d4e7895f8e607493279dbe4df117a1)
+---
+ src/cryptsetup/cryptsetup-generator.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
+index 3233e15..de91a6f 100644
+--- a/src/cryptsetup/cryptsetup-generator.c
++++ b/src/cryptsetup/cryptsetup-generator.c
+@@ -246,7 +246,12 @@ static int create_disk(
+         }
+ 
+         if (!noauto && !nofail) {
+-                r = write_drop_in(arg_dest, name, 90, "device-timeout",
++                _cleanup_free_ char *dmname;
++                dmname = strjoin("dev-mapper-", e, ".device", NULL);
++                if (!dmname)
++                        return log_oom();
++
++                r = write_drop_in(arg_dest, dmname, 90, "device-timeout",
+                                   "# Automatically generated by systemd-cryptsetup-generator \n\n"
+                                   "[Unit]\nJobTimeoutSec=0");
+                 if (r < 0) {
diff --git a/debian/patches/delta-Fix-broken-separator-support.patch b/debian/patches/delta-Fix-broken-separator-support.patch
new file mode 100644
index 0000000..946784d
--- /dev/null
+++ b/debian/patches/delta-Fix-broken-separator-support.patch
@@ -0,0 +1,26 @@
+From: Alison Chaiken <alison_chaiken@mentor.com>
+Date: Sun, 30 Nov 2014 12:14:48 +0100
+Subject: delta: Fix broken separator support
+
+systemd-delta man page promises that multiple types of deltas will be
+concatenated if they are listed with a comma as separator.  Replace
+FOREACH_WORD() with FOREACH_WORD_SEPARATOR() to restore the functionality.
+
+(cherry-picked from commit d0a2e1c364320b862a6aae099afa106ea59bb84c)
+---
+ src/delta/delta.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/delta/delta.c b/src/delta/delta.c
+index 96a9fa5..a9cb163 100644
+--- a/src/delta/delta.c
++++ b/src/delta/delta.c
+@@ -491,7 +491,7 @@ static int parse_flags(const char *flag_str, int flags) {
+         char *w, *state;
+         size_t l;
+ 
+-        FOREACH_WORD(w, l, flag_str, state) {
++        FOREACH_WORD_SEPARATOR(w, l, flag_str, ",", state) {
+                 if (strneq("masked", w, l))
+                         flags |= SHOW_MASKED;
+                 else if (strneq ("equivalent", w, l))
diff --git a/debian/patches/sd-dhcp-client-make-request-broadcasts-configurable.patch b/debian/patches/sd-dhcp-client-make-request-broadcasts-configurable.patch
new file mode 100644
index 0000000..9f67a6f
--- /dev/null
+++ b/debian/patches/sd-dhcp-client-make-request-broadcasts-configurable.patch
@@ -0,0 +1,150 @@
+From: Max Vozeler <xam@debian.org>
+Date: Thu, 17 Sep 2015 10:14:01 +0200
+Subject: sd-dhcp-client: make request broadcasts configurable
+
+The upstream commit changes the default from broadcast to unicast. This seems
+too risky a change for stable, so keep the default but make it configurable.
+
+Original patch description:
+
+It appears there is no good way to decide whether or not broadcasts should be enabled,
+there is hardware that must have broadcast, and there are networks that only allow
+unicast. So we give up and make this configurable.
+
+(backported from commit f5de5b00204f041aaec828d336c8afd9e860a5c3)
+---
+ man/systemd.network.xml                  |  9 +++++++++
+ src/libsystemd-network/sd-dhcp-client.c  | 18 ++++++++++++++++--
+ src/network/networkd-link.c              |  4 ++++
+ src/network/networkd-network-gperf.gperf |  1 +
+ src/network/networkd-network.c           |  1 +
+ src/network/networkd.h                   |  1 +
+ src/systemd/sd-dhcp-client.h             |  1 +
+ 7 files changed, 33 insertions(+), 2 deletions(-)
+
+diff --git a/man/systemd.network.xml b/man/systemd.network.xml
+index 2b0eb56..f7cc39b 100644
+--- a/man/systemd.network.xml
++++ b/man/systemd.network.xml
+@@ -433,6 +433,15 @@
+                                                 if, say, the root filesystem relies on this connection. Defaults to false.</para>
+                                         </listitem>
+                                 </varlistentry>
++                                <varlistentry>
++                                        <term><varname>RequestBroadcast=</varname></term>
++                                        <listitem>
++                                                <para>Request the server to use broadcast messages before the IP address has been
++                                                configured. This is necessary for devices that cannot receive RAW packets, or that
++                                                cannot receive packets at all before an IP address has been configured. On the other
++                                                hand, this must not be enabled on networks where broadcasts are filtered out.</para>
++                                        </listitem>
++                                </varlistentry>
+                        </variablelist>
+ 
+         </refsect1>
+diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
+index d8a9d20..f8561fb 100644
+--- a/src/libsystemd-network/sd-dhcp-client.c
++++ b/src/libsystemd-network/sd-dhcp-client.c
+@@ -48,6 +48,7 @@ struct sd_dhcp_client {
+         int fd;
+         union sockaddr_union link;
+         sd_event_source *receive_message;
++        bool request_broadcast;
+         uint8_t *req_opts;
+         size_t req_opts_allocated;
+         size_t req_opts_size;
+@@ -95,6 +96,14 @@ int sd_dhcp_client_set_callback(sd_dhcp_client *client, sd_dhcp_client_cb_t cb,
+         return 0;
+ }
+ 
++int sd_dhcp_client_set_request_broadcast(sd_dhcp_client *client, int broadcast) {
++        assert_return(client, -EINVAL);
++
++        client->request_broadcast = !!broadcast;
++
++        return 0;
++}
++
+ int sd_dhcp_client_set_request_option(sd_dhcp_client *client, uint8_t option) {
+         size_t i;
+ 
+@@ -304,8 +313,13 @@ static int client_message_init(sd_dhcp_client *client, DHCPPacket **ret,
+            BROADCAST bit in the 'flags' field to 1 in any DHCPDISCOVER or
+            DHCPREQUEST messages that client sends.  The BROADCAST bit will
+            provide a hint to the DHCP server and BOOTP relay agent to broadcast
+-           any messages to the client on the client's subnet. */
+-        packet->dhcp.flags = htobe16(0x8000);
++           any messages to the client on the client's subnet.
++
++           Note: some interfaces needs this to be enabled, but some networks
++           needs this to be disabled as broadcasts are filteretd, so this
++           needs to be configurable */
++        if (client->request_broadcast)
++                packet->dhcp.flags = htobe16(0x8000);
+ 
+         /* RFC2132 section 4.1.1:
+            The client MUST include its hardware address in the ’chaddr’ field, if
+diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
+index 8c68199..5dbe35a 100644
+--- a/src/network/networkd-link.c
++++ b/src/network/networkd-link.c
+@@ -1997,6 +1997,10 @@ static int link_configure(Link *link) {
+                 if (r < 0)
+                         return r;
+ 
++                r = sd_dhcp_client_set_request_broadcast(link->dhcp_client, link->network->dhcp_broadcast);
++                if (r < 0)
++                        return r;
++
+                 if (link->network->dhcp_mtu) {
+                         r = sd_dhcp_client_set_request_option(link->dhcp_client, 26);
+                         if (r < 0)
+diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
+index ce9047c..53cfd5e 100644
+--- a/src/network/networkd-network-gperf.gperf
++++ b/src/network/networkd-network-gperf.gperf
+@@ -49,6 +49,7 @@ DHCP.UseHostname,            config_parse_bool,                  0,
+ DHCP.UseDomainName,          config_parse_bool,                  0,                             offsetof(Network, dhcp_domainname)
+ DHCP.UseRoutes,              config_parse_bool,                  0,                             offsetof(Network, dhcp_routes)
+ DHCP.SendHostname,           config_parse_bool,                  0,                             offsetof(Network, dhcp_sendhost)
++DHCP.RequestBroadcast,       config_parse_bool,                  0,                             offsetof(Network, dhcp_broadcast)
+ DHCP.CriticalConnection,     config_parse_bool,                  0,                             offsetof(Network, dhcp_critical)
+ /* backwards compatibility: do not add new entries to this section */
+ DHCPv4.UseDNS,               config_parse_bool,                  0,                             offsetof(Network, dhcp_dns)
+diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
+index 9f6de18..1772bf4 100644
+--- a/src/network/networkd-network.c
++++ b/src/network/networkd-network.c
+@@ -91,6 +91,7 @@ static int network_load_one(Manager *manager, const char *filename) {
+         network->dhcp_domainname = true;
+         network->dhcp_routes = true;
+         network->dhcp_sendhost = true;
++        network->dhcp_broadcast = true;
+ 
+         r = config_parse(NULL, filename, file, "Match\0Network\0Address\0Route\0DHCP\0DHCPv4\0", config_item_perf_lookup,
+                         (void*) network_network_gperf_lookup, false, false, network);
+diff --git a/src/network/networkd.h b/src/network/networkd.h
+index 6a00175..1185747 100644
+--- a/src/network/networkd.h
++++ b/src/network/networkd.h
+@@ -180,6 +180,7 @@ struct Network {
+         bool dhcp_hostname;
+         bool dhcp_domainname;
+         bool dhcp_sendhost;
++        bool dhcp_broadcast;
+         bool dhcp_critical;
+         bool dhcp_routes;
+         bool ipv4ll;
+diff --git a/src/systemd/sd-dhcp-client.h b/src/systemd/sd-dhcp-client.h
+index c3ea059..0b07237 100644
+--- a/src/systemd/sd-dhcp-client.h
++++ b/src/systemd/sd-dhcp-client.h
+@@ -48,6 +48,7 @@ int sd_dhcp_client_set_callback(sd_dhcp_client *client, sd_dhcp_client_cb_t cb,
+ int sd_dhcp_client_set_request_option(sd_dhcp_client *client, uint8_t option);
+ int sd_dhcp_client_set_request_address(sd_dhcp_client *client,
+                                        const struct in_addr *last_address);
++int sd_dhcp_client_set_request_broadcast(sd_dhcp_client *client, int broadcast);
+ int sd_dhcp_client_set_index(sd_dhcp_client *client, int interface_index);
+ int sd_dhcp_client_set_mac(sd_dhcp_client *client,
+                            const struct ether_addr *addr);
diff --git a/debian/patches/series b/debian/patches/series
index 25206a0..c5ca9d2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -150,6 +150,12 @@ logind-handle-runtime-dir-without-CAP_SYS_ADMIN.patch
 sd-bus-create-clean-error-when-a-property-Set-call-w.patch
 manager-do-not-print-anything-while-passwords-are-be.patch
 manager-pass-correct-errno-to-strerror.patch
+shared-add-path_compare-an-ordering-path-comparison.patch
+core-namespace-fix-path-sorting.patch
+cryptsetup-Fix-timeout-on-dm-device.patch
+core-only-set-the-kernel-s-timezone-when-the-RTC-runs-in-.patch
+delta-Fix-broken-separator-support.patch
+sd-dhcp-client-make-request-broadcasts-configurable.patch
 
 ## Debian specific patches:
 Add-back-support-for-Debian-specific-config-files.patch
diff --git a/debian/patches/shared-add-path_compare-an-ordering-path-comparison.patch b/debian/patches/shared-add-path_compare-an-ordering-path-comparison.patch
new file mode 100644
index 0000000..eecdc59
--- /dev/null
+++ b/debian/patches/shared-add-path_compare-an-ordering-path-comparison.patch
@@ -0,0 +1,148 @@
+From: Michal Schmidt <mschmidt@redhat.com>
+Date: Mon, 16 Mar 2015 21:58:35 +0100
+Subject: shared: add path_compare(), an ordering path comparison
+
+... and make path_equal() a simple wrapper around it.
+
+(cherry-picked from commit 2230852bd9755e1b7bfd1260082471f559b0a005)
+---
+ src/shared/path-util.c    | 37 +++++++++++++++++++++++++++----------
+ src/shared/path-util.h    |  1 +
+ src/test/test-path-util.c | 36 +++++++++++++++++++++++++-----------
+ 3 files changed, 53 insertions(+), 21 deletions(-)
+
+diff --git a/src/shared/path-util.c b/src/shared/path-util.c
+index e68d367..60b14b7 100644
+--- a/src/shared/path-util.c
++++ b/src/shared/path-util.c
+@@ -402,12 +402,18 @@ char* path_startswith(const char *path, const char *prefix) {
+         }
+ }
+ 
+-bool path_equal(const char *a, const char *b) {
++int path_compare(const char *a, const char *b) {
++        int d;
++
+         assert(a);
+         assert(b);
+ 
+-        if ((a[0] == '/') != (b[0] == '/'))
+-                return false;
++        /* A relative path and an abolute path must not compare as equal.
++         * Which one is sorted before the other does not really matter.
++         * Here a relative path is ordered before an absolute path. */
++        d = (a[0] == '/') - (b[0] == '/');
++        if (d)
++                return d;
+ 
+         for (;;) {
+                 size_t j, k;
+@@ -416,25 +422,36 @@ bool path_equal(const char *a, const char *b) {
+                 b += strspn(b, "/");
+ 
+                 if (*a == 0 && *b == 0)
+-                        return true;
++                        return 0;
+ 
+-                if (*a == 0 || *b == 0)
+-                        return false;
++                /* Order prefixes first: "/foo" before "/foo/bar" */
++                if (*a == 0)
++                        return -1;
++                if (*b == 0)
++                        return 1;
+ 
+                 j = strcspn(a, "/");
+                 k = strcspn(b, "/");
+ 
+-                if (j != k)
+-                        return false;
++                /* Alphabetical sort: "/foo/aaa" before "/foo/b" */
++                d = memcmp(a, b, MIN(j, k));
++                if (d)
++                        return (d > 0) - (d < 0); /* sign of d */
+ 
+-                if (memcmp(a, b, j) != 0)
+-                        return false;
++                /* Sort "/foo/a" before "/foo/aaa" */
++                d = (j > k) - (j < k);  /* sign of (j - k) */
++                if (d)
++                        return d;
+ 
+                 a += j;
+                 b += k;
+         }
+ }
+ 
++bool path_equal(const char *a, const char *b) {
++        return path_compare(a, b) == 0;
++}
++
+ int path_is_mount_point(const char *t, bool allow_symlink) {
+ 
+         union file_handle_union h = {
+diff --git a/src/shared/path-util.h b/src/shared/path-util.h
+index 976d2b2..54f00a8 100644
+--- a/src/shared/path-util.h
++++ b/src/shared/path-util.h
+@@ -44,6 +44,7 @@ char* path_make_absolute_cwd(const char *p);
+ int path_make_relative(const char *from_dir, const char *to_path, char **_r);
+ char* path_kill_slashes(char *path);
+ char* path_startswith(const char *path, const char *prefix) _pure_;
++int path_compare(const char *a, const char *b) _pure_;
+ bool path_equal(const char *a, const char *b) _pure_;
+ 
+ char** path_strv_make_absolute_cwd(char **l);
+diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
+index 19462c3..1055e9f 100644
+--- a/src/test/test-path-util.c
++++ b/src/test/test-path-util.c
+@@ -27,23 +27,37 @@
+ #include "macro.h"
+ #include "strv.h"
+ 
++#define test_path_compare(a, b, result) {                 \
++                assert_se(path_compare(a, b) == result);  \
++                assert_se(path_compare(b, a) == -result); \
++                assert_se(path_equal(a, b) == !result);   \
++                assert_se(path_equal(b, a) == !result);   \
++        }
+ 
+ static void test_path(void) {
+-        assert_se(path_equal("/goo", "/goo"));
+-        assert_se(path_equal("//goo", "/goo"));
+-        assert_se(path_equal("//goo/////", "/goo"));
+-        assert_se(path_equal("goo/////", "goo"));
++        test_path_compare("/goo", "/goo", 0);
++        test_path_compare("/goo", "/goo", 0);
++        test_path_compare("//goo", "/goo", 0);
++        test_path_compare("//goo/////", "/goo", 0);
++        test_path_compare("goo/////", "goo", 0);
++
++        test_path_compare("/goo/boo", "/goo//boo", 0);
++        test_path_compare("//goo/boo", "/goo/boo//", 0);
+ 
+-        assert_se(path_equal("/goo/boo", "/goo//boo"));
+-        assert_se(path_equal("//goo/boo", "/goo/boo//"));
++        test_path_compare("/", "///", 0);
+ 
+-        assert_se(path_equal("/", "///"));
++        test_path_compare("/x", "x/", 1);
++        test_path_compare("x/", "/", -1);
+ 
+-        assert_se(!path_equal("/x", "x/"));
+-        assert_se(!path_equal("x/", "/"));
++        test_path_compare("/x/./y", "x/y", 1);
++        test_path_compare("x/.y", "x/y", -1);
+ 
+-        assert_se(!path_equal("/x/./y", "x/y"));
+-        assert_se(!path_equal("x/.y", "x/y"));
++        test_path_compare("foo", "/foo", -1);
++        test_path_compare("/foo", "/foo/bar", -1);
++        test_path_compare("/foo/aaa", "/foo/b", -1);
++        test_path_compare("/foo/aaa", "/foo/b/a", -1);
++        test_path_compare("/foo/a", "/foo/aaa", -1);
++        test_path_compare("/foo/a/b", "/foo/aaa", -1);
+ 
+         assert_se(path_is_absolute("/"));
+         assert_se(!path_is_absolute("./"));

--- End Message ---
--- Begin Message ---
Version: 8.3

Hi,

The updates referred to in these bugs were included in today's 8.3
Jessie point release.

Regards,

Adam

--- End Message ---

Reply to: