Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into staging
Browse files Browse the repository at this point in the history
  • Loading branch information
dezgeg committed Jan 29, 2017
2 parents bb8859b + 2f38d1f commit 424cfe7
Show file tree
Hide file tree
Showing 101 changed files with 3,218 additions and 1,768 deletions.
2 changes: 1 addition & 1 deletion lib/platforms.nix
Expand Up @@ -20,5 +20,5 @@ rec {
openbsd = ["i686-openbsd" "x86_64-openbsd"];
unix = linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos;

mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux"];
mesaPlatforms = ["i686-linux" "x86_64-linux" "x86_64-darwin" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux"];
}
89 changes: 89 additions & 0 deletions maintainers/scripts/hydra-eval-failures.py
@@ -0,0 +1,89 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python -p pythonFull pythonPackages.requests pythonPackages.pyquery pythonPackages.click

# To use, just execute this script with --help to display help.

import subprocess
import json

import click
import requests
from pyquery import PyQuery as pq


maintainers_json = subprocess.check_output([
'nix-instantiate',
'lib/maintainers.nix',
'--eval',
'--json'])
maintainers = json.loads(maintainers_json)
MAINTAINERS = {v: k for k, v in maintainers.iteritems()}


def get_response_text(url):
return pq(requests.get(url).text) # IO

EVAL_FILE = {
'nixos': 'nixos/release.nix',
'nixpkgs': 'pkgs/top-level/release.nix',
}


def get_maintainers(attr_name):
nixname = attr_name.split('.')
meta_json = subprocess.check_output([
'nix-instantiate',
'--eval',
'--strict',
'-A',
'.'.join(nixname[1:]) + '.meta',
EVAL_FILE[nixname[0]],
'--json'])
meta = json.loads(meta_json)
if meta.get('maintainers'):
return [MAINTAINERS[name] for name in meta['maintainers'] if MAINTAINERS.get(name)]


@click.command()
@click.option(
'--jobset',
default="nixos/release-16.09",
help='Hydra project like nixos/release-16.09')
def cli(jobset):
"""
Given a Hydra project, inspect latest evaluation
and print a summary of failed builds
"""

url = "http://hydra.nixos.org/jobset/{}".format(jobset)

# get the last evaluation
click.echo(click.style(
'Getting latest evaluation for {}'.format(url), fg='green'))
d = get_response_text(url)
evaluations = d('#tabs-evaluations').find('a[class="row-link"]')
latest_eval_url = evaluations[0].get('href')

# parse last evaluation page
click.echo(click.style(
'Parsing evaluation {}'.format(latest_eval_url), fg='green'))
d = get_response_text(latest_eval_url + '?full=1')

# TODO: aborted evaluations
# TODO: dependency failed without propagated builds
for tr in d('img[alt="Failed"]').parents('tr'):
a = pq(tr)('a')[1]
print "- [ ] [{}]({})".format(a.text, a.get('href'))

maintainers = get_maintainers(a.text)
if maintainers:
print " - maintainers: {}".format(", ".join(map(lambda u: '@' + u, maintainers)))
# TODO: print last three persons that touched this file
# TODO: pinpoint the diff that broke this build, or maybe it's transient or maybe it never worked?


if __name__ == "__main__":
try:
cli()
except:
import pdb;pdb.post_mortem()
9 changes: 8 additions & 1 deletion nixos/doc/manual/release-notes/rl-1703.xml
Expand Up @@ -46,7 +46,14 @@ following incompatible changes:</para>
for what those parameters represent.
</para>
</listitem>

<listitem>
<para>
<literal>ansible</literal> now defaults to ansible version 2 as version 1
has been removed due to a serious <link
xlink:href="https://www.computest.nl/advisories/CT-2017-0109_Ansible.txt">
vulnerability</link> unpatched by upstream.
</para>
</listitem>
<listitem>
<para>
<literal>gnome</literal> alias has been removed along with
Expand Down
2 changes: 2 additions & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -328,6 +328,7 @@
./services/monitoring/scollector.nix
./services/monitoring/smartd.nix
./services/monitoring/statsd.nix
./services/monitoring/sysstat.nix
./services/monitoring/systemhealth.nix
./services/monitoring/teamviewer.nix
./services/monitoring/telegraf.nix
Expand Down Expand Up @@ -521,6 +522,7 @@
./services/web-apps/atlassian/confluence.nix
./services/web-apps/atlassian/crowd.nix
./services/web-apps/atlassian/jira.nix
./services/web-apps/frab.nix
./services/web-apps/mattermost.nix
./services/web-apps/nixbot.nix
./services/web-apps/pump.io.nix
Expand Down
8 changes: 7 additions & 1 deletion nixos/modules/services/logging/fluentd.nix
Expand Up @@ -21,6 +21,12 @@ in {
default = "";
description = "Fluentd config.";
};

package = mkOption {
type = types.path;
default = pkgs.fluentd;
description = "The fluentd package to use.";
};
};
};

