solr: drop
This commit is contained in:
parent
c7bf74ae68
commit
c24a8ccc98
8 changed files with 4 additions and 216 deletions
|
@ -338,7 +338,7 @@ in
|
|||
lidarr = 306;
|
||||
slurm = 307;
|
||||
kapacitor = 308;
|
||||
solr = 309;
|
||||
# solr = 309; removed 2023-03-16
|
||||
alerta = 310;
|
||||
minetest = 311;
|
||||
rss2email = 312;
|
||||
|
@ -648,7 +648,7 @@ in
|
|||
lidarr = 306;
|
||||
slurm = 307;
|
||||
kapacitor = 308;
|
||||
solr = 309;
|
||||
# solr = 309; removed 2023-03-16
|
||||
alerta = 310;
|
||||
minetest = 311;
|
||||
rss2email = 312;
|
||||
|
|
|
@ -1061,7 +1061,6 @@
|
|||
./services/search/meilisearch.nix
|
||||
./services/search/opensearch.nix
|
||||
./services/search/qdrant.nix
|
||||
./services/search/solr.nix
|
||||
./services/security/aesmd.nix
|
||||
./services/security/certmgr.nix
|
||||
./services/security/cfssl.nix
|
||||
|
|
|
@ -1,110 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.solr;
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
options = {
|
||||
services.solr = {
|
||||
enable = mkEnableOption (lib.mdDoc "Solr");
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.solr;
|
||||
defaultText = literalExpression "pkgs.solr";
|
||||
description = lib.mdDoc "Which Solr package to use.";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 8983;
|
||||
description = lib.mdDoc "Port on which Solr is ran.";
|
||||
};
|
||||
|
||||
stateDir = mkOption {
|
||||
type = types.path;
|
||||
default = "/var/lib/solr";
|
||||
description = lib.mdDoc "The solr home directory containing config, data, and logging files.";
|
||||
};
|
||||
|
||||
extraJavaOptions = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
description = lib.mdDoc "Extra command line options given to the java process running Solr.";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "solr";
|
||||
description = lib.mdDoc "User under which Solr is ran.";
|
||||
};
|
||||
|
||||
group = mkOption {
|
||||
type = types.str;
|
||||
default = "solr";
|
||||
description = lib.mdDoc "Group under which Solr is ran.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
systemd.services.solr = {
|
||||
after = [ "network.target" "remote-fs.target" "nss-lookup.target" "systemd-journald-dev-log.socket" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
environment = {
|
||||
SOLR_HOME = "${cfg.stateDir}/data";
|
||||
LOG4J_PROPS = "${cfg.stateDir}/log4j2.xml";
|
||||
SOLR_LOGS_DIR = "${cfg.stateDir}/logs";
|
||||
SOLR_PORT = "${toString cfg.port}";
|
||||
};
|
||||
path = with pkgs; [
|
||||
gawk
|
||||
procps
|
||||
];
|
||||
preStart = ''
|
||||
mkdir -p "${cfg.stateDir}/data";
|
||||
mkdir -p "${cfg.stateDir}/logs";
|
||||
|
||||
if ! test -e "${cfg.stateDir}/data/solr.xml"; then
|
||||
install -D -m0640 ${cfg.package}/server/solr/solr.xml "${cfg.stateDir}/data/solr.xml"
|
||||
install -D -m0640 ${cfg.package}/server/solr/zoo.cfg "${cfg.stateDir}/data/zoo.cfg"
|
||||
fi
|
||||
|
||||
if ! test -e "${cfg.stateDir}/log4j2.xml"; then
|
||||
install -D -m0640 ${cfg.package}/server/resources/log4j2.xml "${cfg.stateDir}/log4j2.xml"
|
||||
fi
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
ExecStart="${cfg.package}/bin/solr start -f -a \"${concatStringsSep " " cfg.extraJavaOptions}\"";
|
||||
ExecStop="${cfg.package}/bin/solr stop";
|
||||
};
|
||||
};
|
||||
|
||||
users.users = optionalAttrs (cfg.user == "solr") {
|
||||
solr = {
|
||||
group = cfg.group;
|
||||
home = cfg.stateDir;
|
||||
createHome = true;
|
||||
uid = config.ids.uids.solr;
|
||||
};
|
||||
};
|
||||
|
||||
users.groups = optionalAttrs (cfg.group == "solr") {
|
||||
solr.gid = config.ids.gids.solr;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
|
@ -623,7 +623,6 @@ in {
|
|||
soapui = handleTest ./soapui.nix {};
|
||||
sogo = handleTest ./sogo.nix {};
|
||||
solanum = handleTest ./solanum.nix {};
|
||||
solr = handleTest ./solr.nix {};
|
||||
sonarr = handleTest ./sonarr.nix {};
|
||||
sourcehut = handleTest ./sourcehut.nix {};
|
||||
spacecookie = handleTest ./spacecookie.nix {};
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
import ./make-test-python.nix ({ pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "solr";
|
||||
meta.maintainers = [ pkgs.lib.maintainers.aanderse ];
|
||||
|
||||
nodes.machine =
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
# Ensure the virtual machine has enough memory for Solr to avoid the following error:
|
||||
#
|
||||
# OpenJDK 64-Bit Server VM warning:
|
||||
# INFO: os::commit_memory(0x00000000e8000000, 402653184, 0)
|
||||
# failed; error='Cannot allocate memory' (errno=12)
|
||||
#
|
||||
# There is insufficient memory for the Java Runtime Environment to continue.
|
||||
# Native memory allocation (mmap) failed to map 402653184 bytes for committing reserved memory.
|
||||
virtualisation.memorySize = 2000;
|
||||
|
||||
services.solr.enable = true;
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
machine.wait_for_unit("solr.service")
|
||||
machine.wait_for_open_port(8983)
|
||||
machine.succeed("curl --fail http://localhost:8983/solr/")
|
||||
|
||||
# adapted from pkgs.solr/examples/films/README.txt
|
||||
machine.succeed("sudo -u solr solr create -c films")
|
||||
assert '"status":0' in machine.succeed(
|
||||
"""
|
||||
curl http://localhost:8983/solr/films/schema -X POST -H 'Content-type:application/json' --data-binary '{
|
||||
"add-field" : {
|
||||
"name":"name",
|
||||
"type":"text_general",
|
||||
"multiValued":false,
|
||||
"stored":true
|
||||
},
|
||||
"add-field" : {
|
||||
"name":"initial_release_date",
|
||||
"type":"pdate",
|
||||
"stored":true
|
||||
}
|
||||
}'
|
||||
"""
|
||||
)
|
||||
machine.succeed(
|
||||
"sudo -u solr post -c films ${pkgs.solr}/example/films/films.json"
|
||||
)
|
||||
assert '"name":"Batman Begins"' in machine.succeed(
|
||||
"curl http://localhost:8983/solr/films/query?q=name:batman"
|
||||
)
|
||||
'';
|
||||
})
|
|
@ -1,43 +0,0 @@
|
|||
{ lib, stdenv, fetchurl, jre, makeWrapper, nixosTests }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "solr";
|
||||
version = "8.6.3";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://apache/lucene/${pname}/${version}/${pname}-${version}.tgz";
|
||||
sha256 = "0mbbmamajamxzcvdlrzx9wmv26kg9nhg9bzazk176dhhx3rjajf2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out $out/bin
|
||||
|
||||
cp -r bin/solr bin/post $out/bin/
|
||||
cp -r contrib $out/
|
||||
cp -r dist $out/
|
||||
cp -r example $out/
|
||||
cp -r server $out/
|
||||
|
||||
wrapProgram $out/bin/solr --set JAVA_HOME "${jre}"
|
||||
wrapProgram $out/bin/post --set JAVA_HOME "${jre}"
|
||||
'';
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) solr;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://lucene.apache.org/solr/";
|
||||
description = "Open source enterprise search platform from the Apache Lucene project";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ ];
|
||||
knownVulnerabilities = [
|
||||
"Multiple security issues throughout 2021, see https://solr.apache.org/security.html"
|
||||
"Package is outdated and has no maintainer"
|
||||
];
|
||||
};
|
||||
|
||||
}
|
|
@ -1439,7 +1439,8 @@ mapAliases ({
|
|||
smugline = throw "smugline has been removed from nixpkgs, as it's unmaintained and depends on deprecated libraries"; # Added 2020-11-04
|
||||
snack = throw "snack has been removed: broken for 5+ years"; # Added 2022-04-21
|
||||
soldat-unstable = opensoldat; # Added 2022-07-02
|
||||
solr_8 = solr; # Added 2021-01-30
|
||||
solr_8 = throw "'solr' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-03-16
|
||||
solr = throw "'solr' has been removed from nixpkgs, as it was broken and unmaintained"; # Added 2023-03-16
|
||||
|
||||
# Added 2020-02-10
|
||||
sourceHanSansPackages = {
|
||||
|
|
|
@ -12264,8 +12264,6 @@ with pkgs;
|
|||
|
||||
sonar-scanner-cli = callPackage ../tools/security/sonar-scanner-cli { };
|
||||
|
||||
solr = callPackage ../servers/search/solr { };
|
||||
|
||||
solvespace = callPackage ../applications/graphics/solvespace { };
|
||||
|
||||
sonarr = callPackage ../servers/sonarr { };
|
||||
|
|
Loading…
Reference in a new issue