From 76b328d04f88b999c2dd399a1feab831944cdf55 Mon Sep 17 00:00:00 2001 From: Mogeko Date: Fri, 19 Nov 2021 16:40:21 +0000 Subject: [PATCH 1/6] feat: update qbittorrent to 4.3.9 --- .gitignore | 3 ++- latest.json | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 52e3aee..7a1b223 100644 --- a/.gitignore +++ b/.gitignore @@ -75,5 +75,6 @@ $RECYCLE.BIN/ # End of https://www.toptal.com/developers/gitignore/api/macos,windows,linux # Custom example dirs -example/config +example/**/* !example/config/qBittorrent.conf +!example/data/.gitkeep diff --git a/latest.json b/latest.json index 7541025..faceeae 100644 --- a/latest.json +++ b/latest.json @@ -1,5 +1,5 @@ { - "qbittorrent": "4.3.8", + "qbittorrent": "4.3.9", "libtorrent": "1.2.14", - "pkgrel": 1 + "pkgrel": 0 } From 889566da1693e402085f097fef26094d25895497 Mon Sep 17 00:00:00 2001 From: Mogeko Date: Fri, 19 Nov 2021 19:23:03 +0000 Subject: [PATCH 2/6] build(ci) enable unstable version of qbittorrent for build.yml --- .github/workflows/build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 81fba07..6ce3116 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,12 +13,16 @@ jobs: runs-on: ubuntu-latest outputs: new_ver: ${{ steps.check_ver.outputs.new_ver }} + latest: ${{ steps.check_ver.outputs.latest }} steps: - name: Check version id: check_ver run: | - NEW_TAG=$(curl -s "${REPO_TAGS}" | grep -Po "release-(\d+\.){2}\d+\.zip" | head -1) - echo "::set-output name=new_ver::${NEW_TAG:8:5}" + NEW_TAG=$(curl -s "${REPO_TAGS}" | grep -Po "(\d+\.)+\d+(|beta\d+|rc\d+)\.zip" | head -1) + if echo "${NEW_TAG%.zip}-r0" | grep -Pq "^(\d+\.)+\d+$"; then + echo "::set-output name=latest::type=raw,latest" + fi + echo "::set-output name=new_ver::${NEW_TAG%.zip}-r0" env: REPO_TAGS: https://github.com/qbittorrent/qBittorrent/tags @@ -44,8 +48,8 @@ jobs: tags: | type=edge type=schedule,pattern={{date 'YYYYMMDD'}} - type=raw,${{ needs.check.outputs.new_ver }}-r0 - type=raw,latest + type=raw,${{ needs.check.outputs.new_ver }} + ${{ needs.check.outputs.latest }} - name: Save status run: echo ${{ toJSON(steps.meta.outputs.json) }} > ${{ github.workspace }}/status.json From eec1215c8fe364a8a1411b86d58e8ce4bc457b80 Mon Sep 17 00:00:00 2001 From: Mogeko Date: Fri, 19 Nov 2021 21:49:50 +0000 Subject: [PATCH 3/6] feat: get the source code from Git --- Dockerfile | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index ea255a8..4b19bb1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,29 @@ FROM alpine:3.14 as libtorrent_builder -RUN apk add --no-cache \ - autoconf automake binutils boost-dev cppunit-dev libtool linux-headers ncurses-dev openssl-dev zlib-dev \ - build-base clang tar +RUN apk add --no-cache autoconf automake boost-dev build-base clang-dev libtool openssl-dev git WORKDIR /workspace ARG LIBTORRENT_VERSION -ADD https://github.com/arvidn/libtorrent/archive/refs/tags/v${LIBTORRENT_VERSION}.tar.gz /workspace -RUN tar -zxf v${LIBTORRENT_VERSION}.tar.gz -C . \ - && cd libtorrent-${LIBTORRENT_VERSION} \ - && ./autotool.sh \ +ARG LIBTORRENT_GIT=https://github.com/arvidn/libtorrent.git +RUN git clone --depth 1 --recurse-submodules -b v${LIBTORRENT_VERSION} ${LIBTORRENT_GIT} . +RUN ./autotool.sh \ && ./configure CXXFLAGS="-std=c++14" --prefix=/workspace/pkg --with-libiconv \ && CC=clang make -j$(nproc) \ && make install-strip FROM alpine:3.14 as qbittorrent_builder -RUN apk add --no-cache \ - boost-dev qt5-qtbase-dev qt5-qttools-dev \ - build-base clang tar - -WORKDIR /workspace +RUN apk add --no-cache boost-dev qt5-qtbase-dev qt5-qttools-dev build-base clang git COPY --from=libtorrent_builder /workspace/pkg /usr +WORKDIR /workspace + ARG QBITTORRENT_VERSION -ADD https://github.com/qbittorrent/qBittorrent/archive/refs/tags/release-${QBITTORRENT_VERSION}.tar.gz /workspace -RUN tar -zxf release-${QBITTORRENT_VERSION}.tar.gz -C . \ - && cd qBittorrent-release-${QBITTORRENT_VERSION} \ - && ./configure --prefix=/workspace/pkg --disable-gui \ +ARG QBITTORRENT_GIT=https://github.com/qbittorrent/qBittorrent.git +RUN git clone --depth 1 --recurse-submodules -b release-${QBITTORRENT_VERSION} ${QBITTORRENT_GIT} . +RUN ./configure --prefix=/workspace/pkg --disable-gui \ && CC=clang make -j$(nproc) \ && make install @@ -37,8 +31,8 @@ FROM alpine:3.14 RUN apk add --no-cache busybox libgcc openssl qt5-qtbase zlib -COPY --from=libtorrent_builder /workspace/pkg /usr COPY --from=qbittorrent_builder /workspace/pkg /usr +COPY --from=libtorrent_builder /workspace/pkg /usr ADD --chown=1000:100 root / From 9d285a66963cb126080b7e53553113ff9b0dab43 Mon Sep 17 00:00:00 2001 From: Mogeko Date: Fri, 19 Nov 2021 23:51:47 +0000 Subject: [PATCH 4/6] feat: compiler by cmake --- Dockerfile | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4b19bb1..320b371 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,21 @@ FROM alpine:3.14 as libtorrent_builder -RUN apk add --no-cache autoconf automake boost-dev build-base clang-dev libtool openssl-dev git +RUN apk add --no-cache boost-dev build-base clang-dev cmake libtool openssl-dev git WORKDIR /workspace ARG LIBTORRENT_VERSION ARG LIBTORRENT_GIT=https://github.com/arvidn/libtorrent.git RUN git clone --depth 1 --recurse-submodules -b v${LIBTORRENT_VERSION} ${LIBTORRENT_GIT} . -RUN ./autotool.sh \ - && ./configure CXXFLAGS="-std=c++14" --prefix=/workspace/pkg --with-libiconv \ +RUN cmake . -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/workspace/pkg \ + -DCMAKE_CXX_STANDARD=17 \ && CC=clang make -j$(nproc) \ - && make install-strip + && make install FROM alpine:3.14 as qbittorrent_builder -RUN apk add --no-cache boost-dev qt5-qtbase-dev qt5-qttools-dev build-base clang git +RUN apk add --no-cache boost-dev build-base clang-dev cmake qt5-qtbase-dev qt5-qttools-dev git COPY --from=libtorrent_builder /workspace/pkg /usr @@ -23,7 +24,11 @@ WORKDIR /workspace ARG QBITTORRENT_VERSION ARG QBITTORRENT_GIT=https://github.com/qbittorrent/qBittorrent.git RUN git clone --depth 1 --recurse-submodules -b release-${QBITTORRENT_VERSION} ${QBITTORRENT_GIT} . -RUN ./configure --prefix=/workspace/pkg --disable-gui \ +RUN cmake . -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_PREFIX=/workspace/pkg \ + -DCMAKE_CXX_STANDARD=17 \ + -DSTACKTRACE=OFF \ + -DGUI=OFF \ && CC=clang make -j$(nproc) \ && make install From 747e5652acdc665a636a4c6695b7afb9b832a5e5 Mon Sep 17 00:00:00 2001 From: Mogeko Date: Fri, 19 Nov 2021 23:52:33 +0000 Subject: [PATCH 5/6] build(ci) enable unstable version of qbittorrent --- .github/workflows/auto-update.yml | 15 +++++++++------ .github/workflows/build.yml | 2 +- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index c66d3a5..79420ec 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -11,10 +11,11 @@ jobs: check: runs-on: ubuntu-latest outputs: - is_new: ${{ steps.check_ver.outputs.is_new }} img_ver: ${{ steps.check_ver.outputs.img_ver }} qbt_ver: ${{ steps.check_ver.outputs.qbt_ver }} lib_ver: ${{ steps.check_ver.outputs.lib_ver }} + is_new: ${{ steps.check_ver.outputs.is_new }} + latest: ${{ steps.check_ver.outputs.latest }} steps: - name: Checkout uses: actions/checkout@v2 @@ -24,15 +25,17 @@ jobs: - name: Check version id: check_ver run: | - OLD_VER=$(curl -s "${GHCR_URL}" | grep -Po "(\d+\.){2}\d+\-r\d+" | head -1) - NEW_TAG=$(curl -s "${REPO_TAGS}" | grep -Po "release-(\d+\.){2}\d+\.zip" | head -1) + OLD_VER=$(curl -s "${GHCR_URL}" | grep -Po "(\d+\.)+\d+(|beta\d+|rc\d+)-r\d+" | head -1) + NEW_TAG=$(curl -s "${REPO_TAGS}" | grep -Po "(\d+\.)+\d+(|beta\d+|rc\d+)\.zip" | head -1) LIB_VER=$(jq -r '.libtorrent' ./latest.json) QBT_VER=$(jq -r '.qbittorrent' ./latest.json) PKG_REL=$(jq -r '.pkgrel' ./latest.json) - if [ ${{ github.event_name }} == 'push' ]; then + if echo "${NEW_TAG%.zip}" | grep -Pq "^(\d+\.){2}\d+$"; then + echo "::set-output name=latest::type=raw,latest" + elif [ ${{ github.event_name }} == 'push' ]; then IMG_VER="${QBT_VER}-r${PKG_REL}" else - QBT_VER="${NEW_TAG:8:5}" + QBT_VER="${NEW_TAG%.zip}" IMG_VER="${QBT_VER}-r0" fi IS_NEW=$([[ "${IMG_VER}" != "${OLD_VER}" ]] && echo "yes" || echo "no") @@ -78,7 +81,7 @@ jobs: type=edge type=schedule,pattern={{date 'YYYYMMDD'}} type=raw,${{ needs.check.outputs.img_ver }} - type=raw,latest + ${{ needs.check.outputs.latest }} - name: Build and push Docker image id: build diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ce3116..a9e375c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: id: check_ver run: | NEW_TAG=$(curl -s "${REPO_TAGS}" | grep -Po "(\d+\.)+\d+(|beta\d+|rc\d+)\.zip" | head -1) - if echo "${NEW_TAG%.zip}-r0" | grep -Pq "^(\d+\.)+\d+$"; then + if echo "${NEW_TAG%.zip}" | grep -Pq "^(\d+\.){2}\d+$"; then echo "::set-output name=latest::type=raw,latest" fi echo "::set-output name=new_ver::${NEW_TAG%.zip}-r0" From 123c1533eb2876678bda4ecd38b011d65c795bc5 Mon Sep 17 00:00:00 2001 From: Mogeko Date: Fri, 19 Nov 2021 23:54:20 +0000 Subject: [PATCH 6/6] feat: update qbittorrent version to 4.4.0beta1 --- latest.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/latest.json b/latest.json index faceeae..09936ec 100644 --- a/latest.json +++ b/latest.json @@ -1,5 +1,5 @@ { - "qbittorrent": "4.3.9", - "libtorrent": "1.2.14", + "qbittorrent": "4.4.0beta1", + "libtorrent": "2.0.4", "pkgrel": 0 }