From 6d938ae75310a3a76857ba6caae73efcd2af2821 Mon Sep 17 00:00:00 2001 From: lherschi Date: Fri, 11 Oct 2024 21:29:47 +0200 Subject: [PATCH 1/4] fix github action build for all platforms --- .github/workflows/build.yml | 48 ++++++++++++++++++++++++------------- Makefile.am | 6 ++--- rust-launcher/Cargo.toml | 2 +- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8bfc780f5..a5f5e1498 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,10 @@ on: pull_request: branches: - 1.8 + +env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + jobs: release: if: github.event.inputs.release == 'True' @@ -39,17 +43,23 @@ jobs: runs-on: ubuntu-latest container: centos:7 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: icedtea-web + - name: Fix mirrors to use vault.centos.org + run: | + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + - name: Install Dependencies run: | yum -y install autoconf bind-utils bzip2 cpio elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel \ gmp-devel java-1.8.0-openjdk-devel libcurl-devel make mpfr-devel perl unzip which zip curl -o tagsoup.jar "https://repo1.maven.org/maven2/org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.jar" sha256sum tagsoup.jar | awk '$1!="ac97f7b4b1d8e9337edfa0e34044f8d0efe7223f6ad8f3a85d54cc1018ea2e04"{exit 1}' - curl -o rhino.zip "https://mediacdn.prod.productdelivery.prod.webservices.mozgcp.net/pub/js/rhino1_6R7.zip" + curl -o rhino.zip "https://ftp.mozilla.org/pub/js/rhino1_6R7.zip" sha256sum rhino.zip | awk '$1!="c94c6de3a29b3acbc4eee732e688f75a5d94bd02c9878be4ceb4d3cd220f3866"{exit 1}' unzip -j rhino.zip "*/js.jar" @@ -114,7 +124,7 @@ jobs: sha256sum "$zip" > "$zip.sha256.txt" done - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: icedtea-web_build_x86-64_linux path: | @@ -149,10 +159,16 @@ jobs: runs-on: ubuntu-latest container: centos:7 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: icedtea-web + - name: Fix mirrors to use vault.centos.org + run: | + sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo + sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo + sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo + - name: Install Dependencies run: | yum -y install autoconf bind-utils bzip2 cpio elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel \ @@ -161,7 +177,7 @@ jobs: sha256sum tagsoup.jar | awk '$1!="ac97f7b4b1d8e9337edfa0e34044f8d0efe7223f6ad8f3a85d54cc1018ea2e04"{exit 1}' curl -o mslinks.jar "https://repo1.maven.org/maven2/com/github/vatbub/mslinks/1.0.5/mslinks-1.0.5.jar" sha256sum mslinks.jar | awk '$1!="e14d756f81b310b75baeb5baf219d25592b6a8635eb215c4059f17493b0cea5c"{exit 1}' - curl -o rhino.zip "https://mediacdn.prod.productdelivery.prod.webservices.mozgcp.net/pub/js/rhino1_6R7.zip" + curl -o rhino.zip "https://ftp.mozilla.org/pub/js/rhino1_6R7.zip" sha256sum rhino.zip | awk '$1!="c94c6de3a29b3acbc4eee732e688f75a5d94bd02c9878be4ceb4d3cd220f3866"{exit 1}' unzip -j rhino.zip "*/js.jar" @@ -216,7 +232,7 @@ jobs: sha256sum "$zip_rename" > "$zip_rename.sha256.txt" done - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: icedtea-web_build_x86-64_portable path: | @@ -250,7 +266,7 @@ jobs: name: macOS runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: path: icedtea-web @@ -259,7 +275,7 @@ jobs: brew install autoconf automake coreutils freetype gnu-sed rust curl -o tagsoup.jar "https://repo1.maven.org/maven2/org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.jar" sha256sum tagsoup.jar | awk '$1!="ac97f7b4b1d8e9337edfa0e34044f8d0efe7223f6ad8f3a85d54cc1018ea2e04"{exit 1}' - curl -o rhino.zip "https://mediacdn.prod.productdelivery.prod.webservices.mozgcp.net/pub/js/rhino1_6R7.zip" + curl -o rhino.zip "https://ftp.mozilla.org/pub/js/rhino1_6R7.zip" sha256sum rhino.zip | awk '$1!="c94c6de3a29b3acbc4eee732e688f75a5d94bd02c9878be4ceb4d3cd220f3866"{exit 1}' unzip -j rhino.zip "*/js.jar" @@ -267,7 +283,7 @@ jobs: run: | export ICEDTEAWEB_INSTALL="/icedtea-web-image" export PATH="/usr/local/opt/gnu-sed/libexec/gnubin/:/usr/local/opt/coreutils/bin/:$PATH" - export JAVA_HOME=$(/usr/libexec/java_home -v 1.8) + export JAVA_HOME=$(/usr/libexec/java_home -v 11) export TAGSOUP="${PWD}/tagsoup.jar" export RHINO="${PWD}/js.jar" export ACLOCAL_PATH="/usr/local/share/aclocal" @@ -277,7 +293,7 @@ jobs: echo "Invoking autogen.sh" ./autogen.sh echo "Incoking IcedTea-Web configure" - ./configure --disable-native-plugin --prefix="${ICEDTEAWEB_INSTALL}" --with-itw-libs=BUNDLED --with-rhino="${RHINO}" --with-tagsoup="${TAGSOUP}" --with-jdk-home="${JAVA_HOME}" --with-jre-home="${JAVA_HOME}/jre" + ./configure --disable-native-plugin --disable-pluginjar --prefix="${ICEDTEAWEB_INSTALL}" --with-itw-libs=BUNDLED --with-rhino="${RHINO}" --with-tagsoup="${TAGSOUP}" --with-jdk-home="${JAVA_HOME}" --with-jre-home="${JAVA_HOME}" echo "Build IcedTea-Web" make DESTDIR="${WORKSPACE}" @@ -292,7 +308,7 @@ jobs: sha256sum "$zip" > "$zip.sha256.txt" done - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: icedtea-web_build_x86-64_macos path: | @@ -328,7 +344,7 @@ jobs: steps: - name: Restore cygwin packages from cache id: cygwin - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: C:\cygwin_packages key: cygwin-packages-${{ runner.os }}-v1 @@ -361,7 +377,7 @@ jobs: shell: bash run: mkdir $HOME && git config --system core.autocrlf false && git config --system --add safe.directory '*' - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: set-safe-directory: false @@ -391,7 +407,7 @@ jobs: exit 1 } # Retrieve Rhino - Invoke-WebRequest -UseBasicParsing 'https://ftp.mozilla.org/pub/mozilla.org/js/rhino1_6R7.zip' -OutFile 'rhino1_6R7.zip' + Invoke-WebRequest -UseBasicParsing 'https://ftp.mozilla.org/pub/js/rhino1_6R7.zip' -OutFile 'rhino1_6R7.zip' $checksum = (Get-FileHash -Algorithm SHA256 'rhino1_6R7.zip' | Select-Object -ExpandProperty Hash) If ($checksum -ne "C94C6DE3A29B3ACBC4EEE732E688F75A5D94BD02C9878BE4CEB4D3CD220F3866") { Write-Host "Checksums did not match!" @@ -413,14 +429,14 @@ jobs: run: | fsutil behavior set disable8dot3 0 cmd /c dir /x "C:\Program Files (x86)" - fsutil file setshortname "C:\Program Files (x86)\WiX Toolset v3.11" "WIXTOO~1.14" + fsutil file setshortname "C:\Program Files (x86)\WiX Toolset v3.14" "WIXTOO~1.14" shell: cmd - name: Build run: bash .github/workflows/windows_build.sh shell: cmd - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v3 with: name: icedtea-web_build_x86-64_win path: | diff --git a/Makefile.am b/Makefile.am index d762c002b..f1ca7b0a4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -819,10 +819,10 @@ netx-source-files.txt: find $(NETX_SRCDIR) -name '*.java' | sort > $@ ; \ for src in $(NETX_EXCLUDE_SRCS) ; \ do \ - sed -i "/$${src}/ d" $@ ; \ + sed -i.bak "/$${src}/ d" $@ && rm $@.bak ; \ done if !WITH_RHINO - sed -i '/RhinoBasedPacEvaluator/ d' $@ + sed -i.bak '/RhinoBasedPacEvaluator/ d' $@ && rm $@.bak endif # if 'sed' will be missing on machine, use old IFS hack as on other places @@ -905,7 +905,7 @@ stamps/generate-docs.stamp: stamps/netx.stamp echo "

