diff options
author | Vladimír Čunát <vcunat@gmail.com> | 2015-04-18 11:00:58 +0200 |
---|---|---|
committer | Vladimír Čunát <vcunat@gmail.com> | 2015-04-18 11:22:20 +0200 |
commit | bf414c9d4f892fd4e392a5f42016b57e84402a8b (patch) | |
tree | 08c000d609ed8e608ca542fa78360e4217f3fc36 /pkgs/os-specific/linux/util-linux | |
parent | 29901451700a7382f3f9d5a0a23cd55b187e5585 (diff) | |
parent | 9de9669496a05f64ea436c01f9b66c057cd74f90 (diff) | |
download | nixlib-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar nixlib-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.gz nixlib-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.bz2 nixlib-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.lz nixlib-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.xz nixlib-bf414c9d4f892fd4e392a5f42016b57e84402a8b.tar.zst nixlib-bf414c9d4f892fd4e392a5f42016b57e84402a8b.zip |
Merge 'staging' into closure-size
- there were many easy merge conflicts - cc-wrapper needed nontrivial changes Many other problems might've been created by interaction of the branches, but stdenv and a few other packages build fine now.
Diffstat (limited to 'pkgs/os-specific/linux/util-linux')
-rw-r--r-- | pkgs/os-specific/linux/util-linux/default.nix | 22 | ||||
-rw-r--r-- | pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch | 30 |
2 files changed, 46 insertions, 6 deletions
diff --git a/pkgs/os-specific/linux/util-linux/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 7b4ac6d04d45..c4ccd6d37f8a 100644 --- a/pkgs/os-specific/linux/util-linux/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,15 +1,26 @@ { stdenv, fetchurl, zlib, ncurses ? null, perl ? null, pam }: stdenv.mkDerivation rec { - name = "util-linux-2.25"; + name = "util-linux-2.26.1"; src = fetchurl { - url = "http://www.kernel.org/pub/linux/utils/util-linux/v2.25/${name}.tar.xz"; - sha256 = "02lqww6ck4p47wzc883zdjb1gnwm59hsay4hd5i55mfdv25mmfj7"; + url = "mirror://kernel/linux/utils/util-linux/v2.26/${name}.tar.xz"; + sha256 = "0vmvk5khfwf71xbsnplvmk9ikwnlbhysc96mnkgwpqk2faairp12"; }; + patches = [ ./rtcwake-search-PATH-for-shutdown.patch + ]; outputs = [ "dev" "out" "bin" ]; # ToDo: problems with e2fsprogs + + #FIXME: make it also work on non-nixos? + postPatch = '' + # Substituting store paths would create a circular dependency on systemd + substituteInPlace include/pathnames.h \ + --replace "/bin/login" "/run/current-system/sw/bin/login" \ + --replace "/sbin/shutdown" "/run/current-system/sw/bin/shutdown" + ''; + crossAttrs = { # Work around use of `AC_RUN_IFELSE'. preConfigure = "export scanf_cv_type_modifier=ms"; @@ -23,9 +34,8 @@ stdenv.mkDerivation rec { --enable-write --enable-last --enable-mesg - --enable-ddate --disable-use-tty-group - --enable-fs-paths-default=/var/setuid-wrappers:/var/run/current-system/sw/sbin:/sbin + --enable-fs-paths-default=/var/setuid-wrappers:/var/run/current-system/sw/bin:/sbin ${if ncurses == null then "--without-ncurses" else ""} ''; @@ -47,7 +57,7 @@ stdenv.mkDerivation rec { homepage = http://www.kernel.org/pub/linux/utils/util-linux/; description = "A set of system utilities for Linux"; license = licenses.gpl2; # also contains parts under more permissive licenses - platforms = platforms.all; + platforms = platforms.linux; }; } diff --git a/pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch b/pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch new file mode 100644 index 000000000000..92cb07d43834 --- /dev/null +++ b/pkgs/os-specific/linux/util-linux/rtcwake-search-PATH-for-shutdown.patch @@ -0,0 +1,30 @@ +Search $PATH for the shutdown binary instead of hard-coding /sbin/shutdown, +which isn't valid on NixOS (and a compatibility link on most other modern +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 @@ + #define _PATH_INITTAB "/etc/inittab" + #define _PATH_RC "/etc/rc" + #define _PATH_REBOOT "/sbin/reboot" +-#define _PATH_SHUTDOWN "/sbin/shutdown" ++#define _PATH_SHUTDOWN "shutdown" + #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 @@ + arg[i] = NULL; + + if (!dryrun) { +- execv(arg[0], arg); ++ execvp(arg[0], arg); + + warn(_("failed to execute %s"), _PATH_SHUTDOWN); + rc = EXIT_FAILURE; |