From 7f5e5c2d8fceb82a3aa2a16d0adcde99737abb4f Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 29 Feb 2024 00:32:14 +0000 Subject: [PATCH 01/16] Update packages to Beta 5.0.12 --- utility/version_info.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utility/version_info.json b/utility/version_info.json index 0e474f3..74e2abe 100644 --- a/utility/version_info.json +++ b/utility/version_info.json @@ -6,9 +6,9 @@ "exe_sha256": "4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" }, "electron": { - "version": "27.3.3", - "x64": "https://github.com/electron/electron/releases/download/v27.3.3/electron-v27.3.3-linux-x64.zip", - "armv7l": "https://github.com/electron/electron/releases/download/v27.3.3/electron-v27.3.3-linux-armv7l.zip", - "arm64": "https://github.com/electron/electron/releases/download/v27.3.3/electron-v27.3.3-linux-arm64.zip" + "version": "27.3.4", + "x64": "https://github.com/electron/electron/releases/download/v27.3.4/electron-v27.3.4-linux-x64.zip", + "armv7l": "https://github.com/electron/electron/releases/download/v27.3.4/electron-v27.3.4-linux-armv7l.zip", + "arm64": "https://github.com/electron/electron/releases/download/v27.3.4/electron-v27.3.4-linux-arm64.zip" } } \ No newline at end of file From dd0f09cc0abeab6c66096d6438d198f7fffdfd02 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Thu, 29 Feb 2024 18:05:13 +0300 Subject: [PATCH 02/16] rename modules -> nixModules; change nixModules type from list -> attrset; add instruction in README.md --- README.md | 54 ++++++++++++++++++++++++++++++++++++++++++------------ flake.nix | 47 +++++++++++++++++++++++++++-------------------- 2 files changed, 69 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 5ede817..4f6d31e 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ You can obtain the latest version of package from `AUR` using one of the [AUR He For this example I will use [yay](https://github.com/Jguer/yay) -``` +```bash yay -S yandex-music ``` @@ -46,7 +46,7 @@ Download prebuilt binary package from [Releases](https://github.com/cucumber-sp/ Then you can install it with the following command -``` +```bash pacman -U yandex-music--any.pkg.tar.zst ``` @@ -66,7 +66,7 @@ Download prebuilt binary package from [Releases](https://github.com/cucumber-sp/ Then you can install it with the following command -``` +```bash dpkg -i yandex-music__.deb ``` @@ -89,7 +89,7 @@ That's the list of packages you might need to install to be able to manually bui In addition you will need to install [Asar](https://github.com/electron/asar) tool with `npm`. I recommend install it globally with the following command -``` +```bash npm install -g @electron/asar ``` @@ -101,7 +101,7 @@ Last step is to download original client `.exe` file. You can get it yourself or If you only want to get extracted app project with applied patches, you can use the following command: -``` +```bash sh repack.sh -x [-o OUTPUT_DIR default=./app] ``` *** @@ -110,7 +110,7 @@ sh repack.sh -x [-o OUTPUT_DIR default=./app] `.asar` is archive file that containes all electron app resources and information, but doesn't hold Electron binaries. If you have `.asar` file you can launch app using `electron .asar`. You can build this archive with the following command: -``` +```bash sh repack.sh [-o OUTPUT_DIR default=./app] ``` @@ -120,7 +120,7 @@ sh repack.sh [-o OUTPUT_DIR default=./app] You can build `pacman` package file manually using `PKGBUILD` file from the this repository. Run following commands in folder with `PKGBUILD` file inside to get `.pkg.tar.zst` package: -``` +```bash pacman -S electron libpulse makepkg ``` @@ -131,7 +131,7 @@ makepkg You can build `.deb` binary package using the following command: -``` +```bash sh build_deb.sh [-a default=x64] ``` @@ -146,7 +146,7 @@ The `yandex-music` package has unlicensed license, so you need to have Execute next to build and run yandex music directly from github -``` +```bash nix run github:cucumber-sp/yandex-music-linux ``` @@ -155,11 +155,41 @@ nix run github:cucumber-sp/yandex-music-linux Execute next in this repository to build yandex-music package without using flakes. -``` +```bash nix-build --expr '(import {}).callPackage ./nix {}' ``` ### Install to NixOS -This flake exports `modules` list. Append it to your system modules and add -`yandex-music` package to `environment.systemPackages`. +1. Add input in your flake.nix + + ```nix + inputs = { + yandex-music.url = "github:cucumber-sp/yandex-music-linux"; + }; + ``` + +2. Import module in your `configuration.nix` or `home-manager.nix` + + ```nix + imports = [ + inputs.yandex-music.nixosModules.yandex-music + ]; + ``` + +3. Add package `yandex-music` + + For `configuration.nix`: + + ```nix + environment.systemPackages = with pkgs; [ + yandex-music + ]; + ``` + For Home Manager: + + ```nix + home.packages = with pkgs; [ + yandex-music + ]; + ``` diff --git a/flake.nix b/flake.nix index 4c12d76..36c7fe8 100644 --- a/flake.nix +++ b/flake.nix @@ -1,34 +1,41 @@ { description = "Native Yandex Music desktop client"; + inputs = { ymExe.url = https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe; ymExe.flake = false; }; + outputs = { self, ymExe, nixpkgs, flake-utils }: - let - yandex-music-with = pkgs: pkgs.callPackage ./nix { - inherit ymExe; - }; - in - flake-utils.lib.eachDefaultSystem - (system: - let - pkgs = import nixpkgs { inherit system; }; - in - { - packages = rec { - yandex-music = yandex-music-with pkgs; - yandex-music-noflakes = pkgs.callPackage ./nix {}; - default = yandex-music; - }; - } - ) // { - modules = [{ + let + yandex-music-with = pkgs: pkgs.callPackage ./nix { + inherit ymExe; + }; + in + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + packages = rec { + yandex-music = yandex-music-with pkgs; + yandex-music-noflakes = pkgs.callPackage ./nix {}; + default = yandex-music; + }; + } + ) // { + nixosModules = rec { + yandex-music = { nixpkgs.overlays = [ (final: prev: { yandex-music = yandex-music-with prev; }) ]; - }]; + }; + default = yandex-music; }; + + nixosModule = self.nixosModules.default; + }; } From b5894b4c09ea95682acfa4cfb003a30e92f518a5 Mon Sep 17 00:00:00 2001 From: TheMaxMur Date: Thu, 29 Feb 2024 19:12:15 +0300 Subject: [PATCH 03/16] change installation in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4f6d31e..60454f3 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ nix-build --expr '(import {}).callPackage ./nix {}' ```nix imports = [ - inputs.yandex-music.nixosModules.yandex-music + yandex-music.nixosModule ]; ``` From e8479721945d4714ab63233b6a039583591411ba Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 29 Feb 2024 16:35:27 +0000 Subject: [PATCH 04/16] Update packages to Beta 5.0.13 --- PKGBUILD | 8 ++++---- flake.lock | 6 +++--- flake.nix | 2 +- utility/version_info.json | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index d5ff8d7..d51c668 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Andrey Onischenko loraner123@gmail.com pkgname=yandex-music -pkgver="5.0.12" +pkgver="5.0.13" pkgrel="1" pkgdesc="Yandex Music - Personal recommendations, selections for any occasion and new music" arch=("any") @@ -10,11 +10,11 @@ license=("custom") depends=("electron27" "libpulse" "xdg-utils") makedepends=("p7zip" "nodejs" "asar" "jq" "python") -source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" "git+https://github.com/cucumber-sp/yandex-music-linux") -sha256sums=("4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" "SKIP") +source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe" "git+https://github.com/cucumber-sp/yandex-music-linux") +sha256sums=("37eb4f1f346a2faa317bc4660c7cda17bc6aaa4a2f8cf6bc190ea8d80fe980eb" "SKIP") build() { - sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.12.exe" + sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.13.exe" } package() { diff --git a/flake.lock b/flake.lock index 919baa5..12cc1d5 100644 --- a/flake.lock +++ b/flake.lock @@ -56,13 +56,13 @@ "ymExe": { "flake": false, "locked": { - "narHash": "sha256-a7D/8m6ECtYsep7mD9SqI8zFbWxFcjVJ4ELDWcxsWHA=", + "narHash": "sha256-HcCmh6wPX8HyDiV7QJggqCHTQVjJS4iFffnskg2YydA=", "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe" }, "original": { "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe" } } }, diff --git a/flake.nix b/flake.nix index 36c7fe8..6500d6b 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Native Yandex Music desktop client"; inputs = { - ymExe.url = https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe; + ymExe.url = https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe; ymExe.flake = false; }; diff --git a/utility/version_info.json b/utility/version_info.json index 74e2abe..db89197 100644 --- a/utility/version_info.json +++ b/utility/version_info.json @@ -1,9 +1,9 @@ { "ym": { - "version": "5.0.12", - "exe_name": "Yandex_Music_x64_5.0.12.exe", - "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe", - "exe_sha256": "4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" + "version": "5.0.13", + "exe_name": "Yandex_Music_x64_5.0.13.exe", + "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe", + "exe_sha256": "37eb4f1f346a2faa317bc4660c7cda17bc6aaa4a2f8cf6bc190ea8d80fe980eb" }, "electron": { "version": "27.3.4", From d7a43a599baaa29eb51eedf3dafd76cf1c508578 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Fri, 1 Mar 2024 00:36:08 +0000 Subject: [PATCH 05/16] Update packages to Beta 5.0.12 --- PKGBUILD | 8 ++++---- flake.lock | 6 +++--- flake.nix | 2 +- utility/version_info.json | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index d51c668..d5ff8d7 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Andrey Onischenko loraner123@gmail.com pkgname=yandex-music -pkgver="5.0.13" +pkgver="5.0.12" pkgrel="1" pkgdesc="Yandex Music - Personal recommendations, selections for any occasion and new music" arch=("any") @@ -10,11 +10,11 @@ license=("custom") depends=("electron27" "libpulse" "xdg-utils") makedepends=("p7zip" "nodejs" "asar" "jq" "python") -source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe" "git+https://github.com/cucumber-sp/yandex-music-linux") -sha256sums=("37eb4f1f346a2faa317bc4660c7cda17bc6aaa4a2f8cf6bc190ea8d80fe980eb" "SKIP") +source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" "git+https://github.com/cucumber-sp/yandex-music-linux") +sha256sums=("4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" "SKIP") build() { - sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.13.exe" + sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.12.exe" } package() { diff --git a/flake.lock b/flake.lock index 12cc1d5..919baa5 100644 --- a/flake.lock +++ b/flake.lock @@ -56,13 +56,13 @@ "ymExe": { "flake": false, "locked": { - "narHash": "sha256-HcCmh6wPX8HyDiV7QJggqCHTQVjJS4iFffnskg2YydA=", + "narHash": "sha256-a7D/8m6ECtYsep7mD9SqI8zFbWxFcjVJ4ELDWcxsWHA=", "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" }, "original": { "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" } } }, diff --git a/flake.nix b/flake.nix index 6500d6b..36c7fe8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Native Yandex Music desktop client"; inputs = { - ymExe.url = https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe; + ymExe.url = https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe; ymExe.flake = false; }; diff --git a/utility/version_info.json b/utility/version_info.json index db89197..74e2abe 100644 --- a/utility/version_info.json +++ b/utility/version_info.json @@ -1,9 +1,9 @@ { "ym": { - "version": "5.0.13", - "exe_name": "Yandex_Music_x64_5.0.13.exe", - "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.13.exe", - "exe_sha256": "37eb4f1f346a2faa317bc4660c7cda17bc6aaa4a2f8cf6bc190ea8d80fe980eb" + "version": "5.0.12", + "exe_name": "Yandex_Music_x64_5.0.12.exe", + "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe", + "exe_sha256": "4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" }, "electron": { "version": "27.3.4", From c12c5ac539991a10d000ad2fae17b479a34dcac2 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko <100789522+cucumber-sp@users.noreply.github.com> Date: Fri, 1 Mar 2024 07:50:44 +0300 Subject: [PATCH 06/16] Fix AUR publish from CI --- .github/workflows/update-build-release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-build-release.yml b/.github/workflows/update-build-release.yml index 18d0c3f..981134b 100644 --- a/.github/workflows/update-build-release.yml +++ b/.github/workflows/update-build-release.yml @@ -44,7 +44,7 @@ jobs: author_email: "loraner123@gmail.com" - name: Publish package changes to AUR - if: "${{ github.event.commits[0] }}" + if: "${{ github.event.commits[0] || steps.commit.outputs.commited }}" uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 with: pkgname: "yandex-music" @@ -54,7 +54,7 @@ jobs: commit_username: "cucumber-sp" commit_email: "loraner123@gmail.com" ssh_private_key: "${{ secrets.AUR_SSH_PRIVATE_KEY }}" - commit_message: "${{ github.event.commits[0].message }}" + commit_message: "${{ github.event.commits[0].message || env.release_name }}" ssh_keyscan_types: "rsa,dsa,ecdsa,ed25519" outputs: From 91332d6088c34184db2d65e776619e6a939745ba Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Sat, 2 Mar 2024 14:55:37 +0300 Subject: [PATCH 07/16] Switch from sh to bash --- .github/workflows/build.sh | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/update-build-release.yml | 4 ++-- PKGBUILD | 2 +- README.md | 6 +++--- build_deb.sh | 2 +- templates/PKGBUILD | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 9a8b9ba..65004e2 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -32,7 +32,7 @@ case $OS in mv ./src/app/yandex-music.asar dist/yandex-music.asar mv ./src/app/release_notes.json dist/release_notes.json - sh ./build_deb.sh -a all + bash ./build_deb.sh -a all mv deb/*.deb dist ;; "Ubuntu") diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2a8bdbb..0d98aca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: ref: ${{ (inputs.ref || '') }} - name: Build - run: sh ./.github/workflows/build.sh + run: bash ./.github/workflows/build.sh - name: Upload Arch artifact uses: actions/upload-artifact@v4 diff --git a/.github/workflows/update-build-release.yml b/.github/workflows/update-build-release.yml index 981134b..3049edf 100644 --- a/.github/workflows/update-build-release.yml +++ b/.github/workflows/update-build-release.yml @@ -32,7 +32,7 @@ jobs: run: python utility/generate_packages.py - name: Retrieve version to make commit - run: sh .github/workflows/retrieve_version.sh + run: bash .github/workflows/retrieve_version.sh - name: Commit and push changes uses: EndBug/add-and-commit@v9.1.4 @@ -86,7 +86,7 @@ jobs: run: | sudo apt-get update sudo apt-get install jq - sh ./.github/workflows/retrieve_version.sh + bash ./.github/workflows/retrieve_version.sh - name: Get Release Notes HTML run: echo "release_html=$(jq -r --arg version "$VERSION" '.["desktop-release-notes." + $version]' ./dist/release_notes.json)" >> $GITHUB_ENV diff --git a/PKGBUILD b/PKGBUILD index d5ff8d7..9e6343d 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -14,7 +14,7 @@ source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64 sha256sums=("4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" "SKIP") build() { - sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.12.exe" + bash "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.12.exe" } package() { diff --git a/README.md b/README.md index 60454f3..94a4674 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ Last step is to download original client `.exe` file. You can get it yourself or If you only want to get extracted app project with applied patches, you can use the following command: ```bash -sh repack.sh -x [-o OUTPUT_DIR default=./app] +bash repack.sh -x [-o OUTPUT_DIR default=./app] ``` *** @@ -111,7 +111,7 @@ sh repack.sh -x [-o OUTPUT_DIR default=./app] `.asar` is archive file that containes all electron app resources and information, but doesn't hold Electron binaries. If you have `.asar` file you can launch app using `electron .asar`. You can build this archive with the following command: ```bash -sh repack.sh [-o OUTPUT_DIR default=./app] +bash repack.sh [-o OUTPUT_DIR default=./app] ``` *** @@ -132,7 +132,7 @@ makepkg You can build `.deb` binary package using the following command: ```bash -sh build_deb.sh [-a default=x64] +bash build_deb.sh [-a default=x64] ``` *** diff --git a/build_deb.sh b/build_deb.sh index feec793..0fe8502 100755 --- a/build_deb.sh +++ b/build_deb.sh @@ -114,7 +114,7 @@ echo "Checking sha256" echo "${exe_sha256} ${TEMPDIR}/${exe_name}" | sha256sum -c echo "Repaking ${exe_name}" -sh repack.sh -o "${TEMPDIR}/app" "${TEMPDIR}/${exe_name}" +bash repack.sh -o "${TEMPDIR}/app" "${TEMPDIR}/${exe_name}" mkdir -p "deb" diff --git a/templates/PKGBUILD b/templates/PKGBUILD index 5859f91..c536739 100644 --- a/templates/PKGBUILD +++ b/templates/PKGBUILD @@ -14,7 +14,7 @@ source=("%exe_link%" "git+https://github.com/cucumber-sp/yandex-music-linux") sha256sums=("%exe_sha256%" "SKIP") build() { - sh "$srcdir/yandex-music-linux/repack.sh" "$srcdir/%exe_name%" + bash "$srcdir/yandex-music-linux/repack.sh" "$srcdir/%exe_name%" } package() { From d41280817c68807bad5d0f52ec95535170a8c6dd Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Sat, 2 Mar 2024 19:01:35 +0300 Subject: [PATCH 08/16] Run with no sandbox from desktop file --- templates/desktop | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/desktop b/templates/desktop index 83e13e6..ff34882 100644 --- a/templates/desktop +++ b/templates/desktop @@ -4,7 +4,7 @@ Name[ru]=Яндекс Музыка Comment=Yandex Music — we collect music for you Comment[ru]=Яндекс Музыка — собираем музыку для вас GenericName=YandexMusic -Exec=yandex-music %U +Exec=yandex-music --no-sandbox %U Icon=yandex-music Type=Application StartupNotify=true From 1543075351b95a50874d27cac65baddf68708047 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 7 Mar 2024 00:26:18 +0000 Subject: [PATCH 09/16] Update packages to Beta 5.0.14 --- PKGBUILD | 8 ++++---- flake.lock | 6 +++--- flake.nix | 2 +- utility/version_info.json | 16 ++++++++-------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index 9e6343d..f7d4d09 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Andrey Onischenko loraner123@gmail.com pkgname=yandex-music -pkgver="5.0.12" +pkgver="5.0.14" pkgrel="1" pkgdesc="Yandex Music - Personal recommendations, selections for any occasion and new music" arch=("any") @@ -10,11 +10,11 @@ license=("custom") depends=("electron27" "libpulse" "xdg-utils") makedepends=("p7zip" "nodejs" "asar" "jq" "python") -source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" "git+https://github.com/cucumber-sp/yandex-music-linux") -sha256sums=("4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" "SKIP") +source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.14.exe" "git+https://github.com/cucumber-sp/yandex-music-linux") +sha256sums=("c10c6c4b5d596f9bf490a231d7c13bbd2627109f71c9c57aa4e2b034e31252f4" "SKIP") build() { - bash "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.12.exe" + bash "$srcdir/yandex-music-linux/repack.sh" "$srcdir/Yandex_Music_x64_5.0.14.exe" } package() { diff --git a/flake.lock b/flake.lock index 919baa5..54f2b75 100644 --- a/flake.lock +++ b/flake.lock @@ -56,13 +56,13 @@ "ymExe": { "flake": false, "locked": { - "narHash": "sha256-a7D/8m6ECtYsep7mD9SqI8zFbWxFcjVJ4ELDWcxsWHA=", + "narHash": "sha256-6YOx1r40nBcexbeqmQn5/FkuUaHxRrg4Qn1mEwPVnTs=", "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.14.exe" }, "original": { "type": "file", - "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe" + "url": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.14.exe" } } }, diff --git a/flake.nix b/flake.nix index 36c7fe8..eb705bf 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,7 @@ description = "Native Yandex Music desktop client"; inputs = { - ymExe.url = https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe; + ymExe.url = https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.14.exe; ymExe.flake = false; }; diff --git a/utility/version_info.json b/utility/version_info.json index 74e2abe..c7d3413 100644 --- a/utility/version_info.json +++ b/utility/version_info.json @@ -1,14 +1,14 @@ { "ym": { - "version": "5.0.12", - "exe_name": "Yandex_Music_x64_5.0.12.exe", - "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.12.exe", - "exe_sha256": "4ebeac9620f60e9e2333114cf8c8fb3dc6f2c2c70da58ba56902aa75d65ce4f8" + "version": "5.0.14", + "exe_name": "Yandex_Music_x64_5.0.14.exe", + "exe_link": "https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.14.exe", + "exe_sha256": "c10c6c4b5d596f9bf490a231d7c13bbd2627109f71c9c57aa4e2b034e31252f4" }, "electron": { - "version": "27.3.4", - "x64": "https://github.com/electron/electron/releases/download/v27.3.4/electron-v27.3.4-linux-x64.zip", - "armv7l": "https://github.com/electron/electron/releases/download/v27.3.4/electron-v27.3.4-linux-armv7l.zip", - "arm64": "https://github.com/electron/electron/releases/download/v27.3.4/electron-v27.3.4-linux-arm64.zip" + "version": "27.3.5", + "x64": "https://github.com/electron/electron/releases/download/v27.3.5/electron-v27.3.5-linux-x64.zip", + "armv7l": "https://github.com/electron/electron/releases/download/v27.3.5/electron-v27.3.5-linux-armv7l.zip", + "arm64": "https://github.com/electron/electron/releases/download/v27.3.5/electron-v27.3.5-linux-arm64.zip" } } \ No newline at end of file From f5eeac19b40035bb7b5ae34b96ed92e27b138c55 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Thu, 7 Mar 2024 10:38:27 +0300 Subject: [PATCH 10/16] Patches fix --- patches/0001-Add-package-licence.patch | 1 - patches/0002-Add-package-icon.patch | 1 - patches/0004-Fix-window-resize.patch | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/patches/0001-Add-package-licence.patch b/patches/0001-Add-package-licence.patch index 7a4c3a5..13bb32b 100644 --- a/patches/0001-Add-package-licence.patch +++ b/patches/0001-Add-package-licence.patch @@ -9,4 +9,3 @@ diff --git a/package.json b/package.json + }, + "license": "UNLICENSED" } --- diff --git a/patches/0002-Add-package-icon.patch b/patches/0002-Add-package-icon.patch index e464f38..b8d42ba 100644 --- a/patches/0002-Add-package-icon.patch +++ b/patches/0002-Add-package-icon.patch @@ -12,4 +12,3 @@ diff --git a/package.json b/package.json + "scalable": "build/next-desktop/favicon.svg" + } } --- diff --git a/patches/0004-Fix-window-resize.patch b/patches/0004-Fix-window-resize.patch index adb1287..c1c9ae1 100644 --- a/patches/0004-Fix-window-resize.patch +++ b/patches/0004-Fix-window-resize.patch @@ -5,8 +5,8 @@ diff --git a/main/lib/createWindow.js b/main/lib/createWindow.js x: 16, y: 10 }, -- minWidth: 1024, -- minHeight: 800, +- minWidth: 768, +- minHeight: 650, width: 1280, height: 800, webPreferences: { From 8bf13524b58bef8a34832452cadd3c5a954a2182 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Thu, 7 Mar 2024 22:16:21 +0300 Subject: [PATCH 11/16] Better Icons Nix Fix --- icons/apple-touch-icon.png | Bin 0 -> 10782 bytes icons/favicon.png | Bin 0 -> 2434 bytes icons/favicon.svg | 4 ++++ nix/default.nix | 2 ++ repack.sh | 7 +++++++ 5 files changed, 13 insertions(+) create mode 100644 icons/apple-touch-icon.png create mode 100644 icons/favicon.png create mode 100644 icons/favicon.svg diff --git a/icons/apple-touch-icon.png b/icons/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..61d2fb99193aa75064b41167c3b1472463a32827 GIT binary patch literal 10782 zcmX9^byQSe7o|G}kq$)(kq!Zo5Re*r=84u?=mVCe4dZj|oMp&O*T`QC4Rf4q5X zy;<+Qd+)h#pS|}vKNaOAak0p;5D*Y>rKP?>fOGeM2L>AO+nFC}4V*9?q%@ro5YYVp zI}i)8r#gU(WG>rt?yQz}*3QO;4yLU3PUb1c0^|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yVcsd9;#*^;NC@zbaZ=|P-Y6s|Meq>Ink>h zHOE+u+`qJme{a-1&*B9I{!7p>s8@k+6CrO(RamjOn8gbUPy@_!tHa5Z+rDSo+=J}i z-v{WfF>v45y}yt3pLX-%XFY&^46&LuZhqiLKHuS_v^a&^ug!^t#$FZJ5-)kHS>vPS zegy!IwY#}$UIRu=VSd2fIRcJ|NWCf|UShlpTzg3tpS>}TF;*k}F5%fX zS{Z+NJxg9`p|3vza~}d{pyuu4^f-0f@9Ocgaf|K*ONs|ipL@RRu)oeP7$e>#&PwmtD$BQiJku zyEZGY!(a-6nM_OXF$xTYT4H%{L1kMNysx{u(+@)f3V=%a+E>yBqk= z=9msxK?vN~URc!@mVdm@XFdQQL0ApBWPDGr*?<1)j$+N_Yb57Ss_Qf~b@OUFP^!CP1+#d0JqG2$9 zASUD^7Zw|Rj|4|MRMJhVxOUpa`ISv9xzQtU8(%GvtEUbdA6*qoZ1k7trj#@)D@+(v zg;nc1Xl{#syZZZ@b`BjG`oQPobazf~B|Dp)KxHJZ z5%+2lsY4I+#vdCAK$R_xEjyiTbvTo0#syp_BHJV8#_+@x_d~~k?0J8@%$b>;%*giu zS0ww$HyLP7gutvzvm`Yot~aqjIRaEC^~e{XL=mt#iII#~HUI@Naf_vpPYDJ6p*!l6 zYm(B&Pw~(lqDVfl22Y*uw*S4BSo3D`olmGw#07*qoM6N<$g1wrN A(f|Me literal 0 HcmV?d00001 diff --git a/icons/favicon.svg b/icons/favicon.svg new file mode 100644 index 0000000..86f375c --- /dev/null +++ b/icons/favicon.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/nix/default.nix b/nix/default.nix index 1dad376..95b6638 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -30,6 +30,7 @@ stdenvNoCC.mkDerivation repack = ./../repack.sh; patches = ./../patches; utility = ./../utility; + icons = ./../icons; desktopItem = ../templates/desktop; src = if ymExe != null @@ -44,6 +45,7 @@ stdenvNoCC.mkDerivation cp -r $repack ./repack.sh cp -r $patches ./patches cp -r $utility ./utility + cp -r $icons ./icons bash "./repack.sh" -o "./app" "$src" ''; dontPatch = true; diff --git a/repack.sh b/repack.sh index 5087d14..025dcd7 100755 --- a/repack.sh +++ b/repack.sh @@ -14,6 +14,7 @@ usage() { exe_location= dst="$PWD/app" +START_DIR="$PWD" SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) nopatch=0 while getopts :xo:ph name; do @@ -83,6 +84,10 @@ find "./" -type f -name "*.html" -print0 | while IFS= read -r -d $'\0' file; do done echo "Title Fixed" +echo "Replacing Icons" +cp -af "$SCRIPT_DIR/icons/." "./build/next-desktop/" +echo "Replaced Icons" + # applying patches # This function accepts patch file. If it names starts with `XXXX-optional`, @@ -116,6 +121,8 @@ if [ "$nopatch" != "1" ]; then done fi +cd "$START_DIR" # fix relative path when using -o flag + mkdir -p "$dst" if [ -n "$extract_only" ]; then From 96299ebb0305cd1466d1c4008426b0e59b331717 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Sat, 9 Mar 2024 12:37:35 +0300 Subject: [PATCH 12/16] Build Tarballs --- .github/workflows/build.sh | 46 ------------- .github/workflows/build.yml | 30 ++++++++- .gitignore | 2 + build_deb.sh | 53 ++++----------- build_tarball.sh | 131 ++++++++++++++++++++++++++++++++++++ 5 files changed, 172 insertions(+), 90 deletions(-) delete mode 100755 .github/workflows/build.sh create mode 100644 build_tarball.sh diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh deleted file mode 100755 index 65004e2..0000000 --- a/.github/workflows/build.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -set -e - -if [ -f /etc/os-release ]; then - . /etc/os-release - OS=$NAME -elif [ -f /etc/lsb-release ]; then - . /etc/lsb-release - OS=$DISTRIB_ID -else - OS=$(uname -s) -fi - -case $OS in - "Arch Linux") - echo "Arch Linux" - pacman -Syy --noconfirm - pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron27 libpulse dpkg unzip xdg-utils python - # fix makepkg from non-root - mkdir /home/build - chgrp nobody /home/build - chmod g+ws /home/build - setfacl -m u::rwx,g::rwx /home/build - setfacl -d --set u::rwx,g::rwx,o::- /home/build - chown nobody . - sudo -u nobody makepkg --log - - mkdir dist - mv *.pkg.tar.zst dist - - mv ./src/app/yandex-music.asar dist/yandex-music.asar - mv ./src/app/release_notes.json dist/release_notes.json - - bash ./build_deb.sh -a all - mv deb/*.deb dist - ;; - "Ubuntu") - echo NixOS - export NIXPKGS_ALLOW_UNFREE=1 - nix build --impure - ;; - *) - echo "Operating system is not recognized." - ;; -esac diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0d98aca..0fc27d7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,20 +21,44 @@ jobs: container: image: archlinux:latest steps: + - name: Install packages + run: pacman -Syy --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron27 libpulse dpkg unzip xdg-utils python + - name: Checkout uses: actions/checkout@v4 with: ref: ${{ (inputs.ref || '') }} - - name: Build - run: bash ./.github/workflows/build.sh + - name: Create dist directory + run: mkdir -p dist - - name: Upload Arch artifact + - name: Fix permissions for build + run: mkdir /home/build && chgrp nobody /home/build && chmod g+ws /home/build && setfacl -m u::rwx,g::rwx /home/build && setfacl -d --set u::rwx,g::rwx,o::- /home/build && chown nobody . + + - name: Make Arch package + run: sudo -u nobody makepkg --log && mv *.pkg.tar.zst dist/ + + - name: Build tarball packages + run: bash ./build_tarball.sh -a all && mv tar/* dist/ + + - name: Build Deb packages + run: bash ./build_deb.sh -a all && mv deb/*.deb dist + + - name: Retrieve Asar and release notes + run: mv ./src/app/yandex-music.asar dist/yandex-music.asar && mv ./src/app/release_notes.json dist/release_notes.json + + - name: Upload Arch artifacts uses: actions/upload-artifact@v4 with: path: ./dist/*.pkg.tar.zst name: arch-packages + - name: Upload tarball artifacts + uses: actions/upload-artifact@v4 + with: + path: ./dist/*.tar.gz + name: tar-packages + - name: Upload Deb artifact uses: actions/upload-artifact@v4 with: diff --git a/.gitignore b/.gitignore index 1252f14..3f10be6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ app/ arch/ deb/ + +tar/ diff --git a/build_deb.sh b/build_deb.sh index 0fe8502..644a461 100755 --- a/build_deb.sh +++ b/build_deb.sh @@ -10,12 +10,14 @@ usage() { echo " -h Show this help and exit" } -download_electron_binary(){ +prepare_tarball(){ arch=${1} - echo "Downloading electron ${arch}" - LINK=$(jq -r .electron."${arch}" ./utility/version_info.json) - curl -L -o "${TEMPDIR}/electron-${arch}.zip" "${LINK}" - unzip -q "${TEMPDIR}/electron-${arch}.zip" -d "${TEMPDIR}/electron-${arch}" + echo "Preparing tarball for ${arch}" + if [ ! -f "tar/yandex-music_${version}_${arch}.tar.gz" ]; then + echo "Building tarball for ${arch}" + bash build_tarball.sh -a "${arch}" + fi + cp "tar/yandex-music_${version}_${arch}.tar.gz" "${TEMPDIR}/yandex-music_${version}_${arch}.tar.gz" } build_deb(){ @@ -30,25 +32,8 @@ build_deb(){ sed -i "s/%version%/${version}/g" "${pkgdir}/DEBIAN/control" sed -i "s/%arch%/${pkgarch}/g" "${pkgdir}/DEBIAN/control" - mkdir -p "${pkgdir}/usr/lib/yandex-music" - mkdir -p "${pkgdir}/usr/share/applications" - mkdir -p "${pkgdir}/usr/share/licenses/yandex-music" - mkdir -p "${pkgdir}/usr/share/pixmaps" - mkdir -p "${pkgdir}/usr/bin" - - install -Dm644 "${TEMPDIR}/app/yandex-music.asar" "${pkgdir}/usr/lib/yandex-music/yandex-music.asar" - - install -Dm644 "${TEMPDIR}/app/favicon.png" "${pkgdir}/usr/share/pixmaps/yandex-music.png" - install -Dm644 "${TEMPDIR}/app/favicon.png" "${pkgdir}/usr/share/icons/hicolor/48x48/apps/yandex-music.png" - install -Dm644 "${TEMPDIR}/app/favicon.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/yandex-music.svg" - - install -Dm644 "./templates/desktop" "${pkgdir}/usr/share/applications/yandex-music.desktop" - install -Dm644 "./LICENSE.md" "${pkgdir}/usr/share/licenses/yandex-music/LICENSE" - mv "${TEMPDIR}/electron-${arch}/" "${pkgdir}/usr/lib/yandex-music/electron" - - echo "#!/bin/sh" > "${pkgdir}/usr/bin/yandex-music" - echo 'exec /usr/lib/yandex-music/electron/electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "${pkgdir}/usr/bin/yandex-music" - chmod 755 "${pkgdir}/usr/bin/yandex-music" + # extract tarball to pkgdir + tar -xzf "${TEMPDIR}/yandex-music_${version}_${arch}.tar.gz" -C "${pkgdir}" dpkg-deb --build "${pkgdir}" "deb/yandex-music_${version}_${pkgarch}.deb" } @@ -101,34 +86,20 @@ trap clear EXIT #loading version info with jq version=$(jq -r '.ym.version' ./utility/version_info.json) -exe_name=$(jq -r '.ym.exe_name' ./utility/version_info.json) -exe_link=$(jq -r '.ym.exe_link' ./utility/version_info.json) -exe_sha256=$(jq -r '.ym.exe_sha256' ./utility/version_info.json) - -#downloading exe -echo "Downloading ${exe_name}" -curl -L -o "${TEMPDIR}/${exe_name}" "${exe_link}" - -#checking sha256 -echo "Checking sha256" -echo "${exe_sha256} ${TEMPDIR}/${exe_name}" | sha256sum -c - -echo "Repaking ${exe_name}" -bash repack.sh -o "${TEMPDIR}/app" "${TEMPDIR}/${exe_name}" mkdir -p "deb" if [ ${x64} -eq 1 ]; then - download_electron_binary "x64" + prepare_tarball "x64" build_deb "x64" "amd64" fi if [ ${armv7l} -eq 1 ]; then - download_electron_binary "armv7l" + prepare_tarball "armv7l" build_deb "armv7l" "armhf" fi if [ ${arm64} -eq 1 ]; then - download_electron_binary "arm64" + prepare_tarball "arm64" build_deb "arm64" "arm64" fi \ No newline at end of file diff --git a/build_tarball.sh b/build_tarball.sh new file mode 100644 index 0000000..20a3791 --- /dev/null +++ b/build_tarball.sh @@ -0,0 +1,131 @@ +#!/bin/bash + +set -e + +usage() { + echo "Usage: $(basename "$0") [-h] [-a default=x64]" + echo + echo " Options:" + echo " -a Architecture to build for ( default=x64)" + echo " -o Output directory" + echo " -h Show this help and exit" +} + +download_electron_binary(){ + arch=${1} + echo "Downloading electron ${arch}" + LINK=$(jq -r .electron."${arch}" ./utility/version_info.json) + curl -L -o "${TEMPDIR}/electron-${arch}.zip" "${LINK}" + unzip -q "${TEMPDIR}/electron-${arch}.zip" -d "${TEMPDIR}/electron-${arch}" +} + +build_tarball(){ + arch=${1} + app_dir="${TEMPDIR}/yandex-music_${version}_${arch}" + + mkdir -p "${app_dir}/usr/lib/yandex-music" + mkdir -p "${app_dir}/usr/share/applications" + mkdir -p "${app_dir}/usr/share/licenses/yandex-music" + mkdir -p "${app_dir}/usr/share/pixmaps" + mkdir -p "${app_dir}/usr/bin" + + install -Dm644 "${TEMPDIR}/app/yandex-music.asar" "${app_dir}/usr/lib/yandex-music/yandex-music.asar" + + install -Dm644 "${TEMPDIR}/app/favicon.png" "${app_dir}/usr/share/pixmaps/yandex-music.png" + install -Dm644 "${TEMPDIR}/app/favicon.png" "${app_dir}/usr/share/icons/hicolor/48x48/apps/yandex-music.png" + install -Dm644 "${TEMPDIR}/app/favicon.svg" "${app_dir}/usr/share/icons/hicolor/scalable/apps/yandex-music.svg" + + install -Dm644 "./templates/desktop" "${app_dir}/usr/share/applications/yandex-music.desktop" + install -Dm644 "./LICENSE.md" "${app_dir}/usr/share/licenses/yandex-music/LICENSE" + mv "${TEMPDIR}/electron-${arch}/" "${app_dir}/usr/lib/yandex-music/electron" + + echo "#!/bin/sh" > "${app_dir}/usr/bin/yandex-music" + echo 'exec /usr/lib/yandex-music/electron/electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "${app_dir}/usr/bin/yandex-music" + chmod 755 "${app_dir}/usr/bin/yandex-music" + + cd "${app_dir}" + tar cvfz "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz" * + cd "${INITIAL_DIR}" +} + +INITIAL_DIR="${PWD}" +OUTPUT_DIR="${PWD}/tar" +x64=0 +armv7l=0 +arm64=0 + +#checking for arch option (if not specified set x64) and h option +while getopts :a:h name; do + case ${name} in + a) + case ${OPTARG} in + x64) x64=1 ;; + armv7l) armv7l=1 ;; + arm64) arm64=1 ;; + all) + x64=1 + armv7l=1 + arm64=1 + ;; + *) + echo "Invalid architecture specified" + usage + exit 1 + ;; + esac + ;; + h) + usage + exit 0 + ;; + *) + usage + exit 1 + ;; + esac +done + +#checking if at least one arch is specified else set x64 +if [ ${x64} -eq 0 ] && [ ${armv7l} -eq 0 ] && [ ${arm64} -eq 0 ]; then + x64=1 +fi + +clear() { + rm -rf "${TEMPDIR}" +} +TEMPDIR="$(mktemp -d)" +trap clear EXIT + +#loading version info with jq +version=$(jq -r '.ym.version' ./utility/version_info.json) +exe_name=$(jq -r '.ym.exe_name' ./utility/version_info.json) +exe_link=$(jq -r '.ym.exe_link' ./utility/version_info.json) +exe_sha256=$(jq -r '.ym.exe_sha256' ./utility/version_info.json) + +#downloading exe +echo "Downloading ${exe_name}" +curl -L -o "${TEMPDIR}/${exe_name}" "${exe_link}" + +#checking sha256 +echo "Checking sha256" +echo "${exe_sha256} ${TEMPDIR}/${exe_name}" | sha256sum -c + +echo "Repaking ${exe_name}" +bash repack.sh -o "${TEMPDIR}/app" "${TEMPDIR}/${exe_name}" + +mkdir -p "${OUTPUT_DIR}" + +if [ ${x64} -eq 1 ]; then + download_electron_binary "x64" + build_tarball "x64" +fi + +if [ ${armv7l} -eq 1 ]; then + download_electron_binary "armv7l" + build_tarball "armv7l" +fi + +if [ ${arm64} -eq 1 ]; then + download_electron_binary "arm64" + build_tarball "arm64" +fi \ No newline at end of file From bf7fd0cc13b78d29cf97146c905c77c9b7f8cc4a Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Sat, 9 Mar 2024 13:45:12 +0300 Subject: [PATCH 13/16] Temporary disable nix build --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0fc27d7..c7e6652 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,7 +39,7 @@ jobs: run: sudo -u nobody makepkg --log && mv *.pkg.tar.zst dist/ - name: Build tarball packages - run: bash ./build_tarball.sh -a all && mv tar/* dist/ + run: bash ./build_tarball.sh -a all && cp tar/* dist/ - name: Build Deb packages run: bash ./build_deb.sh -a all && mv deb/*.deb dist @@ -77,6 +77,7 @@ jobs: path: ./dist/release_notes.json nix-build: + if: false runs-on: ubuntu-latest env: NIXPKGS_ALLOW_UNFREE: 1 From a3d85f449cb621775246f0ce1fd355498e499ee7 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Sat, 9 Mar 2024 21:09:24 +0300 Subject: [PATCH 14/16] RPM Building Support --- .github/workflows/build.yml | 12 +++- .gitignore | 2 + build_rpm.sh | 115 ++++++++++++++++++++++++++++++++++++ templates/rpm.spec | 27 +++++++++ 4 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 build_rpm.sh create mode 100644 templates/rpm.spec diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c7e6652..008ebb5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,8 +22,7 @@ jobs: image: archlinux:latest steps: - name: Install packages - run: pacman -Syy --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron27 libpulse dpkg unzip xdg-utils python - + run: pacman -Syy --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron27 libpulse dpkg unzip xdg-utils python rpm-tools - name: Checkout uses: actions/checkout@v4 with: @@ -44,6 +43,9 @@ jobs: - name: Build Deb packages run: bash ./build_deb.sh -a all && mv deb/*.deb dist + - name: Build RPM packages + run: bash ./build_rpm.sh && mv rpm/*.rpm dist + - name: Retrieve Asar and release notes run: mv ./src/app/yandex-music.asar dist/yandex-music.asar && mv ./src/app/release_notes.json dist/release_notes.json @@ -65,6 +67,12 @@ jobs: path: ./dist/*.deb name: deb-packages + - name: Upload RPM artifact + uses: actions/upload-artifact@v4 + with: + path: ./dist/*.rpm + name: rpm-packages + - name: Upload Asar artifacts uses: actions/upload-artifact@v4 with: diff --git a/.gitignore b/.gitignore index 3f10be6..3c63cb9 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ arch/ deb/ tar/ + +rpm/ diff --git a/build_rpm.sh b/build_rpm.sh new file mode 100644 index 0000000..efa8c23 --- /dev/null +++ b/build_rpm.sh @@ -0,0 +1,115 @@ +#!/bin/bash + +set -e + +usage() { + echo "Usage: $(basename "$0") [-h] [-a default=x64]" + echo + echo " Options:" + echo " -a Architecture to build for ( default=x64)" + echo " -h Show this help and exit" +} + +prepare_tarball(){ + arch=${1} + echo "Preparing tarball for ${arch}" + if [ ! -f "tar/yandex-music_${version}_${arch}.tar.gz" ]; then + echo "Building tarball for ${arch}" + bash build_tarball.sh -a "${arch}" + fi + cp "tar/yandex-music_${version}_${arch}.tar.gz" "${TEMPDIR}/yandex-music_${version}_${arch}.tar.gz" + cd "${TEMPDIR}" + tar -xzf "yandex-music_${version}_${arch}.tar.gz" + mkdir -p "yandex-music-${version}" + mv usr "yandex-music-${version}" + tar -czf "yandex-music_${version}_${arch}.tar.gz" "yandex-music-${version}" + rm -rf "yandex-music-${version}" + cd "${INITIAL_DIR}" + cp "${TEMPDIR}/yandex-music_${version}_${arch}.tar.gz" "${TEMPDIR}/rpmbuild/SOURCES/yandex-music_${version}_${arch}.tar.gz" +} + +build_rpm(){ + arch=${1} + pkgarch=${2} + echo "Building ${arch} package" + cp "templates/rpm.spec" "${TEMPDIR}/rpmbuild/SPECS/${arch}.spec" + sed -i "s/%version%/${version}/g" "${TEMPDIR}/rpmbuild/SPECS/${arch}.spec" + sed -i "s/%arch%/${pkgarch}/g" "${TEMPDIR}/rpmbuild/SPECS/${arch}.spec" + sed -i "s/%source_tarball%/yandex-music_${version}_${arch}.tar.gz/g" "${TEMPDIR}/rpmbuild/SPECS/${arch}.spec" + rpmbuild --define "_topdir ${TEMPDIR}/rpmbuild" -bb "${TEMPDIR}/rpmbuild/SPECS/${arch}.spec" + cp "${TEMPDIR}/rpmbuild/RPMS/${pkgarch}/yandex-music-${version}-1.${pkgarch}.rpm" "rpm/yandex-music-${version}-1.${pkgarch}.rpm" +} + +init_rpm(){ + echo "Initializing RPM build" + mkdir -p "${TEMPDIR}/rpmbuild/SOURCES" + mkdir -p "${TEMPDIR}/rpmbuild/SPECS" +} + +x64=0 +armv7l=0 +arm64=0 + +#checking for arch option (if not specified set x64) and h option +while getopts :a:h name; do + case ${name} in + a) + case ${OPTARG} in + x64) x64=1 ;; + armv7l) armv7l=1 ;; + arm64) arm64=1 ;; + all) + x64=1 + armv7l=1 + arm64=1 + ;; + *) + echo "Invalid architecture specified" + usage + exit 1 + ;; + esac + ;; + h) + usage + exit 0 + ;; + *) + usage + exit 1 + ;; + esac +done + +#checking if at least one arch is specified else set x64 +if [ ${x64} -eq 0 ] && [ ${armv7l} -eq 0 ] && [ ${arm64} -eq 0 ]; then + x64=1 +fi + +clear() { + rm -rf "${TEMPDIR}" +} +TEMPDIR="$(mktemp -d)" +INITIAL_DIR=${PWD} +trap clear EXIT + +#loading version info with jq +version=$(jq -r '.ym.version' ./utility/version_info.json) + +init_rpm +mkdir -p "rpm" + +if [ ${x64} -eq 1 ]; then + prepare_tarball "x64" + build_rpm "x64" "x86_64" +fi + +if [ ${armv7l} -eq 1 ]; then + prepare_tarball "armv7l" + build_rpm "armv7l" "armv7hl" +fi + +if [ ${arm64} -eq 1 ]; then + prepare_tarball "arm64" + build_rpm "arm64" "aarch64" +fi \ No newline at end of file diff --git a/templates/rpm.spec b/templates/rpm.spec new file mode 100644 index 0000000..5aa4803 --- /dev/null +++ b/templates/rpm.spec @@ -0,0 +1,27 @@ +Name: yandex-music +Version: %version% +Release: 1 +Summary: Yandex Music Client +License: Custom +URL: https://github.com/cucumber-sp/yandex-music-linux + +Source0: %source_tarball% + +BuildArch: %arch% + +Requires: (kde-cli-tools or kde-cli-tools5 or kde-runtime or trash-cli or glib2 or gvfs-client), (libXtst or libXtst6), (libnotify or libnotify4), (libxcb or libxcb1), (mesa-libgbm or libgbm1), (nss or mozilla-nss), at-spi2-core, gtk3, libdrm, xdg-utils + +%description +Yandex Music - Personal recommendations, selections for any occasion and new music + +%prep +%setup -q + +%install + +cp -r ./usr %{buildroot}/ +chmod 755 %{buildroot}/usr/bin/yandex-music + + +%files +/usr/ \ No newline at end of file From bbb291a209e97c068221e3eb89aa019ea8ff0b28 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Sat, 9 Mar 2024 22:05:17 +0300 Subject: [PATCH 15/16] Fix owned directories for RPM --- templates/rpm.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/templates/rpm.spec b/templates/rpm.spec index 5aa4803..d09bb93 100644 --- a/templates/rpm.spec +++ b/templates/rpm.spec @@ -24,4 +24,10 @@ chmod 755 %{buildroot}/usr/bin/yandex-music %files -/usr/ \ No newline at end of file +/usr/bin/yandex-music +/usr/lib/yandex-music +/usr/share/applications/yandex-music.desktop +/usr/share/icons/hicolor/48x48/apps/yandex-music.png +/usr/share/icons/hicolor/scalable/apps/yandex-music.svg +/usr/share/licenses/yandex-music +/usr/share/pixmaps/yandex-music.png \ No newline at end of file From 209f9f8fa35cfd31785a98c091591856f9e75802 Mon Sep 17 00:00:00 2001 From: Yury Shvedov Date: Sun, 10 Mar 2024 10:05:11 +0300 Subject: [PATCH 16/16] Fix build with nix * Do not remember current pwd - just use realpath * Do not preserve modes while copying icons Change-Id: I0408c30cb363efe58282ce6b1ac06acb83697abe --- .github/workflows/build.yml | 3 +-- repack.sh | 7 ++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 008ebb5..e286be9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,7 +33,7 @@ jobs: - name: Fix permissions for build run: mkdir /home/build && chgrp nobody /home/build && chmod g+ws /home/build && setfacl -m u::rwx,g::rwx /home/build && setfacl -d --set u::rwx,g::rwx,o::- /home/build && chown nobody . - + - name: Make Arch package run: sudo -u nobody makepkg --log && mv *.pkg.tar.zst dist/ @@ -85,7 +85,6 @@ jobs: path: ./dist/release_notes.json nix-build: - if: false runs-on: ubuntu-latest env: NIXPKGS_ALLOW_UNFREE: 1 diff --git a/repack.sh b/repack.sh index 025dcd7..7ce5e27 100755 --- a/repack.sh +++ b/repack.sh @@ -14,13 +14,12 @@ usage() { exe_location= dst="$PWD/app" -START_DIR="$PWD" SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) nopatch=0 while getopts :xo:ph name; do case $name in x) extract_only=1 ;; - o) dst="$OPTARG" ;; + o) dst="$(realpath "$OPTARG")" ;; p) nopatch=1 ;; h) usage @@ -85,7 +84,7 @@ done echo "Title Fixed" echo "Replacing Icons" -cp -af "$SCRIPT_DIR/icons/." "./build/next-desktop/" +cp -drf "$SCRIPT_DIR/icons/." "./build/next-desktop/" echo "Replaced Icons" # applying patches @@ -121,8 +120,6 @@ if [ "$nopatch" != "1" ]; then done fi -cd "$START_DIR" # fix relative path when using -o flag - mkdir -p "$dst" if [ -n "$extract_only" ]; then