Skip to content

Commit

Permalink
Migrated from java 8 to java 11. This step is required to upgrade cer…
Browse files Browse the repository at this point in the history
…tain packages, most important solr which will be migrated from 8.9 to 9.x
  • Loading branch information
Orbiter committed Aug 31, 2023
1 parent 376bcfd commit 6bd5f49
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ All these have (YaCy) search functionality combining all these locations into on

## Dependencies? What other software do I need?

You need Java 1.8 or later to run YaCy. (No Apache, Tomcat or MySQL or anything else)
You need Java 11 or later to run YaCy. (No Apache, Tomcat or MySQL or anything else)

YaCy also runs on IcedTea 3.
See https://icedtea.classpath.org
Expand Down Expand Up @@ -178,7 +178,7 @@ git clone https://github.com/yacy/yacy_search_server
```

Compiling YaCy:
- You need Java 1.8 and ant
- You need Java 11 and ant
- See `ant -p` for the available ant targets
```
ant clean dist
Expand Down
2 changes: 1 addition & 1 deletion build.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ Section "check Java 8 installed" Sec_Java_id
Retry:
ReadRegStr $InstalledJREVersion HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"

${If} $InstalledJREVersion != "1.8"
${If} $InstalledJREVersion != "11"
MessageBox MB_ICONEXCLAMATION|MB_YESNO "$(yacyNoJavaFoundOpenBrowser)" IDNO ContinueWithoutJava
ExecShell open "https://adoptium.net/de/temurin/releases/?version=8"

Expand Down
6 changes: 3 additions & 3 deletions build.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# defining some compiler arguments
javacSource=1.8
javacTarget=1.8
javacSource=11
javacTarget=11

# Release Configuration
releaseVersion=1.926
releaseVersion=1.930
releaseFileParentDir=yacy
privateKeyFile=private.key

Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


## build app
FROM eclipse-temurin:8-jdk-focal AS appbuilder
FROM eclipse-temurin:11-jdk-jammy AS appbuilder

