Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
FRidh committed Oct 19, 2017
2 parents ee9c59c + d854b3d commit 52350b5
Show file tree
Hide file tree
Showing 94 changed files with 1,859 additions and 1,190 deletions.
2 changes: 2 additions & 0 deletions lib/maintainers.nix
Expand Up @@ -248,6 +248,7 @@
grburst = "Julius Elias <grburst@openmailbox.org>";
gridaphobe = "Eric Seidel <eric@seidel.io>";
guibert = "David Guibert <david.guibert@gmail.com>";
guibou = "Guillaume Bouchard <guillaum.bouchard@gmail.com>";
guillaumekoenig = "Guillaume Koenig <guillaume.edward.koenig@gmail.com>";
guyonvarch = "Joris Guyonvarch <joris@guyonvarch.me>";
hakuch = "Jesse Haber-Kucharsky <hakuch@gmail.com>";
Expand Down Expand Up @@ -323,6 +324,7 @@
konimex = "Muhammad Herdiansyah <herdiansyah@netc.eu>";
koral = "Koral <koral@mailoo.org>";
kovirobi = "Kovacsics Robert <kovirobi@gmail.com>";
kquick = "Kevin Quick <quick@sparq.org>";
kragniz = "Louis Taylor <louis@kragniz.eu>";
kristoff3r = "Kristoffer Søholm <k.soeholm@gmail.com>";
ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
Expand Down
11 changes: 11 additions & 0 deletions nixos/lib/test-driver/Machine.pm
Expand Up @@ -372,6 +372,17 @@ sub getUnitInfo {
return $info;
}

# Fail if the given systemd unit is not in the "active" state.
sub requireActiveUnit {
my ($self, $unit) = @_;
$self->nest("checking if unit ‘$unit’ has reached state 'active'", sub {
my $info = $self->getUnitInfo($unit);
my $state = $info->{ActiveState};
if ($state ne "active") {
die "Expected unit ‘$unit’ to to be in state 'active' but it is in state ‘$state\n";
};
});
}

# Wait for a systemd unit to reach the "active" state.
sub waitForUnit {
Expand Down
54 changes: 42 additions & 12 deletions nixos/modules/services/monitoring/graphite.nix
Expand Up @@ -7,6 +7,19 @@ let
writeTextOrNull = f: t: mapNullable (pkgs.writeTextDir f) t;

dataDir = cfg.dataDir;
staticDir = cfg.dataDir + "/static";

graphiteLocalSettingsDir = pkgs.runCommand "graphite_local_settings"
{inherit graphiteLocalSettings;} ''
mkdir -p $out
ln -s $graphiteLocalSettings $out/graphite_local_settings.py
'';

graphiteLocalSettings = pkgs.writeText "graphite_local_settings.py" (
"STATIC_ROOT = '${staticDir}'\n" +
optionalString (! isNull config.time.timeZone) "TIME_ZONE = '${config.time.timeZone}'\n"
+ cfg.web.extraConfig
);

graphiteApiConfig = pkgs.writeText "graphite-api.yaml" ''
time_zone: ${config.time.timeZone}
Expand Down Expand Up @@ -94,6 +107,15 @@ in {
default = 8080;
type = types.int;
};

extraConfig = mkOption {
type = types.str;
default = "";
description = ''
Graphite webapp settings. See:
<link xlink:href="http://graphite.readthedocs.io/en/latest/config-local-settings.html"/>
'';
};
};