$(PLUGIN_VERSION) docs:

" >> "$$HTML_DOCS_INDEX" ; \ for LANG_ID in en_US.UTF-8 cs_CZ.UTF-8 pl_PL.UTF-8 de_DE.UTF-8 ; do \ ID=`echo "$$LANG_ID" | head -c 2` ; \ - ENCOD=`echo "$$LANG_ID" | tail -c 6 -` ; \ + ENCOD=`echo "$$LANG_ID" | tail -c 6` ; \ export LANG=$$LANG_ID; \ mkdir "$$HTML_DOCS_TARGET_DIR/$$ID" ; \ echo "
  • $$LANG_ID
  • " >> "$$HTML_DOCS_INDEX" ; \ diff --git a/rust-launcher/Cargo.toml b/rust-launcher/Cargo.toml index 61ee3082b..2686df2a9 100644 --- a/rust-launcher/Cargo.toml +++ b/rust-launcher/Cargo.toml @@ -5,4 +5,4 @@ authors = ["https://icedtea.classpath.org/wiki/IcedTea-Web"] [dependencies] [target.'cfg(windows)'.dependencies] -dunce = "0.1.1" +dunce = "1.0.0" From 2fe1b8e8178d25e3c28b86093609a98abc61a6b1 Mon Sep 17 00:00:00 2001 From: lherschi Date: Fri, 11 Oct 2024 21:37:34 +0200 Subject: [PATCH 2/4] freetype is already installed on macOS --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5f5e1498..9310f6d59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -272,7 +272,7 @@ jobs: - name: Install Dependencies run: | - brew install autoconf automake coreutils freetype gnu-sed rust + brew install autoconf automake coreutils gnu-sed rust curl -o tagsoup.jar "https://repo1.maven.org/maven2/org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.jar" sha256sum tagsoup.jar | awk '$1!="ac97f7b4b1d8e9337edfa0e34044f8d0efe7223f6ad8f3a85d54cc1018ea2e04"{exit 1}' curl -o rhino.zip "https://ftp.mozilla.org/pub/js/rhino1_6R7.zip" From 59f028ab35c9e26f0960026a4677cad932cecb2d Mon Sep 17 00:00:00 2001 From: lherschi Date: Sat, 12 Oct 2024 10:32:00 +0200 Subject: [PATCH 3/4] make sed -i compatible with BSD and GNU sed --- html-gen.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/html-gen.sh b/html-gen.sh index 4c448f155..ca320170e 100755 --- a/html-gen.sh +++ b/html-gen.sh @@ -88,15 +88,15 @@ print_debug "Starting sed substitutions" for FILE in NEWS AUTHORS COPYING ChangeLog do print_debug "Processing $FILE..." - sed -i -r 's/\t/ /g' "./$FILE" # Convert tabs into four spaces - sed -i -r 's/\&/\&/g' "./$FILE" # "&" -> "&" - sed -i -r 's/ /\ \ /g' "./$FILE" # Double-spaces into HTML whitespace for format preservation - sed -i -r 's/ "<" - sed -i -r 's/>/\>/g' "./$FILE" # ">" -> ">" - sed -i -r 's_(\<)?(https?://[^ ]*)(\>| |$)_\1\2\3_i' "./$FILE" # Create hyperlinks from http(s) URLs - sed -i -r 's/\<(.*@.*)\>/\<\1<\/a>\>/i' "./$FILE" # Create mailto links from email addresses formatted as - sed -i -r 's/$/
    /' "./$FILE" # "\n" -> "
    " - sed -i '1i ' "./$FILE" + sed -i.bak -r 's/\t/ /g' "./$FILE" && rm "./$FILE.bak" # Convert tabs into four spaces + sed -i.bak -r 's/\&/\&/g' "./$FILE" && rm "./$FILE.bak" # "&" -> "&" + sed -i.bak -r 's/ /\ \ /g' "./$FILE" && rm "./$FILE.bak" # Double-spaces into HTML whitespace for format preservation + sed -i.bak -r 's/ "<" + sed -i.bak -r 's/>/\>/g' "./$FILE" && rm "./$FILE.bak" # ">" -> ">" + sed -i.bak -r 's_(\<)?(https?://[^ ]*)(\>| |$)_\1
    \2\3_i' "./$FILE" && rm "./$FILE.bak" # Create hyperlinks from http(s) URLs + sed -i.bak -r 's/\<(.*@.*)\>/\<\1<\/a>\>/i' "./$FILE" && rm "./$FILE.bak" # Create mailto links from email addresses formatted as + sed -i.bak -r 's/$/
    /' "./$FILE" && rm "./$FILE.bak" # "\n" -> "
    " + sed -i.bak '1i ' "./$FILE" && rm "./$FILE.bak" mv "$FILE" "$FILE.html" print_debug "$FILE.html finished." @@ -105,9 +105,9 @@ done print_debug "Done sed subs. Starting in-place additions" # Centre the column of author names in the Authors file -sed -i '5i
    ' AUTHORS.html +sed -i.bak '5i
    ' AUTHORS.html && rm AUTHORS.html.bak # Insert jamIcon above author names -sed -i '6i
    Jam Icon

    ' AUTHORS.html +sed -i.bak '6i
    Jam Icon

    ' AUTHORS.html && rm AUTHORS.html.bak echo "
    " >> AUTHORS.html if [ -n "${REPO_URL}" ]; then @@ -168,7 +168,7 @@ do print_debug "$FILE finished" done -sed -i -r 's|(\*\ .*):|\1:|' ChangeLog.html # Underline changed files in ChangeLog, eg "* Makefile.am:" +sed -i.bak -r 's|(\*\ .*):|\1:|' ChangeLog.html && rm ChangeLog.html.bak # Underline changed files in ChangeLog, eg "* Makefile.am:" end_time="$(date +%s.%N)" From 1e9e65b065c3f1cefe1a0d27666a969253431a63 Mon Sep 17 00:00:00 2001 From: lherschi Date: Sat, 12 Oct 2024 16:45:11 +0200 Subject: [PATCH 4/4] a few more necessary adjustments for BSD sed --- html-gen.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/html-gen.sh b/html-gen.sh index ca320170e..062dcbe68 100755 --- a/html-gen.sh +++ b/html-gen.sh @@ -93,10 +93,11 @@ do sed -i.bak -r 's/ /\ \ /g' "./$FILE" && rm "./$FILE.bak" # Double-spaces into HTML whitespace for format preservation sed -i.bak -r 's/ "<" sed -i.bak -r 's/>/\>/g' "./$FILE" && rm "./$FILE.bak" # ">" -> ">" - sed -i.bak -r 's_(\<)?(https?://[^ ]*)(\>| |$)_\1
    \2\3_i' "./$FILE" && rm "./$FILE.bak" # Create hyperlinks from http(s) URLs + sed -i.bak -r -e 's_(\<)?(https?://[^ ]*)(\>| )_\1\2\3_i' \ + -e '/\2\3_i' "./$FILE" && rm "./$FILE.bak" # Create hyperlinks from http(s) URLs sed -i.bak -r 's/\<(.*@.*)\>/\<\1<\/a>\>/i' "./$FILE" && rm "./$FILE.bak" # Create mailto links from email addresses formatted as sed -i.bak -r 's/$/
    /' "./$FILE" && rm "./$FILE.bak" # "\n" -> "
    " - sed -i.bak '1i ' "./$FILE" && rm "./$FILE.bak" + sed -i.bak $'1i\\\n\n' "./$FILE" && rm "./$FILE.bak" mv "$FILE" "$FILE.html" print_debug "$FILE.html finished." @@ -105,9 +106,9 @@ done print_debug "Done sed subs. Starting in-place additions" # Centre the column of author names in the Authors file -sed -i.bak '5i
    ' AUTHORS.html && rm AUTHORS.html.bak +sed -i.bak $'5i\\\n
    \n' AUTHORS.html && rm AUTHORS.html.bak # Insert jamIcon above author names -sed -i.bak '6i
    Jam Icon

    ' AUTHORS.html && rm AUTHORS.html.bak +sed -i.bak $'6i\\\n
    Jam Icon

    \n' AUTHORS.html && rm AUTHORS.html.bak echo "
    " >> AUTHORS.html if [ -n "${REPO_URL}" ]; then