From df2b39f00676c9b544b4b4ba5f0962a91cd48843 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Tue, 10 Sep 2024 15:44:47 -0500 Subject: [PATCH] Adding new refactored packager, some clean up, shasums, etc --- .github/workflows/amoy_deb_profiles.yml | 153 +++++ .github/workflows/mainnet_deb_profiles.yml | 178 ++++++ .github/workflows/packager.yml | 531 ------------------ .github/workflows/packager_deb.yml | 131 +++++ .gitignore | 2 + packaging/deb/heimdallcli/DEBIAN/control | 12 - packaging/deb/heimdalld/DEBIAN/control | 15 +- packaging/deb/heimdalld/DEBIAN/postinst | 10 +- packaging/deb/heimdalld/DEBIAN/prerm | 2 +- .../config/priv_validator_state.json | 5 + packaging/templates/package_scripts/control | 12 - .../templates/package_scripts/control.arm64 | 12 - .../package_scripts/control.profile.amd64 | 12 - .../package_scripts/control.profile.arm64 | 12 - .../package_scripts/control.validator | 4 +- .../package_scripts/control.validator.arm64 | 14 - packaging/templates/package_scripts/postinst | 12 +- .../templates/package_scripts/postinst.arm64 | 12 - .../package_scripts/postinst.profile | 2 +- .../package_scripts/postinst.validator.arm64 | 5 - .../templates/package_scripts/postrm.binary | 5 - .../templates/package_scripts/postrm.profile | 8 + packaging/templates/package_scripts/preinst | 2 + packaging/templates/package_scripts/prerm | 2 +- 24 files changed, 498 insertions(+), 655 deletions(-) create mode 100644 .github/workflows/amoy_deb_profiles.yml create mode 100644 .github/workflows/mainnet_deb_profiles.yml delete mode 100644 .github/workflows/packager.yml create mode 100644 .github/workflows/packager_deb.yml create mode 100644 packaging/templates/config/priv_validator_state.json delete mode 100755 packaging/templates/package_scripts/control delete mode 100755 packaging/templates/package_scripts/control.arm64 delete mode 100755 packaging/templates/package_scripts/control.profile.amd64 delete mode 100755 packaging/templates/package_scripts/control.profile.arm64 delete mode 100755 packaging/templates/package_scripts/control.validator.arm64 delete mode 100755 packaging/templates/package_scripts/postinst.arm64 delete mode 100755 packaging/templates/package_scripts/postinst.validator.arm64 delete mode 100755 packaging/templates/package_scripts/postrm.binary create mode 100755 packaging/templates/package_scripts/postrm.profile diff --git a/.github/workflows/amoy_deb_profiles.yml b/.github/workflows/amoy_deb_profiles.yml new file mode 100644 index 000000000..384d0c74b --- /dev/null +++ b/.github/workflows/amoy_deb_profiles.yml @@ -0,0 +1,153 @@ +name: amoy_deb_profiles + +on: + push: + branches: + - 'main' + paths: + - '**' + tags: + - 'v*.*.*' + - 'v*.*.*-*' + +jobs: + build: + permissions: + id-token: write + contents: write + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Variables + - name: Adding TAG to ENV + run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV + - name: adding version + run: | + NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) + echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV + + + - name: Making directory structure for yaml + run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall + - name: making directory structure for the systemd + run: mkdir -p packaging/deb/heimdalld/lib/systemd/system + - name: delete old control file + run: rm -rf packaging/deb/heimdalld/DEBIAN/control + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall-profile" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: all" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall profile package" >> packaging/deb/heimdalld/DEBIAN/control + +#### Sentry Profiles #### + - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-amoy-sentry.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: amoy + +### Validator Profiles ### + - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN//postinst + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Copying postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: amoy + + # Shasum + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: sentry + NETWORK: amoy + + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: validator + NETWORK: amoy + + ############ Check and Upload ########################## + - name: Confirming package built + run: ls -ltr packaging/deb/ | grep heimdall + + - name: Release heimdall Packages + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.GIT_TAG }} + prerelease: true + files: | + packaging/deb/heimdall-amoy-**.deb + packaging/deb/heimdall-amoy-**.deb.checksum + + + + + + + + + + + diff --git a/.github/workflows/mainnet_deb_profiles.yml b/.github/workflows/mainnet_deb_profiles.yml new file mode 100644 index 000000000..767c13ba2 --- /dev/null +++ b/.github/workflows/mainnet_deb_profiles.yml @@ -0,0 +1,178 @@ +name: mainnet_deb_profiles + +on: + push: + branches: + - 'main' + paths: + - '**' + tags: + - 'v*.*.*' + - 'v*.*.*-*' + +jobs: + build: + permissions: + id-token: write + contents: write + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Variables + - name: Adding TAG to ENV + run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV + - name: adding version + run: | + NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) + echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV + + + - name: Making directory structure for yaml + run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall + - name: making directory structure for the systemd + run: mkdir -p packaging/deb/heimdalld/lib/systemd/system + - name: delete old control file + run: rm -rf packaging/deb/heimdalld/DEBIAN/control + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall-profile" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: all" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall profile package" >> packaging/deb/heimdalld/DEBIAN/control + +#### Sentry Profiles #### + - name: Setting up ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the prerm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/prerm packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/prerm + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-mainnet-sentry.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Building ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + +### Validator Profiles ### + - name: Prepping heimdall ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying Postinstall script for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying the prerm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/prerm packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/prerm + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying the postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-mainnet-validator.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Building heimdall ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: mainnet + + # Shasum + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: validator + NETWORK: mainnet + + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + + + ############ Check and Upload ########################## + - name: Confirming package built + run: ls -ltr packaging/deb/ | grep heimdall + + - name: Release heimdall Packages + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.GIT_TAG }} + prerelease: true + files: | + packaging/deb/heimdall-mainnet-**.deb + packaging/deb/heimdall-mainnet-**.deb.checksum + + + + + + + + + + + diff --git a/.github/workflows/packager.yml b/.github/workflows/packager.yml deleted file mode 100644 index e26892a14..000000000 --- a/.github/workflows/packager.yml +++ /dev/null @@ -1,531 +0,0 @@ -name: packager - -on: - push: - tags: - - 'v*.*.*' - - 'v*.*.*-*' - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@master - with: - go-version: 1.22.x - - name: Adding TAG to ENV - run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV - - - name: Making heimdalld / heimdallcli for ${{ env.ARCH }} - run: make build - env: - ARCH: amd64 - - - name: Making directory structure - run: mkdir -p packaging/deb/heimdalld/usr/bin - - - name: Copying over the postinst for use - run: cp -rp packaging/templates/package_scripts/postinst packaging/deb/heimdalld/DEBIAN/postinst - - - name: Copying heimdalld binary for amd64 - run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ - - name: Copying heimdallcli for amd64 - run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ - - - name: copying files over to create package for binary only heimdalld and heimdallci - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - - name: Building package for heimdalld and heimdallcli standalone - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - - - name: Removing heimdalld binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdalld - - name: Removing heimdallcli binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdallcli - - - name: making directory structure for systemd - run: mkdir -p packaging/deb/heimdalld/lib/systemd/system - - name: Making directory structure for toml - run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall - - - name: Adding a postrm for the profiles so not to remove heimdall - run: cp -rp packaging/templates/package_scripts/postrm packaging/deb/heimdalld/DEBIAN/postrm - - - name: Setting up heimdalld for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Copying over the postinst file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Copying profile control file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - - name: Setting up heimdalld for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Copying over the postinst file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.amoy packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Copying profile control file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - - name: Setting up heimdalld for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Copying over the postinst file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Copying over mainnet systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.amoy packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - - name: Updating the apt-get - run: sudo apt-get update -y - - - name: Installing deps - run: sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu - - - name: Build heimdalld / heimdallcli for ${{ env.ARCH }} - run: make build-arm - env: - ARCH: arm64 - - - name: Setting up heimdallcli for ${{ env.ARCH }} - run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ - env: - ARCH: arm64 - - name: Remove config toml directory - run: rm -rf packaging/deb/heimdalld/var/lib/heimdall - - name: Copying over heimdalld - run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ - - name: Setting up the heimdallcli control file for use with ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.heimdallcli.arm64 packaging/deb/heimdallcli/DEBIAN/control - env: - ARCH: arm64 - - name: Adding a postrm for the profiles so not to remove heimdall - run: cp -rp packaging/templates/package_scripts/postrm.binary packaging/deb/heimdalld/DEBIAN/postrm - - name: Setting up required heimdalld files for ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - - name: Copying control file for ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.arm64 packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - - name: Copying binary post inst - run: cp -rp packaging/templates/package_scripts/postinst.arm64 packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - - name: Building package for heimdalld and heimdallcli standalone for ${{ env.ARCH }} - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - - - name: Removing heimdall binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdalld - - name: Removing heimdallcli binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdallcli - - - name: Making directory structure for toml - run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall - - name: Adding a postrm for the profiles so not to remove heimdall - run: cp -rp packaging/templates/package_scripts/postrm packaging/deb/heimdalld/DEBIAN/postrm - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN//postinst - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.amoy packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN//postinst - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying control for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying control for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Copying over mainnet systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - - name: Confirming package built - run: ls -ltr packaging/deb/ | grep heimdall - - name: Release heimdalld.deb - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ env.GIT_TAG }} - prerelease: true - files: | - packaging/deb/heimdalld**.deb - binary/heimdall* diff --git a/.github/workflows/packager_deb.yml b/.github/workflows/packager_deb.yml new file mode 100644 index 000000000..262ec559a --- /dev/null +++ b/.github/workflows/packager_deb.yml @@ -0,0 +1,131 @@ +name: packager_deb + +on: + push: + branches: + - 'main' + paths: + - '**' + tags: + - 'v*.*.*' + - 'v*.*.*-*' + +jobs: + build: + permissions: + id-token: write + contents: write + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@master + with: + go-version: 1.20.x + # Variables + - name: Adding TAG to ENV + run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV + - name: adding version + run: | + NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) + echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV + + - name: Cleaning repo + run: make clean + - name: Building for amd64 + run: make build + + - name: Making directory structure + run: mkdir -p packaging/deb/heimdalld/usr/bin + - name: Copying necessary heimdalld files + run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ + - name: copying necessary heimdallcli + run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: amd64" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall binary package" >> packaging/deb/heimdalld/DEBIAN/control + + - name: Creating package for binary for heimdall ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: amd64 + + - name: Running package build + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: amd64 + + - name: Cleaning build directory for arm64 build + run: make clean + + - name: Updating the apt-get + run: sudo apt-get update -y + + - name: Adding requirements for cross compile + run: sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu + + - name: delete amd64 control file + run: rm -rf packaging/deb/heimdalld/DEBIAN/control + + - name: Building heimdall for arm64 + run: make build-arm + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: arm64" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall binary package" >> packaging/deb/heimdalld/DEBIAN/control + + - name: Copying necessary heimdalldfiles + run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ + - name: copying necessary heimdallcli + run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ + + + - name: Creating package for binary for heimdall ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: arm64 + + - name: Running package build + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: arm64 + + # Shasum + - name: shasum the heimdall debian package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: amd64 + + - name: shasum the heimdall debian package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: arm64 + + - name: Release heimdall Packages + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.GIT_TAG }} + prerelease: true + files: | + packaging/deb/heimdall**.deb + packaging/deb/heimdall**.deb.checksum \ No newline at end of file diff --git a/.gitignore b/.gitignore index 14730da24..fa3b83cec 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ data/ dist/ .dccache +.idea/ +.idea* diff --git a/packaging/deb/heimdallcli/DEBIAN/control b/packaging/deb/heimdallcli/DEBIAN/control index aade7cd70..e69de29bb 100644 --- a/packaging/deb/heimdallcli/DEBIAN/control +++ b/packaging/deb/heimdallcli/DEBIAN/control @@ -1,12 +0,0 @@ -Source: heimdallcli -Version: -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdallcli -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the Heimdall CLI package from Polygon Technology. \ No newline at end of file diff --git a/packaging/deb/heimdalld/DEBIAN/control b/packaging/deb/heimdalld/DEBIAN/control index 795e7502e..139597f9c 100644 --- a/packaging/deb/heimdalld/DEBIAN/control +++ b/packaging/deb/heimdalld/DEBIAN/control @@ -1,15 +1,2 @@ -Source: heimdalld -Section: develop -Priority: Testing -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Standards-Version: v1.0.7 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld -Version: 1.0.7 -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the control file for the Polygon project known as heimdall. This project can have multiple iterations and more details can be found in the official Github Page: https://github.com/maticnetwork/heimdall + diff --git a/packaging/deb/heimdalld/DEBIAN/postinst b/packaging/deb/heimdalld/DEBIAN/postinst index 01504b4c9..c1115c902 100755 --- a/packaging/deb/heimdalld/DEBIAN/postinst +++ b/packaging/deb/heimdalld/DEBIAN/postinst @@ -2,11 +2,13 @@ # This is a postinstallation script so the service can be configured and started when requested # #sudo systemctl daemon-reload +export HEIMDALL_DIR=/var/lib/heimdall sudo adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent heimdall -if [ -d "/var/lib/heimdall" ] +if [ -d "$HEIMDALL_DIR" ] then - echo "Directory /var/lib/heimdall exists." + echo "Directory $HEIMDALL_DIR exists." + sudo chown -R heimdall $HEIMDALL_DIR else - mkdir -p /var/lib/heimdall - sudo chown -R heimdall /var/lib/heimdall + mkdir -p $HEIMDALL_DIR + sudo chown -R heimdall $HEIMDALL_DIR fi diff --git a/packaging/deb/heimdalld/DEBIAN/prerm b/packaging/deb/heimdalld/DEBIAN/prerm index 37d3ffd90..0946b7eb0 100755 --- a/packaging/deb/heimdalld/DEBIAN/prerm +++ b/packaging/deb/heimdalld/DEBIAN/prerm @@ -4,4 +4,4 @@ ################## # Stops existing for upgrade ################# -sudo systemctl stop heimdalld.service +#sudo systemctl stop heimdalld.service diff --git a/packaging/templates/config/priv_validator_state.json b/packaging/templates/config/priv_validator_state.json new file mode 100644 index 000000000..ca3ad2f74 --- /dev/null +++ b/packaging/templates/config/priv_validator_state.json @@ -0,0 +1,5 @@ +{ + "height": "0", + "round": "0", + "step": 0 +} \ No newline at end of file diff --git a/packaging/templates/package_scripts/control b/packaging/templates/package_scripts/control deleted file mode 100755 index 3b20a23dc..000000000 --- a/packaging/templates/package_scripts/control +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.arm64 b/packaging/templates/package_scripts/control.arm64 deleted file mode 100755 index ab1ebbd1b..000000000 --- a/packaging/templates/package_scripts/control.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld -Architecture: arm64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.profile.amd64 b/packaging/templates/package_scripts/control.profile.amd64 deleted file mode 100755 index 998919b94..000000000 --- a/packaging/templates/package_scripts/control.profile.amd64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld-profile -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld-profile -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.profile.arm64 b/packaging/templates/package_scripts/control.profile.arm64 deleted file mode 100755 index ccc03c727..000000000 --- a/packaging/templates/package_scripts/control.profile.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld-profile -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld-profile -Architecture: arm64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.validator b/packaging/templates/package_scripts/control.validator index f39277b13..89b4a8de5 100755 --- a/packaging/templates/package_scripts/control.validator +++ b/packaging/templates/package_scripts/control.validator @@ -3,11 +3,11 @@ Section: develop Priority: Testing Maintainer: Polygon Build-Depends: debhelper-compat (= 13) -Standards-Version: v1.0.7 +Standards-Version: v1.0.3 Homepage: https://polygon.technology Rules-Requires-Root: no Package: heimdalld-profile -Version: 1.0.7 +Version: 1.0.3 Architecture: amd64 Multi-Arch: foreign Depends: rabbitmq-server diff --git a/packaging/templates/package_scripts/control.validator.arm64 b/packaging/templates/package_scripts/control.validator.arm64 deleted file mode 100755 index b4da0046d..000000000 --- a/packaging/templates/package_scripts/control.validator.arm64 +++ /dev/null @@ -1,14 +0,0 @@ -Source: heimdalld-profile -Section: develop -Priority: Testing -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Standards-Version: v1.0.7 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld-profile -Version: 1.0.7 -Architecture: arm64 -Multi-Arch: foreign -Depends: rabbitmq-server -Description: This is the control file for the Polygon project known as heimdall. This project can have multiple iterations and more details can be found in the official Github Page: https://github.com/maticnetwork/heimdall diff --git a/packaging/templates/package_scripts/postinst b/packaging/templates/package_scripts/postinst index ae1de73a0..64425bf9a 100755 --- a/packaging/templates/package_scripts/postinst +++ b/packaging/templates/package_scripts/postinst @@ -1,11 +1,13 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # +export HEIMDALL_DIR=/var/lib/heimdall sudo adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent heimdall -if [ -d "/var/lib/heimdall" ] +if [ -d "$HEIMDALL_DIR" ] then - echo "Directory /var/lib/heimdall exists." + echo "Directory $HEIMDALL_DIR exists." + sudo chown -R heimdall $HEIMDALL_DIR else - mkdir -p /var/lib/heimdall - sudo chown -R heimdall /var/lib/heimdall -fi + mkdir -p $HEIMDALL_DIR + sudo chown -R heimdall $HEIMDALL_DIR +fi \ No newline at end of file diff --git a/packaging/templates/package_scripts/postinst.arm64 b/packaging/templates/package_scripts/postinst.arm64 deleted file mode 100755 index 638b0394c..000000000 --- a/packaging/templates/package_scripts/postinst.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# This is a postinstallation script so the service can be configured and started when requested -# -sudo adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent heimdall -if [ -d "/var/lib/heimdall" ] -then - echo "Directory /var/lib/heimdall exists." -else - mkdir -p /var/lib/heimdall - sudo chown -R heimdall /var/lib/heimdall -fi -sudo chown -R heimdall /var/lib/heimdall diff --git a/packaging/templates/package_scripts/postinst.profile b/packaging/templates/package_scripts/postinst.profile index 9a9082994..c428aa2e5 100755 --- a/packaging/templates/package_scripts/postinst.profile +++ b/packaging/templates/package_scripts/postinst.profile @@ -1,5 +1,5 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # -sudo -u heimdall heimdalld init --chain=mumbai --home /var/lib/heimdall +sudo -u heimdall heimdalld init --chain=amoy --home /var/lib/heimdall sudo systemctl daemon-reload \ No newline at end of file diff --git a/packaging/templates/package_scripts/postinst.validator.arm64 b/packaging/templates/package_scripts/postinst.validator.arm64 deleted file mode 100755 index 1715504bb..000000000 --- a/packaging/templates/package_scripts/postinst.validator.arm64 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# This is a postinstallation script so the service can be configured and started when requested -# -sudo -u heimdall heimdalld init --chain=mumbai --home /var/lib/heimdall -sudo systemctl daemon-reload diff --git a/packaging/templates/package_scripts/postrm.binary b/packaging/templates/package_scripts/postrm.binary deleted file mode 100755 index 4bf49a2ff..000000000 --- a/packaging/templates/package_scripts/postrm.binary +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# -################### -# Remove heimdall installation -################### \ No newline at end of file diff --git a/packaging/templates/package_scripts/postrm.profile b/packaging/templates/package_scripts/postrm.profile new file mode 100755 index 000000000..2dc7e21cc --- /dev/null +++ b/packaging/templates/package_scripts/postrm.profile @@ -0,0 +1,8 @@ +#!/bin/bash +# +################### +# Remove heimdall profile installation +################### +sudo rm /var/lib/heimdall/config/heimdall-config.toml +sudo rm /var/lib/heimdall/config/config.toml +sudo systemctl daemon-reload \ No newline at end of file diff --git a/packaging/templates/package_scripts/preinst b/packaging/templates/package_scripts/preinst index 0946b7eb0..f36163db8 100755 --- a/packaging/templates/package_scripts/preinst +++ b/packaging/templates/package_scripts/preinst @@ -3,5 +3,7 @@ # ################## # Stops existing for upgrade +export HEIMDALL_DIR=/var/lib/heimdall +sudo chown -R heimdall $HEIMDALL_DIR ################# #sudo systemctl stop heimdalld.service diff --git a/packaging/templates/package_scripts/prerm b/packaging/templates/package_scripts/prerm index 37d3ffd90..0946b7eb0 100755 --- a/packaging/templates/package_scripts/prerm +++ b/packaging/templates/package_scripts/prerm @@ -4,4 +4,4 @@ ################## # Stops existing for upgrade ################# -sudo systemctl stop heimdalld.service +#sudo systemctl stop heimdalld.service