summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/cac-api/cac.pem88
-rw-r--r--krebs/5pkgs/cac-api/default.nix42
-rw-r--r--krebs/5pkgs/cac-panel/default.nix18
-rw-r--r--krebs/5pkgs/cac/default.nix39
-rw-r--r--krebs/5pkgs/cacpanel/default.nix18
-rw-r--r--krebs/5pkgs/get/default.nix6
-rw-r--r--krebs/5pkgs/lentil/default.nix15
-rw-r--r--krebs/5pkgs/lentil/syntaxes.patch11
-rw-r--r--krebs/5pkgs/much/default.nix2
-rw-r--r--krebs/5pkgs/test/infest-cac-centos7/default.nix4
-rwxr-xr-xkrebs/5pkgs/test/infest-cac-centos7/notes32
-rw-r--r--krebs/5pkgs/urlwatch/default.nix39
-rw-r--r--krebs/5pkgs/with-tmpdir/default.nix29
13 files changed, 238 insertions, 105 deletions
diff --git a/krebs/5pkgs/cac-api/cac.pem b/krebs/5pkgs/cac-api/cac.pem
new file mode 100644
index 000000000..9d02b6bcf
--- /dev/null
+++ b/krebs/5pkgs/cac-api/cac.pem
@@ -0,0 +1,88 @@
+-----BEGIN CERTIFICATE-----
+MIIFWzCCBEOgAwIBAgIQXWIKGWRZf838+wW1zLdK0DANBgkqhkiG9w0BAQsFADCBkDELMAkGA1UE
+BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG
+A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNjA0BgNVBAMTLUNPTU9ETyBSU0EgRG9tYWluIFZhbGlk
+YXRpb24gU2VjdXJlIFNlcnZlciBDQTAeFw0xNTEwMjMwMDAwMDBaFw0xODEwMjIyMzU5NTlaMF8x
+ITAfBgNVBAsTGERvbWFpbiBDb250cm9sIFZhbGlkYXRlZDEeMBwGA1UECxMVRXNzZW50aWFsU1NM
+IFdpbGRjYXJkMRowGAYDVQQDDBE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oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp
+pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA
+zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq
+ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52
+7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I
+LaZRfyHBNVOFBkpdn627G190
+-----END CERTIFICATE-----
diff --git a/krebs/5pkgs/cac-api/default.nix b/krebs/5pkgs/cac-api/default.nix
new file mode 100644
index 000000000..331b0853f
--- /dev/null
+++ b/krebs/5pkgs/cac-api/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, fetchgit, bc, coreutils, curl, dash, gnused, inotifyTools, jq, ncurses, openssh, sshpass, ... }:
+
+stdenv.mkDerivation {
+ name = "cac-api-1.1.0";
+
+ src = fetchgit {
+ url = http://cgit.cd.krebsco.de/cac-api;
+ rev = "0809fae379239687ed1170e04311dc2880ef0aba";
+ sha256 = "357ced27c9ed88028967c934178a1d230bf38617a7494cd4632fabdd2a04fcdd";
+ };
+
+ phases = [
+ "unpackPhase"
+ "installPhase"
+ ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+ { cat <<\EOF
+ #! ${dash}/bin/dash
+ export PATH=${stdenv.lib.makeSearchPath "bin" [
+ bc
+ coreutils
+ curl
+ gnused
+ inotifyTools
+ jq
+ ncurses
+ openssh
+ sshpass
+ ]}
+ EOF
+ # [1]: Disable fetching tasks; listtasks is currently broken:
+ # Unknown column 'iod.apitask.cid' in 'field list'
+ sed '
+ /^\s*tasks \\$/d; # [1]
+ s|\<_cac_exec curl|<${./cac.pem} & --cacert /dev/stdin|
+ ' cac-api
+ } > $out/bin/cac-api
+ chmod +x $out/bin/cac-api
+ '';
+}
diff --git a/krebs/5pkgs/cac-panel/default.nix b/krebs/5pkgs/cac-panel/default.nix
new file mode 100644
index 000000000..fd4799535
--- /dev/null
+++ b/krebs/5pkgs/cac-panel/default.nix
@@ -0,0 +1,18 @@
+{pkgs, python3Packages, ...}:
+
+python3Packages.buildPythonPackage rec {
+ name = "cac-panel-${version}";
+ version = "0.4.4";
+
+ src = pkgs.fetchurl {
+ url = "https://pypi.python.org/packages/source/c/cac-panel/cac-panel-${version}.tar.gz";
+ sha256 = "16bx67fsbgwxciik42jhdnfzxx1xp5b0rimzrif3r7h4fawlnld8";
+ };
+
+ propagatedBuildInputs = with python3Packages; [
+ docopt
+ requests2
+ beautifulsoup4
+ ];
+}
+
diff --git a/krebs/5pkgs/cac/default.nix b/krebs/5pkgs/cac/default.nix
deleted file mode 100644
index 4d39ce2fb..000000000
--- a/krebs/5pkgs/cac/default.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{ stdenv, fetchgit, bc, coreutils, curl, gnused, inotifyTools, jq, ncurses, sshpass, ... }:
-
-stdenv.mkDerivation {
- name = "cac-1.0.3";
-
- src = fetchgit {
- url = http://cgit.cd.retiolum/cac;
- rev = "22acc1b990ac7d97c16344fbcbc2621e24cdf915";
- sha256 = "135b740617c983b3f46a1983d4744be17340d5146a0a0de0dff4bb7a53688f2f";
- };
-
- phases = [
- "unpackPhase"
- "installPhase"
- ];
-
- installPhase =
- let
- path = stdenv.lib.makeSearchPath "bin" [
- bc
- coreutils
- curl
- gnused
- inotifyTools
- jq
- ncurses
- sshpass
- ];
- in
- ''
- mkdir -p $out/bin
-
- sed < ./cac > $out/bin/cac '
- s;^_cac_main .*;PATH=${path}''${PATH+:$PATH} &;
- '
-
- chmod +x $out/bin/cac
- '';
-}
diff --git a/krebs/5pkgs/cacpanel/default.nix b/krebs/5pkgs/cacpanel/default.nix
deleted file mode 100644
index 3df4dffed..000000000
--- a/krebs/5pkgs/cacpanel/default.nix
+++ /dev/null
@@ -1,18 +0,0 @@
-{pkgs, python3Packages, ...}:
-
-python3Packages.buildPythonPackage rec {
- name = "cacpanel-${version}";
- version = "0.2.3";
-
- src = pkgs.fetchurl {
- url = "https://pypi.python.org/packages/source/c/cacpanel/cacpanel-${version}.tar.gz";
- sha256 = "1fib7416qqv8yzrj75kxra7ccpz9abqh58b6gkaavws2fa6m3mm8";
- };
-
- propagatedBuildInputs = with python3Packages; [
- docopt
- requests2
- beautifulsoup4
- ];
-}
-
diff --git a/krebs/5pkgs/get/default.nix b/krebs/5pkgs/get/default.nix
index 9a0192aab..13cdeca96 100644
--- a/krebs/5pkgs/get/default.nix
+++ b/krebs/5pkgs/get/default.nix
@@ -1,12 +1,12 @@
{ coreutils, gnugrep, gnused, fetchgit, jq, nix, stdenv, ... }:
stdenv.mkDerivation {
- name = "get-1.3.1";
+ name = "get-1.4.0";
src = fetchgit {
url = http://cgit.cd.krebsco.de/get;
- rev = "64c97edd3f9952cd5e703208c46748a035a515bf";
- sha256 = "32ca83f4fd86fd3285bef9dcfd0917308086d239189858daceca175de49ff97c";
+ rev = "08757d47c480c130d69270855c6c0371f6b7d385";
+ sha256 = "7c609e2cde7a071bbf62241a7bea60313fdbf076b9f7b3d97226417e13e5ba9d";
};
phases = [
diff --git a/krebs/5pkgs/lentil/default.nix b/krebs/5pkgs/lentil/default.nix
deleted file mode 100644
index 8a57a77fe..000000000
--- a/krebs/5pkgs/lentil/default.nix
+++ /dev/null
@@ -1,15 +0,0 @@
-{ pkgs, ... }:
-
-(pkgs.haskellPackages.override {
- overrides = self: super: {
- lentil = super.lentil.override {
- mkDerivation = (attrs: self.mkDerivation (attrs // {
- version = "0.1.3.0";
- sha256 = "0xa59avh0bvfg69xh9p5b8dppfhx29mvfq8v41sk9j7qbcnzjivg";
- patches = [
- ./syntaxes.patch
- ];
- }));
- };
- };
-}).lentil
diff --git a/krebs/5pkgs/lentil/syntaxes.patch b/krebs/5pkgs/lentil/syntaxes.patch
deleted file mode 100644
index a9390ae51..000000000
--- a/krebs/5pkgs/lentil/syntaxes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -rN -u old-lentil/src/Lentil/Parse/Syntaxes.hs new-lentil/src/Lentil/Parse/Syntaxes.hs
---- old-lentil/src/Lentil/Parse/Syntaxes.hs 2015-07-20 23:15:38.600539779 +0200
-+++ new-lentil/src/Lentil/Parse/Syntaxes.hs 2015-07-20 23:15:38.600539779 +0200
-@@ -30,6 +30,7 @@
- | ext `elem` [".pas", ".pp", ".inc"] = Just pascal
- | ext `elem` [".py"] = Just python
- | ext `elem` [".rb"] = Just ruby
-+ | ext `elem` [".nix"] = Just perl -- Nix
- | ext `elem` [".pl", ".pm", ".t"] = Just perl
- | ext `elem` [".sh"] = Just perl -- shell
- | ext `elem` [".txt"] = Just text
diff --git a/krebs/5pkgs/much/default.nix b/krebs/5pkgs/much/default.nix
index 2a9376139..efe84fbf0 100644
--- a/krebs/5pkgs/much/default.nix
+++ b/krebs/5pkgs/much/default.nix
@@ -1,6 +1,6 @@
{ pkgs, ... }:
-pkgs.haskellngPackages.callPackage (
+pkgs.haskellPackages.callPackage (
{ mkDerivation, aeson, attoparsec, base, base64-bytestring
, blaze-builder, blessings, bytestring, case-insensitive, containers, deepseq
, directory, docopt, email-header, fetchgit, filepath
diff --git a/krebs/5pkgs/test/infest-cac-centos7/default.nix b/krebs/5pkgs/test/infest-cac-centos7/default.nix
index 886e250e2..f7b2a5a08 100644
--- a/krebs/5pkgs/test/infest-cac-centos7/default.nix
+++ b/krebs/5pkgs/test/infest-cac-centos7/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, coreutils,makeWrapper, cac, cacpanel, gnumake, gnused, jq, openssh, ... }:
+{ stdenv, coreutils,makeWrapper, cac-api, cacpanel, gnumake, gnused, jq, openssh, ... }:
stdenv.mkDerivation rec {
name = "${shortname}-${version}";
@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
path = stdenv.lib.makeSearchPath "bin" [
coreutils
- cac
+ cac-api
cacpanel
gnumake
gnused
diff --git a/krebs/5pkgs/test/infest-cac-centos7/notes b/krebs/5pkgs/test/infest-cac-centos7/notes
index 6bfb6906e..7b9cbb46f 100755
--- a/krebs/5pkgs/test/infest-cac-centos7/notes
+++ b/krebs/5pkgs/test/infest-cac-centos7/notes
@@ -1,6 +1,6 @@
#! /bin/sh
-# nix-shell -p gnumake jq openssh cac cacpanel
+# nix-shell -p gnumake jq openssh cac-api cacpanel
set -eufx
# 2 secrets are required:
@@ -47,15 +47,15 @@ export cac_secrets=$sec_file
cac-cli --config $krebs_cred panel add-api-ip
# test login:
-cac update
-cac servers
+cac-api update
+cac-api servers
# preserve old trap
old_trapstr=$(clear_defer)
while true;do
# Template 26: CentOS7
- # TODO: use cac templates to determine the real Centos7 template in case it changes
- out=$(cac build cpu=1 ram=512 storage=10 os=26 2>&1)
+ # TODO: use cac-api templates to determine the real Centos7 template in case it changes
+ out=$(cac-api build cpu=1 ram=512 storage=10 os=26 2>&1)
if name=$(echo "$out" | jq -r .servername);then
id=servername:$name
echo "got a working machine, id=$id"
@@ -67,15 +67,15 @@ while true;do
fi
clear_defer >/dev/null
- defer "cac delete $id"
+ defer "cac-api delete $id"
# TODO: timeout?
wait_login_cac(){
# we wait for 30 minutes
for t in `seq 180`;do
- # now we have a working cac server
- if cac ssh $1 -o ConnectTimeout=10 \
+ # now we have a working cac-api server
+ if cac-api ssh $1 -o ConnectTimeout=10 \
cat /etc/redhat-release | \
grep CentOS ;then
return 0
@@ -87,7 +87,7 @@ while true;do
# die on timeout
if ! wait_login_cac $id;then
echo "unable to boot a working system within time frame, retrying..." >&2
- echo "Cleaning up old image,last status: $(cac update;cac getserver $id | jq -r .status)"
+ echo "Cleaning up old image,last status: $(cac-api update;cac-api getserver $id | jq -r .status)"
eval "$(clear_defer | sed 's/;exit//')"
sleep 15
else
@@ -96,17 +96,17 @@ while true;do
fi
done
clear_defer >/dev/null
-defer "cac delete $id;$old_trapstr"
+defer "cac-api delete $id;$old_trapstr"
mkdir -p shared/2configs/temp
-cac generatenetworking $id > \
+cac-api generatenetworking $id > \
shared/2configs/temp/networking.nix
# new temporary ssh key we will use to log in after infest
ssh-keygen -f $krebs_ssh -N ""
cp $retiolum_key $krebs_secrets/retiolum.rsa_key.priv
# we override the directories for secrets and stockholm
# additionally we set the ssh key we generated
-ip=$(cac getserver $id | jq -r .ip)
+ip=$(cac-api getserver $id | jq -r .ip)
cat > shared/2configs/temp/dirs.nix <<EOF
_: {
@@ -123,18 +123,18 @@ EOF
LOGNAME=shared make eval get=krebs.infest \
target=derp system=test-centos7 filter=json \
- | sed -e "s#^ssh.*<<#cac ssh $id<<#" \
- -e "/^rsync/a -e 'cac ssh $id' \\\\" \
+ | sed -e "s#^ssh.*<<#cac-api ssh $id<<#" \
+ -e "/^rsync/a -e 'cac-api ssh $id' \\\\" \
-e "s#root.derp:#:#" > $krebs_secrets/infest
sh -x $krebs_secrets/infest
# TODO: generate secrets directory $krebs_secrets for nix import
-cac powerop $id reset
+cac-api powerop $id reset
wait_login(){
# timeout
for t in `seq 90`;do
- # now we have a working cac server
+ # now we have a working cac-api server
if ssh -o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-i $krebs_ssh \
diff --git a/krebs/5pkgs/urlwatch/default.nix b/krebs/5pkgs/urlwatch/default.nix
new file mode 100644
index 000000000..d9b595314
--- /dev/null
+++ b/krebs/5pkgs/urlwatch/default.nix
@@ -0,0 +1,39 @@
+{ stdenv, fetchurl, python3Packages }:
+
+python3Packages.buildPythonPackage rec {
+ name = "urlwatch-2.0";
+
+ src = fetchurl {
+ url = "https://thp.io/2008/urlwatch/${name}.tar.gz";
+ sha256 = "0j38qzw4jxw41vnnpi6j851hqpv8d6p1cbni6cv8r2vqf5307s3b";
+ };
+
+ propagatedBuildInputs = with python3Packages; [
+ pyyaml
+ keyring
+ (python3Packages.buildPythonPackage rec {
+ name = "minidb-2.0.1";
+ src = fetchurl {
+ url = "https://thp.io/2010/minidb/${name}.tar.gz";
+ sha256 = "1x958zr9jc26vaqij451qb9m2l7apcpz34ir9fwfjg4fwv24z2dy";
+ };
+ meta = {
+ description = "A simple SQLite3-based store for Python objects";
+ homepage = https://thp.io/2010/minidb/;
+ license = stdenv.lib.licenses.isc;
+ maintainers = [ stdenv.lib.maintainers.tv ];
+ };
+ })
+ ];
+
+ postFixup = ''
+ wrapProgram "$out/bin/urlwatch" --prefix "PYTHONPATH" : "$PYTHONPATH"
+ '';
+
+ meta = {
+ description = "A tool for monitoring webpages for updates";
+ homepage = https://thp.io/2008/urlwatch/;
+ license = stdenv.lib.licenses.bsd3;
+ maintainers = [ stdenv.lib.maintainers.tv ];
+ };
+}#
diff --git a/krebs/5pkgs/with-tmpdir/default.nix b/krebs/5pkgs/with-tmpdir/default.nix
new file mode 100644
index 000000000..517e46310
--- /dev/null
+++ b/krebs/5pkgs/with-tmpdir/default.nix
@@ -0,0 +1,29 @@
+{ stdenv, fetchgit, coreutils, dash, ... }:
+
+stdenv.mkDerivation {
+ name = "with-tmpdir-1";
+
+ src = fetchgit {
+ url = http://cgit.cd.krebsco.de/with-tmpdir;
+ rev = "3243c02ed8cd27a04c080bd39560204980f6c16a";
+ sha256 = "80ee6cafb2c337999ddcd1e41747d6256b7cfcea605358c2046eb7e3729555c6";
+ };
+
+ phases = [
+ "unpackPhase"
+ "installPhase"
+ ];
+
+ installPhase = ''
+ mkdir -p $out/bin
+
+ { echo '#! ${dash}/bin/dash'
+ echo 'OLDPATH=$PATH'
+ echo 'PATH=${coreutils}/bin'
+ sed '$s/^/#/' ./with-tmpdir
+ echo '(PATH=$OLDPATH; exec "$@")'
+ } > $out/bin/with-tmpdir
+
+ chmod +x $out/bin/with-tmpdir
+ '';
+}