diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-06-25 18:42:56 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-06-25 18:42:56 +0200 |
commit | 552fd3d599851336aa21ef073d1f7836566e454f (patch) | |
tree | b2ebdeaa32426d12e21020410a0eb1a12881f8f6 /pkgs/os-specific/linux/systemd | |
parent | cc61d31902d67b94333f53a5ab5772330bbc21cc (diff) | |
parent | 9dc35999602bc3bf2d7358a9ff79b9530e8d1975 (diff) | |
download | nixlib-552fd3d599851336aa21ef073d1f7836566e454f.tar nixlib-552fd3d599851336aa21ef073d1f7836566e454f.tar.gz nixlib-552fd3d599851336aa21ef073d1f7836566e454f.tar.bz2 nixlib-552fd3d599851336aa21ef073d1f7836566e454f.tar.lz nixlib-552fd3d599851336aa21ef073d1f7836566e454f.tar.xz nixlib-552fd3d599851336aa21ef073d1f7836566e454f.tar.zst nixlib-552fd3d599851336aa21ef073d1f7836566e454f.zip |
Merge remote-tracking branch 'origin/master' into multiple-outputs
Conflicts: pkgs/development/libraries/atk/default.nix pkgs/development/libraries/cairo/default.nix pkgs/development/libraries/freetype/default.nix pkgs/development/libraries/glib/default.nix pkgs/development/libraries/gmime/default.nix pkgs/development/libraries/pango/default.nix pkgs/servers/x11/xorg/default.nix pkgs/top-level/all-packages.nix
Diffstat (limited to 'pkgs/os-specific/linux/systemd')
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 20 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/fix-tests-1.patch | 68 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/no-global-install.patch | 26 |
3 files changed, 111 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 2a34600529dc..e7184aa27b96 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -3,10 +3,11 @@ , glib, kbd, libxslt, coreutils, libgcrypt, sysvtools, docbook_xsl }: -assert stdenv.gcc.libc or null != null; +assert stdenv.isLinux; stdenv.mkDerivation rec { - name = "systemd-203"; + version = "203"; + name = "systemd-${version}"; src = fetchurl { url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz"; @@ -26,7 +27,7 @@ stdenv.mkDerivation rec { ] ++ stdenv.lib.optional stdenv.isArm ./libc-bug-accept4-arm.patch; buildInputs = - [ pkgconfig intltool gperf libcap dbus kmod xz pam acl + [ pkgconfig intltool gperf libcap dbus.libs kmod xz pam acl /* cryptsetup */ libuuid m4 glib libxslt libgcrypt docbook_xsl ]; @@ -125,6 +126,19 @@ stdenv.mkDerivation rec { # runtime; otherwise we can't and we need to reboot. passthru.interfaceVersion = 2; + passthru.headers = stdenv.mkDerivation { + name = "systemd-headers-${version}"; + inherit src; + + phases = [ "unpackPhase" "installPhase" ]; + + # some are needed by dbus.libs, which is needed for systemd :-) + installPhase = '' + mkdir -p "$out/include/systemd" + mv src/systemd/*.h "$out/include/systemd" + ''; + }; + meta = { homepage = "http://www.freedesktop.org/wiki/Software/systemd"; description = "A system and service manager for Linux"; diff --git a/pkgs/os-specific/linux/systemd/fix-tests-1.patch b/pkgs/os-specific/linux/systemd/fix-tests-1.patch new file mode 100644 index 000000000000..14bb0fa27081 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/fix-tests-1.patch @@ -0,0 +1,68 @@ +Signed-off-by: Ramkumar Ramachandra <artag...@gmail.com> +--- + Ramkumar Ramachandra wrote: + > $ ./test-id128 + > random: a08ea8ed34594d4bbd953dd182ec86f9 + > Assertion 'sd_id128_get_machine(&id) == 0' failed at + > src/test/test-id128.c:41, function main(). Aborting. + > [1] 8017 abort (core dumped) ./test-id128 + + Okay, this test fails because I don't have a /etc/machine-id -- I + thought systemd is supposed to create it? However, from the logic in + src/core/machine-id-setup.c, it looks like although open() is called + with O_CREAT on /etc/machine-id, systemd barfs if the file isn't + present. How about changing this? + + src/core/machine-id-setup.c | 12 +++++------- + src/test/test-id128.c | 6 ++++-- + 2 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/core/machine-id-setup.c b/src/core/machine-id-setup.c +index 7f4c23b..3f21d58 100644 +--- a/src/core/machine-id-setup.c ++++ b/src/core/machine-id-setup.c +@@ -168,12 +168,8 @@ int machine_id_setup(void) { + writable = true; + else { + fd = open("/etc/machine-id", O_RDONLY|O_CLOEXEC|O_NOCTTY); +- if (fd < 0) { +- umask(m); +- log_error("Cannot open /etc/machine-id: %m"); +- return -errno; +- } +- ++ if (fd < 0) ++ goto generate; + writable = false; + } + +@@ -192,7 +188,9 @@ int machine_id_setup(void) { + } + } + +- /* Hmm, so, the id currently stored is not useful, then let's ++generate: ++ /* Hmm, so, either /etc/machine-id doesn't exist, the id ++ * currently stored is not useful, then let's + * generate one */ + + r = generate(id); +diff --git a/src/test/test-id128.c b/src/test/test-id128.c +index bfd743e..60902d0 100644 +--- a/src/test/test-id128.c ++++ b/src/test/test-id128.c +@@ -38,8 +38,10 @@ int main(int argc, char *argv[]) { + assert_se(sd_id128_from_string(t, &id2) == 0); + assert_se(sd_id128_equal(id, id2)); + +- assert_se(sd_id128_get_machine(&id) == 0); +- printf("machine: %s\n", sd_id128_to_string(id, t)); ++ if (sd_id128_get_machine(&id) < 0) ++ printf("machine: run systemd-machine-id-setup first\n"); ++ else ++ printf("machine: %s\n", sd_id128_to_string(id, t)); + + assert_se(sd_id128_get_boot(&id) == 0); + printf("boot: %s\n", sd_id128_to_string(id, t)); +-- +1.7.8.1.362.g5d6df.dirty diff --git a/pkgs/os-specific/linux/systemd/no-global-install.patch b/pkgs/os-specific/linux/systemd/no-global-install.patch new file mode 100644 index 000000000000..6567251d57a1 --- /dev/null +++ b/pkgs/os-specific/linux/systemd/no-global-install.patch @@ -0,0 +1,26 @@ +diff --git a/Makefile.am b/Makefile.am +index 05bf582..aa16a7c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2568,11 +2568,6 @@ endif + # "adm" and "wheel". + libsystemd-journal-install-hook: + libname=libsystemd-journal.so && $(move-to-rootlibdir) +- $(MKDIR_P) $(DESTDIR)/var/log/journal +- -chown 0:0 $(DESTDIR)/var/log/journal +- -chmod 755 $(DESTDIR)/var/log/journal +- -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/ +- -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/ + + libsystemd-journal-uninstall-hook: + rm -f $(DESTDIR)$(rootlibdir)/libsystemd-journal.so* +@@ -3676,9 +3671,6 @@ if HAVE_SYSV_COMPAT + sysvinit_DATA = \ + docs/sysvinit/README + +-varlog_DATA = \ +- docs/var-log/README +- + docs/sysvinit/README: docs/sysvinit/README.in + $(SED_PROCESS) + |