api = {
Expand Down Expand Up @@ -460,19 +482,23 @@ in {
];
};
penvPack = "${penv}/${pkgs.python.sitePackages}";
# opt/graphite/webapp contains graphite/settings.py
# explicitly adding pycairo in path because it cannot be imported via buildEnv
in "${penvPack}/opt/graphite/webapp:${penvPack}:${pkgs.pythonPackages.pycairo}/${pkgs.python.sitePackages}";
in concatStringsSep ":" [
"${graphiteLocalSettingsDir}"
"${penvPack}/opt/graphite/webapp"
"${penvPack}"
# explicitly adding pycairo in path because it cannot be imported via buildEnv
"${pkgs.pythonPackages.pycairo}/${pkgs.python.sitePackages}"
];
DJANGO_SETTINGS_MODULE = "graphite.settings";
GRAPHITE_CONF_DIR = configDir;
GRAPHITE_STORAGE_DIR = dataDir;
LD_LIBRARY_PATH = "${pkgs.cairo.out}/lib";
};
serviceConfig = {
ExecStart = ''
${pkgs.python27Packages.waitress}/bin/waitress-serve \
--host=${cfg.web.listenAddress} --port=${toString cfg.web.port} \
--call django.core.handlers.wsgi:WSGIHandler'';
${pkgs.python27Packages.waitress-django}/bin/waitress-serve-django \
--host=${cfg.web.listenAddress} --port=${toString cfg.web.port}
'';
User = "graphite";
Group = "graphite";
PermissionsStartOnly = true;
Expand All @@ -482,16 +508,20 @@ in {
mkdir -p ${dataDir}/{whisper/,log/webapp/}
chmod 0700 ${dataDir}/{whisper/,log/webapp/}
# populate database
${pkgs.python27Packages.graphite_web}/bin/manage-graphite.py syncdb --noinput
${pkgs.pythonPackages.django_1_8}/bin/django-admin.py migrate --noinput
# create index
${pkgs.python27Packages.graphite_web}/bin/build-index.sh
chown -R graphite:graphite ${cfg.dataDir}
chown -R graphite:graphite ${dataDir}
touch ${dataDir}/db-created
fi
# Only collect static files when graphite_web changes.
if ! [ "${dataDir}/current_graphite_web" -ef "${pkgs.python27Packages.graphite_web}" ]; then
mkdir -p ${staticDir}
${pkgs.pythonPackages.django_1_8}/bin/django-admin.py collectstatic --noinput --clear
chown -R graphite:graphite ${staticDir}
ln -sfT "${pkgs.python27Packages.graphite_web}" "${dataDir}/current_graphite_web"
fi
'';
};

Expand Down
11 changes: 11 additions & 0 deletions nixos/modules/services/x11/display-managers/sddm.nix
Expand Up @@ -19,6 +19,17 @@ let

Xsetup = pkgs.writeScript "Xsetup" ''
#!/bin/sh
# Prior to Qt 5.9.2, there is a QML cache invalidation bug which sometimes
# strikes new Plasma 5 releases. If the QML cache is not invalidated, SDDM
# will segfault without explanation. We really tore our hair out for awhile
# before finding the bug:
# https://bugreports.qt.io/browse/QTBUG-62302
# We work around the problem by deleting the QML cache before startup. It
# will be regenerated, causing a small but perceptible delay when SDDM
# starts.
rm -fr /var/lib/sddm/.cache/sddm-greeter/qmlcache
${cfg.setupScript}
'';

Expand Down
1 change: 1 addition & 0 deletions nixos/release.nix
Expand Up @@ -257,6 +257,7 @@ in rec {
tests.gnome3 = callTest tests/gnome3.nix {};
tests.gnome3-gdm = callTest tests/gnome3-gdm.nix {};
tests.grafama = callTest tests/grafana.nix {};
tests.graphite = callTest tests/graphite.nix {};
tests.hardened = callTest tests/hardened.nix { };
tests.hibernate = callTest tests/hibernate.nix {};
tests.hound = callTest tests/hound.nix {};
Expand Down
26 changes: 26 additions & 0 deletions nixos/tests/graphite.nix
@@ -0,0 +1,26 @@
import ./make-test.nix ({ pkgs, ...} :
{
name = "graphite";
nodes = {
one =
{ config, pkgs, ... }: {
services.graphite = {
web = {
enable = true;
};
carbon = {
enableCache = true;
};
};
};
};

testScript = ''
startAll;
$one->waitForUnit("default.target");
$one->requireActiveUnit("graphiteWeb.service");
$one->requireActiveUnit("carbonCache.service");
$one->succeed("echo \"foo 1 `date +%s`\" | nc -q0 localhost 2003");
$one->waitUntilSucceeds("curl 'http://localhost:8080/metrics/find/?query=foo&format=treejson' --silent | grep foo")
'';
})
9 changes: 4 additions & 5 deletions pkgs/applications/display-managers/sddm/default.nix
@@ -1,11 +1,11 @@
{ mkDerivation, lib, copyPathsToStore, fetchFromGitHub, fetchpatch
{ mkDerivation, lib, fetchFromGitHub, fetchpatch
, cmake, extra-cmake-modules, pkgconfig, libxcb, libpthreadstubs, lndir
, libXdmcp, libXau, qtbase, qtdeclarative, qttools, pam, systemd
}:

let

version = "0.15.0";
version = "0.16.0";

in mkDerivation rec {
name = "sddm-${version}";
Expand All @@ -14,11 +14,10 @@ in mkDerivation rec {
owner = "sddm";
repo = "sddm";
rev = "v${version}";
sha256 = "1wissgl7wd7fblq8ghz8n2fr6wqip7h88p9fiarfpvi1918fgng8";
sha256 = "1j0rc8nk8bz7sxa0bc6lx9v7r3zlcfyicngfjqb894ni9k71kzsb";
};

patches =
copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [ ./sddm-ignore-config-mtime.patch ];

postPatch =
# Module Qt5::Test must be included in `find_package` before it is used.
Expand Down
@@ -1,28 +1,43 @@
From e9d82bfbc49993a5be2c93f6b72a969630587f26 Mon Sep 17 00:00:00 2001
From: Thomas Tuegel <ttuegel@gmail.com>
Date: Mon, 23 Nov 2015 06:56:28 -0600
Subject: [PATCH 1/2] ignore config mtime

---
src/common/ConfigReader.cpp | 5 -----
1 file changed, 5 deletions(-)

diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp
index cfc9940..5bf5a6a 100644
index 4b5983c..911c511 100644
--- a/src/common/ConfigReader.cpp
+++ b/src/common/ConfigReader.cpp
@@ -138,11 +138,6 @@ namespace SDDM {
QString currentSection = QStringLiteral(IMPLICIT_SECTION);
@@ -147,16 +147,13 @@ namespace SDDM {
// * m_path (classic fallback /etc/sddm.conf)

QFile in(m_path);
- QDateTime modificationTime = QFileInfo(in).lastModified();
- if (modificationTime <= m_fileModificationTime) {
QStringList files;
- QDateTime latestModificationTime = QFileInfo(m_path).lastModified();

if (!m_sysConfigDir.isEmpty()) {
//include the configDir in modification time so we also reload on any files added/removed
QDir dir(m_sysConfigDir);
if (dir.exists()) {
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_sysConfigDir).lastModified());
foreach (const QFileInfo &file, dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware)) {
files << (file.absoluteFilePath());
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
}
}
}
@@ -164,21 +161,14 @@ namespace SDDM {
//include the configDir in modification time so we also reload on any files added/removed
QDir dir(m_configDir);
if (dir.exists()) {
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_configDir).lastModified());
foreach (const QFileInfo &file, dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware)) {
files << (file.absoluteFilePath());
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
}
}
}

files << m_path;

- if (latestModificationTime <= m_fileModificationTime) {
- return;
- }
- m_fileModificationTime = modificationTime;

in.open(QIODevice::ReadOnly);
while (!in.atEnd()) {
--
2.6.3

- m_fileModificationTime = latestModificationTime;
-
foreach (const QString &filepath, files) {
loadInternal(filepath);
}
1 change: 0 additions & 1 deletion pkgs/applications/display-managers/sddm/series

This file was deleted.

23 changes: 13 additions & 10 deletions pkgs/applications/editors/eclipse/default.nix
Expand Up @@ -8,6 +8,9 @@

assert stdenv ? glibc;

# http://download.eclipse.org/eclipse/downloads/ is the main place to
# find the downloads needed for new versions

rec {

buildEclipse = import ./build-eclipse.nix {
Expand Down Expand Up @@ -111,16 +114,16 @@ rec {
};

eclipse-platform-47 = buildEclipse {
name = "eclipse-platform-4.7";
name = "eclipse-platform-4.7.1a";
description = "Eclipse Platform Oxygen";
sources = {
"x86_64-linux" = fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-platform-4.7-linux-gtk-x86_64.tar.gz;
sha256 = "0hrgijydxvd2zz1npv5qw8d79f48a6lsdw3qy1wqf7k59aqyg2fq";
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7.1a-201710090410/eclipse-platform-4.7.1a-linux-gtk-x86_64.tar.gz;
sha256 = "13gyrnhyhdpsrbi5nl0fhpwrqz3gdyqq3r0m1f2z3y6yr75sgw33";
};
"i686-linux" = fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-platform-4.7-linux-gtk.tar.gz;
sha256 = "00m89j26m8nj190q144wx8d88mldx1z6i797p8isg3rhbz3x5dbc";
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7.1a-201710090410/eclipse-platform-4.7.1a-linux-gtk.tar.gz;
sha256 = "013dfk23wa4jy177ywrkkr16wdjf6jxzjcz6mkl4ygki47yj9c5s";
};
};
};
Expand Down Expand Up @@ -165,16 +168,16 @@ rec {
};

eclipse-sdk-47 = buildEclipse {
name = "eclipse-sdk-4.7";
name = "eclipse-sdk-4.7.1a";
description = "Eclipse Oxygen Classic";
sources = {
"x86_64-linux" = fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-SDK-4.7-linux-gtk-x86_64.tar.gz;
sha256 = "1nz0hl0gg4a8iffnaggbhdw0ra8a7wljlimvijbbybh0nhvfd9n3";
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7.1a-201710090410/eclipse-SDK-4.7.1a-linux-gtk-x86_64.tar.gz;
sha256 = "05xpdbig170rw7k5dx33dlyz187wv62mma8s5wxrqi7f4117sx4y";
};
"i686-linux" = fetchurl {
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/eclipse-SDK-4.7-linux-gtk.tar.gz;
sha256 = "0dar69v7d7bkl18si45bccvil809a85ghb7k88m1q2cq1kd2r8z5";
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7.1a-201710090410/eclipse-SDK-4.7.1a-linux-gtk.tar.gz;
sha256 = "09c9m88k1cm9bhd900p5yf2q9pijrymgjcbhmagz0fcwhldrv0ys";
};
};
};
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/editors/eclipse/plugins.nix
Expand Up @@ -364,12 +364,12 @@ rec {

jdt = buildEclipseUpdateSite rec {
name = "jdt-${version}";
version = "4.7";
version = "4.7.1a";

src = fetchzip {
stripRoot = false;
url = "https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7-201706120950/org.eclipse.jdt-4.7.zip";
sha256 = "0y17shnlh90gg9226lraknvdnp2i71ck91dnxbbzvxl8b64v8v1p";
url = https://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/eclipse/downloads/drops4/R-4.7.1a-201710090410/org.eclipse.jdt-4.7.1a.zip;
sha256 = "1hpvpj8ghfk8aqbzfrpcxw3wxrczq6zd3bpx4sxjrsi926jsjaf4";
};

meta = with stdenv.lib; {
Expand Down
8 changes: 4 additions & 4 deletions pkgs/applications/editors/vscode/default.nix
Expand Up @@ -2,7 +2,7 @@
makeWrapper, libXScrnSaver, libxkbfile, libsecret }:

let
version = "1.17.1";
version = "1.17.2";
channel = "stable";

plat = {
Expand All @@ -12,9 +12,9 @@ let
}.${stdenv.system};

sha256 = {
"i686-linux" = "09nvibfn2z5cxjcdxqa2xy63jqwpvfgk7hdy1pc0mnpszz6kn4v7";
"x86_64-linux" = "1fb3hil7dggnz7hks1i806ckd3wl5g0a2syjdbh9dx5iqarp2782";
"x86_64-darwin" = "1vgbsmbcsdxc0h0ny61a3rhbwxzrfzkxl47sy3w410xcqlv8ad2v";
"i686-linux" = "04mnj74pqkgfgdacq4643qrd7ybka1366lr7mwn0f70lk05wb2h2";
"x86_64-linux" = "0y37wwvq6flaa2fh2r6b9cplbcszq726zrx6b8slzq6s5wl2lgmr";
"x86_64-darwin" = "1cqyir7ijwafy68d5vbw47cs1x2lqs1wjnvhhw15yi2d7c14fq7q";
}.${stdenv.system};

archive_fmt = if stdenv.system == "x86_64-darwin" then "zip" else "tar.gz";
Expand Down

This file was deleted.

0 comments on commit 52350b5

Please sign in to comment.