RUN apt-get update && apt-get install -yq ant git curl wkhtmltopdf imagemagick xvfb ghostscript && rm -rf /var/lib/apt/lists/*
RUN java -version
Expand All @@ -31,7 +31,7 @@ RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a09


## build dist
FROM eclipse-temurin:8-jre-focal
FROM eclipse-temurin:11-jre-jammy
LABEL maintainer="Michael Peter Christen <[email protected]>"

RUN apt-get update && apt-get install -yq wkhtmltopdf imagemagick xvfb ghostscript && rm -rf /var/lib/apt/lists/*
Expand Down
14 changes: 14 additions & 0 deletions docker/Dockerfile.ArchLinux
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
FROM archlinux:latest

# update the system and clean up
RUN pacman -Syu --noconfirm && pacman -Scc --noconfirm
RUN pacman -Sy java-runtime-common wget --noconfirm && pacman -Scc --noconfirm

# download latest version of graalvm and move it to /lib/jvm/java-{javaversion}-graalvm
RUN bash <(curl -sL https://get.graalvm.org/jdk) --no-progress && \
JAVAVERSION=$(ls ./ | grep graalvm | cut -d'-' -f3 | sed 's/java//g') && \
mv ./graalvm-ce-java$JAVAVERSION-$(ls ./ | grep graalvm | cut -d'-' -f4) /lib/jvm/java-$JAVAVERSION-graalvm && \
archlinux-java set java-$JAVAVERSION-graalvm

# update the path variable
ENV PATH="/usr/lib/jvm/default/bin:${PATH}"

# set the JAVA_HOME variable
ENV JAVA_HOME="/usr/lib/jvm/default"
WORKDIR /opt
Expand All @@ -24,38 +28,46 @@ sh build.sh -f fetch.xml -Ddest=optional && \
sh build.sh -Ddist.dir=/opt/ant dist && \
cd .. && \
rm -rf ant-src

# set the ANT_HOME variable
ENV ANT_HOME="/opt/ant"

# set the PATH variable
ENV PATH="/opt/ant/bin:${PATH}"
RUN ant -f /opt/ant/fetch.xml -Ddest=system

# install the latest version dependencies of Yacy (copied from the official Dockerfile)
RUN pacman -Sy imagemagick ruby qt5-tools qt5-doc gperf python xorg-server-xvfb ghostscript git qt5-svg qt5-xmlpatterns base-devel qt5-location qt5-sensors qt5-webchannel libwebp libxslt libxcomposite gst-plugins-base hyphen hyphen-en hyphen-de woff2 cmake --noconfirm && \
pacman -Scc --noconfirm
RUN useradd --no-create-home --shell=/bin/false build && \
usermod -L build
USER build
WORKDIR /tmp

# buid package for qt5-webkit from AUR
RUN git clone https://aur.archlinux.org/qt5-webkit.git && \
cd qt5-webkit && \
MAKEFLAGS="-j$(nproc)" makepkg --noconfirm && \
cd ..
USER root

# install the package
RUN pacman -U --noconfirm /tmp/qt5-webkit/qt5-webkit*.pkg.tar.zst && \
rm -rf /tmp/qt5-webkit
USER build

# build package for wkhtmltopdf from AUR
RUN git clone https://aur.archlinux.org/wkhtmltopdf.git && \
cd wkhtmltopdf && \
MAKEFLAGS="-j$(nproc)" makepkg --noconfirm --skippgpcheck && \
cd ..
USER root

# install the package
RUN pacman -U --noconfirm /tmp/wkhtmltopdf/wkhtmltopdf*.pkg.tar.zst && \
rm -rf /tmp/wkhtmltopdf
WORKDIR /opt

# download the latest version of yacy
RUN curl "https://codeload.github.com/yacy/yacy_search_server/zip/refs/heads/master" --output yacy.zip && \
pacman -S unzip --noconfirm && \
Expand All @@ -66,10 +78,12 @@ mv yacy_search_server-master yacy && \
cd yacy && \
ant compile -f build.xml && \
rm -rf /opt/yacy/.github

# Set initial admin password: "yacy" (encoded with custom yacy md5 function net.yacy.cora.order.Digest.encodeMD5Hex())
RUN sed -i "/adminAccountBase64MD5=/c\adminAccountBase64MD5=MD5:8cffbc0d66567a0987a4aba1ec46d63c" /opt/yacy/defaults/yacy.init && \
sed -i "/adminAccountForLocalhost=/c\adminAccountForLocalhost=false" /opt/yacy/defaults/yacy.init && \
sed -i "/server.https=false/c\server.https=true" /opt/yacy/defaults/yacy.init

# add the yacy user
RUN useradd --no-create-home --system yacy && \
usermod -L yacy && \
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Build a docker image from latest YaCy sources

# Base image : latest Debian stable official jdk 8 image from Docker
# Base image : latest Debian stable official jdk 17 image from Docker
FROM arm64v8/openjdk:17-buster

# Install needed packages not in base image
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build a docker image from latest YaCy sources on Alpine Linux

# Base image : latest stable official jdk 8 image from Docker based on Alpine Linux
FROM openjdk:8-alpine
# Base image : latest stable official jdk 11 image from Docker based on Alpine Linux
FROM openjdk:11-alpine

# trace java version
RUN java -version
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.armv7
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Build a docker image from latest YaCy sources

# Base image : latest Debian stable official jdk 8 image from Docker
FROM arm32v7/openjdk:8-jdk
# Base image : latest Debian stable official jdk 11 image from Docker
FROM arm32v7/openjdk:11-jdk

# Install needed packages not in base image
# (curl for sh scripts in /bin, and wkhtmltopdf,imagemagick,xvfb and ghostscript to enable PDF and image snapshot generation)
Expand Down
2 changes: 1 addition & 1 deletion docker/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ cd yacy_search_server/docker
```

Then according to the image type:
* `yacy/yacy_search_server:latest`: This image is based on latest stable official Debian stable [openjdk](https://hub.docker.com/_/openjdk/) 8 image provided by Docker. Embed Yacy compiled from latest git repository sources.
* `yacy/yacy_search_server:latest`: This image is based on latest stable official Debian stable [openjdk](https://hub.docker.com/_/openjdk/) 11 image provided by Docker. Embed Yacy compiled from latest git repository sources.

```
docker build -t yacy/yacy_search_server:latest -f Dockerfile ../
Expand Down

0 comments on commit 6bd5f49

Please sign in to comment.