Skip to content

Commit 448a8ab

Browse files
committed
Merge branch 'release/2023.1'
2 parents 6d4f4e3 + 4599400 commit 448a8ab

File tree

693 files changed

+75359
-56201
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

693 files changed

+75359
-56201
lines changed

.github/stale.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Number of days of inactivity before an issue becomes stale
2-
daysUntilStale: 120
2+
daysUntilStale: 90
33
# Number of days of inactivity before a stale issue is closed
44
daysUntilClose: 14
55
# Issues with these labels will never be considered stale

.github/workflows/ci.yaml

+42-40
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,26 @@ jobs:
4848
restore-keys: |
4949
${{ runner.os }}-ivy-
5050
51-
- name: Read .nvmrc
52-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
53-
id: nvm
54-
5551
- name: Setup node
5652
uses: actions/setup-node@v3
5753
with:
58-
node-version: "${{ steps.nvm.outputs.NVMRC }}"
54+
node-version-file: '.nvmrc'
5955

60-
- name: Set up JDK 1.8
56+
- name: Set up JDK 11
6157
uses: actions/setup-java@v3
6258
with:
6359
distribution: adopt
64-
java-version: 8
60+
java-version: 11
61+
62+
- name: Install node dependencies (oeq-rest-api)
63+
working-directory: oeq-ts-rest-api
64+
run: |
65+
npm ci
66+
67+
- name: Build oEQ REST module (oeq-rest-api)
68+
working-directory: oeq-ts-rest-api
69+
run: |
70+
npm run build
6571
6672
- name: Install node dependencies (core)
6773
working-directory: react-front-end
@@ -117,7 +123,7 @@ jobs:
117123
target/*.zip
118124
119125
- name: Save primary artefacts
120-
uses: actions/[email protected].0
126+
uses: actions/[email protected].2
121127
with:
122128
name: Artefacts
123129
path: artefacts.tar
@@ -137,14 +143,20 @@ jobs:
137143
restore-keys: |
138144
${{ runner.os }}-npm.storybook-
139145
140-
- name: Read .nvmrc
141-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
142-
id: nvm
143-
144146
- name: Setup node
145147
uses: actions/setup-node@v3
146148
with:
147-
node-version: "${{ steps.nvm.outputs.NVMRC }}"
149+
node-version-file: '.nvmrc'
150+
151+
- name: Install node dependencies (oeq-rest-api)
152+
working-directory: oeq-ts-rest-api
153+
run: |
154+
npm ci
155+
156+
- name: Build oEQ REST module (oeq-rest-api)
157+
working-directory: oeq-ts-rest-api
158+
run: |
159+
npm run build
148160
149161
- name: Install node dependencies (core)
150162
working-directory: react-front-end
@@ -162,7 +174,7 @@ jobs:
162174
tar cvf storybook.tar storybook-static
163175
164176
- name: Save Static Storybook instance
165-
uses: actions/[email protected].0
177+
uses: actions/[email protected].2
166178
with:
167179
name: Storybook
168180
path: react-front-end/storybook.tar
@@ -172,19 +184,19 @@ jobs:
172184
steps:
173185
- uses: actions/checkout@v3
174186

175-
- name: Set up JDK 1.8
187+
- name: Set up JDK 11
176188
uses: actions/setup-java@v3
177189
with:
178190
distribution: adopt
179-
java-version: 8
191+
java-version: 11
180192

181193
- name: Build
182194
working-directory: import-export-tool
183195
run: |
184196
./gradlew build
185197
186198
- name: Save primary artefacts
187-
uses: actions/[email protected].0
199+
uses: actions/[email protected].2
188200
with:
189201
name: ImportExportTools
190202
path: import-export-tool/build/libs/
@@ -197,7 +209,7 @@ jobs:
197209
strategy:
198210
matrix:
199211
newui: [true, false]
200-
pgsql-image: [latest, 10]
212+
pgsql-image: [latest, 12]
201213
exclude:
202214
- newui: false
203215
pgsql-image: latest
@@ -232,22 +244,18 @@ jobs:
232244
ffmpeg \
233245
libimage-exiftool-perl
234246
235-
- name: Set up JDK 1.8
247+
- name: Set up JDK 11
236248
uses: actions/setup-java@v3
237249
with:
238250
distribution: adopt
239-
java-version: 8
251+
java-version: 11
240252

241253
- uses: actions/checkout@v3
242254

243-
- name: Read .nvmrc
244-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
245-
id: nvm
246-
247255
- name: Setup node
248256
uses: actions/setup-node@v3
249257
with:
250-
node-version: "${{ steps.nvm.outputs.NVMRC }}"
258+
node-version-file: '.nvmrc'
251259

252260
- name: Download Artefacts
253261
uses: actions/download-artifact@v3
@@ -278,7 +286,7 @@ jobs:
278286
279287
- name: Save Scalacheck results
280288
if: matrix.newui && failure()
281-
uses: actions/[email protected].0
289+
uses: actions/[email protected].2
282290
with:
283291
name: ScalacheckReports
284292
path: autotest/Tests/target/test-reports
@@ -290,21 +298,21 @@ jobs:
290298
291299
- name: Save TestNG Reports
292300
if: failure()
293-
uses: actions/[email protected].0
301+
uses: actions/[email protected].2
294302
with:
295303
name: TestNGReports-new-${{ matrix.newui }}
296304
path: autotest/OldTests/target/testng
297305

298306
- name: Save oEQ Logs
299307
if: failure()
300-
uses: actions/[email protected].0
308+
uses: actions/[email protected].2
301309
with:
302310
name: oEQLogs-new-${{ matrix.newui }}
303311
path: autotest/equella-install/logs
304312

305313
- name: Save Screenshots
306314
if: failure()
307-
uses: actions/[email protected].0
315+
uses: actions/[email protected].2
308316
with:
309317
name: Screenshots-new-${{ matrix.newui }}
310318
path: autotest/Tests/target/test-reports/screenshots
@@ -322,7 +330,7 @@ jobs:
322330
tar cvf coverage_report.tar autotest/target/coverage-report/
323331
324332
- name: Save Coverage Report
325-
uses: actions/[email protected].0
333+
uses: actions/[email protected].2
326334
with:
327335
name: CoverageReport-newui-${{ matrix.newui }}
328336
path: coverage_report.tar
@@ -361,20 +369,16 @@ jobs:
361369
ffmpeg \
362370
libimage-exiftool-perl
363371
364-
- name: Set up JDK 1.8
372+
- name: Set up JDK 11
365373
uses: actions/setup-java@v3
366374
with:
367375
distribution: adopt
368-
java-version: 8
369-
370-
- name: Read .nvmrc
371-
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
372-
id: nvm
376+
java-version: 11
373377

374378
- name: Setup node
375379
uses: actions/setup-node@v3
376380
with:
377-
node-version: "${{ steps.nvm.outputs.NVMRC }}"
381+
node-version-file: '.nvmrc'
378382

379383
- name: Download installer
380384
uses: actions/download-artifact@v3
@@ -409,9 +413,7 @@ jobs:
409413
410414
- name: Save oEQ logs for REST Module
411415
if: failure()
412-
uses: actions/[email protected].0
416+
uses: actions/[email protected].2
413417
with:
414418
name: oEQ-logs-rest-module
415419
path: autotest/equella-install/logs
416-
417-

.gitlab-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
include:
22
project: edalex-group/development/oeq/openequella-ci
33
file: build/main.yml
4-
ref: bf787e4b64dbdd175556d1944d7acd6ca69ec053
4+
ref: 16db45894f11b9ba9780d720486f37d485e13239

.idea/misc.xml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.17.1
1+
16.20.1

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules/
22
storybook-static/
3+
Source/Plugins/Core/com.equella.core/resources/web/reactjs/tinymce/skins/

CONTRIBUTING.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ We suggest using SDKMAN for installing (and managing multiple versions of) JDK,
115115
Please follow the installation instructions provided by the tool.
116116

117117
### Install Java
118-
At the time of writing the openEQUELLA is built with Java 8. For this, we prefer to use
119-
openJDK which is current at version 8.0.302. To install that with SDKMAN:
118+
Since January 2023, Java 11 is required to build openEQUELLA. Temurin is the recommended openJDK distribution.
119+
To install that with SDKMAN:
120120

121121
```bash
122-
sdk install java 8.0.302-open
122+
sdk install java 11.0.17-tem
123123
```
124124

125125
### Install NVM
@@ -286,16 +286,22 @@ The New UI consists of two modules:
286286
- The React based SPA located in the `react-front-end` directory; and
287287
- The REST Module which is located in the `oeq-ts-rest-api` directory.
288288

289-
For the most part, if you wish to work on the new UI you can simply go into the `react-front-end`
290-
directory and execute:
289+
For the most part, if you wish to work on the new UI, you need go into `oeq-ts-rest-api` directory and execute:
290+
291+
```bash
292+
npm ci
293+
npm run build
294+
````
295+
296+
After building the REST module (`oeq-ts-rest-api`), then you can go into the `react-front-end` directory and execute:
291297

292298
```bash
293299
npm ci
294300
npm run dev
295301
```
296302

297-
The first will also trigger a build of the REST module, and then `run dev` will build the React App
298-
and place the output into the directory from which openEQUELLA serves its web resources.
303+
The `run dev` command will build the React App and place the output into the directory from which
304+
openEQUELLA serves its web resources.
299305

300306
Further to this, you may also wish to utilise the Storybook setup when working on UI components.
301307
This can be done by:

Dev/docs/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,5 @@ Usually `com.equella.core` is the place where new architecture classes will be p
5050
- [REST endpoint creation](restendpoint.md)
5151
- [Using security](security.md)
5252
- [React based web pages](reactjs.md)
53-
- [Scala server side code](scaladb.md)
5453
- [Unexpected errors and notifications](clienterrors.md)
5554
- [Guice integration](guice.md)

Dev/docs/mainui.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ When the new UI is turned on, openEQUELLA runs in a Single Page App (SPA) style
44

55
The entrypoint for the SPA is located at [mainui/index.tsx](../../react-front-end/tsrc/mainui/index.tsx).
66

7-
The route component uses [react-router](https://reacttraining.com/react-router/web/guides/quick-start) for routing
7+
The route component uses [react-router](https://v5.reactrouter.com/web/guides/quick-start) for routing
88
with pages declared inside [mainui/routes.ts](../../react-front-end/tsrc/mainui/routes.tsx)
99

1010
## Template
@@ -109,6 +109,6 @@ Now you should be able to see the page by going to:
109109

110110
`http://{insturl}/helloworld/hooks` or `http://{insturl}/helloworld/component`
111111

112-
Please see [react-router](https://reacttraining.com/react-router/web/guides/quick-start)
112+
Please see [react-router](https://v5.reactrouter.com/web/guides/quick-start)
113113
for examples on how to use route specific functionaility usage
114114
(e.g. linking to other pages and extracting parameters for urls).

Dev/docs/security.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Some of the useful methods in `TLEAclManager`:
5656
Set<String> filterNonGrantedPrivileges(Collection<String> privileges, boolean includePossibleOwnerAcls);
5757
```
5858

59-
Scala code can use the `AclChecks` object to check "top level" privileges in the [DB](scaladb.md) monad,
59+
Scala code can use the `AclChecks` object to check "top level" privileges,
6060
this will be expanded further to check privileges against particular domain objects.
6161

6262
```scala

Installer/build.sbt

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Path.relativeTo
22

33
libraryDependencies ++= Seq(
44
"com.google.guava" % "guava" % "31.1-jre",
5-
"commons-codec" % "commons-codec" % "1.15",
5+
"commons-codec" % "commons-codec" % "1.16.0",
66
postgresDep,
77
sqlServerDep
88
)
@@ -49,6 +49,7 @@ installerZip := {
4949
upZip -> s"manager/updates/${upZip.getName}"
5050
) ++ allServerFiles
5151
log.info(s"Creating installer ${outZip.absolutePath}")
52+
5253
IO.zip(allFiles.map(t => (t._1, s"$dirname/${t._2}")),
5354
outZip,
5455
Option((ThisBuild / buildTimestamp).value))
+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Background about JSVC and oEQ
2+
3+
JSVC is a binary required to support running oEQ and the Upgrade Manager as a Daemon process in
4+
Unix alike systems. It had not been updated until 2022 when we started adding the support
5+
for Java 11. And the previous version of JSVC used in oEQ does not support Java 11. As a result,
6+
we tried to build the JSVC binary again.
7+
8+
## How to build the JSVC binary
9+
* Install required dependencies
10+
* GNU AutoConf (at least version 2.53)
11+
* An ANSI-C compliant compiler (e.g GCC)
12+
* GNU Make
13+
* Download the source code from this [page](https://commons.apache.org/proper/commons-daemon/download_daemon.cgi)
14+
* Unzip the file and go to directory `src/native/unix `
15+
* Execute the provided scripts to generate the binary
16+
```
17+
./support/buildconf.sh
18+
./configure
19+
```
20+
* You will notice some files are created after above step. And now you can run `make` to generate the executable file.
21+
22+
For more details, please check this [page](https://commons.apache.org/proper/commons-daemon/jsvc.html)
23+
24+
## How to get the Windows executables
25+
The JSVC equivalent on Windows is called `Procrun` which typically has two executables: `prunmgr.exe` and `prunsrv.exe`.
26+
27+
These two files can be downloaded from this [page](https://archive.apache.org/dist/commons/daemon/binaries/windows/).
28+
29+
For details about how to use the executables, please check this [page](https://commons.apache.org/proper/commons-daemon/procrun.html).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#export RUN_USER=equella
2+
export JAVA_HOME="${java/jdk#t\/}"
3+
#export JMX_CONFIG="-Dcom.sun.management.jmxremote.port=8855 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
4+
#export HEAP_CONFIG="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../"
5+
export CLASSPATH="../learningedge-config:../server/equella-server.jar"
6+
export JAVA_OPTS="${webserver/javaopts} -Xrs -Xms${memory/min} -Xmx${memory/max} -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false -Djava.awt.headless=true -Djava.io.tmpdir=../server/temp -XX:MaxGCPauseMillis=500 -XX:NewRatio=3 -XX:GCTimeRatio=16 -XX:+DisableExplicitGC -XX:+UseG1GC -XX:CMSInitiatingOccupancyFraction=70 -Dcom.sun.jndi.ldap.connect.pool.timeout=3000000 -Dcom.sun.jndi.ldap.connect.pool.maxsize=200 -Dcom.sun.jndi.ldap.connect.pool.prefsize=20"
7+
-36.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)