From 6cf2c2919d84c03adc14d3922efa503ed116f231 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Tue, 24 Mar 2015 14:55:46 -0700 Subject: [PATCH] systemd: prune old versions --- .../coreos-overlay/sys-apps/systemd/Manifest | 4 +- ...fuse-ld-gold-does-not-work-correctly.patch | 47 -- ...ig-after-tmpfiles-setup-to-ensure-ld.patch | 27 - ...-don-t-return-uninitialized-variable.patch | 26 - ...le-setup-run-setfont-before-loadkeys.patch | 94 --- ...le-setup-fix-inverted-error-messages.patch | 37 -- ...-ignore-errors-due-to-missing-MAC-ad.patch | 42 -- ...7F-a-control-chracter-which-it-is-DE.patch | 55 -- ...archs-to-ConditionArchitecture-descr.patch | 48 -- ...-are-no-longer-detected-by-Condition.patch | 25 - ...c-terminate-string-array-elements-wi.patch | 38 -- ...ces-to-the-priviliged-command-line-o.patch | 52 -- ...add-comma-when-removed-option-is-in-.patch | 28 - ...mat-attribute-and-fix-a-wrong-caller.patch | 45 -- ...ed-fix-format-string-for-usec_t-type.patch | 25 - ...switching-to-unused-VTs-via-SwitchTo.patch | 37 -- ...sual-alignment-for-lines-prefixed-wi.patch | 26 - ...n-t-wait-for-new-data-from-the-senso.patch | 75 --- ...llow-user-names-longer-than-UT_NAMES.patch | 54 -- ...-include-PolicyKit-files-as-part-of-.patch | 34 -- ...-distribute-generated-emergency.serv.patch | 29 - ...ysusers.d-correct-default-user-shell.patch | 27 - ...20-rules-consistently-use-instead-of.patch | 69 --- ...ss-resync-at-system-time-change-when.patch | 33 - ...isten-to-clock-changes-when-connecte.patch | 47 -- ...fix-oneshot-service-resource-control.patch | 28 - ...-allow-files-with-no-data-whatsoever.patch | 33 - ...ty-.service-use-the-default-RestartS.patch | 34 -- ...rly-track-addresses-when-first-added.patch | 104 ---- ...lear-dhcpv6-lease-timers-if-there-s-.patch | 29 - ...section-DHCP-in-systemd.network-file.patch | 25 - ...cp-network-add-check-for-DHCP.chaddr.patch | 106 ---- ...030-networkd-netdev-add-missing-refs.patch | 69 --- ...5-0031-networkd-link-fix-memory-leak.patch | 28 - ...lient-make-request-broadcasts-opt-in.patch | 141 ----- ...-fix-reporting-errors-from-hostnamed.patch | 29 - ...support-for-getting-local-domain-fro.patch | 94 --- ...fuse-ld-gold-does-not-work-correctly.patch | 47 -- ...ig-after-tmpfiles-setup-to-ensure-ld.patch | 27 - ...nfig-fix-crash-due-to-missing-hwaddr.patch | 31 - ...038-units-run-ldconfig-on-every-boot.patch | 28 - ...Allow-mount.usr-without-mount.usrfla.patch | 47 -- .../sys-apps/systemd/systemd-215-r16.ebuild | 521 ---------------- .../sys-apps/systemd/systemd-217-r5.ebuild | 568 ------------------ 44 files changed, 1 insertion(+), 3012 deletions(-) delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0002-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0001-machine-don-t-return-uninitialized-variable.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0002-vconsole-setup-run-setfont-before-loadkeys.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0003-vconsole-setup-fix-inverted-error-messages.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0004-udev-link_config-ignore-errors-due-to-missing-MAC-ad.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0005-util-consider-0x7F-a-control-chracter-which-it-is-DE.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0006-man-add-missing-archs-to-ConditionArchitecture-descr.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0007-man-chroot-jails-are-no-longer-detected-by-Condition.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0008-base-filesystem.c-terminate-string-array-elements-wi.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0009-man-drop-references-to-the-priviliged-command-line-o.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0010-fstab-generator-add-comma-when-removed-option-is-in-.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0011-dropin-add-format-attribute-and-fix-a-wrong-caller.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0012-shared-fix-format-string-for-usec_t-type.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0013-logind-allow-switching-to-unused-VTs-via-SwitchTo.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0014-systemctl-fix-visual-alignment-for-lines-prefixed-wi.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0015-accelerometer-Don-t-wait-for-new-data-from-the-senso.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0016-sysusers-don-t-allow-user-names-longer-than-UT_NAMES.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0017-Revert-build-sys-include-PolicyKit-files-as-part-of-.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0018-build-sys-Do-not-distribute-generated-emergency.serv.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0019-man-sysusers.d-correct-default-user-shell.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0020-rules-consistently-use-instead-of.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0021-timesyncd-suppress-resync-at-system-time-change-when.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0022-timesyncd-only-listen-to-clock-changes-when-connecte.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0023-core-fix-oneshot-service-resource-control.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0024-journal-allow-files-with-no-data-whatsoever.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0025-units-serial-getty-.service-use-the-default-RestartS.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0026-networkd-properly-track-addresses-when-first-added.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0027-networkd-don-t-clear-dhcpv6-lease-timers-if-there-s-.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0028-networkd-accept-section-DHCP-in-systemd.network-file.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0029-dhcp-network-add-check-for-DHCP.chaddr.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0030-networkd-netdev-add-missing-refs.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0031-networkd-link-fix-memory-leak.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0032-sd-dhcp-client-make-request-broadcasts-opt-in.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0033-networkd-fix-reporting-errors-from-hostnamed.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0034-resolved-re-add-support-for-getting-local-domain-fro.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0035-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0036-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0037-udev-link-config-fix-crash-due-to-missing-hwaddr.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0038-units-run-ldconfig-on-every-boot.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/217-0001-fstab-generator-Allow-mount.usr-without-mount.usrfla.patch delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r16.ebuild delete mode 100644 sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-217-r5.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/Manifest index 1cf3667257..43ae45db07 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/Manifest @@ -1,4 +1,2 @@ -DIST systemd-215.tar.xz 2888652 SHA256 ce76a3c05e7d4adc806a3446a5510c0c9b76a33f19adc32754b69a0945124505 SHA512 58de0bf7c43c309c2f8e4b7af16b46608a4ea39cbb280496fe5d43d76ea25545484f4ef62efce18be487c69134e4a038d8787f2c262484f92f7fc6feb3ae2f11 WHIRLPOOL 07389822b9f09cd91f360f3cbdcd0b5bf46ba1750dd1a4ad44fd2813436ef40b447b954d33582ffe83aebde618ecbeac4d2f3231d8afbf3975caf84f52b1053a -DIST systemd-217.tar.xz 3694524 SHA256 a031e6fbcdc7077b37338bae8074d9428ee2fa98033beb4923a62871890f7498 SHA512 7a0b13330b621ec179499018bfbe9619a91cdbd120ae2067e19cbb9bbc25c80dd0f80aac217d823be1332054439bc9b2153ac78fc1eb231fa0fd55cb3bf7a70f WHIRLPOOL f22674a629b7b928875b6b06b0cffaf5874cdcb90c44787279cd8ff2a798e5bc525c1058f8b2bfe746d100c4d7686e36a6f604276d5735f7554122e4caad6689 DIST systemd-218.tar.xz 3782276 SHA256 1b0768b53b6c6d813a93a4b8fe1f80cf53561b09075010a97c7aa08eee3fd59b SHA512 c183cce8532ccb4716b84587c96a626eea390202a5469b9d89c8cee7f703e40d7c584e05f29501d375b8cd2a1409d011de564df16f54e27f66b3c3007a6e5bd4 WHIRLPOOL 4d0bcf3ddfecd3354d9f4ab13851f8da6baf31e89e64d3b1ac671159f16f23597d88cc2525aece2f867c140fc97e80bce086a5af91f84b8095e2503c13995e6d -DIST systemd-gentoo-patches-217-r1.tar.xz 8388 SHA256 09a75238e12f520560de2a0714a0c37f206e25ae2c348cbfbf6ea526307e7a1b SHA512 bf310fa0dbcc82c49d7d537fb0cddd79ab83c836888706b946f110424a35cd71da9c509cc968a2dc3ccbb5ef6947b2d8b45b9d58a64da3c3dea269d8e8cf5fa7 WHIRLPOOL aad35822a2bed9f60a04245bd79434833e6f08331768b3bac2cea59c37e405064c29b5dca2f767eeace723a6daaf456862667aebc1c4b4a47548c817b5721755 +DIST systemd-219.tar.xz 3938228 SHA256 5c57113454e37c040d0cb481bd960ae7cf3a3fe0a231ff4945259bc74503f2d9 SHA512 19a92891996723bbd83fe745f365d25b2879a059466670aebb9e9fbb6a79a3ed6e1a93e8b76042605038766cabad3ddb89aff40b4a11ab830ffa7dc64f87234f WHIRLPOOL 440868c47bed26571084009fa86d267c921cd5cbbc63b596c1161ef7f33a1b9427ad315450014cd729c761b27bf42542c3b0b7ca68e09b23fc8f606147e7e9fb diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch deleted file mode 100644 index c8d5a52ae3..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 00197239142c519270e44f94b1126a45e7f65511 Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Sat, 2 Aug 2014 17:45:00 -0700 -Subject: [PATCH] hack: testing -Wl,-fuse-ld=gold does not work correctly on - hardened - -Not sure why this test falsely passes with the hardened compiler when it -normally will report the following error: - - ld: -f may not be used without -shared - -But apparently the default options hardened uses makes interpreting the -option as -f valid usage. For reference the option is: - - -f name - --auxiliary=name - When creating an ELF shared object, set the internal DT_AUXILIARY - field to the specified name. This tells the dynamic linker that - the symbol table of the shared object should be used as an - auxiliary filter on the symbol table of the shared object name. - -This in turn causes a stray library to show up in ldd output: - - use-ld=gold => not found - -Which seems mostly harmless but does cause some confusion. ---- - configure.ac | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ae88382..85966b9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -216,8 +216,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ - -Wl,--gc-sections \ - -Wl,-z,relro \ - -Wl,-z,now \ -- -pie \ -- -Wl,-fuse-ld=gold]) -+ -pie]) - AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags") - - AC_CHECK_SIZEOF(pid_t) --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0002-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0002-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch deleted file mode 100644 index 491d791c28..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/0002-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a5ad570fc0577080f994ac7f864470aa9fbd95d8 Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Sun, 3 Aug 2014 18:16:07 -0700 -Subject: [PATCH] units: run ldconfig after tmpfiles-setup to ensure ld.so.conf - exists - -We lost this ordering when we switched to this unit instead of our own. ---- - units/ldconfig.service | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/units/ldconfig.service b/units/ldconfig.service -index 43c145b..c8d9b6b 100644 ---- a/units/ldconfig.service -+++ b/units/ldconfig.service -@@ -10,7 +10,7 @@ Description=Rebuild Dynamic Linker Cache - Documentation=man:ldconfig(8) - DefaultDependencies=no - Conflicts=shutdown.target --After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service -+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service systemd-tmpfiles-setup.service - Before=sysinit.target shutdown.target systemd-update-done.service - ConditionNeedsUpdate=/etc - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0001-machine-don-t-return-uninitialized-variable.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0001-machine-don-t-return-uninitialized-variable.patch deleted file mode 100644 index 13e96de405..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0001-machine-don-t-return-uninitialized-variable.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d26956e27de9ec6d7bfd22da985136ae22930eaf Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Sun, 6 Jul 2014 14:12:28 +0200 -Subject: [PATCH 01/37] machine: don't return uninitialized variable - -Repotred by Ronny Chevalier ---- - src/machine/machine.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/machine/machine.c b/src/machine/machine.c -index c0fa1b2..cf38e3f 100644 ---- a/src/machine/machine.c -+++ b/src/machine/machine.c -@@ -371,7 +371,7 @@ static int machine_stop_scope(Machine *m) { - free(m->scope_job); - m->scope_job = job; - -- return r; -+ return 0; - } - - int machine_stop(Machine *m) { --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0002-vconsole-setup-run-setfont-before-loadkeys.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0002-vconsole-setup-run-setfont-before-loadkeys.patch deleted file mode 100644 index 4c381c8162..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0002-vconsole-setup-run-setfont-before-loadkeys.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 79c9e82026d0c2e9466a5b2bc81ee7a3d16b1ade Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 1 Jul 2014 22:20:11 -0400 -Subject: [PATCH 02/37] vconsole-setup: run setfont before loadkeys - -https://bugs.freedesktop.org/show_bug.cgi?id=80685 ---- - src/vconsole/vconsole-setup.c | 48 +++++++++++++++++++++---------------------- - 1 file changed, 23 insertions(+), 25 deletions(-) - -diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index e0c4050..25d15af 100644 ---- a/src/vconsole/vconsole-setup.c -+++ b/src/vconsole/vconsole-setup.c -@@ -238,12 +238,10 @@ static void font_copy_to_all_vcs(int fd) { - - int main(int argc, char **argv) { - const char *vc; -- char *vc_keymap = NULL; -- char *vc_keymap_toggle = NULL; -- char *vc_font = NULL; -- char *vc_font_map = NULL; -- char *vc_font_unimap = NULL; -- int fd = -1; -+ _cleanup_free_ char -+ *vc_keymap = NULL, *vc_keymap_toggle = NULL, -+ *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL; -+ _cleanup_close_ int fd = -1; - bool utf8; - pid_t font_pid = 0, keymap_pid = 0; - bool font_copy = false; -@@ -265,12 +263,12 @@ int main(int argc, char **argv) { - fd = open_terminal(vc, O_RDWR|O_CLOEXEC); - if (fd < 0) { - log_error("Failed to open %s: %m", vc); -- goto finish; -+ return EXIT_FAILURE; - } - - if (!is_vconsole(fd)) { - log_error("Device %s is not a virtual console.", vc); -- goto finish; -+ return EXIT_FAILURE; - } - - utf8 = is_locale_utf8(); -@@ -305,27 +303,27 @@ int main(int argc, char **argv) { - else - disable_utf8(fd); - -- r = EXIT_FAILURE; -- if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 && -- font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0) -- r = EXIT_SUCCESS; -- --finish: -- if (keymap_pid > 0) -- wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); -+ r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid); -+ if (r < 0) { -+ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r)); -+ return EXIT_FAILURE; -+ } - -- if (font_pid > 0) { -+ if (font_pid > 0) - wait_for_terminate_and_warn(KBD_SETFONT, font_pid); -- if (font_copy) -- font_copy_to_all_vcs(fd); -+ -+ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid); -+ if (r < 0) { -+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r)); -+ return EXIT_FAILURE; - } - -- free(vc_keymap); -- free(vc_font); -- free(vc_font_map); -- free(vc_font_unimap); -+ if (keymap_pid > 0) -+ wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid); - -- safe_close(fd); -+ /* Only copy the font when we started setfont successfully */ -+ if (font_copy && font_pid > 0) -+ font_copy_to_all_vcs(fd); - -- return r; -+ return EXIT_SUCCESS; - } --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0003-vconsole-setup-fix-inverted-error-messages.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0003-vconsole-setup-fix-inverted-error-messages.patch deleted file mode 100644 index d70d81536b..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0003-vconsole-setup-fix-inverted-error-messages.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b44c15f77e59d40d5bdf5608bf8d76cc2375ac6e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Mon, 7 Jul 2014 08:55:30 -0400 -Subject: [PATCH 03/37] vconsole-setup: fix inverted error messages - -Introduced in abee28c56d. - -Pointed-out-by: Werner Fink ---- - src/vconsole/vconsole-setup.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c -index 25d15af..645b1e6 100644 ---- a/src/vconsole/vconsole-setup.c -+++ b/src/vconsole/vconsole-setup.c -@@ -305,7 +305,7 @@ int main(int argc, char **argv) { - - r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid); - if (r < 0) { -- log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r)); -+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r)); - return EXIT_FAILURE; - } - -@@ -314,7 +314,7 @@ int main(int argc, char **argv) { - - r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid); - if (r < 0) { -- log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r)); -+ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r)); - return EXIT_FAILURE; - } - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0004-udev-link_config-ignore-errors-due-to-missing-MAC-ad.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0004-udev-link_config-ignore-errors-due-to-missing-MAC-ad.patch deleted file mode 100644 index c654cce439..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0004-udev-link_config-ignore-errors-due-to-missing-MAC-ad.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 36749d890949896f3105fc852cfb5b8c2f22af3e Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Mon, 7 Jul 2014 14:50:16 +0200 -Subject: [PATCH 04/37] udev: link_config - ignore errors due to missing MAC - address - -Otherwis, we get misleading error messages on links with MACs. - -Reported by Leonid Isaev. ---- - src/udev/net/link-config.c | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c -index b8650a6..5a45c53 100644 ---- a/src/udev/net/link-config.c -+++ b/src/udev/net/link-config.c -@@ -383,7 +383,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev - case MACPOLICY_PERSISTENT: - if (mac_is_random(device)) { - r = get_mac(device, false, &generated_mac); -- if (r < 0) -+ if (r == -ENOENT) -+ break; -+ else if (r < 0) - return r; - mac = &generated_mac; - } -@@ -391,7 +393,9 @@ int link_config_apply(link_config_ctx *ctx, link_config *config, struct udev_dev - case MACPOLICY_RANDOM: - if (!mac_is_random(device)) { - r = get_mac(device, true, &generated_mac); -- if (r < 0) -+ if (r == -ENOENT) -+ break; -+ else if (r < 0) - return r; - mac = &generated_mac; - } --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0005-util-consider-0x7F-a-control-chracter-which-it-is-DE.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0005-util-consider-0x7F-a-control-chracter-which-it-is-DE.patch deleted file mode 100644 index 6bfce0bc7b..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0005-util-consider-0x7F-a-control-chracter-which-it-is-DE.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 1335bbd1c9dd114d6491f08bc3b2c5eaf3768a04 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 7 Jul 2014 11:47:10 +0200 -Subject: [PATCH 05/37] util: consider 0x7F a control chracter (which it is: - DEL) - -Let's better be safe than sorry. ---- - src/shared/util.c | 12 ++++++++++-- - 1 file changed, 10 insertions(+), 2 deletions(-) - -diff --git a/src/shared/util.c b/src/shared/util.c -index 3d875c7..d25ee66 100644 ---- a/src/shared/util.c -+++ b/src/shared/util.c -@@ -1608,8 +1608,9 @@ int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) { - return -ETIMEDOUT; - } - -+ errno = 0; - if (!fgets(line, sizeof(line), f)) -- return -EIO; -+ return errno ? -errno : -EIO; - - truncate_nl(line); - -@@ -5355,6 +5356,9 @@ bool string_is_safe(const char *p) { - if (*t > 0 && *t < ' ') - return false; - -+ if (*t == 127) -+ return false; -+ - if (strchr("\\\"\'", *t)) - return false; - } -@@ -5371,10 +5375,14 @@ bool string_has_cc(const char *p) { - - assert(p); - -- for (t = p; *t; t++) -+ for (t = p; *t; t++) { - if (*t > 0 && *t < ' ' && *t != '\t') - return true; - -+ if (*t == 127) -+ return true; -+ } -+ - return false; - } - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0006-man-add-missing-archs-to-ConditionArchitecture-descr.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0006-man-add-missing-archs-to-ConditionArchitecture-descr.patch deleted file mode 100644 index bd3f104d65..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0006-man-add-missing-archs-to-ConditionArchitecture-descr.patch +++ /dev/null @@ -1,48 +0,0 @@ -From efbcb2ef7b6337530ece0a251b80b35c109fcdf7 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 7 Jul 2014 14:58:13 +0200 -Subject: [PATCH 06/37] man: add missing archs to ConditionArchitecture= - description - ---- - man/systemd.unit.xml | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml -index 960fb90..be0873c 100644 ---- a/man/systemd.unit.xml -+++ b/man/systemd.unit.xml -@@ -931,7 +931,9 @@ - x86, - x86-64, - ppc, -+ ppc-le, - ppc64, -+ ppc64-le, - ia64, - parisc, - parisc64, -@@ -940,7 +942,9 @@ - sparc, - sparc64, - mips, -+ mips-le, - mips64, -+ mips64-le, - alpha, - arm, - arm-be, -@@ -948,7 +952,9 @@ - arm64-be, - sh, - sh64, -- m86k to test -+ m86k, -+ tilegx, -+ cris to test - against a specific architecture. The - architecture is determined from the - information returned by --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0007-man-chroot-jails-are-no-longer-detected-by-Condition.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0007-man-chroot-jails-are-no-longer-detected-by-Condition.patch deleted file mode 100644 index e1c4235c6f..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0007-man-chroot-jails-are-no-longer-detected-by-Condition.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cb59448753d949cd31c5a84bccc37f10597e23d7 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 7 Jul 2014 14:58:36 +0200 -Subject: [PATCH 07/37] man: chroot jails are no longer detected by - ConditionVirtualization= - ---- - man/systemd.unit.xml | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml -index be0873c..cd3279c 100644 ---- a/man/systemd.unit.xml -+++ b/man/systemd.unit.xml -@@ -990,7 +990,6 @@ - oracle, - xen, - bochs, -- chroot, - uml, - openvz, - lxc, --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0008-base-filesystem.c-terminate-string-array-elements-wi.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0008-base-filesystem.c-terminate-string-array-elements-wi.patch deleted file mode 100644 index 85fca095cf..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0008-base-filesystem.c-terminate-string-array-elements-wi.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 5055a12659b731d78cc30553576193905b6530ae Mon Sep 17 00:00:00 2001 -From: Harald Hoyer -Date: Mon, 7 Jul 2014 17:45:53 +0200 -Subject: [PATCH 08/37] base-filesystem.c: terminate string array elements with - \0 - -NULSTR_FOREACH() looks for a terminating zero and the element also needs -one. ---- - src/shared/base-filesystem.c | 11 ++++++----- - 1 file changed, 6 insertions(+), 5 deletions(-) - -diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c -index daaeaca..addd26c 100644 ---- a/src/shared/base-filesystem.c -+++ b/src/shared/base-filesystem.c -@@ -42,12 +42,13 @@ typedef struct BaseFilesystem { - } BaseFilesystem; - - static const BaseFilesystem table[] = { -- { "bin", 0, "usr/bin", NULL }, -- { "lib", 0, "usr/lib", NULL }, -- { "root", 0755, NULL, NULL }, -- { "sbin", 0, "usr/sbin", NULL }, -+ { "bin", 0, "usr/bin\0", NULL }, -+ { "lib", 0, "usr/lib\0", NULL }, -+ { "root", 0755, NULL, NULL }, -+ { "sbin", 0, "usr/sbin\0", NULL }, - #if defined(__i386__) || defined(__x86_64__) -- { "lib64", 0, "usr/lib/x86_64-linux-gnu\0usr/lib64", "ld-linux-x86-64.so.2" }, -+ { "lib64", 0, "usr/lib/x86_64-linux-gnu\0" -+ "usr/lib64\0", "ld-linux-x86-64.so.2" }, - #endif - }; - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0009-man-drop-references-to-the-priviliged-command-line-o.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0009-man-drop-references-to-the-priviliged-command-line-o.patch deleted file mode 100644 index 3aa4faec7a..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0009-man-drop-references-to-the-priviliged-command-line-o.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 1a45876927c5a2fb7a48d4ecd00359b37b8e1c4f Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 7 Jul 2014 18:45:07 +0200 -Subject: [PATCH 09/37] man: drop references to the --priviliged command line - option which has been removed a while back - ---- - man/hostnamectl.xml | 8 -------- - man/localectl.xml | 8 -------- - 2 files changed, 16 deletions(-) - -diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml -index 71973fd..4e456eb 100644 ---- a/man/hostnamectl.xml -+++ b/man/hostnamectl.xml -@@ -102,14 +102,6 @@ - - - -- -- -- -- Acquire privileges via PolicyKit -- before executing the operation. -- -- -- - - - -diff --git a/man/localectl.xml b/man/localectl.xml -index c2e79a2..9c32c79 100644 ---- a/man/localectl.xml -+++ b/man/localectl.xml -@@ -90,14 +90,6 @@ - - - -- -- -- -- Acquire privileges via PolicyKit -- before executing the operation. -- -- -- - - - If --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0010-fstab-generator-add-comma-when-removed-option-is-in-.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0010-fstab-generator-add-comma-when-removed-option-is-in-.patch deleted file mode 100644 index 6b007537cc..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0010-fstab-generator-add-comma-when-removed-option-is-in-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f71f5fa7f6796cb809a2b827a5348cc494c128e1 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Mon, 7 Jul 2014 16:10:38 -0400 -Subject: [PATCH 10/37] fstab-generator: add comma when removed option is in - the middle - -xxx,x-systemd.default-timeout=y,zzz was filtered to xxxzzz, -but should be xxx,zzz, of course. ---- - src/shared/generator.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/shared/generator.c b/src/shared/generator.c -index 5d5b6a0..2f9e595 100644 ---- a/src/shared/generator.c -+++ b/src/shared/generator.c -@@ -125,7 +125,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher - char *prefix, *postfix; - - prefix = strndupa(opts, start - opts - (start != opts)); -- postfix = timeout + len + (timeout[len] != '\0'); -+ postfix = timeout + len + (start == opts && timeout[len] != '\0'); - *filtered = strjoin(prefix, *postfix ? postfix : NULL, NULL); - if (!*filtered) - return log_oom(); --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0011-dropin-add-format-attribute-and-fix-a-wrong-caller.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0011-dropin-add-format-attribute-and-fix-a-wrong-caller.patch deleted file mode 100644 index b4e9f7cc96..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0011-dropin-add-format-attribute-and-fix-a-wrong-caller.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 05e483d224be6a7c057a7b6eb30d830fea18eda8 Mon Sep 17 00:00:00 2001 -From: Thomas Hindoe Paaboel Andersen -Date: Mon, 7 Jul 2014 21:40:00 +0200 -Subject: [PATCH 11/37] dropin: add format attribute and fix a wrong caller - ---- - src/shared/dropin.h | 4 +++- - src/shared/generator.c | 2 +- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/shared/dropin.h b/src/shared/dropin.h -index 27a2b29..9c9742d 100644 ---- a/src/shared/dropin.h -+++ b/src/shared/dropin.h -@@ -21,6 +21,8 @@ - along with systemd; If not, see . - ***/ - -+#include "macro.h" -+ - int drop_in_file(const char *dir, const char *unit, unsigned level, - const char *name, char **_p, char **_q); - -@@ -28,4 +30,4 @@ int write_drop_in(const char *dir, const char *unit, unsigned level, - const char *name, const char *data); - - int write_drop_in_format(const char *dir, const char *unit, unsigned level, -- const char *name, const char *format, ...); -+ const char *name, const char *format, ...) _printf_(5, 6); -diff --git a/src/shared/generator.c b/src/shared/generator.c -index 2f9e595..5d4cb5d 100644 ---- a/src/shared/generator.c -+++ b/src/shared/generator.c -@@ -148,7 +148,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher - - return write_drop_in_format(dir, unit, 50, "device-timeout", - "# Automatically generated by %s\n\n" -- "[Unit]\nJobTimeoutSec=%u", -+ "[Unit]\nJobTimeoutSec=%lu", - program_invocation_short_name, - u / USEC_PER_SEC); - } --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0012-shared-fix-format-string-for-usec_t-type.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0012-shared-fix-format-string-for-usec_t-type.patch deleted file mode 100644 index a074154d35..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0012-shared-fix-format-string-for-usec_t-type.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 8070ab78b7bba4a20bba278086580d6582c96e80 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Mon, 7 Jul 2014 22:49:59 +0200 -Subject: [PATCH 12/37] shared: fix format string for usec_t type - ---- - src/shared/generator.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/shared/generator.c b/src/shared/generator.c -index 5d4cb5d..414470b 100644 ---- a/src/shared/generator.c -+++ b/src/shared/generator.c -@@ -148,7 +148,7 @@ int generator_write_timeouts(const char *dir, const char *what, const char *wher - - return write_drop_in_format(dir, unit, 50, "device-timeout", - "# Automatically generated by %s\n\n" -- "[Unit]\nJobTimeoutSec=%lu", -+ "[Unit]\nJobTimeoutSec=" USEC_FMT, - program_invocation_short_name, - u / USEC_PER_SEC); - } --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0013-logind-allow-switching-to-unused-VTs-via-SwitchTo.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0013-logind-allow-switching-to-unused-VTs-via-SwitchTo.patch deleted file mode 100644 index 03ccee5490..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0013-logind-allow-switching-to-unused-VTs-via-SwitchTo.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 82155b957fac44db3858e1b008cf31e5004d40cd Mon Sep 17 00:00:00 2001 -From: David Herrmann -Date: Tue, 8 Jul 2014 12:56:55 +0200 -Subject: [PATCH 13/37] logind: allow switching to unused VTs via SwitchTo() - -If compositors use the new SwitchTo() logic to map F1-F12, we should allow -them to switch to unregistered VTs, too. Otherwise, the auto-spawn logic -of gettys won't trigger. - -Reported-by: Jasper St. Pierre -Signed-off-by: David Herrmann ---- - src/login/logind-seat.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c -index 3114de8..9992195 100644 ---- a/src/login/logind-seat.c -+++ b/src/login/logind-seat.c -@@ -275,8 +275,13 @@ int seat_switch_to(Seat *s, unsigned int num) { - if (!num) - return -EINVAL; - -- if (num >= s->position_count || !s->positions[num]) -+ if (num >= s->position_count || !s->positions[num]) { -+ /* allow switching to unused VTs to trigger auto-activate */ -+ if (seat_has_vts(s) && num < 64) -+ return chvt(num); -+ - return -EINVAL; -+ } - - return session_activate(s->positions[num]); - } --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0014-systemctl-fix-visual-alignment-for-lines-prefixed-wi.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0014-systemctl-fix-visual-alignment-for-lines-prefixed-wi.patch deleted file mode 100644 index 04a7c2eb11..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0014-systemctl-fix-visual-alignment-for-lines-prefixed-wi.patch +++ /dev/null @@ -1,26 +0,0 @@ -From d91cba9f5ed3aee340115bd4b4097bf3bf396365 Mon Sep 17 00:00:00 2001 -From: Michal Schmidt -Date: Tue, 8 Jul 2014 15:17:36 +0200 -Subject: [PATCH 14/37] systemctl: fix visual alignment for lines prefixed with - color dots - ---- - src/systemctl/systemctl.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 03720f4..8086e1e 100644 ---- a/src/systemctl/systemctl.c -+++ b/src/systemctl/systemctl.c -@@ -456,7 +456,7 @@ static int output_units_list(const UnitInfo *unit_infos, unsigned c) { - } - - if (circle_len > 0) -- printf("%s%s%s", on_circle, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : " ", off_circle); -+ printf("%s%s%s ", on_circle, circle ? draw_special_char(DRAW_BLACK_CIRCLE) : " ", off_circle); - - printf("%s%-*s%s %s%-*s%s %s%-*s %-*s%s %-*s", - on_active, id_len, id, off_active, --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0015-accelerometer-Don-t-wait-for-new-data-from-the-senso.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0015-accelerometer-Don-t-wait-for-new-data-from-the-senso.patch deleted file mode 100644 index 2183aafe36..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0015-accelerometer-Don-t-wait-for-new-data-from-the-senso.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 18dd397f6383eb21ba383840dd9b10feaca4a663 Mon Sep 17 00:00:00 2001 -From: Bastien Nocera -Date: Tue, 8 Jul 2014 18:29:06 +0200 -Subject: [PATCH 15/37] accelerometer: Don't wait for new data from the sensor - -Instead of waiting for new data from the sensor, which might be -a long time coming, depending on the sensor device, ask the kernel -for the last state for that particular input device. ---- - src/udev/accelerometer/accelerometer.c | 33 ++++++--------------------------- - 1 file changed, 6 insertions(+), 27 deletions(-) - -diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c -index 925d38d..32adf27 100644 ---- a/src/udev/accelerometer/accelerometer.c -+++ b/src/udev/accelerometer/accelerometer.c -@@ -180,7 +180,7 @@ get_prev_orientation(struct udev_device *dev) - return string_to_orientation(value); - } - --#define SET_AXIS(axis, code_) if (ev[i].code == code_) { if (got_##axis == 0) { axis = ev[i].value; got_##axis = true; } } -+#define READ_AXIS(axis, var) { memzero(&abs_info, sizeof(abs_info)); r = ioctl(fd, EVIOCGABS(axis), &abs_info); if (r < 0) return; var = abs_info.value; } - - /* accelerometers */ - static void test_orientation(struct udev *udev, -@@ -189,10 +189,9 @@ static void test_orientation(struct udev *udev, - { - OrientationUp old, new; - _cleanup_close_ int fd = -1; -- struct input_event ev[64]; -- bool got_syn = false; -- bool got_x = false, got_y = false, got_z = false; -+ struct input_absinfo abs_info; - int x = 0, y = 0, z = 0; -+ int r; - char text[64]; - - old = get_prev_orientation(dev); -@@ -201,30 +200,10 @@ static void test_orientation(struct udev *udev, - if (fd < 0) - return; - -- while (1) { -- int i, r; -- -- r = read(fd, ev, sizeof(struct input_event) * 64); -- -- if (r < (int) sizeof(struct input_event)) -- return; -- -- for (i = 0; i < r / (int) sizeof(struct input_event); i++) { -- if (got_syn) { -- if (ev[i].type == EV_ABS) { -- SET_AXIS(x, ABS_X); -- SET_AXIS(y, ABS_Y); -- SET_AXIS(z, ABS_Z); -- } -- } -- if (ev[i].type == EV_SYN && ev[i].code == SYN_REPORT) -- got_syn = true; -- if (got_x && got_y && got_z) -- goto read_dev; -- } -- } -+ READ_AXIS(ABS_X, x); -+ READ_AXIS(ABS_Y, y); -+ READ_AXIS(ABS_Z, z); - --read_dev: - new = orientation_calc(old, x, y, z); - snprintf(text, sizeof(text), - "ID_INPUT_ACCELEROMETER_ORIENTATION=%s", orientation_to_string(new)); --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0016-sysusers-don-t-allow-user-names-longer-than-UT_NAMES.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0016-sysusers-don-t-allow-user-names-longer-than-UT_NAMES.patch deleted file mode 100644 index cfa849b0b5..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0016-sysusers-don-t-allow-user-names-longer-than-UT_NAMES.patch +++ /dev/null @@ -1,54 +0,0 @@ -From c4067527b6c8875b1cb767cf4efd14998cf17c34 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Wed, 9 Jul 2014 19:20:58 +0200 -Subject: [PATCH 16/37] sysusers: don't allow user names longer than - UT_NAMESIZE -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -As pointed out by Miloslav Trmač it might be a good idea to make sure -that usernames stay with in the utmp-defined limits. ---- - man/sysusers.d.xml | 2 +- - src/sysusers/sysusers.c | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml -index 549b3f6..40f8715 100644 ---- a/man/sysusers.d.xml -+++ b/man/sysusers.d.xml -@@ -142,7 +142,7 @@ m authd input - Name - - The name field specifies the user or -- group name. It should be be shorter than 256 -+ group name. It should be be shorter than 31 - characters and avoid any non-ASCII characters, - and not begin with a numeric character. It is - strongly recommended to pick user and group -diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c -index 1209a5a..dfac7e6 100644 ---- a/src/sysusers/sysusers.c -+++ b/src/sysusers/sysusers.c -@@ -24,6 +24,7 @@ - #include - #include - #include -+#include - - #include "util.h" - #include "hashmap.h" -@@ -1095,6 +1096,9 @@ static bool valid_user_group_name(const char *u) { - if ((size_t) (i-u) > (size_t) sz) - return false; - -+ if ((size_t) (i-u) > UT_NAMESIZE - 1) -+ return false; -+ - return true; - } - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0017-Revert-build-sys-include-PolicyKit-files-as-part-of-.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0017-Revert-build-sys-include-PolicyKit-files-as-part-of-.patch deleted file mode 100644 index cdadf5c2c7..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0017-Revert-build-sys-include-PolicyKit-files-as-part-of-.patch +++ /dev/null @@ -1,34 +0,0 @@ -From b407f12e7656916b25b3b3c006290187e1064793 Mon Sep 17 00:00:00 2001 -From: Mike Gilbert -Date: Fri, 4 Jul 2014 14:43:14 -0400 -Subject: [PATCH 17/37] Revert "build-sys: include PolicyKit files as part of - distribution" - -This reverts commit 0c26bfc3d21fdb3963f1248c237e2f1a33b5566d. - -src/core/org.freedesktop.systemd1.policy.in.in depends on values which -are specified at configure time, so we cannot ship the corresponding -policy file in the tarball. - -Since we need to regenerate one policy file, we might as well generate -them all. ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index e238cde..32dc1fd 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -5216,7 +5216,7 @@ units/user/%: units/%.m4 - $(AM_V_M4)$(M4) -P $(M4_DEFINES) -DFOR_USER=1 < $< > $@ - - if ENABLE_POLKIT --dist_polkitpolicy_DATA = \ -+nodist_polkitpolicy_DATA = \ - $(polkitpolicy_files) \ - $(polkitpolicy_in_in_files:.policy.in.in=.policy) - endif --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0018-build-sys-Do-not-distribute-generated-emergency.serv.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0018-build-sys-Do-not-distribute-generated-emergency.serv.patch deleted file mode 100644 index 78185f644a..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0018-build-sys-Do-not-distribute-generated-emergency.serv.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 669455ef0d5a3cf56c03c9fc668daa0750629cf5 Mon Sep 17 00:00:00 2001 -From: Jon Severinsson -Date: Fri, 11 Jul 2014 14:37:36 +0200 -Subject: [PATCH 18/37] build-sys: Do not distribute generated - emergency.service - -It is already in nodist_systemunit_DATA and if it is -shipped, it contains the hardcoded path to systemctl -which will cause it to fail to start when -rootprefix != prefix and rootbindir != bindir. ---- - Makefile.am | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 32dc1fd..5d169b7 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -412,7 +412,6 @@ dist_sysctl_DATA = \ - dist_systemunit_DATA = \ - units/graphical.target \ - units/multi-user.target \ -- units/emergency.service \ - units/emergency.target \ - units/sysinit.target \ - units/basic.target \ --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0019-man-sysusers.d-correct-default-user-shell.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0019-man-sysusers.d-correct-default-user-shell.patch deleted file mode 100644 index 353ef4ff66..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0019-man-sysusers.d-correct-default-user-shell.patch +++ /dev/null @@ -1,27 +0,0 @@ -From c49b22614e4a6f843f8c2395d22bedf335f79fde Mon Sep 17 00:00:00 2001 -From: Sjoerd Simons -Date: Sun, 13 Jul 2014 16:56:16 +0200 -Subject: [PATCH 19/37] man: sysusers.d correct default user shell - -For the non-root user sysusers uses nologin as the default shell, not -login. Correct the documentation to match the code. ---- - man/sysusers.d.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/man/sysusers.d.xml b/man/sysusers.d.xml -index 40f8715..b8e5af5 100644 ---- a/man/sysusers.d.xml -+++ b/man/sysusers.d.xml -@@ -106,7 +106,7 @@ m authd input - group will be set to the group - bearing the same name. The - user's shell will be set to -- /sbin/login, -+ /sbin/nologin, - the home directory to - /. The - account will be created --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0020-rules-consistently-use-instead-of.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0020-rules-consistently-use-instead-of.patch deleted file mode 100644 index 6ef2331cdb..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0020-rules-consistently-use-instead-of.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 584152929252c948e9826bc3c735165ea1328737 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 15 Jul 2014 02:04:47 +0200 -Subject: [PATCH 20/37] rules: consistently use "?*" instead of "*?" - ---- - rules/99-systemd.rules.in | 2 +- - src/login/70-uaccess.rules | 12 ++++++------ - 2 files changed, 7 insertions(+), 7 deletions(-) - -diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in -index db72373..c3ef81b 100644 ---- a/rules/99-systemd.rules.in -+++ b/rules/99-systemd.rules.in -@@ -43,7 +43,7 @@ SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsys - SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k" - - SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target" --ENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target" -+ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target" - SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target" - - SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target" -diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules -index e1cf897..57f619d 100644 ---- a/src/login/70-uaccess.rules -+++ b/src/login/70-uaccess.rules -@@ -12,7 +12,7 @@ ENV{MAJOR}=="", GOTO="uaccess_end" - SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="uaccess" - - # Digicams with proprietary protocol --ENV{ID_GPHOTO2}=="*?", TAG+="uaccess" -+ENV{ID_GPHOTO2}=="?*", TAG+="uaccess" - - # SCSI and USB scanners - ENV{libsane_matched}=="yes", TAG+="uaccess" -@@ -49,13 +49,13 @@ SUBSYSTEM=="drm", KERNEL=="card*|renderD*", TAG+="uaccess" - SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="uaccess" - - # smart-card readers --ENV{ID_SMARTCARD_READER}=="*?", TAG+="uaccess" -+ENV{ID_SMARTCARD_READER}=="?*", TAG+="uaccess" - - # (USB) authentication devices --ENV{ID_SECURITY_TOKEN}=="*?", TAG+="uaccess" -+ENV{ID_SECURITY_TOKEN}=="?*", TAG+="uaccess" - - # PDA devices --ENV{ID_PDA}=="*?", TAG+="uaccess" -+ENV{ID_PDA}=="?*", TAG+="uaccess" - - # Programmable remote control - ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess" -@@ -64,10 +64,10 @@ ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess" - SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="uaccess" - - # color measurement devices --ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="uaccess" -+ENV{COLOR_MEASUREMENT_DEVICE}=="?*", TAG+="uaccess" - - # DDC/CI device, usually high-end monitors such as the DreamColor --ENV{DDC_DEVICE}=="*?", TAG+="uaccess" -+ENV{DDC_DEVICE}=="?*", TAG+="uaccess" - - # media player raw devices (for user-mode drivers, Android SDK, etc.) - SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess" --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0021-timesyncd-suppress-resync-at-system-time-change-when.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0021-timesyncd-suppress-resync-at-system-time-change-when.patch deleted file mode 100644 index f07e512ed2..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0021-timesyncd-suppress-resync-at-system-time-change-when.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 19c0af955631f8a32b3c95232cfcb4682dc362d6 Mon Sep 17 00:00:00 2001 -From: Kay Sievers -Date: Tue, 15 Jul 2014 02:24:35 +0200 -Subject: [PATCH 21/37] timesyncd: suppress resync at system time change when - not connected - -Jul 04 17:46:03 orchid systemd[1]: Starting Network Time Synchronization... -Jul 04 17:46:03 orchid systemd[1]: Started Network Time Synchronization. -Jul 04 17:46:22 orchid systemd-timesyncd[301]: System time changed. Resyncing. -Jul 04 17:46:22 orchid systemd-timesyncd[301]: Assertion 'm->current_server_name' - -https://bugs.freedesktop.org/show_bug.cgi?id=80932 ---- - src/timesync/timesyncd.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c -index 27f6b2d..9bc773c 100644 ---- a/src/timesync/timesyncd.c -+++ b/src/timesync/timesyncd.c -@@ -331,6 +331,9 @@ static int manager_clock_watch(sd_event_source *source, int fd, uint32_t revents - /* rearm timer */ - manager_clock_watch_setup(m); - -+ if (!m->current_server_address) -+ return 0; -+ - /* skip our own jumps */ - if (m->jumped) { - m->jumped = false; --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0022-timesyncd-only-listen-to-clock-changes-when-connecte.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0022-timesyncd-only-listen-to-clock-changes-when-connecte.patch deleted file mode 100644 index ebafb5c7bb..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0022-timesyncd-only-listen-to-clock-changes-when-connecte.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 446e61ba07ec949544594729cdd2dff79c8e4cdc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Tue, 15 Jul 2014 09:52:17 -0400 -Subject: [PATCH 22/37] timesyncd: only listen to clock changes when connected - -This reverts previous commit and applies a different fix. - -manager_clock_watch() callback calls manager_send_request() to kick -off a resync. We can only do that when we're actually connected to -something. It is not useful to setup the callback from manager_new(). - -Now the callback will be dropped in manager_connect() and requested -in manager_begin(). - -https://bugs.freedesktop.org/show_bug.cgi?id=80932 ---- - src/timesync/timesyncd.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c -index 9bc773c..19af9f9 100644 ---- a/src/timesync/timesyncd.c -+++ b/src/timesync/timesyncd.c -@@ -331,9 +331,6 @@ static int manager_clock_watch(sd_event_source *source, int fd, uint32_t revents - /* rearm timer */ - manager_clock_watch_setup(m); - -- if (!m->current_server_address) -- return 0; -- - /* skip our own jumps */ - if (m->jumped) { - m->jumped = false; -@@ -1047,10 +1044,6 @@ static int manager_new(Manager **ret) { - if (r < 0) - return r; - -- r = manager_clock_watch_setup(m); -- if (r < 0) -- return r; -- - *ret = m; - m = NULL; - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0023-core-fix-oneshot-service-resource-control.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0023-core-fix-oneshot-service-resource-control.patch deleted file mode 100644 index 9f671f5c38..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0023-core-fix-oneshot-service-resource-control.patch +++ /dev/null @@ -1,28 +0,0 @@ -From bdabb3772ddd38ef7a62342efaa5b23d77765e5b Mon Sep 17 00:00:00 2001 -From: Umut Tezduyar Lindskog -Date: Tue, 15 Jul 2014 08:36:29 +0200 -Subject: [PATCH 23/37] core: fix oneshot service resource control - -Oneshot services's cgroup is removed when the service -exits. An assert is hit otherwise. ---- - src/core/manager.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/core/manager.c b/src/core/manager.c -index 0cb2044..edcde31 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -2539,7 +2539,8 @@ void manager_check_finished(Manager *m) { - } - - SET_FOREACH(u, m->startup_units, i) -- cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m)); -+ if (u->cgroup_path) -+ cgroup_context_apply(unit_get_cgroup_context(u), unit_get_cgroup_mask(u), u->cgroup_path, manager_state(m)); - - bus_manager_send_finished(m, firmware_usec, loader_usec, kernel_usec, initrd_usec, userspace_usec, total_usec); - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0024-journal-allow-files-with-no-data-whatsoever.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0024-journal-allow-files-with-no-data-whatsoever.patch deleted file mode 100644 index 96de193768..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0024-journal-allow-files-with-no-data-whatsoever.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 168b42d2860dcaaa4f4970f96467da1007cd78f5 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Sun, 30 Mar 2014 14:20:34 -0400 -Subject: [PATCH 24/37] journal: allow files with no data whatsoever - -If a file was opened for writing, and then closed immediately without -actually writing any entries, on subsequent opening, it would be -considered "corrupted". This should be totally fine, and even in -read mode, an empty file can become non-empty later on. ---- - src/journal/journal-file.c | 6 ------ - 1 file changed, 6 deletions(-) - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index b3b1ffc..ef54af4 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -271,12 +271,6 @@ static int journal_file_verify_header(JournalFile *f) { - !VALID64(le64toh(f->header->entry_array_offset))) - return -ENODATA; - -- if (le64toh(f->header->data_hash_table_offset) < le64toh(f->header->header_size) || -- le64toh(f->header->field_hash_table_offset) < le64toh(f->header->header_size) || -- le64toh(f->header->tail_object_offset) < le64toh(f->header->header_size) || -- le64toh(f->header->entry_array_offset) < le64toh(f->header->header_size)) -- return -ENODATA; -- - if (f->writable) { - uint8_t state; - sd_id128_t machine_id; --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0025-units-serial-getty-.service-use-the-default-RestartS.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0025-units-serial-getty-.service-use-the-default-RestartS.patch deleted file mode 100644 index 28826db60e..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0025-units-serial-getty-.service-use-the-default-RestartS.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 0a9a32ccbb38db14ff5dc8455af8cdac9610fbce Mon Sep 17 00:00:00 2001 -From: Michael Olbrich -Date: Tue, 15 Jul 2014 18:28:10 +0200 -Subject: [PATCH 25/37] units/serial-getty@.service: use the default RestartSec - -For pluggable ttys such as USB serial devices, the getty is restarted -and exits in a loop until the remove event reaches systemd. Under -certain circumstances the restart loop can overload the system in a -way that prevents the remove event from reaching systemd for a long -time (e.g. at least several minutes on a small embedded system). - -Use the default RestartSec to prevent the restart loop from -overloading the system. Serial gettys are interactive units, so -waiting an extra 100ms really doesn't make a difference anyways -compared to the time it takes the user to log in. ---- - units/serial-getty@.service.m4 | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 -index 4ac51e7..4522d0d 100644 ---- a/units/serial-getty@.service.m4 -+++ b/units/serial-getty@.service.m4 -@@ -25,7 +25,6 @@ IgnoreOnIsolate=yes - ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM - Type=idle - Restart=always --RestartSec=0 - UtmpIdentifier=%I - TTYPath=/dev/%I - TTYReset=yes --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0026-networkd-properly-track-addresses-when-first-added.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0026-networkd-properly-track-addresses-when-first-added.patch deleted file mode 100644 index e82f9983ac..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0026-networkd-properly-track-addresses-when-first-added.patch +++ /dev/null @@ -1,104 +0,0 @@ -From c831530cf5cf6795e6c465c51689481a308a20a0 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Thu, 3 Jul 2014 22:47:51 +0200 -Subject: [PATCH 26/37] networkd: properly track addresses when first added - -When doing a NEWADDR, the reply we get back is the NEWADDR itself, rather -than just an empty ack (unlike how NEWLINK works). For this reason, the -process that did the NEWADDR does not get the broadcast message. - -We were only listening for broadcast messages, and hence not tracking the -addresses we added ourselves. This went unnoticed as the kernel will usually -send NEWADDR messages from time to time anyway, so things would mostly work, -but in the worst case we would not notice that a routable address was available -and consider ourselves offline. ---- - src/network/networkd-link.c | 54 +++++++++++++++++++++++++-------------------- - 1 file changed, 30 insertions(+), 24 deletions(-) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 14c0417..2289284 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -599,10 +599,35 @@ static int route_drop_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) - return 0; - } - -+static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { -+ _cleanup_link_unref_ Link *link = userdata; -+ int r; -+ -+ assert(rtnl); -+ assert(m); -+ assert(link); -+ assert(link->manager); -+ -+ for (; m; m = sd_rtnl_message_next(m)) { -+ r = sd_rtnl_message_get_errno(m); -+ if (r < 0) { -+ log_debug_link(link, "getting address failed: %s", strerror(-r)); -+ continue; -+ } -+ -+ r = link_rtnl_process_address(rtnl, m, link->manager); -+ if (r < 0) -+ log_warning_link(link, "could not process address: %s", strerror(-r)); -+ } -+ -+ return 1; -+} -+ - static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { - _cleanup_link_unref_ Link *link = userdata; - int r; - -+ assert(rtnl); - assert(m); - assert(link); - assert(link->ifname); -@@ -623,6 +648,11 @@ static int address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { - link->ifname, strerror(-r), - "ERRNO=%d", -r, - NULL); -+ if (r >= 0) { -+ /* calling handler directly so take a ref */ -+ link_ref(link); -+ link_get_address_handler(rtnl, m, link); -+ } - - if (link->addr_messages == 0) { - log_debug_link(link, "addresses set"); -@@ -2228,30 +2258,6 @@ int link_rtnl_process_address(sd_rtnl *rtnl, sd_rtnl_message *message, void *use - return 1; - } - --static int link_get_address_handler(sd_rtnl *rtnl, sd_rtnl_message *m, void *userdata) { -- _cleanup_link_unref_ Link *link = userdata; -- int r; -- -- assert(rtnl); -- assert(m); -- assert(link); -- assert(link->manager); -- -- for (; m; m = sd_rtnl_message_next(m)) { -- r = sd_rtnl_message_get_errno(m); -- if (r < 0) { -- log_debug_link(link, "getting address failed: %s", strerror(-r)); -- continue; -- } -- -- r = link_rtnl_process_address(rtnl, m, link->manager); -- if (r < 0) -- log_warning_link(link, "could not process address: %s", strerror(-r)); -- } -- -- return 1; --} -- - int link_add(Manager *m, sd_rtnl_message *message, Link **ret) { - Link *link; - _cleanup_rtnl_message_unref_ sd_rtnl_message *req = NULL; --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0027-networkd-don-t-clear-dhcpv6-lease-timers-if-there-s-.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0027-networkd-don-t-clear-dhcpv6-lease-timers-if-there-s-.patch deleted file mode 100644 index 3ebc94e4d5..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0027-networkd-don-t-clear-dhcpv6-lease-timers-if-there-s-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From f491638dd12ad53539d62f5a1088eb26e233badf Mon Sep 17 00:00:00 2001 -From: Steven Noonan -Date: Thu, 3 Jul 2014 19:43:56 -0700 -Subject: [PATCH 27/37] networkd: don't clear dhcpv6 lease timers if there's no - previous lease - -If client->lease is NULL, dhcp6_lease_clear_timers will cause a segmentation -fault. ---- - src/libsystemd-network/sd-dhcp6-client.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c -index 8fdbbfe..a83778e 100644 ---- a/src/libsystemd-network/sd-dhcp6-client.c -+++ b/src/libsystemd-network/sd-dhcp6-client.c -@@ -708,7 +708,8 @@ static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply, - return 0; - } - -- dhcp6_lease_clear_timers(&client->lease->ia); -+ if (client->lease) -+ dhcp6_lease_clear_timers(&client->lease->ia); - - client->lease = sd_dhcp6_lease_unref(client->lease); - client->lease = lease; --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0028-networkd-accept-section-DHCP-in-systemd.network-file.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0028-networkd-accept-section-DHCP-in-systemd.network-file.patch deleted file mode 100644 index d7c2301449..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0028-networkd-accept-section-DHCP-in-systemd.network-file.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 49047278910689c619b768130cce40c377fa5560 Mon Sep 17 00:00:00 2001 -From: Steven Noonan -Date: Thu, 3 Jul 2014 19:42:19 -0700 -Subject: [PATCH 28/37] networkd: accept section DHCP in systemd.network files - ---- - src/network/networkd-network.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c -index 9ab4f23..9f6de18 100644 ---- a/src/network/networkd-network.c -+++ b/src/network/networkd-network.c -@@ -92,7 +92,7 @@ static int network_load_one(Manager *manager, const char *filename) { - network->dhcp_routes = true; - network->dhcp_sendhost = true; - -- r = config_parse(NULL, filename, file, "Match\0Network\0Address\0Route\0DHCPv4\0", config_item_perf_lookup, -+ 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); - if (r < 0) { - log_warning("Could not parse config file %s: %s", filename, strerror(-r)); --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0029-dhcp-network-add-check-for-DHCP.chaddr.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0029-dhcp-network-add-check-for-DHCP.chaddr.patch deleted file mode 100644 index 6e3dc6d619..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0029-dhcp-network-add-check-for-DHCP.chaddr.patch +++ /dev/null @@ -1,106 +0,0 @@ -From f0b0beb95c95235ffc88d7230334f93e37982b04 Mon Sep 17 00:00:00 2001 -From: Michal Sekletar -Date: Thu, 19 Jun 2014 15:14:14 +0200 -Subject: [PATCH 29/37] dhcp-network: add check for DHCP.chaddr - -Check that received DHCP packets actually include our MAC address in -chaddr field. BPF interpreter has 32 bit wide registers but MAC address -is 48 bits long so we have to do check in two steps. ---- - src/libsystemd-network/dhcp-internal.h | 3 ++- - src/libsystemd-network/dhcp-network.c | 15 +++++++++++++-- - src/libsystemd-network/sd-dhcp-client.c | 4 ++-- - src/libsystemd-network/test-dhcp-client.c | 2 +- - 4 files changed, 18 insertions(+), 6 deletions(-) - -diff --git a/src/libsystemd-network/dhcp-internal.h b/src/libsystemd-network/dhcp-internal.h -index 6f6f121..1069c8a 100644 ---- a/src/libsystemd-network/dhcp-internal.h -+++ b/src/libsystemd-network/dhcp-internal.h -@@ -24,13 +24,14 @@ - - #include - #include -+#include - - #include "socket-util.h" - - #include "sd-dhcp-client.h" - #include "dhcp-protocol.h" - --int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t xid); -+int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t xid, struct ether_addr mac_addr); - int dhcp_network_bind_udp_socket(be32_t address, uint16_t port); - int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, - const void *packet, size_t len); -diff --git a/src/libsystemd-network/dhcp-network.c b/src/libsystemd-network/dhcp-network.c -index 9d57917..f119cae 100644 ---- a/src/libsystemd-network/dhcp-network.c -+++ b/src/libsystemd-network/dhcp-network.c -@@ -33,7 +33,7 @@ - #include "dhcp-internal.h" - - int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, -- uint32_t xid) { -+ uint32_t xid, struct ether_addr mac_addr) { - struct sock_filter filter[] = { - BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0), /* A <- packet length */ - BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(DHCPPacket), 1, 0), /* packet >= DHCPPacket ? */ -@@ -60,7 +60,18 @@ int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, - BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.xid)), /* A <- client identifier */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, xid, 1, 0), /* client identifier == xid ? */ - BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ -- /* TODO: match chaddr */ -+ BPF_STMT(BPF_LD + BPF_IMM, htobe32(*((unsigned int *) &mac_addr))), /* A <- 4 bytes of client's MAC */ -+ BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ -+ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.chaddr)), /* A <- 4 bytes of MAC from dhcp.chaddr */ -+ BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ -+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0), /* A == 0 ? */ -+ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ -+ BPF_STMT(BPF_LD + BPF_IMM, htobe16(*((unsigned short *) (((char *) &mac_addr) + 4)))), /* A <- remainder of client's MAC */ -+ BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ -+ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(DHCPPacket, dhcp.chaddr) + 4), /* A <- remainder of MAC from dhcp.chaddr */ -+ BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ -+ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 1, 0), /* A == 0 ? */ -+ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ - BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(DHCPPacket, dhcp.magic)), /* A <- DHCP magic cookie */ - BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, DHCP_MAGIC_COOKIE, 1, 0), /* cookie == DHCP magic cookie ? */ - BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ -diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c -index d8a9d20..6b19666 100644 ---- a/src/libsystemd-network/sd-dhcp-client.c -+++ b/src/libsystemd-network/sd-dhcp-client.c -@@ -751,7 +751,7 @@ static int client_start(sd_dhcp_client *client) { - - client->xid = random_u32(); - -- r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid); -+ r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid, client->client_id.mac_addr); - if (r < 0) { - client_stop(client, r); - return r; -@@ -795,7 +795,7 @@ static int client_timeout_t2(sd_event_source *s, uint64_t usec, void *userdata) - client->state = DHCP_STATE_REBINDING; - client->attempt = 1; - -- r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid); -+ r = dhcp_network_bind_raw_socket(client->index, &client->link, client->xid, client->client_id.mac_addr); - if (r < 0) { - client_stop(client, r); - return 0; -diff --git a/src/libsystemd-network/test-dhcp-client.c b/src/libsystemd-network/test-dhcp-client.c -index 450b6d4..7cbe10d 100644 ---- a/src/libsystemd-network/test-dhcp-client.c -+++ b/src/libsystemd-network/test-dhcp-client.c -@@ -196,7 +196,7 @@ int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, - return 575; - } - --int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t id) -+int dhcp_network_bind_raw_socket(int index, union sockaddr_union *link, uint32_t id, struct ether_addr mac) - { - if (socketpair(AF_UNIX, SOCK_STREAM, 0, test_fd) < 0) - return -errno; --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0030-networkd-netdev-add-missing-refs.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0030-networkd-netdev-add-missing-refs.patch deleted file mode 100644 index 1b09847096..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0030-networkd-netdev-add-missing-refs.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 5c7eaa88675fc6e400420bbeb4890ef13b18b85b Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Mon, 7 Jul 2014 14:18:26 +0200 -Subject: [PATCH 30/37] networkd: netdev - add missing refs - -Without this, the underlying device would get freed (and hence -fail). ---- - src/network/networkd-macvlan.c | 2 ++ - src/network/networkd-tunnel.c | 2 ++ - src/network/networkd-vlan.c | 2 ++ - src/network/networkd-vxlan.c | 2 ++ - 4 files changed, 8 insertions(+) - -diff --git a/src/network/networkd-macvlan.c b/src/network/networkd-macvlan.c -index 9227144..7c23426 100644 ---- a/src/network/networkd-macvlan.c -+++ b/src/network/networkd-macvlan.c -@@ -150,6 +150,8 @@ int netdev_create_macvlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t - return r; - } - -+ link_ref(link); -+ - log_debug_netdev(netdev, "creating netdev"); - - netdev->state = NETDEV_STATE_CREATING; -diff --git a/src/network/networkd-tunnel.c b/src/network/networkd-tunnel.c -index 7341487..5a244f6 100644 ---- a/src/network/networkd-tunnel.c -+++ b/src/network/networkd-tunnel.c -@@ -529,6 +529,8 @@ int netdev_create_tunnel(NetDev *netdev, Link *link, sd_rtnl_message_handler_t c - return r; - } - -+ link_ref(link); -+ - log_debug_netdev(netdev, "Creating tunnel netdev: %s", - netdev_kind_to_string(netdev->kind)); - -diff --git a/src/network/networkd-vlan.c b/src/network/networkd-vlan.c -index 1d812fd..8727b9f 100644 ---- a/src/network/networkd-vlan.c -+++ b/src/network/networkd-vlan.c -@@ -139,6 +139,8 @@ int netdev_create_vlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t cal - return r; - } - -+ link_ref(link); -+ - log_debug_netdev(netdev, "creating netdev"); - - netdev->state = NETDEV_STATE_CREATING; -diff --git a/src/network/networkd-vxlan.c b/src/network/networkd-vxlan.c -index 8832024..1604594 100644 ---- a/src/network/networkd-vxlan.c -+++ b/src/network/networkd-vxlan.c -@@ -154,6 +154,8 @@ int netdev_create_vxlan(NetDev *netdev, Link *link, sd_rtnl_message_handler_t ca - return r; - } - -+ link_ref(link); -+ - log_debug_netdev(netdev, "Creating vxlan netdev: %s", - netdev_kind_to_string(netdev->kind)); - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0031-networkd-link-fix-memory-leak.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0031-networkd-link-fix-memory-leak.patch deleted file mode 100644 index 4fade19aed..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0031-networkd-link-fix-memory-leak.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 25bb651691c89caa40d57ca6cb347fbbf20633c5 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Sun, 13 Jul 2014 01:11:52 +0200 -Subject: [PATCH 31/37] networkd: link - fix memory leak - -Make link_initialized() idempotent to avoid taking refs on several udev_device -objects. ---- - src/network/networkd-link.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 2289284..5e63045 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -2114,6 +2114,9 @@ int link_initialized(Link *link, struct udev_device *device) { - if (link->state != LINK_STATE_INITIALIZING) - return 0; - -+ if (link->udev_device) -+ return 0; -+ - log_debug_link(link, "udev initialized link"); - - link->udev_device = udev_device_ref(device); --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0032-sd-dhcp-client-make-request-broadcasts-opt-in.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0032-sd-dhcp-client-make-request-broadcasts-opt-in.patch deleted file mode 100644 index e8ac8552e3..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0032-sd-dhcp-client-make-request-broadcasts-opt-in.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 64e271490cf958e5554ddb8daa662c84c2003452 Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Tue, 15 Jul 2014 18:55:31 +0200 -Subject: [PATCH 32/37] sd-dhcp-client: make request broadcasts opt-in - -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. - -By default, unicast is used, but if the kernel were to inform us abotu certain -interfaces requiring broadcast, we could change this to opt-in by default in -those cases. - -Conflicts: - man/systemd.network.xml ---- - 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.h | 1 + - src/systemd/sd-dhcp-client.h | 1 + - 6 files changed, 32 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. - - -+ -+ RequestBroadcast= -+ -+ 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. -+ -+ - - - -diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c -index 6b19666..04ee7de 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 5e63045..a806990 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.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); --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0033-networkd-fix-reporting-errors-from-hostnamed.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0033-networkd-fix-reporting-errors-from-hostnamed.patch deleted file mode 100644 index d251a1a410..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0033-networkd-fix-reporting-errors-from-hostnamed.patch +++ /dev/null @@ -1,29 +0,0 @@ -From cd210f1210700a9917412cb6d312eb029236f1ae Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Mon, 21 Jul 2014 16:11:00 -0700 -Subject: [PATCH 33/37] networkd: fix reporting errors from hostnamed - -The return value may be -EINVAL or a positive errno from the dbus -message. Check both ranges, otherwise most errors are silently ignored. ---- - src/network/networkd-link.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index a806990..24b4ebc 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -846,7 +846,9 @@ static int set_hostname_handler(sd_bus *bus, sd_bus_message *m, void *userdata, - - r = sd_bus_message_get_errno(m); - if (r < 0) -- log_warning_link(link, "Could not set hostname: %s", strerror(-r)); -+ r = -r; -+ if (r > 0) -+ log_warning_link(link, "Could not set hostname: %s", strerror(r)); - - return 1; - } --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0034-resolved-re-add-support-for-getting-local-domain-fro.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0034-resolved-re-add-support-for-getting-local-domain-fro.patch deleted file mode 100644 index d2f66d2da7..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0034-resolved-re-add-support-for-getting-local-domain-fro.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 9a1aced57aaa6767298667c72308157d849282dc Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Tue, 22 Jul 2014 17:56:40 -0700 -Subject: [PATCH 34/37] resolved: re-add support for getting local domain from - DHCP - -When the code for generating resolv.conf was moved from networkd to -resolved the DHCP domain name code was dropped. ---- - src/network/networkd-link.c | 2 ++ - src/network/sd-network.c | 4 ++++ - src/resolve/resolved-manager.c | 13 +++++++++++++ - src/systemd/sd-network.h | 3 +++ - 4 files changed, 22 insertions(+) - -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c -index 24b4ebc..f0d48ad 100644 ---- a/src/network/networkd-link.c -+++ b/src/network/networkd-link.c -@@ -2517,9 +2517,11 @@ int link_save(Link *link) { - fprintf(f, - "DHCP_LEASE=%s\n" - "DHCP_USE_DNS=%s\n" -+ "DHCP_USE_DOMAINNAME=%s\n" - "DHCP_USE_NTP=%s\n", - link->lease_file, - yes_no(link->network->dhcp_dns), -+ yes_no(link->network->dhcp_domainname), - yes_no(link->network->dhcp_ntp)); - } else - unlink(link->lease_file); -diff --git a/src/network/sd-network.c b/src/network/sd-network.c -index 3ebc5d8..6ee837e 100644 ---- a/src/network/sd-network.c -+++ b/src/network/sd-network.c -@@ -246,6 +246,10 @@ _public_ int sd_network_dhcp_use_dns(unsigned index) { - return network_get_boolean("DHCP_USE_DNS", index); - } - -+_public_ int sd_network_dhcp_use_domainname(int ifindex) { -+ return network_get_boolean("DHCP_USE_DOMAINNAME", ifindex); -+} -+ - _public_ int sd_network_dhcp_use_ntp(unsigned index) { - return network_get_boolean("DHCP_USE_NTP", index); - } -diff --git a/src/resolve/resolved-manager.c b/src/resolve/resolved-manager.c -index 3ed0603..ddff2aa 100644 ---- a/src/resolve/resolved-manager.c -+++ b/src/resolve/resolved-manager.c -@@ -195,6 +195,7 @@ int manager_update_resolv_conf(Manager *m) { - _cleanup_free_ char *temp_path = NULL; - _cleanup_fclose_ FILE *f = NULL; - _cleanup_free_ unsigned *indices = NULL; -+ const char *domainname = NULL; - Address *address; - unsigned count = 0; - int n, r, i; -@@ -223,6 +224,18 @@ int manager_update_resolv_conf(Manager *m) { - struct in6_addr *nameservers6; - size_t nameservers_size; - -+ if (!domainname) { -+ r = sd_network_dhcp_use_domainname(indices[i]); -+ if (r > 0) { -+ r = sd_network_get_dhcp_lease(indices[i], &lease); -+ if (r >= 0) { -+ r = sd_dhcp_lease_get_domainname(lease, &domainname); -+ if (r >= 0) -+ fprintf(f, "domain %s\n", domainname); -+ } -+ } -+ } -+ - r = sd_network_dhcp_use_dns(indices[i]); - if (r > 0) { - r = sd_network_get_dhcp_lease(indices[i], &lease); -diff --git a/src/systemd/sd-network.h b/src/systemd/sd-network.h -index 7d05086..3e3ec37 100644 ---- a/src/systemd/sd-network.h -+++ b/src/systemd/sd-network.h -@@ -83,6 +83,9 @@ int sd_network_get_dhcp_lease(unsigned index, sd_dhcp_lease **ret); - /* Returns true if link is configured to respect DNS entries received by DHCP */ - int sd_network_dhcp_use_dns(unsigned index); - -+/* Returns true if link is configured to use the domain name received by DHCP */ -+int sd_network_dhcp_use_domainname(int ifindex); -+ - /* Returns true if link is configured to respect NTP entries received by DHCP */ - int sd_network_dhcp_use_ntp(unsigned index); - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0035-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0035-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch deleted file mode 100644 index c6a60c4e78..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0035-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 00197239142c519270e44f94b1126a45e7f65511 Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Sat, 2 Aug 2014 17:45:00 -0700 -Subject: [PATCH 35/37] hack: testing -Wl,-fuse-ld=gold does not work correctly - on hardened - -Not sure why this test falsely passes with the hardened compiler when it -normally will report the following error: - - ld: -f may not be used without -shared - -But apparently the default options hardened uses makes interpreting the -option as -f valid usage. For reference the option is: - - -f name - --auxiliary=name - When creating an ELF shared object, set the internal DT_AUXILIARY - field to the specified name. This tells the dynamic linker that - the symbol table of the shared object should be used as an - auxiliary filter on the symbol table of the shared object name. - -This in turn causes a stray library to show up in ldd output: - - use-ld=gold => not found - -Which seems mostly harmless but does cause some confusion. ---- - configure.ac | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index ae88382..85966b9 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -216,8 +216,7 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\ - -Wl,--gc-sections \ - -Wl,-z,relro \ - -Wl,-z,now \ -- -pie \ -- -Wl,-fuse-ld=gold]) -+ -pie]) - AC_SUBST([OUR_LDFLAGS], "$with_ldflags $sanitizer_ldflags") - - AC_CHECK_SIZEOF(pid_t) --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0036-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0036-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch deleted file mode 100644 index afdb8b9010..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0036-units-run-ldconfig-after-tmpfiles-setup-to-ensure-ld.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a5ad570fc0577080f994ac7f864470aa9fbd95d8 Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Sun, 3 Aug 2014 18:16:07 -0700 -Subject: [PATCH 36/37] units: run ldconfig after tmpfiles-setup to ensure - ld.so.conf exists - -We lost this ordering when we switched to this unit instead of our own. ---- - units/ldconfig.service | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/units/ldconfig.service b/units/ldconfig.service -index 43c145b..c8d9b6b 100644 ---- a/units/ldconfig.service -+++ b/units/ldconfig.service -@@ -10,7 +10,7 @@ Description=Rebuild Dynamic Linker Cache - Documentation=man:ldconfig(8) - DefaultDependencies=no - Conflicts=shutdown.target --After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service -+After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service systemd-tmpfiles-setup.service - Before=sysinit.target shutdown.target systemd-update-done.service - ConditionNeedsUpdate=/etc - --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0037-udev-link-config-fix-crash-due-to-missing-hwaddr.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0037-udev-link-config-fix-crash-due-to-missing-hwaddr.patch deleted file mode 100644 index 4798dd7ab0..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0037-udev-link-config-fix-crash-due-to-missing-hwaddr.patch +++ /dev/null @@ -1,31 +0,0 @@ -From b53858105bc92861a2025694437e65f81ff19ecf Mon Sep 17 00:00:00 2001 -From: Tom Gundersen -Date: Thu, 14 Aug 2014 01:35:16 +0200 -Subject: [PATCH 37/37] udev: link-config - fix crash due to missing hwaddr - -Reported by: master.nosferatu@gmail.com ---- - src/udev/net/link-config.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c -index 5a45c53..3cc0471 100644 ---- a/src/udev/net/link-config.c -+++ b/src/udev/net/link-config.c -@@ -247,11 +247,12 @@ int link_config_get(link_config_ctx *ctx, struct udev_device *device, link_confi - link_config *link; - - LIST_FOREACH(links, link, ctx->links) { -+ const char* attr_value = udev_device_get_sysattr_value(device, "address"); - - if (net_match_config(link->match_mac, link->match_path, link->match_driver, - link->match_type, NULL, link->match_host, - link->match_virt, link->match_kernel, link->match_arch, -- ether_aton(udev_device_get_sysattr_value(device, "address")), -+ attr_value ? ether_aton(attr_value) : NULL, - udev_device_get_property_value(device, "ID_PATH"), - udev_device_get_driver(udev_device_get_parent(device)), - udev_device_get_property_value(device, "ID_NET_DRIVER"), --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0038-units-run-ldconfig-on-every-boot.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0038-units-run-ldconfig-on-every-boot.patch deleted file mode 100644 index 9b42275a83..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/215-0038-units-run-ldconfig-on-every-boot.patch +++ /dev/null @@ -1,28 +0,0 @@ -From e19828f6d0e1c9417946d675a3c63203a778b23b Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Tue, 26 Aug 2014 18:21:53 -0700 -Subject: [PATCH 38/38] units: run ldconfig on every boot - -The "needs update" logic is not quite correct for CoreOS, for one it -compares against the mtime of /usr which will match the time /usr was -*built* not the time what /usr was updated on the system. Additionally -it only considers moving forward, so roll backs do not work. ---- - units/ldconfig.service | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/units/ldconfig.service b/units/ldconfig.service -index c8d9b6b..482de1e 100644 ---- a/units/ldconfig.service -+++ b/units/ldconfig.service -@@ -12,7 +12,6 @@ DefaultDependencies=no - Conflicts=shutdown.target - After=systemd-readahead-collect.service systemd-readahead-replay.service systemd-remount-fs.service systemd-tmpfiles-setup.service - Before=sysinit.target shutdown.target systemd-update-done.service --ConditionNeedsUpdate=/etc - - [Service] - Type=oneshot --- -1.8.5.5 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/217-0001-fstab-generator-Allow-mount.usr-without-mount.usrfla.patch b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/217-0001-fstab-generator-Allow-mount.usr-without-mount.usrfla.patch deleted file mode 100644 index 5719178350..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/files/217-0001-fstab-generator-Allow-mount.usr-without-mount.usrfla.patch +++ /dev/null @@ -1,47 +0,0 @@ -From eb5800026d5a6754514fb8f8a8561b49974fc879 Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Mon, 8 Dec 2014 11:05:31 -0800 -Subject: [PATCH] fstab-generator: Allow mount.usr without mount.usrflags, - honor rw/ro - -There is no need to require mount.usrflags. The original implementation -assumed that a btrfs subvolume would always be needed but that is not -applicable to systems that do not use btrfs for /usr. - -Similar to using rootflags= for the default of mount.usrflags=, append -the classic 'ro' and 'rw' flags to the mount options. ---- - src/fstab-generator/fstab-generator.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c -index 568b02a..1f34594 100644 ---- a/src/fstab-generator/fstab-generator.c -+++ b/src/fstab-generator/fstab-generator.c -@@ -476,7 +476,7 @@ static int add_usr_mount(void) { - return log_oom(); - } - -- if (!arg_usr_what || !arg_usr_options) -+ if (!arg_usr_what) - return 0; - - what = fstab_node_to_udev_node(arg_usr_what); -@@ -485,7 +485,13 @@ static int add_usr_mount(void) { - return -1; - } - -- opts = arg_usr_options; -+ if (!arg_usr_options) -+ opts = arg_root_rw > 0 ? "rw" : "ro"; -+ else if (!mount_test_option(arg_usr_options, "ro") && -+ !mount_test_option(arg_usr_options, "rw")) -+ opts = strappenda(arg_usr_options, ",", arg_root_rw > 0 ? "rw" : "ro"); -+ else -+ opts = arg_usr_options; - - log_debug("Found entry what=%s where=/sysroot/usr type=%s", what, strna(arg_usr_fstype)); - return add_mount(what, --- -2.0.4 - diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r16.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r16.ebuild deleted file mode 100644 index d4d3a128ce..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-215-r16.ebuild +++ /dev/null @@ -1,521 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-9999.ebuild,v 1.115 2014/06/14 16:33:20 floppym Exp $ - -EAPI=5 - -if [[ ${PV} == 9999 ]]; then -AUTOTOOLS_AUTORECONF=yes -EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN} - http://cgit.freedesktop.org/${PN}/${PN}/" - -inherit git-r3 - -elif [[ ${PV} == *9999 ]]; then -AUTOTOOLS_AUTORECONF=yes -EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}-stable - http://cgit.freedesktop.org/${PN}/${PN}-stable/" -EGIT_BRANCH=v${PV%%.*}-stable - -inherit git-r3 -fi - -AUTOTOOLS_AUTORECONF=yes -AUTOTOOLS_PRUNE_LIBTOOL_FILES=all -PYTHON_COMPAT=( python{2_7,3_2,3_3} ) -inherit autotools-utils bash-completion-r1 fcaps linux-info multilib \ - multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ - user - -DESCRIPTION="System and service manager for Linux" -HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" -SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz" - -LICENSE="GPL-2 LGPL-2.1 MIT public-domain" -SLOT="0/2" -KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection - kdbus +kmod lzma pam policykit python qrcode +seccomp selinux ssl - nls test" - -MINKV="3.10" - -COMMON_DEPEND=">=sys-apps/util-linux-2.20:0= - sys-libs/libcap:0= - acl? ( sys-apps/acl:0= ) - audit? ( >=sys-process/audit-2:0= ) - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0= ) - gudev? ( dev-libs/glib:2=[${MULTILIB_USEDEP}] ) - http? ( - >=net-libs/libmicrohttpd-0.9.33:0= - ssl? ( >=net-libs/gnutls-3.1.4:0= ) - ) - introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= ) - kmod? ( >=sys-apps/kmod-15:0= ) - lzma? ( app-arch/xz-utils:0=[${MULTILIB_USEDEP}] ) - pam? ( virtual/pam:= ) - python? ( ${PYTHON_DEPS} ) - qrcode? ( media-gfx/qrencode:0= ) - seccomp? ( >=sys-libs/libseccomp-2.1:0= ) - selinux? ( sys-libs/libselinux:0= ) - abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" - -# baselayout-2.2 has /run -RDEPEND="${COMMON_DEPEND} - >=sys-apps/baselayout-2.2 - || ( - >=sys-apps/util-linux-2.22 - "${locale_conf}" <<-EOF - # This file has been created by the sys-apps/systemd ebuild. - # See locale.conf(5) and localectl(1). - - # LANG=${LANG} - EOF - eend ${?} || FAIL=1 - fi - fi - - if [[ ! -L ${envd_locale} ]]; then - # now, if env.d/??locale is not a symlink (to locale.conf)... - if [[ -e ${envd_locale} ]]; then - # ...warn the user that he has duplicate locale settings - ewarn - ewarn "To ensure consistent behavior, you should replace ${envd_locale}" - ewarn "with a symlink to ${locale_conf}. Please migrate your settings" - ewarn "and create the symlink with the following command:" - ewarn "ln -s -n -f ../locale.conf ${envd_locale}" - ewarn - else - # ...or just create the symlink if there's nothing here - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" - ln -n -s ../locale.conf "${envd_locale_def}" - eend ${?} || FAIL=1 - fi - fi -} - -migrate_net_name_slot() { - # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, - # do the same for 80-net-setup-link.rules to keep the old behavior - local net_move=no - local net_name_slot_sym=no - local net_rules_path="${EROOT%/}"/etc/udev/rules.d - local net_name_slot="${net_rules_path}"/80-net-name-slot.rules - local net_setup_link="${net_rules_path}"/80-net-setup-link.rules - if [[ -e ${net_setup_link} ]]; then - net_move=no - elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then - net_move=yes - elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then - net_move=yes - net_name_slot_sym=yes - fi - if [[ ${net_move} == yes ]]; then - ebegin "Copying ${net_name_slot} to ${net_setup_link}" - - if [[ ${net_name_slot_sym} == yes ]]; then - ln -nfs /dev/null "${net_setup_link}" - else - cp "${net_name_slot}" "${net_setup_link}" - fi - eend $? || FAIL=1 - fi -} - -pkg_postinst() { - newusergroup() { - enewgroup "$1" - enewuser "$1" -1 -1 -1 "$1" - } - - enewgroup systemd-journal - newusergroup systemd-bus-proxy - newusergroup systemd-network - newusergroup systemd-resolve - newusergroup systemd-timesync - use http && newusergroup systemd-journal-gateway - - systemd_update_catalog - - # Keep this here in case the database format changes so it gets updated - # when required. Despite that this file is owned by sys-apps/hwids. - if has_version "sys-apps/hwids[udev]"; then - udevadm hwdb --update --root="${ROOT%/}" - fi - - udev_reload || FAIL=1 - - # Bug 468876 - fcaps cap_dac_override,cap_sys_ptrace=ep usr/bin/systemd-detect-virt - - # Bug 465468, make sure locales are respect, and ensure consistency - # between OpenRC & systemd - migrate_locale - - # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules - migrate_net_name_slot - - if [[ ${FAIL} ]]; then - eerror "One of the postinst commands failed. Please check the postinst output" - eerror "for errors. You may need to clean up your system and/or try installing" - eerror "systemd again." - eerror - fi - - if [[ ! -L "${ROOT}"/etc/mtab ]]; then - ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." - ewarn "Not having it is not supported by upstream and will cause tools like 'df'" - ewarn "and 'mount' to not work properly. Please run:" - ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'" - ewarn - fi - - if ! has_version sys-apps/systemd-ui; then - elog "To get additional features, a number of optional runtime dependencies may" - elog "be installed:" - elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent" - fi -} - -pkg_prerm() { - # If removing systemd completely, remove the catalog database. - if [[ ! ${REPLACED_BY_VERSION} ]]; then - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database - fi -} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-217-r5.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-217-r5.ebuild deleted file mode 100644 index 04e23a5e7c..0000000000 --- a/sdk_container/src/third_party/coreos-overlay/sys-apps/systemd/systemd-217-r5.ebuild +++ /dev/null @@ -1,568 +0,0 @@ -# Copyright 1999-2014 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/systemd/systemd-217-r3.ebuild,v 1.1 2014/11/28 18:13:49 floppym Exp $ - -EAPI=5 - -if [[ ${PV} == 9999 ]]; then -AUTOTOOLS_AUTORECONF=yes -EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN} - http://cgit.freedesktop.org/${PN}/${PN}/" - -inherit git-r3 - -elif [[ ${PV} == *9999 ]]; then -AUTOTOOLS_AUTORECONF=yes -EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}-stable - http://cgit.freedesktop.org/${PN}/${PN}-stable/" -EGIT_BRANCH=v${PV%%.*}-stable - -inherit git-r3 -fi - -AUTOTOOLS_AUTORECONF=yes -AUTOTOOLS_PRUNE_LIBTOOL_FILES=all -PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} ) -inherit autotools-utils bash-completion-r1 linux-info multilib \ - multilib-minimal pam python-single-r1 systemd toolchain-funcs udev \ - user - -DESCRIPTION="System and service manager for Linux" -HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd" -SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz - http://dev.gentoo.org/~floppym/dist/systemd-gentoo-patches-217-r1.tar.xz" - -LICENSE="GPL-2 LGPL-2.1 MIT public-domain" -SLOT="0/2" -KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" -IUSE="acl apparmor audit cryptsetup curl doc elfutils gcrypt gudev http - idn introspection kdbus +kmod lz4 lzma pam policykit python qrcode +seccomp - selinux ssl terminal nls test vanilla" - -MINKV="3.8" - -COMMON_DEPEND=">=sys-apps/util-linux-2.25:0= - sys-libs/libcap:0= - acl? ( sys-apps/acl:0= ) - apparmor? ( sys-libs/libapparmor:0= ) - audit? ( >=sys-process/audit-2:0= ) - cryptsetup? ( >=sys-fs/cryptsetup-1.6:0= ) - curl? ( net-misc/curl:0= ) - elfutils? ( >=dev-libs/elfutils-0.158:0= ) - gcrypt? ( >=dev-libs/libgcrypt-1.4.5:0=[${MULTILIB_USEDEP}] ) - gudev? ( >=dev-libs/glib-2.34.3:2=[${MULTILIB_USEDEP}] ) - http? ( - >=net-libs/libmicrohttpd-0.9.33:0= - ssl? ( >=net-libs/gnutls-3.1.4:0= ) - ) - idn? ( net-dns/libidn:0= ) - introspection? ( >=dev-libs/gobject-introspection-1.31.1:0= ) - kmod? ( >=sys-apps/kmod-15:0= ) - lz4? ( >=app-arch/lz4-0_p119:0=[${MULTILIB_USEDEP}] ) - lzma? ( >=app-arch/xz-utils-5.0.5-r1:0=[${MULTILIB_USEDEP}] ) - pam? ( virtual/pam:= ) - python? ( ${PYTHON_DEPS} ) - qrcode? ( media-gfx/qrencode:0= ) - seccomp? ( sys-libs/libseccomp:0= ) - selinux? ( sys-libs/libselinux:0= ) - terminal? ( dev-libs/libevdev:0= - >=x11-libs/libxkbcommon-0.4:0= - x11-libs/libdrm:0= ) - abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r9 - !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )" - -# baselayout-2.2 has /run -RDEPEND="${COMMON_DEPEND} - >=sys-apps/baselayout-2.2 - !sys-auth/nss-myhostname - !=sys-apps/dbus-1.8.8 if/when this is dropped. - local pcfiles=( src/compat-libs/libsystemd-{daemon,id128,journal,login}.pc ) - emake "${mymakeopts[@]}" install-pkgconfiglibDATA \ - pkgconfiglib_DATA="${pcfiles[*]}" -} - -multilib_src_install_all() { - prune_libtool_files --modules - einstalldocs - - # we just keep sysvinit tools, so no need for the mans - rm "${D}"/usr/share/man/man8/{halt,poweroff,reboot,runlevel,shutdown,telinit}.8 \ - || die - rm "${D}"/usr/share/man/man1/init.1 || die - - systemd_dotmpfilesd "${FILESDIR}"/systemd-coreos.conf - systemd_dotmpfilesd "${FILESDIR}"/systemd-resolv.conf - - # Don't default to graphical.target - rm "${D}"/usr/lib/systemd/system/default.target || die - dosym multi-user.target /usr/lib/systemd/system/default.target - - # Move a few services enabled in /etc to /usr - # systemd-timesyncd is left disabled, we currently use ntpd - rm -f "${D}"/etc/systemd/system/getty.target.wants/getty@tty1.service - rm -f "${D}"/etc/systemd/system/multi-user.target.wants/remote-fs.target - rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service - rm -f "${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service - rm -f "${D}"/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service - rm -rf "${D}"/etc/systemd/system/network-online.target.wants - rmdir "${D}"/etc/systemd/system/getty.target.wants \ - "${D}"/etc/systemd/system/multi-user.target.wants \ - "${D}"/etc/systemd/system/sysinit.target.wants \ - || die - - dosym ../getty@.service /usr/lib/systemd/system/getty.target.wants/getty@tty1.service - systemd_enable_service multi-user.target remote-fs.target - systemd_enable_service multi-user.target systemd-networkd.service - systemd_enable_service multi-user.target systemd-resolved.service - systemd_enable_service network-online.target systemd-networkd-wait-online.service - - # Grant networkd access to set the transient host name - insinto /usr/share/polkit-1/rules.d - doins "${FILESDIR}"/99-org.freedesktop.hostname1.rules - - # Do not enable random services if /etc was detected as empty!!! - rm "${D}"/usr/lib/systemd/system-preset/90-systemd.preset - insinto /usr/lib/systemd/system-preset - doins "${FILESDIR}"/99-default.preset - - # Disable the "First Boot Wizard" by default, it isn't very applicable to CoreOS - rm "${D}"/usr/lib/systemd/system/sysinit.target.wants/systemd-firstboot.service - - # Do not ship distro-specific files (nsswitch.conf pam.d) - rm -rf "${D}"/usr/share/factory - sed -i "${D}"/usr/lib/tmpfiles.d/etc.conf \ - -e '/^C \/etc\/nsswitch\.conf/d' \ - -e '/^C \/etc\/pam\.d/d' -} - -migrate_locale() { - local envd_locale_def="${EROOT%/}/etc/env.d/02locale" - local envd_locale=( "${EROOT%/}"/etc/env.d/??locale ) - local locale_conf="${EROOT%/}/etc/locale.conf" - - if [[ ! -L ${locale_conf} && ! -e ${locale_conf} ]]; then - # If locale.conf does not exist... - if [[ -e ${envd_locale} ]]; then - # ...either copy env.d/??locale if there's one - ebegin "Moving ${envd_locale} to ${locale_conf}" - mv "${envd_locale}" "${locale_conf}" - eend ${?} || FAIL=1 - else - # ...or create a dummy default - ebegin "Creating ${locale_conf}" - cat > "${locale_conf}" <<-EOF - # This file has been created by the sys-apps/systemd ebuild. - # See locale.conf(5) and localectl(1). - - # LANG=${LANG} - EOF - eend ${?} || FAIL=1 - fi - fi - - if [[ ! -L ${envd_locale} ]]; then - # now, if env.d/??locale is not a symlink (to locale.conf)... - if [[ -e ${envd_locale} ]]; then - # ...warn the user that he has duplicate locale settings - ewarn - ewarn "To ensure consistent behavior, you should replace ${envd_locale}" - ewarn "with a symlink to ${locale_conf}. Please migrate your settings" - ewarn "and create the symlink with the following command:" - ewarn "ln -s -n -f ../locale.conf ${envd_locale}" - ewarn - else - # ...or just create the symlink if there's nothing here - ebegin "Creating ${envd_locale_def} -> ../locale.conf symlink" - ln -n -s ../locale.conf "${envd_locale_def}" - eend ${?} || FAIL=1 - fi - fi -} - -migrate_net_name_slot() { - # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, - # do the same for 80-net-setup-link.rules to keep the old behavior - local net_move=no - local net_name_slot_sym=no - local net_rules_path="${EROOT%/}"/etc/udev/rules.d - local net_name_slot="${net_rules_path}"/80-net-name-slot.rules - local net_setup_link="${net_rules_path}"/80-net-setup-link.rules - if [[ -e ${net_setup_link} ]]; then - net_move=no - elif [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]]; then - net_move=yes - elif [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then - net_move=yes - net_name_slot_sym=yes - fi - if [[ ${net_move} == yes ]]; then - ebegin "Copying ${net_name_slot} to ${net_setup_link}" - - if [[ ${net_name_slot_sym} == yes ]]; then - ln -nfs /dev/null "${net_setup_link}" - else - cp "${net_name_slot}" "${net_setup_link}" - fi - eend $? || FAIL=1 - fi -} - -pkg_postinst() { - newusergroup() { - enewgroup "$1" - enewuser "$1" -1 -1 -1 "$1" - } - - enewgroup input - enewgroup systemd-journal - newusergroup systemd-bus-proxy - newusergroup systemd-journal-gateway - newusergroup systemd-journal-remote - newusergroup systemd-journal-upload - newusergroup systemd-network - newusergroup systemd-resolve - newusergroup systemd-timesync - use http && newusergroup systemd-journal-gateway - - systemd_update_catalog - - # Keep this here in case the database format changes so it gets updated - # when required. Despite that this file is owned by sys-apps/hwids. - if has_version "sys-apps/hwids[udev]"; then - udevadm hwdb --update --root="${ROOT%/}" - fi - - udev_reload || FAIL=1 - - # Bug 465468, make sure locales are respect, and ensure consistency - # between OpenRC & systemd - migrate_locale - - # Migrate 80-net-name-slot.rules -> 80-net-setup-link.rules - migrate_net_name_slot - - if [[ ${FAIL} ]]; then - eerror "One of the postinst commands failed. Please check the postinst output" - eerror "for errors. You may need to clean up your system and/or try installing" - eerror "systemd again." - eerror - fi - - if [[ ! -L "${ROOT}"/etc/mtab ]]; then - ewarn "Upstream mandates the /etc/mtab file should be a symlink to /proc/mounts." - ewarn "Not having it is not supported by upstream and will cause tools like 'df'" - ewarn "and 'mount' to not work properly. Please run:" - ewarn " # ln -sf '${ROOT}proc/self/mounts' '${ROOT}etc/mtab'" - ewarn - fi - - if [[ $(readlink "${ROOT}"/etc/resolv.conf) == */run/systemd/network/resolv.conf ]]; then - ewarn "resolv.conf is now generated by systemd-resolved. To use it, enable" - ewarn "systemd-resolved.service, and create a symlink from /etc/resolv.conf" - ewarn "to /run/systemd/resolve/resolv.conf" - ewarn - fi - - if ! has_version sys-apps/systemd-ui; then - elog "To get additional features, a number of optional runtime dependencies may" - elog "be installed:" - elog "- sys-apps/systemd-ui: for GTK+ systemadm UI and gnome-ask-password-agent" - fi - - if has_version sys-apps/openrc && - ! has_version sys-fs/udev-init-scripts; then - elog "If you plan to boot using OpenRC and udev or eudev, you" - elog "need to install the udev-init-scripts package." - fi -} - -pkg_prerm() { - # If removing systemd completely, remove the catalog database. - if [[ ! ${REPLACED_BY_VERSION} ]]; then - rm -f -v "${EROOT}"/var/lib/systemd/catalog/database - fi -}