summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-12-26 10:45:50 +0100
committerlassulus <lass@aidsballs.de>2015-12-26 10:45:50 +0100
commit7aacc397241cc62e88d23d253533fb7d83548b9d (patch)
tree15710b35b6ea4d14f7481fbc41be69eb794c10b0
parent6733fa66b46f0d00b7016a92f4ef093ccb7b7a2b (diff)
parentcef2be532b0cc76071b0b3515fc71214b37591f0 (diff)
Merge remote-tracking branch 'gum/master'
-rw-r--r--krebs/3modules/Reaktor.nix11
-rw-r--r--krebs/5pkgs/Reaktor/plugins.nix38
-rw-r--r--krebs/5pkgs/Reaktor/scripts/random-emoji.sh6
-rw-r--r--krebs/5pkgs/cacpanel/default.nix4
-rw-r--r--krebs/5pkgs/default.nix2
-rwxr-xr-xkrebs/5pkgs/test/infest-cac-centos7/notes4
-rw-r--r--makefu/1systems/gum.nix3
-rw-r--r--makefu/1systems/pnp.nix3
-rw-r--r--makefu/2configs/urlwatch.nix2
-rw-r--r--shared/2configs/base.nix2
-rw-r--r--shared/2configs/buildbot-standalone.nix7
11 files changed, 70 insertions, 12 deletions
diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix
index 0fca52203..59058bffc 100644
--- a/krebs/3modules/Reaktor.nix
+++ b/krebs/3modules/Reaktor.nix
@@ -51,6 +51,14 @@ let
configuration appended to the default or overridden configuration
'';
};
+
+ workdir = mkOption {
+ default = "/var/lib/Reaktor";
+ type = types.str;
+ description = ''
+ Reaktor working directory
+ '';
+ };
extraEnviron = mkOption {
default = {};
type = types.attrsOf types.str;
@@ -79,7 +87,7 @@ let
name = "Reaktor";
uid = genid name;
description = "Reaktor user";
- home = "/var/lib/Reaktor";
+ home = cfg.workdir;
createHome = true;
};
@@ -101,6 +109,7 @@ let
GIT_SSL_CAINFO = "${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt";
REAKTOR_NICKNAME = cfg.nickname;
REAKTOR_DEBUG = (if cfg.debug then "True" else "False");
+ state_dir = cfg.workdir;
} // cfg.extraEnviron;
serviceConfig= {
ExecStartPre = pkgs.writeScript "Reaktor-init" ''
diff --git a/krebs/5pkgs/Reaktor/plugins.nix b/krebs/5pkgs/Reaktor/plugins.nix
new file mode 100644
index 000000000..05ede38e1
--- /dev/null
+++ b/krebs/5pkgs/Reaktor/plugins.nix
@@ -0,0 +1,38 @@
+{ stdenv, lib, pkgs, makeWrapper }:
+
+rec {
+ buildReaktorPlugin = { name
+ # TODO: profiles
+ , extraConfig
+ , phases ? []
+ , ... } @ attrs:
+ stdenv.mkDerivation (attrs // {
+ name = "Reaktor-plugin-" + name;
+ phases = phases ++ [ "installPhase" ];
+ isReaktorPlugin = true;
+ });
+
+ random-emoji = buildReaktorPlugin rec {
+ name = "random-emoji";
+ src = ./scripts/random-emoji.sh;
+ phases = [ "installPhase" ];
+ buildInputs = [ makeWrapper ];
+ installPhase = ''
+ mkdir -p $out/bin
+ install -vm 755 ${src} $out/bin/random-emoji.sh
+ wrapProgram $out/bin/random-emoji.sh \
+ --prefix PATH : ${lib.makeSearchPath "bin" (with pkgs; [
+ coreutils
+ gnused
+ gnugrep
+ xmlstarlet
+ curl])};
+ '';
+ extraConfig = ''
+ public_commands.insert(0,{
+ 'capname' : "emoji",
+ 'pattern' : indirect_pattern.format("emoji"),
+ 'argv' : ["random-emoji.sh"])
+ '';
+ };
+}
diff --git a/krebs/5pkgs/Reaktor/scripts/random-emoji.sh b/krebs/5pkgs/Reaktor/scripts/random-emoji.sh
new file mode 100644
index 000000000..386aa68b9
--- /dev/null
+++ b/krebs/5pkgs/Reaktor/scripts/random-emoji.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+curl http://emojicons.com/random -s | \
+ grep data-text | \
+ sed -n 's/.*>\(.*\)<\/textarea>/\1/p' | \
+ head -n 1 | \
+ xmlstarlet unesc
diff --git a/krebs/5pkgs/cacpanel/default.nix b/krebs/5pkgs/cacpanel/default.nix
index 3e3e2e1fc..3df4dffed 100644
--- a/krebs/5pkgs/cacpanel/default.nix
+++ b/krebs/5pkgs/cacpanel/default.nix
@@ -2,11 +2,11 @@
python3Packages.buildPythonPackage rec {
name = "cacpanel-${version}";
- version = "0.2.1";
+ version = "0.2.3";
src = pkgs.fetchurl {
url = "https://pypi.python.org/packages/source/c/cacpanel/cacpanel-${version}.tar.gz";
- sha256 = "1zaazg5r10kgva32zh4fhpw6l6h51ijkwpa322na0kh4x6f6aqj3";
+ sha256 = "1fib7416qqv8yzrj75kxra7ccpz9abqh58b6gkaavws2fa6m3mm8";
};
propagatedBuildInputs = with python3Packages; [
diff --git a/krebs/5pkgs/default.nix b/krebs/5pkgs/default.nix
index 0562fe836..c4b1dafe4 100644
--- a/krebs/5pkgs/default.nix
+++ b/krebs/5pkgs/default.nix
@@ -26,6 +26,8 @@ subdirs // rec {
inherit (subdirs) get jq;
};
+ ReaktorPlugins = pkgs.callPackage ./Reaktor/plugins.nix {};
+
execve = name: { filename, argv, envp ? {}, destination ? "" }:
writeC name { inherit destination; } ''
#include <unistd.h>
diff --git a/krebs/5pkgs/test/infest-cac-centos7/notes b/krebs/5pkgs/test/infest-cac-centos7/notes
index 5bb5de2c4..cfb074423 100755
--- a/krebs/5pkgs/test/infest-cac-centos7/notes
+++ b/krebs/5pkgs/test/infest-cac-centos7/notes
@@ -29,11 +29,11 @@ trap "$TRAP" INT TERM EXIT
cat > $sec_file <<EOF
cac_login="$(jq -r .email $krebs_cred)"
-cac_key="$(cac-cli panel --config $krebs_cred settings | jq -r .apicode)"
+cac_key="$(cac-cli --config $krebs_cred panel settings | jq -r .apicode)"
EOF
export cac_secrets=$sec_file
-cac-cli panel --config $krebs_cred update-api-ip
+cac-cli --config $krebs_cred panel add-api-ip
# test login:
cac update
diff --git a/makefu/1systems/gum.nix b/makefu/1systems/gum.nix
index 417a020fa..93fb3dc3a 100644
--- a/makefu/1systems/gum.nix
+++ b/makefu/1systems/gum.nix
@@ -15,6 +15,9 @@ in {
../2configs/git/cgit-retiolum.nix
../2configs/mattermost-docker.nix
../2configs/nginx/euer.test.nix
+
+ ../2configs/exim-retiolum.nix
+ ../2configs/urlwatch.nix
];
diff --git a/makefu/1systems/pnp.nix b/makefu/1systems/pnp.nix
index 161bfa3e9..a1b73c0c9 100644
--- a/makefu/1systems/pnp.nix
+++ b/makefu/1systems/pnp.nix
@@ -28,9 +28,6 @@
../2configs/Reaktor/titlebot.nix
../2configs/Reaktor/shack-correct.nix
- ../2configs/exim-retiolum.nix
- ../2configs/urlwatch.nix
-
# ../2configs/graphite-standalone.nix
];
krebs.urlwatch.verbose = true;
diff --git a/makefu/2configs/urlwatch.nix b/makefu/2configs/urlwatch.nix
index cd05f0114..eadffa7dd 100644
--- a/makefu/2configs/urlwatch.nix
+++ b/makefu/2configs/urlwatch.nix
@@ -12,7 +12,7 @@
http://git.sysphere.org/vicious/log/?qt=grep&q=Next+release
https://pypi.python.org/simple/bepasty/
https://pypi.python.org/simple/xstatic/
-
+ http://cvs2svn.tigris.org/servlets/ProjectDocumentList?folderID=2976
];
};
}
diff --git a/shared/2configs/base.nix b/shared/2configs/base.nix
index 0ce336558..4d509d7a6 100644
--- a/shared/2configs/base.nix
+++ b/shared/2configs/base.nix
@@ -19,6 +19,7 @@ with lib;
git.nixpkgs = {
url = https://github.com/NixOS/nixpkgs;
rev = "6d31e9b81dcd4ab927bb3dc91b612dd5abfa2f80";
+ target-path = "/var/src/nixpkgs";
};
dir.secrets = {
host = config.krebs.current.host;
@@ -27,6 +28,7 @@ with lib;
dir.stockholm = {
host = config.krebs.current.host;
path = mkDefault "${getEnv "HOME"}/stockholm";
+ target-path = "/var/src/stockholm";
};
};
diff --git a/shared/2configs/buildbot-standalone.nix b/shared/2configs/buildbot-standalone.nix
index baab059c9..51c600329 100644
--- a/shared/2configs/buildbot-standalone.nix
+++ b/shared/2configs/buildbot-standalone.nix
@@ -6,11 +6,11 @@ in {
buildbot = pkgs-unst.buildbot;
buildbot-slave = pkgs-unst.buildbot-slave;
};
- networking.firewall.allowedTCPPorts = [ 8010 ];
+ networking.firewall.allowedTCPPorts = [ 8010 9989 ];
krebs.buildbot.master = {
slaves = {
testslave = "krebspass";
- testslave2 = "krebspass";
+ omo = "krebspass";
};
change_source.stockholm = ''
stockholm_repo = 'http://cgit.gum/stockholm'
@@ -33,7 +33,7 @@ in {
name="fast-master-test",
builderNames=["fast-tests"]))
'';
- full-master-scheduler = ''
+ test-cac-infest-master = ''
# files everyone depends on or are part of the share branch
def shared_files(change):
r =re.compile("^((krebs|shared)/.*|Makefile|default.nix)")
@@ -45,6 +45,7 @@ in {
sched.append(schedulers.SingleBranchScheduler(
change_filter=util.ChangeFilter(branch="master"),
fileIsImportant=shared_files,
+ treeStableTimer=60*60, # master was stable for the last hour
name="full-master-test",
builderNames=["full-tests"]))
'';