From cbe326feb88c380dbee2a9b500fd32a307f71cf6 Mon Sep 17 00:00:00 2001 From: Leon Isenberg Date: Sun, 29 Oct 2017 21:32:40 +0100 Subject: [PATCH 01/35] rustup: Patch rustup to patchelf binaries --- .../0001-dynamically-patchelf-binaries.patch | 54 +++++++++++++ .../0001-use-hardcoded-dynamic-linker.patch | 75 ------------------- .../development/tools/rust/rustup/default.nix | 8 +- 3 files changed, 59 insertions(+), 78 deletions(-) create mode 100644 pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch delete mode 100644 pkgs/development/tools/rust/rustup/0001-use-hardcoded-dynamic-linker.patch diff --git a/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch b/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch new file mode 100644 index 00000000000..4d77cf45d41 --- /dev/null +++ b/pkgs/development/tools/rust/rustup/0001-dynamically-patchelf-binaries.patch @@ -0,0 +1,54 @@ +From c21cc756b69a5f33c8a7758b746a816f40f55932 Mon Sep 17 00:00:00 2001 +From: Leon Isenberg +Date: Sat, 28 Oct 2017 17:58:17 +0200 +Subject: [PATCH] nix customization: patchelf installed binaries + +--- + src/rustup-dist/src/component/package.rs | 24 +++++++++++++++++++++++- + 1 file changed, 23 insertions(+), 1 deletion(-) + +diff --git a/src/rustup-dist/src/component/package.rs b/src/rustup-dist/src/component/package.rs +index 8aa63db9..4d219826 100644 +--- a/src/rustup-dist/src/component/package.rs ++++ b/src/rustup-dist/src/component/package.rs +@@ -99,7 +99,13 @@ impl Package for DirectoryPackage { + let src_path = root.join(&path); + + match &*part.0 { +- "file" => try!(builder.copy_file(path.clone(), &src_path)), ++ "file" => { ++ try!(builder.copy_file(path.clone(), &src_path)); ++ nix_patchelf_if_needed( ++ &target.prefix().path().join(path.clone()), ++ &src_path, ++ ) ++ } + "dir" => try!(builder.copy_dir(path.clone(), &src_path)), + _ => return Err(ErrorKind::CorruptComponent(name.to_owned()).into()), + } +@@ -117,6 +123,22 @@ impl Package for DirectoryPackage { + } + } + ++fn nix_patchelf_if_needed(dest_path: &Path, src_path: &Path) { ++ let is_bin = if let Some(p) = src_path.parent() { ++ p.ends_with("bin") ++ } else { ++ false ++ }; ++ ++ if is_bin { ++ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf") ++ .arg("--set-interpreter") ++ .arg("@dynamicLinker@") ++ .arg(dest_path) ++ .output(); ++ } ++} ++ + // On Unix we need to set up the file permissions correctly so + // binaries are executable and directories readable. This shouldn't be + // necessary: the source files *should* have the right permissions, +-- +2.14.1 + diff --git a/pkgs/development/tools/rust/rustup/0001-use-hardcoded-dynamic-linker.patch b/pkgs/development/tools/rust/rustup/0001-use-hardcoded-dynamic-linker.patch deleted file mode 100644 index 3b429c1745e..00000000000 --- a/pkgs/development/tools/rust/rustup/0001-use-hardcoded-dynamic-linker.patch +++ /dev/null @@ -1,75 +0,0 @@ -From 36c053f37670c6003f9e8dc001741f7c49e9526a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= -Date: Sat, 15 Apr 2017 20:42:10 +0200 -Subject: [PATCH] use hardcoded dynamic-linker -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Jörg Thalheim ---- - src/rustup-cli/common.rs | 3 ++- - src/rustup/toolchain.rs | 22 ++++++++++++++++++++-- - 2 files changed, 22 insertions(+), 3 deletions(-) - -diff --git a/src/rustup-cli/common.rs b/src/rustup-cli/common.rs -index 1abf345..21096e7 100644 ---- a/src/rustup-cli/common.rs -+++ b/src/rustup-cli/common.rs -@@ -220,7 +220,8 @@ pub fn rustc_version(toolchain: &Toolchain) -> String { - if toolchain.exists() { - let rustc_path = toolchain.binary_file("rustc"); - if utils::is_file(&rustc_path) { -- let mut cmd = Command::new(&rustc_path); -+ let mut cmd = Command::new("@dynamicLinker@"); -+ cmd.arg(&rustc_path); - cmd.arg("--version"); - toolchain.set_ldpath(&mut cmd); - -diff --git a/src/rustup/toolchain.rs b/src/rustup/toolchain.rs -index dc29c32..212a4ab 100644 ---- a/src/rustup/toolchain.rs -+++ b/src/rustup/toolchain.rs -@@ -315,7 +315,7 @@ impl<'a> Toolchain<'a> { - } - Path::new(&binary) - }; -- let mut cmd = Command::new(&path); -+ let mut cmd = wrap_elf_interpreter(&path); - self.set_env(&mut cmd); - Ok(cmd) - } -@@ -363,7 +363,7 @@ impl<'a> Toolchain<'a> { - } else { - src_file - }; -- let mut cmd = Command::new(exe_path); -+ let mut cmd = wrap_elf_interpreter(exe_path); - self.set_env(&mut cmd); - cmd.env("RUSTUP_TOOLCHAIN", &primary_toolchain.name); - Ok(cmd) -@@ -648,3 +648,21 @@ impl<'a> Toolchain<'a> { - path - } - } -+ -+fn wrap_elf_interpreter>(p: S) -> Command { -+ use std::fs::File; -+ use std::io::Read; -+ let path = Path::new(&p); -+ let is_elf = File::open(path).map(|mut f| { -+ let mut buf = [0; 4]; -+ let _ = f.read(&mut buf); -+ buf == b"\x7fELF"[..] -+ }).unwrap_or(false); -+ if is_elf { -+ let mut cmd = Command::new("@dynamicLinker@"); -+ cmd.arg(&path); -+ cmd -+ } else { -+ Command::new(&path) -+ } -+} --- -2.12.2 - diff --git a/pkgs/development/tools/rust/rustup/default.nix b/pkgs/development/tools/rust/rustup/default.nix index 65599ad8d18..3106048e674 100644 --- a/pkgs/development/tools/rust/rustup/default.nix +++ b/pkgs/development/tools/rust/rustup/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, runCommand +{ stdenv, lib, runCommand, patchelf , fetchFromGitHub, rustPlatform , pkgconfig, curl, Security }: @@ -24,9 +24,11 @@ rustPlatform.buildRustPackage rec { cargoBuildFlags = [ "--features no-self-update" ]; patches = lib.optionals stdenv.isLinux [ - (runCommand "0001-use-hardcoded-dynamic-linker.patch" { CC=stdenv.cc; } '' + (runCommand "0001-dynamically-patchelf-binaries.patch" { CC=stdenv.cc; patchelf = patchelf; } '' export dynamicLinker=$(cat $CC/nix-support/dynamic-linker) - substituteAll ${./0001-use-hardcoded-dynamic-linker.patch} $out + substitute ${./0001-dynamically-patchelf-binaries.patch} $out \ + --subst-var patchelf \ + --subst-var dynamicLinker '') ]; From 9e5ba4eb8b5253c24b56a42fa7606d8c3c7e0678 Mon Sep 17 00:00:00 2001 From: Leon Isenberg Date: Sun, 29 Oct 2017 21:34:15 +0100 Subject: [PATCH 02/35] rustup: 1.3.0 -> 2017-10-29 --- pkgs/development/tools/rust/rustup/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/rustup/default.nix b/pkgs/development/tools/rust/rustup/default.nix index 3106048e674..b7065cc5d7d 100644 --- a/pkgs/development/tools/rust/rustup/default.nix +++ b/pkgs/development/tools/rust/rustup/default.nix @@ -4,15 +4,15 @@ rustPlatform.buildRustPackage rec { name = "rustup-${version}"; - version = "1.3.0"; + version = "2017-10-29"; - cargoSha256 = "1yd7k0jpx78p5bp6iyzgbyj7pjz8vyjg9g7fmf1bl60jsbdpgv3g"; + cargoSha256 = "1xwxv8y9xjgdmm92ldrn9m9fml2zb5h7qqm7dhw63j6psb3ajqrw"; src = fetchFromGitHub { owner = "rust-lang-nursery"; repo = "rustup.rs"; - rev = version; - sha256 = "199jlqqidzak7nxmv2nzjzv7zfzy9z7hw6h8d8wf1rbfdwd9l6hs"; + rev = "13c8092507bf646f3ef6a621fe2c5a68212e800f"; + sha256 = "1qd01rjk9qpfzgqs35f5nxrcf00kmf76zwmgj3yzdig9zymjwndg"; }; nativeBuildInputs = [ pkgconfig ]; From cdbcb19e83fee42d6cceba0fb477dd37e25f63ed Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 31 Oct 2017 01:16:43 +0900 Subject: [PATCH 03/35] sxiv: installs .desktop file sxiv won't appear in meus as it has NoDisplay but it can be used to generate the mimetypes. --- pkgs/applications/graphics/sxiv/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/graphics/sxiv/default.nix b/pkgs/applications/graphics/sxiv/default.nix index 93bb5f151d9..68597a23ca6 100644 --- a/pkgs/applications/graphics/sxiv/default.nix +++ b/pkgs/applications/graphics/sxiv/default.nix @@ -23,6 +23,11 @@ stdenv.mkDerivation rec { buildInputs = [ libX11 imlib2 giflib libexif ]; + postInstall = '' + mkdir -p $out/share/applications/ + cp -v sxiv.desktop $out/share/applications/ + ''; + meta = { description = "Simple X Image Viewer"; homepage = https://github.com/muennich/sxiv; From b8a7c455f6e5eef0fe6d9d65701816cbf3662f57 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Wed, 25 Oct 2017 21:59:52 +0100 Subject: [PATCH 04/35] Fix idrisPackages.with-packages 1. The ln step was failing due to a file already existing 2. gcc was invoked directly which caused failure on OS X. --- pkgs/development/idris-modules/with-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/idris-modules/with-packages.nix b/pkgs/development/idris-modules/with-packages.nix index edcd20c1097..d2b09808ec1 100644 --- a/pkgs/development/idris-modules/with-packages.nix +++ b/pkgs/development/idris-modules/with-packages.nix @@ -10,7 +10,7 @@ installIdrisLib () { if [ -d $1/lib/${idris.name} ]; then - ln -sv $1/lib/${idris.name}/* $out/lib/${idris.name} + ln -fsv $1/lib/${idris.name}/* $out/lib/${idris.name} fi } @@ -34,7 +34,7 @@ ''; buildPhase = '' - gcc -O3 -o idris idris.c + $CC -O3 -o idris idris.c ''; installPhase = '' From 29e80bde404b5ed126fdc2f32e794556506a9cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Mon, 23 Oct 2017 23:27:24 +0200 Subject: [PATCH 05/35] nixos/gitlab: fix hard-coded database name --- nixos/modules/services/misc/gitlab.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 740cbc141b5..0dde9ff3c5a 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -619,7 +619,7 @@ in { fi # enable required pg_trgm extension for gitlab - ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql gitlab -c "CREATE EXTENSION IF NOT EXISTS pg_trgm" + ${pkgs.sudo}/bin/sudo -u ${pgSuperUser} psql ${cfg.databaseName} -c "CREATE EXTENSION IF NOT EXISTS pg_trgm" # Always do the db migrations just to be sure the database is up-to-date ${gitlab-rake}/bin/gitlab-rake db:migrate RAILS_ENV=production From 00c03e90038a4935da17fa0d5f5ca9d08fc19676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Mon, 23 Oct 2017 23:48:26 +0200 Subject: [PATCH 06/35] nixos/gitlab: fix preStart script --- nixos/modules/services/misc/gitlab.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index 0dde9ff3c5a..e0fae335d03 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -634,7 +634,7 @@ in { # The gitlab:shell:create_hooks task seems broken for fixing links # so we instead delete all the hooks and create them anew - rm ${cfg.statePath}/repositories/**/*.git/hooks + rm -f ${cfg.statePath}/repositories/**/*.git/hooks ${gitlab-rake}/bin/gitlab-rake gitlab:shell:create_hooks RAILS_ENV=production # Change permissions in the last step because some of the From c556c72a2efda33c6ef00ff376bd5596f6eca817 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rton=20Boros?= Date: Tue, 24 Oct 2017 00:07:51 +0200 Subject: [PATCH 07/35] nixos/gitlab: fix secret generation This line previously produced an error and an empty secret file. --- nixos/modules/services/misc/gitlab.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index e0fae335d03..7b2b40e5923 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -572,7 +572,7 @@ in { rm -rf ${cfg.statePath}/config ${cfg.statePath}/shell/hooks mkdir -p ${cfg.statePath}/config - tr -dc A-Za-z0-9 < /dev/urandom | head -c 32 > ${cfg.statePath}/config/gitlab_shell_secret + ${pkgs.openssl}/bin/openssl rand -hex 32 > ${cfg.statePath}/config/gitlab_shell_secret # The uploads directory is hardcoded somewhere deep in rails. It is # symlinked in the gitlab package to /run/gitlab/uploads to make it From dd0cdc2fb4dcc195bb00c5602f0c1da28dbd5282 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 30 Oct 2017 01:08:20 +0000 Subject: [PATCH 08/35] ocamlPackages.camlp5: 7.02 -> 7.03 --- pkgs/development/tools/ocaml/camlp5/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/ocaml/camlp5/default.nix b/pkgs/development/tools/ocaml/camlp5/default.nix index e5c79f534b0..0acd70b424a 100644 --- a/pkgs/development/tools/ocaml/camlp5/default.nix +++ b/pkgs/development/tools/ocaml/camlp5/default.nix @@ -6,11 +6,11 @@ in stdenv.mkDerivation { - name = "camlp5${if transitional then "_transitional" else ""}-7.02"; + name = "camlp5${if transitional then "_transitional" else ""}-7.03"; src = fetchzip { - url = https://github.com/camlp5/camlp5/archive/rel702.tar.gz; - sha256 = "1m2d55zrgllidhgslvzgmr27f56qzdahz2sv56bvjs3bg7grmhnc"; + url = https://github.com/camlp5/camlp5/archive/rel703.tar.gz; + sha256 = "0bwzhp4qjypfa0x8drp8w434dfixm1nzrm6pcy9s5akpmqvb50a8"; }; buildInputs = [ ocaml ]; From d8987135c264cec552ebca51348a16c63a833fbb Mon Sep 17 00:00:00 2001 From: "Nicolas B. Pierron" Date: Mon, 30 Oct 2017 11:17:06 +0000 Subject: [PATCH 09/35] types.submodule: Replace a friendly comment by a more gentle one. --- lib/types.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/types.nix b/lib/types.nix index c48e3b3000c..dd0f31e9d14 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -288,8 +288,17 @@ rec { }).config; getSubOptions = prefix: (evalModules { modules = opts'; inherit prefix; - # FIXME: hack to get shit to evaluate. - args = { name = ""; }; }).options; + # This is a work-around due to the fact that some sub-modules, + # such as the one included in an attribute set, expects a "args" + # attribute to be given to the sub-module. As the option + # evaluation does not have any specific attribute name, we + # provide a default one for the documentation. + # + # This is mandatory as some option declaration might use the + # "name" attribute given as argument of the submodule and use it + # as the default of option declarations. + args.name = ""; + }).options; getSubModules = opts'; substSubModules = m: submodule m; functor = (defaultFunctor name) // { From 70f35a99a4f7d17f8b82105e648efb3de681ab8e Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 30 Oct 2017 08:30:29 -0400 Subject: [PATCH 10/35] linux: 4.14-rc6 -> 4.14-rc7 --- pkgs/os-specific/linux/kernel/linux-testing.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index 3a8d82cdb26..8c8fd3c9733 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -1,13 +1,13 @@ { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.14-rc6"; - modDirVersion = "4.14.0-rc6"; + version = "4.14-rc7"; + modDirVersion = "4.14.0-rc7"; extraMeta.branch = "4.14"; src = fetchurl { url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz"; - sha256 = "0gmxrf4jmw8xl5gx487chyx94yas7rva5jbkczm9iw9sw0c8gwcb"; + sha256 = "1w7b1sc5dsxcqywsdbwgs92i8jpj7hsnss67yzb58z3bz3hb73m3"; }; # Should the testing kernels ever be built on Hydra? From 933060fe19741f3a832e9c2ce4c8404422b8676c Mon Sep 17 00:00:00 2001 From: zimbatm Date: Mon, 30 Oct 2017 13:34:58 +0000 Subject: [PATCH 11/35] mikutter: mark as broken The package doesn't build anymore /cc @midchildan --- .../networking/instant-messengers/mikutter/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/networking/instant-messengers/mikutter/default.nix b/pkgs/applications/networking/instant-messengers/mikutter/default.nix index 1fa7a2fe7e9..e00468d9a4c 100644 --- a/pkgs/applications/networking/instant-messengers/mikutter/default.nix +++ b/pkgs/applications/networking/instant-messengers/mikutter/default.nix @@ -54,6 +54,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { + broken = true; description = "An extensible Twitter client"; homepage = https://mikutter.hachune.net; maintainers = with maintainers; [ midchildan ]; From 367a3e45fd9a7c820871ae82b185f63208e1ccf0 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Mon, 30 Oct 2017 14:19:24 +0100 Subject: [PATCH 12/35] highlight: 3.39 -> 3.40, fetch src from Github --- pkgs/tools/text/highlight/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/tools/text/highlight/default.nix b/pkgs/tools/text/highlight/default.nix index 71c5e352b94..275d65e7c37 100644 --- a/pkgs/tools/text/highlight/default.nix +++ b/pkgs/tools/text/highlight/default.nix @@ -1,14 +1,16 @@ -{ stdenv, fetchurl, getopt, lua, boost, pkgconfig, gcc }: +{ stdenv, fetchFromGitHub, getopt, lua, boost, pkgconfig, gcc }: with stdenv.lib; stdenv.mkDerivation rec { name = "highlight-${version}"; - version = "3.39"; + version = "3.40"; - src = fetchurl { - url = "http://www.andre-simon.de/zip/${name}.tar.bz2"; - sha256 = "0z8gs69sqlyis4kvl8wwdgzywi199k73kkvn1mf9pf60npvcxwj4"; + src = fetchFromGitHub { + owner = "andre-simon"; + repo = "highlight"; + rev = "${version}"; + sha256 = "0bkywhz4y10qcajimdha1ck5mvn7fsrv3yn8nd6rqbva39gbfmfd"; }; nativeBuildInputs = [ pkgconfig ] ++ optional stdenv.isDarwin gcc ; @@ -28,6 +30,6 @@ stdenv.mkDerivation rec { description = "Source code highlighting tool"; homepage = http://www.andre-simon.de/doku/highlight/en/highlight.php; platforms = platforms.unix; - maintainers = [ maintainers.ndowens ]; + maintainers = with maintainers; [ ndowens willibutz ]; }; } From d22a1f6abcc2753f34a75d93bd52bbe2b387fcba Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 31 Oct 2017 03:08:36 +0900 Subject: [PATCH 13/35] pandas: 0.20.3 -> 0.21.0 Now needs 'moto' to complete tests. --- pkgs/development/python-modules/pandas/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pandas/default.nix b/pkgs/development/python-modules/pandas/default.nix index 7bab184bb2a..2cbb67545a0 100644 --- a/pkgs/development/python-modules/pandas/default.nix +++ b/pkgs/development/python-modules/pandas/default.nix @@ -8,6 +8,7 @@ , cython , dateutil , scipy +, moto , numexpr , pytz , xlrd @@ -27,12 +28,12 @@ let inherit (stdenv) isDarwin; in buildPythonPackage rec { pname = "pandas"; - version = "0.20.3"; + version = "0.21.0"; name = "${pname}-${version}"; src = fetchPypi { inherit pname version; - sha256 = "a777e07633d83d546c55706420179551c8e01075b53c497dcf8ae4036766bc66"; + sha256 = "0nf50ls2cnlsd2635nyji7l70xc91dw81qg5y01g5sifwwqcpmaw"; }; LC_ALL = "en_US.UTF-8"; @@ -64,6 +65,7 @@ in buildPythonPackage rec { "['pandas/src/klib', 'pandas/src', '$cpp_sdk']" ''; + checkInputs = [ moto ]; checkPhase = '' runHook preCheck '' From da866a6f2969418cb542120372eda5103516b9b3 Mon Sep 17 00:00:00 2001 From: James Earl Douglas Date: Mon, 30 Oct 2017 08:57:54 -0600 Subject: [PATCH 14/35] jenkins: 2.86 -> 2.87 --- .../tools/continuous-integration/jenkins/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/jenkins/default.nix b/pkgs/development/tools/continuous-integration/jenkins/default.nix index de0321109d7..e6f01ba5c93 100644 --- a/pkgs/development/tools/continuous-integration/jenkins/default.nix +++ b/pkgs/development/tools/continuous-integration/jenkins/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "jenkins-${version}"; - version = "2.86"; + version = "2.87"; src = fetchurl { url = "http://mirrors.jenkins-ci.org/war/${version}/jenkins.war"; - sha256 = "198fcj2wkz8qxawk3mq29kwl51pxlbd7ivndcpvdvg42g0caqyi0"; + sha256 = "1nzs9nn1nr2jav59v1xj39rzmrh1zmwaqnpaiqsll8kixkr9rb8f"; }; buildCommand = '' From abbea503b9e23eae7fa711799e0c63f9080a8ef2 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Mon, 30 Oct 2017 15:13:09 +0000 Subject: [PATCH 15/35] CODEOWNERS: add zimbatm to ruby modules --- .github/CODEOWNERS | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 124a1d19ecb..00e058eb84b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -34,6 +34,10 @@ pkgs/development/haskell-modules/hoogle.nix @peti pkgs/applications/science/math/R @peti pkgs/development/r-modules @peti +# Ruby +pkgs/development/interpreters/ruby @zimbatm +pkgs/development/ruby-modules @zimbatm + # Darwin-related /pkgs/stdenv/darwin/ @org/darwin-maintainers /pkgs/os-specific/darwin/ @org/darwin-maintainers From 0a46a71a6ec41764b118a24e4cbf1b4bc4be906e Mon Sep 17 00:00:00 2001 From: zimbatm Date: Mon, 30 Oct 2017 15:14:24 +0000 Subject: [PATCH 16/35] gitAndTools.git-codeowners: init at 0.1.1 --- .../git-and-tools/default.nix | 2 ++ .../git-and-tools/git-codeowners/default.nix | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index 82846a564cd..58a9e808923 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -58,6 +58,8 @@ rec { # support for bugzilla git-bz = callPackage ./git-bz { }; + git-codeowners = callPackage ./git-codeowners { }; + git-cola = callPackage ./git-cola { }; git-crypt = callPackage ./git-crypt { }; diff --git a/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix b/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix new file mode 100644 index 00000000000..07e0ce80c5d --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git-codeowners/default.nix @@ -0,0 +1,21 @@ +{ lib, rustPlatform, fetchFromGitHub }: +rustPlatform.buildRustPackage rec { + name = "git-codeowners-${version}"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "softprops"; + repo = "git-codeowners"; + rev = "v${version}"; + sha256 = "0imxbi6y1165bi2rik0n98v79fkgp8alb615qh41idg1p2krzyy5"; + }; + + cargoSha256 = "0h831rf5vlvpzfm4sr3fvwlc0ys776fqis90y414mczphkxvz437"; + + meta = with lib; { + homepage = "https://github.com/softprops/git-codeowners"; + description = "a git extension to work with CODEOWNERS files"; + license = licenses.mit; + maintainers = with maintainers; [ zimbatm ]; + }; +} From 4a4f6ba41878d514d7c2616c85242ff31a13a06b Mon Sep 17 00:00:00 2001 From: zimbatm Date: Mon, 30 Oct 2017 15:20:54 +0000 Subject: [PATCH 17/35] CODEOWNERS: fix path matching --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 00e058eb84b..bd24a2e0cab 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -35,8 +35,8 @@ pkgs/applications/science/math/R @peti pkgs/development/r-modules @peti # Ruby -pkgs/development/interpreters/ruby @zimbatm -pkgs/development/ruby-modules @zimbatm +pkgs/development/interpreters/ruby/* @zimbatm +pkgs/development/ruby-modules/* @zimbatm # Darwin-related /pkgs/stdenv/darwin/ @org/darwin-maintainers From febe376f13b7b57de26af5af271ddcb565a25d74 Mon Sep 17 00:00:00 2001 From: Falco Peijnenburg Date: Mon, 30 Oct 2017 16:48:26 +0100 Subject: [PATCH 18/35] fetchadc: removed It's not being used --- pkgs/build-support/fetchadc/builder.sh | 7 ----- pkgs/build-support/fetchadc/default.nix | 36 ------------------------- pkgs/top-level/all-packages.nix | 9 ------- 3 files changed, 52 deletions(-) delete mode 100644 pkgs/build-support/fetchadc/builder.sh delete mode 100644 pkgs/build-support/fetchadc/default.nix diff --git a/pkgs/build-support/fetchadc/builder.sh b/pkgs/build-support/fetchadc/builder.sh deleted file mode 100644 index ceeaa9213d6..00000000000 --- a/pkgs/build-support/fetchadc/builder.sh +++ /dev/null @@ -1,7 +0,0 @@ -source $stdenv/setup - -loginpage=`curl --insecure -s -L -b cookies.txt "$url"` - -[[ $loginpage =~ form[^\>]+action=\"([^\"]+)\" ]] && loginurl=${BASH_REMATCH[1]} - -curl --insecure -s --output "$out" -L -b cookies.txt --data "appleId=${adc_user}&accountPassword=${adc_pass}" "https://idmsa.apple.com/IDMSWebAuth/${loginurl}" diff --git a/pkgs/build-support/fetchadc/default.nix b/pkgs/build-support/fetchadc/default.nix deleted file mode 100644 index 4d759e6f7f1..00000000000 --- a/pkgs/build-support/fetchadc/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ stdenv, curl, adc_user, adc_pass }: - -{ # Path to fetch. - path - - # Hash of the downloaded file -, sha256 - -, # Additional curl options needed for the download to succeed. - curlOpts ? "" - -, # Name of the file. If empty, use the basename of `path'. - name ? "" -}: - -stdenv.mkDerivation { - url = "https://developer.apple.com/downloads/download.action?path=${path}"; - - name = if name != "" then name else baseNameOf path; - builder = ./builder.sh; - - buildInputs = [ curl ]; - - meta = { - # Password-guarded files from ADC are certainly unfree, as far as we're concerned! - license = stdenv.lib.licenses.unfree; - }; - - outputHashAlgo = "sha256"; - outputHash = sha256; - outputHashMode = "flat"; - - inherit curlOpts adc_user adc_pass; - - preferLocalBuild = true; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 762f217fcbe..e833d3dec09 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -126,15 +126,6 @@ with pkgs; vs = vs90wrapper; }; - fetchadc = callPackage ../build-support/fetchadc { - adc_user = if config ? adc_user - then config.adc_user - else throw "You need an adc_user attribute in your config to download files from Apple Developer Connection"; - adc_pass = if config ? adc_pass - then config.adc_pass - else throw "You need an adc_pass attribute in your config to download files from Apple Developer Connection"; - }; - fetchbower = callPackage ../build-support/fetchbower { inherit (nodePackages) bower2nix; }; From 821a7a38ea293d4711c20f95cdfb368acc632f9d Mon Sep 17 00:00:00 2001 From: Christine Koppelt Date: Mon, 30 Oct 2017 16:42:58 +0100 Subject: [PATCH 19/35] prometheus-alertmanager: 0.8.0 -> 0.9.1 --- pkgs/servers/monitoring/prometheus/alertmanager.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/prometheus/alertmanager.nix b/pkgs/servers/monitoring/prometheus/alertmanager.nix index 3ae2a45ca6d..444aa92ec2e 100644 --- a/pkgs/servers/monitoring/prometheus/alertmanager.nix +++ b/pkgs/servers/monitoring/prometheus/alertmanager.nix @@ -2,7 +2,7 @@ buildGoPackage rec { name = "alertmanager-${version}"; - version = "0.8.0"; + version = "0.9.1"; rev = "v${version}"; goPackagePath = "github.com/prometheus/alertmanager"; @@ -11,7 +11,7 @@ buildGoPackage rec { inherit rev; owner = "prometheus"; repo = "alertmanager"; - sha256 = "0bqc58j0nrq7y8nbd927z7x74m8mcd2782cxkqwscpq6d9983qql"; + sha256 = "1lkfj63pp4jf58xmn015r7s42p1wyj6fryihpmdn0k76b0ccwqzj"; }; # Tests exist, but seem to clash with the firewall. From ecdf4f1c51c0b1093b06c17fce29f6778ee6934f Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Oct 2017 12:16:49 +0100 Subject: [PATCH 20/35] php56: 5.6.31 -> 5.6.32 --- pkgs/development/interpreters/php/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 57383fa3412..578b4d41901 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -326,8 +326,8 @@ let in { php56 = generic { - version = "5.6.31"; - sha256 = "03xixkvfp64bqp97p8vlj3hp63bpjw7hc16b7fgm7w35rdlp2fcg"; + version = "5.6.32"; + sha256 = "0lfbmdkvijkm6xc4p9sykv66y8xwhws0vsmka8v5cax4bxx4xr1y"; }; php70 = generic { From 3975f267abc305d4a197fe96c0cf5f49cbfc6d7d Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Oct 2017 12:17:06 +0100 Subject: [PATCH 21/35] php70: 7.0.24 -> 7.0.25 --- pkgs/development/interpreters/php/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index 578b4d41901..b72a6886178 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -331,8 +331,8 @@ in { }; php70 = generic { - version = "7.0.24"; - sha256 = "06fgpljz6xpxxkpf4cv9rqz8g504l9ikbw5aq0hqh5sgd611kycv"; + version = "7.0.25"; + sha256 = "09fc2lj447phprvilvq2sb6n0r1snj142f8faphrd896s6b4v8lm"; }; php71 = generic { From f41f5a8f77a09f9629b86d88f6a6b514e416d155 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Oct 2017 12:17:30 +0100 Subject: [PATCH 22/35] php71: 7.1.9 -> 7.1.11 --- pkgs/development/interpreters/php/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/php/default.nix b/pkgs/development/interpreters/php/default.nix index b72a6886178..be9aab50cb9 100644 --- a/pkgs/development/interpreters/php/default.nix +++ b/pkgs/development/interpreters/php/default.nix @@ -336,7 +336,7 @@ in { }; php71 = generic { - version = "7.1.9"; - sha256 = "1blvzm2js8mrdbmwks0v6nlb5wj4789ixzmlxm1l8z6xvw8cqk9i"; + version = "7.1.11"; + sha256 = "0ww5493w8w3jlks0xqlfm3v6mm53vpnv5vjy63inkj8zf3gdfikn"; }; } From 517606d1d4872c3b8b1a42796d572a7420fe1489 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Oct 2017 13:55:46 +0100 Subject: [PATCH 23/35] Revert "linux_4_4: remove" This reverts commit 9f3f575ab3eb4cd6b5f8de20e6f1a5374fedef2c. Support from upstream has been extended to Feb 2022. --- pkgs/os-specific/linux/kernel/linux-4.4.nix | 18 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 14 ++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/linux-4.4.nix diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix new file mode 100644 index 00000000000..16699dcdf43 --- /dev/null +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -0,0 +1,18 @@ +{ stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: + +import ./generic.nix (args // rec { + version = "4.4.80"; + extraMeta.branch = "4.4"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; + sha256 = "1hs07k49sbpi8yw2mdwn1967i82x4wn6kg0lbjvv5l1pv3alky1l"; + }; + + kernelPatches = args.kernelPatches; + + features.iwlwifi = true; + features.efiBootStub = true; + features.needsCifsUtils = true; + features.netfilterRPFilter = true; +} // (args.argsOverride or {})) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e833d3dec09..6c0f6726450 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12435,6 +12435,19 @@ with pkgs; ]; }; + linux_4_4 = callPackage ../os-specific/linux/kernel/linux-4.4.nix { + kernelPatches = + [ kernelPatches.bridge_stp_helper + kernelPatches.p9_fixes + kernelPatches.cpu-cgroup-v2."4.4" + ] + ++ lib.optionals ((platform.kernelArch or null) == "mips") + [ kernelPatches.mips_fpureg_emu + kernelPatches.mips_fpu_sigill + kernelPatches.mips_ext3_n32 + ]; + }; + linux_4_9 = callPackage ../os-specific/linux/kernel/linux-4.9.nix { kernelPatches = [ kernelPatches.bridge_stp_helper @@ -12657,6 +12670,7 @@ with pkgs; linuxPackages_hardened_copperhead = linuxPackagesFor pkgs.linux_hardened_copperhead; linuxPackages_mptcp = linuxPackagesFor pkgs.linux_mptcp; linuxPackages_rpi = linuxPackagesFor pkgs.linux_rpi; + linuxPackages_4_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_4); linuxPackages_4_9 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_9); linuxPackages_4_13 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_4_13); # Don't forget to update linuxPackages_latest! From 36be7d3e85fedcac31964e311de9d2d1b087767a Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Oct 2017 14:00:14 +0100 Subject: [PATCH 24/35] Revert parts of "linux: remove unused kernel patches" This reverts commit 05b8cae9ec88156f46d9b98424643b6208664222 that removed the cgroup v2 patch for the 4.4 kernel. --- .../kernel/cpu-cgroup-v2-patches/4.4.patch | 407 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 408 insertions(+) create mode 100644 pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/4.4.patch diff --git a/pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/4.4.patch b/pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/4.4.patch new file mode 100644 index 00000000000..8f2418c9efc --- /dev/null +++ b/pkgs/os-specific/linux/kernel/cpu-cgroup-v2-patches/4.4.patch @@ -0,0 +1,407 @@ +commit e7cae741f6d645ac68fe8823ca6ef45dbbf6891b +Author: Tejun Heo +Date: Fri Mar 11 07:31:23 2016 -0500 + + sched: Misc preps for cgroup unified hierarchy interface + + Make the following changes in preparation for the cpu controller + interface implementation for the unified hierarchy. This patch + doesn't cause any functional differences. + + * s/cpu_stats_show()/cpu_cfs_stats_show()/ + + * s/cpu_files/cpu_legacy_files/ + + * Separate out cpuacct_stats_read() from cpuacct_stats_show(). While + at it, remove pointless cpuacct_stat_desc[] array. + + Signed-off-by: Tejun Heo + Cc: Ingo Molnar + Cc: Peter Zijlstra + Cc: Li Zefan + Cc: Johannes Weiner + +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 732e993..77f3ddd 100644 +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -8512,7 +8512,7 @@ static int __cfs_schedulable(struct task_group *tg, u64 period, u64 quota) + return ret; + } + +-static int cpu_stats_show(struct seq_file *sf, void *v) ++static int cpu_cfs_stats_show(struct seq_file *sf, void *v) + { + struct task_group *tg = css_tg(seq_css(sf)); + struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth; +@@ -8552,7 +8552,7 @@ static u64 cpu_rt_period_read_uint(struct cgroup_subsys_state *css, + } + #endif /* CONFIG_RT_GROUP_SCHED */ + +-static struct cftype cpu_files[] = { ++static struct cftype cpu_legacy_files[] = { + #ifdef CONFIG_FAIR_GROUP_SCHED + { + .name = "shares", +@@ -8573,7 +8573,7 @@ static struct cftype cpu_files[] = { + }, + { + .name = "stat", +- .seq_show = cpu_stats_show, ++ .seq_show = cpu_cfs_stats_show, + }, + #endif + #ifdef CONFIG_RT_GROUP_SCHED +@@ -8599,7 +8599,7 @@ struct cgroup_subsys cpu_cgrp_subsys = { + .fork = cpu_cgroup_fork, + .can_attach = cpu_cgroup_can_attach, + .attach = cpu_cgroup_attach, +- .legacy_cftypes = cpu_files, ++ .legacy_cftypes = cpu_legacy_files, + .early_init = 1, + }; + +diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c +index dd7cbb5..42b2dd5 100644 +--- a/kernel/sched/cpuacct.c ++++ b/kernel/sched/cpuacct.c +@@ -177,36 +177,33 @@ static int cpuacct_percpu_seq_show(struct seq_file *m, void *V) + return 0; + } + +-static const char * const cpuacct_stat_desc[] = { +- [CPUACCT_STAT_USER] = "user", +- [CPUACCT_STAT_SYSTEM] = "system", +-}; +- +-static int cpuacct_stats_show(struct seq_file *sf, void *v) ++static void cpuacct_stats_read(struct cpuacct *ca, u64 *userp, u64 *sysp) + { +- struct cpuacct *ca = css_ca(seq_css(sf)); + int cpu; +- s64 val = 0; + ++ *userp = 0; + for_each_online_cpu(cpu) { + struct kernel_cpustat *kcpustat = per_cpu_ptr(ca->cpustat, cpu); +- val += kcpustat->cpustat[CPUTIME_USER]; +- val += kcpustat->cpustat[CPUTIME_NICE]; ++ *userp += kcpustat->cpustat[CPUTIME_USER]; ++ *userp += kcpustat->cpustat[CPUTIME_NICE]; + } +- val = cputime64_to_clock_t(val); +- seq_printf(sf, "%s %lld\n", cpuacct_stat_desc[CPUACCT_STAT_USER], val); + +- val = 0; ++ *sysp = 0; + for_each_online_cpu(cpu) { + struct kernel_cpustat *kcpustat = per_cpu_ptr(ca->cpustat, cpu); +- val += kcpustat->cpustat[CPUTIME_SYSTEM]; +- val += kcpustat->cpustat[CPUTIME_IRQ]; +- val += kcpustat->cpustat[CPUTIME_SOFTIRQ]; ++ *sysp += kcpustat->cpustat[CPUTIME_SYSTEM]; ++ *sysp += kcpustat->cpustat[CPUTIME_IRQ]; ++ *sysp += kcpustat->cpustat[CPUTIME_SOFTIRQ]; + } ++} + +- val = cputime64_to_clock_t(val); +- seq_printf(sf, "%s %lld\n", cpuacct_stat_desc[CPUACCT_STAT_SYSTEM], val); ++static int cpuacct_stats_show(struct seq_file *sf, void *v) ++{ ++ cputime64_t user, sys; + ++ cpuacct_stats_read(css_ca(seq_css(sf)), &user, &sys); ++ seq_printf(sf, "user %lld\n", cputime64_to_clock_t(user)); ++ seq_printf(sf, "system %lld\n", cputime64_to_clock_t(sys)); + return 0; + } + + +commit 1bb33e8a69f089f2d3f58a0e681d4ff352e11c97 +Author: Tejun Heo +Date: Fri Mar 11 07:31:23 2016 -0500 + + sched: Implement interface for cgroup unified hierarchy + + While the cpu controller doesn't have any functional problems, there + are a couple interface issues which can be addressed in the v2 + interface. + + * cpuacct being a separate controller. This separation is artificial + and rather pointless as demonstrated by most use cases co-mounting + the two controllers. It also forces certain information to be + accounted twice. + + * Use of different time units. Writable control knobs use + microseconds, some stat fields use nanoseconds while other cpuacct + stat fields use centiseconds. + + * Control knobs which can't be used in the root cgroup still show up + in the root. + + * Control knob names and semantics aren't consistent with other + controllers. + + This patchset implements cpu controller's interface on the unified + hierarchy which adheres to the controller file conventions described + in Documentation/cgroups/unified-hierarchy.txt. Overall, the + following changes are made. + + * cpuacct is implictly enabled and disabled by cpu and its information + is reported through "cpu.stat" which now uses microseconds for all + time durations. All time duration fields now have "_usec" appended + to them for clarity. While this doesn't solve the double accounting + immediately, once majority of users switch to v2, cpu can directly + account and report the relevant stats and cpuacct can be disabled on + the unified hierarchy. + + Note that cpuacct.usage_percpu is currently not included in + "cpu.stat". If this information is actually called for, it can be + added later. + + * "cpu.shares" is replaced with "cpu.weight" and operates on the + standard scale defined by CGROUP_WEIGHT_MIN/DFL/MAX (1, 100, 10000). + The weight is scaled to scheduler weight so that 100 maps to 1024 + and the ratio relationship is preserved - if weight is W and its + scaled value is S, W / 100 == S / 1024. While the mapped range is a + bit smaller than the orignal scheduler weight range, the dead zones + on both sides are relatively small and covers wider range than the + nice value mappings. This file doesn't make sense in the root + cgroup and isn't create on root. + + * "cpu.cfs_quota_us" and "cpu.cfs_period_us" are replaced by "cpu.max" + which contains both quota and period. + + * "cpu.rt_runtime_us" and "cpu.rt_period_us" are replaced by + "cpu.rt.max" which contains both runtime and period. + + v2: cpu_stats_show() was incorrectly using CONFIG_FAIR_GROUP_SCHED for + CFS bandwidth stats and also using raw division for u64. Use + CONFIG_CFS_BANDWITH and do_div() instead. + + The semantics of "cpu.rt.max" is not fully decided yet. Dropped + for now. + + Signed-off-by: Tejun Heo + Cc: Ingo Molnar + Cc: Peter Zijlstra + Cc: Li Zefan + Cc: Johannes Weiner + +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 77f3ddd..7aafe63 100644 +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -8591,6 +8591,139 @@ static struct cftype cpu_legacy_files[] = { + { } /* terminate */ + }; + ++static int cpu_stats_show(struct seq_file *sf, void *v) ++{ ++ cpuacct_cpu_stats_show(sf); ++ ++#ifdef CONFIG_CFS_BANDWIDTH ++ { ++ struct task_group *tg = css_tg(seq_css(sf)); ++ struct cfs_bandwidth *cfs_b = &tg->cfs_bandwidth; ++ u64 throttled_usec; ++ ++ throttled_usec = cfs_b->throttled_time; ++ do_div(throttled_usec, NSEC_PER_USEC); ++ ++ seq_printf(sf, "nr_periods %d\n" ++ "nr_throttled %d\n" ++ "throttled_usec %llu\n", ++ cfs_b->nr_periods, cfs_b->nr_throttled, ++ throttled_usec); ++ } ++#endif ++ return 0; ++} ++ ++#ifdef CONFIG_FAIR_GROUP_SCHED ++static u64 cpu_weight_read_u64(struct cgroup_subsys_state *css, ++ struct cftype *cft) ++{ ++ struct task_group *tg = css_tg(css); ++ u64 weight = scale_load_down(tg->shares); ++ ++ return DIV_ROUND_CLOSEST_ULL(weight * CGROUP_WEIGHT_DFL, 1024); ++} ++ ++static int cpu_weight_write_u64(struct cgroup_subsys_state *css, ++ struct cftype *cftype, u64 weight) ++{ ++ /* ++ * cgroup weight knobs should use the common MIN, DFL and MAX ++ * values which are 1, 100 and 10000 respectively. While it loses ++ * a bit of range on both ends, it maps pretty well onto the shares ++ * value used by scheduler and the round-trip conversions preserve ++ * the original value over the entire range. ++ */ ++ if (weight < CGROUP_WEIGHT_MIN || weight > CGROUP_WEIGHT_MAX) ++ return -ERANGE; ++ ++ weight = DIV_ROUND_CLOSEST_ULL(weight * 1024, CGROUP_WEIGHT_DFL); ++ ++ return sched_group_set_shares(css_tg(css), scale_load(weight)); ++} ++#endif ++ ++static void __maybe_unused cpu_period_quota_print(struct seq_file *sf, ++ long period, long quota) ++{ ++ if (quota < 0) ++ seq_puts(sf, "max"); ++ else ++ seq_printf(sf, "%ld", quota); ++ ++ seq_printf(sf, " %ld\n", period); ++} ++ ++/* caller should put the current value in *@periodp before calling */ ++static int __maybe_unused cpu_period_quota_parse(char *buf, ++ u64 *periodp, u64 *quotap) ++{ ++ char tok[21]; /* U64_MAX */ ++ ++ if (!sscanf(buf, "%s %llu", tok, periodp)) ++ return -EINVAL; ++ ++ *periodp *= NSEC_PER_USEC; ++ ++ if (sscanf(tok, "%llu", quotap)) ++ *quotap *= NSEC_PER_USEC; ++ else if (!strcmp(tok, "max")) ++ *quotap = RUNTIME_INF; ++ else ++ return -EINVAL; ++ ++ return 0; ++} ++ ++#ifdef CONFIG_CFS_BANDWIDTH ++static int cpu_max_show(struct seq_file *sf, void *v) ++{ ++ struct task_group *tg = css_tg(seq_css(sf)); ++ ++ cpu_period_quota_print(sf, tg_get_cfs_period(tg), tg_get_cfs_quota(tg)); ++ return 0; ++} ++ ++static ssize_t cpu_max_write(struct kernfs_open_file *of, ++ char *buf, size_t nbytes, loff_t off) ++{ ++ struct task_group *tg = css_tg(of_css(of)); ++ u64 period = tg_get_cfs_period(tg); ++ u64 quota; ++ int ret; ++ ++ ret = cpu_period_quota_parse(buf, &period, "a); ++ if (!ret) ++ ret = tg_set_cfs_bandwidth(tg, period, quota); ++ return ret ?: nbytes; ++} ++#endif ++ ++static struct cftype cpu_files[] = { ++ { ++ .name = "stat", ++ .flags = CFTYPE_NOT_ON_ROOT, ++ .seq_show = cpu_stats_show, ++ }, ++#ifdef CONFIG_FAIR_GROUP_SCHED ++ { ++ .name = "weight", ++ .flags = CFTYPE_NOT_ON_ROOT, ++ .read_u64 = cpu_weight_read_u64, ++ .write_u64 = cpu_weight_write_u64, ++ }, ++#endif ++#ifdef CONFIG_CFS_BANDWIDTH ++ { ++ .name = "max", ++ .flags = CFTYPE_NOT_ON_ROOT, ++ .seq_show = cpu_max_show, ++ .write = cpu_max_write, ++ }, ++#endif ++ { } /* terminate */ ++}; ++ + struct cgroup_subsys cpu_cgrp_subsys = { + .css_alloc = cpu_cgroup_css_alloc, + .css_free = cpu_cgroup_css_free, +@@ -8600,7 +8733,15 @@ struct cgroup_subsys cpu_cgrp_subsys = { + .can_attach = cpu_cgroup_can_attach, + .attach = cpu_cgroup_attach, + .legacy_cftypes = cpu_legacy_files, ++ .dfl_cftypes = cpu_files, + .early_init = 1, ++#ifdef CONFIG_CGROUP_CPUACCT ++ /* ++ * cpuacct is enabled together with cpu on the unified hierarchy ++ * and its stats are reported through "cpu.stat". ++ */ ++ .depends_on = 1 << cpuacct_cgrp_id, ++#endif + }; + + #endif /* CONFIG_CGROUP_SCHED */ +diff --git a/kernel/sched/cpuacct.c b/kernel/sched/cpuacct.c +index 42b2dd5..b4d32a6 100644 +--- a/kernel/sched/cpuacct.c ++++ b/kernel/sched/cpuacct.c +@@ -224,6 +224,30 @@ static struct cftype files[] = { + { } /* terminate */ + }; + ++/* used to print cpuacct stats in cpu.stat on the unified hierarchy */ ++void cpuacct_cpu_stats_show(struct seq_file *sf) ++{ ++ struct cgroup_subsys_state *css; ++ u64 usage, user, sys; ++ ++ css = cgroup_get_e_css(seq_css(sf)->cgroup, &cpuacct_cgrp_subsys); ++ ++ usage = cpuusage_read(css, seq_cft(sf)); ++ cpuacct_stats_read(css_ca(css), &user, &sys); ++ ++ user *= TICK_NSEC; ++ sys *= TICK_NSEC; ++ do_div(usage, NSEC_PER_USEC); ++ do_div(user, NSEC_PER_USEC); ++ do_div(sys, NSEC_PER_USEC); ++ ++ seq_printf(sf, "usage_usec %llu\n" ++ "user_usec %llu\n" ++ "system_usec %llu\n", usage, user, sys); ++ ++ css_put(css); ++} ++ + /* + * charge this task's execution time to its accounting group. + * +diff --git a/kernel/sched/cpuacct.h b/kernel/sched/cpuacct.h +index ed60562..44eace9 100644 +--- a/kernel/sched/cpuacct.h ++++ b/kernel/sched/cpuacct.h +@@ -2,6 +2,7 @@ + + extern void cpuacct_charge(struct task_struct *tsk, u64 cputime); + extern void cpuacct_account_field(struct task_struct *p, int index, u64 val); ++extern void cpuacct_cpu_stats_show(struct seq_file *sf); + + #else + +@@ -14,4 +15,8 @@ cpuacct_account_field(struct task_struct *p, int index, u64 val) + { + } + ++static inline void cpuacct_cpu_stats_show(struct seq_file *sf) ++{ ++} ++ + #endif diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c0f6726450..04e35a02d81 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12440,6 +12440,7 @@ with pkgs; [ kernelPatches.bridge_stp_helper kernelPatches.p9_fixes kernelPatches.cpu-cgroup-v2."4.4" + kernelPatches.modinst_arg_list_too_long ] ++ lib.optionals ((platform.kernelArch or null) == "mips") [ kernelPatches.mips_fpureg_emu From 0a5ecde8085122835a9c8ffa2025e8ccb49ddb14 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Mon, 30 Oct 2017 14:03:10 +0100 Subject: [PATCH 25/35] linux: 4.4.80 -> 4.4.95 --- pkgs/os-specific/linux/kernel/linux-4.4.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index 16699dcdf43..a695fe34cd6 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,18 +1,11 @@ { stdenv, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: import ./generic.nix (args // rec { - version = "4.4.80"; + version = "4.4.95"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1hs07k49sbpi8yw2mdwn1967i82x4wn6kg0lbjvv5l1pv3alky1l"; + sha256 = "07vkxhh435gilxsh9ag6zvf2r9k5l9ffqp72900c50nsfjrdgdrx"; }; - - kernelPatches = args.kernelPatches; - - features.iwlwifi = true; - features.efiBootStub = true; - features.needsCifsUtils = true; - features.netfilterRPFilter = true; } // (args.argsOverride or {})) From 9b0d50e3d0ff4a0ab783159c0efe6de9472fe7ed Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Sun, 29 Oct 2017 22:07:48 +0000 Subject: [PATCH 26/35] fetchbower: clean common uri characters from version string Some bower.json files have URL dependencies missing a version. Fixes rvl/bower2nix#18 --- pkgs/build-support/fetchbower/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/fetchbower/default.nix b/pkgs/build-support/fetchbower/default.nix index dd0bac49cb6..3e1f0eff84a 100644 --- a/pkgs/build-support/fetchbower/default.nix +++ b/pkgs/build-support/fetchbower/default.nix @@ -4,13 +4,13 @@ let let components = lib.splitString "#" version; hash = lib.last components; - ver = if builtins.length components == 1 then version else hash; + ver = if builtins.length components == 1 then (cleanName version) else hash; in ver; - bowerName = name: lib.replaceStrings ["/"] ["-"] name; + cleanName = name: lib.replaceStrings ["/" ":"] ["-" "-"] name; fetchbower = name: version: target: outputHash: stdenv.mkDerivation { - name = "${bowerName name}-${bowerVersion version}"; + name = "${cleanName name}-${bowerVersion version}"; SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; buildCommand = '' fetch-bower --quiet --out=$PWD/out "${name}" "${target}" "${version}" From 9ec640ec70e9ecd1601d4b530db0ce34e9ac84f3 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Mon, 30 Oct 2017 12:16:48 +0000 Subject: [PATCH 27/35] bower2nix: fix execution under nix-shell --pure bower2nix needs nix to compute store hashes. Fixes rvl/bower2nix#16 --- pkgs/development/node-packages/default-v4.nix | 4 ++-- pkgs/development/node-packages/default-v6.nix | 4 ++-- pkgs/top-level/node-packages.nix | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/node-packages/default-v4.nix b/pkgs/development/node-packages/default-v4.nix index 99cb7ca4044..c058154a996 100644 --- a/pkgs/development/node-packages/default-v4.nix +++ b/pkgs/development/node-packages/default-v4.nix @@ -1,4 +1,4 @@ -{pkgs, system, nodejs}: +{pkgs, system, nodejs, stdenv}: let nodePackages = import ./composition-v4.nix { @@ -43,7 +43,7 @@ nodePackages // { buildInputs = oldAttrs.buildInputs ++ [ pkgs.makeWrapper ]; postInstall = '' for prog in bower2nix fetch-bower; do - wrapProgram "$out/bin/$prog" --prefix PATH : "${pkgs.git}/bin" + wrapProgram "$out/bin/$prog" --prefix PATH : ${stdenv.lib.makeBinPath [ pkgs.git pkgs.nix ]} done ''; }); diff --git a/pkgs/development/node-packages/default-v6.nix b/pkgs/development/node-packages/default-v6.nix index 334c79a8267..3deee40812a 100644 --- a/pkgs/development/node-packages/default-v6.nix +++ b/pkgs/development/node-packages/default-v6.nix @@ -1,4 +1,4 @@ -{pkgs, system, nodejs}: +{pkgs, system, nodejs, stdenv}: let nodePackages = import ./composition-v6.nix { @@ -41,7 +41,7 @@ nodePackages // { buildInputs = oldAttrs.buildInputs ++ [ pkgs.makeWrapper ]; postInstall = '' for prog in bower2nix fetch-bower; do - wrapProgram "$out/bin/$prog" --prefix PATH : "${pkgs.git}/bin" + wrapProgram "$out/bin/$prog" --prefix PATH : ${stdenv.lib.makeBinPath [ pkgs.git pkgs.nix ]} done ''; }); diff --git a/pkgs/top-level/node-packages.nix b/pkgs/top-level/node-packages.nix index d8eb668107b..4f72b420699 100644 --- a/pkgs/top-level/node-packages.nix +++ b/pkgs/top-level/node-packages.nix @@ -66,7 +66,7 @@ in rec { bower2nix.buildInputs = [ pkgs.makeWrapper ]; bower2nix.postInstall = '' for prog in bower2nix fetch-bower; do - wrapProgram "$out/bin/$prog" --prefix PATH : "${pkgs.git}/bin" + wrapProgram "$out/bin/$prog" --prefix PATH : ${stdenv.lib.makeBinPath [ pkgs.git pkgs.nix ]} done ''; } // args.overrides or {}; From b93df240781617e0008e41dd8f7f735f6d7f5344 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 30 Oct 2017 09:52:29 +0100 Subject: [PATCH 28/35] pari: enable darwin build --- .../science/math/pari/default.nix | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/science/math/pari/default.nix b/pkgs/applications/science/math/pari/default.nix index 64784facfb9..86d4d289c2a 100644 --- a/pkgs/applications/science/math/pari/default.nix +++ b/pkgs/applications/science/math/pari/default.nix @@ -14,12 +14,21 @@ stdenv.mkDerivation rec { buildInputs = [ gmp readline libX11 libpthreadstubs tex perl ]; configureScript = "./Configure"; - configureFlags = - "--mt=pthread" + - "--with-gmp=${gmp.dev} " + - "--with-readline=${readline.dev}"; + configureFlags = [ + "--mt=pthread" + "--with-gmp=${gmp.dev}" + "--with-readline=${readline.dev}" + ] ++ stdenv.lib.optional stdenv.isDarwin "--host=x86_64-darwin"; - makeFlags = "all"; + preConfigure = '' + export LD=$CC + ''; + + postConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + echo 'echo x86_64-darwin' > config/arch-osname + ''; + + makeFlags = [ "all" ]; meta = with stdenv.lib; { description = "Computer algebra system for high-performance number theory computations"; @@ -36,12 +45,12 @@ stdenv.mkDerivation rec { Bordeaux I, France), PARI is now under the GPL and maintained by Karim Belabas with the help of many volunteer contributors. - - PARI is a C library, allowing fast computations. + - PARI is a C library, allowing fast computations. - gp is an easy-to-use interactive shell giving access to the PARI functions. - GP is the name of gp's scripting language. - - gp2c, the GP-to-C compiler, combines the best of both worlds - by compiling GP scripts to the C language and transparently loading + - gp2c, the GP-to-C compiler, combines the best of both worlds + by compiling GP scripts to the C language and transparently loading the resulting functions into gp. (gp2c-compiled scripts will typically run 3 or 4 times faster.) gp2c currently only understands a subset of the GP language. @@ -50,7 +59,7 @@ stdenv.mkDerivation rec { downloadPage = "http://pari.math.u-bordeaux.fr/download.html"; license = licenses.gpl2Plus; maintainers = with maintainers; [ ertes raskin AndersonTorres ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; updateWalker = true; }; } From 25c8014a4bd3db23b603f557d0a12b5fc905919a Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 30 Oct 2017 13:34:53 -0400 Subject: [PATCH 29/35] gradle: 4.2.1 -> 4.3 --- pkgs/development/tools/build-managers/gradle/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index a5ea6df3c8d..bbfcc851307 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -52,12 +52,12 @@ rec { }; gradle_latest = gradleGen rec { - name = "gradle-4.2.1"; + name = "gradle-4.3"; nativeVersion = "0.14"; src = fetchurl { url = "http://services.gradle.org/distributions/${name}-bin.zip"; - sha256 = "1h7v133rm81jf0bgv9mgvydl7rgh4430dnsfs66wflfay82cqldm"; + sha256 = "0k358y18pp2809kn5il4kv3qvlqrbwmy276bbm3mnmwjxx7g9jwd"; }; }; From 3004b6f150b01af1e4f856097a67ade76c7c949f Mon Sep 17 00:00:00 2001 From: Falco Peijnenburg Date: Mon, 30 Oct 2017 18:37:20 +0100 Subject: [PATCH 30/35] fetchgitrevision: removed It doesn't work and was last referred to in 5553546c212152a9cea72e1398b088cda78c7b8b --- pkgs/build-support/fetchgitrevision/default.nix | 10 ---------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 12 deletions(-) delete mode 100644 pkgs/build-support/fetchgitrevision/default.nix diff --git a/pkgs/build-support/fetchgitrevision/default.nix b/pkgs/build-support/fetchgitrevision/default.nix deleted file mode 100644 index e877648978d..00000000000 --- a/pkgs/build-support/fetchgitrevision/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -runCommand: git: repository: branch: - import (runCommand "head-revision" - { buildInputs = [ git ]; - dummy = builtins.currentTime; - } - '' - rev=$(git ls-remote ${repository} | grep "refs/${branch}$" | awk '{ print $1 }') - echo "[ \"$rev\" ]" > $out - echo Latest revision in ${branch} is $rev - '') diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04e35a02d81..2a96fbe6622 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -144,8 +144,6 @@ with pkgs; fetchgitPrivate = callPackage ../build-support/fetchgit/private.nix { }; - fetchgitrevision = import ../build-support/fetchgitrevision runCommand git; - fetchgitLocal = callPackage ../build-support/fetchgitlocal { }; fetchmtn = callPackage ../build-support/fetchmtn (config.fetchmtn or {}); From 0581038e8e757f05dc1f75df52e7d0c79acea3fc Mon Sep 17 00:00:00 2001 From: Chris Martin Date: Mon, 30 Oct 2017 13:49:05 -0400 Subject: [PATCH 31/35] nixos/acme: remove doc note about restarting nginx Discussion from #30945 indicates that it is no longer true that you have to restart nginx. --- nixos/modules/security/acme.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/nixos/modules/security/acme.xml b/nixos/modules/security/acme.xml index 823806f4641..6130ed82ed3 100644 --- a/nixos/modules/security/acme.xml +++ b/nixos/modules/security/acme.xml @@ -89,8 +89,5 @@ services.nginx = { }; } - -At the moment you still have to restart Nginx after the ACME -certs arrive. From 1d56d0c8a79334cd7149fd580512046558eaac78 Mon Sep 17 00:00:00 2001 From: "Nicolas B. Pierron" Date: Mon, 30 Oct 2017 17:51:30 +0000 Subject: [PATCH 32/35] types.submodule: Fix the NixOS Manual, by escaping the <> symbols. --- lib/types.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/types.nix b/lib/types.nix index dd0f31e9d14..db3bd381523 100644 --- a/lib/types.nix +++ b/lib/types.nix @@ -297,7 +297,7 @@ rec { # This is mandatory as some option declaration might use the # "name" attribute given as argument of the submodule and use it # as the default of option declarations. - args.name = ""; + args.name = "<name>"; }).options; getSubModules = opts'; substSubModules = m: submodule m; From 517a0723e48cd25c4771affd118e7500af9fb2bb Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Thu, 14 Sep 2017 17:58:43 +0200 Subject: [PATCH 33/35] pythonPackages.netaddr: fix patch hash --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d83ac0df11b..9ce0e45284b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12469,7 +12469,7 @@ in { patches = [ (pkgs.fetchpatch { url = https://github.com/drkjam/netaddr/commit/2ab73f10be7069c9412e853d2d0caf29bd624012.patch; - sha256 = "08rn1s3w9424jhandy4j9sksy852ny00088zh15nirw5ajqg1dn7"; + sha256 = "0s1cdn9v5alpviabhcjmzc0m2pnpq9dh2fnnk2x96dnry1pshg39"; }) ]; From 07e0c0e0a2f237639600f2a0d62f6eac748b1e6e Mon Sep 17 00:00:00 2001 From: Bas van Dijk Date: Mon, 30 Oct 2017 17:35:14 +0100 Subject: [PATCH 34/35] network-interfaces-scripted: fix NixOS/nixops#640 Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon. --- nixos/modules/tasks/network-interfaces-scripted.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix index e92c9bc27de..1f424f84c6e 100644 --- a/nixos/modules/tasks/network-interfaces-scripted.nix +++ b/nixos/modules/tasks/network-interfaces-scripted.nix @@ -93,6 +93,7 @@ let after = [ "network-pre.target" "systemd-udevd.service" "systemd-sysctl.service" ]; before = [ "network.target" "shutdown.target" ]; wants = [ "network.target" ]; + partOf = map (i: "network-addresses-${i.name}.service") interfaces; conflicts = [ "shutdown.target" ]; wantedBy = [ "multi-user.target" ] ++ optional hasDefaultGatewaySet "network-online.target"; @@ -171,8 +172,6 @@ let "network-link-${i.name}.service" "network.target" ]; - # propagate stop and reload from network-setup - partOf = [ "network-setup.service" ]; # order before network-setup because the routes that are configured # there may need ip addresses configured before = [ "network-setup.service" ]; From 440178d729efbc279a70c93495b6212db029f180 Mon Sep 17 00:00:00 2001 From: lassulus Date: Mon, 30 Oct 2017 21:43:10 +0100 Subject: [PATCH 35/35] gdm: don't start getty@tty1 if enabled --- nixos/modules/services/x11/display-managers/gdm.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/x11/display-managers/gdm.nix b/nixos/modules/services/x11/display-managers/gdm.nix index 45a67ac040b..e83f26516f5 100644 --- a/nixos/modules/services/x11/display-managers/gdm.nix +++ b/nixos/modules/services/x11/display-managers/gdm.nix @@ -125,6 +125,8 @@ in "getty@tty1.service" ]; + systemd.services."getty@tty1".enable = false; + systemd.services.display-manager.conflicts = [ "getty@tty1.service" ]; systemd.services.display-manager.serviceConfig = { # Restart = "always"; - already defined in xserver.nix KillMode = "mixed";