Merge remote-tracking branch 'origin/systemd-216' into staging

This commit is contained in:
Eelco Dolstra 2014-09-08 13:53:33 +02:00
commit 152ae27aac
7 changed files with 93 additions and 2644 deletions

View File

@ -35,29 +35,27 @@ in
config = { config = {
environment.etc = # Name Service Switch configuration file. Required by the C
[ # Name Service Switch configuration file. Required by the C library. # library. !!! Factor out the mdns stuff. The avahi module
# !!! Factor out the mdns stuff. The avahi module should define # should define an option used by this module.
# an option used by this module. environment.etc."nsswitch.conf".text =
{ source = pkgs.writeText "nsswitch.conf"
'' ''
passwd: files ldap passwd: files ldap
group: files ldap group: files ldap
shadow: files ldap shadow: files ldap
hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname mymachines
networks: files dns networks: files dns
ethers: files ethers: files
services: files services: files
protocols: files protocols: files
''; '';
target = "nsswitch.conf";
}
];
# Use nss-myhostname to ensure that our hostname always resolves to # Systemd provides nss-myhostname to ensure that our hostname
# a valid IP address. It returns all locally configured IP # always resolves to a valid IP address. It returns all locally
# addresses, or ::1 and 127.0.0.2 as fallbacks. # configured IP addresses, or ::1 and 127.0.0.2 as
system.nssModules = [ pkgs.systemd ]; # fallbacks. Systemd also provides nss-mymachines to return IP
# addresses of local containers.
system.nssModules = [ config.systemd.package ];
}; };
} }

View File

