diff --git a/.github/workflows/build.yml b/.github/workflows/ci_sfos.latest-aarch64-armv7hl-i486.yml similarity index 59% rename from .github/workflows/build.yml rename to .github/workflows/ci_sfos.latest-aarch64-armv7hl-i486.yml index 5e7d4249c..02c357466 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/ci_sfos.latest-aarch64-armv7hl-i486.yml @@ -1,44 +1,54 @@ -name: Github CI build +name: CI on SFOS-latest (aarch64,armv7hl,i486) on: push: tags: - '*' - pull_request: - branches: - - master - - patchmanager3 env: - RELEASE: 4.0.1.45 + RELEASE: latest jobs: build: - runs-on: ubuntu-latest - + runs-on: ubuntu-22.04 + env: + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v3 - name: Prepare run: mkdir output - - name: Build armv7hl + # Caching Docker images is not ready yet, see + # https://github.com/storeman-developers/harbour-storeman-installer/blob/devel/cache-docker-images_github-ci.md + #- name: Cache Docker images of the Sailfish-SDK + # id: cache-sdk + # uses: actions/cache@v3 + # with: + # path: $GITHUB_WORKSPACE/… + # key: cache + + - name: Build aarch64 + # mb2 wants bash: https://github.com/sailfishos/sdk-setup/blob/master/sdk-setup/src/mb2#L1 run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " mkdir -p build ; cd build ; cp -r /share/* . ; - mb2 -t SailfishOS-$RELEASE-armv7hl build --enable-debug ; + mb2 -t SailfishOS-$RELEASE-aarch64 build --enable-debug ; sudo cp -r RPMS/*.rpm /share/output" - - name: Build aarch64 + - name: Build armv7hl + # mb2 wants bash: https://github.com/sailfishos/sdk-setup/blob/master/sdk-setup/src/mb2#L1 run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " mkdir -p build ; cd build ; cp -r /share/* . ; - mb2 -t SailfishOS-$RELEASE-aarch64 build --enable-debug ; + mb2 -t SailfishOS-$RELEASE-armv7hl build --enable-debug ; sudo cp -r RPMS/*.rpm /share/output" - name: Build i486 + # mb2 wants bash: https://github.com/sailfishos/sdk-setup/blob/master/sdk-setup/src/mb2#L1 run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " mkdir -p build ; cd build ; @@ -47,21 +57,20 @@ jobs: sudo cp -r RPMS/*.rpm /share/output" - name: Upload build result - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: output-rpms - path: output + path: output/ - name: Create release if: contains(github.ref, 'release') run: | set -x - assets=() + assets="" for asset in output/*.rpm; do - assets+=("-a" "$asset") + assets="$assets -a $asset" done tag_name="${GITHUB_REF##*/}" - hub release create "${assets[@]}" -m "$tag_name" "$tag_name" + hub release create"$assets" -m "$tag_name" "$tag_name" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - diff --git a/.github/workflows/ci_sfos3.4.0-armv7hl.yml b/.github/workflows/ci_sfos3.4.0-armv7hl.yml new file mode 100644 index 000000000..3020faf7a --- /dev/null +++ b/.github/workflows/ci_sfos3.4.0-armv7hl.yml @@ -0,0 +1,62 @@ +name: CI on SFOS 3.4.0 (armv7hl) + +on: + push: + tags: + - '*' + pull_request: + branches: + - master + - patchmanager3 + +env: + RELEASE: 3.4.0.24 + +jobs: + build: + runs-on: ubuntu-22.04 + env: + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Prepare + run: mkdir output + + # Caching Docker images is not ready yet, see + # https://github.com/storeman-developers/harbour-storeman-installer/blob/devel/cache-docker-images_github-ci.md + #- name: Cache Docker images of the Sailfish-SDK + # id: cache-sdk + # uses: actions/cache@v3 + # with: + # path: $GITHUB_WORKSPACE/… + # key: cache + + - name: Build armv7hl + # mb2 wants bash: https://github.com/sailfishos/sdk-setup/blob/master/sdk-setup/src/mb2#L1 + run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " + mkdir -p build ; + cd build ; + cp -r /share/* . ; + mb2 -t SailfishOS-$RELEASE-armv7hl build --enable-debug ; + sudo cp -r RPMS/*.rpm /share/output" + + - name: Upload build result + uses: actions/upload-artifact@v3 + with: + name: output-rpms + path: output/ + + - name: Create release + if: contains(github.ref, 'release') + run: | + set -x + assets="" + for asset in output/*.rpm; do + assets="$assets -a $asset" + done + tag_name="${GITHUB_REF##*/}" + hub release create"$assets" -m "$tag_name" "$tag_name" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci_sfos3.4.0-i486.yml b/.github/workflows/ci_sfos3.4.0-i486.yml new file mode 100644 index 000000000..edd4ca94a --- /dev/null +++ b/.github/workflows/ci_sfos3.4.0-i486.yml @@ -0,0 +1,58 @@ +name: CI on SFOS 3.4.0 (i486) + +on: + push: + tags: + - '*' + +env: + RELEASE: 3.4.0.24 + +jobs: + build: + runs-on: ubuntu-22.04 + env: + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Prepare + run: mkdir output + + # Caching Docker images is not ready yet, see + # https://github.com/storeman-developers/harbour-storeman-installer/blob/devel/cache-docker-images_github-ci.md + #- name: Cache Docker images of the Sailfish-SDK + # id: cache-sdk + # uses: actions/cache@v3 + # with: + # path: $GITHUB_WORKSPACE/… + # key: cache + + - name: Build i486 + # mb2 wants bash: https://github.com/sailfishos/sdk-setup/blob/master/sdk-setup/src/mb2#L1 + run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " + mkdir -p build ; + cd build ; + cp -r /share/* . ; + mb2 -t SailfishOS-$RELEASE-i486 build --enable-debug ; + sudo cp -r RPMS/*.rpm /share/output" + + - name: Upload build result + uses: actions/upload-artifact@v3 + with: + name: output-rpms + path: output/ + + - name: Create release + if: contains(github.ref, 'release') + run: | + set -x + assets="" + for asset in output/*.rpm; do + assets="$assets -a $asset" + done + tag_name="${GITHUB_REF##*/}" + hub release create"$assets" -m "$tag_name" "$tag_name" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci_sfos4.0.1-aarch64.yml b/.github/workflows/ci_sfos4.0.1-aarch64.yml new file mode 100644 index 000000000..9225296fb --- /dev/null +++ b/.github/workflows/ci_sfos4.0.1-aarch64.yml @@ -0,0 +1,58 @@ +name: CI on SFOS 4.0.1 (aarch64) + +on: + push: + tags: + - '*' + +env: + RELEASE: 4.0.1.45 + +jobs: + build: + runs-on: ubuntu-22.04 + env: + SEGMENT_DOWNLOAD_TIMEOUT_MINS: 3 + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Prepare + run: mkdir output + + # Caching Docker images is not ready yet, see + # https://github.com/storeman-developers/harbour-storeman-installer/blob/devel/cache-docker-images_github-ci.md + #- name: Cache Docker images of the Sailfish-SDK + # id: cache-sdk + # uses: actions/cache@v3 + # with: + # path: $GITHUB_WORKSPACE/… + # key: cache + + - name: Build aarch64 + # mb2 wants bash: https://github.com/sailfishos/sdk-setup/blob/master/sdk-setup/src/mb2#L1 + run: docker run --rm --privileged -v $PWD:/share coderus/sailfishos-platform-sdk:$RELEASE /bin/bash -c " + mkdir -p build ; + cd build ; + cp -r /share/* . ; + mb2 -t SailfishOS-$RELEASE-aarch64 build --enable-debug ; + sudo cp -r RPMS/*.rpm /share/output" + + - name: Upload build result + uses: actions/upload-artifact@v3 + with: + name: output-rpms + path: output/ + + - name: Create release + if: contains(github.ref, 'release') + run: | + set -x + assets="" + for asset in output/*.rpm; do + assets="$assets -a $asset" + done + tag_name="${GITHUB_REF##*/}" + hub release create"$assets" -m "$tag_name" "$tag_name" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/rpm/patchmanager.spec b/rpm/patchmanager.spec index 2c922b5c6..2b80c9cd4 100644 --- a/rpm/patchmanager.spec +++ b/rpm/patchmanager.spec @@ -141,13 +141,13 @@ case "$1" in ;; [2-9]) # Update echo "Updating %{name}: %%pre section" - # Unapply all patches if Patchmanager 2.x is installed + # Disable and deactivate ("unapply") all Patches if Patchmanager 2.x is installed if [ -d /var/lib/patchmanager/ausmt/patches/ ] then - /usr/sbin/patchmanager --unapply-all || true + /usr/sbin/patchmanager --unapply-all if [ -n "$(ls -A /var/lib/patchmanager/ausmt/patches/)" ] then - echo "Unapply all patches before updating %{name}!" + echo "Do disable ("unapply") all Patches: %{name} must not be updated unless all Patches are inactive!" exit 1 # An exit N with N ≠ 0 in a %%pre scriptlet might not constitute an # appropriate way to terminate an update (here: from PM2 to PM3), see e.g., # https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_syntax diff --git a/src/tools/pm_apply b/src/tools/pm_apply index 3ad963b01..49b2ec24a 100644 --- a/src/tools/pm_apply +++ b/src/tools/pm_apply @@ -23,7 +23,7 @@ PATCH_NAME="unified_diff.patch" PATCH_PATH="$PATCH_DIR/$PATCH_NAME" PATCH_EDITED_NAME="unified_diff_${SYS_BITNESS}bit.patch" -# list of candidate paths to attempt 32/64bit library path correction +# list of candidate paths to attempt 32-/64-bit library path correction MANGLE_CANDIDATES="" if [ -z "$DISABLE_MANGLING" ] && [ -r "/etc/patchmanager/manglelist.conf" ] ; then source /etc/patchmanager/manglelist.conf