diff --git a/.github/workflows/redhat_rpm.yml b/.github/workflows/redhat_rpm.yml new file mode 100644 index 0000000..b7d13db --- /dev/null +++ b/.github/workflows/redhat_rpm.yml @@ -0,0 +1,63 @@ +# This is a basic workflow to help you get started with Actions +name: 'RedHat - x86_64 RPM Build' + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: + - main + pull_request: + branches: + - main + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + build: + strategy: + matrix: + node-version: [20] + + # The type of runner that the job will run on + runs-on: ubuntu-24.04 + + steps: + - uses: actions/checkout@v4 + + - name: Cache node modules + uses: actions/cache@v4 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install linux dependencies + run: | + sudo apt-get update + sudo apt-get install -y libgtk-3-dev webkit2gtk-4.0 libappindicator3-dev librsvg2-dev patchelf fakeroot dpkg rpm + + - name: Install Dependencies + run: npm i + + - name: Build the app + run: npm run electron:build:rpm + + - name: Upload DEB artifact + uses: actions/upload-artifact@v4 + with: + name: monerod-gui-redhat-x86_64-installer + path: dist/installers/*.rpm diff --git a/electron-installer-redhat.json b/electron-installer-redhat.json new file mode 100644 index 0000000..55411d2 --- /dev/null +++ b/electron-installer-redhat.json @@ -0,0 +1,14 @@ +{ + "name": "monerod-gui", + "productName": "Monero Daemon", + "genericName": "Cryptocurrency Node Manager", + "version": "1.0.0", + "dest": "dist/installers/", + "icon": "src/assets/icons/favicon.256x256.png", + "categories": [ + "Network" + ], + "lintianOverrides": [ + "changelog-file-missing-in-native-package" + ] +} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5768fd3..e2bc33c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -68,6 +68,7 @@ "electron-builder": "25.1.8", "electron-debug": "4.1.0", "electron-installer-dmg": "5.0.1", + "electron-installer-redhat": "3.4.0", "electron-reloader": "1.2.3", "eslint": "9.14.0", "eslint-plugin-import": "2.31.0", @@ -8684,7 +8685,7 @@ "resolved": "https://registry.npmjs.org/asar/-/asar-3.2.0.tgz", "integrity": "sha512-COdw2ZQvKdFGFxXwX3oYh2/sOsJWJegrdJCGxnN4MZ7IULgRBp9P6665aqj9z1v9VwP4oP1hRBojRDQ//IGgAg==", "deprecated": "Please use @electron/asar moving forward. There is no API change, just a package name change", - "optional": true, + "devOptional": true, "dependencies": { "chromium-pickle-js": "^0.2.0", "commander": "^5.0.0", @@ -12151,7 +12152,7 @@ "version": "0.10.3", "resolved": "https://registry.npmjs.org/electron-installer-common/-/electron-installer-common-0.10.3.tgz", "integrity": "sha512-mYbP+6i+nHMIm0WZHXgGdmmXMe+KXncl6jZYQNcCF9C1WsNA9C5SZ2VP4TLQMSIoFO+X4ugkMEA5uld1bmyEvA==", - "optional": true, + "devOptional": true, "dependencies": { "@malept/cross-spawn-promise": "^1.0.0", "asar": "^3.0.0", @@ -12177,6 +12178,7 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz", "integrity": "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==", + "devOptional": true, "funding": [ { "type": "individual", @@ -12187,7 +12189,6 @@ "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund" } ], - "optional": true, "dependencies": { "cross-spawn": "^7.0.1" }, @@ -12199,7 +12200,7 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "optional": true, + "devOptional": true, "dependencies": { "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", @@ -12381,6 +12382,156 @@ "appdmg": "^0.6.4" } }, + "node_modules/electron-installer-redhat": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/electron-installer-redhat/-/electron-installer-redhat-3.4.0.tgz", + "integrity": "sha512-gEISr3U32Sgtj+fjxUAlSDo3wyGGq6OBx7rF5UdpIgbnpUvMN4W5uYb0ThpnAZ42VEJh/3aODQXHbFS4f5J3Iw==", + "dev": true, + "os": [ + "darwin", + "linux" + ], + "dependencies": { + "@malept/cross-spawn-promise": "^1.0.0", + "debug": "^4.1.1", + "electron-installer-common": "^0.10.2", + "fs-extra": "^9.0.0", + "lodash": "^4.17.15", + "word-wrap": "^1.2.3", + "yargs": "^16.0.2" + }, + "bin": { + "electron-installer-redhat": "src/cli.js" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/electron-installer-redhat/node_modules/@malept/cross-spawn-promise": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz", + "integrity": "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/malept" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/subscription/pkg/npm-.malept-cross-spawn-promise?utm_medium=referral&utm_source=npm_fund" + } + ], + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/electron-installer-redhat/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/electron-installer-redhat/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/electron-installer-redhat/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/electron-installer-redhat/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/electron-installer-redhat/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/electron-installer-redhat/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/electron-installer-redhat/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/electron-installer-redhat/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/electron-installer-windows": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/electron-installer-windows/-/electron-installer-windows-3.0.0.tgz", diff --git a/package.json b/package.json index 439a94d..79b73a8 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,10 @@ "build:prod": "npm run build -- -c production", "electron:package:win": "electron-packager . monerod-gui --platform win32 --arch x64 --out dist/ --ignore=/node_modules --ignore=/e2e --ignore=/release --ignore=/src --overwrite", "electron:package:deb": "electron-packager . monerod-gui --platform linux --arch x64 --out dist/ --ignore=/node_modules --ignore=/e2e --ignore=/release --ignore=/src --overwrite && mv dist/src dist/monerod-gui-linux-x64/resources/app/src", + "electron:package:rpm": "electron-packager . monerod-gui --platform linux --arch x64 --out dist/ --ignore=/node_modules --ignore=/e2e --ignore=/release --ignore=/src --overwrite && mv dist/src dist/monerod-gui-linux-x64/resources/app/src", "electron:package:mac": "electron-packager . monerod-gui --platform darwin --arch x64 --out dist/ --ignore=/node_modules --ignore=/e2e --ignore=/release --ignore=/src --overwrite", "build:prod:deb": "npm run build:prod && cp -R dist/ temp && mv temp dist/src && npm run electron:package:deb && cd dist/monerod-gui-linux-x64/resources/app/app && npm install && cd ../../../../../", + "build:prod:rpm": "npm run build:prod && cp -R dist/ temp && mv temp dist/src && npm run electron:package:rpm && cd dist/monerod-gui-linux-x64/resources/app/app && npm install && cd ../../../../../", "build:prod:win": "npm run build:prod && npm run electron:package:win && cd dist/monerod-gui-win32-x64/resources/app/app && npm install && cd ../../../../../", "build:prod:mac": "npm run build:prod && npm run electron:package:mac", "web:build": "npm run build -- -c web-production", @@ -67,6 +69,7 @@ "electron:local:dev": "npm run build:dev && electron --trace-warnings .", "electron:build": "npm run build:prod && electron-builder build --publish=never", "electron:build:deb": "npm run build:prod:deb && electron-installer-debian --src dist/monerod-gui-linux-x64/ --dest dist/installers/ --arch amd64 --config electron-installer-debian.json", + "electron:build:rpm": "npm run build:prod:rpm && electron-installer-redhat --src dist/monerod-gui-linux-x64/ --dest dist/installers/ --arch x86_64 --config electron-installer-redhat.json", "electron:build:win": "npm run build:prod:win && electron-installer-windows --src dist/monerod-gui-win32-x64/ --dest dist/installers/ --arch amd64 --config electron-installer-windows.json", "electron:build:mac": "npm run build:prod:mac && electron-installer-dmg ./dist/monerod-gui-darwin-x64/monerod-gui.app monerod-gui --out dist/installers/ --title monerod-gui --overwrite", "test": "ng test --watch=false", @@ -129,6 +132,7 @@ "electron-builder": "25.1.8", "electron-debug": "4.1.0", "electron-installer-dmg": "5.0.1", + "electron-installer-redhat": "3.4.0", "electron-reloader": "1.2.3", "eslint": "9.14.0", "eslint-plugin-import": "2.31.0",