git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #29073 from Mic92/mongodb/2.4.8

mfi-controller: remove

commit56ccd27dee7bd44c9a660274a82d05d92f94c214 authorJörg Thalheim <Mic92@users.noreply.github.com> dateThu 7 Sep 2017, 20:31 (9 years ago) parentf66ed306b6ffd5
6 files changed−211
nixos/modules/misc/ids.nix−2 nixos/modules/services/networking/mfi.nix−100 pkgs/development/libraries/v8/3.14.nix−28 pkgs/servers/mfi/default.nix−28 pkgs/servers/nosql/mongodb/2.4.8.nix−45 pkgs/top-level/all-packages.nix−8
nixos/modules/misc/ids.nix−2
@@ -254,7 +254,6 @@
254254 hydra-queue-runner = 235;
255255 hydra-www = 236;
256256 syncthing = 237;
257− mfi = 238;
258257 caddy = 239;
259258 taskd = 240;
260259 factorio = 241;
@@ -522,7 +521,6 @@
522521 octoprint = 230;
523522 radicale = 234;
524523 syncthing = 237;
525− #mfi = 238; # unused
526524 caddy = 239;
527525 taskd = 240;
528526 factorio = 241;
nixos/modules/services/networking/mfi.nixdeleted−100
@@ -1,100 +0,0 @@
1−{ config, lib, pkgs, utils, ... }:
2−with lib;
3−let
4− name = "Ubiquiti mFi Controller";
5− cfg = config.services.mfi;
6− stateDir = "/var/lib/mfi";
7− # XXX 2 runtime exceptions using jre8: JSPException on GET / ; can't initialize ./data/keystore on first run.
8− cmd = "@${pkgs.jre7}/bin/java java -jar ${stateDir}/lib/ace.jar";
9− mountPoints = [
10− { what = "${pkgs.mfi}/dl"; where = "${stateDir}/dl"; }
11− { what = "${pkgs.mfi}/lib"; where = "${stateDir}/lib"; }
12− { what = "${pkgs.mongodb248}/bin"; where = "${stateDir}/bin"; }
13− { what = "${cfg.dataDir}"; where = "${stateDir}/data"; }
14− ];
15− systemdMountPoints = map (m: "${utils.escapeSystemdPath m.where}.mount") mountPoints;
16− ports = [ 6080 6880 6443 6843 ];
17−in
18−{
19− options = {
20− services.mfi = {
21− enable = mkEnableOption name;
22− openPorts = mkOption {
23− type = types.bool;
24− default = true;
25− description = "Whether to open TCP ports ${concatMapStrings (a: "${toString a} ") ports}for the services.";
26− };
27− dataDir = mkOption {
28− type = types.str;
29− default = "${stateDir}/data";
30− description = ''
31− Where to store the database and other data.
32−
33− This directory will be bind-mounted to ${stateDir}/data as part of the service startup.
34− '';
35− };
36− };
37− };
38−
39− config = mkIf cfg.enable {
40−
41− networking.firewall.allowedTCPPorts = mkIf config.services.mfi.openPorts ports;
42−
43− users.users.mfi = {
44− uid = config.ids.uids.mfi;
45− description = "mFi controller daemon user";
46− home = "${stateDir}";
47− };
48−
49− # We must create the binary directories as bind mounts instead of symlinks
50− # This is because the controller resolves all symlinks to absolute paths
51− # to be used as the working directory.
52− systemd.mounts = map ({ what, where }: {
53− bindsTo = [ "mfi.service" ];
54− partOf = [ "mfi.service" ];
55− unitConfig.RequiresMountsFor = stateDir;
56− options = "bind";
57− what = what;
58− where = where;
59− }) mountPoints;
60−
61− systemd.services.mfi = {
62− description = "mFi controller daemon";
63− wantedBy = [ "multi-user.target" ];
64− after = [ "network.target" ] ++ systemdMountPoints;
65− partOf = systemdMountPoints;
66− bindsTo = systemdMountPoints;
67− unitConfig.RequiresMountsFor = stateDir;
68−
69− preStart = ''
70− # Clear ./webapps each run.
71− rm -rf "${stateDir}/webapps"
72− mkdir -p "${stateDir}/webapps"
73− ln -s "${pkgs.mfi}/webapps/ROOT.war" "${stateDir}/webapps"
74−
75− # Copy initial config only once.
76− test -e "${stateDir}/conf" || cp -ar "${pkgs.mfi}/conf" "${stateDir}/conf"
77− test -e "${stateDir}/data" || cp -ar "${pkgs.mfi}/data" "${stateDir}/data"
78−
79− # Fix Permissions.
80− # (Bind-mounts cause errors; ignore exit codes)
81− chown -fR mfi: "${stateDir}" || true
82− chmod -fR u=rwX,go= "${stateDir}" || true
83− '';
84−
85− postStop = ''
86− rm -rf "${stateDir}/webapps"
87− '';
88−
89− serviceConfig = {
90− Type = "simple";
91− ExecStart = "${cmd} start";
92− ExecStop = "${cmd} stop";
93− User = "mfi";
94− PermissionsStartOnly = true;
95− UMask = "0077";
96− WorkingDirectory = "${stateDir}";
97− };
98− };
99− };
100−}
pkgs/development/libraries/v8/3.14.nixdeleted−28
@@ -1,28 +0,0 @@
1−{ stdenv, callPackage, fetchFromGitHub, python, ... } @ args:
2−with stdenv.lib;
3−let
4− version = "3.14.5.10";
5− sha256 = "08vhl84166x13b3cbx8y0g99yqx772zd33gawsa1nxqkyrykql6k";
6−in
7−(callPackage ./generic.nix (args // {
8− inherit version sha256;
9−})).overrideDerivation (oldAttrs:{
10− patchPhase = [
11− oldAttrs.patchPhase
12− "sed -i 's,#!/usr/bin/python,#!${python}/bin/python,' build/gyp_v8"
13− ];
14−
15− # http://code.google.com/p/v8/issues/detail?id=2149
16− NIX_CFLAGS_COMPILE = concatStringsSep " " [
17− oldAttrs.NIX_CFLAGS_COMPILE
18− "-Wno-unused-local-typedefs"
19− "-Wno-aggressive-loop-optimizations"
20− ];
21−
22− src = fetchFromGitHub {
23− owner = "v8";
24− repo = "v8";
25− rev = "${version}";
26− inherit sha256;
27− };
28−})
pkgs/servers/mfi/default.nixdeleted−28
@@ -1,28 +0,0 @@
1−{ stdenv, fetchurl, unzip }:
2−
3−stdenv.mkDerivation rec {
4− name = "mfi-controller-${version}";
5− version = "2.1.11";
6−
7− src = fetchurl {
8− url = "https://dl.ubnt.com/mfi/${version}/mFi.unix.zip";
9− sha256 = "0b9q6025zf9zjzq8dcmcyai8rslx67g52j41gacxsk9i5dspmw90";
10− };
11−
12− buildInputs = [ unzip ];
13−
14− dontBuild = true;
15−
16− installPhase = ''
17− mkdir -p $out
18− cp -ar conf data dl lib webapps $out
19− '';
20−
21− meta = with stdenv.lib; {
22− homepage = http://www.ubnt.com/;
23− description = "Controller for Ubiquiti mFi devices";
24− license = licenses.unfree;
25− platforms = platforms.unix;
26− maintainers = with maintainers; [ elitak ];
27− };
28−}
pkgs/servers/nosql/mongodb/2.4.8.nixdeleted−45
@@ -1,45 +0,0 @@
1−# This derivation was resurrected from 4c8ec5e12e187347fd97b1a1a9a43eb19e009ed0
2−# by elitak for use with the Ubiquiti mFi Controller package, which breaks at
3−# runtime on mongodb3+ and jre8+. We will need to pull in sufficiently old
4−# versions of boost and v8 to build this, as well.
5−{ stdenv, fetchurl, scons, boost155, v8_3_14, gperftools, pcre-cpp, snappy }:
6−with stdenv.lib;
7−let
8− version = "2.4.8";
9−in
10−stdenv.mkDerivation rec {
11− name = "mongodb-${version}";
12−
13− src = fetchurl {
14− url = "http://downloads.mongodb.org/src/mongodb-src-r${version}.tar.gz";
15− sha256 = "1p6gnharypglfp39halp72fig96fqjhakyy7m76a1prxwpjkqw7x";
16− };
17−
18− nativeBuildInputs = [ scons boost155 v8_3_14 gperftools pcre-cpp snappy ];
19−
20− postPatch = ''
21− substituteInPlace SConstruct \
22− --replace "Environment( BUILD_DIR" "Environment( ENV = os.environ, BUILD_DIR" \
23− --replace 'CCFLAGS=["-Werror", "-pipe"]' 'CCFLAGS=["-pipe"]'
24− '';
25−
26− NIX_CFLAGS_COMPILE = "-Wno-unused-local-typedefs";
27−
28− buildPhase = ''
29− export SCONSFLAGS="-j$NIX_BUILD_CORES"
30− scons all --use-system-all
31− '';
32−
33− installPhase = ''
34− mkdir -p $out/lib
35− scons install --use-system-all --full --prefix=$out
36− '';
37−
38− meta = {
39− description = "A scalable, high-performance, open source NoSQL database";
40− homepage = http://www.mongodb.org;
41− license = licenses.agpl3;
42− maintainers = with maintainers; [ bluescreen303 elitak ];
43− platforms = platforms.linux;
44− };
45−}
pkgs/top-level/all-packages.nix−8
@@ -10630,10 +10630,6 @@ with pkgs;
1063010630 gnutls = gnutls;
1063110631 });
1063210632
10633− v8_3_14 = callPackage ../development/libraries/v8/3.14.nix {
10634− inherit (python2Packages) python gyp;
10635− };
10636−
1063710633 v8_3_16_14 = callPackage ../development/libraries/v8/3.16.14.nix {
1063810634 inherit (python2Packages) python gyp;
1063910635 cctools = darwin.cctools;
@@ -11336,8 +11332,6 @@ with pkgs;
1133611332
1133711333 meteor = callPackage ../servers/meteor/default.nix { };
1133811334
11339− mfi = callPackage ../servers/mfi { };
11340−
1134111335 minio = callPackage ../servers/minio { };
1134211336
1134311337 # Backwards compatibility.
@@ -11479,8 +11473,6 @@ with pkgs;
1147911473 inherit (darwin.apple_sdk.frameworks) Security;
1148011474 };
1148111475
11482− mongodb248 = callPackage ../servers/nosql/mongodb/2.4.8.nix { };
11483−
1148411476 percona-server56 = callPackage ../servers/sql/percona/5.6.x.nix { };
1148511477 percona-server = percona-server56;
1148611478