@ -62,7 +62,7 @@ in
mkdir -m 0755 -p /var/db/nscd mkdir -m 0755 -p /var/db/nscd
''; '';
restartTriggers = [ config.environment.etc.hosts.source ]; restartTriggers = [ config.environment.etc.hosts.source config.environment.etc."nsswitch.conf".source ];
serviceConfig = serviceConfig =
{ ExecStart = "@${pkgs.glibc}/sbin/nscd nscd -f ${cfgFile}"; { ExecStart = "@${pkgs.glibc}/sbin/nscd nscd -f ${cfgFile}";

View File

@ -81,6 +81,7 @@ let
"systemd-journal-flush.service" "systemd-journal-flush.service"
"systemd-journal-gatewayd.socket" "systemd-journal-gatewayd.socket"
"systemd-journal-gatewayd.service" "systemd-journal-gatewayd.service"
"systemd-journald-dev-log.socket"
"syslog.socket" "syslog.socket"
# SysV init compatibility. # SysV init compatibility.

View File

@ -277,9 +277,12 @@ in
NotifyAccess = "all"; NotifyAccess = "all";
# Note that on reboot, systemd-nspawn returns 10, so this # Note that on reboot, systemd-nspawn returns 133, so this
# unit will be restarted. On poweroff, it returns 0, so the # unit will be restarted. On poweroff, it returns 0, so the
# unit won't be restarted. # unit won't be restarted.
RestartForceExitStatus = "133";
SuccessExitStatus = "133";
Restart = "on-failure"; Restart = "on-failure";
# Hack: we don't want to kill systemd-nspawn, since we call # Hack: we don't want to kill systemd-nspawn, since we call

View File

@ -1,5 +1,5 @@
{ stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, spidermonkey { stdenv, fetchurl, pkgconfig, glib, expat, pam, intltool, spidermonkey
, gobjectIntrospection, libxslt, docbook_xsl , gobjectIntrospection, libxslt, docbook_xsl, docbook_xml_dtd_412
, useSystemd ? stdenv.isLinux, systemd }: , useSystemd ? stdenv.isLinux, systemd }:
let let
@ -24,7 +24,7 @@ stdenv.mkDerivation rec {
buildInputs = buildInputs =
[ pkgconfig glib expat pam intltool spidermonkey gobjectIntrospection ] [ pkgconfig glib expat pam intltool spidermonkey gobjectIntrospection ]
++ [ libxslt docbook_xsl ] # man pages ++ [ libxslt docbook_xsl docbook_xml_dtd_412 ] # man pages
++ stdenv.lib.optional useSystemd systemd; ++ stdenv.lib.optional useSystemd systemd;
# Ugly hack to overwrite hardcoded directories # Ugly hack to overwrite hardcoded directories

View File

@ -1,9 +1,8 @@
{ stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, dbus, kmod { stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, dbus, kmod
, xz, pam, acl, cryptsetup, libuuid, m4, utillinux , xz, pam, acl, cryptsetup, libuuid, m4, utillinux
, glib, kbd, libxslt, coreutils, libgcrypt, sysvtools, docbook_xsl , glib, kbd, libxslt, coreutils, libgcrypt, sysvtools
, kexectools, libmicrohttpd, linuxHeaders , kexectools, libmicrohttpd, linuxHeaders
, pythonPackages ? null, pythonSupport ? false , pythonPackages ? null, pythonSupport ? false
, autoreconfHook
}: }:
assert stdenv.isLinux; assert stdenv.isLinux;
@ -11,25 +10,24 @@ assert stdenv.isLinux;
assert pythonSupport -> pythonPackages != null; assert pythonSupport -> pythonPackages != null;
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "212"; version = "216";
name = "systemd-${version}"; name = "systemd-${version}";
src = fetchurl { src = fetchurl {
url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz"; url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz";
sha256 = "1hpjcc42svrs06q3isjm3m5aphgkpfdylmvpnif71zh46ys0cab5"; sha256 = "1wr8jxhp2rmbzabm743rmrhp2c8kir1990x6iblzzmj0v2vkspcl";
}; };
patches = patches =
[ # These are all changes between upstream and [ # These are all changes between upstream and
# https://github.com/edolstra/systemd/tree/nixos-v212. # https://github.com/edolstra/systemd/tree/nixos-v216.
./fixes.patch ./fixes.patch
]; ];
buildInputs = buildInputs =
[ pkgconfig intltool gperf libcap kmod xz pam acl [ pkgconfig intltool gperf libcap kmod xz pam acl
/* cryptsetup */ libuuid m4 glib libxslt libgcrypt docbook_xsl /* cryptsetup */ libuuid m4 glib libxslt libgcrypt
libmicrohttpd linuxHeaders libmicrohttpd linuxHeaders
autoreconfHook
] ++ stdenv.lib.optionals pythonSupport [pythonPackages.python pythonPackages.lxml]; ] ++ stdenv.lib.optionals pythonSupport [pythonPackages.python pythonPackages.lxml];
configureFlags = configureFlags =
@ -45,9 +43,23 @@ stdenv.mkDerivation rec {
"--with-dbussessionservicedir=$(out)/share/dbus-1/services" "--with-dbussessionservicedir=$(out)/share/dbus-1/services"
"--with-firmware-path=/root/test-firmware:/run/current-system/firmware" "--with-firmware-path=/root/test-firmware:/run/current-system/firmware"
"--with-tty-gid=3" # tty in NixOS has gid 3 "--with-tty-gid=3" # tty in NixOS has gid 3
"--disable-networkd" # enable/use eventually
"--enable-compat-libs" # get rid of this eventually "--enable-compat-libs" # get rid of this eventually
"--disable-tests" "--disable-tests"
"--disable-hostnamed"
"--disable-networkd" # enable/use eventually
"--disable-sysusers"
"--disable-timedated"
"--disable-timesyncd"
"--disable-readahead"
"--disable-firstboot"
"--disable-localed"
"--disable-resolved"
"--disable-split-usr"
"--with-sysvinit-path="
"--with-sysvrcnd-path="
"--with-rc-local-script-path-stop=/etc/halt.local"
]; ];
preConfigure = preConfigure =
@ -88,6 +100,8 @@ stdenv.mkDerivation rec {
# currently running systemd (/run/current-system/systemd) so # currently running systemd (/run/current-system/systemd) so
# that we don't use an obsolete/garbage-collected release agent. # that we don't use an obsolete/garbage-collected release agent.
"-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\"" "-USYSTEMD_CGROUP_AGENT_PATH" "-DSYSTEMD_CGROUP_AGENT_PATH=\"/run/current-system/systemd/lib/systemd/systemd-cgroups-agent\""
"-USYSTEMD_BINARY_PATH" "-DSYSTEMD_BINARY_PATH=\"/run/current-system/systemd/lib/systemd/systemd\""
]; ];
# Use /var/lib/udev rather than /etc/udev for the generated hardware # Use /var/lib/udev rather than /etc/udev for the generated hardware
@ -104,9 +118,14 @@ stdenv.mkDerivation rec {
"pamconfdir=$(out)/etc/pam.d" "pamconfdir=$(out)/etc/pam.d"
]; ];
# Get rid of configuration-specific data.
postInstall = postInstall =
'' ''
# sysinit.target: Don't depend on
# systemd-tmpfiles-setup.service. This interferes with NixOps's
# send-keys feature (since sshd.service depends indirectly on
# sysinit.target).
mv $out/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup-dev.service $out/lib/systemd/system/multi-user.target.wants/
mkdir -p $out/example/systemd mkdir -p $out/example/systemd
mv $out/lib/{modules-load.d,binfmt.d,sysctl.d,tmpfiles.d} $out/example mv $out/lib/{modules-load.d,binfmt.d,sysctl.d,tmpfiles.d} $out/example
mv $out/lib/systemd/{system,user} $out/example/systemd mv $out/lib/systemd/{system,user} $out/example/systemd

File diff suppressed because it is too large Load Diff