From 9f828421dbf1e51de7068c21d750ddc8e68a8de7 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Fri, 6 Dec 2024 12:37:18 +0100 Subject: [PATCH 1/5] Forcefully removes duplicate org.apache.commons.logging plug-in --- build.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/build.sh b/build.sh index cd8850a..386590b 100755 --- a/build.sh +++ b/build.sh @@ -199,6 +199,14 @@ remove_update_sites () { rm -rf $UPDATE_SITE_CONFIG_PATH/$UPDATE_SITE_METADATA } +# Removes broken org.apache.commons.logging JAR from plug-ins +remove_broken_commons_logging () { + log "Removes broken org.apache.commons.logging JAR from plug-ins." + rm $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar + # force org.eclipse.equinox to + # org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false + sed -i '/org.apache.commons.lang3/a org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info +} # # Script @@ -291,6 +299,9 @@ else chmod +x splash.sh && ./splash.sh deploy $VERSION $ECLIPSE_BASE_PATH fi +# Remove broken org.apache.commons.logging JAR +remove_broken_commons_logging + log "Clean-up old archives and create new archive." rm -f ./$OUTPUT_FILE zip -q -r $OUTPUT_FILE eclipse From 13f63e404b0b008f54a2d6bf72c449405b7bfdd8 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Fri, 6 Dec 2024 13:45:31 +0100 Subject: [PATCH 2/5] macOS-based runners: use gnu sed instead of bsd sed --- .github/workflows/ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5614ee6..975dfb6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -263,7 +263,8 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS user)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -301,7 +302,8 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -339,7 +341,8 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -377,7 +380,8 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS user)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -415,7 +419,8 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -453,7 +458,8 @@ jobs: run: echo "Started CI build (Eclipse eMoflon macOS dev HiPE)." - name: Install dependencies run: | - brew install p7zip coreutils grep wget curl + brew install p7zip coreutils grep wget curl gsed + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image From fbb9fe33224da8ec156cc82abfd83a7376909590 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Fri, 6 Dec 2024 14:12:23 +0100 Subject: [PATCH 3/5] Fixes PATH --- .github/workflows/ci.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 975dfb6..a6d7355 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -264,7 +264,6 @@ jobs: - name: Install dependencies run: | brew install p7zip coreutils grep wget curl gsed - export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -284,7 +283,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m user -o macos + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m user -o macos - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -303,7 +304,6 @@ jobs: - name: Install dependencies run: | brew install p7zip coreutils grep wget curl gsed - export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -323,7 +323,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m dev -o macos + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m dev -o macos - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -342,7 +344,6 @@ jobs: - name: Install dependencies run: | brew install p7zip coreutils grep wget curl gsed - export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -362,7 +363,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m hipedev -o macos + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m hipedev -o macos - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -381,7 +384,6 @@ jobs: - name: Install dependencies run: | brew install p7zip coreutils grep wget curl gsed - export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -401,7 +403,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m user -o macosarm + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m user -o macosarm - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -420,7 +424,6 @@ jobs: - name: Install dependencies run: | brew install p7zip coreutils grep wget curl gsed - export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -440,7 +443,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m dev -o macosarm + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m dev -o macosarm - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact @@ -459,7 +464,6 @@ jobs: - name: Install dependencies run: | brew install p7zip coreutils grep wget curl gsed - export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" - name: Check out repository code uses: actions/checkout@v4 - name: Download splash image @@ -479,7 +483,9 @@ jobs: with: name: com.seeq.eclipse.importprojects.jar - name: Run build script - run: chmod +x build.sh && ./build.sh -m hipedev -o macosarm + run: | + export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH" + chmod +x build.sh && ./build.sh -m hipedev -o macosarm - name: Fix permissions run: sudo xattr -cr ./eclipse/Eclipse.app - name: Upload artifact From ed0cb281f6173426fd2ac875b13eacd65d106b88 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Tue, 10 Dec 2024 11:36:36 +0100 Subject: [PATCH 4/5] Removes deleted (broken) commons.logging JAR from equinox config --- build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 4382717..6ef2723 100755 --- a/build.sh +++ b/build.sh @@ -203,9 +203,11 @@ remove_update_sites () { remove_broken_commons_logging () { log "Removes broken org.apache.commons.logging JAR from plug-ins." rm $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar - # force org.eclipse.equinox to + # force org.eclipse.equinox to take correct JAR into account # org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false sed -i '/org.apache.commons.lang3/a org.apache.commons.logging,1.2.0,plugins/org.apache.commons.logging_1.2.0.jar,4,false' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info + # org.apache.commons.logging,1.2.0.v20180409-1502,plugins/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false + sed -i '/org.apache.commons.logging,1.2.0.v20180409-1502,plugins\/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false/d' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info } # From ace285610721723a551292598cf57f73c39bfaa7 Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Tue, 10 Dec 2024 13:55:27 +0100 Subject: [PATCH 5/5] Implements restoring of the non-broken commons.logging JAR --- build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/build.sh b/build.sh index 6ef2723..c26e8ba 100755 --- a/build.sh +++ b/build.sh @@ -210,6 +210,19 @@ remove_broken_commons_logging () { sed -i '/org.apache.commons.logging,1.2.0.v20180409-1502,plugins\/org.apache.commons.logging_1.2.0.v20180409-1502.jar,4,false/d' $ECLIPSE_BASE_PATH/configuration/org.eclipse.equinox.simpleconfigurator/bundles.info } +# Copies the non-broken org.apache.commons.logging JAR from plug-ins +save_non_broken_commons_logging () { + log "Save non-broken org.apache.commons.logging JAR from plug-ins." + cp $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar /tmp/org.apache.commons.logging_1.2.0.jar +} + +# Restores the non-broken org.apache.commons.logging JAR to plug-ins +restore_non_broken_commons_logging () { + log "Restores the non-broken org.apache.commons.logging JAR from plug-ins." + cp /tmp/org.apache.commons.logging_1.2.0.jar $ECLIPSE_BASE_PATH/plugins/org.apache.commons.logging_1.2.0.jar + rm /tmp/org.apache.commons.logging_1.2.0.jar +} + # # Script # @@ -257,6 +270,9 @@ fi # Install global Eclipse settings from config file install_global_eclipse_settings +# Save non-broken org.apache.commons.logging JAR from plug-ins +save_non_broken_commons_logging + log "Install Eclipse plug-ins." for p in ${ORDER[@]}; do # Check if eMoflon packages must be skipped (for dev builds). @@ -304,6 +320,9 @@ fi # Remove broken org.apache.commons.logging JAR remove_broken_commons_logging +# Restore non-broken org.apache.commons.logging JAR +restore_non_broken_commons_logging + log "Clean-up old archives and create new archive." rm -f ./$OUTPUT_FILE zip -q -r $OUTPUT_FILE eclipse