mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-21 06:21:08 +02:00
Merge pull request #1161 from marineam/systemd
systemd: prune old versions
This commit is contained in:
commit
19593301d8
@ -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
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 00197239142c519270e44f94b1126a45e7f65511 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <michael.marineau@coreos.com>
|
||||
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
|
||||
|
@ -1,27 +0,0 @@
|
||||
From a5ad570fc0577080f994ac7f864470aa9fbd95d8 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <mike@marineau.org>
|
||||
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
|
||||
|
@ -1,26 +0,0 @@
|
||||
From d26956e27de9ec6d7bfd22da985136ae22930eaf Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
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
|
||||
|
@ -1,94 +0,0 @@
|
||||
From 79c9e82026d0c2e9466a5b2bc81ee7a3d16b1ade Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
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
|
||||
|
@ -1,37 +0,0 @@
|
||||
From b44c15f77e59d40d5bdf5608bf8d76cc2375ac6e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
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 <werner@suse.de>
|
||||
---
|
||||
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
|
||||
|
@ -1,42 +0,0 @@
|
||||
From 36749d890949896f3105fc852cfb5b8c2f22af3e Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
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
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 1335bbd1c9dd114d6491f08bc3b2c5eaf3768a04 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
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
|
||||
|
@ -1,48 +0,0 @@
|
||||
From efbcb2ef7b6337530ece0a251b80b35c109fcdf7 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
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 @@
|
||||
<varname>x86</varname>,
|
||||
<varname>x86-64</varname>,
|
||||
<varname>ppc</varname>,
|
||||
+ <varname>ppc-le</varname>,
|
||||
<varname>ppc64</varname>,
|
||||
+ <varname>ppc64-le</varname>,
|
||||
<varname>ia64</varname>,
|
||||
<varname>parisc</varname>,
|
||||
<varname>parisc64</varname>,
|
||||
@@ -940,7 +942,9 @@
|
||||
<varname>sparc</varname>,
|
||||
<varname>sparc64</varname>,
|
||||
<varname>mips</varname>,
|
||||
+ <varname>mips-le</varname>,
|
||||
<varname>mips64</varname>,
|
||||
+ <varname>mips64-le</varname>,
|
||||
<varname>alpha</varname>,
|
||||
<varname>arm</varname>,
|
||||
<varname>arm-be</varname>,
|
||||
@@ -948,7 +952,9 @@
|
||||
<varname>arm64-be</varname>,
|
||||
<varname>sh</varname>,
|
||||
<varname>sh64</varname>,
|
||||
- <varname>m86k</varname> to test
|
||||
+ <varname>m86k</varname>,
|
||||
+ <varname>tilegx</varname>,
|
||||
+ <varname>cris</varname> to test
|
||||
against a specific architecture. The
|
||||
architecture is determined from the
|
||||
information returned by
|
||||
--
|
||||
1.8.5.5
|
||||
|
@ -1,25 +0,0 @@
|
||||
From cb59448753d949cd31c5a84bccc37f10597e23d7 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
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 @@
|
||||
<varname>oracle</varname>,
|
||||
<varname>xen</varname>,
|
||||
<varname>bochs</varname>,
|
||||
- <varname>chroot</varname>,
|
||||
<varname>uml</varname>,
|
||||
<varname>openvz</varname>,
|
||||
<varname>lxc</varname>,
|
||||
--
|
||||
1.8.5.5
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 5055a12659b731d78cc30553576193905b6530ae Mon Sep 17 00:00:00 2001
|
||||
From: Harald Hoyer <harald@redhat.com>
|
||||
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
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 1a45876927c5a2fb7a48d4ecd00359b37b8e1c4f Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
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 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
- <term><option>-P</option></term>
|
||||
- <term><option>--privileged</option></term>
|
||||
-
|
||||
- <listitem><para>Acquire privileges via PolicyKit
|
||||
- before executing the operation.</para></listitem>
|
||||
- </varlistentry>
|
||||
-
|
||||
- <varlistentry>
|
||||
<term><option>--static</option></term>
|
||||
<term><option>--transient</option></term>
|
||||
<term><option>--pretty</option></term>
|
||||
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 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
- <term><option>-P</option></term>
|
||||
- <term><option>--privileged</option></term>
|
||||
-
|
||||
- <listitem><para>Acquire privileges via PolicyKit
|
||||
- before executing the operation.</para></listitem>
|
||||
- </varlistentry>
|
||||
-
|
||||
- <varlistentry>
|
||||
<term><option>--no-convert</option></term>
|
||||
|
||||
<listitem><para>If
|
||||
--
|
||||
1.8.5.5
|
||||
|
@ -1,28 +0,0 @@
|
||||
From f71f5fa7f6796cb809a2b827a5348cc494c128e1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
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
|
||||
|
@ -1,45 +0,0 @@
|
||||
From 05e483d224be6a7c057a7b6eb30d830fea18eda8 Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
||||
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 <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
+#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
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 8070ab78b7bba4a20bba278086580d6582c96e80 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
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
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 82155b957fac44db3858e1b008cf31e5004d40cd Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
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 <jstpierre@mecheye.net>
|
||||
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
|
||||
---
|
||||
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
|
||||
|
@ -1,26 +0,0 @@
|
||||
From d91cba9f5ed3aee340115bd4b4097bf3bf396365 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Schmidt <mschmidt@redhat.com>
|
||||
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
|
||||
|
@ -1,75 +0,0 @@
|
||||
From 18dd397f6383eb21ba383840dd9b10feaca4a663 Mon Sep 17 00:00:00 2001
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
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
|
||||
|
@ -1,54 +0,0 @@
|
||||
From c4067527b6c8875b1cb767cf4efd14998cf17c34 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
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</programlisting>
|
||||
<title>Name</title>
|
||||
|
||||
<para>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 <grp.h>
|
||||
#include <shadow.h>
|
||||
#include <getopt.h>
|
||||
+#include <utmp.h>
|
||||
|
||||
#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
|
||||
|
@ -1,34 +0,0 @@
|
||||
From b407f12e7656916b25b3b3c006290187e1064793 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Gilbert <floppym@gentoo.org>
|
||||
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
|
||||
|
@ -1,29 +0,0 @@
|
||||
From 669455ef0d5a3cf56c03c9fc668daa0750629cf5 Mon Sep 17 00:00:00 2001
|
||||
From: Jon Severinsson <jon@severinsson.net>
|
||||
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
|
||||
|
@ -1,27 +0,0 @@
|
||||
From c49b22614e4a6f843f8c2395d22bedf335f79fde Mon Sep 17 00:00:00 2001
|
||||
From: Sjoerd Simons <sjoerd@luon.net>
|
||||
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</programlisting>
|
||||
group will be set to the group
|
||||
bearing the same name. The
|
||||
user's shell will be set to
|
||||
- <filename>/sbin/login</filename>,
|
||||
+ <filename>/sbin/nologin</filename>,
|
||||
the home directory to
|
||||
<filename>/</filename>. The
|
||||
account will be created
|
||||
--
|
||||
1.8.5.5
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 584152929252c948e9826bc3c735165ea1328737 Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
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
|
||||
|
@ -1,33 +0,0 @@
|
||||
From 19c0af955631f8a32b3c95232cfcb4682dc362d6 Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
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
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 446e61ba07ec949544594729cdd2dff79c8e4cdc Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
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
|
||||
|
@ -1,28 +0,0 @@
|
||||
From bdabb3772ddd38ef7a62342efaa5b23d77765e5b Mon Sep 17 00:00:00 2001
|
||||
From: Umut Tezduyar Lindskog <umut.tezduyar@axis.com>
|
||||
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
|
||||
|
@ -1,33 +0,0 @@
|
||||
From 168b42d2860dcaaa4f4970f96467da1007cd78f5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
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
|
||||
|
@ -1,34 +0,0 @@
|
||||
From 0a9a32ccbb38db14ff5dc8455af8cdac9610fbce Mon Sep 17 00:00:00 2001
|
||||
From: Michael Olbrich <m.olbrich@pengutronix.de>
|
||||
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
|
||||
|
@ -1,104 +0,0 @@
|
||||
From c831530cf5cf6795e6c465c51689481a308a20a0 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
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
|
||||
|
@ -1,29 +0,0 @@
|
||||
From f491638dd12ad53539d62f5a1088eb26e233badf Mon Sep 17 00:00:00 2001
|
||||
From: Steven Noonan <steven@uplinklabs.net>
|
||||
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
|
||||
|
@ -1,25 +0,0 @@
|
||||
From 49047278910689c619b768130cce40c377fa5560 Mon Sep 17 00:00:00 2001
|
||||
From: Steven Noonan <steven@uplinklabs.net>
|
||||
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
|
||||
|
@ -1,106 +0,0 @@
|
||||
From f0b0beb95c95235ffc88d7230334f93e37982b04 Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
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 <stdint.h>
|
||||
#include <linux/if_packet.h>
|
||||
+#include <net/ethernet.h>
|
||||
|
||||
#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
|
||||
|
@ -1,69 +0,0 @@
|
||||
From 5c7eaa88675fc6e400420bbeb4890ef13b18b85b Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
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
|
||||
|
@ -1,28 +0,0 @@
|
||||
From 25bb651691c89caa40d57ca6cb347fbbf20633c5 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
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
|
||||
|
@ -1,141 +0,0 @@
|
||||
From 64e271490cf958e5554ddb8daa662c84c2003452 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
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.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
+ <varlistentry>
|
||||
+ <term><varname>RequestBroadcast=</varname></term>
|
||||
+ <listitem>
|
||||
+ <para>Request the server to use broadcast messages before the IP address has been
|
||||
+ configured. This is necessary for devices that cannot receive RAW packets, or that
|
||||
+ cannot receive packets at all before an IP address has been configured. On the other
|
||||
+ hand, this must not be enabled on networks where broadcasts are filtered out.</para>
|
||||
+ </listitem>
|
||||
+ </varlistentry>
|
||||
</variablelist>
|
||||
|
||||
</refsect1>
|
||||
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c
|
||||
index 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
|
||||
|
@ -1,29 +0,0 @@
|
||||
From cd210f1210700a9917412cb6d312eb029236f1ae Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <michael.marineau@coreos.com>
|
||||
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
|
||||
|
@ -1,94 +0,0 @@
|
||||
From 9a1aced57aaa6767298667c72308157d849282dc Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <michael.marineau@coreos.com>
|
||||
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
|
||||
|
@ -1,47 +0,0 @@
|
||||
From 00197239142c519270e44f94b1126a45e7f65511 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <michael.marineau@coreos.com>
|
||||
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
|
||||
|
@ -1,27 +0,0 @@
|
||||
From a5ad570fc0577080f994ac7f864470aa9fbd95d8 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <mike@marineau.org>
|
||||
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
|
||||
|
@ -1,31 +0,0 @@
|
||||
From b53858105bc92861a2025694437e65f81ff19ecf Mon Sep 17 00:00:00 2001
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
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
|
||||
|
@ -1,28 +0,0 @@
|
||||
From e19828f6d0e1c9417946d675a3c63203a778b23b Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <michael.marineau@coreos.com>
|
||||
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
|
||||
|
@ -1,47 +0,0 @@
|
||||
From eb5800026d5a6754514fb8f8a8561b49974fc879 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Marineau <michael.marineau@coreos.com>
|
||||
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
|
||||
|
@ -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
|
||||
<sys-apps/sysvinit-2.88-r4
|
||||
)
|
||||
!sys-auth/nss-myhostname
|
||||
!<sys-libs/glibc-2.14
|
||||
!sys-fs/udev"
|
||||
|
||||
# sys-apps/daemon: the daemon only (+ build-time lib dep for tests)
|
||||
PDEPEND=">=sys-apps/dbus-1.6.8-r1:0
|
||||
>=sys-apps/hwids-20130717-r1[udev]
|
||||
policykit? ( sys-auth/polkit )"
|
||||
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils:0
|
||||
dev-util/gperf
|
||||
>=dev-util/intltool-0.50
|
||||
>=sys-devel/binutils-2.23.1
|
||||
>=sys-devel/gcc-4.6
|
||||
>=sys-kernel/linux-headers-${MINKV}
|
||||
virtual/pkgconfig
|
||||
doc? ( >=dev-util/gtk-doc-1.18 )
|
||||
python? ( dev-python/lxml[${PYTHON_USEDEP}] )
|
||||
test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
|
||||
|
||||
# this ebuild patches the man source xml
|
||||
DEPEND="${DEPEND}
|
||||
app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt:0"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
DEPEND="${DEPEND}
|
||||
dev-libs/gobject-introspection
|
||||
>=dev-libs/libgcrypt-1.4.5:0"
|
||||
|
||||
SRC_URI=
|
||||
KEYWORDS=
|
||||
fi
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
if use doc; then
|
||||
gtkdocize --docdir docs/ || die
|
||||
else
|
||||
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
||||
fi
|
||||
fi
|
||||
# backports from master
|
||||
epatch "${FILESDIR}"/215-*.patch
|
||||
|
||||
# Bug 463376
|
||||
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
|
||||
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS ~DEVTMPFS ~DMIID
|
||||
~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS
|
||||
~SECCOMP ~SIGNALFD ~SYSFS ~TIMERFD ~TMPFS_XATTR
|
||||
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
|
||||
~!GRKERNSEC_PROC"
|
||||
|
||||
use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
|
||||
kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
|
||||
use firmware-loader || CONFIG_CHECK+=" ~!FW_LOADER_USER_HELPER"
|
||||
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
if [[ $(gcc-major-version) -lt 4
|
||||
|| ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]]
|
||||
then
|
||||
eerror "systemd requires at least gcc 4.6 to build. Please switch the active"
|
||||
eerror "gcc version using gcc-config."
|
||||
die "systemd requires at least gcc 4.6"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${MERGE_TYPE} != buildonly ]]; then
|
||||
if kernel_is -lt ${MINKV//./ }; then
|
||||
ewarn "Kernel version at least ${MINKV} required"
|
||||
fi
|
||||
|
||||
if ! use firmware-loader && kernel_is -lt 3 8; then
|
||||
ewarn "You seem to be using kernel older than 3.8. Those kernel versions"
|
||||
ewarn "require systemd with USE=firmware-loader to support loading"
|
||||
ewarn "firmware. Missing this flag may cause some hardware not to work."
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Keep using the one where the rules were installed.
|
||||
MY_UDEVDIR=$(get_udevdir)
|
||||
# Fix systems broken by bug #509454.
|
||||
[[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
--with-pamconfdir=/usr/share/pam.d
|
||||
--disable-maintainer-mode
|
||||
--localstatedir=/var
|
||||
--with-pamlibdir=$(getpam_mod_dir)
|
||||
# avoid bash-completion dep
|
||||
--with-bashcompletiondir="$(get_bashcompdir)"
|
||||
# make sure we get /bin:/sbin in $PATH
|
||||
--enable-split-usr
|
||||
# disable sysv compatibility
|
||||
--with-sysvinit-path=
|
||||
--with-sysvrcnd-path=
|
||||
# no deps
|
||||
--enable-efi
|
||||
--enable-ima
|
||||
# used for stacktraces in log messages, leave off for now
|
||||
--disable-elfutils
|
||||
# optional components/dependencies
|
||||
$(use_enable acl)
|
||||
$(use_enable audit)
|
||||
$(use_enable cryptsetup libcryptsetup)
|
||||
$(use_enable doc gtk-doc)
|
||||
$(use_enable gcrypt)
|
||||
$(use_enable gudev)
|
||||
$(use_enable http microhttpd)
|
||||
$(usex http $(use_enable ssl gnutls) --disable-gnutls)
|
||||
$(use_enable introspection)
|
||||
$(use_enable kdbus)
|
||||
$(use_enable kmod)
|
||||
$(use_enable lzma xz)
|
||||
$(use_enable nls)
|
||||
$(use_enable pam)
|
||||
$(use_enable policykit polkit)
|
||||
$(use_with python)
|
||||
$(use_enable python python-devel)
|
||||
$(use_enable qrcode qrencode)
|
||||
$(use_enable seccomp)
|
||||
$(use_enable selinux)
|
||||
$(use_enable test tests)
|
||||
|
||||
# not supported (avoid automagic deps in the future)
|
||||
--disable-chkconfig
|
||||
|
||||
# hardcode a few paths to spare some deps
|
||||
QUOTAON=/usr/sbin/quotaon
|
||||
QUOTACHECK=/usr/sbin/quotacheck
|
||||
|
||||
# dbus paths
|
||||
--with-dbuspolicydir="${EPREFIX}/usr/share/dbus-1/system.d"
|
||||
--with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
|
||||
--with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
|
||||
--with-dbusinterfacedir="${EPREFIX}/usr/share/dbus-1/interfaces"
|
||||
|
||||
--with-ntp-servers="0.coreos.pool.ntp.org 1.coreos.pool.ntp.org 2.coreos.pool.ntp.org 3.coreos.pool.ntp.org"
|
||||
|
||||
# no default name servers
|
||||
--with-dns-servers=
|
||||
)
|
||||
|
||||
if use firmware-loader; then
|
||||
myeconfargs+=(
|
||||
--with-firmware-path="/lib/firmware/updates:/lib/firmware"
|
||||
)
|
||||
fi
|
||||
|
||||
# Added for testing; this is UNSUPPORTED by the Gentoo systemd team!
|
||||
if [[ -n ${ROOTPREFIX+set} ]]; then
|
||||
myeconfargs+=(
|
||||
--with-rootprefix="${ROOTPREFIX}"
|
||||
--with-rootlibdir="${ROOTPREFIX}/$(get_libdir)"
|
||||
)
|
||||
fi
|
||||
|
||||
if ! multilib_is_native_abi; then
|
||||
myeconfargs+=(
|
||||
ac_cv_search_cap_init=
|
||||
ac_cv_header_sys_capability_h=yes
|
||||
DBUS_CFLAGS=' '
|
||||
DBUS_LIBS=' '
|
||||
|
||||
--disable-acl
|
||||
--disable-audit
|
||||
--disable-gcrypt
|
||||
--disable-gnutls
|
||||
--disable-gtk-doc
|
||||
--disable-introspection
|
||||
--disable-kmod
|
||||
--disable-libcryptsetup
|
||||
--disable-microhttpd
|
||||
--disable-networkd
|
||||
--disable-pam
|
||||
--disable-polkit
|
||||
--disable-qrencode
|
||||
--disable-seccomp
|
||||
--disable-selinux
|
||||
--disable-timesyncd
|
||||
--disable-tests
|
||||
--disable-xz
|
||||
--disable-python-devel
|
||||
)
|
||||
fi
|
||||
|
||||
# Work around bug 463846.
|
||||
tc-export CC
|
||||
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
local mymakeopts=(
|
||||
udevlibexecdir="${MY_UDEVDIR}"
|
||||
)
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
emake "${mymakeopts[@]}"
|
||||
else
|
||||
# prerequisites for gudev
|
||||
use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h}
|
||||
|
||||
echo 'gentoo: $(BUILT_SOURCES)' | \
|
||||
emake "${mymakeopts[@]}" -f Makefile -f - gentoo
|
||||
echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
|
||||
emake "${mymakeopts[@]}" -f Makefile -f - gentoo
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
multilib_is_native_abi || continue
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
local mymakeopts=(
|
||||
# automake fails with parallel libtool relinking
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=491398
|
||||
-j1
|
||||
|
||||
udevlibexecdir="${MY_UDEVDIR}"
|
||||
dist_udevhwdb_DATA=
|
||||
DESTDIR="${D}"
|
||||
)
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
emake "${mymakeopts[@]}" install
|
||||
else
|
||||
mymakeopts+=(
|
||||
install-libLTLIBRARIES
|
||||
install-pkgconfiglibDATA
|
||||
install-includeHEADERS
|
||||
# safe to call unconditionally, 'installs' empty list
|
||||
install-libgudev_includeHEADERS
|
||||
install-pkgincludeHEADERS
|
||||
)
|
||||
|
||||
emake "${mymakeopts[@]}"
|
||||
fi
|
||||
|
||||
# install compat pkg-config files
|
||||
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 "${D}"/etc/systemd/system/getty.target.wants/getty@tty1.service || die
|
||||
rmdir "${D}"/etc/systemd/system/getty.target.wants || die
|
||||
dosym ../getty@.service /usr/lib/systemd/system/getty.target.wants/getty@tty1.service
|
||||
|
||||
rm "${D}"/etc/systemd/system/multi-user.target.wants/remote-fs.target \
|
||||
"${D}"/etc/systemd/system/multi-user.target.wants/systemd-networkd.service \
|
||||
"${D}"/etc/systemd/system/multi-user.target.wants/systemd-resolved.service \
|
||||
"${D}"/etc/systemd/system/multi-user.target.wants/systemd-timesyncd.service \
|
||||
"${D}"/etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service \
|
||||
|| die
|
||||
rmdir "${D}"/etc/systemd/system/multi-user.target.wants \
|
||||
"${D}"/etc/systemd/system/network-online.target.wants \
|
||||
|| die
|
||||
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
|
||||
}
|
||||
|
||||
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 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
|
||||
}
|
@ -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-libs/glibc-2.14
|
||||
!sys-fs/eudev
|
||||
!sys-fs/udev"
|
||||
|
||||
# sys-apps/dbus: the daemon only (+ build-time lib dep for tests)
|
||||
PDEPEND=">=sys-apps/dbus-1.6.8-r1:0[systemd]
|
||||
>=sys-apps/hwids-20130717-r1[udev]
|
||||
policykit? ( sys-auth/polkit )
|
||||
!vanilla? ( sys-apps/gentoo-systemd-integration )"
|
||||
|
||||
# Newer linux-headers needed by ia64, bug #480218
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
app-arch/xz-utils:0
|
||||
dev-util/gperf
|
||||
>=dev-util/intltool-0.50
|
||||
>=sys-apps/coreutils-8.16
|
||||
>=sys-devel/binutils-2.23.1
|
||||
>=sys-devel/gcc-4.6
|
||||
>=sys-kernel/linux-headers-${MINKV}
|
||||
virtual/pkgconfig
|
||||
doc? ( >=dev-util/gtk-doc-1.18 )
|
||||
python? ( dev-python/lxml[${PYTHON_USEDEP}] )
|
||||
test? ( >=sys-apps/dbus-1.6.8-r1:0 )"
|
||||
|
||||
# Only required if patches touch man page source xml, which is usually.
|
||||
DEPEND="${DEPEND}
|
||||
app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
dev-libs/libxslt:0"
|
||||
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
DEPEND="${DEPEND}
|
||||
dev-libs/gobject-introspection
|
||||
>=dev-libs/libgcrypt-1.4.5:0"
|
||||
|
||||
SRC_URI=
|
||||
KEYWORDS=
|
||||
fi
|
||||
|
||||
src_prepare() {
|
||||
if [[ ${PV} == *9999 ]]; then
|
||||
if use doc; then
|
||||
gtkdocize --docdir docs/ || die
|
||||
else
|
||||
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
||||
fi
|
||||
fi
|
||||
# patches not upstream
|
||||
epatch "${FILESDIR}"/0001-hack-testing-Wl-fuse-ld-gold-does-not-work-correctly.patch
|
||||
|
||||
# make mount.usr friendlier
|
||||
epatch "${FILESDIR}"/217-0001-fstab-generator-Allow-mount.usr-without-mount.usrfla.patch
|
||||
|
||||
# Bug 463376
|
||||
sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
|
||||
|
||||
# missing in tarball
|
||||
cp "${FILESDIR}"/217-systemd-consoled.service.in \
|
||||
units/user/systemd-consoled.service.in || die
|
||||
|
||||
EPATCH_FORCE=yes EPATCH_SUFFIX=patch epatch
|
||||
autotools-utils_src_prepare
|
||||
}
|
||||
|
||||
pkg_pretend() {
|
||||
local CONFIG_CHECK="~AUTOFS4_FS ~BLK_DEV_BSG ~CGROUPS ~DEVTMPFS ~DMIID
|
||||
~EPOLL ~FANOTIFY ~FHANDLE ~INOTIFY_USER ~IPV6 ~NET ~NET_NS ~PROC_FS
|
||||
~SECCOMP ~SIGNALFD ~SYSFS ~TIMERFD ~TMPFS_XATTR
|
||||
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2
|
||||
~!GRKERNSEC_PROC ~!FW_LOADER_USER_HELPER"
|
||||
|
||||
use acl && CONFIG_CHECK+=" ~TMPFS_POSIX_ACL"
|
||||
kernel_is -lt 3 7 && CONFIG_CHECK+=" ~HOTPLUG"
|
||||
|
||||
if linux_config_exists; then
|
||||
local uevent_helper_path=$(linux_chkconfig_string UEVENT_HELPER_PATH)
|
||||
if [ -n "${uevent_helper_path}" ] && [ "${uevent_helper_path}" != '""' ]; then
|
||||
ewarn "It's recommended to set an empty value to the following kernel config option:"
|
||||
ewarn "CONFIG_UEVENT_HELPER_PATH=${uevent_helper_path}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${MERGE_TYPE} != binary ]]; then
|
||||
if [[ $(gcc-major-version) -lt 4
|
||||
|| ( $(gcc-major-version) -eq 4 && $(gcc-minor-version) -lt 6 ) ]]
|
||||
then
|
||||
eerror "systemd requires at least gcc 4.6 to build. Please switch the active"
|
||||
eerror "gcc version using gcc-config."
|
||||
die "systemd requires at least gcc 4.6"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${MERGE_TYPE} != buildonly ]]; then
|
||||
if kernel_is -lt ${MINKV//./ }; then
|
||||
ewarn "Kernel version at least ${MINKV} required"
|
||||
fi
|
||||
|
||||
check_extra_config
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
use python && python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# Keep using the one where the rules were installed.
|
||||
MY_UDEVDIR=$(get_udevdir)
|
||||
# Fix systems broken by bug #509454.
|
||||
[[ ${MY_UDEVDIR} ]] || MY_UDEVDIR=/lib/udev
|
||||
|
||||
multilib-minimal_src_configure
|
||||
}
|
||||
|
||||
multilib_native_enable() {
|
||||
if multilib_is_native_abi; then
|
||||
echo "--enable-${1}"
|
||||
else
|
||||
echo "--disable-${1}"
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_configure() {
|
||||
local myeconfargs=(
|
||||
--with-pamconfdir=/usr/share/pam.d
|
||||
|
||||
# Workaround for bug 516346
|
||||
--enable-dependency-tracking
|
||||
|
||||
--disable-maintainer-mode
|
||||
--localstatedir=/var
|
||||
--with-pamlibdir=$(getpam_mod_dir)
|
||||
# avoid bash-completion dep
|
||||
--with-bashcompletiondir="$(get_bashcompdir)"
|
||||
# make sure we get /bin:/sbin in $PATH
|
||||
--enable-split-usr
|
||||
# For testing.
|
||||
--with-rootprefix="${ROOTPREFIX-/usr}"
|
||||
--with-rootlibdir="${ROOTPREFIX-/usr}/$(get_libdir)"
|
||||
# disable sysv compatibility
|
||||
--with-sysvinit-path=
|
||||
--with-sysvrcnd-path=
|
||||
# no deps
|
||||
--enable-efi
|
||||
--enable-ima
|
||||
# used for stacktraces in log messages, leave off for now
|
||||
--disable-elfutils
|
||||
|
||||
# Optional components/dependencies
|
||||
$(multilib_native_use_enable acl)
|
||||
$(multilib_native_use_enable apparmor)
|
||||
$(multilib_native_use_enable audit)
|
||||
$(multilib_native_use_enable cryptsetup libcryptsetup)
|
||||
$(multilib_native_use_enable curl libcurl)
|
||||
$(multilib_native_use_enable doc gtk-doc)
|
||||
$(multilib_native_use_enable elfutils)
|
||||
$(use_enable gcrypt)
|
||||
$(use_enable gudev)
|
||||
$(multilib_native_use_enable http microhttpd)
|
||||
$(usex http $(multilib_native_use_enable ssl gnutls) --disable-gnutls)
|
||||
$(multilib_native_use_enable idn libidn)
|
||||
$(multilib_native_use_enable introspection)
|
||||
$(use_enable kdbus)
|
||||
$(multilib_native_use_enable kmod)
|
||||
$(use_enable lz4)
|
||||
$(use_enable lzma xz)
|
||||
$(use_enable nls)
|
||||
$(multilib_native_use_enable pam)
|
||||
$(multilib_native_use_enable policykit polkit)
|
||||
$(multilib_native_use_with python)
|
||||
$(multilib_native_use_enable python python-devel)
|
||||
$(multilib_native_use_enable qrcode qrencode)
|
||||
$(multilib_native_use_enable seccomp)
|
||||
$(multilib_native_use_enable selinux)
|
||||
$(multilib_native_use_enable terminal)
|
||||
$(multilib_native_use_enable test tests)
|
||||
$(multilib_native_use_enable test dbus)
|
||||
|
||||
# Disable optional binaries for non-native abis
|
||||
$(multilib_native_enable backlight)
|
||||
$(multilib_native_enable binfmt)
|
||||
$(multilib_native_enable bootchart)
|
||||
$(multilib_native_enable coredump)
|
||||
$(multilib_native_enable firstboot)
|
||||
$(multilib_native_enable hibernate)
|
||||
$(multilib_native_enable hostnamed)
|
||||
$(multilib_native_enable localed)
|
||||
$(multilib_native_enable logind)
|
||||
$(multilib_native_enable machined)
|
||||
$(multilib_native_enable networkd)
|
||||
$(multilib_native_enable quotacheck)
|
||||
$(multilib_native_enable randomseed)
|
||||
$(multilib_native_enable resolved)
|
||||
$(multilib_native_enable rfkill)
|
||||
$(multilib_native_enable sysusers)
|
||||
$(multilib_native_enable timedated)
|
||||
$(multilib_native_enable timesyncd)
|
||||
$(multilib_native_enable tmpfiles)
|
||||
$(multilib_native_enable vconsole)
|
||||
|
||||
# not supported (avoid automagic deps in the future)
|
||||
--disable-chkconfig
|
||||
|
||||
# hardcode a few paths to spare some deps
|
||||
QUOTAON=/usr/sbin/quotaon
|
||||
QUOTACHECK=/usr/sbin/quotacheck
|
||||
|
||||
# dbus paths
|
||||
--with-dbuspolicydir="${EPREFIX}/usr/share/dbus-1/system.d"
|
||||
--with-dbussessionservicedir="${EPREFIX}/usr/share/dbus-1/services"
|
||||
--with-dbussystemservicedir="${EPREFIX}/usr/share/dbus-1/system-services"
|
||||
--with-dbusinterfacedir="${EPREFIX}/usr/share/dbus-1/interfaces"
|
||||
|
||||
--with-ntp-servers="0.coreos.pool.ntp.org 1.coreos.pool.ntp.org 2.coreos.pool.ntp.org 3.coreos.pool.ntp.org"
|
||||
|
||||
# no default name servers
|
||||
--with-dns-servers=
|
||||
)
|
||||
|
||||
if ! multilib_is_native_abi; then
|
||||
myeconfargs+=(
|
||||
ac_cv_search_cap_init=
|
||||
ac_cv_header_sys_capability_h=yes
|
||||
)
|
||||
fi
|
||||
|
||||
# Work around bug 463846.
|
||||
tc-export CC
|
||||
|
||||
autotools-utils_src_configure
|
||||
}
|
||||
|
||||
multilib_src_compile() {
|
||||
local mymakeopts=(
|
||||
udevlibexecdir="${MY_UDEVDIR}"
|
||||
)
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
emake "${mymakeopts[@]}"
|
||||
else
|
||||
# prerequisites for gudev
|
||||
use gudev && emake src/gudev/gudev{enumtypes,marshal}.{c,h}
|
||||
|
||||
echo 'gentoo: $(BUILT_SOURCES)' | \
|
||||
emake "${mymakeopts[@]}" -f Makefile -f - gentoo
|
||||
echo 'gentoo: $(lib_LTLIBRARIES) $(pkgconfiglib_DATA)' | \
|
||||
emake "${mymakeopts[@]}" -f Makefile -f - gentoo
|
||||
fi
|
||||
}
|
||||
|
||||
multilib_src_test() {
|
||||
multilib_is_native_abi || continue
|
||||
|
||||
default
|
||||
}
|
||||
|
||||
multilib_src_install() {
|
||||
local mymakeopts=(
|
||||
# automake fails with parallel libtool relinking
|
||||
# https://bugs.gentoo.org/show_bug.cgi?id=491398
|
||||
-j1
|
||||
|
||||
udevlibexecdir="${MY_UDEVDIR}"
|
||||
dist_udevhwdb_DATA=
|
||||
DESTDIR="${D}"
|
||||
)
|
||||
|
||||
if multilib_is_native_abi; then
|
||||
emake "${mymakeopts[@]}" install
|
||||
else
|
||||
mymakeopts+=(
|
||||
install-libLTLIBRARIES
|
||||
install-pkgconfiglibDATA
|
||||
install-includeHEADERS
|
||||
# safe to call unconditionally, 'installs' empty list
|
||||
install-libgudev_includeHEADERS
|
||||
install-pkgincludeHEADERS
|
||||
)
|
||||
|
||||
emake "${mymakeopts[@]}"
|
||||
fi
|
||||
|
||||
# install compat pkg-config files
|
||||
# Change dbus to >=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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user