Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 312a059bef8b
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c2570ef90712
Choose a head ref
  • 15 commits
  • 16 files changed
  • 4 contributors

Commits on May 8, 2019

  1. nvidia_x11: 415.27 -> 418.43

    (cherry picked from commit 48e66e5)
    eadwu authored and yorickvP committed May 8, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    yorickvP Yorick
    Copy the full SHA
    811a520 View commit details
  2. nvidia_x11: 418.43 -> 418.56

    (cherry picked from commit 928d51a)
    eadwu authored and yorickvP committed May 8, 2019

    Verified

    This commit was signed with the committer’s verified signature.
    yorickvP Yorick
    Copy the full SHA
    063c339 View commit details

Commits on May 10, 2019

  1. journalbeat: patchelf the binary instead of using a wrapper

    (cherry picked from commit 6f0a6bf)
    basvandijk committed May 10, 2019
    Copy the full SHA
    c33ba88 View commit details
  2. journalbeat6: fix binary by setting RPATH to systemd using patchelf

    (cherry picked from commit 42f357d)
    basvandijk committed May 10, 2019
    Copy the full SHA
    8e7067e View commit details
  3. journalbeat7: fix binary by setting RPATH to systemd using patchelf

    (cherry picked from commit 42c9c6d)
    basvandijk committed May 10, 2019
    Copy the full SHA
    25c0ce1 View commit details
  4. journalbeat: make journalbeat6 the default

    Version 6.x is also the default for the other beats.
    
    (cherry picked from commit a662f99)
    basvandijk committed May 10, 2019
    Copy the full SHA
    504be3a View commit details
  5. nixos/journalbeat: support journalbeat >= 6 & add test

    (cherry picked from commit 477c552)
    basvandijk committed May 10, 2019
    Copy the full SHA
    f565fa5 View commit details

Commits on May 11, 2019

  1. Copy the full SHA
    d4ecde0 View commit details
  2. Merge pull request #61244 from basvandijk/journalbeat-fixes-release-1…

    …9.03
    
    Backports "NixOS: support journalbeat >= 6" to release-19.03
    basvandijk authored May 11, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    802d577 View commit details
  3. elk5: 5.6.9 -> 5.6.16

    (cherry picked from commit 8673d82)
    basvandijk committed May 11, 2019
    Copy the full SHA
    f913871 View commit details
  4. elk6: 6.7.1 -> 6.7.2

    (cherry picked from commit 1a0818e)
    basvandijk committed May 11, 2019
    Copy the full SHA
    5866190 View commit details
  5. elasticsearchPlugins: fix plugins, add s3-repository and gcs-reposito…

    …ry plugin
    
    (cherry picked from commit e3f6239)
    offlinehacker authored and basvandijk committed May 11, 2019
    Copy the full SHA
    e01fd40 View commit details
  6. elasticsearchPlugins.elasticsearch_analysis_lemmagen: add alias

    For 19.03 backwards compatibility.
    basvandijk committed May 11, 2019
    Copy the full SHA
    07f649b View commit details
  7. Merge pull request #61315 from basvandijk/elk-old-upgrades-release-19.03

    Backport "elk5: 5.6.9 -> 5.6.16 & elk6: 6.7.1 -> 6.7.2 & elasticsearchPlugins fix" to release-19.03
    basvandijk authored May 11, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6f45d8d View commit details
  8. Merge pull request #61140 from LumiGuide/1903-nvidiastable

    nvidia_x11: 415.27 -> 418.43 - backport from master
    veprbl authored May 11, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c2570ef View commit details
43 changes: 37 additions & 6 deletions nixos/modules/services/logging/journalbeat.nix
Original file line number Diff line number Diff line change
@@ -5,11 +5,13 @@ with lib;
let
cfg = config.services.journalbeat;

lt6 = builtins.compareVersions cfg.package.version "6" < 0;

