Merge remote-tracking branch 'origin/systemd-219' into staging
This commit is contained in:
@@ -1,71 +0,0 @@
|
||||
{ stdenv, fetchurl, perl, cross ? null }:
|
||||
|
||||
assert cross == null -> stdenv.isLinux;
|
||||
|
||||
let
|
||||
|
||||
version = "3.14.1";
|
||||
|
||||
kernelHeadersBaseConfig =
|
||||
if cross == null
|
||||
then stdenv.platform.kernelHeadersBaseConfig
|
||||
else cross.platform.kernelHeadersBaseConfig;
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "linux-headers-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
|
||||
sha256 = "1njm8gvlj7cq0m1051yxszl4f63383a7sv1na13hkqkv36kipgqx";
|
||||
};
|
||||
|
||||
targetConfig = if cross != null then cross.config else null;
|
||||
|
||||
platform =
|
||||
if cross != null then cross.platform.kernelArch else
|
||||
if stdenv.system == "i686-linux" then "i386" else
|
||||
if stdenv.system == "x86_64-linux" then "x86_64" else
|
||||
if stdenv.system == "powerpc-linux" then "powerpc" else
|
||||
if stdenv.isArm then "arm" else
|
||||
if stdenv.platform ? kernelArch then stdenv.platform.kernelArch else
|
||||
abort "don't know what the kernel include directory is called for this platform";
|
||||
|
||||
buildInputs = [perl];
|
||||
|
||||
extraIncludeDirs =
|
||||
if cross != null then
|
||||
(if cross.arch == "powerpc" then ["ppc"] else [])
|
||||
else if stdenv.system == "powerpc-linux" then ["ppc"] else [];
|
||||
|
||||
buildPhase = ''
|
||||
if test -n "$targetConfig"; then
|
||||
export ARCH=$platform
|
||||
fi
|
||||
make ${kernelHeadersBaseConfig} SHELL=bash
|
||||
make mrproper headers_check SHELL=bash
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
make INSTALL_HDR_PATH=$out headers_install
|
||||
|
||||
# Some builds (e.g. KVM) want a kernel.release.
|
||||
mkdir -p $out/include/config
|
||||
echo "${version}-default" > $out/include/config/kernel.release
|
||||
'';
|
||||
|
||||
# !!! hacky
|
||||
fixupPhase = ''
|
||||
ln -s asm $out/include/asm-$platform
|
||||
if test "$platform" = "i386" -o "$platform" = "x86_64"; then
|
||||
ln -s asm $out/include/asm-x86
|
||||
fi
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Header files and scripts for Linux kernel";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
+2
-2
@@ -4,7 +4,7 @@ assert cross == null -> stdenv.isLinux;
|
||||
|
||||
let
|
||||
|
||||
version = "3.12.32";
|
||||
version = "3.18.14";
|
||||
|
||||
kernelHeadersBaseConfig =
|
||||
if cross == null
|
||||
@@ -18,7 +18,7 @@ stdenv.mkDerivation {
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v3.x/linux-${version}.tar.xz";
|
||||
sha256 = "1hzws2bf267hfk81ywqcxspkyi1lg56x63izdc0pv1338xcfas53";
|
||||
sha256 = "1xh0vvn1l2g1kkg54f0mg0inbpsiqs24ybgsakksmcpcadjgqk1i";
|
||||
};
|
||||
|
||||
targetConfig = if cross != null then cross.config else null;
|
||||
@@ -1,7 +1,8 @@
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, gperf, libcap, dbus, kmod
|
||||
{ stdenv, fetchFromGitHub, pkgconfig, intltool, gperf, libcap, dbus, kmod
|
||||
, xz, pam, acl, cryptsetup, libuuid, m4, utillinux
|
||||
, glib, kbd, libxslt, coreutils, libgcrypt
|
||||
, kexectools, libmicrohttpd, linuxHeaders
|
||||
, kexectools, libmicrohttpd, linuxHeaders, libseccomp
|
||||
, autoreconfHook, gettext, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_45
|
||||
, pythonPackages ? null, pythonSupport ? false
|
||||
}:
|
||||
|
||||
@@ -10,24 +11,26 @@ assert stdenv.isLinux;
|
||||
assert pythonSupport -> pythonPackages != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "217";
|
||||
version = "227";
|
||||
name = "systemd-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.freedesktop.org/software/systemd/${name}.tar.xz";
|
||||
sha256 = "163l1y4p2a564d4ynfq3k3xf53j2v5s81blb6cvpn1y7rpxyccd0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "NixOS";
|
||||
repo = "systemd";
|
||||
rev = "7d94d27801d20278103d8c146633fe81e06697d6";
|
||||
sha256 = "0cvzsrazqgbia3zajb0z4ik8myfil4bdy2c29qs6w93d6yvrjfkj";
|
||||
};
|
||||
|
||||
patches =
|
||||
[ # These are all changes between upstream and
|
||||
# https://github.com/NixOS/systemd/tree/nixos-v217.
|
||||
./fixes.patch
|
||||
];
|
||||
outputs = [ "out" "man" "doc" ];
|
||||
|
||||
buildInputs =
|
||||
[ pkgconfig intltool gperf libcap kmod xz pam acl
|
||||
[ linuxHeaders pkgconfig intltool gperf libcap kmod xz pam acl
|
||||
/* cryptsetup */ libuuid m4 glib libxslt libgcrypt
|
||||
libmicrohttpd linuxHeaders
|
||||
libmicrohttpd kexectools libseccomp
|
||||
/* FIXME: we may be able to prevent the following dependencies
|
||||
by generating an autoconf'd tarball, but that's probably not
|
||||
worth it. */
|
||||
autoreconfHook gettext docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45
|
||||
] ++ stdenv.lib.optionals pythonSupport [pythonPackages.python pythonPackages.lxml];
|
||||
|
||||
configureFlags =
|
||||
@@ -37,7 +40,6 @@ stdenv.mkDerivation rec {
|
||||
"--with-kbd-loadkeys=${kbd}/bin/loadkeys"
|
||||
"--with-kbd-setfont=${kbd}/bin/setfont"
|
||||
"--with-rootprefix=$(out)"
|
||||
"--with-dbusinterfacedir=$(out)/share/dbus-1/interfaces"
|
||||
"--with-dbuspolicydir=$(out)/etc/dbus-1/system.d"
|
||||
"--with-dbussystemservicedir=$(out)/share/dbus-1/system-services"
|
||||
"--with-dbussessionservicedir=$(out)/share/dbus-1/services"
|
||||
@@ -50,11 +52,15 @@ stdenv.mkDerivation rec {
|
||||
"--disable-sysusers"
|
||||
"--disable-timedated"
|
||||
"--enable-timesyncd"
|
||||
"--disable-readahead"
|
||||
"--disable-firstboot"
|
||||
"--disable-localed"
|
||||
"--enable-resolved"
|
||||
"--disable-split-usr"
|
||||
"--disable-libcurl"
|
||||
"--disable-libidn"
|
||||
"--disable-quotacheck"
|
||||
"--disable-ldconfig"
|
||||
"--disable-smack"
|
||||
|
||||
"--with-sysvinit-path="
|
||||
"--with-sysvrcnd-path="
|
||||
@@ -63,9 +69,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure =
|
||||
''
|
||||
./autogen.sh
|
||||
|
||||
# FIXME: patch this in systemd properly (and send upstream).
|
||||
# FIXME: use sulogin from util-linux once updated.
|
||||
for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c units/emergency.service.in units/rescue.service.in src/journal/cat.c src/core/shutdown.c src/nspawn/nspawn.c; do
|
||||
for i in src/remount-fs/remount-fs.c src/core/mount.c src/core/swap.c src/fsck/fsck.c units/emergency.service.in units/rescue.service.in src/journal/cat.c src/core/shutdown.c src/nspawn/nspawn.c src/shared/generator.c; do
|
||||
test -e $i
|
||||
substituteInPlace $i \
|
||||
--replace /usr/bin/getent ${stdenv.glibc}/bin/getent \
|
||||
@@ -76,7 +83,7 @@ stdenv.mkDerivation rec {
|
||||
--replace /bin/echo ${coreutils}/bin/echo \
|
||||
--replace /bin/cat ${coreutils}/bin/cat \
|
||||
--replace /sbin/sulogin ${utillinux}/sbin/sulogin \
|
||||
--replace /sbin/kexec ${kexectools}/sbin/kexec
|
||||
--replace /usr/lib/systemd/systemd-fsck $out/lib/systemd/systemd-fsck
|
||||
done
|
||||
|
||||
substituteInPlace src/journal/catalog.c \
|
||||
@@ -85,10 +92,6 @@ stdenv.mkDerivation rec {
|
||||
configureFlagsArray+=("--with-ntp-servers=0.nixos.pool.ntp.org 1.nixos.pool.ntp.org 2.nixos.pool.ntp.org 3.nixos.pool.ntp.org")
|
||||
'';
|
||||
|
||||
# This is needed because systemd uses the gold linker, which doesn't
|
||||
# yet have the wrapper script to add rpath flags automatically.
|
||||
NIX_LDFLAGS = "-rpath ${pam}/lib -rpath ${libcap}/lib -rpath ${acl}/lib -rpath ${stdenv.cc.cc}/lib";
|
||||
|
||||
PYTHON_BINARY = "${coreutils}/bin/env python"; # don't want a build time dependency on Python
|
||||
|
||||
NIX_CFLAGS_COMPILE =
|
||||
@@ -146,6 +149,11 @@ stdenv.mkDerivation rec {
|
||||
done
|
||||
|
||||
rm -rf $out/etc/rpm
|
||||
|
||||
rm $out/lib/*.la
|
||||
|
||||
# "kernel-install" shouldn't be used on NixOS.
|
||||
find $out -name "*kernel-install*" -exec rm {} \;
|
||||
''; # */
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, pkgconfig, intltool
|
||||
, expat, acl, systemd, glib, libatasmart, polkit
|
||||
, libxslt, docbook_xsl, utillinux, mdadm
|
||||
, libxslt, docbook_xsl, utillinux, mdadm, libgudev
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@@ -26,9 +26,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [ pkgconfig intltool ];
|
||||
|
||||
propagatedBuildInputs = [ expat acl systemd glib libatasmart polkit ]; # in closure anyway
|
||||
|
||||
buildInputs = [ libxslt docbook_xsl ];
|
||||
buildInputs = [ libxslt docbook_xsl libgudev expat acl systemd glib libatasmart polkit ];
|
||||
|
||||
configureFlags = [
|
||||
"--localstatedir=/var"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, pkgconfig, glib, dbus_glib
|
||||
, intltool, libxslt, docbook_xsl, udev, libusb1
|
||||
, intltool, libxslt, docbook_xsl, udev, libgudev, libusb1
|
||||
, useSystemd ? true, systemd, gobjectIntrospection
|
||||
}:
|
||||
|
||||
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs =
|
||||
[ dbus_glib intltool libxslt docbook_xsl udev libusb1 gobjectIntrospection ]
|
||||
[ dbus_glib intltool libxslt docbook_xsl udev libgudev libusb1 gobjectIntrospection ]
|
||||
++ stdenv.lib.optional useSystemd systemd;
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
{ stdenv, fetchurl, zlib, ncurses ? null, perl ? null, pam }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "util-linux-2.26.2";
|
||||
name = "util-linux-2.27";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/utils/util-linux/v2.26/${name}.tar.xz";
|
||||
sha256 = "0rlnzmiqdannzf81fbh41541lrck63v9zhskm6h4i2jj8ahvsa8f";
|
||||
url = "mirror://kernel/linux/utils/util-linux/v2.27/${name}.tar.xz";
|
||||
sha256 = "1ivdx1bhjbakf77agm9dn3wyxia1wgz9lzxgd61zqxw3xzih9gzw";
|
||||
};
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
patches = [
|
||||
./rtcwake-search-PATH-for-shutdown.patch
|
||||
];
|
||||
|
||||
@@ -4,10 +4,10 @@ distros anyway).
|
||||
|
||||
-- nckx <tobias.geerinckx.rice@gmail.com>
|
||||
|
||||
diff -Naur a/include/pathnames.h b/include/pathnames.h
|
||||
--- a/include/pathnames.h 2014-09-16 14:37:06.138551680 +0200
|
||||
+++ b/include/pathnames.h 2015-01-01 20:41:02.510948314 +0100
|
||||
@@ -43,7 +43,7 @@
|
||||
diff -ru util-linux-2.27-orig/include/pathnames.h util-linux-2.27/include/pathnames.h
|
||||
--- util-linux-2.27-orig/include/pathnames.h 2015-06-29 13:13:14.669847478 +0200
|
||||
+++ util-linux-2.27/include/pathnames.h 2015-10-07 20:09:17.401022602 +0200
|
||||
@@ -54,7 +54,7 @@
|
||||
#define _PATH_INITTAB "/etc/inittab"
|
||||
#define _PATH_RC "/etc/rc"
|
||||
#define _PATH_REBOOT "/sbin/reboot"
|
||||
@@ -16,15 +16,15 @@ diff -Naur a/include/pathnames.h b/include/pathnames.h
|
||||
#define _PATH_SINGLE "/etc/singleboot"
|
||||
#define _PATH_SHUTDOWN_CONF "/etc/shutdown.conf"
|
||||
|
||||
diff -Naur a/sys-utils/rtcwake.c b/sys-utils/rtcwake.c
|
||||
--- a/sys-utils/rtcwake.c 2014-10-24 11:21:20.447389309 +0200
|
||||
+++ b/sys-utils/rtcwake.c 2015-01-01 20:57:59.398911209 +0100
|
||||
@@ -582,7 +582,7 @@
|
||||
diff -ru util-linux-2.27-orig/sys-utils/rtcwake.c util-linux-2.27/sys-utils/rtcwake.c
|
||||
--- util-linux-2.27-orig/sys-utils/rtcwake.c 2015-08-05 11:32:44.453821232 +0200
|
||||
+++ util-linux-2.27/sys-utils/rtcwake.c 2015-10-07 20:09:37.834032536 +0200
|
||||
@@ -576,7 +576,7 @@
|
||||
arg[i++] = "now";
|
||||
arg[i] = NULL;
|
||||
|
||||
if (!dryrun) {
|
||||
if (!ctl.dryrun) {
|
||||
- execv(arg[0], arg);
|
||||
+ execvp(arg[0], arg);
|
||||
|
||||
warn(_("failed to execute %s"), _PATH_SHUTDOWN);
|
||||
rc = EXIT_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user