Expand All @@ -32,7 +38,7 @@ in {
description = "Fluentd Daemon";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.fluentd}/bin/fluentd -c ${pkgs.writeText "fluentd.conf" cfg.config}";
ExecStart = "${cfg.package}/bin/fluentd -c ${pkgs.writeText "fluentd.conf" cfg.config}";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
};
};
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/services/monitoring/arbtt.nix
Expand Up @@ -49,7 +49,7 @@ in {
config = mkIf cfg.enable {
systemd.user.services.arbtt = {
description = "arbtt statistics capture service";
wantedBy = [ "multi-user.target" ];
wantedBy = [ "default.target" ];

serviceConfig = {
Type = "simple";
Expand Down
20 changes: 8 additions & 12 deletions nixos/modules/services/system/dbus.nix
Expand Up @@ -31,9 +31,6 @@ let
cp ${pkgs.dbus.out}/share/dbus-1/{system,session}.conf $out
# avoid circular includes
sed -ri 's@(<include ignore_missing="yes">/etc/dbus-1/(system|session)\.conf</include>)@<!-- \1 -->@g' $out/{system,session}.conf
# include by full path
sed -ri "s@/etc/dbus-1/(system|session)-@$out/\1-@" $out/{system,session}.conf
Expand Down Expand Up @@ -98,11 +95,6 @@ in

environment.systemPackages = [ pkgs.dbus.daemon pkgs.dbus ];

environment.etc = singleton
{ source = configDir;
target = "dbus-1";
};

users.extraUsers.messagebus = {
uid = config.ids.uids.messagebus;
description = "D-Bus system message bus daemon user";
Expand Down Expand Up @@ -134,8 +126,8 @@ in
reloadIfChanged = true;
restartTriggers = [ configDir ];
serviceConfig.ExecStart = [
""
"${lib.getBin pkgs.dbus}/bin/dbus-daemon --config-file=${configDir}/system.conf ${daemonArgs}"
"" # Default dbus.service has two entries, we need to override both.
"${lib.getBin pkgs.dbus}/bin/dbus-daemon --config-file=/run/current-system/dbus/system.conf ${daemonArgs}"
];
};

Expand All @@ -145,13 +137,17 @@ in
reloadIfChanged = true;
restartTriggers = [ configDir ];
serviceConfig.ExecStart = [
""
"${lib.getBin pkgs.dbus}/bin/dbus-daemon --config-file=${configDir}/session.conf ${daemonArgs}"
"" # Default dbus.service has two entries, we need to override both.
"${lib.getBin pkgs.dbus}/bin/dbus-daemon --config-file=/run/current-system/dbus/session.conf ${daemonArgs}"
];
};
sockets.dbus.wantedBy = mkIf cfg.socketActivated [ "sockets.target" ];
};

environment.pathsToLink = [ "/etc/dbus-1" "/share/dbus-1" ];

system.extraSystemBuilderCmds = ''
ln -s ${configDir} $out/dbus
'';
};
}

0 comments on commit 424cfe7

Please sign in to comment.