journalbeatYml = pkgs.writeText "journalbeat.yml" ''
name: ${cfg.name}
tags: ${builtins.toJSON cfg.tags}
journalbeat.cursor_state_file: ${cfg.stateDir}/cursor-state
${optionalString lt6 "journalbeat.cursor_state_file: /var/lib/${cfg.stateDir}/cursor-state"}
${cfg.extraConfig}
'';
@@ -22,6 +24,16 @@ in

enable = mkEnableOption "journalbeat";

package = mkOption {
type = types.package;
default = pkgs.journalbeat;
defaultText = "pkgs.journalbeat";
example = literalExample "pkgs.journalbeat7";
description = ''
The journalbeat package to use
'';
};

name = mkOption {
type = types.str;
default = "journalbeat";
@@ -36,13 +48,17 @@ in

stateDir = mkOption {
type = types.str;
default = "/var/lib/journalbeat";
description = "The state directory. Journalbeat's own logs and other data are stored here.";
default = "journalbeat";
description = ''
Directory below <literal>/var/lib/</literal> to store journalbeat's
own logs and other data. This directory will be created automatically
using systemd's StateDirectory mechanism.
'';
};

extraConfig = mkOption {
type = types.lines;
default = ''
default = optionalString lt6 ''
journalbeat:
seek_position: cursor
cursor_seek_fallback: tail
@@ -61,15 +77,30 @@ in

config = mkIf cfg.enable {

systemd.services.journalbeat = with pkgs; {
assertions = [
{
assertion = !hasPrefix "/" cfg.stateDir;
message =
"The option services.journalbeat.stateDir shouldn't be an absolute directory." +
" It should be a directory relative to /var/lib/.";
}
];

systemd.services.journalbeat = {
description = "Journalbeat log shipper";
wantedBy = [ "multi-user.target" ];
preStart = ''
mkdir -p ${cfg.stateDir}/data
mkdir -p ${cfg.stateDir}/logs
'';
serviceConfig = {
ExecStart = "${pkgs.journalbeat}/bin/journalbeat -c ${journalbeatYml} -path.data ${cfg.stateDir}/data -path.logs ${cfg.stateDir}/logs";
StateDirectory = cfg.stateDir;
ExecStart = ''
${cfg.package}/bin/journalbeat \
-c ${journalbeatYml} \
-path.data /var/lib/${cfg.stateDir}/data \
-path.logs /var/lib/${cfg.stateDir}/logs'';
Restart = "always";
};
};
};
61 changes: 54 additions & 7 deletions nixos/tests/elk.nix
Original file line number Diff line number Diff line change
@@ -12,6 +12,11 @@ with pkgs.lib;
let
esUrl = "http://localhost:9200";

totalHits = message :
"curl --silent --show-error '${esUrl}/_search' -H 'Content-Type: application/json' " +
''-d '{\"query\" : { \"match\" : { \"message\" : \"${message}\"}}}' '' +
"| jq .hits.total";

mkElkTest = name : elk :
let elasticsearchGe7 = builtins.compareVersions elk.elasticsearch.version "7" >= 0;
in makeTest {
@@ -21,7 +26,7 @@ let
};
nodes = {
one =
{ pkgs, ... }: {
{ pkgs, lib, ... }: {
# Not giving the machine at least 2060MB results in elasticsearch failing with the following error:
#
# OpenJDK 64-Bit Server VM warning:
@@ -40,6 +45,26 @@ let
environment.systemPackages = [ pkgs.jq ];

services = {

journalbeat = let lt6 = builtins.compareVersions
elk.journalbeat.version "6" < 0; in {
enable = true;
package = elk.journalbeat;
extraConfig = mkOptionDefault (''
logging:
to_syslog: true
level: warning
metrics.enabled: false
output.elasticsearch:
hosts: [ "127.0.0.1:9200" ]
${optionalString lt6 "template.enabled: false"}
'' + optionalString (!lt6) ''
journalbeat.inputs:
- paths: []
seek: cursor
'');
};

logstash = {
enable = true;
package = elk.logstash;
@@ -107,14 +132,19 @@ let
testScript = ''
startAll;
# Wait until elasticsearch is listening for connections.
$one->waitForUnit("elasticsearch.service");
$one->waitForOpenPort(9200);
# Continue as long as the status is not "red". The status is probably
# "yellow" instead of "green" because we are using a single elasticsearch
# node which elasticsearch considers risky.
#
# TODO: extend this test with multiple elasticsearch nodes and see if the status turns "green".
$one->waitUntilSucceeds("curl --silent --show-error '${esUrl}/_cluster/health' | jq .status | grep -v red");
# TODO: extend this test with multiple elasticsearch nodes
# and see if the status turns "green".
$one->waitUntilSucceeds(
"curl --silent --show-error '${esUrl}/_cluster/health' " .
"| jq .status | grep -v red");
# Perform some simple logstash tests.
$one->waitForUnit("logstash.service");
@@ -123,46 +153,63 @@ let
# See if kibana is healthy.
$one->waitForUnit("kibana.service");
$one->waitUntilSucceeds("curl --silent --show-error 'http://localhost:5601/api/status' | jq .status.overall.state | grep green");
$one->waitUntilSucceeds(
"curl --silent --show-error 'http://localhost:5601/api/status' " .
"| jq .status.overall.state | grep green");
# See if logstash messages arive in elasticsearch.
$one->waitUntilSucceeds("curl --silent --show-error '${esUrl}/_search' -H 'Content-Type: application/json' -d '{\"query\" : { \"match\" : { \"message\" : \"flowers\"}}}' | jq .hits.total | grep -v 0");
$one->waitUntilSucceeds("curl --silent --show-error '${esUrl}/_search' -H 'Content-Type: application/json' -d '{\"query\" : { \"match\" : { \"message\" : \"dragons\"}}}' | jq .hits.total | grep 0");
$one->waitUntilSucceeds("${totalHits "flowers"} | grep -v 0");
$one->waitUntilSucceeds("${totalHits "dragons"} | grep 0");
# Test if a message logged to the journal
# is ingested by elasticsearch via journalbeat.
$one->waitForUnit("journalbeat.service");
$one->execute("echo 'Supercalifragilisticexpialidocious' | systemd-cat");
$one->waitUntilSucceeds(
"${totalHits "Supercalifragilisticexpialidocious"} | grep -v 0");
'' + optionalString (!elasticsearchGe7) ''
# Test elasticsearch-curator.
$one->systemctl("stop logstash");
$one->systemctl("start elasticsearch-curator");
$one->waitUntilSucceeds("! curl --silent --show-error '${esUrl}/_cat/indices' | grep logstash | grep -q ^$1");
$one->waitUntilSucceeds(
"! curl --silent --show-error '${esUrl}/_cat/indices' " .
"| grep logstash | grep -q ^$1");
'';
};
in mapAttrs mkElkTest {
"ELK-5" = {
elasticsearch = pkgs.elasticsearch5;
logstash = pkgs.logstash5;
kibana = pkgs.kibana5;
journalbeat = pkgs.journalbeat5;
};
"ELK-6" =
if enableUnfree
then {
elasticsearch = pkgs.elasticsearch6;
logstash = pkgs.logstash6;
kibana = pkgs.kibana6;
journalbeat = pkgs.journalbeat6;
}
else {
elasticsearch = pkgs.elasticsearch6-oss;
logstash = pkgs.logstash6-oss;
kibana = pkgs.kibana6-oss;
journalbeat = pkgs.journalbeat6;
};
"ELK-7" =
if enableUnfree
then {
elasticsearch = pkgs.elasticsearch7;
logstash = pkgs.logstash7;
kibana = pkgs.kibana7;
journalbeat = pkgs.journalbeat7;
}
else {
elasticsearch = pkgs.elasticsearch7-oss;
logstash = pkgs.logstash7-oss;
kibana = pkgs.kibana7-oss;
journalbeat = pkgs.journalbeat7;
};
}
6 changes: 3 additions & 3 deletions pkgs/development/tools/misc/kibana/5.x.nix
Original file line number Diff line number Diff line change
@@ -11,9 +11,9 @@ let
elasticArch = archOverrides."${arch}" or arch;
plat = elemAt info 1;
shas = {
"x86_64-linux" = "1rg4j5jm8mkscrwlbx5qk3qjnblyr8z9x5npvyi73zm0ism0gv4j";
"i686-linux" = "14swgx9sf23pns2pj30yyhd0p0rnykdimdrnj8rb0r1pqszw57qx";
"x86_64-darwin" = "10l13r47nx74xicnjgb56nvgvx2al1zx1p8f09pjldaa2gjlll2k";
"x86_64-linux" = "0hzr47hyw54b9j4c33n6f6n3pala6kjhyvinfszgikbghyhb7fsa";
"i686-linux" = "0bka4h31cw10ii4pfygc81pwc3wr32pzw3v4k4bi8rnqbk280fmn";
"x86_64-darwin" = "0jqc2g89rqkla0alqxr14sh4pccfn514jrwr7mkjivxdapygh1ll";
};
in stdenv.mkDerivation rec {
name = "kibana-${version}";
8 changes: 4 additions & 4 deletions pkgs/development/tools/misc/kibana/6.x.nix
Original file line number Diff line number Diff line change
@@ -19,12 +19,12 @@ let
shas =
if enableUnfree
then {
"x86_64-linux" = "039ll00kvrp881cyybb04z90cw68j7p5cspgdxh0bky9lyi9qpwb";
"x86_64-darwin" = "0qrakrihcjwn9dic77b0k9ja3zf6nbz534v76xid9gv20md5dds3";
"x86_64-linux" = "1i3zmzxihplwd8n994lfxhhgygdg3qxjqgrj1difa8w3vss0zbfn";
"x86_64-darwin" = "09a96ms9id77infxd9xxfs6r7j01mn0rz5yw3g9sl92j9ri7r52c";
}
else {
"x86_64-linux" = "1v1fbmfkbnlx043z3yx02gaqqy63bj2ymvcby66n4qq0vlpahvwx";
"x86_64-darwin" = "1y4q7a2b9arln94d6sj547qkv3258jlgcz9b342fh6khlbpfjb8c";
"x86_64-linux" = "166rhxr0qlv1yarj2mg1c3b8mxvhl70jhz53azq7ic6laj55q7fk";
"x86_64-darwin" = "0ngngkbl036p2mzwhp8qafi3aqzk398a218w12srfqny5n630vdk";
};

in stdenv.mkDerivation rec {
2 changes: 1 addition & 1 deletion pkgs/misc/logging/beats/5.x.nix
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ let beat = package : extraArgs : buildGoPackage (rec {
owner = "elastic";
repo = "beats";
rev = "v${version}";
sha256 = "00g90i58c6gnyzszsx7y75vn1350hrkzrsb50xx700jqg9ii8yin";
sha256 = "0sslcwjdf7zb9xj2c98jid3rb09l96m22k3af48gppimxg1lkh9b";
};

goPackagePath = "github.com/elastic/beats";
5 changes: 4 additions & 1 deletion pkgs/misc/logging/beats/6.x.nix
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ let beat = package : extraArgs : buildGoPackage (rec {
owner = "elastic";
repo = "beats";
rev = "v${version}";
sha256 = "0n1sjngc82b7wysw5aaiqvllq4c8rx2jj7khw4vrypc40f8ahjs5";
sha256 = "0if08dxibdnqpsxs8f6hvw147j0j8bavhcm11scn28j9id65absq";
};

goPackagePath = "github.com/elastic/beats";
@@ -45,5 +45,8 @@ in {
journal entries from Linuxes with systemd.
'';
buildInputs = [ systemd.dev ];
postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in ''
patchelf --set-rpath ${libPath} "$bin/bin/journalbeat"
'';
};
}
3 changes: 3 additions & 0 deletions pkgs/misc/logging/beats/7.x.nix
Original file line number Diff line number Diff line change
@@ -45,5 +45,8 @@ in {
journal entries from Linuxes with systemd.
'';
buildInputs = [ systemd.dev ];
postFixup = let libPath = stdenv.lib.makeLibraryPath [ systemd.lib ]; in ''
patchelf --set-rpath ${libPath} "$bin/bin/journalbeat"
'';
};
}
4 changes: 3 additions & 1 deletion pkgs/os-specific/linux/nvidia-x11/builder.sh
Original file line number Diff line number Diff line change
@@ -74,7 +74,9 @@ installPhase() {
if [ -n "$bin" ]; then
# Install the X drivers.
mkdir -p $bin/lib/xorg/modules
cp -p libnvidia-wfb.* $bin/lib/xorg/modules/
if [ -f libnvidia-wfb.so ]; then
cp -p libnvidia-wfb.* $bin/lib/xorg/modules/
fi
mkdir -p $bin/lib/xorg/modules/drivers
cp -p nvidia_drv.so $bin/lib/xorg/modules/drivers
mkdir -p $bin/lib/xorg/modules/extensions
12 changes: 6 additions & 6 deletions pkgs/os-specific/linux/nvidia-x11/default.nix
Original file line number Diff line number Diff line change
@@ -16,16 +16,16 @@ let
in
rec {
# Policy: use the highest stable version as the default (on our master).
stable = if stdenv.hostPlatform.system == "x86_64-linux" then stable_415 else legacy_390;
stable = if stdenv.hostPlatform.system == "x86_64-linux" then stable_418 else legacy_390;

# No active beta right now
beta = stable;

stable_415 = generic {
version = "415.27";
sha256_64bit = "12ylf1h1wpgkd0g7r30c33hhhialn315k5sbxyzks0rm42k7cay8";
settingsSha256 = "0m8hfxb6fhanqlkkk4ayn1blgdsvnn0ipxdl19ifdl200ln6j053";
persistencedSha256 = "0i6ik6xv6rnwcd6vg5xrxcd9g7nzca3vkiy2srbv0simw86nwgdz";
stable_418 = generic {
version = "418.56";
sha256_64bit = "1cg7927g5ml1rwgpydlrjzr55gza5dfkqkch29bbarpzd7dh0mf4";
settingsSha256 = "1dai4dh6g3arkgicbjwhfr948i1xc13a7s0xcgalan0pn5zd56z6";
persistencedSha256 = "1r13jjpqg9ri5mw633k01dq2ivblc8nrbsnh7709v1xibaydwnhn";
};

# Last one supporting x86
2 changes: 1 addition & 1 deletion pkgs/servers/search/elasticsearch/5.x.nix
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
sha256 = "0sm99m4m4mmigj6ll22kyaw7zkp1s2i0mhzx15fzidnybdnlifb4";
sha256 = "0zy7awb2cm2fk3c7zc7v8b8pl0jw49awqwpa1jvilmvx6dcml0vb";
};

patches = [ ./es-home-5.x.patch ./es-classpath-5.x.patch ];
4 changes: 2 additions & 2 deletions pkgs/servers/search/elasticsearch/6.x.nix
Original file line number Diff line number Diff line change
@@ -19,8 +19,8 @@ stdenv.mkDerivation (rec {
url = "https://artifacts.elastic.co/downloads/elasticsearch/${name}.tar.gz";
sha256 =
if enableUnfree
then "1qh6iz3qhw8zcvxfss5w3h89zarwvk6dp5bbbag7c30kh94gkqvv"
else "13v8qpslanfn5w81qvbg0aqh510yfbl3x59kisvdkz9ifhjbcavi";
then "1a88yyl0x4bsx92m3wjsz1fgm76gbfdzcd4bzp2x652rha667vfh"
else "04fa0fk25d5yxcjdj0bwqvdrswgwj31fwjvbq4gpg66c6bqwzcn6";
};

patches = [ ./es-home-6.x.patch ];
Loading