diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cf0334b..1abc5cf 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -283,6 +283,12 @@ jobs: token: ${{ secrets.BUILD_GITHUB_TOKEN }} submodules: recursive + - name: Setup Procursus + uses: beerpiss/procursus-action@v2.0.2 + with: + cache: true + mirror: 'https://apt.procurs.us/' + - name: Download Pongo uses: actions/download-artifact@v4 with: @@ -307,17 +313,35 @@ jobs: - name: Package run: | - cd build && \ - cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-iphoneos-arm" && \ - cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-iphoneos-arm64" \ - -DCPACK_PACKAGING_INSTALL_PREFIX="/var/jb/usr/local" + cd build + cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-iphoneos-arm" \ + -DCPACK_PACKAGING_INSTALL_PREFIX="/usr/" + cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-iphoneos-arm64" \ + -DCPACK_PACKAGING_INSTALL_PREFIX="/var/jb/usr/" + + mkdir -p palera1n-iphoneos-arm64/DEBIAN + mkdir -p palera1n-iphoneos-arm/DEBIAN + tar -xf palera1n-iphoneos-arm64.tar.gz -C palera1n-iphoneos-arm64 + tar -xf palera1n-iphoneos-arm.tar.gz -C palera1n-iphoneos-arm + cp ../packaging/control palera1n-iphoneos-arm64/DEBIAN/control + cp ../packaging/control palera1n-iphoneos-arm/DEBIAN/control + + VERSION=$(grep '^#define PALERAIN_VERSION' ../src/globals.h | cut -d'"' -f2 | tr -cd '0-9.') + + gsed 's|@DEB_ARCH@|iphoneos-arm|g' -i palera1n-iphoneos-arm/DEBIAN/control + gsed 's|@DEB_ARCH@|iphoneos-arm64|g' -i palera1n-iphoneos-arm64/DEBIAN/control + gsed 's|@DEB_VERSION@|'"$VERSION"'|g' -i palera1n-iphoneos-arm/DEBIAN/control + gsed 's|@DEB_VERSION@|'"$VERSION"'|g' -i palera1n-iphoneos-arm64/DEBIAN/control + + dpkg-deb --build palera1n-iphoneos-arm64 + dpkg-deb --build palera1n-iphoneos-arm - name: Upload uses: actions/upload-artifact@v4 with: name: palera1n-iphoneos-arm64 path: | - build/*.tar.gz + build/*.deb build-macos-universal: runs-on: macos-latest diff --git a/.github/workflows/repo-upload.yml b/.github/workflows/repo-upload.yml new file mode 100644 index 0000000..1374bfe --- /dev/null +++ b/.github/workflows/repo-upload.yml @@ -0,0 +1,45 @@ +name: "Upload debs" + +on: + release: + types: [published] + +jobs: + upload: + runs-on: ubuntu-latest + steps: + - name: Download debs from release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release download "${{ github.event.release.tag_name }}" \ + --pattern "palera1n-iphoneos-arm64.deb" \ + --pattern "palera1n-iphoneos-arm.deb" + + if [ ! -f "palera1n-iphoneos-arm64.deb" ] || [ ! -f "palera1n-iphoneos-arm.deb" ]; then + echo "Debs not found :/" + exit 1 + fi + + - name: Upload debs to repo + if: github.repository == 'palera1n/palera1n' + env: + USERNAME: GitHub-Actions + API_TOKEN: ${{ secrets.BUILD_GITHUB_TOKEN }} + GH_REPO: palera1n/repo.palera.in + run: | + git clone https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git upload + + ARM64_HASH=$(sha256sum palera1n-iphoneos-arm64.deb | cut -c1-8) + ARM_HASH=$(sha256sum palera1n-iphoneos-arm.deb | cut -c1-8) + cp palera1n-iphoneos-arm64.deb upload/pool/iphoneos-arm64/palera1n_${{ github.event.release.tag_name }}_${ARM64_HASH}_iphoneos-arm64.deb + cp palera1n-iphoneos-arm.deb upload/pool/iphoneos-arm/palera1n_${{ github.event.release.tag_name }}_${ARM_HASH}_iphoneos-arm.deb + + cd upload + + git config user.name "github-actions[bot]" + git config user.email "actions@github.com" + + git add . + git commit -m "Update palera1n for ${{ github.event.release.tag_name }}" || exit 0 + git push https://$USERNAME:$API_TOKEN@github.com/$GH_REPO.git diff --git a/packaging/control b/packaging/control new file mode 100644 index 0000000..5149895 --- /dev/null +++ b/packaging/control @@ -0,0 +1,21 @@ +Package: palera1n +Name: palera1n +Version: @DEB_VERSION@ +Architecture: @DEB_ARCH@ +Maintainer: palera1n team +Author: palera1n team +Section: Utilities +Priority: optional +Homepage: https://palera.in +Description: iOS 15.0+ semi-tethered checkm8 jailbreak + palera1n is an iOS/iPadOS 15.0+ semi tethered jailbreak + based on the checkm8 exploit. + . + palera1n is able to jailbreak the device in fakefs-rootful mode, + where / is writable, as well as rootless mode, where / cannot be + written to. + . + IMPORTANT: This does NOT make palera1n untethered or allow you to + jailbreak your current device without a computer. It just allows + you to jailbreak another iDevice using this device, given you have + an appropriate cable. Also, the success rate is likely to be bad.