Skip to content

Commit 9751b59

Browse files
committed
archiver-appliance: 1.1.0 -> 2.0.5
- build system changed from ant to gradle - log4j config file changed to log4j2.xml
1 parent 5710b4f commit 9751b59

File tree

8 files changed

+1247
-47
lines changed

8 files changed

+1247
-47
lines changed

docs/release-notes/2505.rst

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
25.05 Release notes
2+
===================
3+
4+
.. default-domain:: nix
5+
6+
.. role:: nix(code)
7+
:language: nix
8+
9+
Highlights
10+
----------
11+
12+
- Archiver Appliance was upgrade from 1.1.0 -> 2.0.5,
13+
see the `Archiver Appliance 2.0.5 release notes`_.
14+
None of the breaking change should affect users of the
15+
:option:`services.archiver-appliance` NixOS options.
16+
17+
.. _Archiver Appliance 2.0.5 release notes: https://github.com/archiver-appliance/epicsarchiverap/releases/tag/2.0.5

nixos/modules/archiver-appliance.nix

+15-7
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,20 @@
7171
.handlers = java.util.logging.ConsoleHandler
7272
'';
7373

74-
log4jProperties = pkgs.writeTextDir "/log4j.properties" ''
75-
log4j.rootLogger = ERROR, stdout
76-
log4j.logger.config.org.epics.archiverappliance = INFO
77-
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
78-
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
79-
log4j.appender.stdout.layout.ConversionPattern=[%d] %p %m (%c)%n
74+
log4j2Xml = pkgs.writeTextDir "/log4j2.xml" ''
75+
<Configuration>
76+
<Appenders>
77+
<Console name="STDOUT" target="SYSTEM_OUT">
78+
<PatternLayout pattern="%p %m (%c)%n"/>
79+
</Console>
80+
</Appenders>
81+
<Loggers>
82+
<Logger name="org.apache.log4j.xml" level="info"/>
83+
<Root level="info">
84+
<AppenderRef ref="STDOUT"/>
85+
</Root>
86+
</Loggers>
87+
</Configuration>
8088
'';
8189
in {
8290
options.services.archiver-appliance = {
@@ -284,7 +292,7 @@ in {
284292
];
285293

286294
commonLibs = [
287-
"${log4jProperties}/log4j.properties"
295+
"${log4j2Xml}/log4j2.xml"
288296

289297
# We use the mariadb connecter, since it supports UNIX socket connection,
290298
# which allows us not not store the password in plaintext in the config.

pkgs/default.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ in
7777

7878
# EPICS related tools and extensions
7979

80-
archiver-appliance = callPackage ./epnix/tools/archiver-appliance {};
80+
archiver-appliance = callPackage ./epnix/tools/archiver-appliance {
81+
jdk = prev.jdk17;
82+
};
8183

8284
ca-gateway = callPackage ./epnix/tools/ca-gateway {};
8385

Original file line numberDiff line numberDiff line change
@@ -1,24 +1,26 @@
11
{
22
stdenvNoCC,
33
lib,
4+
epnix,
45
epnixLib,
56
fetchFromGitHub,
67
jdk,
7-
ant,
8-
dos2unix,
8+
gradle,
9+
sphinx,
910
tomcat9,
11+
python3Packages,
1012
python3,
1113
}:
12-
stdenvNoCC.mkDerivation (self: {
14+
stdenvNoCC.mkDerivation (finalAttrs: {
1315
pname = "archiver-appliance";
14-
version = "1.1.0";
16+
version = "2.0.5";
1517

1618
src = fetchFromGitHub {
1719
owner = "archiver-appliance";
1820
repo = "epicsarchiverap";
19-
rev = self.version;
21+
rev = finalAttrs.version;
2022
fetchSubmodules = true;
21-
hash = "sha256-ezsjqp23BMLpqA6cdd6k0wXhAR1imOm0tyWJUaSWmiA=>";
23+
hash = "sha256-X1q87+3QZaNv4bY9UjTEEr0Jrv9AEIezhygI9jgNay0=";
2224
};
2325

2426
patches = [
@@ -27,34 +29,43 @@ stdenvNoCC.mkDerivation (self: {
2729

2830
# Messes up the shebang auto-patching
2931
./fix-policies-shebang.patch
32+
33+
./fix-docs-build-script.patch
3034
];
3135

32-
nativeBuildInputs = [jdk ant dos2unix];
36+
nativeBuildInputs = [
37+
jdk
38+
gradle
39+
sphinx
40+
python3Packages.myst-parser
41+
python3Packages.sphinx-rtd-theme
42+
];
3343
buildInputs = [python3];
3444

35-
TOMCAT_HOME = "${tomcat9}";
45+
gradleFlags = [
46+
"-PprojVersion=${finalAttrs.version}"
47+
"-Dorg.gradle.java.home=${jdk}"
48+
];
3649

37-
buildPhase = ''
38-
runHook preBuild
50+
# Update by running `nix build .#archiver-appliance.mitmCache.updateScript && ./result`
51+
mitmCache = gradle.fetchDeps {
52+
pkg = epnix.archiver-appliance;
53+
data = ./deps.json;
54+
};
3955

40-
ant
56+
# Some PV tests fail
57+
#doCheck = true;
4158

42-
runHook postBuild
43-
'';
59+
TOMCAT_HOME = "${tomcat9}";
4460

4561
installPhase = ''
4662
runHook preInstall
4763
48-
install -Dt $out/webapps ../retrieval.war ../engine.war ../etl.war ../mgmt.war
49-
install -Dt $out/share/doc/archappl LICENSE NOTICE
50-
cp -R docs $out/share/doc/archappl
64+
install -Dt $out/webapps build/libs/{retrieval,engine,etl,mgmt}.war
65+
install --mode=644 -Dt $out/share/doc/archappl LICENSE NOTICE
5166
52-
install -Dt $out/share/archappl/sql src/main/org/epics/archiverappliance/config/persistence/*.sql
67+
install --mode=644 -Dt $out/share/archappl/sql src/main/org/epics/archiverappliance/config/persistence/*.sql
5368
install -Dt $out/share/archappl/ src/sitespecific/tests/classpathfiles/policies.py
54-
# DOS-style line-ending messes up shebang auto-patching
55-
dos2unix $out/share/archappl/policies.py
56-
57-
install -Dt $out ../archappl*.tar.gz
5869
5970
runHook postInstall
6071
'';
@@ -75,5 +86,10 @@ stdenvNoCC.mkDerivation (self: {
7586
];
7687
maintainers = with epnixLib.maintainers; [minijackson];
7788
inherit (jdk.meta) platforms;
89+
sourceProvenance = with lib.sourceTypes; [
90+
fromSource
91+
# gradle dependencies
92+
binaryBytecode
93+
];
7894
};
7995
})

0 commit comments

Comments
 (0)