diff --git a/.backportrc.json b/.backportrc.json index 1c7b5305f4..1a9f634db4 100644 --- a/.backportrc.json +++ b/.backportrc.json @@ -2,7 +2,7 @@ "repoOwner": "terrapkg", "repoName": "packages", "resetAuthor": true, - "targetBranchChoices": ["f39", "f40", "frawhide"], + "targetBranchChoices": ["el10", "f41", "f42", "f43", "frawhide"], "branchLabelMapping": { "^sync-(.+)$": "$1" } diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 3f3821ff90..0e5778eefe 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -1,6 +1,8 @@ # for each folder in anda/ # generate a new workflow for each folder in anda/ name: Automatically build packages +permissions: + contents: read on: push: paths: @@ -36,77 +38,8 @@ jobs: run: anda ci >> $GITHUB_OUTPUT build: needs: manifest - strategy: - matrix: - pkg: ${{ fromJson(needs.manifest.outputs.build_matrix) }} - version: ["rawhide"] - fail-fast: false - runs-on: ${{ (matrix.pkg.arch == 'aarch64' && matrix.pkg.labels['large']) && 'arm64-lg' || matrix.pkg.arch == 'aarch64' && 'ubuntu-22.04-arm' || matrix.pkg.labels['large'] && 'x86-64-lg' || 'ubuntu-22.04' }} - container: - image: ghcr.io/terrapkg/builder:f${{ matrix.version }} - options: --cap-add=SYS_ADMIN --privileged - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up git repository - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - - name: CI Setup Script - if: ${{ matrix.pkg.labels.mock != '1' }} - run: | - dir=$(dirname ${{ matrix.pkg.pkg }}) - if [ -f $dir/ci_setup.rhai ]; then - anda run $dir/ci_setup.rhai --labels script_path=$dir/ci_setup.rhai - fi - - - name: Install Build Dependencies - if: ${{ matrix.pkg.labels.mock != '1' }} - run: | - dir=$(dirname ${{ matrix.pkg.pkg }}) - dnf5 builddep -y ${dir}/*.spec - - - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ !matrix.pkg.labels.mock == '1' && '-rrpmbuild' || '' }} - - - name: Generating artifact name - id: art - run: | - NAME=${{ matrix.pkg.pkg }}-${{ matrix.pkg.arch }}-${{ matrix.version }} - x=${NAME//\//@} - echo "name=$x" >> $GITHUB_OUTPUT - - - uses: actions/upload-artifact@v4 - with: - name: ${{ steps.art.outputs.name }} - compression-level: 0 # The RPMs are already compressed :p - path: | - anda-build/rpm/rpms/* - anda-build/rpm/srpm/* - - - name: Upload packages to subatomic - if: github.event_name == 'push' - run: | - subrepo="${{ matrix.pkg.labels.subrepo }}" - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }} anda-build/rpm/rpms/* - - - name: Upload source packages to subatomic - if: github.event_name == 'push' - run: | - subrepo="${{ matrix.pkg.labels.subrepo }}" - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }}-source anda-build/rpm/srpm/* - - - name: Notify Madoguchi (Success) - if: success() && github.event_name == 'push' - run: ./.github/workflows/mg.sh true ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA - - name: Notify Madoguchi (Failure) - if: ( cancelled() || failure() ) && github.event_name == 'push' - run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + uses: ./.github/workflows/json-build.yml + secrets: inherit + with: + packages: ${{ needs.manifest.outputs.build_matrix }} + publish: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/bootstrap.yml b/.github/workflows/bootstrap.yml index b8b28a99ef..f5e0bcfeb5 100644 --- a/.github/workflows/bootstrap.yml +++ b/.github/workflows/bootstrap.yml @@ -1,5 +1,6 @@ name: Bootstrap Andaman and Subatomic - +permissions: + contents: read on: workflow_dispatch: @@ -46,15 +47,15 @@ jobs: echo "PATH=$PATH:/github/home/.cargo/bin" >> $GITHUB_ENV export PATH=$PATH:/github/home/.cargo/bin git config --global --add safe.directory "$GITHUB_WORKSPACE" - anda build -rrpmbuild anda/terra/mock-configs/pkg + anda build -D "vendor Terra" -rrpmbuild anda/terra/mock-configs/pkg - name: Install terra-mock-configs run: dnf5 install -y anda-build/rpm/rpms/terra-mock-configs*.rpm - - name: Build trra-release - run: anda build -rrpmbuild anda/terra/release/pkg + - name: Build terra-release + run: anda build -D "vendor Terra" -rrpmbuild anda/terra/release/pkg - name: Build Subatomic - run: anda build -rrpmbuild anda/tools/buildsys/subatomic/pkg + run: anda build -D "vendor Terra" -rrpmbuild anda/tools/buildsys/subatomic/pkg - name: Install Subatomic run: dnf5 install -y ./anda-build/rpm/rpms/subatomic-*.rpm diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bdb54aa4ee..d28e1f2bec 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,6 @@ name: Manual Builds +permissions: + contents: read on: workflow_dispatch: inputs: @@ -10,92 +12,53 @@ on: required: false default: "" architecture: - description: "Architecture" + description: "Architectures" required: false - default: all + default: "" type: string -jobs: - parse: - outputs: - pkgs: ${{ steps.parsing.outputs.pkgs }} - builder: ${{ inputs.custom_builder }} - arch: ${{ steps.parsing.outputs.arch }} - runs-on: ubuntu-22.04 - steps: - - name: Parse Input - id: parsing - run: | - echo "${{ inputs.packages }}" | sed 's/ /\n/g' | sed 's/$/\//g' | jq -R . | jq -s . | jq -c . | sed 's/^/pkgs=/' >> $GITHUB_OUTPUT - echo "builder=${{ inputs.custom_builder }}" >> $GITHUB_OUTPUT - arch="${{ inputs.architecture }}" - # Convert to json array using jq - # if arch is not all, convert to array - if [ "$arch" != "all" ]; then - # jq, array with single element as string - arch=$(echo $arch | sed 's/,/\n/g') - echo "arch=$(echo $arch | jq -Rs 'split("\n")' | jq 'map(select(length > 0))' | jq -c .)" >> $GITHUB_OUTPUT - else - echo "arch=$(echo '["aarch64", "x86_64"]' | jq -c .)" >> $GITHUB_OUTPUT - fi +run-name: ${{ inputs.packages }} - build: - needs: parse - strategy: - matrix: - pkg: ${{ fromJson(needs.parse.outputs.pkgs) }} - version: ["rawhide"] - arch: ${{ fromJson(needs.parse.outputs.arch) }} - fail-fast: false - runs-on: ${{ matrix.arch == 'aarch64' && 'ubuntu-22.04-arm' || needs.parse.outputs.builder && needs.parse.outputs.builder || 'ubuntu-22.04' }} +jobs: + manifest: + outputs: + build_matrix: ${{ steps.parsing.outputs.build_matrix }} + runs-on: ubuntu-22.04 container: - image: ghcr.io/terrapkg/builder:f${{ matrix.version }} + image: ghcr.io/terrapkg/builder:frawhide options: --cap-add=SYS_ADMIN --privileged steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - - - name: Set up git repository - run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - - - name: Build with Andaman - run: anda build -c terra-${{ matrix.version }}-${{ matrix.arch }} anda/${{ matrix.pkg }}pkg - - - name: Generating artifact name - id: art + - name: Setup Git run: | - NAME=${{ matrix.pkg }}-${{ matrix.arch }}-${{ matrix.version }} - x=${NAME//\//@} - echo "name=$x" >> $GITHUB_OUTPUT - echo "labels=$(anda run andax/get_proj_label.rhai -l project=anda/${{ matrix.pkg }}anda.hcl)" >> $GITHUB_OUTPUT - - - uses: actions/upload-artifact@v4 - with: - name: ${{ steps.art.outputs.name }} - compression-level: 0 # The RPMs are already compressed :p - path: | - anda-build/rpm/rpms/* - anda-build/rpm/srpm/* - - - name: Upload packages to subatomic + git config --global --add safe.directory "$GITHUB_WORKSPACE" + git config user.name "Raboneko" + git config user.email "raboneko@fyralabs.com" + - name: Parse Input + id: parsing run: | - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ fromJson(steps.art.outputs.labels)['extra'] && '-extras' }} anda-build/rpm/rpms/* + for pkg in ${{ inputs.packages }}; do + touch anda/$pkg/.build + done + git add --all + git commit -a -m "tmp" + b=$(anda ci | sed -E 's@^build_matrix=@@') + if [ "${{ inputs.architecture }}" != "" ]; then + # e.g.: [ unique_by(.pkg)[] | (.arch="x86_64", .arch="aarch64") ] + filter=`echo -n "${{ inputs.architecture }}" | tr '[:space:]' '\n' | sed -E '/^$/d; s@^.+$@.arch="\0"@' | tr '\n' ', '` + b=`echo $b | jq -c '[unique_by(.pkg)[] | ('"$filter"')]'` + elif [ "${{ inputs.custom_builder }}" != "" ]; then + b=`echo $b | jq -c 'unique_by(.pkg)'` + fi + echo "build_matrix=$b" >> $GITHUB_OUTPUT - - name: Upload source packages to subatomic - run: | - subatomic-cli upload --prune \ - --server https://subatomic.fyralabs.com \ - --token ${{ secrets.SUBATOMIC_TOKEN }} \ - terra${{ matrix.version }}${{ fromJson(steps.art.outputs.labels)['extra'] && '-extras' }}-source anda-build/rpm/srpm/* - - - name: Notify Madoguchi (Success) - if: success() - run: ./.github/workflows/mg.sh true ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA - - name: Notify Madoguchi (Failure) - if: cancelled() || failure() - run: ./.github/workflows/mg.sh false ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + build: + needs: manifest + uses: ./.github/workflows/json-build.yml + secrets: inherit + with: + packages: ${{ needs.manifest.outputs.build_matrix }} + custom_builder: ${{ inputs.custom_builder }} diff --git a/.github/workflows/json-build.yml b/.github/workflows/json-build.yml index 508066d614..e4de7ecb0a 100644 --- a/.github/workflows/json-build.yml +++ b/.github/workflows/json-build.yml @@ -1,10 +1,34 @@ name: JSON Build +permissions: + contents: read on: + workflow_call: + inputs: + packages: + description: "Packages to Build" + required: true + type: string + publish: + description: "Whether the package should be published" + required: false + type: boolean + default: true + custom_builder: + description: "Custom Builder" + required: false + type: string + default: "" workflow_dispatch: inputs: packages: description: "Packages to Build" required: true + type: string + publish: + description: "Whether the package should be published" + required: false + type: boolean + default: true jobs: build: @@ -13,7 +37,7 @@ jobs: pkg: ${{ fromJson(inputs.packages) }} version: ["rawhide"] fail-fast: false - runs-on: ${{ (matrix.pkg.arch == 'aarch64' && matrix.pkg.labels['large']) && 'arm64-lg' || matrix.pkg.arch == 'aarch64' && 'ubuntu-22.04-arm' || matrix.pkg.labels['large'] && 'x86-64-lg' || 'ubuntu-22.04' }} + runs-on: ${{ inputs.custom_builder && inputs.custom_builder || (matrix.pkg.arch == 'aarch64' && matrix.pkg.labels['large']) && 'arm64-lg' || matrix.pkg.arch == 'aarch64' && 'ubuntu-22.04-arm' || matrix.pkg.labels['large'] && 'cirun-x86-64-lg--${{ github.run_id }}"' || 'ubuntu-22.04' }} container: image: ghcr.io/terrapkg/builder:f${{ matrix.version }} options: --cap-add=SYS_ADMIN --privileged @@ -35,13 +59,13 @@ jobs: fi - name: Install Build Dependencies - if: ${{ !contains(matrix.pkg.labels, 'mock') }} + if: ${{ matrix.pkg.labels.mock != '1' }} run: | dir=$(dirname ${{ matrix.pkg.pkg }}) dnf5 builddep -y ${dir}/*.spec - name: Build with Andaman - run: anda build ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ contains(matrix.pkg.labels, 'mock') && '' || '-rrpmbuild' }} + run: anda build -D "vendor Terra" ${{ matrix.pkg.pkg }} -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }} ${{ !matrix.pkg.labels.mock == '1' && '-rrpmbuild' || '' }} - name: Generating artifact name id: art @@ -59,6 +83,7 @@ jobs: anda-build/rpm/srpm/* - name: Upload packages to subatomic + if: inputs.publish run: | subrepo="${{ matrix.pkg.labels.subrepo }}" subatomic-cli upload --prune \ @@ -67,6 +92,7 @@ jobs: terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }} anda-build/rpm/rpms/* - name: Upload source packages to subatomic + if: inputs.publish && matrix.pkg.labels['no_upload_srpms'] != '1' run: | subrepo="${{ matrix.pkg.labels.subrepo }}" subatomic-cli upload --prune \ @@ -75,8 +101,8 @@ jobs: terra${{ matrix.version }}${{ matrix.pkg.labels['subrepo'] && '-$subrepo' || '' }}-source anda-build/rpm/srpm/* - name: Notify Madoguchi (Success) - if: success() - run: ./.github/workflows/mg.sh true ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + if: inputs.publish && success() + run: ./.github/workflows/mg.sh true "${{matrix.pkg.pkg}}" "${{matrix.version}}" "${{matrix.pkg.arch}}" "${{github.run_id}}" "${{secrets.MADOGUCHI_JWT}}" "$GITHUB_SHA" - name: Notify Madoguchi (Failure) - if: cancelled() || failure() - run: ./.github/workflows/mg.sh false ${{matrix.pkg.pkg}} ${{matrix.version}} ${{matrix.pkg.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}} $GITHUB_SHA + if: inputs.publish && (cancelled() || failure()) + run: ./.github/workflows/mg.sh false "${{matrix.pkg.pkg}}" "${{matrix.version}}" "${{matrix.pkg.arch}}" "${{github.run_id}}" "${{secrets.MADOGUCHI_JWT}}" "$GITHUB_SHA" diff --git a/.github/workflows/mg.sh b/.github/workflows/mg.sh index 64402b1718..1195f8d31c 100755 --- a/.github/workflows/mg.sh +++ b/.github/workflows/mg.sh @@ -7,14 +7,14 @@ export p="{\"id\":\"$5\",\"ver\":\"%v\",\"rel\":\"%r\",\"arch\":\"$4\",\"dirs\": if [[ $1 == false ]]; then d=${p/\%v/?} d=${d/\%r/?} - curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci/terra$3/builds/f -X PUT -H "Content-Type: application/json" -d $d --fail-with-body + curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci5/terra$3/builds/f -X PUT -H "Content-Type: application/json" -d "$d" --fail-with-body exit 0 fi for f in anda-build/rpm/rpms/*; do - n=$(lesspipe.sh $f | grep -E "Name\s*: " | sed "s@Name\s*: @@") - v=$(lesspipe.sh $f | grep -E "Version\s*: " | sed "s@Version\s*: @@") - r=$(lesspipe.sh $f | grep -E "Release\s*: " | sed "s@Release\s*: @@") + n=$(lesspipe.sh $f | grep -E "Name\s*: " | sed "s@Name\s*: @@" | head -n1) + v=$(lesspipe.sh $f | grep -E "Version\s*: " | sed "s@Version\s*: @@" | head -n1) + r=$(lesspipe.sh $f | grep -E "Release\s*: " | sed "s@Release\s*: @@" | head -n1) d=${p/\%v/$v} d=${d/\%r/$r} curl -H "Authorization: Bearer $6" https://madoguchi.fyralabs.com/ci5/terra$3/builds/$n -X PUT -H "Content-Type: application/json" -d $d --fail-with-body diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 10b85a5a55..f061efc1d3 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -1,5 +1,7 @@ name: Automatic backport/sync action - +permissions: + contents: write + pull-requests: write on: pull_request_target: types: ["labeled", "closed"] @@ -23,7 +25,7 @@ jobs: git config --global commit.gpgsign true - name: Backport Action - uses: sorenlouv/backport-github-action@v9.3.0 + uses: sorenlouv/backport-github-action@v9.5.1 with: github_token: ${{ secrets.RABONEKO_BACKPORT_GITHUB_TOKEN }} auto_backport_label_prefix: sync- diff --git a/.github/workflows/update-branch.yml b/.github/workflows/update-branch.yml index 20aaa8d3ab..c8c6e8fd8b 100644 --- a/.github/workflows/update-branch.yml +++ b/.github/workflows/update-branch.yml @@ -1,4 +1,6 @@ name: Update per branch +permissions: + contents: write on: schedule: - cron: "*/30 * * * *" @@ -11,9 +13,9 @@ jobs: matrix: branch: - frawhide - - f40 - f41 - f42 + - f43 - el10 container: image: ghcr.io/terrapkg/builder:frawhide @@ -49,7 +51,7 @@ jobs: git config user.email "raboneko@fyralabs.com" git config gpg.format "ssh" git config user.signingkey "${{ runner.temp }}/signing_key" - msg="bump(branch): $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" + msg="bump(branch): $(anda run andax/ci/update_commit_message.rhai)" git commit -S -a -m "$msg" git push -u origin --all fi diff --git a/.github/workflows/update-comps.yml b/.github/workflows/update-comps.yml index 40f5627232..d207012788 100644 --- a/.github/workflows/update-comps.yml +++ b/.github/workflows/update-comps.yml @@ -1,12 +1,14 @@ name: Push comps updates +permissions: + contents: read on: push: branches: - frawhide + - f43 - f42 - f41 - - f40 - el10 paths: - comps.xml diff --git a/.github/workflows/update-nightly.yml b/.github/workflows/update-nightly.yml index 0ee9552bd3..4276a9efde 100644 --- a/.github/workflows/update-nightly.yml +++ b/.github/workflows/update-nightly.yml @@ -1,4 +1,6 @@ name: Nightly Update +permissions: + contents: write on: schedule: - cron: "0 0 * * *" @@ -37,7 +39,7 @@ jobs: git config user.email "raboneko@fyralabs.com" git config gpg.format "ssh" git config user.signingkey "${{ runner.temp }}/signing_key" - msg="bump(nightly): $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" + msg="bump(nightly): $(anda run andax/ci/update_commit_message.rhai)" git commit -S -a -m "$msg" git format-patch HEAD^ copy_over () { @@ -46,9 +48,9 @@ jobs: git add anda git commit -S -a -m "$msg" } - copy_over f40 || true copy_over f41 || true copy_over f42 || true + copy_over f43 || true copy_over el10 || true git push -u origin --all fi diff --git a/.github/workflows/update-weekly.yml b/.github/workflows/update-weekly.yml index 075405b2e3..8ed3b81fea 100644 --- a/.github/workflows/update-weekly.yml +++ b/.github/workflows/update-weekly.yml @@ -1,4 +1,6 @@ name: Weekly Update +permissions: + contents: write on: schedule: - cron: "0 0 * * *" @@ -37,7 +39,7 @@ jobs: git config user.email "raboneko@fyralabs.com" git config gpg.format "ssh" git config user.signingkey "${{ runner.temp }}/signing_key" - msg="bump(weekly): $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" + msg="bump(weekly): $(anda run andax/ci/update_commit_message.rhai)" git commit -S -a -m "$msg" git format-patch HEAD^ copy_over () { @@ -46,9 +48,9 @@ jobs: git add anda git commit -S -a -m "$msg" } - copy_over f40 || true copy_over f41 || true copy_over f42 || true + copy_over f43 || true copy_over el10 || true git push -u origin --all fi diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index d178a81ffe..4ca198325d 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -1,4 +1,6 @@ name: Update +permissions: + contents: write on: schedule: - cron: "*/10 * * * *" @@ -37,7 +39,7 @@ jobs: git config user.email "raboneko@fyralabs.com" git config gpg.format "ssh" git config user.signingkey "${{ runner.temp }}/signing_key" - msg="bump: $(git status | grep modified | sed -r 's@.+/([^/]+)/[^/]+\n?@\1 @g' | tr -d '\n')" + msg="bump: $(anda run andax/ci/update_commit_message.rhai)" git commit -S -a -m "$msg" git format-patch HEAD^ copy_over () { @@ -46,9 +48,9 @@ jobs: git add anda git commit -S -a -m "$msg" } - copy_over f40 || true copy_over f41 || true copy_over f42 || true + copy_over f43 || true copy_over el10 || true git push -u origin --all fi diff --git a/.gitignore b/.gitignore index b94a9b5645..44eb52965d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ anda-build/ **/*.tar* +**/*.crate +**/*.zip diff --git a/README.md b/README.md index 2db5d61314..fc0c5d7f18 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,8 @@ This monorepo contains the package manifests for all packages in Terra. ## Installation +### Fedora + ```bash sudo dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release ``` @@ -24,6 +26,24 @@ curl -fsSL https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo | pke sudo rpm-ostree install terra-release ``` +Optionally, you can install `terra-release-extra` to use the Extras repository. This also installs the Nvidia, and Mesa streams but does not enable them. + +### Enterprise Linux (EL) + +Only EL10 is supported. Not all packages available in Terra are available in Terra EL at this time. + +Terra EL requires the EPEL repos, which may be installed with: + +```bash +sudo dnf install 'https://dl.fedoraproject.org/pub/epel/epel-release-latest-$releasever.noarch.rpm' +``` + +And Terra EL itself can be installed with: + +```bash +sudo dnf install --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terrael$releasever' terra-release +``` + ## Documentation Our documentation can be found on our [Devdocs](https://developer.fyralabs.com/terra/). diff --git a/anda/apps/anki-bin/anki-bin.spec b/anda/apps/anki-bin/anki-bin.spec index d5b553cf7c..2147f0f5d0 100644 --- a/anda/apps/anki-bin/anki-bin.spec +++ b/anda/apps/anki-bin/anki-bin.spec @@ -1,9 +1,9 @@ -%global xurl https://files.pythonhosted.org/packages/68/9c/7685bd012e597332f8ce379a31b0d58dd4eae960da96ff43e9fcd978c93f/anki-25.02-cp39-abi3-manylinux_2_35_x86_64.whl -%global aurl https://files.pythonhosted.org/packages/da/36/741cef7b7fce943d187784549fd8de8152986067d9226f384959c07770a7/anki-25.02-cp39-abi3-manylinux_2_35_aarch64.whl -%global qurl https://files.pythonhosted.org/packages/2c/bc/763589b97aa5c91acf3d834beaa473c25ca7f335c7b40954fd0d5fd41ddc/aqt-25.02-py3-none-any.whl +%global xurl https://files.pythonhosted.org/packages/a3/86/c1c459a06466ffc3a205de9852875a922c378a7bfb9fb1310bea019dacd1/anki-25.7.5-cp39-abi3-manylinux_2_36_x86_64.whl +%global aurl https://files.pythonhosted.org/packages/29/75/81eb12d43381f5150a2fb1acc2757d25741af5bf0635f40faab61eefcb44/anki-25.7.5-cp39-abi3-manylinux_2_36_aarch64.whl +%global qurl https://files.pythonhosted.org/packages/5e/e6/4c36d3c1ed0e2a6e4bf95eb919d603078d935b5c75950c7627e79340f25a/aqt-25.7.5-py3-none-any.whl Name: anki-bin -Version: 25.02 +Version: 25.7.5 Release: 1%?dist Summary: Flashcard program for using space repetition learning (Installed with wheel) License: AGPL-3.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-3.0 AND Apache-2.0 AND CC-BY-2.5 diff --git a/anda/apps/anki-qt5/anki-qt5.spec b/anda/apps/anki-qt5/anki-qt5.spec index 15d5bb5248..b1879201d1 100644 --- a/anda/apps/anki-qt5/anki-qt5.spec +++ b/anda/apps/anki-qt5/anki-qt5.spec @@ -1,5 +1,5 @@ Name: anki-qt5 -Version: 25.02 +Version: 25.07.5 Release: 1%?dist Summary: Flashcard program for using space repetition learning License: AGPL-3.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-3.0 AND Apache-2.0 AND CC-BY-2.5 diff --git a/anda/apps/anki/anki.spec b/anda/apps/anki/anki.spec index 64193322c7..4fd052c8b4 100644 --- a/anda/apps/anki/anki.spec +++ b/anda/apps/anki/anki.spec @@ -1,5 +1,5 @@ Name: anki -Version: 25.02 +Version: 25.07.5 Release: 1%?dist Summary: Flashcard program for using space repetition learning License: AGPL-3.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND BSD-3-Clause AND CC-BY-SA-3.0 AND CC-BY-3.0 AND Apache-2.0 AND CC-BY-2.5 diff --git a/anda/apps/audacity-freeworld/audacity-freeworld.spec b/anda/apps/audacity-freeworld/audacity-freeworld.spec index 34623d542c..2fca654d4a 100644 --- a/anda/apps/audacity-freeworld/audacity-freeworld.spec +++ b/anda/apps/audacity-freeworld/audacity-freeworld.spec @@ -1,8 +1,8 @@ %global __requires_exclude ^lib-.*.so %global __provides_exclude ^lib-.*.so -%global ver Audacity 3.7.1 -%global sanitized_ver %(sed 's/ *//;s/Audacity//' <<< "%{ver}") +%global ver Audacity-3.7.5 +%global sanitized_ver %(echo %{ver} | sed 's/Audacity-//g') Name: audacity-freeworld Version: %{sanitized_ver} diff --git a/anda/apps/audacity-freeworld/update.rhai b/anda/apps/audacity-freeworld/update.rhai index 911fc1d97a..e0acc0c618 100644 --- a/anda/apps/audacity-freeworld/update.rhai +++ b/anda/apps/audacity-freeworld/update.rhai @@ -1 +1,4 @@ rpm.global("ver", gh("audacity/audacity")); +if rpm.changed() { + rpm.release(); +} diff --git a/anda/apps/bitwarden/cli.bin/anda.hcl b/anda/apps/bitwarden/cli.bin/anda.hcl new file mode 100644 index 0000000000..961f09175b --- /dev/null +++ b/anda/apps/bitwarden/cli.bin/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "bitwarden-cli.bin.spec" + } +} diff --git a/anda/apps/bitwarden/cli.bin/bitwarden-cli.bin.spec b/anda/apps/bitwarden/cli.bin/bitwarden-cli.bin.spec new file mode 100644 index 0000000000..3a8cdf718d --- /dev/null +++ b/anda/apps/bitwarden/cli.bin/bitwarden-cli.bin.spec @@ -0,0 +1,25 @@ +Name: bitwarden-cli.bin +Version: 2025.8.0 +Release: 1%?dist +Summary: Bitwarden command-line client +License: GPL-3.0-only +URL: https://bitwarden.com +Source0: https://github.com/bitwarden/clients/releases/download/cli-v%version/bw-oss-linux-%version.zip + +Packager: madonuko +Provides: bw +ExclusiveArch: x86_64 + +BuildRequires: unzip + +%description +%summary. + +%prep +unzip %{S:0} + +%install +install -Dpm755 bw -t %buildroot%_bindir + +%files +%_bindir/bw diff --git a/anda/apps/bitwarden/cli.bin/update.rhai b/anda/apps/bitwarden/cli.bin/update.rhai new file mode 100644 index 0000000000..9b38d863b0 --- /dev/null +++ b/anda/apps/bitwarden/cli.bin/update.rhai @@ -0,0 +1,5 @@ +let v = gh("bitwarden/clients"); +if v.starts_with("cli-v") { + v.crop(5); + rpm.version(v); +} diff --git a/anda/apps/bitwarden/cli/anda.hcl b/anda/apps/bitwarden/cli/anda.hcl new file mode 100644 index 0000000000..240de1b3ce --- /dev/null +++ b/anda/apps/bitwarden/cli/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "bitwarden-cli.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/apps/bitwarden/cli/bitwarden-cli.spec b/anda/apps/bitwarden/cli/bitwarden-cli.spec new file mode 100644 index 0000000000..a3041e5baa --- /dev/null +++ b/anda/apps/bitwarden/cli/bitwarden-cli.spec @@ -0,0 +1,40 @@ +%define debug_package %nil +%global __strip /bin/true + +%ifarch aarch64 +%global armsuffix -arm64 +%endif + +Name: bitwarden-cli +Version: 2025.8.0 +Release: 1%?dist +Summary: Bitwarden command-line client +License: GPL-3.0-only +URL: https://bitwarden.com +Source0: https://github.com/bitwarden/clients/archive/refs/tags/cli-v%version.tar.gz + +Packager: madonuko +Provides: bw + +BuildRequires: nodejs-npm +BuildRequires: gcc-c++ gcc make + +%description +%summary. + +%prep +%autosetup -n clients-cli-v%version +npm i + +%build +pushd apps/cli +npm i +npm run dist:oss:lin%?armsuffix + +%install +install -Dm755 apps/cli/dist/oss/linux%?armsuffix/bw -t %buildroot%_bindir + +%files +%doc README.md SECURITY.md CONTRIBUTING.md +%license LICENSE.txt LICENSE_GPL.txt LICENSE_BITWARDEN.txt +%_bindir/bw diff --git a/anda/apps/bitwarden/cli/update.rhai b/anda/apps/bitwarden/cli/update.rhai new file mode 100644 index 0000000000..5ac855ef2d --- /dev/null +++ b/anda/apps/bitwarden/cli/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("bitwarden-cli.bin", labels.branch)); diff --git a/anda/apps/coolercontrol/coolercontrol.spec b/anda/apps/coolercontrol/coolercontrol.spec index f2a3731032..f342fc7281 100644 --- a/anda/apps/coolercontrol/coolercontrol.spec +++ b/anda/apps/coolercontrol/coolercontrol.spec @@ -8,7 +8,7 @@ for background device management, as well as a GUI to expertly customize your se %global __brp_mangle_shebangs %{nil} Name: coolercontrol -Version: 1.4.5 +Version: 2.2.2 Release: 1%?dist Summary: Cooling device control for Linux License: GPL-3.0-or-later @@ -21,19 +21,19 @@ Requires: hicolor-icon-theme Requires: webkit2gtk4.1 Requires: libappindicator-gtk3 Requires: coolercontrold -BuildRequires: git-core make nodejs-npm libdrm-devel curl wget file mold +BuildRequires: nodejs-npm libdrm-devel curl wget file mold BuildRequires: systemd-rpm-macros anda-srpm-macros cargo >= 1.75.0 cargo-rpm-macros -BuildRequires: autoconf automake binutils bison flex gcc gcc-c++ gdb libtool pkgconf strace -BuildRequires: pkgconfig(webkit2gtk-4.1) pkgconfig(openssl) pkgconfig(librsvg-2.0) -BuildRequires: libappindicator-gtk3-devel -BuildRequires: python3-devel python3-wheel python3-liquidctl python3-setproctitle python3-fastapi python3-uvicorn python3-pip +BuildRequires: binutils bison cmake flex gcc gcc-c++ libtool strace BuildRequires: libappstream-glib BuildRequires: desktop-file-utils +BuildRequires: cmake(Qt6) +BuildRequires: cmake(Qt6WebEngineWidgets) %description %_desc %package liqctld Summary: CoolerControl daemon for interacting with liquidctl devices on a system level Requires: coolercontrold +BuildRequires: python3-devel python3-wheel python3-liquidctl python3-setproctitle python3-fastapi python3-uvicorn python3-pip %description liqctld %_desc coolercontrol-liqctld is a CoolerControl daemon for interacting with liquidctl devices on a system level, and is installed as the coolercontrol-liqctld application. Its main purpose is to wrap the underlying @@ -43,6 +43,8 @@ It also enables parallel device communication and access to specific device prop %package -n coolercontrold Summary: Monitor and control your cooling devices. Requires: coolercontrol-liqctld +BuildRequires: pkgconfig(webkit2gtk-4.1) pkgconfig(openssl) pkgconfig(librsvg-2.0) +BuildRequires: libappindicator-gtk3-devel %description -n coolercontrold %_desc coolercontrold is the main daemon containing the core logic for interfacing with devices, and installed as "coolercontrold". It is meant to run in the background as a system daemon. It handles all device @@ -59,33 +61,31 @@ popd pushd coolercontrol-ui npm ci --prefer-offline & -pushd src-tauri -%cargo_prep_online & -popd popd wait %build -pushd coolercontrold -%{cargo_license_online} > LICENSE.dependencies & -%cargo_build -- & +pushd coolercontrol-ui +npm run build-only & popd pushd coolercontrol-liqctld %pyproject_wheel popd -pushd coolercontrol-ui -npm run build & -pushd src-tauri -%{cargo_license_online} > LICENSE.dependencies & -wait -%cargo_build -f custom-protocol -popd +pushd coolercontrol +%cmake +%cmake_build & popd +pushd coolercontrold +%{cargo_license_online} > LICENSE.dependencies & +wait +cp -rfp ../coolercontrol-ui/dist/* resources/app/ +%cargo_build +popd %install pushd coolercontrol-liqctld @@ -99,9 +99,8 @@ install -Dpm755 target/rpm/coolercontrold %buildroot%_bindir/coolercontrold install -Dpm644 LICENSE.dependencies %buildroot%_datadir/licenses/coolercontrold/LICENSE.dependencies popd -pushd coolercontrol-ui/src-tauri -install -Dpm755 target/rpm/coolercontrol %buildroot%_bindir/coolercontrol -install -Dpm644 LICENSE.dependencies %buildroot%_datadir/licenses/%name/LICENSE.dependencies +pushd coolercontrol/ +%cmake_install popd install -Dpm644 packaging/systemd/coolercontrol-liqctld.service %buildroot%_unitdir/coolercontrol-liqctld.service @@ -135,7 +134,6 @@ appstream-util validate-relax --nonet %buildroot%_metainfodir/%rdnn.metainfo.xml %files %doc README.md %license LICENSE -%license LICENSE.dependencies %_bindir/coolercontrol %_datadir/applications/%rdnn.desktop %_datadir/metainfo/%rdnn.metainfo.xml diff --git a/anda/apps/discord-canary-openasar/discord-canary-openasar.spec b/anda/apps/discord-canary-openasar/discord-canary-openasar.spec index 0185af5830..5e3b3bf9ac 100644 --- a/anda/apps/discord-canary-openasar/discord-canary-openasar.spec +++ b/anda/apps/discord-canary-openasar/discord-canary-openasar.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-canary-openasar -Version: 0.0.594 +Version: 0.0.744 Release: 1%?dist Summary: A snappier Discord rewrite with features like further customization and theming License: MIT AND https://discord.com/terms diff --git a/anda/apps/discord-canary/discord-canary.spec b/anda/apps/discord-canary/discord-canary.spec index 8ac9c7b7b8..12fc8743e8 100644 --- a/anda/apps/discord-canary/discord-canary.spec +++ b/anda/apps/discord-canary/discord-canary.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-canary -Version: 0.0.594 +Version: 0.0.744 Release: 1%?dist Summary: Free Voice and Text Chat for Gamers URL: discord.com diff --git a/anda/apps/discord-openasar/discord-openasar.spec b/anda/apps/discord-openasar/discord-openasar.spec index 163ae0d6b8..0045f7a1d1 100644 --- a/anda/apps/discord-openasar/discord-openasar.spec +++ b/anda/apps/discord-openasar/discord-openasar.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-openasar -Version: 0.0.86 +Version: 0.0.106 Release: 1%?dist Summary: A snappier Discord rewrite with features like further customization and theming License: MIT AND https://discord.com/terms diff --git a/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec b/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec index 5585d33015..beb1b24772 100644 --- a/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec +++ b/anda/apps/discord-ptb-openasar/discord-ptb-openasar.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-ptb-openasar -Version: 0.0.132 +Version: 0.0.157 Release: 1%?dist Summary: A snappier Discord rewrite with features like further customization and theming License: MIT AND https://discord.com/terms diff --git a/anda/apps/discord-ptb/discord-ptb.spec b/anda/apps/discord-ptb/discord-ptb.spec index c22839fde0..2f3564ab30 100644 --- a/anda/apps/discord-ptb/discord-ptb.spec +++ b/anda/apps/discord-ptb/discord-ptb.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord-ptb -Version: 0.0.132 +Version: 0.0.157 Release: 1%?dist Summary: Free Voice and Text Chat for Gamers. URL: https://discord.com diff --git a/anda/apps/discord/discord.spec b/anda/apps/discord/discord.spec index 6a6e9eafb1..6a83463cb8 100644 --- a/anda/apps/discord/discord.spec +++ b/anda/apps/discord/discord.spec @@ -6,7 +6,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: discord -Version: 0.0.86 +Version: 0.0.106 Release: 1%?dist Summary: Free Voice and Text Chat for Gamers URL: https://discord.com diff --git a/anda/apps/envision/envision.spec b/anda/apps/envision/envision.spec index 30c8212f9e..9becf7faf9 100644 --- a/anda/apps/envision/envision.spec +++ b/anda/apps/envision/envision.spec @@ -1,22 +1,27 @@ -%global commit 33db18bd62d59a2d22550a7f42e15de8ab5c79d5 -%global commit_date 20250216 +%global commit 32b222cd9e2749cfdecb216189f954c719e3f66e +%global commit_date 20250820 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: envision-nightly Version: %commit_date.%shortcommit Release: 1%?dist Summary: UI for building, configuring and running Monado, the open source OpenXR runtime -License: AGPL-3.0-or-later +SourceLicense: AGPL-3.0-or-later +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND AGPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND ISC AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND Unicode-3.0 AND (Unlicense OR MIT) AND Zlib URL: https://gitlab.com/gabmus/envision/ Source0: %url/-/archive/%commit/envision-%commit.tar.gz -BuildRequires: meson ninja-build cargo +BuildRequires: anda-srpm-macros +BuildRequires: cargo +BuildRequires: cargo-rpm-macros +BuildRequires: meson +BuildRequires: ninja-build BuildRequires: pkgconfig(glib-2.0) >= 2.66 BuildRequires: pkgconfig(gio-2.0) >= 2.66 BuildRequires: pkgconfig(gtk4) >= 4.10.0 BuildRequires: pkgconfig(vte-2.91-gtk4) >= 0.72.0 BuildRequires: pkgconfig(libadwaita-1) BuildRequires: pkgconfig(libusb-1.0) -BuildRequires: openssl-devel-engine +BuildRequires: pkgconfig(openssl) BuildRequires: openxr-devel BuildRequires: libappstream-glib BuildRequires: desktop-file-utils @@ -30,17 +35,27 @@ Conflicts: envision %prep %autosetup -n envision-%commit +%cargo_prep_online %build +# generate constants.rs from constants.rs.in %meson + +# skip subdir +sed -E "/^subdir\('src'\)/d" -i meson.build + +%meson --reconfigure %meson_build %install %meson_install +%cargo_install +%{cargo_license_online} > LICENSE.dependencies %files %doc README.md %license LICENSE +%license LICENSE.dependencies %_bindir/envision %_datadir/applications/org.gabmus.envision.Devel.desktop %_datadir/envision/ diff --git a/anda/apps/feishin/feishin.spec b/anda/apps/feishin/feishin.spec index fef80dc997..9f7a34606b 100644 --- a/anda/apps/feishin/feishin.spec +++ b/anda/apps/feishin/feishin.spec @@ -6,14 +6,15 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: feishin -Version: 0.12.2 +Version: 0.19.0 Release: 1%?dist Summary: A modern self-hosted music player License: GPL-3.0 URL: https://github.com/jeffvli/feishin Source0: %url/archive/refs/tags/v%version.tar.gz Requires: fuse mpv -BuildRequires: nodejs20-npm jq libxcrypt-compat +Packager: madonuko +BuildRequires: jq libxcrypt-compat pnpm %description %summary. @@ -38,13 +39,9 @@ Keywords=Music;Jellyfin;Audio;Stream;Sonixd EOF %build -export PATH="$PATH:$(pwd)/bin" -mkdir bin -ln -s /usr/bin/node-20 bin/node -ln -s /usr/bin/npm-20 bin/npm -npm-20 install --legacy-peer-deps -npm-20 run postinstall -npm-20 run build +pnpm i +pnpm run postinstall +pnpm run build %ifarch x86_64 %define a linux @@ -52,11 +49,11 @@ npm-20 run build %define a arm64 %endif -npx-20 electron-builder --linux dir --%a +pnpm exec electron-builder --linux dir --%a %install mkdir -p %buildroot%_datadir/{pixmaps,applications} %buildroot%_bindir -mv release/build/*-unpacked %buildroot%_datadir/feishin +mv dist/*-unpacked %buildroot%_datadir/feishin install -Dm644 assets/icons/icon.png %buildroot%_datadir/pixmaps/feishin.png ln -s %_datadir/feishin/feishin %buildroot%_bindir/feishin install -Dm644 feishin.desktop %buildroot%_datadir/applications/ diff --git a/anda/apps/flameshot/anda.hcl b/anda/apps/flameshot/anda.hcl new file mode 100644 index 0000000000..7309723ea9 --- /dev/null +++ b/anda/apps/flameshot/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "flameshot-nightly.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/apps/flameshot/flameshot-nightly.spec b/anda/apps/flameshot/flameshot-nightly.spec new file mode 100644 index 0000000000..9f8cc301df --- /dev/null +++ b/anda/apps/flameshot/flameshot-nightly.spec @@ -0,0 +1,109 @@ +#? https://github.com/flameshot-org/flameshot/blob/master/packaging/rpm/fedora/flameshot.spec + +%global ver 12.1.0 +%global commit 4edfb2ac1d71e7f75fcdcb850ff6bce5fb148a7b +%global shortcommit %{sub %{commit} 1 7} +#global commit_date 20250608 +%global commit_date 20250618 +%global devel_name QtColorWidgets + +Name: flameshot.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 2%?dist +License: GPL-3.0-or-later AND ASL-2.0 AND GPL-2.0-only AND LGPL-3.0-only AND FAL-1.3 +Summary: Powerful yet simple to use screenshot software +URL: https://flameshot.org +Source0: https://github.com/flameshot-org/flameshot/archive/%commit/flameshot-%commit.tar.gz +Packager: madonuko + +BuildRequires: cmake >= 3.13.0 +BuildRequires: gcc-c++ >= 7 +BuildRequires: fdupes +BuildRequires: libappstream-glib +BuildRequires: ninja-build +BuildRequires: desktop-file-utils + +BuildRequires: cmake(Qt5Core) >= 5.9.0 +BuildRequires: cmake(KF5GuiAddons) >= 5.89.0 +BuildRequires: cmake(Qt5DBus) >= 5.9.0 +BuildRequires: cmake(Qt5Gui) >= 5.9.0 +BuildRequires: cmake(Qt5LinguistTools) >= 5.9.0 +BuildRequires: cmake(Qt5Network) >= 5.9.0 +BuildRequires: cmake(Qt5Svg) >= 5.9.0 +BuildRequires: cmake(Qt5Widgets) >= 5.9.0 + +Requires: hicolor-icon-theme +Requires: qt5-qtbase >= 5.9.0 +Requires: qt5-qttools >= 5.9.0 +Requires: qt5-qtsvg%{?_isa} >= 5.9.0 + +%dnl Provides: flameshot = %version-%release +Conflicts: flameshot + +Recommends: xdg-desktop-portal%{?_isa} +Recommends: (xdg-desktop-portal-gnome%{?_isa} if gnome-shell%{?_isa}) +Recommends: (xdg-desktop-portal-kde%{?_isa} if plasma-workspace-wayland%{?_isa}) +Recommends: (xdg-desktop-portal-wlr%{?_isa} if wlroots%{?_isa}) + +%description +Powerful and simple to use screenshot software with built-in +editor with advanced features. + +Features: + + * Customizable appearance. + * Easy to use. + * In-app screenshot edition. + * DBus interface. + * Upload to Imgur + + +%pkg_completion -Bfz flameshot + +%package devel +Summary: Flameshot development files +Requires: %{name} = %{version} + +%description devel +Development files for Flameshot. + +%prep +%autosetup -p1 -n flameshot-%commit + +%build +%cmake -G Ninja \ + -DCMAKE_BUILD_TYPE=Release \ + -DUSE_WAYLAND_CLIPBOARD:BOOL=ON \ +%cmake_build + +%install +%cmake_install +# https://fedoraproject.org/wiki/PackagingDrafts/find_lang +%find_lang Internationalization --with-qt +%fdupes %{buildroot}%{_datadir}/icons + +%check +appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.metainfo.xml +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop + +%files -f Internationalization.lang +%{_datadir}/flameshot/translations/Internationalization_grc.qm +%doc README.md +%license LICENSE +%dir %{_datadir}/flameshot +%dir %{_datadir}/flameshot/translations +%{_bindir}/flameshot +%{_libdir}/lib%{devel_name}.so.* +%{_datadir}/applications/org.flameshot.Flameshot.desktop +%{_metainfodir}/org.flameshot.Flameshot.metainfo.xml +%{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml +%{_datadir}/dbus-1/services/org.flameshot.Flameshot.service +%{_datadir}/icons/hicolor/*/apps/*.png +%{_datadir}/icons/hicolor/scalable/apps/*.svg +%{_mandir}/man1/flameshot.1* + +%files devel +%{_libdir}/lib%{devel_name}.so +%{_libdir}/cmake/%{devel_name}/ +%{_libdir}/pkgconfig/%{devel_name}.pc +%{_includedir}/%{devel_name}/ diff --git a/anda/apps/flameshot/update.rhai b/anda/apps/flameshot/update.rhai new file mode 100644 index 0000000000..514949abd6 --- /dev/null +++ b/anda/apps/flameshot/update.rhai @@ -0,0 +1,8 @@ +terminate(); +rpm.global("commit", gh_commit("flameshot-org/flameshot")); +if rpm.changed() { + let v = gh("flameshot-org/flameshot"); + v.crop(1); + rpm.global("ver", v); + rpm.global("commit_date", date()); +} diff --git a/anda/apps/flatpost/anda.hcl b/anda/apps/flatpost/anda.hcl new file mode 100644 index 0000000000..8c63cdb5fd --- /dev/null +++ b/anda/apps/flatpost/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "flatpost.spec" + } +} diff --git a/anda/apps/flatpost/flatpost.spec b/anda/apps/flatpost/flatpost.spec new file mode 100644 index 0000000000..136ac97309 --- /dev/null +++ b/anda/apps/flatpost/flatpost.spec @@ -0,0 +1,74 @@ +Name: flatpost +Version: 1.0.9 +Release: 1%?dist +License: BSD-2-Clause +Summary: Desktop environment agnostic Flathub software center. + +URL: https://github.com/gloriouseggroll/flatpost +Source0: %{url}/archive/refs/tags/%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: make +BuildRequires: desktop-file-utils + +Provides: nobara-updater + +# App Deps +Requires: python +Requires: python3 +Requires: python3-gobject +Requires: python3-requests +Requires: python3-pillow +Requires: python3-svgwrite +Requires: python3-fonttools +Requires: python3-numpy + +Requires: flatpak +Requires: glib2 +Requires: gtk3 +Requires: gtk4 +Requires: xdg-utils + +Requires(post): shared-mime-info +Requires(postun): shared-mime-info +Requires(posttrans): shared-mime-info + +%description +Desktop environment agnostic Flathub software center. Allows for browsing, +installation, removal, updating, and permission management of flatpak packages and repositories. + +%prep +%autosetup -p1 + +%build +make all DESTDIR=%{buildroot} + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/com.flatpost.flatpostapp.desktop + +%post +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%postun +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%posttrans +xdg-icon-resource forceupdate --theme hicolor &>/dev/null +update-mime-database usr/share/mime &>/dev/null +update-desktop-database -q + +%files +%{python3_sitelib}/flatpost/ +%{_bindir}/flatpost +%{_datadir}/applications/com.flatpost.flatpostapp.desktop +%{_datadir}/flatpost/collections_data.json +%{_datadir}/icons/hicolor/1024x1024/apps/com.flatpost.flatpostapp.png +%{_datadir}/icons/hicolor/64x64/apps/com.flatpost.flatpostapp.png +%{_datadir}/mime/packages/flatpost.xml +%license %{_datadir}/licenses/flatpost/LICENSE + diff --git a/anda/apps/flatpost/update.rhai b/anda/apps/flatpost/update.rhai new file mode 100644 index 0000000000..388673813c --- /dev/null +++ b/anda/apps/flatpost/update.rhai @@ -0,0 +1,3 @@ +let v = gh_rawfile("GloriousEggroll/flatpost", "main", "VERSION.txt"); +v.trim(); +rpm.version(v); diff --git a/anda/apps/fontviewer/fontviewer.spec b/anda/apps/fontviewer/fontviewer.spec index e54b93a5c1..0911c2b911 100644 --- a/anda/apps/fontviewer/fontviewer.spec +++ b/anda/apps/fontviewer/fontviewer.spec @@ -1,6 +1,6 @@ Name: fontviewer Epoch: 1 -Version: 1.1.0 +Version: 1.2.0 Release: 1%?dist Summary: View and install fonts diff --git a/anda/apps/goofcord/nightly/anda.hcl b/anda/apps/goofcord/nightly/anda.hcl new file mode 100644 index 0000000000..5bb2829afb --- /dev/null +++ b/anda/apps/goofcord/nightly/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "goofcord-nightly.spec" + } + labels { + mock = 1 + nightly = 1 + } +} diff --git a/anda/apps/goofcord/nightly/goofcord-nightly.spec b/anda/apps/goofcord/nightly/goofcord-nightly.spec new file mode 100644 index 0000000000..c152a28ccb --- /dev/null +++ b/anda/apps/goofcord/nightly/goofcord-nightly.spec @@ -0,0 +1,101 @@ +%global commit 3f5eda113f33fead76a5a53e0b71c11b254d68fd +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250615 +%global ver 1.10.1 +%global base_name goofcord +%global git_name GoofCord +%global debug_package %{nil} +# Exclude private libraries +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif + +Name: %{base_name}-nightly +Version: %{ver}^%{commit_date}.git.%{shortcommit} +Release: 1%{?dist} +License: OSL-3.0 +Summary: A privacy-minded Legcord fork. +Group: Applications/Internet +URL: https://github.com/Milkshiift/%{git_name} +Source0: %{url}/archive/%{commit}/%{git_name}-%{commit}.tar.gz +BuildRequires: bun-bin +BuildRequires: desktop-file-utils +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: git +BuildRequires: make +BuildRequires: nodejs +BuildRequires: nodejs-npm +BuildRequires: python3 +%ifarch aarch64 +BuildRequires: zlib-ng-compat-devel +%endif +Packager: Gilver E. + +%description +A highly configurable and privacy minded Discord client. + +%prep +%autosetup -n %{git_name}-%{commit} + +%build +%ifarch aarch64 armv7hl armv7l +sed -i '/\"x64\",/d' electron-builder.ts +%endif +bun install +bun run packageLinux --publish=never + +%install +mkdir -p %{buildroot}%{_datadir}/%{git_name} +%ifarch x86_64 +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/%{git_name} +%elifarch aarch64 +mv dist/linux-arm64-unpacked/* -t %{buildroot}%{_datadir}/%{git_name} +%elifarch armv7hl armv7l +mv dist/linux-armv7l-unpacked/* -t %{buildroot}%{_datadir}/%{git_name} +%endif + +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/%{git_name}/%{git_name} %{buildroot}%{_bindir}/%{git_name} +install -Dm644 dist/.icon-set/icon_16x16.png %{buildroot}/%{_iconsdir}/hicolor/16x16/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}/%{_iconsdir}/hicolor/32x32/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}/%{_iconsdir}/hicolor/48x48/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}/%{_iconsdir}/hicolor/64x64/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}/%{_iconsdir}/hicolor/128x128/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}/%{_iconsdir}/hicolor/256x256/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}/%{_iconsdir}/hicolor/512x512/apps/%{git_name}.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}/%{_iconsdir}/hicolor/1024x1024/apps/%{git_name}.png + +%ifarch x86_64 +dist/%{git_name}-*x86_64.AppImage --appimage-extract '*.desktop' +%elifarch aarch64 +dist/%{git_name}-*arm64.AppImage --appimage-extract '*.desktop' +%elifarch armv7hl armv7l +dist/%{git_name}-*armv7l.AppImage --appimage-extract '*.desktop' +%endif +desktop-file-install --set-key=Exec --set-value="%{_datadir}/%{git_name}/%{git_name} --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto %U" squashfs-root/%{git_name}.desktop + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{git_name}.desktop + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{git_name} +%{_datadir}/applications/%{git_name}.desktop +%{_datadir}/%{git_name}/ +%{_iconsdir}/hicolor/16x16/apps/%{git_name}.png +%{_iconsdir}/hicolor/32x32/apps/%{git_name}.png +%{_iconsdir}/hicolor/48x48/apps/%{git_name}.png +%{_iconsdir}/hicolor/64x64/apps/%{git_name}.png +%{_iconsdir}/hicolor/128x128/apps/%{git_name}.png +%{_iconsdir}/hicolor/256x256/apps/%{git_name}.png +%{_iconsdir}/hicolor/512x512/apps/%{git_name}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{git_name}.png + +%changelog +* Sat Jun 28 2025 Gilver E. - 1.10.1^20250615.git.3f5eda1 +- Initial package diff --git a/anda/apps/goofcord/nightly/update.rhai b/anda/apps/goofcord/nightly/update.rhai new file mode 100644 index 0000000000..0e24d0bdb5 --- /dev/null +++ b/anda/apps/goofcord/nightly/update.rhai @@ -0,0 +1,8 @@ +rpm.global("commit", gh_commit("Milkshiift/GoofCord")); + if rpm.changed { + let v = gh_tag("Milkshiift/GoofCord"); + v.crop(1); + rpm.global("ver", v); + rpm.global("commit_date", date()); + rpm.release(); +} diff --git a/anda/apps/goofcord/stable/anda.hcl b/anda/apps/goofcord/stable/anda.hcl new file mode 100644 index 0000000000..ab54b297f3 --- /dev/null +++ b/anda/apps/goofcord/stable/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "goofcord.spec" + } + labels { + mock = 1 + } +} diff --git a/anda/apps/goofcord/stable/goofcord.spec b/anda/apps/goofcord/stable/goofcord.spec new file mode 100644 index 0000000000..a67e1bac70 --- /dev/null +++ b/anda/apps/goofcord/stable/goofcord.spec @@ -0,0 +1,95 @@ +%global git_name GoofCord +%global debug_package %{nil} +# Exclude private libraries +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 armv7hl armv7l +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif + +Name: goofcord +Version: 1.10.2 +Release: 1%?dist +License: OSL-3.0 +Summary: A privacy-minded Legcord fork. +Group: Applications/Internet +URL: https://github.com/Milkshiift/%{git_name} +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: bun-bin +BuildRequires: desktop-file-utils +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: make +BuildRequires: nodejs +BuildRequires: nodejs-npm +BuildRequires: python3 +%ifarch aarch64 +BuildRequires: zlib-ng-compat-devel +%endif +Packager: Gilver E. + +%description +A highly configurable and privacy minded Discord client. + +%prep +%autosetup -n %{git_name}-%{version} + +%build +%ifarch aarch64 armv7hl armv7l +sed -i '/\"x64\",/d' electron-builder.ts +%endif +bun install +bun run packageLinux + +%install +mkdir -p %{buildroot}%{_datadir}/%{name} +%ifarch x86_64 +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/%{name} +%elifarch aarch64 +mv dist/linux-arm64-unpacked/* -t %{buildroot}%{_datadir}/%{name} +%elifarch armv7hl armv7l +mv dist/linux-armv7l-unpacked/* -t %{buildroot}%{_datadir}/%{name} +%endif + +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/%{name}/%{name} %{buildroot}%{_bindir}/%{name} +install -Dm644 dist/.icon-set/icon_16x16.png %{buildroot}/%{_iconsdir}/hicolor/16x16/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}/%{_iconsdir}/hicolor/32x32/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}/%{_iconsdir}/hicolor/48x48/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}/%{_iconsdir}/hicolor/64x64/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}/%{_iconsdir}/hicolor/128x128/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}/%{_iconsdir}/hicolor/256x256/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}/%{_iconsdir}/hicolor/512x512/apps/%{name}.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}/%{_iconsdir}/hicolor/1024x1024/apps/%{name}.png + +%ifarch x86_64 +dist/%{git_name}-*x86_64.AppImage --appimage-extract '*.desktop' +%elifarch aarch64 +dist/%{git_name}-*arm64.AppImage --appimage-extract '*.desktop' +%elifarch armv7hl armv7l +dist/%{git_name}-*armv7l.AppImage --appimage-extract '*.desktop' +%endif +desktop-file-install --set-key=Exec --set-value="%{_datadir}/%{name}/%{name} --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform-hint=auto %U" squashfs-root/%{name}.desktop + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop + +%files +%doc README.md +%license LICENSE +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/%{name}/ +%{_iconsdir}/hicolor/16x16/apps/%{name}.png +%{_iconsdir}/hicolor/32x32/apps/%{name}.png +%{_iconsdir}/hicolor/48x48/apps/%{name}.png +%{_iconsdir}/hicolor/64x64/apps/%{name}.png +%{_iconsdir}/hicolor/128x128/apps/%{name}.png +%{_iconsdir}/hicolor/256x256/apps/%{name}.png +%{_iconsdir}/hicolor/512x512/apps/%{name}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{name}.png + +%changelog +* Sat Jun 28 2025 Gilver E. - 1.10.1-1 +- Initial package diff --git a/anda/apps/goofcord/stable/update.rhai b/anda/apps/goofcord/stable/update.rhai new file mode 100644 index 0000000000..4b308802cb --- /dev/null +++ b/anda/apps/goofcord/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("Milkshiift/GoofCord")); diff --git a/anda/apps/halloy/anda.hcl b/anda/apps/halloy/anda.hcl new file mode 100644 index 0000000000..c99d54a392 --- /dev/null +++ b/anda/apps/halloy/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "halloy.spec" + } +} diff --git a/anda/apps/halloy/halloy.spec b/anda/apps/halloy/halloy.spec new file mode 100644 index 0000000000..47adfce9ec --- /dev/null +++ b/anda/apps/halloy/halloy.spec @@ -0,0 +1,70 @@ +# Generated by rust2rpm 27 +%bcond check 1 +%global appid org.squidowl.halloy +%global crate halloy + +Name: halloy +Version: 2025.8 +Release: 1%?dist +Summary: An open-source IRC client written in Rust, with the Iced GUI library +Packager: Yoong jin +SourceLicense: GPL-3.0-or-later +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-3-Clause AND (BSD-3-Clause OR MIT OR Apache-2.0) AND BSL-1.0 AND CC0-1.0 AND (CC0-1.0 OR Apache-2.0) AND (GPL-3.0+ OR BSD-3-Clause) AND (GPL-3.0-or-later) AND ISC AND (LGPL-3.0-or-later OR MPL-2.0) AND MIT AND (MIT AND (MIT OR Apache-2.0)) AND (MIT OR Apache-2.0) AND ((MIT OR Apache-2.0) AND NCSA) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND Unlicense AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) + +URL: https://github.com/squidowl/halloy +Source: https://github.com/squidowl/halloy/archive/refs/tags/%{version}.tar.gz + +BuildRequires: alsa-lib-devel +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: desktop-file-utils +BuildRequires: openssl-devel + + +%description +%{summary}. + +%prep +%autosetup -n halloy-%{version} -p1 +%cargo_prep_online + + +%build +%cargo_build + +%install +%crate_install_bin +desktop-file-install assets/linux/%{appid}.desktop +install -Dpm644 assets/linux/%{appid}.appdata.xml -t %{buildroot}%{_datadir}/metainfo + +mkdir -p %{buildroot}%{_datadir} +cp -r assets/linux/icons -t %{buildroot}%{_datadir} + +%cargo_license_summary_online +%{cargo_license_online} > LICENSE.dependencies + +%if %{with check} +%check +%cargo_test +%endif + +%files +%license LICENSE +%license wix/license.rtf +%license LICENSE.dependencies +%doc CHANGELOG.md +%doc README.md +%{_bindir}/halloy +%{_datadir}/applications/%{appid}.desktop +%{_datadir}/metainfo/%{appid}.appdata.xml +%{_iconsdir}/hicolor/16x16/apps/%{appid}.png +%{_iconsdir}/hicolor/24x24/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32/apps/%{appid}.png +%{_iconsdir}/hicolor/48x48/apps/%{appid}.png +%{_iconsdir}/hicolor/64x64/apps/%{appid}.png +%{_iconsdir}/hicolor/96x96/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256/apps/%{appid}.png +%{_iconsdir}/hicolor/512x512/apps/%{appid}.png + +%changelog +%autochangelog diff --git a/anda/apps/halloy/update.rhai b/anda/apps/halloy/update.rhai new file mode 100644 index 0000000000..2f19283fe9 --- /dev/null +++ b/anda/apps/halloy/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("squidowl/halloy")); diff --git a/anda/apps/komikku/komikku.spec b/anda/apps/komikku/komikku.spec index dc0ee38d4f..a7f6d9e859 100644 --- a/anda/apps/komikku/komikku.spec +++ b/anda/apps/komikku/komikku.spec @@ -3,9 +3,10 @@ %global gtk4_version 4.14.4 %global libadwaita_version 1.5.1 %global pure_protobuf_version 2.0.0 +%global raw_ver v1.85.0 Name: komikku -Version: 1.70.0 +Version: 1.85.0 %forgemeta Release: 1%?dist Summary: A manga reader for GNOME @@ -14,7 +15,7 @@ BuildArch: noarch License: GPL-3.0-or-later URL: https://valos.gitlab.io/Komikku -Source0: https://codeberg.org/valos/%{appname}/archive/v%{version}.tar.gz#/%{name}-v%{version}.tar.gz +Source0: https://codeberg.org/valos/%{appname}/archive/%{raw_ver}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: desktop-file-utils BuildRequires: intltool @@ -22,6 +23,7 @@ BuildRequires: libappstream-glib BuildRequires: meson >= 0.59.0 BuildRequires: python3-devel >= 3.8 BuildRequires: blueprint-compiler +BuildRequires: cmake BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.35.9 BuildRequires: pkgconfig(gtk4) >= %{gtk4_version} @@ -92,11 +94,12 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop %files -f %{name}.lang -%license LICENSE +%license LICENSES/* %doc README.md %{_bindir}/%{name} %{_datadir}/%{name}/ %{_datadir}/applications/*.desktop +%{_datadir}/dbus-1/services/%{uuid}.service %{_datadir}/glib-2.0/schemas/*.gschema.xml %{_datadir}/icons/hicolor/scalable/*/*.svg %{_datadir}/icons/hicolor/symbolic/*/*.svg diff --git a/anda/apps/komikku/update.rhai b/anda/apps/komikku/update.rhai index c0a1b21997..13da8a9cef 100644 --- a/anda/apps/komikku/update.rhai +++ b/anda/apps/komikku/update.rhai @@ -1,3 +1,4 @@ let latest_tag = get("https://codeberg.org/api/v1/repos/valos/Komikku/tags").json_arr()[0].name; let new_version = find("([\\.\\d]+)", latest_tag, 1); +rpm.global("raw_ver", latest_tag); rpm.version(new_version); diff --git a/anda/apps/legcord/legcord-bin/anda.hcl b/anda/apps/legcord/legcord-bin/anda.hcl deleted file mode 100644 index 5c31d7cdce..0000000000 --- a/anda/apps/legcord/legcord-bin/anda.hcl +++ /dev/null @@ -1,5 +0,0 @@ -project pkg { - rpm { - spec = "legcord-bin.spec" - } -} diff --git a/anda/apps/legcord/legcord-bin/legcord-bin.spec b/anda/apps/legcord/legcord-bin/legcord-bin.spec deleted file mode 100644 index 207ee7aa06..0000000000 --- a/anda/apps/legcord/legcord-bin/legcord-bin.spec +++ /dev/null @@ -1,92 +0,0 @@ -%define debug_package %nil -%global _build_id_links none - -%ifarch x86_64 -%global src Legcord-%version-linux-x64 -%elifarch aarch64 -%global src Legcord-%version-linux-arm64 -%elifarch armv7l -%global src Legcord-%version-linux-armv7l -%endif - -# Exclude private libraries -%global __requires_exclude libffmpeg.so -%global __provides_exclude_from %{_datadir}/(armcord|legcord)/.*\\.so - -Name: legcord-bin -Version: 1.1.0 -Release: 1%?dist -License: OSL-3.0 -Summary: Custom lightweight Discord client designed to enhance your experience -URL: https://github.com/Legcord/Legcord -Group: Applications/Internet -Source0: %url/releases/download/v%version/%src.tar.gz -Source1: legcord.png -Source2: https://raw.githubusercontent.com/Legcord/Legcord/v%version/README.md -Requires: xdg-utils -ExclusiveArch: x86_64 aarch64 armv7l -Conflicts: legcord -Conflicts: legcord-nightly -BuildRequires: add-determinism -Obsoletes: armcord < 3.3.2-1 - -%description -Legcord is a custom client designed to enhance your Discord experience -while keeping everything lightweight. - -%prep -%autosetup -n %src - -cat < .legcord.desktop -[Desktop Entry] -Name=Legcord -Comment=%summary -GenericName=Internet Messenger -Type=Application -Exec=%_bindir/legcord -Icon=legcord -Categories=Network;InstantMessaging; -StartupWMClass=legcord -Keywords=discord;armcord;legcord;vencord;shelter;electron; -EOF - -%build - -%install -mkdir -p %buildroot%_bindir %buildroot%_datadir/applications %buildroot%_datadir/pixmaps %buildroot%_datadir/legcord %buildroot%_docdir/%name -cp -a * %buildroot%_datadir/legcord/ -ln -s %_datadir/legcord/legcord %buildroot%_bindir/legcord -ln -s %_datadir/legcord %buildroot%_datadir/armcord -chmod +x -R %buildroot%_datadir/legcord/* -chmod 755 %buildroot%_datadir/legcord/legcord -install -Dm644 .legcord.desktop %buildroot%_datadir/applications/LegCord.desktop -install -Dm644 %SOURCE1 %buildroot%_datadir/pixmaps/legcord.png -install -Dm644 %SOURCE2 %buildroot%_docdir/%name/ - -# HACK: rpm bug for unability to replace existing files on system. -%pre -if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then - echo "Found old %_datadir/armcord directory, removing…" - rm -rf %_datadir/armcord -fi - -%files -%doc README.md -%_datadir/legcord -%_datadir/armcord -%_bindir/legcord -%_datadir/applications/LegCord.desktop -%_datadir/pixmaps/legcord.png - -%changelog -* Mon Oct 21 2024 madonuko - 1.0.2-2 -- Rename to LegCord. - -* Sat Jun 17 2023 madonuko - 3.2.0-2 -- Remove libnotify dependency. -- Fix desktop entry. -- Set as noarch package because there are not binary files. -- Use /usr/share/ instead of /opt/ - -* Sat May 6 2023 madonuko - 3.1.7-1 -- Initial package diff --git a/anda/apps/legcord/legcord-bin/legcord.png b/anda/apps/legcord/legcord-bin/legcord.png deleted file mode 100644 index bb87d3bafe..0000000000 Binary files a/anda/apps/legcord/legcord-bin/legcord.png and /dev/null differ diff --git a/anda/apps/legcord/legcord-bin/update.rhai b/anda/apps/legcord/legcord-bin/update.rhai deleted file mode 100644 index 15bcc4981d..0000000000 --- a/anda/apps/legcord/legcord-bin/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(gh("LegCord/LegCord")); diff --git a/anda/apps/legcord/nightly/anda.hcl b/anda/apps/legcord/nightly/anda.hcl index 819f094492..993068d0b8 100644 --- a/anda/apps/legcord/nightly/anda.hcl +++ b/anda/apps/legcord/nightly/anda.hcl @@ -1,9 +1,9 @@ project pkg { - arches = ["x86_64"] rpm { spec = "legcord-nightly.spec" } labels { nightly = 1 + mock = 1 } -} \ No newline at end of file +} diff --git a/anda/apps/legcord/nightly/launch.sh b/anda/apps/legcord/nightly/launch.sh deleted file mode 100644 index 3ce4e0c829..0000000000 --- a/anda/apps/legcord/nightly/launch.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -electron=/usr/bin/electron - -CONFIG=${XDG_CONFIG_HOME:-~/.config} -FLAGS="$CONFIG/armcord-flags.conf" - -# Allow users to override command-line options -if [ -f "$FLAGS" ]; then - USER_FLAGS="$(cat "$FLAGS")" -fi - -# shellcheck disable=SC2086 # USER_FLAGS has to be unquoted -"$electron" /usr/share/armcord/app.asar $USER_FLAGS "$@" diff --git a/anda/apps/legcord/nightly/legcord-nightly.spec b/anda/apps/legcord/nightly/legcord-nightly.spec index 266b7fe418..97f368efbe 100644 --- a/anda/apps/legcord/nightly/legcord-nightly.spec +++ b/anda/apps/legcord/nightly/legcord-nightly.spec @@ -1,7 +1,14 @@ -%global commit 1833760c8be5b5fd4a76bbcd0cf1632d7bff0216 -%global commit_date 20250215 +%global commit 319c6f08130d7d54508b7abffe9cdef6f55def17 +%global commit_date 20250817 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%define debug_package %nil +%global debug_package %nil +%global __strip /bin/true +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif Name: legcord-nightly Version: %commit_date.%shortcommit @@ -10,67 +17,60 @@ License: OSL-3.0 Summary: Custom lightweight Discord client designed to enhance your experience URL: https://github.com/Legcord/Legcord Group: Applications/Internet -Source0: %url/archive/%commit/Legcord-%commit.tar.gz -Source1: launch.sh Packager: Owen -Requires: electron xdg-utils -Provides: armcord-nightly +Requires: xdg-utils Obsoletes: armcord < 3.3.2-1 -Conflicts: legcord-bin Conflicts: legcord -BuildArch: noarch -BuildRequires: anda-srpm-macros pnpm +BuildRequires: anda-srpm-macros pnpm nodejs-npm git-core gcc gcc-c++ make desktop-file-utils zlib-ng-compat-devel %description Legcord is a custom client designed to enhance your Discord experience while keeping everything lightweight. %prep -%autosetup -n Legcord-%commit - -cat < legcord.desktop -[Desktop Entry] -Name=Legcord -Comment=%summary -GenericName=Internet Messenger -Type=Application -Exec=/usr/bin/legcord -Icon=legcord -Categories=Network;InstantMessaging; -StartupWMClass=legcord -Keywords=discord;armcord;legcord;vencord;shelter;electron; -EOF - +%git_clone %{url}.git %{commit} %build -pnpm install --no-frozen-lockfile -pnpm run packageQuick - +pnpm install +pnpm run build +pnpm run package --linux AppImage tar.gz %install -install -Dm644 dist/*-unpacked/resources/app.asar %buildroot/usr/share/legcord/app.asar +mkdir -p %{buildroot}%{_datadir}/legcord +%ifarch aarch64 +mv dist/linux-arm64-unpacked/* %{buildroot}%{_datadir}/legcord +%else +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/legcord +%endif -install -Dm755 %SOURCE1 %buildroot/usr/bin/legcord -install -Dm644 legcord.desktop %buildroot/usr/share/applications/LegCord.desktop -install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/legcord.png +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/legcord/legcord %{buildroot}%{_bindir}/legcord +install -Dm644 dist/.icon-set/icon_16.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/legcord.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/legcord.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/legcord.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/legcord.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/legcord.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/legcord.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}%{_iconsdir}/hicolor/512x512/apps/legcord.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/apps/legcord.png -ln -s %_datadir/legcord %buildroot%_datadir/armcord - -# HACK: rpm bug for unability to replace existing files on system. -%pre -if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then - echo "Found old %_datadir/armcord directory, removing…" - rm -rf %_datadir/armcord -fi +dist/Legcord-*.AppImage --appimage-extract '*.desktop' +desktop-file-install --set-key=Exec --set-value="%{_datadir}/legcord/legcord %U" squashfs-root/legcord.desktop %files %doc README.md %license license.txt -/usr/bin/legcord -/usr/share/applications/LegCord.desktop -/usr/share/pixmaps/legcord.png -/usr/share/legcord/app.asar -/usr/share/armcord +%{_bindir}/legcord +%{_datadir}/applications/legcord.desktop +%{_datadir}/legcord/ +%{_iconsdir}/hicolor/16x16/apps/legcord.png +%{_iconsdir}/hicolor/32x32/apps/legcord.png +%{_iconsdir}/hicolor/48x48/apps/legcord.png +%{_iconsdir}/hicolor/64x64/apps/legcord.png +%{_iconsdir}/hicolor/128x128/apps/legcord.png +%{_iconsdir}/hicolor/256x256/apps/legcord.png +%{_iconsdir}/hicolor/512x512/apps/legcord.png +%{_iconsdir}/hicolor/1024x1024/apps/legcord.png %changelog * Fri Nov 22 2024 owen - 1.0.2-2 diff --git a/anda/apps/legcord/stable/anda.hcl b/anda/apps/legcord/stable/anda.hcl index a60a7c45fd..3a5fd3890d 100644 --- a/anda/apps/legcord/stable/anda.hcl +++ b/anda/apps/legcord/stable/anda.hcl @@ -1,6 +1,8 @@ project pkg { - arches = ["x86_64"] rpm { spec = "legcord.spec" } -} + labels { + mock =1 + } +} diff --git a/anda/apps/legcord/stable/launch.sh b/anda/apps/legcord/stable/launch.sh deleted file mode 100644 index 3ce4e0c829..0000000000 --- a/anda/apps/legcord/stable/launch.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -electron=/usr/bin/electron - -CONFIG=${XDG_CONFIG_HOME:-~/.config} -FLAGS="$CONFIG/armcord-flags.conf" - -# Allow users to override command-line options -if [ -f "$FLAGS" ]; then - USER_FLAGS="$(cat "$FLAGS")" -fi - -# shellcheck disable=SC2086 # USER_FLAGS has to be unquoted -"$electron" /usr/share/armcord/app.asar $USER_FLAGS "$@" diff --git a/anda/apps/legcord/stable/legcord.spec b/anda/apps/legcord/stable/legcord.spec index 1532fc4792..2d6e752d8f 100644 --- a/anda/apps/legcord/stable/legcord.spec +++ b/anda/apps/legcord/stable/legcord.spec @@ -1,25 +1,26 @@ %define debug_package %nil # Exclude private libraries -%global __requires_exclude libffmpeg.so -%global __provides_exclude_from %{_datadir}/(armcord|legcord)/.*\\.so +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif Name: legcord -Version: 1.1.0 -Release: 1%?dist +Version: 1.1.5 +Release: 2%?dist License: OSL-3.0 Summary: Custom lightweight Discord client designed to enhance your experience URL: https://github.com/Legcord/Legcord Group: Applications/Internet -Source1: launch.sh Packager: madonuko -Requires: electron xdg-utils -Provides: armcord +Requires: xdg-utils Obsoletes: armcord < 3.3.2-1 -Conflicts: legcord-bin +Obsoletes: legcord-bin < 1.1.5-2 Conflicts: legcord-nightly -BuildArch: noarch -BuildRequires: anda-srpm-macros pnpm +BuildRequires: anda-srpm-macros pnpm nodejs-npm git-core gcc gcc-c++ make desktop-file-utils zlib-ng-compat-devel %description Legcord is a custom client designed to enhance your Discord experience @@ -28,49 +29,47 @@ while keeping everything lightweight. %prep %git_clone %url v%version -cat < legcord.desktop -[Desktop Entry] -Name=Legcord -Comment=%summary -GenericName=Internet Messenger -Type=Application -Exec=/usr/bin/legcord -Icon=legcord -Categories=Network;InstantMessaging; -StartupWMClass=legcord -Keywords=discord;armcord;legcord;vencord;shelter;electron; -EOF - - %build -pnpm install --no-frozen-lockfile -pnpm run packageQuick - +pnpm install +pnpm run build +pnpm run package --linux AppImage tar.gz %install -install -Dm644 dist/*-unpacked/resources/app.asar %buildroot/usr/share/legcord/app.asar +mkdir -p %{buildroot}%{_datadir}/legcord +%ifarch aarch64 +mv dist/linux-arm64-unpacked/* %{buildroot}%{_datadir}/legcord +%else +mv dist/linux-unpacked/* -t %{buildroot}%{_datadir}/legcord +%endif -install -Dm755 %SOURCE1 %buildroot/usr/bin/legcord -install -Dm644 legcord.desktop %buildroot/usr/share/applications/LegCord.desktop -install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/legcord.png +mkdir -p %{buildroot}%{_bindir} +ln -sf %{_datadir}/legcord/legcord %{buildroot}%{_bindir}/legcord +install -Dm644 dist/.icon-set/icon_16.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/legcord.png +install -Dm644 dist/.icon-set/icon_32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/legcord.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/legcord.png +install -Dm644 dist/.icon-set/icon_64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/legcord.png +install -Dm644 dist/.icon-set/icon_128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/legcord.png +install -Dm644 dist/.icon-set/icon_256.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/legcord.png +install -Dm644 dist/.icon-set/icon_512.png %{buildroot}%{_iconsdir}/hicolor/512x512/apps/legcord.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/apps/legcord.png -ln -s %_datadir/legcord %buildroot%_datadir/armcord - -# HACK: rpm bug for unability to replace existing files on system. -%pre -if [ -d %_datadir/armcord ] && [ ! -L %_datadir/armcord ]; then - echo "Found old %_datadir/armcord directory, removing…" - rm -rf %_datadir/armcord -fi +dist/Legcord-*.AppImage --appimage-extract '*.desktop' +desktop-file-install --set-key=Exec --set-value="%{_datadir}/legcord/legcord %U" squashfs-root/legcord.desktop %files %doc README.md %license license.txt -/usr/bin/legcord -/usr/share/applications/LegCord.desktop -/usr/share/pixmaps/legcord.png -/usr/share/legcord/app.asar -/usr/share/armcord +%{_bindir}/legcord +%{_datadir}/applications/legcord.desktop +%{_datadir}/legcord/ +%{_iconsdir}/hicolor/16x16/apps/legcord.png +%{_iconsdir}/hicolor/32x32/apps/legcord.png +%{_iconsdir}/hicolor/48x48/apps/legcord.png +%{_iconsdir}/hicolor/64x64/apps/legcord.png +%{_iconsdir}/hicolor/128x128/apps/legcord.png +%{_iconsdir}/hicolor/256x256/apps/legcord.png +%{_iconsdir}/hicolor/512x512/apps/legcord.png +%{_iconsdir}/hicolor/1024x1024/apps/legcord.png %changelog * Mon Oct 21 2024 madonuko - 1.0.2-2 diff --git a/anda/apps/mission-center/anda.hcl b/anda/apps/mission-center/anda.hcl new file mode 100644 index 0000000000..f89af37ed0 --- /dev/null +++ b/anda/apps/mission-center/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "mission-center.spec" + } +} diff --git a/anda/apps/mission-center/mission-center.spec b/anda/apps/mission-center/mission-center.spec new file mode 100644 index 0000000000..d47733b512 --- /dev/null +++ b/anda/apps/mission-center/mission-center.spec @@ -0,0 +1,99 @@ +%global forgeurl0 https://gitlab.com/mission-center-devs/mission-center +Version: 1.0.2 +%global tag0 v%{version} + +%global forgeurl1 https://gitlab.com/mission-center-devs/gng +%global commit1 319d95d29cbc3c373ae61cff228e8440fbaadbbb + + +%forgemeta -a + +Name: mission-center +Release: 1%?dist +Summary: Monitor your CPU, Memory, Disk, Network and GPU usage + +License: GPL-3.0-or-later +URL: %{forgeurl0} +Source0: %{forgesource0} +Source1: %{forgesource1} +Provides: bundled(mission-center-magpie) +Provides: bundled(nvtop) = 3.2.0 +#mission centere uses a patched version of nvtop + +BuildRequires: meson >= 0.63 +BuildRequires: cargo +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(protobuf) +BuildRequires: pkgconfig(python3) +BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(gbm) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(egl) +BuildRequires: libadwaita-devel +BuildRequires: desktop-file-utils +BuildRequires: blueprint-compiler +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: gettext +BuildRequires: desktop-file-utils +BuildRequires: appstream-data +BuildRequires: libappstream-glib +Recommends: nethogs + +%description +Monitor your CPU, Memory, Disk, Network and GPU usage + + +%prep +%forgesetup -z 0 +mkdir -p ./subprojects/magpie +tar -x --strip-components=1 -f %{SOURCE1} -C ./subprojects/magpie +pushd ./subprojects/magpie/ +%cargo_prep_online +popd +%cargo_prep_online +%{cargo_license_summary_online} +# %cargo_license_online > LICENSE.dependencies +#builds is erroring + +%build +%meson +%meson_build + + +%install +%meson_install +%find_lang missioncenter + +%check +desktop-file-validate %{buildroot}/%{_datadir}/applications/io.missioncenter.MissionCenter.desktop +appstream-util validate-relax %{buildroot}/%{_datadir}/metainfo/io.missioncenter.MissionCenter.metainfo.xml +%meson_test + +# https://gitlab.com/mission-center-devs/mission-center/-/wikis/Home/Nethogs +%post +if command -v nethogs 2>&1 >/dev/null +then + setcap "cap_net_admin,cap_net_raw,cap_dac_read_search,cap_sys_ptrace+pe" "$(which nethogs)" +fi + + +%files -f missioncenter.lang +%doc README.md +%license COPYING +#builds is erroring +# [%]license LICENSE.dependencies +%{_datadir}/missioncenter/ +%{_datadir}/applications/io.missioncenter.MissionCenter.desktop +%{_datadir}/metainfo/io.missioncenter.MissionCenter.metainfo.xml +%{_datadir}/glib-2.0/schemas/io.missioncenter.MissionCenter.gschema.xml +%{_datadir}/icons/hicolor/scalable/apps/io.missioncenter.MissionCenter.svg +%{_datadir}/icons/hicolor/symbolic/apps/io.missioncenter.MissionCenter-symbolic.svg +%{_bindir}/missioncenter-magpie +%{_bindir}/missioncenter + + +%changelog +%autochangelog diff --git a/anda/apps/mission-center/update.rhai b/anda/apps/mission-center/update.rhai new file mode 100644 index 0000000000..85a26a5e08 --- /dev/null +++ b/anda/apps/mission-center/update.rhai @@ -0,0 +1,4 @@ +rpm.version(gitlab_tag("44426042")); +if rpm.changed() { + rpm.global("commit1", gitlab_commit("66855638", "main")); +} \ No newline at end of file diff --git a/anda/apps/mpv/mpv-nightly.spec b/anda/apps/mpv/mpv-nightly.spec index ea7f877bc6..ca46f6af7f 100644 --- a/anda/apps/mpv/mpv-nightly.spec +++ b/anda/apps/mpv/mpv-nightly.spec @@ -1,7 +1,10 @@ -%global commit e32beaa0dba209dfd10cff7fdbdcd0dbde1f82b9 +# Disable X11 for RHEL 10+ +%bcond x11 %[%{undefined rhel} || 0%{?rhel} < 10] + +%global commit bde63fe092a9eb285b92834cfe403df17018d04d %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250221 -%global ver 0.39.0 +%global commit_date 20250821 +%global ver 0.40.0 Name: mpv-nightly Version: %ver^%commit_date.%shortcommit @@ -42,8 +45,8 @@ BuildRequires: pkgconfig(libavutil) >= 57.24.100 BuildRequires: pkgconfig(libbluray) BuildRequires: pkgconfig(libcdio) BuildRequires: pkgconfig(libcdio_paranoia) -BuildRequires: pkgconfig(libdisplay-info) BuildRequires: pkgconfig(libdrm) +BuildRequires: pkgconfig(libdisplay-info) BuildRequires: pkgconfig(libjpeg) BuildRequires: pkgconfig(libpipewire-0.3) >= 0.3.19 BuildRequires: pkgconfig(libplacebo) >= 6.338.0 @@ -56,10 +59,8 @@ BuildRequires: pkgconfig(mujs) BuildRequires: pkgconfig(openal) BuildRequires: pkgconfig(rubberband) BuildRequires: pkgconfig(sdl2) -BuildRequires: pkgconfig(shaderc) BuildRequires: pkgconfig(uchardet) >= 0.0.5 BuildRequires: pkgconfig(vapoursynth) -BuildRequires: pkgconfig(vdpau) BuildRequires: pkgconfig(vulkan) BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) @@ -71,12 +72,15 @@ BuildRequires: pkgconfig(xdamage) BuildRequires: pkgconfig(xext) BuildRequires: pkgconfig(xinerama) BuildRequires: pkgconfig(xkbcommon) -BuildRequires: pkgconfig(xpresent) BuildRequires: pkgconfig(xrandr) -BuildRequires: pkgconfig(xscrnsaver) -BuildRequires: pkgconfig(xv) BuildRequires: pkgconfig(zimg) >= 2.9 BuildRequires: pkgconfig(zlib) +%if %{with x11} +BuildRequires: pkgconfig(vdpau) +BuildRequires: pkgconfig(xpresent) +BuildRequires: pkgconfig(xscrnsaver) +BuildRequires: pkgconfig(xv) +%endif Requires: hicolor-icon-theme Provides: mplayer-backend @@ -124,6 +128,8 @@ Requires: mpv-nightly-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel This package contains development header files and libraries for Mpv. +%pkg_completion -Bfz mpv + %prep %autosetup -p1 -n mpv-%commit sed -e "s|/usr/local/etc|%{_sysconfdir}/mpv|" -i etc/mpv.conf @@ -144,10 +150,17 @@ sed -e "s|/usr/local/etc|%{_sysconfdir}/mpv|" -i etc/mpv.conf -Ddvdnav=enabled \ -Degl-drm=enabled \ -Degl-wayland=enabled \ +%if %{with x11} -Degl-x11=enabled \ + -Dgl-x11=enabled \ + -Dvaapi-x11=enabled \ + -Dvdpau-gl-x11=enabled \ + -Dvdpau=enabled \ + -Dx11=enabled \ + -Dxv=enabled \ +%endif -Degl=enabled \ -Dgbm=enabled \ - -Dgl-x11=enabled \ -Dgl=enabled \ -Dhtml-build=enabled \ -Diconv=enabled \ @@ -172,22 +185,18 @@ sed -e "s|/usr/local/etc|%{_sysconfdir}/mpv|" -i etc/mpv.conf -Dsdl2-gamepad=enabled \ -Dsdl2-video=enabled \ -Dsdl2=enabled \ + -Dshaderc=disabled \ -Dsndio=disabled \ -Dspirv-cross=disabled \ -Duchardet=enabled \ -Dvaapi-drm=enabled \ -Dvaapi-wayland=enabled \ - -Dvaapi-x11=enabled \ -Dvaapi=enabled \ -Dvapoursynth=enabled \ - -Dvdpau-gl-x11=enabled \ - -Dvdpau=enabled \ -Dvector=enabled \ -Dvulkan=enabled \ -Dwayland=enabled \ -Dwerror=false \ - -Dx11=enabled \ - -Dxv=enabled \ -Dzimg=enabled \ -Dzlib=enabled %meson_build @@ -205,17 +214,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mpv.desktop %{_docdir}/mpv/ %{_bindir}/mpv %{_datadir}/applications/mpv.desktop -%dir %{_datadir}/bash-completion/ -%dir %{_datadir}/bash-completion/completions/ -%{_datadir}/bash-completion/completions/mpv %{_datadir}/icons/hicolor/*/apps/mpv*.* -%dir %{_datadir}/zsh/ -%dir %{_datadir}/zsh/site-functions/ -%{_datadir}/zsh/site-functions/_mpv %{_mandir}/man1/mpv.* %{_metainfodir}/mpv.metainfo.xml -%dir %{_sysconfdir}/mpv/ -%config(noreplace) %{_sysconfdir}/mpv/encoding-profiles.conf %files libs %license LICENSE.GPL LICENSE.LGPL Copyright @@ -225,6 +226,3 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/mpv.desktop %{_includedir}/mpv/ %{_libdir}/libmpv.so %{_libdir}/pkgconfig/mpv.pc - -%changelog -%autochangelog diff --git a/anda/apps/nekoray/Sagernet.SingBox.Version.txt b/anda/apps/nekoray/Sagernet.SingBox.Version.txt new file mode 100644 index 0000000000..6741c5e834 --- /dev/null +++ b/anda/apps/nekoray/Sagernet.SingBox.Version.txt @@ -0,0 +1 @@ +v1.11.15 \ No newline at end of file diff --git a/anda/apps/nekoray/anda.hcl b/anda/apps/nekoray/anda.hcl new file mode 100644 index 0000000000..b122b1135d --- /dev/null +++ b/anda/apps/nekoray/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "nekoray.spec" + } +} diff --git a/anda/apps/nekoray/nekoray.desktop b/anda/apps/nekoray/nekoray.desktop new file mode 100644 index 0000000000..5be2046d62 --- /dev/null +++ b/anda/apps/nekoray/nekoray.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Version=1.0 +Terminal=false +Type=Application +Name=nekoray +Categories=Network; +Comment=Qt based cross-platform GUI proxy configuration manager (backend: sing-box) +Comment[zh_CN]=基于 Qt 的跨平台代理配置管理器 (后端 sing-box) +Keywords=Internet;VPN;Proxy;sing-box; +Exec=/bin/nekoray +Icon=/usr/share/icons/nekoray.ico diff --git a/anda/apps/nekoray/nekoray.sh b/anda/apps/nekoray/nekoray.sh new file mode 100644 index 0000000000..6a41b65f7a --- /dev/null +++ b/anda/apps/nekoray/nekoray.sh @@ -0,0 +1,2 @@ +#!/bin/sh +/lib64/nekoray/nekoray -appdata "${@}" diff --git a/anda/apps/nekoray/nekoray.spec b/anda/apps/nekoray/nekoray.spec new file mode 100644 index 0000000000..f9303c1c3c --- /dev/null +++ b/anda/apps/nekoray/nekoray.spec @@ -0,0 +1,93 @@ +%global gomodulesmode GO111MODULE=on +Name: nekoray +Version: 4.3.7 +Release: 1%?dist +Summary: Qt based cross-platform GUI proxy configuration manager (backend: sing-box) +URL: https://github.com/Mahdi-zarei/nekoray +License: GPLv3 + +Source0: https://github.com/Mahdi-zarei/nekoray/archive/refs/tags/%{version}.tar.gz#/nekoray-%{version}.tar.gz +Packager: bunzuhbu +Source1: vendor-%{version}.tar.gz +%define fetch_vendor %{_rpmconfigdir}/rpmuncompress -xv %{SOURCE1} + +Source2: Sagernet.SingBox.Version.txt +%define singbox_version $(cat %{SOURCE2}) + +Source3: %{name}.desktop +Source4: %{name}.sh + +BuildRequires: rpm_macro(cmake) +BuildRequires: rpm_macro(cmake_build) +BuildRequires: rpm_macro(cmake_install) +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(protobuf) +BuildRequires: pkgconfig(libcurl) +BuildRequires: cmake(yaml-cpp) +BuildRequires: cmake(ZXing) +BuildRequires: cmake(absl) +BuildRequires: cmake(cpr) +BuildRequires: cmake(Qt6) +BuildRequires: cmake(Qt6Svg) +BuildRequires: cmake(Qt6Linguist) +BuildRequires: cmake(Qt6Charts) +BuildRequires: patchelf +BuildRequires: sed +BuildRequires: golang +BuildRequires: rpm_macro(gobuildflags) +Requires: %{name}-core +%define core nekobox_core + +%package core +Summary: %{summary} + +%description +%{summary} + +%description core +%{summary} + +%prep +%autosetup -p1 -n %{name}-%{version} +sed -i 's~find_package(Protobuf CONFIG REQUIRED)~find_package(Protobuf REQUIRED)~' cmake/myproto.cmake +sed -i 's~add_library(qhotkey 3rdparty/QHotkey/qhotkey.cpp)~add_library(qhotkey STATIC 3rdparty/QHotkey/qhotkey.cpp)~' cmake/QHotkey.cmake +# sed -i 's~ImageFormat::BGRA~ImageFormat::BGR~' 3rdparty/ZxingQtReader.hpp +pushd core/server +%{fetch_vendor} +popd + +%build +%cmake +%cmake_build +DEST=$PWD/%{__cmake_builddir}/%{core} +pushd core/server +go build %{gobuildflags} -o $DEST -trimpath -ldflags "-B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) -w -s -X 'github.com/sagernet/sing-box/constant.Version=%{singbox_version}'" -tags "with_clash_api,with_gvisor,with_quic,with_wireguard,with_utls,with_ech,with_dhcp" +popd + +%install +mkdir -p %{buildroot}%{_libdir}/%{name} +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_datadir}/applications +mkdir -p %{buildroot}%{_datadir}/icons + +cp %{SOURCE4} %{buildroot}%{_bindir}/%{name} +cp %{SOURCE3} %{buildroot}%{_datadir}/applications/%{name}.desktop +sed -i 's~/bin~%{_bindir}~g;s~/usr/share~%{_datadir}~g;s~nekoray~%{name}~g' %{buildroot}%{_datadir}/applications/%{name}.desktop +sed -i 's~/bin~%{_bindir}~g;s~/lib64~%{_libdir}~g;s~nekoray~%{name}~g' %{buildroot}%{_bindir}/%{name} +cp %{__cmake_builddir}/%{name} %{buildroot}%{_libdir}/%{name}/%{name} +cp %{__cmake_builddir}/%{core} %{buildroot}%{_libdir}/%{name}/%{core} +cp res/nekoray.ico %{buildroot}%{_datadir}/icons/%{name}.ico +patchelf --remove-rpath %{buildroot}%{_libdir}/%{name}/%{name} +patchelf --remove-rpath %{buildroot}%{_libdir}/%{name}/%{core} + +%files +%attr(0755, -, -) %{_bindir}/%{name} +%attr(0755, -, -) %{_libdir}/%{name}/%{name} +%attr(0644, -, -) %{_datadir}/icons/%{name}.ico +%attr(0644, -, -) %{_datadir}/applications/%{name}.desktop + +%files core +%dir %{_libdir}/%{name} +%attr(0755, -, -) %{_libdir}/%{name}/%{core} + diff --git a/anda/apps/nekoray/pre.rhai b/anda/apps/nekoray/pre.rhai new file mode 100644 index 0000000000..8ad379de32 --- /dev/null +++ b/anda/apps/nekoray/pre.rhai @@ -0,0 +1,5 @@ +let sourcedir = "anda/apps/nekoray"; + +sh(`dnf in -y golang rpmdevtools tar rpm-build coreutils`, #{}); +sh(`pushd ${sourcedir}; bash -x pre.sh; popd`, #{}); + diff --git a/anda/apps/nekoray/pre.sh b/anda/apps/nekoray/pre.sh new file mode 100644 index 0000000000..02bf04d16b --- /dev/null +++ b/anda/apps/nekoray/pre.sh @@ -0,0 +1,10 @@ +export sourcedir="$PWD" +rpmdev-spectool --all --get-files nekoray.spec +version=$(rpmspec --query --queryformat "%{VERSION}\n" nekoray.spec | uniq) + +tar -xzf "nekoray-${version}.tar.gz" +pushd "nekoray-${version}/core/server" + go mod download github.com/stretchr/testify + go mod vendor + tar -czf "${sourcedir}/vendor-${version}.tar.gz" vendor +popd diff --git a/anda/apps/nekoray/update.rhai b/anda/apps/nekoray/update.rhai new file mode 100644 index 0000000000..4f1929a65f --- /dev/null +++ b/anda/apps/nekoray/update.rhai @@ -0,0 +1,3 @@ +rpm.version(find(`([\d.]+)-\d+-\d+-\d+`, gh_rawfile("Mahdi-zarei/nekoray", "dev", "nekoray_version.txt"), 1)); + +open_file("anda/apps/nekoray/Sagernet.SingBox.Version.txt", "w").write(gh("sagernet/sing-box")); diff --git a/anda/apps/neohtop/neohtop.spec b/anda/apps/neohtop/neohtop.spec index 8000151906..b6da0e0383 100644 --- a/anda/apps/neohtop/neohtop.spec +++ b/anda/apps/neohtop/neohtop.spec @@ -1,7 +1,7 @@ %global __brp_mangle_shebangs %{nil} Name: neohtop -Version: 1.1.2 +Version: 1.2.0 Release: 1%?dist Summary: System monitoring on steroids License: MIT diff --git a/anda/apps/opensnitch/anda.hcl b/anda/apps/opensnitch/anda.hcl new file mode 100644 index 0000000000..31ac55bb1c --- /dev/null +++ b/anda/apps/opensnitch/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "opensnitch.spec" + } +} diff --git a/anda/apps/opensnitch/opensnitch.spec b/anda/apps/opensnitch/opensnitch.spec new file mode 100644 index 0000000000..981612ce2b --- /dev/null +++ b/anda/apps/opensnitch/opensnitch.spec @@ -0,0 +1,119 @@ +# Generated by go2rpm 1.16.0 +%bcond check 1 +%bcond bootstrap 0 + +# https://github.com/evilsocket/opensnitch +%global goipath github.com/evilsocket/opensnitch +Version: 1.7.0.0 + +%gometa -f + +%global common_description %{expand: +OpenSnitch is a GNU/Linux interactive application firewall inspired by Little +Snitch.} + +%global golicenses LICENSE ui/LICENSE\\\ + ui/opensnitch/res/themes/dark/icons/LICENSE +%global godocs README.md ebpf_prog/README ui/requirements.txt\\\ + ui/i18n/README.md example example example\\\ + utils/packaging/daemon/deb/debian/changelog\\\ + utils/packaging/ui/deb/debian/changelog + +Name: opensnitch +Release: %autorelease +Summary: OpenSnitch is a GNU/Linux interactive application firewall inspired by Little Snitch + +License: GPL-3.0-only AND LGPL-2.1-or-later +URL: %{gourl} +Source: %{gosource} +BuildRequires: gcc-c++ +BuildRequires: python3-devel +BuildRequires: python-rpm-macros +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) >= 61.0 +BuildRequires: python3dist(wheel) >= 0.37.1 +BuildRequires: python3dist(pyqt5) +BuildRequires: /usr/bin/lrelease-qt5 +BuildRequires: protobuf-compiler +BuildRequires: pkgconfig(libnetfilter_queue) +#BuildRequires: protoc-gen-go +#BuildRequires: /usr/bin/protoc-gen-go-grpc + +%description %{common_description} + +%gopkg + + +%prep +%goprep -A +%autopatch -p1 + +export GOBIN=$(go env GOPATH | sed -E 's/:.+$//')/bin +echo $GOBIN > %_builddir/gobin +go install github.com/golang/protobuf/protoc-gen-go@latest +go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34.1 +go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0 + +sed -i 's/@pip3 /@python3 -m pip /' ui/Makefile + +%build +pushd ui +%make_build deps +popd + +export GOBIN=$(cat %_builddir/gobin) +export PATH=$GOBIN:$PATH +pushd proto +%make_build +popd + +pushd ui +%make_build +%pyproject_wheel +popd + +%global gomodulesmode GO111MODULE=on +pushd daemon +%gobuild -o ../opensnitchd . +popd + + +%install +%gopkginstall +install -Dm755 opensnitchd -t %buildroot%_bindir + +pushd ui +%if 0%{?fedora} <= 41 +%py3_install +%else +%pyproject_install +%pyproject_save_files %name +%endif +popd + +rm -rf %buildroot%python3_sitelib/tests/ +cp -r %buildroot%python3_sitelib%_usr/ %buildroot%_usr/ --preserve=all --no-target-directory +rm -rf %buildroot%python3_sitelib%_usr + + +%if 0%{?fedora} <= 41 +%files +%{python3_sitelib}/%name/ +%{python3_sitelib}/%name-%{version}-py%{python3_version}.egg-info/ +%else +%files -f %{pyproject_files} +%endif +%license LICENSE +%doc README.md +%_bindir/opensnitch-ui +%_bindir/opensnitchd +%_datadir/applications/opensnitch_ui.desktop +%_iconsdir/hicolor/48x48/apps/opensnitch-ui.png +%_iconsdir/hicolor/64x64/apps/opensnitch-ui.png +%_iconsdir/hicolor/scalable/apps/opensnitch-ui.svg +%_datadir/kservices5/kcm_opensnitch.desktop +%_metainfodir/io.github.evilsocket.opensnitch.appdata.xml + +/usr/share/icons/hicolor/scalable/apps/opensnitch-ui.svg + +%gopkgfiles diff --git a/anda/apps/opensnitch/update.rhai b/anda/apps/opensnitch/update.rhai new file mode 100644 index 0000000000..e69de29bb2 diff --git a/anda/apps/peazip/anda.hcl b/anda/apps/peazip/anda.hcl new file mode 100644 index 0000000000..c6024a40a4 --- /dev/null +++ b/anda/apps/peazip/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "peazip.spec" + } +} diff --git a/anda/apps/peazip/peazip.spec b/anda/apps/peazip/peazip.spec new file mode 100644 index 0000000000..b2666295e3 --- /dev/null +++ b/anda/apps/peazip/peazip.spec @@ -0,0 +1,138 @@ +# can't figure out how to apply usual build flags to lazbuild +%define debug_package %nil + +Name: peazip +Version: 10.6.1 +Release: 1%?dist +Summary: Free Zip / Unzip software and Rar file extractor. Cross-platform file and archive manager +License: LGPL-3.0-only +URL: https://peazip.github.io +Source0: https://github.com/peazip/PeaZip/archive/refs/tags/%version.tar.gz +# holy smoke this is written in pascal? +BuildRequires: lazarus-tools +BuildRequires: lazarus-lcl-gtk2 +BuildRequires: lazarus-lcl-gtk3 +BuildRequires: lazarus-lcl-qt5 +BuildRequires: lazarus-lcl-qt6 +Requires: (peazip-gtk2 or peazip-gtk3 or peazip-gtk4 or peazip-qt5 or peazip-qt6) +Requires: p7zip brotli zstd +Suggests: (peazip-gtk4 if gtk4) +Suggests: (peazip-qt5 if qt5-qtbase) +Suggests: (peazip-qt6 if qt6-qtbase) + +%description +PeaZip is a free file archiver utility and rar extractor for Linux, macOS, and +Windows, which works with 200+ archive types and variants (7z, ace, arc, bz2, +cab, gz, iso, paq, pea, rar, tar, wim, zip, zipx...), handles spanned archives +(001, r01, z01...), supports multiple archive encryption standards, file +hashing, exports tasks as console scripts. + +%package gtk2 +Summary: GTK2 version of peazip +Requires: peazip +RemovePathPostFixes: .gtk2 +%description gtk2 +GTK2 version of peazip. +%package gtk3 +Summary: GTK3 version of peazip +Requires: peazip +RemovePathPostFixes: .gtk3 +%description gtk3 +GTK3 version of peazip. +%package qt5 +Summary: Qt5 version of peazip +Requires: peazip +RemovePathPostFixes: .qt5 +%description qt5 +Qt5 version of peazip. +%package qt6 +Summary: Qt6 version of peazip +Requires: peazip +RemovePathPostFixes: .qt6 +%description qt6 +Qt6 version of peazip. + + +%package -n pea +Summary: Engine for PEA file format support +%description -n pea +Engine for PEA file format support. + +%package -n pea-gtk2 +Summary: GTK2 version of pea +Requires: pea +RemovePathPostFixes: .gtk2 +%description -n pea-gtk2 +GTK2 version of pea. +%package -n pea-gtk3 +Summary: GTK3 version of pea +Requires: pea +RemovePathPostFixes: .gtk3 +%description -n pea-gtk3 +GTK3 version of pea. +%package -n pea-qt5 +Summary: Qt5 version of pea +Requires: pea +RemovePathPostFixes: .qt5 +%description -n pea-qt5 +Qt5 version of pea. +%package -n pea-qt6 +Summary: Qt6 version of pea +Requires: pea +RemovePathPostFixes: .qt6 +%description -n pea-qt6 +Qt6 version of pea. + +%prep +%autosetup -n PeaZip-%version + +%build +cd peazip-sources +lazbuild --add-package dev/metadarkstyle/metadarkstyle.lpk +lazbuild --ws=gtk2 dev/project_peach.lpi && cp dev/peazip ../peazip.gtk2 +lazbuild --ws=gtk3 dev/project_peach.lpi && cp dev/peazip ../peazip.gtk3 +lazbuild --ws=qt5 dev/project_peach.lpi && cp dev/peazip ../peazip.qt5 +lazbuild --ws=qt6 dev/project_peach.lpi && cp dev/peazip ../peazip.qt6 +lazbuild --ws=gtk2 dev/project_pea.lpi && cp dev/pea ../pea.gtk2 +lazbuild --ws=gtk3 dev/project_pea.lpi && cp dev/pea ../pea.gtk3 +lazbuild --ws=qt5 dev/project_pea.lpi && cp dev/pea ../pea.qt5 +lazbuild --ws=qt6 dev/project_pea.lpi && cp dev/pea ../pea.qt6 + +%install +install -Dm755 peazip.* -t %buildroot%_bindir +install -Dm755 pea.* -t %buildroot%_bindir +install -Dm644 peazip-sources/res/share/batch/freedesktop_integration/peazip.desktop -t %{buildroot}%{_datadir}/applications +install -Dm644 peazip-sources/res/share/batch/freedesktop_integration/*.png -t %{buildroot}%{_datadir}/pixmaps +install -Dm644 peazip-sources/res/share/batch/freedesktop_integration/KDE-servicemenus/KDE6-dolphin/peazip-kde6.desktop -t %{buildroot}%{_datadir}/kio/servicemenus +install -Dm644 peazip-sources/res/share/batch/freedesktop_integration/Nautilus-scripts/PeaZip/* -t %{buildroot}%{_datadir}/nautilus/scripts/PeaZip + +%files +%doc README.md +%license LICENSE SECURITY.md +%{_datadir}/applications/peazip.desktop +%{_datadir}/pixmaps/peazip*.png +%{_datadir}/kio/servicemenus/peazip-kde6.desktop +%dir %{_datadir}/nautilus/scripts/PeaZip +%{_datadir}/nautilus/scripts/PeaZip/* + +%files -n pea +%doc README.md +%license LICENSE SECURITY.md + +%files gtk2 +%_bindir/peazip.gtk2 +%files gtk3 +%_bindir/peazip.gtk3 +%files qt5 +%_bindir/peazip.qt5 +%files qt6 +%_bindir/peazip.qt6 + +%files -n pea-gtk2 +%_bindir/pea.gtk2 +%files -n pea-gtk3 +%_bindir/pea.gtk3 +%files -n pea-qt5 +%_bindir/pea.qt5 +%files -n pea-qt6 +%_bindir/pea.qt6 diff --git a/anda/apps/peazip/update.rhai b/anda/apps/peazip/update.rhai new file mode 100644 index 0000000000..ff9f1ef11b --- /dev/null +++ b/anda/apps/peazip/update.rhai @@ -0,0 +1 @@ +rpm.version(get("https://raw.githubusercontent.com/peazip/peazip.github.io/master/autoupdate.txt")); diff --git a/anda/apps/protontricks/anda.hcl b/anda/apps/protontricks/anda.hcl new file mode 100644 index 0000000000..08cee6defa --- /dev/null +++ b/anda/apps/protontricks/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "protontricks.spec" + } + labels { + subrepo = "extras" + } +} diff --git a/anda/apps/protontricks/protontricks.spec b/anda/apps/protontricks/protontricks.spec new file mode 100644 index 0000000000..5ea09b3a59 --- /dev/null +++ b/anda/apps/protontricks/protontricks.spec @@ -0,0 +1,92 @@ +%bcond_with tests +%global pypi_name protontricks + +Name: terra-%{pypi_name} +Version: 1.13.0 +Release: 1%?dist +Summary: Simple wrapper that does winetricks things for Proton enabled games +BuildArch: noarch + +License: GPL-3.0-or-later +URL: https://github.com/Matoking/protontricks + +# GitHub tarball won't work for setuptools-scm +Source0: %{pypi_source} + +BuildRequires: desktop-file-utils +BuildRequires: python3-devel +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(setuptools-scm) +# BuildRequires: python3dist(vdf) >= 3.4 +%if %{with tests} +BuildRequires: python3dist(pytest-cov) >= 2.10 +BuildRequires: python3dist(pytest) >= 6.0 +%endif + +Requires: (terra-winetricks or winetricks-git) +Conflicts: protontricks + +Recommends: yad + +Suggests: zenity +# https://github.com/Matoking/protontricks/blob/master/CHANGELOG.md#1120---2024-09-16 +Provides: bundled(python3-vdf) + + +%description +A simple wrapper that does winetricks things for Proton enabled games, +requires Winetricks. + +This is a fork of the original project created by sirmentio. The original +repository is available at Sirmentio/protontricks. + + +%prep +%autosetup -n %{pypi_name}-%{version} + + +%build +%if 0%{?fedora} <= 41 +%py3_build +%else +%pyproject_wheel +%endif + + +%install +%if 0%{?fedora} <= 41 +%py3_install +%else +%pyproject_install +%endif + +# Remove `protontricks-desktop-install`, since we already install .desktop +# files properly +# https://bugzilla.redhat.com/show_bug.cgi?id=1991684 +rm %{buildroot}%{_bindir}/%{pypi_name}-desktop-install + + +%if %{with tests} +%check +%{py3_test_envvars} %{python3} -m pytest -v +desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop +%endif + + +%files +%license LICENSE +%doc README.md CHANGELOG.md +%{_bindir}/%{pypi_name}-launch +%{_bindir}/%{pypi_name} +%{_datadir}/applications/*.desktop +%{python3_sitelib}/%{pypi_name}/ +%if 0%{?fedora} <= 41 +%{python3_sitelib}/%{pypi_name}-%{version}*.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}*.dist-info/ +%endif + + +%changelog +%autochangelog diff --git a/anda/apps/protontricks/update.rhai b/anda/apps/protontricks/update.rhai new file mode 100644 index 0000000000..219119c8c4 --- /dev/null +++ b/anda/apps/protontricks/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("protontricks")); diff --git a/anda/apps/rp-appset/anda.hcl b/anda/apps/rp-appset/anda.hcl new file mode 100644 index 0000000000..904fc2aab3 --- /dev/null +++ b/anda/apps/rp-appset/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rp-appset.spec" + } +} diff --git a/anda/apps/rp-appset/rp-appset.spec b/anda/apps/rp-appset/rp-appset.spec new file mode 100644 index 0000000000..c59e3cbdaf --- /dev/null +++ b/anda/apps/rp-appset/rp-appset.spec @@ -0,0 +1,51 @@ +%global commit 5b4b8f65c3d2795a61e765a01e07af9bfe3d1990 +%global commit_date 20250501 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: appset +Version: 0~%commit_date.git~%shortcommit +Release: 1%?dist +Summary: Application for customisation of appearance of Raspberry Pi Desktop +License: BSD-3-Clause +URL: https://github.com/raspberrypi-ui/appset +Source0: %url/archive/%commit.tar.gz +Packager: Owen Zimmerman + +BuildRequires: meson +BuildRequires: ninja-build +BuildRequires: gtk3-devel +BuildRequires: libxml2-devel +BuildRequires: intltool +BuildRequires: gcc + +Requires: libxml2 +Requires: gtk3 + +Provides: pipanel +Provides: rp-appset + +%description +%summary. + +%prep +%autosetup -n appset-%commit + +%build +%meson +%meson_build + +%install +%meson_install + +%find_lang pipanel + +%files -f pipanel.lang +%doc README +%license debian/copyright +%{_bindir}/pipanel +%{_datadir}/applications/pipanel.desktop +%{_datadir}/pipanel/ui/pipanel.ui + +%changelog +* Fri Aug 15 2025 Owen Zimmerman +- Package appset diff --git a/anda/apps/rp-appset/update.rhai b/anda/apps/rp-appset/update.rhai new file mode 100644 index 0000000000..341bac044f --- /dev/null +++ b/anda/apps/rp-appset/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("raspberrypi-ui/appset")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/apps/rp-bookshelf/anda.hcl b/anda/apps/rp-bookshelf/anda.hcl new file mode 100644 index 0000000000..c17d264801 --- /dev/null +++ b/anda/apps/rp-bookshelf/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rp-bookshelf.spec" + } +} diff --git a/anda/apps/rp-bookshelf/rp-bookshelf.spec b/anda/apps/rp-bookshelf/rp-bookshelf.spec new file mode 100644 index 0000000000..1a52bd980e --- /dev/null +++ b/anda/apps/rp-bookshelf/rp-bookshelf.spec @@ -0,0 +1,50 @@ +%global commit 53102fb6f4b0324cc89635f0ef58966c6b847a74 +%global commit_date 20250327 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: rp-bookshelf +Version: 0~%commit_date.git~%shortcommit +Release: 1%?dist +Summary: Browser for Raspberry Pi Press publications in PDF format +License: BSD-3-Clause +URL: https://github.com/raspberrypi-ui/bookshelf +Source0: %url/archive/%commit.tar.gz +Packager: Owen Zimmerman + +BuildRequires: meson +BuildRequires: ninja-build +BuildRequires: gtk3-devel +BuildRequires: libcurl-devel +BuildRequires: intltool +BuildRequires: gcc + +Requires: libcurl gtk3 + +%description +%summary. + +%prep +%autosetup -n bookshelf-%commit + +%build +%meson +%meson_build + +%install +%meson_install +%find_lang %{name} + +%files -f %{name}.lang +%doc README +%license debian/copyright +%{_bindir}/rp-bookshelf +%{_datadir}/icons/hicolor/16x16/apps/bookshelf.png +%{_datadir}/icons/hicolor/24x24/apps/bookshelf.png +%{_datadir}/icons/hicolor/32x32/apps/bookshelf.png +%{_datadir}/icons/hicolor/48x48/apps/bookshelf.png +%{_datadir}/applications/rp-bookshelf.desktop +%{_datadir}/rp-bookshelf/* + +%changelog +* Fri Aug 08 2025 Owen Zimmerman +- Package bookshelf diff --git a/anda/apps/rp-bookshelf/update.rhai b/anda/apps/rp-bookshelf/update.rhai new file mode 100644 index 0000000000..40506e0928 --- /dev/null +++ b/anda/apps/rp-bookshelf/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("raspberrypi-ui/bookshelf")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/apps/ruffle/ruffle-nightly.spec b/anda/apps/ruffle/ruffle-nightly.spec index 5a22e56972..030749a4a1 100644 --- a/anda/apps/ruffle/ruffle-nightly.spec +++ b/anda/apps/ruffle/ruffle-nightly.spec @@ -1,4 +1,4 @@ -%global ver 2025-02-21 +%global ver 2025-08-22 %global goodver %(echo %ver | sed 's/-//g') %global __brp_mangle_shebangs %{nil} %bcond_without mold @@ -31,7 +31,7 @@ Packager: madonuko %doc README.md %license LICENSE.md %license LICENSE.dependencies -%_bindir/ruffle_desktop +%_bindir/ruffle %_datadir/applications/rs.ruffle.Ruffle.desktop %_iconsdir/hicolor/scalable/apps/rs.ruffle.Ruffle.svg %_metainfodir/rs.ruffle.Ruffle.metainfo.xml @@ -39,18 +39,18 @@ Packager: madonuko %prep %autosetup -n ruffle-nightly-%ver -p1 %cargo_prep_online -sed -iE 's@^Exec=ruffle %%u$@Exec=ruffle_desktop %%u@' desktop/packages/linux/rs.ruffle.Ruffle.desktop -cat desktop/packages/linux/rs.ruffle.Ruffle.desktop %build -%{cargo_license_online} > LICENSE.dependencies +cd desktop +%cargo_build %install -cd desktop -%cargo_install -install -Dm644 packages/linux/rs.ruffle.Ruffle.svg %buildroot%_iconsdir/hicolor/scalable/apps/rs.ruffle.Ruffle.svg -install -Dm644 packages/linux/rs.ruffle.Ruffle.desktop %buildroot%_datadir/applications/rs.ruffle.Ruffle.desktop -install -Dm644 packages/linux/rs.ruffle.Ruffle.metainfo.xml %buildroot%_metainfodir/rs.ruffle.Ruffle.metainfo.xml +install -Dm755 target/rpm/ruffle_desktop %buildroot%_bindir/ruffle +install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.svg %buildroot%_iconsdir/hicolor/scalable/apps/rs.ruffle.Ruffle.svg +install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.desktop %buildroot%_datadir/applications/rs.ruffle.Ruffle.desktop +install -Dm644 desktop/packages/linux/rs.ruffle.Ruffle.metainfo.xml %buildroot%_metainfodir/rs.ruffle.Ruffle.metainfo.xml + +%{cargo_license_online} > LICENSE.dependencies %changelog * Mon Jul 29 2024 madonuko diff --git a/anda/apps/signal-desktop/anda.hcl b/anda/apps/signal-desktop/anda.hcl new file mode 100644 index 0000000000..630dc2924e --- /dev/null +++ b/anda/apps/signal-desktop/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "signal-desktop.spec" + } +} diff --git a/anda/apps/signal-desktop/signal-desktop.spec b/anda/apps/signal-desktop/signal-desktop.spec new file mode 100644 index 0000000000..6063824999 --- /dev/null +++ b/anda/apps/signal-desktop/signal-desktop.spec @@ -0,0 +1,123 @@ +%define debug_package %{nil} + +# Exclude private libraries +%global __requires_exclude libffmpeg.so +%global __provides_exclude_from %{_datadir}/%{name}/.*\\.so + +%ifarch x86_64 +%define arch %{nil} +%elifarch aarch64 +%define arch arm64- +%endif + +Name: signal-desktop +Version: 7.67.0 +Release: 1%?dist +Summary: A private messenger for Windows, macOS, and Linux +URL: https://signal.org +Source0: https://github.com/signalapp/Signal-Desktop/archive/refs/tags/v%{version}.tar.gz +# signal.desktop from https://github.com/signalflatpak/signal/blob/master/org.signal.Signal.desktop +Source1: signal.desktop +License: AGPL-3.0 AND %electron_licenses +ExclusiveArch: x86_64 aarch64 +BuildRequires: pulseaudio-libs-devel libX11-devel pnpm make gcc g++ python3 +Requires: pulseaudio-libs +Requires: glib2 +Requires: gtk3 +Requires: libwayland-cursor +Requires: libwayland-client +Requires: libxkbcommon +Requires: glibc +Requires: gdk-pixbuf2 +Requires: libthai +Requires: nettle +Requires: avahi-libs +Requires: libXfixes +Requires: libX11 +Requires: libjpeg-turbo +Requires: sqlite-libs +Requires: json-glib +Requires: libdatrie +Requires: libxml2 +Requires: libbrotli +Requires: cairo +Requires: xz-libs +Requires: libxcb +Requires: nss-util +Requires: nss +Requires: dbus-libs +Requires: mesa-libgbm +Requires: at-spi2-atk +Requires: expat +Requires: alsa-lib + +%description +Signal Desktop links with Signal on Android or iOS and lets you message from your Windows, macOS, and Linux computers. + +%prep +%autosetup -n Signal-Desktop-%{version} + +%build +pnpm install +pnpm run build-linux --dir + +%install +install -Dm755 release/linux-%{arch}unpacked/libEGL.so %{buildroot}%{_libdir}/signal-desktop/libEGL.so +install -Dm755 release/linux-%{arch}unpacked/libGLESv2.so %{buildroot}%{_libdir}/signal-desktop/libGLESv2.so +install -Dm755 release/linux-%{arch}unpacked/libffmpeg.so %{buildroot}%{_libdir}/signal-desktop/libffmpeg.so +install -Dm755 release/linux-%{arch}unpacked/libvk_swiftshader.so %{buildroot}%{_libdir}/signal-desktop/libvk_swiftshader.so +install -Dm755 release/linux-%{arch}unpacked/libvulkan.so.1 %{buildroot}%{_libdir}/signal-desktop/libvulkan.so.1 +install -Dm644 release/linux-%{arch}unpacked/icudtl.dat %{buildroot}%{_libdir}/signal-desktop/icudtl.dat +install -Dm644 release/linux-%{arch}unpacked/v8_context_snapshot.bin %{buildroot}%{_libdir}/signal-desktop/v8_context_snapshot.bin +install -Dm644 release/linux-%{arch}unpacked/chrome_100_percent.pak %{buildroot}%{_libdir}/signal-desktop/chrome_100_percent.pak +install -Dm644 release/linux-%{arch}unpacked/chrome_200_percent.pak %{buildroot}%{_libdir}/signal-desktop/chrome_200_percent.pak +install -Dm644 release/linux-%{arch}unpacked/resources.pak %{buildroot}%{_libdir}/signal-desktop/resources.pak +install -Dm644 release/linux-%{arch}unpacked/vk_swiftshader_icd.json %{buildroot}%{_libdir}/signal-desktop/vk_swiftshader_icd.json +install -Dm644 release/linux-%{arch}unpacked/resources/app.asar %{buildroot}%{_libdir}/signal-desktop/resources/app.asar +cp -r release/linux-%{arch}unpacked/resources/app.asar.unpacked %{buildroot}%{_libdir}/signal-desktop/resources/ + +install -Dm755 release/linux-%{arch}unpacked/chrome-sandbox %{buildroot}%{_libdir}/signal-desktop/chrome-sandbox +install -Dm755 release/linux-%{arch}unpacked/chrome_crashpad_handler %{buildroot}%{_libdir}/signal-desktop/chrome_crashpad_handler + +install -Dm755 release/linux-%{arch}unpacked/signal-desktop %{buildroot}%{_libdir}/signal-desktop/signal-desktop + +install -Dm644 release/linux-%{arch}unpacked/resources/org.signalapp.view-aep.policy %{buildroot}%{_datadir}/polkit-1/rules.d/org.signalapp.view-aep.policy +install -Dm644 release/linux-%{arch}unpacked/resources/org.signalapp.enable-backups.policy %{buildroot}%{_datadir}/polkit-1/rules.d/org.signalapp.enable-backups.policy + +install -Dm644 build/icons/png/1024x1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/apps/signal.png +install -Dm644 build/icons/png/128x128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/signal.png +install -Dm644 build/icons/png/16x16.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/signal.png +install -Dm644 build/icons/png/24x24.png %{buildroot}%{_iconsdir}/hicolor/24x24/apps/signal.png +install -Dm644 build/icons/png/256x256.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/signal.png +install -Dm644 build/icons/png/32x32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/signal.png +install -Dm644 build/icons/png/48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/signal.png +install -Dm644 build/icons/png/512x512.png %{buildroot}%{_iconsdir}/hicolor/512x512/apps/signal.png +install -Dm644 build/icons/png/64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/signal.png + +install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/applications/signal.desktop + +ln -s %_libdir/signal-desktop/signal-desktop %buildroot%_bindir/signal-desktop + +%files +%license LICENSE +%doc README.md CONTRIBUTING.md ACKNOWLEDGMENTS.md +%license release/linux-%{arch}unpacked/LICENSE.electron.txt +%license release/linux-%{arch}unpacked/LICENSES.chromium.html +%{_bindir}/signal-desktop +%{_libdir}/signal-desktop/ +%{_datadir}/polkit-1/rules.d/org.signalapp.view-aep.policy +%{_datadir}/polkit-1/rules.d/org.signalapp.enable-backups.policy +%{_datadir}/applications/signal.desktop +%{_iconsdir}/hicolor/1024x1024/apps/signal.png +%{_iconsdir}/hicolor/128x128/apps/signal.png +%{_iconsdir}/hicolor/16x16/apps/signal.png +%{_iconsdir}/hicolor/24x24/apps/signal.png +%{_iconsdir}/hicolor/256x256/apps/signal.png +%{_iconsdir}/hicolor/32x32/apps/signal.png +%{_iconsdir}/hicolor/48x48/apps/signal.png +%{_iconsdir}/hicolor/512x512/apps/signal.png +%{_iconsdir}/hicolor/64x64/apps/signal.png + +%changelog +* Fri Aug 8 2025 june-fish +- Initial Package diff --git a/anda/apps/signal-desktop/signal.desktop b/anda/apps/signal-desktop/signal.desktop new file mode 100644 index 0000000000..9ed98565b9 --- /dev/null +++ b/anda/apps/signal-desktop/signal.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name=Signal +Exec=signal-desktop %U +Terminal=false +Type=Application +Icon=signal +StartupWMClass=Signal +Comment=Private messaging from your desktop +MimeType=x-scheme-handler/sgnl;x-scheme-handler/signalcaptcha; +Categories=Network;InstantMessaging;Chat; +X-Desktop-File-Install-Version=0.27 +X-Purism-FormFactor=Workstation;Mobile; +X-Flatpak-RenamedFrom=signal-desktop.desktop; diff --git a/anda/apps/signal-desktop/update.rhai b/anda/apps/signal-desktop/update.rhai new file mode 100644 index 0000000000..7fd6d29321 --- /dev/null +++ b/anda/apps/signal-desktop/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("signalapp/Signal-Desktop")); diff --git a/anda/apps/subtitleedit/anda.hcl b/anda/apps/subtitleedit/anda.hcl new file mode 100644 index 0000000000..1470b4a07a --- /dev/null +++ b/anda/apps/subtitleedit/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "subtitleedit.spec" + } +} diff --git a/anda/apps/subtitleedit/subtitleedit.spec b/anda/apps/subtitleedit/subtitleedit.spec new file mode 100644 index 0000000000..22b5a06c00 --- /dev/null +++ b/anda/apps/subtitleedit/subtitleedit.spec @@ -0,0 +1,56 @@ +%global pkgdir %_datadir/subtitleedit +%global realname subtitleedit + +Name: %realname.bin +Version: 4.0.13 +Release: 1%?dist +Summary: An advanced subtitle editor and converter +License: GPL-3.0-only +URL: https://www.nikse.dk/SubtitleEdit +Source0: https://github.com/SubtitleEdit/subtitleedit/releases/download/%version/SE%{gsub %version %. %{quote:}}.zip +Source1: https://github.com/SubtitleEdit/subtitleedit/blob/%version/src/libse/Icon.png?raw=true +Packager: madonuko +Provides: %realname = %evr +Conflicts: %realname +BuildRequires: unzip anda-srpm-macros +Requires: dejavu-sans-mono-fonts mono-core + +%description +%summary. + + +%prep +cat< subtitleedit.desktop +[Desktop Entry] +Name=Subtitle Edit +Comment=An advanced subtitle editor and converter +Exec=/usr/bin/subtitleedit %%F +Icon=subtitleedit +Terminal=false +Type=Application +Categories=Video;AudioVideo;AudioVideoEditing; +EOF + +cat< subtitleedit +#!/usr/bin/sh +exec mono /usr/share/subtitleedit/SubtitleEdit.exe "$@" +EOF + + +%install +mkdir -p %buildroot%pkgdir +unzip %{S:0} -d %buildroot%pkgdir +rm -r %buildroot%pkgdir/Tesseract302 +rm %buildroot%pkgdir/Hunspell{x86,x64}.dll +touch %buildroot%pkgdir/.PACKAGE-MANAGER + +install -Dm755 subtitleedit -t %buildroot%_bindir +install -Dm644 subtitleedit.desktop -t %buildroot%_datadir/applications +install -Dm644 %{S:1} %buildroot%_datadir/pixmaps/subtitleedit.png + + +%files +%pkgdir +%_bindir/%realname +%_datadir/applications/%realname.desktop +%_datadir/pixmaps/%realname.png diff --git a/anda/apps/subtitleedit/update.rhai b/anda/apps/subtitleedit/update.rhai new file mode 100644 index 0000000000..e56075c537 --- /dev/null +++ b/anda/apps/subtitleedit/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("SubtitleEdit/subtitleedit")); diff --git a/anda/apps/switcheroo-control/0001-main-update-GPUs-comment-for-dbus-property.patch b/anda/apps/switcheroo-control/0001-main-update-GPUs-comment-for-dbus-property.patch deleted file mode 100644 index 825ca07b19..0000000000 --- a/anda/apps/switcheroo-control/0001-main-update-GPUs-comment-for-dbus-property.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 44046bfbcb30a19c45416113a2a82a4d17a1a998 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Mon, 14 Aug 2023 14:06:45 +0200 -Subject: [PATCH 01/10] main: update GPUs comment for dbus property - -Signed-off-by: Jan200101 ---- - src/net.hadess.SwitcherooControl.xml | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/net.hadess.SwitcherooControl.xml b/src/net.hadess.SwitcherooControl.xml -index e52bc1a..59a8896 100644 ---- a/src/net.hadess.SwitcherooControl.xml -+++ b/src/net.hadess.SwitcherooControl.xml -@@ -38,7 +38,8 @@ - will contain a user-facing name for the GPU, the "Environment" (as) key will - contain an array of even number of strings, each being an environment - variable to set to use the GPU, followed by its value, the "Default" (b) key -- will tag the default (usually integrated) GPU. -+ will tag the default GPU, the "Discrete" (b) key tags if the GPU is a -+ dedicated component. - --> - - --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0002-main-add-Discrete-key.patch b/anda/apps/switcheroo-control/0002-main-add-Discrete-key.patch deleted file mode 100644 index b67ca67fae..0000000000 --- a/anda/apps/switcheroo-control/0002-main-add-Discrete-key.patch +++ /dev/null @@ -1,379 +0,0 @@ -From 4f31415cb61a50c2bcba1510a7511518417d0970 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Mon, 11 Sep 2023 15:21:46 +0200 -Subject: [PATCH 02/10] main: add Discrete key - -Signed-off-by: Jan200101 ---- - .gitlab-ci.yml | 1 + - data/30-discrete-gpu.rules.in | 3 + - data/meson.build | 7 ++ - meson.build | 9 +++ - meson_options.txt | 24 +++++++ - src/discrete-detection/amdgpu.c | 46 +++++++++++++ - src/discrete-detection/meson.build | 18 +++++ - src/discrete-detection/nouveau.c | 105 +++++++++++++++++++++++++++++ - src/meson.build | 4 +- - src/switcheroo-control.c | 16 +++++ - 10 files changed, 232 insertions(+), 1 deletion(-) - create mode 100644 data/30-discrete-gpu.rules.in - create mode 100644 src/discrete-detection/amdgpu.c - create mode 100644 src/discrete-detection/meson.build - create mode 100644 src/discrete-detection/nouveau.c - -diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml -index a6aa3c7..a09fe20 100644 ---- a/.gitlab-ci.yml -+++ b/.gitlab-ci.yml -@@ -3,6 +3,7 @@ image: fedora:rawhide - variables: - DEPENDENCIES: glib2-devel - libgudev-devel -+ libdrm-devel - gtk-doc - gcc - gcc-c++ -diff --git a/data/30-discrete-gpu.rules.in b/data/30-discrete-gpu.rules.in -new file mode 100644 -index 0000000..a803ed4 ---- /dev/null -+++ b/data/30-discrete-gpu.rules.in -@@ -0,0 +1,3 @@ -+DRIVERS=="amdgpu", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-amdgpu $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" -+DRIVERS=="nouveau", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-nouveau $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" -+DRIVERS=="nvidia", TAG+="switcheroo-discrete-gpu" -diff --git a/data/meson.build b/data/meson.build -index 85e5c93..38cf96c 100644 ---- a/data/meson.build -+++ b/data/meson.build -@@ -17,3 +17,10 @@ install_data( - '30-pci-intel-gpu.hwdb', - install_dir: hwdb_dir, - ) -+ -+configure_file( -+ input: '30-discrete-gpu.rules.in', -+ output: '30-discrete-gpu.rules', -+ configuration: data_conf, -+ install_dir: rules_dir, -+) -diff --git a/meson.build b/meson.build -index b8f4bff..b3aaf0c 100644 ---- a/meson.build -+++ b/meson.build -@@ -20,6 +20,9 @@ gnome = import('gnome') - glib = dependency('glib-2.0', version: '>= 2.56.0') - gio = dependency('gio-2.0', version: '>= 2.56.0') - gudev = dependency('gudev-1.0', version: '>= 232') -+libdrm = dependency('libdrm', version: '>= 2.4.97', required: get_option('libdrm')) -+libdrm_nouveau = dependency('libdrm_nouveau', version: '>= 2.4.97', required: get_option('libdrm_nouveau')) -+libdrm_amdgpu = dependency('libdrm_amdgpu', version: '>= 2.4.97', required: get_option('libdrm_amdgpu')) - - systemd_systemunitdir = get_option('systemdsystemunitdir') - if systemd_systemunitdir == '' -@@ -32,6 +35,12 @@ if hwdb_dir == '' - hwdb_dir = udevdir / 'hwdb.d' - endif - -+rules_dir = get_option('rulesdir') -+if rules_dir == '' -+ udevdir = dependency('udev').get_pkgconfig_variable('udevdir') -+ rules_dir = udevdir / 'rules.d' -+endif -+ - # Make like license available in the build root for docs - configure_file( - input: 'COPYING', -diff --git a/meson_options.txt b/meson_options.txt -index c8d9619..b8d671a 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -10,6 +10,12 @@ option('hwdbdir', - description: 'Directory for hwdb files', - ) - -+option('rulesdir', -+ type: 'string', -+ value: '', -+ description: 'Directory for ruke files', -+) -+ - option('gtk_doc', - type: 'boolean', - value: false, -@@ -21,3 +27,21 @@ option('tests', - type: 'boolean', - value: false - ) -+ -+option('libdrm', -+ description: 'Whether libdrm should be used to probe GPUs', -+ type: 'feature', -+ value: 'auto' -+) -+ -+option('libdrm_nouveau', -+ description: 'Whether libdrm_nouveau should be used to probe Nvidia GPUs', -+ type: 'feature', -+ value: 'auto' -+) -+ -+option('libdrm_amdgpu', -+ description: 'Whether libdrm_amdgpu should be used to probe AMD GPUs', -+ type: 'feature', -+ value: 'auto' -+) -diff --git a/src/discrete-detection/amdgpu.c b/src/discrete-detection/amdgpu.c -new file mode 100644 -index 0000000..2d9804f ---- /dev/null -+++ b/src/discrete-detection/amdgpu.c -@@ -0,0 +1,46 @@ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+ -+typedef int handle; -+G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) -+G_DEFINE_AUTOPTR_CLEANUP_FUNC(amdgpu_device_handle, free); -+ -+int main(int argc, char** argv) -+{ -+ if (argc < 2) -+ { -+ puts ("check-discrete-amdgpu [DEVNAME]"); -+ return EXIT_FAILURE; -+ } -+ -+ const char *devname; -+ g_auto(handle) fd = -1; -+ g_autoptr(GUdevDevice) parent = NULL; -+ struct drm_amdgpu_info_device device_info = {0}; -+ amdgpu_device_handle device = NULL; -+ uint32_t drm_major, drm_minor; -+ -+ devname = argv[1]; -+ fd = open (devname, O_RDWR); -+ if (fd < 0) -+ return EXIT_FAILURE; -+ -+ if (amdgpu_device_initialize (fd, &drm_major, &drm_minor, &device)) -+ return EXIT_FAILURE; -+ -+ if (amdgpu_query_info (device, AMDGPU_INFO_DEV_INFO, sizeof(device_info), &device_info)) -+ return EXIT_FAILURE; -+ -+ /* AMDGPU_IDS_FLAGS_FUSION is set for all APUs */ -+ if (device_info.ids_flags & AMDGPU_IDS_FLAGS_FUSION) -+ return EXIT_FAILURE; -+ -+ return EXIT_SUCCESS; -+} -diff --git a/src/discrete-detection/meson.build b/src/discrete-detection/meson.build -new file mode 100644 -index 0000000..3a6c03f ---- /dev/null -+++ b/src/discrete-detection/meson.build -@@ -0,0 +1,18 @@ -+ -+if libdrm_amdgpu.found() -+ executable('check-discrete-amdgpu', -+ files('amdgpu.c'), -+ dependencies: deps, -+ install: true, -+ install_dir: libexecdir, -+ ) -+endif -+ -+if libdrm.found() and libdrm_nouveau.found() -+ executable('check-discrete-nouveau', -+ files('nouveau.c'), -+ dependencies: deps, -+ install: true, -+ install_dir: libexecdir, -+ ) -+endif -diff --git a/src/discrete-detection/nouveau.c b/src/discrete-detection/nouveau.c -new file mode 100644 -index 0000000..0a1f220 ---- /dev/null -+++ b/src/discrete-detection/nouveau.c -@@ -0,0 +1,105 @@ -+ -+#include -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+typedef int handle; -+G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) -+ -+int main(int argc, char** argv) -+{ -+ if (argc < 2) -+ { -+ puts ("check-discrete-nouveau [DEVNAME]"); -+ return EXIT_FAILURE; -+ } -+ -+ const char *devname; -+ g_auto(handle) fd = -1; -+ -+ devname = argv[1]; -+ fd = open (devname, O_RDWR); -+ if (fd < 0) -+ return EXIT_FAILURE; -+ -+ g_autofree void *device = malloc(352); -+ -+ /* Init device */ -+ { -+ struct { -+ struct nvif_ioctl_v0 ioctl; -+ struct nvif_ioctl_new_v0 new; -+ struct nv_device_v0 dev; -+ } init_args = { -+ .ioctl = { -+ .object = 0, -+ .owner = NVIF_IOCTL_V0_OWNER_ANY, -+ .route = 0x00, -+ .type = NVIF_IOCTL_V0_NEW, -+ .version = 0, -+ }, -+ .new = { -+ .handle = 0, -+ .object = (uintptr_t)device, -+ .oclass = NV_DEVICE, -+ .route = NVIF_IOCTL_V0_ROUTE_NVIF, -+ .token = (uintptr_t)device, -+ .version = 0, -+ }, -+ .dev = { -+ .device = ~0ULL, -+ }, -+ }; -+ -+ if (drmCommandWrite (fd, DRM_NOUVEAU_NVIF, &init_args, sizeof(init_args))) -+ return EXIT_FAILURE; -+ } -+ -+ /* Query device info */ -+ struct { -+ struct nvif_ioctl_v0 ioctl; -+ struct nvif_ioctl_mthd_v0 mthd; -+ struct nv_device_info_v0 info; -+ } args = { -+ .ioctl = { -+ .object = (uintptr_t)device, -+ .owner = NVIF_IOCTL_V0_OWNER_ANY, -+ .route = 0x00, -+ .type = NVIF_IOCTL_V0_MTHD, -+ .version = 0, -+ }, -+ .mthd = { -+ .method = NV_DEVICE_V0_INFO, -+ .version = 0, -+ }, -+ .info = { -+ .version = 0, -+ }, -+ }; -+ -+ if (drmCommandWriteRead (fd, DRM_NOUVEAU_NVIF, &args, sizeof(args))) -+ return EXIT_FAILURE; -+ -+ -+ switch (args.info.platform) -+ { -+ case NV_DEVICE_INFO_V0_IGP: -+ case NV_DEVICE_INFO_V0_SOC: -+ return EXIT_FAILURE; -+ -+ case NV_DEVICE_INFO_V0_PCI: -+ case NV_DEVICE_INFO_V0_AGP: -+ case NV_DEVICE_INFO_V0_PCIE: -+ default: -+ return EXIT_SUCCESS; -+ } -+ return EXIT_FAILURE; -+} -diff --git a/src/meson.build b/src/meson.build -index ab3a77d..da4267f 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -1,4 +1,4 @@ --deps = [glib, gio, gudev] -+deps = [glib, gio, gudev, libdrm, libdrm_nouveau, libdrm_amdgpu] - - sources = [ - 'info-cleanup.c', -@@ -34,3 +34,5 @@ configure_file( - configuration: switcherooctl_conf, - install_dir: get_option('bindir') - ) -+ -+subdir('discrete-detection') -diff --git a/src/switcheroo-control.c b/src/switcheroo-control.c -index abd8154..e407bfb 100644 ---- a/src/switcheroo-control.c -+++ b/src/switcheroo-control.c -@@ -31,6 +31,7 @@ typedef struct { - char *name; - GPtrArray *env; - gboolean is_default; -+ gboolean is_discrete; - } CardData; - - typedef struct { -@@ -94,6 +95,8 @@ build_gpus_variant (ControlData *data) - g_variant_new_strv ((const gchar * const *) card->env->pdata, card->env->len)); - g_variant_builder_add (&asv_builder, "{sv}", "Default", - g_variant_new_boolean (card->is_default)); -+ g_variant_builder_add (&asv_builder, "{sv}", "Discrete", -+ g_variant_new_boolean (card->is_discrete)); - - g_variant_builder_add (&builder, "a{sv}", &asv_builder); - } -@@ -312,6 +315,18 @@ get_card_is_default (GUdevDevice *d) - return g_udev_device_get_sysfs_attr_as_boolean (parent, "boot_vga"); - } - -+static gboolean -+get_card_is_discrete (GUdevDevice *d) -+{ -+ const char * const * tags; -+ g_autoptr (GUdevDevice) platform_device = NULL; -+ -+ tags = g_udev_device_get_tags (d); -+ if (tags && g_strv_contains (tags, "switcheroo-discrete-gpu")) -+ return TRUE; -+ return FALSE; -+} -+ - static CardData * - get_card_data (GUdevClient *client, - GUdevDevice *d) -@@ -328,6 +343,7 @@ get_card_data (GUdevClient *client, - data->name = get_card_name (d); - data->env = env; - data->is_default = get_card_is_default (d); -+ data->is_discrete = get_card_is_discrete (d); - - return data; - } --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0003-tests-fix-integration-tests-without-UMockdev.patch b/anda/apps/switcheroo-control/0003-tests-fix-integration-tests-without-UMockdev.patch deleted file mode 100644 index e8ee844d53..0000000000 --- a/anda/apps/switcheroo-control/0003-tests-fix-integration-tests-without-UMockdev.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 1b115ed72e03ff1169cbfddd79ef10890baca133 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Tue, 12 Sep 2023 15:53:40 +0200 -Subject: [PATCH 03/10] tests: fix integration tests without UMockdev - `gi.require_version` throws ValueError if the dependency cannot be found - -Signed-off-by: Jan200101 ---- - tests/integration-test.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/integration-test.py b/tests/integration-test.py -index d8dea16..e3dd996 100755 ---- a/tests/integration-test.py -+++ b/tests/integration-test.py -@@ -37,7 +37,7 @@ except ImportError as e: - try: - gi.require_version('UMockdev', '1.0') - from gi.repository import UMockdev --except ImportError: -+except (ImportError, ValueError): - sys.stderr.write('Skipping tests, umockdev not available (https://github.com/martinpitt/umockdev)\n') - sys.exit(0) - --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0004-tests-add-tests-for-discrete-detection-with-mock-lib.patch b/anda/apps/switcheroo-control/0004-tests-add-tests-for-discrete-detection-with-mock-lib.patch deleted file mode 100644 index 24915eba46..0000000000 --- a/anda/apps/switcheroo-control/0004-tests-add-tests-for-discrete-detection-with-mock-lib.patch +++ /dev/null @@ -1,278 +0,0 @@ -From d933e96bdb15679ae7653f929461982aa66973ba Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Tue, 12 Sep 2023 15:58:16 +0200 -Subject: [PATCH 04/10] tests: add tests for discrete detection with mock libs - Both tests have 4 different ways of testing: - Invalid Device - Unexpected - Device - Non Discrete GPU (iGPU/APU) - Discrete GPU - -Signed-off-by: Jan200101 ---- - src/discrete-detection/meson.build | 4 +- - tests/discrete-detection/libdrm_amdgpu_mock.c | 57 +++++++++++++ - .../discrete-detection/libdrm_nouveau_mock.c | 68 ++++++++++++++++ - tests/discrete-detection/meson.build | 80 +++++++++++++++++++ - tests/meson.build | 2 + - 5 files changed, 209 insertions(+), 2 deletions(-) - create mode 100644 tests/discrete-detection/libdrm_amdgpu_mock.c - create mode 100644 tests/discrete-detection/libdrm_nouveau_mock.c - create mode 100644 tests/discrete-detection/meson.build - -diff --git a/src/discrete-detection/meson.build b/src/discrete-detection/meson.build -index 3a6c03f..8eb8437 100644 ---- a/src/discrete-detection/meson.build -+++ b/src/discrete-detection/meson.build -@@ -1,6 +1,6 @@ - - if libdrm_amdgpu.found() -- executable('check-discrete-amdgpu', -+ amdgpu_discrete = executable('check-discrete-amdgpu', - files('amdgpu.c'), - dependencies: deps, - install: true, -@@ -9,7 +9,7 @@ if libdrm_amdgpu.found() - endif - - if libdrm.found() and libdrm_nouveau.found() -- executable('check-discrete-nouveau', -+ nouveau_discrete = executable('check-discrete-nouveau', - files('nouveau.c'), - dependencies: deps, - install: true, -diff --git a/tests/discrete-detection/libdrm_amdgpu_mock.c b/tests/discrete-detection/libdrm_amdgpu_mock.c -new file mode 100644 -index 0000000..20fa4aa ---- /dev/null -+++ b/tests/discrete-detection/libdrm_amdgpu_mock.c -@@ -0,0 +1,57 @@ -+#include -+#include -+#include -+ -+#include -+ -+enum { -+ OTHER_GPU, -+ AMD_APU, -+ AMD_GPU, -+}; -+ -+/* Mock open(2) so we can test multiple devices configurations */ -+int open(const char *pathname, int flags) -+{ -+ if (!strcmp(pathname, "OTHER_GPU")) -+ return OTHER_GPU; -+ if (!strcmp (pathname, "AMD_APU")) -+ return AMD_APU; -+ if (!strcmp (pathname, "AMD_GPU")) -+ return AMD_GPU; -+ -+ return -1; -+} -+ -+/* open64 may be used for large file support */ -+int open64(const char *pathname, int flags) -+{ -+ return open (pathname, flags); -+} -+ -+int amdgpu_device_initialize(int fd, uint32_t *major_version, uint32_t *minor_version, int *device_handle) -+{ -+ // Store the fd in the device handle for access in query_info -+ *device_handle = fd; -+ -+ if (fd != AMD_GPU && fd != AMD_APU) -+ return 1; -+ -+ return 0; -+} -+ -+int amdgpu_query_info(int device_handle, unsigned info_id, unsigned size, void *value) -+{ -+ struct drm_amdgpu_info_device* device_info = value; -+ -+ if (device_handle == AMD_GPU) { -+ device_info->ids_flags = 0; -+ return 0; -+ } -+ if (device_handle == AMD_APU) { -+ device_info->ids_flags = AMDGPU_IDS_FLAGS_FUSION; -+ return 0; -+ } -+ -+ return 1; -+} -diff --git a/tests/discrete-detection/libdrm_nouveau_mock.c b/tests/discrete-detection/libdrm_nouveau_mock.c -new file mode 100644 -index 0000000..cdbfda8 ---- /dev/null -+++ b/tests/discrete-detection/libdrm_nouveau_mock.c -@@ -0,0 +1,68 @@ -+#include -+#include -+#include -+ -+#include -+#include -+#include -+#include -+#include -+ -+enum { -+ OTHER_GPU, -+ NVIDIA_IGPU, -+ NVIDIA_GPU, -+}; -+ -+/* Mock open(2) so we can test multiple devices configurations */ -+int open(const char *pathname, int flags) -+{ -+ if (!strcmp(pathname, "OTHER_GPU")) -+ return OTHER_GPU; -+ if (!strcmp (pathname, "NVIDIA_IGPU")) -+ return NVIDIA_IGPU; -+ if (!strcmp (pathname, "NVIDIA_GPU")) -+ return NVIDIA_GPU; -+ -+ return -1; -+} -+ -+/* open64 may be used for large file support */ -+int open64(const char *pathname, int flags) -+{ -+ return open (pathname, flags); -+} -+ -+int drmCommandWrite(int fd, unsigned long drmCommandIndex, void *data, unsigned long size) -+{ -+ if (drmCommandIndex != DRM_NOUVEAU_NVIF) -+ return 1; -+ -+ if (fd != NVIDIA_GPU && fd != NVIDIA_IGPU) -+ return 1; -+ -+ return 0; -+} -+ -+int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, void *data, unsigned long size) -+{ -+ if (drmCommandIndex != DRM_NOUVEAU_NVIF) -+ return 1; -+ -+ struct { -+ struct nvif_ioctl_v0 ioctl; -+ struct nvif_ioctl_mthd_v0 mthd; -+ struct nv_device_info_v0 info; -+ } *args = data; -+ -+ if (fd == NVIDIA_GPU) { -+ args->info.platform = NV_DEVICE_INFO_V0_PCIE; -+ return 0; -+ } -+ if (fd == NVIDIA_IGPU) { -+ args->info.platform = NV_DEVICE_INFO_V0_IGP; -+ return 0; -+ } -+ -+ return 1; -+} -\ No newline at end of file -diff --git a/tests/discrete-detection/meson.build b/tests/discrete-detection/meson.build -new file mode 100644 -index 0000000..f01a014 ---- /dev/null -+++ b/tests/discrete-detection/meson.build -@@ -0,0 +1,80 @@ -+ -+if libdrm_amdgpu.found() -+ amdgpu_mock_lib = shared_library( -+ 'drm_amdgpu_mock', -+ files('libdrm_amdgpu_mock.c'), -+ dependencies: libdrm_amdgpu -+ ) -+ -+ test( -+ 'test amdgpu detection with invalid device', -+ amdgpu_discrete, -+ args: ['NO_GPU'], -+ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), -+ should_fail: true -+ ) -+ -+ test( -+ 'test amdgpu detection with non-AMD GPU', -+ amdgpu_discrete, -+ args: ['OTHER_GPU'], -+ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), -+ should_fail: true -+ ) -+ -+ test( -+ 'test amdgpu detection with AMD APU', -+ amdgpu_discrete, -+ args: ['AMD_APU'], -+ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), -+ should_fail: true -+ ) -+ -+ test( -+ 'test amdgpu detection with AMD GPU', -+ amdgpu_discrete, -+ args: ['AMD_GPU'], -+ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), -+ should_fail: false -+ ) -+endif -+ -+if libdrm.found() and libdrm_nouveau.found() -+ nouveau_mock_lib = shared_library( -+ 'drm_nouveau_mock', -+ files('libdrm_nouveau_mock.c'), -+ dependencies: [libdrm, libdrm_nouveau] -+ ) -+ -+ test( -+ 'test nouveau detection with invalid device', -+ nouveau_discrete, -+ args: ['NO_GPU'], -+ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), -+ should_fail: true -+ ) -+ -+ test( -+ 'test nouveau detection with non-Nvidia GPU', -+ nouveau_discrete, -+ args: ['OTHER_GPU'], -+ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), -+ should_fail: true -+ ) -+ -+ test( -+ 'test nouveau detection with Nvidia iGPU', -+ nouveau_discrete, -+ args: ['NVIDIA_IGPU'], -+ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), -+ should_fail: true -+ ) -+ -+ test( -+ 'test nouveau detection with Nvidia GPU', -+ nouveau_discrete, -+ args: ['NVIDIA_GPU'], -+ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), -+ should_fail: false -+ ) -+endif -\ No newline at end of file -diff --git a/tests/meson.build b/tests/meson.build -index b0b7476..61ef00c 100644 ---- a/tests/meson.build -+++ b/tests/meson.build -@@ -15,3 +15,5 @@ foreach ut: unit_tests - env: envs, - ) - endforeach -+ -+subdir('discrete-detection') --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0005-main-remove-leftover-and-fix-typo.patch b/anda/apps/switcheroo-control/0005-main-remove-leftover-and-fix-typo.patch deleted file mode 100644 index b10984fc67..0000000000 --- a/anda/apps/switcheroo-control/0005-main-remove-leftover-and-fix-typo.patch +++ /dev/null @@ -1,39 +0,0 @@ -From c102b643945dc076d881497dd2ca5865938f7053 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Tue, 12 Sep 2023 15:57:47 +0200 -Subject: [PATCH 05/10] main: remove leftover and fix typo - -Signed-off-by: Jan200101 ---- - meson_options.txt | 2 +- - src/switcheroo-control.c | 1 - - 2 files changed, 1 insertion(+), 2 deletions(-) - -diff --git a/meson_options.txt b/meson_options.txt -index b8d671a..c77fea8 100644 ---- a/meson_options.txt -+++ b/meson_options.txt -@@ -13,7 +13,7 @@ option('hwdbdir', - option('rulesdir', - type: 'string', - value: '', -- description: 'Directory for ruke files', -+ description: 'Directory for rule files', - ) - - option('gtk_doc', -diff --git a/src/switcheroo-control.c b/src/switcheroo-control.c -index e407bfb..0f6a548 100644 ---- a/src/switcheroo-control.c -+++ b/src/switcheroo-control.c -@@ -319,7 +319,6 @@ static gboolean - get_card_is_discrete (GUdevDevice *d) - { - const char * const * tags; -- g_autoptr (GUdevDevice) platform_device = NULL; - - tags = g_udev_device_get_tags (d); - if (tags && g_strv_contains (tags, "switcheroo-discrete-gpu")) --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0006-main-move-discrete-dependencies-out-of-main-deps.patch b/anda/apps/switcheroo-control/0006-main-move-discrete-dependencies-out-of-main-deps.patch deleted file mode 100644 index 18a0e42158..0000000000 --- a/anda/apps/switcheroo-control/0006-main-move-discrete-dependencies-out-of-main-deps.patch +++ /dev/null @@ -1,48 +0,0 @@ -From f764db4eb565c19ba14155791fbfced3fb5d34c8 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Tue, 12 Sep 2023 15:58:27 +0200 -Subject: [PATCH 06/10] main: move discrete dependencies out of main deps - -Signed-off-by: Jan200101 ---- - src/discrete-detection/meson.build | 5 +++-- - src/meson.build | 2 +- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/discrete-detection/meson.build b/src/discrete-detection/meson.build -index 8eb8437..353316f 100644 ---- a/src/discrete-detection/meson.build -+++ b/src/discrete-detection/meson.build -@@ -1,8 +1,9 @@ -+discrete_deps = deps + [libdrm, libdrm_nouveau, libdrm_amdgpu] - - if libdrm_amdgpu.found() - amdgpu_discrete = executable('check-discrete-amdgpu', - files('amdgpu.c'), -- dependencies: deps, -+ dependencies: discrete_deps, - install: true, - install_dir: libexecdir, - ) -@@ -11,7 +12,7 @@ endif - if libdrm.found() and libdrm_nouveau.found() - nouveau_discrete = executable('check-discrete-nouveau', - files('nouveau.c'), -- dependencies: deps, -+ dependencies: discrete_deps, - install: true, - install_dir: libexecdir, - ) -diff --git a/src/meson.build b/src/meson.build -index da4267f..22d69e7 100644 ---- a/src/meson.build -+++ b/src/meson.build -@@ -1,4 +1,4 @@ --deps = [glib, gio, gudev, libdrm, libdrm_nouveau, libdrm_amdgpu] -+deps = [glib, gio, gudev] - - sources = [ - 'info-cleanup.c', --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0007-main-use-glib-for-discrete-command-line-arguments.patch b/anda/apps/switcheroo-control/0007-main-use-glib-for-discrete-command-line-arguments.patch deleted file mode 100644 index 524930709f..0000000000 --- a/anda/apps/switcheroo-control/0007-main-use-glib-for-discrete-command-line-arguments.patch +++ /dev/null @@ -1,137 +0,0 @@ -From d2ecc29469d5572fd171926c9d1dbb1b851c7b09 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Tue, 12 Sep 2023 17:12:00 +0200 -Subject: [PATCH 07/10] main: use glib for discrete command-line arguments - -Signed-off-by: Jan200101 ---- - src/discrete-detection/amdgpu.c | 29 ++++++++++++++++++++--------- - src/discrete-detection/nouveau.c | 29 ++++++++++++++++++++--------- - 2 files changed, 40 insertions(+), 18 deletions(-) - -diff --git a/src/discrete-detection/amdgpu.c b/src/discrete-detection/amdgpu.c -index 2d9804f..5a9a4ab 100644 ---- a/src/discrete-detection/amdgpu.c -+++ b/src/discrete-detection/amdgpu.c -@@ -1,9 +1,10 @@ -- - #include - #include - #include -+#include - #include - #include -+#include - - #include - #include -@@ -12,22 +13,32 @@ typedef int handle; - G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) - G_DEFINE_AUTOPTR_CLEANUP_FUNC(amdgpu_device_handle, free); - --int main(int argc, char** argv) -+int main (int argc, char** argv) - { -- if (argc < 2) -- { -- puts ("check-discrete-amdgpu [DEVNAME]"); -- return EXIT_FAILURE; -- } -- - const char *devname; - g_auto(handle) fd = -1; -- g_autoptr(GUdevDevice) parent = NULL; - struct drm_amdgpu_info_device device_info = {0}; - amdgpu_device_handle device = NULL; - uint32_t drm_major, drm_minor; -+ g_autoptr(GOptionContext) option_context = NULL; -+ g_autoptr(GError) error = NULL; - -+ setlocale (LC_ALL, ""); -+ option_context = g_option_context_new (""); -+ -+ if (!g_option_context_parse (option_context, &argc, &argv, &error)) { -+ g_print ("Failed to parse arguments: %s\n", error->message); -+ return EXIT_FAILURE; -+ } -+ -+ if (argc < 2) -+ { -+ g_print ("%s\n", g_option_context_get_help (option_context, TRUE, NULL)); -+ return EXIT_FAILURE; -+ } - devname = argv[1]; -+; -+ - fd = open (devname, O_RDWR); - if (fd < 0) - return EXIT_FAILURE; -diff --git a/src/discrete-detection/nouveau.c b/src/discrete-detection/nouveau.c -index 0a1f220..1d61cbb 100644 ---- a/src/discrete-detection/nouveau.c -+++ b/src/discrete-detection/nouveau.c -@@ -1,9 +1,10 @@ -- - #include - #include - #include -+#include - #include - #include -+#include - - #include - #include -@@ -14,23 +15,34 @@ - typedef int handle; - G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) - --int main(int argc, char** argv) -+int main (int argc, char** argv) - { -+ const gchar *devname = NULL; -+ g_auto(handle) fd = -1; -+ g_autofree void *device = NULL; -+ g_autoptr(GOptionContext) option_context = NULL; -+ g_autoptr(GError) error = NULL; -+ -+ setlocale (LC_ALL, ""); -+ option_context = g_option_context_new (""); -+ -+ if (!g_option_context_parse (option_context, &argc, &argv, &error)) { -+ g_print ("Failed to parse arguments: %s\n", error->message); -+ return EXIT_FAILURE; -+ } -+ - if (argc < 2) - { -- puts ("check-discrete-nouveau [DEVNAME]"); -+ g_print ("%s\n", g_option_context_get_help (option_context, TRUE, NULL)); - return EXIT_FAILURE; - } -- -- const char *devname; -- g_auto(handle) fd = -1; -- - devname = argv[1]; -+ - fd = open (devname, O_RDWR); - if (fd < 0) - return EXIT_FAILURE; - -- g_autofree void *device = malloc(352); -+ device = malloc(352); - - /* Init device */ - { -@@ -88,7 +100,6 @@ int main(int argc, char** argv) - if (drmCommandWriteRead (fd, DRM_NOUVEAU_NVIF, &args, sizeof(args))) - return EXIT_FAILURE; - -- - switch (args.info.platform) - { - case NV_DEVICE_INFO_V0_IGP: --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0008-main-add-udev-rule-for-i915.patch b/anda/apps/switcheroo-control/0008-main-add-udev-rule-for-i915.patch deleted file mode 100644 index b7a684a1c6..0000000000 --- a/anda/apps/switcheroo-control/0008-main-add-udev-rule-for-i915.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 462b09f02de37dfd2965d23cc7c4137bcf45a4ae Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Wed, 14 Feb 2024 20:25:42 +0100 -Subject: [PATCH 08/10] main: add udev rule for i915 checking a lot of systems - has shown that the intel iGPU will always be available at `0000:00:02.0`. - Using ID_PATH would have been cleaner, but I couldn't get it to work. - -Signed-off-by: Jan200101 ---- - data/30-discrete-gpu.rules.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/data/30-discrete-gpu.rules.in b/data/30-discrete-gpu.rules.in -index a803ed4..f30f315 100644 ---- a/data/30-discrete-gpu.rules.in -+++ b/data/30-discrete-gpu.rules.in -@@ -1,3 +1,4 @@ - DRIVERS=="amdgpu", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-amdgpu $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" - DRIVERS=="nouveau", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-nouveau $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" --DRIVERS=="nvidia", TAG+="switcheroo-discrete-gpu" -+DRIVERS=="nvidia", SUBSYSTEM=="drm", TAG+="switcheroo-discrete-gpu" -+DRIVERS=="i915", SUBSYSTEM=="drm", DEVPATH!="/devices/pci0000:00/0000:00:02.0/drm/*", TAG+="switcheroo-discrete-gpu" --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0009-main-use-Discrete-key-in-switcherooctl.patch b/anda/apps/switcheroo-control/0009-main-use-Discrete-key-in-switcherooctl.patch deleted file mode 100644 index abb8fdf525..0000000000 --- a/anda/apps/switcheroo-control/0009-main-use-Discrete-key-in-switcherooctl.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 55db3aeaeb962952881f73e94432f750cfb64fc8 Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Thu, 15 Feb 2024 16:24:00 +0100 -Subject: [PATCH 09/10] main: use Discrete key in switcherooctl - -Signed-off-by: Jan200101 ---- - src/switcherooctl.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/switcherooctl.in b/src/switcherooctl.in -index 96c21cc..c0e3f07 100755 ---- a/src/switcherooctl.in -+++ b/src/switcherooctl.in -@@ -77,6 +77,7 @@ def print_gpu(gpu, index): - print('Device:', index) - print(' Name: ', gpu['Name']) - print(' Default: ', "yes" if gpu['Default'] else "no") -+ print(' Discrete: ', "yes" if gpu['Discrete'] else "no") - print(' Environment:', env_to_str(gpu['Environment'])) - - def _list(): -@@ -126,7 +127,7 @@ def get_discrete_gpu(): - return None - - try: -- gpu = next(gpu for gpu in gpus if not gpu['Default']) -+ gpu = next(gpu for gpu in gpus if gpu['Discrete']) - except StopIteration: - return None - else: --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/0010-main-use-new-GPU-list-on-uevent.patch b/anda/apps/switcheroo-control/0010-main-use-new-GPU-list-on-uevent.patch deleted file mode 100644 index 9f55d398e7..0000000000 --- a/anda/apps/switcheroo-control/0010-main-use-new-GPU-list-on-uevent.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 4232c75fe41158bb5063d630d36b3ffd6a8a57ec Mon Sep 17 00:00:00 2001 -From: Jan200101 -Date: Fri, 6 Sep 2024 22:31:56 +0200 -Subject: [PATCH 10/10] main: use new GPU list on uevent the amount of GPUs may - still be the same but underlying attributes may have changed On the ASUS TUF - Dash F15 running Fedora 40 6.10.7-200.fc40.x86_64 the udev tags are not - applied at the time switcheroo-control starts but at a later uevent they are - correct. Memory gets allocated anyways to check if the GPU count has changed, - so this shouldn't affect memory usage. - -Signed-off-by: Jan200101 ---- - src/switcheroo-control.c | 16 ++++++---------- - 1 file changed, 6 insertions(+), 10 deletions(-) - -diff --git a/src/switcheroo-control.c b/src/switcheroo-control.c -index 0f6a548..01954c7 100644 ---- a/src/switcheroo-control.c -+++ b/src/switcheroo-control.c -@@ -438,16 +438,12 @@ uevent_cb (GUdevClient *client, - - cards = get_drm_cards (data); - num_gpus = cards->len; -- if (num_gpus != data->num_gpus) { -- g_debug ("GPUs added or removed (old: %d new: %d)", -- data->num_gpus, num_gpus); -- g_ptr_array_free (data->cards, TRUE); -- data->cards = cards; -- data->num_gpus = cards->len; -- send_dbus_event (data); -- } else { -- g_ptr_array_free (cards, TRUE); -- } -+ g_debug ("GPUs updated (old: %d new: %d)", -+ data->num_gpus, num_gpus); -+ g_ptr_array_free (data->cards, TRUE); -+ data->cards = cards; -+ data->num_gpus = cards->len; -+ send_dbus_event (data); - } - - static void --- -2.46.0 - diff --git a/anda/apps/switcheroo-control/discrete.patch b/anda/apps/switcheroo-control/discrete.patch new file mode 100644 index 0000000000..bc3e696e90 --- /dev/null +++ b/anda/apps/switcheroo-control/discrete.patch @@ -0,0 +1,1335 @@ +From 44046bfbcb30a19c45416113a2a82a4d17a1a998 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 14 Aug 2023 14:06:45 +0200 +Subject: [PATCH 01/13] main: update GPUs comment for dbus property + +Signed-off-by: Jan200101 +--- + src/net.hadess.SwitcherooControl.xml | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/net.hadess.SwitcherooControl.xml b/src/net.hadess.SwitcherooControl.xml +index e52bc1a..59a8896 100644 +--- a/src/net.hadess.SwitcherooControl.xml ++++ b/src/net.hadess.SwitcherooControl.xml +@@ -38,7 +38,8 @@ + will contain a user-facing name for the GPU, the "Environment" (as) key will + contain an array of even number of strings, each being an environment + variable to set to use the GPU, followed by its value, the "Default" (b) key +- will tag the default (usually integrated) GPU. ++ will tag the default GPU, the "Discrete" (b) key tags if the GPU is a ++ dedicated component. + --> + + +-- +2.49.0 + + +From 4f31415cb61a50c2bcba1510a7511518417d0970 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 11 Sep 2023 15:21:46 +0200 +Subject: [PATCH 02/13] main: add Discrete key + +Signed-off-by: Jan200101 +--- + .gitlab-ci.yml | 1 + + data/30-discrete-gpu.rules.in | 3 + + data/meson.build | 7 ++ + meson.build | 9 +++ + meson_options.txt | 24 +++++++ + src/discrete-detection/amdgpu.c | 46 +++++++++++++ + src/discrete-detection/meson.build | 18 +++++ + src/discrete-detection/nouveau.c | 105 +++++++++++++++++++++++++++++ + src/meson.build | 4 +- + src/switcheroo-control.c | 16 +++++ + 10 files changed, 232 insertions(+), 1 deletion(-) + create mode 100644 data/30-discrete-gpu.rules.in + create mode 100644 src/discrete-detection/amdgpu.c + create mode 100644 src/discrete-detection/meson.build + create mode 100644 src/discrete-detection/nouveau.c + +diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml +index a6aa3c7..a09fe20 100644 +--- a/.gitlab-ci.yml ++++ b/.gitlab-ci.yml +@@ -3,6 +3,7 @@ image: fedora:rawhide + variables: + DEPENDENCIES: glib2-devel + libgudev-devel ++ libdrm-devel + gtk-doc + gcc + gcc-c++ +diff --git a/data/30-discrete-gpu.rules.in b/data/30-discrete-gpu.rules.in +new file mode 100644 +index 0000000..a803ed4 +--- /dev/null ++++ b/data/30-discrete-gpu.rules.in +@@ -0,0 +1,3 @@ ++DRIVERS=="amdgpu", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-amdgpu $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" ++DRIVERS=="nouveau", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-nouveau $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" ++DRIVERS=="nvidia", TAG+="switcheroo-discrete-gpu" +diff --git a/data/meson.build b/data/meson.build +index 85e5c93..38cf96c 100644 +--- a/data/meson.build ++++ b/data/meson.build +@@ -17,3 +17,10 @@ install_data( + '30-pci-intel-gpu.hwdb', + install_dir: hwdb_dir, + ) ++ ++configure_file( ++ input: '30-discrete-gpu.rules.in', ++ output: '30-discrete-gpu.rules', ++ configuration: data_conf, ++ install_dir: rules_dir, ++) +diff --git a/meson.build b/meson.build +index b8f4bff..b3aaf0c 100644 +--- a/meson.build ++++ b/meson.build +@@ -20,6 +20,9 @@ gnome = import('gnome') + glib = dependency('glib-2.0', version: '>= 2.56.0') + gio = dependency('gio-2.0', version: '>= 2.56.0') + gudev = dependency('gudev-1.0', version: '>= 232') ++libdrm = dependency('libdrm', version: '>= 2.4.97', required: get_option('libdrm')) ++libdrm_nouveau = dependency('libdrm_nouveau', version: '>= 2.4.97', required: get_option('libdrm_nouveau')) ++libdrm_amdgpu = dependency('libdrm_amdgpu', version: '>= 2.4.97', required: get_option('libdrm_amdgpu')) + + systemd_systemunitdir = get_option('systemdsystemunitdir') + if systemd_systemunitdir == '' +@@ -32,6 +35,12 @@ if hwdb_dir == '' + hwdb_dir = udevdir / 'hwdb.d' + endif + ++rules_dir = get_option('rulesdir') ++if rules_dir == '' ++ udevdir = dependency('udev').get_pkgconfig_variable('udevdir') ++ rules_dir = udevdir / 'rules.d' ++endif ++ + # Make like license available in the build root for docs + configure_file( + input: 'COPYING', +diff --git a/meson_options.txt b/meson_options.txt +index c8d9619..b8d671a 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -10,6 +10,12 @@ option('hwdbdir', + description: 'Directory for hwdb files', + ) + ++option('rulesdir', ++ type: 'string', ++ value: '', ++ description: 'Directory for ruke files', ++) ++ + option('gtk_doc', + type: 'boolean', + value: false, +@@ -21,3 +27,21 @@ option('tests', + type: 'boolean', + value: false + ) ++ ++option('libdrm', ++ description: 'Whether libdrm should be used to probe GPUs', ++ type: 'feature', ++ value: 'auto' ++) ++ ++option('libdrm_nouveau', ++ description: 'Whether libdrm_nouveau should be used to probe Nvidia GPUs', ++ type: 'feature', ++ value: 'auto' ++) ++ ++option('libdrm_amdgpu', ++ description: 'Whether libdrm_amdgpu should be used to probe AMD GPUs', ++ type: 'feature', ++ value: 'auto' ++) +diff --git a/src/discrete-detection/amdgpu.c b/src/discrete-detection/amdgpu.c +new file mode 100644 +index 0000000..2d9804f +--- /dev/null ++++ b/src/discrete-detection/amdgpu.c +@@ -0,0 +1,46 @@ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++typedef int handle; ++G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) ++G_DEFINE_AUTOPTR_CLEANUP_FUNC(amdgpu_device_handle, free); ++ ++int main(int argc, char** argv) ++{ ++ if (argc < 2) ++ { ++ puts ("check-discrete-amdgpu [DEVNAME]"); ++ return EXIT_FAILURE; ++ } ++ ++ const char *devname; ++ g_auto(handle) fd = -1; ++ g_autoptr(GUdevDevice) parent = NULL; ++ struct drm_amdgpu_info_device device_info = {0}; ++ amdgpu_device_handle device = NULL; ++ uint32_t drm_major, drm_minor; ++ ++ devname = argv[1]; ++ fd = open (devname, O_RDWR); ++ if (fd < 0) ++ return EXIT_FAILURE; ++ ++ if (amdgpu_device_initialize (fd, &drm_major, &drm_minor, &device)) ++ return EXIT_FAILURE; ++ ++ if (amdgpu_query_info (device, AMDGPU_INFO_DEV_INFO, sizeof(device_info), &device_info)) ++ return EXIT_FAILURE; ++ ++ /* AMDGPU_IDS_FLAGS_FUSION is set for all APUs */ ++ if (device_info.ids_flags & AMDGPU_IDS_FLAGS_FUSION) ++ return EXIT_FAILURE; ++ ++ return EXIT_SUCCESS; ++} +diff --git a/src/discrete-detection/meson.build b/src/discrete-detection/meson.build +new file mode 100644 +index 0000000..3a6c03f +--- /dev/null ++++ b/src/discrete-detection/meson.build +@@ -0,0 +1,18 @@ ++ ++if libdrm_amdgpu.found() ++ executable('check-discrete-amdgpu', ++ files('amdgpu.c'), ++ dependencies: deps, ++ install: true, ++ install_dir: libexecdir, ++ ) ++endif ++ ++if libdrm.found() and libdrm_nouveau.found() ++ executable('check-discrete-nouveau', ++ files('nouveau.c'), ++ dependencies: deps, ++ install: true, ++ install_dir: libexecdir, ++ ) ++endif +diff --git a/src/discrete-detection/nouveau.c b/src/discrete-detection/nouveau.c +new file mode 100644 +index 0000000..0a1f220 +--- /dev/null ++++ b/src/discrete-detection/nouveau.c +@@ -0,0 +1,105 @@ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++typedef int handle; ++G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) ++ ++int main(int argc, char** argv) ++{ ++ if (argc < 2) ++ { ++ puts ("check-discrete-nouveau [DEVNAME]"); ++ return EXIT_FAILURE; ++ } ++ ++ const char *devname; ++ g_auto(handle) fd = -1; ++ ++ devname = argv[1]; ++ fd = open (devname, O_RDWR); ++ if (fd < 0) ++ return EXIT_FAILURE; ++ ++ g_autofree void *device = malloc(352); ++ ++ /* Init device */ ++ { ++ struct { ++ struct nvif_ioctl_v0 ioctl; ++ struct nvif_ioctl_new_v0 new; ++ struct nv_device_v0 dev; ++ } init_args = { ++ .ioctl = { ++ .object = 0, ++ .owner = NVIF_IOCTL_V0_OWNER_ANY, ++ .route = 0x00, ++ .type = NVIF_IOCTL_V0_NEW, ++ .version = 0, ++ }, ++ .new = { ++ .handle = 0, ++ .object = (uintptr_t)device, ++ .oclass = NV_DEVICE, ++ .route = NVIF_IOCTL_V0_ROUTE_NVIF, ++ .token = (uintptr_t)device, ++ .version = 0, ++ }, ++ .dev = { ++ .device = ~0ULL, ++ }, ++ }; ++ ++ if (drmCommandWrite (fd, DRM_NOUVEAU_NVIF, &init_args, sizeof(init_args))) ++ return EXIT_FAILURE; ++ } ++ ++ /* Query device info */ ++ struct { ++ struct nvif_ioctl_v0 ioctl; ++ struct nvif_ioctl_mthd_v0 mthd; ++ struct nv_device_info_v0 info; ++ } args = { ++ .ioctl = { ++ .object = (uintptr_t)device, ++ .owner = NVIF_IOCTL_V0_OWNER_ANY, ++ .route = 0x00, ++ .type = NVIF_IOCTL_V0_MTHD, ++ .version = 0, ++ }, ++ .mthd = { ++ .method = NV_DEVICE_V0_INFO, ++ .version = 0, ++ }, ++ .info = { ++ .version = 0, ++ }, ++ }; ++ ++ if (drmCommandWriteRead (fd, DRM_NOUVEAU_NVIF, &args, sizeof(args))) ++ return EXIT_FAILURE; ++ ++ ++ switch (args.info.platform) ++ { ++ case NV_DEVICE_INFO_V0_IGP: ++ case NV_DEVICE_INFO_V0_SOC: ++ return EXIT_FAILURE; ++ ++ case NV_DEVICE_INFO_V0_PCI: ++ case NV_DEVICE_INFO_V0_AGP: ++ case NV_DEVICE_INFO_V0_PCIE: ++ default: ++ return EXIT_SUCCESS; ++ } ++ return EXIT_FAILURE; ++} +diff --git a/src/meson.build b/src/meson.build +index ab3a77d..da4267f 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -1,4 +1,4 @@ +-deps = [glib, gio, gudev] ++deps = [glib, gio, gudev, libdrm, libdrm_nouveau, libdrm_amdgpu] + + sources = [ + 'info-cleanup.c', +@@ -34,3 +34,5 @@ configure_file( + configuration: switcherooctl_conf, + install_dir: get_option('bindir') + ) ++ ++subdir('discrete-detection') +diff --git a/src/switcheroo-control.c b/src/switcheroo-control.c +index abd8154..e407bfb 100644 +--- a/src/switcheroo-control.c ++++ b/src/switcheroo-control.c +@@ -31,6 +31,7 @@ typedef struct { + char *name; + GPtrArray *env; + gboolean is_default; ++ gboolean is_discrete; + } CardData; + + typedef struct { +@@ -94,6 +95,8 @@ build_gpus_variant (ControlData *data) + g_variant_new_strv ((const gchar * const *) card->env->pdata, card->env->len)); + g_variant_builder_add (&asv_builder, "{sv}", "Default", + g_variant_new_boolean (card->is_default)); ++ g_variant_builder_add (&asv_builder, "{sv}", "Discrete", ++ g_variant_new_boolean (card->is_discrete)); + + g_variant_builder_add (&builder, "a{sv}", &asv_builder); + } +@@ -312,6 +315,18 @@ get_card_is_default (GUdevDevice *d) + return g_udev_device_get_sysfs_attr_as_boolean (parent, "boot_vga"); + } + ++static gboolean ++get_card_is_discrete (GUdevDevice *d) ++{ ++ const char * const * tags; ++ g_autoptr (GUdevDevice) platform_device = NULL; ++ ++ tags = g_udev_device_get_tags (d); ++ if (tags && g_strv_contains (tags, "switcheroo-discrete-gpu")) ++ return TRUE; ++ return FALSE; ++} ++ + static CardData * + get_card_data (GUdevClient *client, + GUdevDevice *d) +@@ -328,6 +343,7 @@ get_card_data (GUdevClient *client, + data->name = get_card_name (d); + data->env = env; + data->is_default = get_card_is_default (d); ++ data->is_discrete = get_card_is_discrete (d); + + return data; + } +-- +2.49.0 + + +From 1b115ed72e03ff1169cbfddd79ef10890baca133 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Tue, 12 Sep 2023 15:53:40 +0200 +Subject: [PATCH 03/13] tests: fix integration tests without UMockdev + `gi.require_version` throws ValueError if the dependency cannot be found + +Signed-off-by: Jan200101 +--- + tests/integration-test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/integration-test.py b/tests/integration-test.py +index d8dea16..e3dd996 100755 +--- a/tests/integration-test.py ++++ b/tests/integration-test.py +@@ -37,7 +37,7 @@ except ImportError as e: + try: + gi.require_version('UMockdev', '1.0') + from gi.repository import UMockdev +-except ImportError: ++except (ImportError, ValueError): + sys.stderr.write('Skipping tests, umockdev not available (https://github.com/martinpitt/umockdev)\n') + sys.exit(0) + +-- +2.49.0 + + +From d933e96bdb15679ae7653f929461982aa66973ba Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Tue, 12 Sep 2023 15:58:16 +0200 +Subject: [PATCH 04/13] tests: add tests for discrete detection with mock libs + Both tests have 4 different ways of testing: - Invalid Device - Unexpected + Device - Non Discrete GPU (iGPU/APU) - Discrete GPU + +Signed-off-by: Jan200101 +--- + src/discrete-detection/meson.build | 4 +- + tests/discrete-detection/libdrm_amdgpu_mock.c | 57 +++++++++++++ + .../discrete-detection/libdrm_nouveau_mock.c | 68 ++++++++++++++++ + tests/discrete-detection/meson.build | 80 +++++++++++++++++++ + tests/meson.build | 2 + + 5 files changed, 209 insertions(+), 2 deletions(-) + create mode 100644 tests/discrete-detection/libdrm_amdgpu_mock.c + create mode 100644 tests/discrete-detection/libdrm_nouveau_mock.c + create mode 100644 tests/discrete-detection/meson.build + +diff --git a/src/discrete-detection/meson.build b/src/discrete-detection/meson.build +index 3a6c03f..8eb8437 100644 +--- a/src/discrete-detection/meson.build ++++ b/src/discrete-detection/meson.build +@@ -1,6 +1,6 @@ + + if libdrm_amdgpu.found() +- executable('check-discrete-amdgpu', ++ amdgpu_discrete = executable('check-discrete-amdgpu', + files('amdgpu.c'), + dependencies: deps, + install: true, +@@ -9,7 +9,7 @@ if libdrm_amdgpu.found() + endif + + if libdrm.found() and libdrm_nouveau.found() +- executable('check-discrete-nouveau', ++ nouveau_discrete = executable('check-discrete-nouveau', + files('nouveau.c'), + dependencies: deps, + install: true, +diff --git a/tests/discrete-detection/libdrm_amdgpu_mock.c b/tests/discrete-detection/libdrm_amdgpu_mock.c +new file mode 100644 +index 0000000..20fa4aa +--- /dev/null ++++ b/tests/discrete-detection/libdrm_amdgpu_mock.c +@@ -0,0 +1,57 @@ ++#include ++#include ++#include ++ ++#include ++ ++enum { ++ OTHER_GPU, ++ AMD_APU, ++ AMD_GPU, ++}; ++ ++/* Mock open(2) so we can test multiple devices configurations */ ++int open(const char *pathname, int flags) ++{ ++ if (!strcmp(pathname, "OTHER_GPU")) ++ return OTHER_GPU; ++ if (!strcmp (pathname, "AMD_APU")) ++ return AMD_APU; ++ if (!strcmp (pathname, "AMD_GPU")) ++ return AMD_GPU; ++ ++ return -1; ++} ++ ++/* open64 may be used for large file support */ ++int open64(const char *pathname, int flags) ++{ ++ return open (pathname, flags); ++} ++ ++int amdgpu_device_initialize(int fd, uint32_t *major_version, uint32_t *minor_version, int *device_handle) ++{ ++ // Store the fd in the device handle for access in query_info ++ *device_handle = fd; ++ ++ if (fd != AMD_GPU && fd != AMD_APU) ++ return 1; ++ ++ return 0; ++} ++ ++int amdgpu_query_info(int device_handle, unsigned info_id, unsigned size, void *value) ++{ ++ struct drm_amdgpu_info_device* device_info = value; ++ ++ if (device_handle == AMD_GPU) { ++ device_info->ids_flags = 0; ++ return 0; ++ } ++ if (device_handle == AMD_APU) { ++ device_info->ids_flags = AMDGPU_IDS_FLAGS_FUSION; ++ return 0; ++ } ++ ++ return 1; ++} +diff --git a/tests/discrete-detection/libdrm_nouveau_mock.c b/tests/discrete-detection/libdrm_nouveau_mock.c +new file mode 100644 +index 0000000..cdbfda8 +--- /dev/null ++++ b/tests/discrete-detection/libdrm_nouveau_mock.c +@@ -0,0 +1,68 @@ ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++enum { ++ OTHER_GPU, ++ NVIDIA_IGPU, ++ NVIDIA_GPU, ++}; ++ ++/* Mock open(2) so we can test multiple devices configurations */ ++int open(const char *pathname, int flags) ++{ ++ if (!strcmp(pathname, "OTHER_GPU")) ++ return OTHER_GPU; ++ if (!strcmp (pathname, "NVIDIA_IGPU")) ++ return NVIDIA_IGPU; ++ if (!strcmp (pathname, "NVIDIA_GPU")) ++ return NVIDIA_GPU; ++ ++ return -1; ++} ++ ++/* open64 may be used for large file support */ ++int open64(const char *pathname, int flags) ++{ ++ return open (pathname, flags); ++} ++ ++int drmCommandWrite(int fd, unsigned long drmCommandIndex, void *data, unsigned long size) ++{ ++ if (drmCommandIndex != DRM_NOUVEAU_NVIF) ++ return 1; ++ ++ if (fd != NVIDIA_GPU && fd != NVIDIA_IGPU) ++ return 1; ++ ++ return 0; ++} ++ ++int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, void *data, unsigned long size) ++{ ++ if (drmCommandIndex != DRM_NOUVEAU_NVIF) ++ return 1; ++ ++ struct { ++ struct nvif_ioctl_v0 ioctl; ++ struct nvif_ioctl_mthd_v0 mthd; ++ struct nv_device_info_v0 info; ++ } *args = data; ++ ++ if (fd == NVIDIA_GPU) { ++ args->info.platform = NV_DEVICE_INFO_V0_PCIE; ++ return 0; ++ } ++ if (fd == NVIDIA_IGPU) { ++ args->info.platform = NV_DEVICE_INFO_V0_IGP; ++ return 0; ++ } ++ ++ return 1; ++} +\ No newline at end of file +diff --git a/tests/discrete-detection/meson.build b/tests/discrete-detection/meson.build +new file mode 100644 +index 0000000..f01a014 +--- /dev/null ++++ b/tests/discrete-detection/meson.build +@@ -0,0 +1,80 @@ ++ ++if libdrm_amdgpu.found() ++ amdgpu_mock_lib = shared_library( ++ 'drm_amdgpu_mock', ++ files('libdrm_amdgpu_mock.c'), ++ dependencies: libdrm_amdgpu ++ ) ++ ++ test( ++ 'test amdgpu detection with invalid device', ++ amdgpu_discrete, ++ args: ['NO_GPU'], ++ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test amdgpu detection with non-AMD GPU', ++ amdgpu_discrete, ++ args: ['OTHER_GPU'], ++ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test amdgpu detection with AMD APU', ++ amdgpu_discrete, ++ args: ['AMD_APU'], ++ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test amdgpu detection with AMD GPU', ++ amdgpu_discrete, ++ args: ['AMD_GPU'], ++ env: environment({'LD_PRELOAD': amdgpu_mock_lib.full_path()}), ++ should_fail: false ++ ) ++endif ++ ++if libdrm.found() and libdrm_nouveau.found() ++ nouveau_mock_lib = shared_library( ++ 'drm_nouveau_mock', ++ files('libdrm_nouveau_mock.c'), ++ dependencies: [libdrm, libdrm_nouveau] ++ ) ++ ++ test( ++ 'test nouveau detection with invalid device', ++ nouveau_discrete, ++ args: ['NO_GPU'], ++ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test nouveau detection with non-Nvidia GPU', ++ nouveau_discrete, ++ args: ['OTHER_GPU'], ++ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test nouveau detection with Nvidia iGPU', ++ nouveau_discrete, ++ args: ['NVIDIA_IGPU'], ++ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test nouveau detection with Nvidia GPU', ++ nouveau_discrete, ++ args: ['NVIDIA_GPU'], ++ env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), ++ should_fail: false ++ ) ++endif +\ No newline at end of file +diff --git a/tests/meson.build b/tests/meson.build +index b0b7476..61ef00c 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -15,3 +15,5 @@ foreach ut: unit_tests + env: envs, + ) + endforeach ++ ++subdir('discrete-detection') +-- +2.49.0 + + +From c102b643945dc076d881497dd2ca5865938f7053 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Tue, 12 Sep 2023 15:57:47 +0200 +Subject: [PATCH 05/13] main: remove leftover and fix typo + +Signed-off-by: Jan200101 +--- + meson_options.txt | 2 +- + src/switcheroo-control.c | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/meson_options.txt b/meson_options.txt +index b8d671a..c77fea8 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -13,7 +13,7 @@ option('hwdbdir', + option('rulesdir', + type: 'string', + value: '', +- description: 'Directory for ruke files', ++ description: 'Directory for rule files', + ) + + option('gtk_doc', +diff --git a/src/switcheroo-control.c b/src/switcheroo-control.c +index e407bfb..0f6a548 100644 +--- a/src/switcheroo-control.c ++++ b/src/switcheroo-control.c +@@ -319,7 +319,6 @@ static gboolean + get_card_is_discrete (GUdevDevice *d) + { + const char * const * tags; +- g_autoptr (GUdevDevice) platform_device = NULL; + + tags = g_udev_device_get_tags (d); + if (tags && g_strv_contains (tags, "switcheroo-discrete-gpu")) +-- +2.49.0 + + +From f764db4eb565c19ba14155791fbfced3fb5d34c8 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Tue, 12 Sep 2023 15:58:27 +0200 +Subject: [PATCH 06/13] main: move discrete dependencies out of main deps + +Signed-off-by: Jan200101 +--- + src/discrete-detection/meson.build | 5 +++-- + src/meson.build | 2 +- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/discrete-detection/meson.build b/src/discrete-detection/meson.build +index 8eb8437..353316f 100644 +--- a/src/discrete-detection/meson.build ++++ b/src/discrete-detection/meson.build +@@ -1,8 +1,9 @@ ++discrete_deps = deps + [libdrm, libdrm_nouveau, libdrm_amdgpu] + + if libdrm_amdgpu.found() + amdgpu_discrete = executable('check-discrete-amdgpu', + files('amdgpu.c'), +- dependencies: deps, ++ dependencies: discrete_deps, + install: true, + install_dir: libexecdir, + ) +@@ -11,7 +12,7 @@ endif + if libdrm.found() and libdrm_nouveau.found() + nouveau_discrete = executable('check-discrete-nouveau', + files('nouveau.c'), +- dependencies: deps, ++ dependencies: discrete_deps, + install: true, + install_dir: libexecdir, + ) +diff --git a/src/meson.build b/src/meson.build +index da4267f..22d69e7 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -1,4 +1,4 @@ +-deps = [glib, gio, gudev, libdrm, libdrm_nouveau, libdrm_amdgpu] ++deps = [glib, gio, gudev] + + sources = [ + 'info-cleanup.c', +-- +2.49.0 + + +From d2ecc29469d5572fd171926c9d1dbb1b851c7b09 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Tue, 12 Sep 2023 17:12:00 +0200 +Subject: [PATCH 07/13] main: use glib for discrete command-line arguments + +Signed-off-by: Jan200101 +--- + src/discrete-detection/amdgpu.c | 29 ++++++++++++++++++++--------- + src/discrete-detection/nouveau.c | 29 ++++++++++++++++++++--------- + 2 files changed, 40 insertions(+), 18 deletions(-) + +diff --git a/src/discrete-detection/amdgpu.c b/src/discrete-detection/amdgpu.c +index 2d9804f..5a9a4ab 100644 +--- a/src/discrete-detection/amdgpu.c ++++ b/src/discrete-detection/amdgpu.c +@@ -1,9 +1,10 @@ +- + #include + #include + #include ++#include + #include + #include ++#include + + #include + #include +@@ -12,22 +13,32 @@ typedef int handle; + G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) + G_DEFINE_AUTOPTR_CLEANUP_FUNC(amdgpu_device_handle, free); + +-int main(int argc, char** argv) ++int main (int argc, char** argv) + { +- if (argc < 2) +- { +- puts ("check-discrete-amdgpu [DEVNAME]"); +- return EXIT_FAILURE; +- } +- + const char *devname; + g_auto(handle) fd = -1; +- g_autoptr(GUdevDevice) parent = NULL; + struct drm_amdgpu_info_device device_info = {0}; + amdgpu_device_handle device = NULL; + uint32_t drm_major, drm_minor; ++ g_autoptr(GOptionContext) option_context = NULL; ++ g_autoptr(GError) error = NULL; + ++ setlocale (LC_ALL, ""); ++ option_context = g_option_context_new (""); ++ ++ if (!g_option_context_parse (option_context, &argc, &argv, &error)) { ++ g_print ("Failed to parse arguments: %s\n", error->message); ++ return EXIT_FAILURE; ++ } ++ ++ if (argc < 2) ++ { ++ g_print ("%s\n", g_option_context_get_help (option_context, TRUE, NULL)); ++ return EXIT_FAILURE; ++ } + devname = argv[1]; ++; ++ + fd = open (devname, O_RDWR); + if (fd < 0) + return EXIT_FAILURE; +diff --git a/src/discrete-detection/nouveau.c b/src/discrete-detection/nouveau.c +index 0a1f220..1d61cbb 100644 +--- a/src/discrete-detection/nouveau.c ++++ b/src/discrete-detection/nouveau.c +@@ -1,9 +1,10 @@ +- + #include + #include + #include ++#include + #include + #include ++#include + + #include + #include +@@ -14,23 +15,34 @@ + typedef int handle; + G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) + +-int main(int argc, char** argv) ++int main (int argc, char** argv) + { ++ const gchar *devname = NULL; ++ g_auto(handle) fd = -1; ++ g_autofree void *device = NULL; ++ g_autoptr(GOptionContext) option_context = NULL; ++ g_autoptr(GError) error = NULL; ++ ++ setlocale (LC_ALL, ""); ++ option_context = g_option_context_new (""); ++ ++ if (!g_option_context_parse (option_context, &argc, &argv, &error)) { ++ g_print ("Failed to parse arguments: %s\n", error->message); ++ return EXIT_FAILURE; ++ } ++ + if (argc < 2) + { +- puts ("check-discrete-nouveau [DEVNAME]"); ++ g_print ("%s\n", g_option_context_get_help (option_context, TRUE, NULL)); + return EXIT_FAILURE; + } +- +- const char *devname; +- g_auto(handle) fd = -1; +- + devname = argv[1]; ++ + fd = open (devname, O_RDWR); + if (fd < 0) + return EXIT_FAILURE; + +- g_autofree void *device = malloc(352); ++ device = malloc(352); + + /* Init device */ + { +@@ -88,7 +100,6 @@ int main(int argc, char** argv) + if (drmCommandWriteRead (fd, DRM_NOUVEAU_NVIF, &args, sizeof(args))) + return EXIT_FAILURE; + +- + switch (args.info.platform) + { + case NV_DEVICE_INFO_V0_IGP: +-- +2.49.0 + + +From 462b09f02de37dfd2965d23cc7c4137bcf45a4ae Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Wed, 14 Feb 2024 20:25:42 +0100 +Subject: [PATCH 08/13] main: add udev rule for i915 checking a lot of systems + has shown that the intel iGPU will always be available at `0000:00:02.0`. + Using ID_PATH would have been cleaner, but I couldn't get it to work. + +Signed-off-by: Jan200101 +--- + data/30-discrete-gpu.rules.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/data/30-discrete-gpu.rules.in b/data/30-discrete-gpu.rules.in +index a803ed4..f30f315 100644 +--- a/data/30-discrete-gpu.rules.in ++++ b/data/30-discrete-gpu.rules.in +@@ -1,3 +1,4 @@ + DRIVERS=="amdgpu", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-amdgpu $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" + DRIVERS=="nouveau", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-nouveau $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" +-DRIVERS=="nvidia", TAG+="switcheroo-discrete-gpu" ++DRIVERS=="nvidia", SUBSYSTEM=="drm", TAG+="switcheroo-discrete-gpu" ++DRIVERS=="i915", SUBSYSTEM=="drm", DEVPATH!="/devices/pci0000:00/0000:00:02.0/drm/*", TAG+="switcheroo-discrete-gpu" +-- +2.49.0 + + +From 55db3aeaeb962952881f73e94432f750cfb64fc8 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Thu, 15 Feb 2024 16:24:00 +0100 +Subject: [PATCH 09/13] main: use Discrete key in switcherooctl + +Signed-off-by: Jan200101 +--- + src/switcherooctl.in | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/switcherooctl.in b/src/switcherooctl.in +index 96c21cc..c0e3f07 100755 +--- a/src/switcherooctl.in ++++ b/src/switcherooctl.in +@@ -77,6 +77,7 @@ def print_gpu(gpu, index): + print('Device:', index) + print(' Name: ', gpu['Name']) + print(' Default: ', "yes" if gpu['Default'] else "no") ++ print(' Discrete: ', "yes" if gpu['Discrete'] else "no") + print(' Environment:', env_to_str(gpu['Environment'])) + + def _list(): +@@ -126,7 +127,7 @@ def get_discrete_gpu(): + return None + + try: +- gpu = next(gpu for gpu in gpus if not gpu['Default']) ++ gpu = next(gpu for gpu in gpus if gpu['Discrete']) + except StopIteration: + return None + else: +-- +2.49.0 + + +From 4232c75fe41158bb5063d630d36b3ffd6a8a57ec Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Fri, 6 Sep 2024 22:31:56 +0200 +Subject: [PATCH 10/13] main: use new GPU list on uevent the amount of GPUs may + still be the same but underlying attributes may have changed On the ASUS TUF + Dash F15 running Fedora 40 6.10.7-200.fc40.x86_64 the udev tags are not + applied at the time switcheroo-control starts but at a later uevent they are + correct. Memory gets allocated anyways to check if the GPU count has changed, + so this shouldn't affect memory usage. + +Signed-off-by: Jan200101 +--- + src/switcheroo-control.c | 16 ++++++---------- + 1 file changed, 6 insertions(+), 10 deletions(-) + +diff --git a/src/switcheroo-control.c b/src/switcheroo-control.c +index 0f6a548..01954c7 100644 +--- a/src/switcheroo-control.c ++++ b/src/switcheroo-control.c +@@ -438,16 +438,12 @@ uevent_cb (GUdevClient *client, + + cards = get_drm_cards (data); + num_gpus = cards->len; +- if (num_gpus != data->num_gpus) { +- g_debug ("GPUs added or removed (old: %d new: %d)", +- data->num_gpus, num_gpus); +- g_ptr_array_free (data->cards, TRUE); +- data->cards = cards; +- data->num_gpus = cards->len; +- send_dbus_event (data); +- } else { +- g_ptr_array_free (cards, TRUE); +- } ++ g_debug ("GPUs updated (old: %d new: %d)", ++ data->num_gpus, num_gpus); ++ g_ptr_array_free (data->cards, TRUE); ++ data->cards = cards; ++ data->num_gpus = cards->len; ++ send_dbus_event (data); + } + + static void +-- +2.49.0 + + +From ad09f908cc9e56cccfc946b285f2e7ddd014c587 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 28 Apr 2025 21:41:47 +0200 +Subject: [PATCH 11/13] main: add xe discrete detection + +Signed-off-by: Jan200101 +--- + data/30-discrete-gpu.rules.in | 1 + + meson.build | 1 + + meson_options.txt | 6 +++ + src/discrete-detection/meson.build | 9 +++++ + src/discrete-detection/xe.c | 63 ++++++++++++++++++++++++++++++ + 5 files changed, 80 insertions(+) + create mode 100644 src/discrete-detection/xe.c + +diff --git a/data/30-discrete-gpu.rules.in b/data/30-discrete-gpu.rules.in +index f30f315..ab60bf2 100644 +--- a/data/30-discrete-gpu.rules.in ++++ b/data/30-discrete-gpu.rules.in +@@ -2,3 +2,4 @@ DRIVERS=="amdgpu", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-amdgpu + DRIVERS=="nouveau", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-nouveau $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" + DRIVERS=="nvidia", SUBSYSTEM=="drm", TAG+="switcheroo-discrete-gpu" + DRIVERS=="i915", SUBSYSTEM=="drm", DEVPATH!="/devices/pci0000:00/0000:00:02.0/drm/*", TAG+="switcheroo-discrete-gpu" ++DRIVERS=="xe", SUBSYSTEM=="drm", PROGRAM="@libexecdir@/check-discrete-xe $env{DEVNAME}", TAG+="switcheroo-discrete-gpu" +diff --git a/meson.build b/meson.build +index b3aaf0c..31dfa95 100644 +--- a/meson.build ++++ b/meson.build +@@ -23,6 +23,7 @@ gudev = dependency('gudev-1.0', version: '>= 232') + libdrm = dependency('libdrm', version: '>= 2.4.97', required: get_option('libdrm')) + libdrm_nouveau = dependency('libdrm_nouveau', version: '>= 2.4.97', required: get_option('libdrm_nouveau')) + libdrm_amdgpu = dependency('libdrm_amdgpu', version: '>= 2.4.97', required: get_option('libdrm_amdgpu')) ++drm_xe = cc.has_header('drm/xe_drm.h', required: get_option('drm_xe')) + + systemd_systemunitdir = get_option('systemdsystemunitdir') + if systemd_systemunitdir == '' +diff --git a/meson_options.txt b/meson_options.txt +index c77fea8..058dbdd 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -45,3 +45,9 @@ option('libdrm_amdgpu', + type: 'feature', + value: 'auto' + ) ++ ++option('drm_xe', ++ description: 'Whether the kernel provided xe drm header should be used to probe Intel GPUs', ++ type: 'feature', ++ value: 'auto' ++) +diff --git a/src/discrete-detection/meson.build b/src/discrete-detection/meson.build +index 353316f..7e0b324 100644 +--- a/src/discrete-detection/meson.build ++++ b/src/discrete-detection/meson.build +@@ -17,3 +17,12 @@ if libdrm.found() and libdrm_nouveau.found() + install_dir: libexecdir, + ) + endif ++ ++if drm_xe ++ xe_discrete = executable('check-discrete-xe', ++ files('xe.c'), ++ dependencies: deps, ++ install: true, ++ install_dir: libexecdir, ++ ) ++endif +diff --git a/src/discrete-detection/xe.c b/src/discrete-detection/xe.c +new file mode 100644 +index 0000000..5ee6ede +--- /dev/null ++++ b/src/discrete-detection/xe.c +@@ -0,0 +1,63 @@ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++typedef int handle; ++G_DEFINE_AUTO_CLEANUP_FREE_FUNC(handle, close, -1) ++ ++int main (int argc, char** argv) ++{ ++ const char *devname; ++ g_auto(handle) fd = -1; ++ g_autofree struct drm_xe_query_config *config = NULL; ++ g_autoptr(GOptionContext) option_context = NULL; ++ g_autoptr(GError) error = NULL; ++ ++ setlocale (LC_ALL, ""); ++ option_context = g_option_context_new (""); ++ ++ if (!g_option_context_parse (option_context, &argc, &argv, &error)) { ++ g_print ("Failed to parse arguments: %s\n", error->message); ++ return EXIT_FAILURE; ++ } ++ ++ if (argc < 2) ++ { ++ g_print ("%s\n", g_option_context_get_help (option_context, TRUE, NULL)); ++ return EXIT_FAILURE; ++ } ++ devname = argv[1]; ++ ++ fd = open (devname, O_RDWR); ++ if (fd < 0) ++ return EXIT_FAILURE; ++ ++ struct drm_xe_device_query query = { ++ .extensions = 0, ++ .query = DRM_XE_DEVICE_QUERY_CONFIG, ++ .size = 0, ++ .data = 0, ++ }; ++ ++ if (ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query)) ++ return EXIT_FAILURE; ++ ++ config = malloc(query.size); ++ if (!config) ++ return EXIT_FAILURE; ++ ++ query.data = (uintptr_t)config; ++ if (ioctl(fd, DRM_IOCTL_XE_DEVICE_QUERY, &query)) ++ return EXIT_FAILURE; ++ ++ // if the GPU has dedicated vram then its discrrete ++ if (config->info[DRM_XE_QUERY_CONFIG_FLAGS] & DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM) ++ return EXIT_SUCCESS; ++ ++ return EXIT_FAILURE; ++ ++} +-- +2.49.0 + + +From cefec04bfc28a32bbec1e5a25999a768a6a7bf9c Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 28 Apr 2025 21:39:48 +0200 +Subject: [PATCH 12/13] tests: fix switcherooctl output test + +Signed-off-by: Jan200101 +--- + tests/integration-test.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/integration-test.py b/tests/integration-test.py +index e3dd996..5b4b4bb 100755 +--- a/tests/integration-test.py ++++ b/tests/integration-test.py +@@ -512,7 +512,7 @@ class Tests(dbusmock.DBusTestCase): + + out = subprocess.run([tool_path], capture_output=True) + self.assertEqual(out.returncode, 0, "'switcherooctl' call failed") +- self.assertEqual(out.stdout, b'Device: 0\n Name: Intel\xc2\xae UHD Graphics 620 (Kabylake GT2)\n Default: yes\n Environment: DRI_PRIME=pci-0000_00_02_0\n\nDevice: 1\n Name: GM108M [GeForce 930MX]\n Default: no\n Environment: DRI_PRIME=pci-0000_01_00_0\n') ++ self.assertEqual(out.stdout, b'Device: 0\n Name: Intel\xc2\xae UHD Graphics 620 (Kabylake GT2)\n Default: yes\n Discrete: no\n Environment: DRI_PRIME=pci-0000_00_02_0\n\nDevice: 1\n Name: GM108M [GeForce 930MX]\n Default: no\n Discrete: no\n Environment: DRI_PRIME=pci-0000_01_00_0\n') + + out = subprocess.run([tool_path, 'launch', '--gpu', '0', 'env'], capture_output=True) + self.assertEqual(out.returncode, 0, "'switcherooctl launch --gpu 0' failed") +-- +2.49.0 + + +From a446971f7aef77218625eb8627ec34e86e403737 Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 28 Apr 2025 21:53:21 +0200 +Subject: [PATCH 13/13] tests: add tests for xe discrete detection + +Signed-off-by: Jan200101 +--- + tests/discrete-detection/drm_xe_mock.c | 47 ++++++++++++++++++++++++++ + tests/discrete-detection/meson.build | 42 ++++++++++++++++++++++- + 2 files changed, 88 insertions(+), 1 deletion(-) + create mode 100644 tests/discrete-detection/drm_xe_mock.c + +diff --git a/tests/discrete-detection/drm_xe_mock.c b/tests/discrete-detection/drm_xe_mock.c +new file mode 100644 +index 0000000..a9da460 +--- /dev/null ++++ b/tests/discrete-detection/drm_xe_mock.c +@@ -0,0 +1,47 @@ ++#include ++#include ++#include ++#include ++ ++#include ++enum { ++ OTHER_GPU, ++ INTEL_IGPU, ++ INTEL_GPU, ++}; ++ ++/* Mock open(2) so we can test multiple devices configurations */ ++int open(const char *pathname, int flags) ++{ ++ if (!strcmp(pathname, "OTHER_GPU")) ++ return OTHER_GPU; ++ if (!strcmp (pathname, "INTEL_IGPU")) ++ return INTEL_IGPU; ++ if (!strcmp (pathname, "INTEL_GPU")) ++ return INTEL_GPU; ++ ++ return -1; ++} ++ ++/* open64 may be used for large file support */ ++int open64(const char *pathname, int flags) ++{ ++ return open (pathname, flags); ++} ++ ++int ioctl(int fd, unsigned long op, struct drm_xe_device_query* query) ++{ ++ if (op != DRM_IOCTL_XE_DEVICE_QUERY) ++ return EINVAL; ++ if (fd == OTHER_GPU) ++ return ENODEV; ++ ++ if (query->size == 0) { ++ query->size = sizeof(struct drm_xe_query_config); ++ } else { ++ struct drm_xe_query_config *config = (struct drm_xe_query_config*)query->data; ++ config->info[DRM_XE_QUERY_CONFIG_FLAGS] = fd == INTEL_GPU ? DRM_XE_QUERY_CONFIG_FLAG_HAS_VRAM : 0; ++ } ++ ++ return 0; ++} +diff --git a/tests/discrete-detection/meson.build b/tests/discrete-detection/meson.build +index f01a014..998229f 100644 +--- a/tests/discrete-detection/meson.build ++++ b/tests/discrete-detection/meson.build +@@ -77,4 +77,44 @@ if libdrm.found() and libdrm_nouveau.found() + env: environment({'LD_PRELOAD': nouveau_mock_lib.full_path()}), + should_fail: false + ) +-endif +\ No newline at end of file ++endif ++ ++if drm_xe ++ xe_mock_lib = shared_library( ++ 'drm_xe_mock', ++ files('drm_xe_mock.c') ++ ) ++ ++ test( ++ 'test xe detection with invalid device', ++ xe_discrete, ++ args: ['NO_GPU'], ++ env: environment({'LD_PRELOAD': xe_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test xe detection with non-Intel GPU', ++ xe_discrete, ++ args: ['OTHER_GPU'], ++ env: environment({'LD_PRELOAD': xe_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test xe detection with Intel Integrated GPU', ++ xe_discrete, ++ args: ['INTEL_IGPU'], ++ env: environment({'LD_PRELOAD': xe_mock_lib.full_path()}), ++ should_fail: true ++ ) ++ ++ test( ++ 'test xe detection with Intel Discrete GPU', ++ xe_discrete, ++ args: ['INTEL_GPU'], ++ env: environment({'LD_PRELOAD': xe_mock_lib.full_path()}), ++ should_fail: false ++ ) ++ ++endif +-- +2.49.0 + diff --git a/anda/apps/switcheroo-control/switcheroo-control.spec b/anda/apps/switcheroo-control/switcheroo-control.spec index dde67c0bb2..11f83f1462 100644 --- a/anda/apps/switcheroo-control/switcheroo-control.spec +++ b/anda/apps/switcheroo-control/switcheroo-control.spec @@ -1,22 +1,16 @@ Name: switcheroo-control Version: 2.6 -Release: 8%{?dist} +Release: 9%{?dist} Summary: D-Bus service to check the availability of dual-GPU License: GPLv3 URL: https://gitlab.freedesktop.org/hadess/switcheroo-control/ # URL from https://gitlab.freedesktop.org/hadess/switcheroo-control/-/releases Source0: https://gitlab.freedesktop.org/hadess/switcheroo-control/uploads/86ea54ac7ddb901b6bf6e915209151f8/switcheroo-control-2.6.tar.xz -Patch: 0001-main-update-GPUs-comment-for-dbus-property.patch -Patch: 0002-main-add-Discrete-key.patch -Patch: 0003-tests-fix-integration-tests-without-UMockdev.patch -Patch: 0004-tests-add-tests-for-discrete-detection-with-mock-lib.patch -Patch: 0005-main-remove-leftover-and-fix-typo.patch -Patch: 0006-main-move-discrete-dependencies-out-of-main-deps.patch -Patch: 0007-main-use-glib-for-discrete-command-line-arguments.patch -Patch: 0008-main-add-udev-rule-for-i915.patch -Patch: 0009-main-use-Discrete-key-in-switcherooctl.patch -Patch: 0010-main-use-new-GPU-list-on-uevent.patch +# Adds proper discrete GPU detection to switcheroo-control +# https://gitlab.freedesktop.org/hadess/switcheroo-control/-/merge_requests/69 +Patch: discrete.patch + BuildRequires: gcc BuildRequires: pkgconfig(gudev-1.0) @@ -25,6 +19,7 @@ BuildRequires: gtk-doc BuildRequires: meson BuildRequires: systemd BuildRequires: libdrm-devel +BuildRequires: kernel-headers BuildRequires: python3-dbusmock BuildRequires: umockdev @@ -78,6 +73,7 @@ fi %{_mandir}/man1/switcherooctl.1* %{_libexecdir}/check-discrete-amdgpu %{_libexecdir}/check-discrete-nouveau +%{_libexecdir}/check-discrete-xe %{_udevrulesdir}/30-discrete-gpu.rules %files docs @@ -86,14 +82,17 @@ fi %{_datadir}/gtk-doc/html/%{name}/ %changelog -* Fri Sep 06 2024 Jan200101 - 2.6-8 +* Tue Apr 29 2025 Jan200101 - 2.6-9 - Update discrete patch -* Thu Feb 15 2024 Jan Drögehoff - 2.6-7 -- Update discrete patch +* Sun Jan 19 2025 Fedora Release Engineering - 2.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild -* Wed Feb 14 2024 Jan Drögehoff - 2.6-6 -- Add discrete patch +* Mon Jul 29 2024 Miroslav Suchý - 2.6-7 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 2.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jan 27 2024 Fedora Release Engineering - 2.6-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/anda/apps/vencord-desktop/anda.hcl b/anda/apps/vencord-desktop/anda.hcl deleted file mode 100644 index 3c5a144b6a..0000000000 --- a/anda/apps/vencord-desktop/anda.hcl +++ /dev/null @@ -1,5 +0,0 @@ -project "pkg" { - rpm { - spec = "vencord-desktop.spec" - } -} \ No newline at end of file diff --git a/anda/apps/vencord-desktop/.gitignore b/anda/apps/vesktop/.gitignore similarity index 100% rename from anda/apps/vencord-desktop/.gitignore rename to anda/apps/vesktop/.gitignore diff --git a/anda/apps/vesktop/anda.hcl b/anda/apps/vesktop/anda.hcl new file mode 100644 index 0000000000..458b87c9bc --- /dev/null +++ b/anda/apps/vesktop/anda.hcl @@ -0,0 +1,5 @@ +project "pkg" { + rpm { + spec = "vesktop.spec" + } +} diff --git a/anda/apps/vencord-desktop/update.rhai b/anda/apps/vesktop/update.rhai similarity index 100% rename from anda/apps/vencord-desktop/update.rhai rename to anda/apps/vesktop/update.rhai diff --git a/anda/apps/vencord-desktop/vencord-desktop.spec b/anda/apps/vesktop/vesktop.spec similarity index 73% rename from anda/apps/vencord-desktop/vencord-desktop.spec rename to anda/apps/vesktop/vesktop.spec index 56cc77f1fb..cd9b00c004 100644 --- a/anda/apps/vencord-desktop/vencord-desktop.spec +++ b/anda/apps/vesktop/vesktop.spec @@ -4,10 +4,11 @@ %global __requires_exclude libffmpeg.so %global __provides_exclude_from %{_datadir}/vesktop/.*\\.so -Name: vencord-desktop -Provides: VencordDesktop = %{version}-%{release} -Version: 1.5.5 -Release: 1%?dist +Name: vesktop +Obsoletes: VencordDesktop < 1.5.8-1 +Obsoletes: vencord-desktop < 1.5.8-1 +Version: 1.5.8 +Release: 2%?dist License: GPL-3.0 Summary: Vesktop is a cross platform desktop app aiming to give you a snappier Discord experience with Vencord pre-installed URL: https://github.com/Vencord/Vesktop @@ -35,18 +36,18 @@ Name=Vesktop Comment=%summary GenericName=Internet Messenger Type=Application -Exec=/usr/bin/vencorddesktop +Exec=/usr/bin/vesktop Icon=vesktop Categories=Network;InstantMessaging; -StartupWMClass=VencordDesktop +StartupWMClass=vesktop Keywords=discord;vesktop;vencord;shelter;armcord;electron; EOF %build -npx pnpm@8 install --no-frozen-lockfile -npx pnpm@8 package:dir +npx pnpm install --no-frozen-lockfile +npx pnpm package:dir %install @@ -54,21 +55,24 @@ npx pnpm@8 package:dir mkdir -p %buildroot/usr/share/vesktop cp -r dist/*-unpacked/. %buildroot/usr/share/vesktop/. -install -Dm755 dist/*-unpacked/vencorddesktop %buildroot/usr/bin/vencorddesktop -ln -sf /usr/share/vesktop/vencorddesktop %buildroot/usr/bin/vencorddesktop +install -Dm755 dist/*-unpacked/vesktop %buildroot/usr/bin/vesktop +ln -sf /usr/share/vesktop/vesktop %buildroot/usr/bin/vesktop +ln -sf /usr/bin/vesktop %buildroot/usr/bin/vencorddesktop install -Dm644 vesktop.desktop %buildroot/usr/share/applications/vesktop.desktop install -Dm644 build/icon.png %buildroot/usr/share/pixmaps/vesktop.png %files %doc README.md %license LICENSE +/usr/bin/vesktop /usr/bin/vencorddesktop /usr/share/applications/vesktop.desktop /usr/share/pixmaps/vesktop.png /usr/share/vesktop/* %changelog +* Thu Jul 24 2025 Atmois - 1.5.8-2 +- Rename from vencord-desktop to vesktop and amend the spec file accordingly * Tue Nov 07 2023 Cappy Ishihara - 0.4.3-1 - Initial package - diff --git a/anda/apps/voicevox/voicevox.spec b/anda/apps/voicevox/voicevox.spec index 76d72e6f0b..8bb281d576 100644 --- a/anda/apps/voicevox/voicevox.spec +++ b/anda/apps/voicevox/voicevox.spec @@ -5,15 +5,15 @@ %define __strip /bin/true # do not perform compression in cpio -%define _source_payload w0.ufdio +%define _source_payload w19.zstdio %define _binary_payload w19.zstdio # Exclude private libraries -%global __requires_exclude libffmpeg.so -%global __provides_exclude_from %{_datadir}/%{name}/.*\\.so +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ Name: voicevox -Version: 0.22.4 +Version: 0.24.2 Release: 1%?dist Summary: Free Japanese text-to-speech editor License: LGPL-3.0 @@ -52,7 +52,7 @@ sed -i "s|Exec=.*|Exec=/usr/share/voicevox/VOICEVOX.AppImage|" squashfs-root/voi %install install -Dm755 VOICEVOX.AppImage %buildroot%_datadir/voicevox/VOICEVOX.AppImage install -Dm755 voicevox.sh %buildroot%_bindir/voicevox -install -Dm644 squashfs-root%_iconsdir/hicolor/0x0/apps/voicevox.png %buildroot%_iconsdir/hicolor/256x256/apps/voicevox.png +install -Dm644 squashfs-root%_iconsdir/hicolor/256x256/apps/voicevox.png %buildroot%_iconsdir/hicolor/256x256/apps/voicevox.png install -Dm644 squashfs-root/voicevox.desktop %buildroot%_datadir/applications/voicevox.desktop %files diff --git a/anda/apps/vpkedit/anda.hcl b/anda/apps/vpkedit/anda.hcl new file mode 100644 index 0000000000..5d7de00c43 --- /dev/null +++ b/anda/apps/vpkedit/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "vpkedit.spec" + } +} diff --git a/anda/apps/vpkedit/update.rhai b/anda/apps/vpkedit/update.rhai new file mode 100644 index 0000000000..5dd599ac04 --- /dev/null +++ b/anda/apps/vpkedit/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("craftablescience/VPKEdit")); diff --git a/anda/apps/vpkedit/vpkedit.spec b/anda/apps/vpkedit/vpkedit.spec new file mode 100644 index 0000000000..4c16ba627b --- /dev/null +++ b/anda/apps/vpkedit/vpkedit.spec @@ -0,0 +1,55 @@ +Name: vpkedit +Version: 5.0.0.1 +Release: 1%?dist +Summary: A CLI/GUI tool to create, read, and write several pack file formats +License: MIT +URL: https://github.com/craftablescience/VPKEdit +Requires: qt6-qtbase hicolor-icon-theme +Suggests: qt6-qtwayland +Packager: madonuko +BuildRequires: cmake git-core gcc gcc-c++ binutils +BuildRequires: cmake(Qt6) +BuildRequires: cmake(Qt6Svg) +BuildRequires: cmake(Qt6Linguist) +BuildRequires: cmake(Qt6Charts) +BuildRequires: cmake(Qt6LinguistTools) +ExclusiveArch: x86_64 + +%description +VPKEdit is an open source MIT-licensed tool that can extract from, preview the +contents of and write to several pack file formats. It also supports creating +new VPKs. + + +%prep +%git_clone %url v%version + + +%build +%cmake -DCMAKE_INSTALL_PREFIX=%_libdir/%name \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DCMAKE_BUILD_TYPE=Release +# -DVPKEDIT_BUILD_LIBC=ON +%cmake_build + + +%install +%cmake_install +pushd %buildroot%_libdir/%name +rm -rf {libQt*,*.md,LICENSE} +popd +ln -sf %_libdir/vpkedit/vpkedit %buildroot%_bindir/vpkedit +ln -sf %_libdir/vpkedit/vpkeditcli %buildroot%_bindir/vpkeditcli +sed -i 's@Exec=/opt/vpkedit/@Exec=@g' %buildroot%_datadir/applications/vpkedit.desktop + + +%files +%doc README.md CREDITS.md +%license LICENSE +%_bindir/vpkedit +%_bindir/vpkeditcli +%_libdir/%name/ +%_datadir/applications/vpkedit.desktop +%_iconsdir/hicolor/128x128/mimetypes/application-x-vpkedit.png +%_datadir/mime/packages/vpkedit.xml +%_datadir/pixmaps/vpkedit.png diff --git a/anda/apps/winetricks/git/anda.hcl b/anda/apps/winetricks/git/anda.hcl new file mode 100644 index 0000000000..dfa0346fa5 --- /dev/null +++ b/anda/apps/winetricks/git/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "winetricks-git.spec" + } + labels { + subrepo = "extras" + nightly = 1 + } +} diff --git a/anda/apps/winetricks/git/update.rhai b/anda/apps/winetricks/git/update.rhai new file mode 100644 index 0000000000..72c0a1c662 --- /dev/null +++ b/anda/apps/winetricks/git/update.rhai @@ -0,0 +1,7 @@ +rpm.global("commit", gh_commit("Winetricks/winetricks")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); + let v = gh("Winetricks/winetricks"); + rpm.global("ver", v); +} diff --git a/anda/apps/winetricks/git/winetricks-git.spec b/anda/apps/winetricks/git/winetricks-git.spec new file mode 100644 index 0000000000..0ca05f6ea7 --- /dev/null +++ b/anda/apps/winetricks/git/winetricks-git.spec @@ -0,0 +1,75 @@ +# Fedora sometimes sources the snapshots under stable versions and just bumps release +# For user clarity I have separated these into different packages +%global commit 73b92d2f3c117cd21d96e2fc807e041e7a89fec3 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global ver 20250102 +%global commit_date 20250820 + +Name: winetricks-git +Version: %{ver}^%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Work around common problems in Wine; Winetricks Git builds +License: LGPL-2.1-or-later +URL: https://github.com/Winetricks/winetricks +Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{commit}.tar.gz +BuildRequires: desktop-file-utils +BuildRequires: gcc +BuildRequires: make +Requires: cabextract +Requires: gzip +Requires: unzip +Requires: wget +Requires: which +Requires: hicolor-icon-theme +Requires: (kdialog or zenity) +Requires: (wine-stable or wine-staging or wine-dev or wine-common) +Conflicts: winetricks +Conflicts: terra-winetricks +BuildArch: noarch +# need arch-specific wine, not available everywhere: +# - adopted from wine.spec +ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 +ExcludeArch: ppc64 ppc64le + +%description +Winetricks is an easy way to work around common problems in Wine. + +It has a menu of supported games/apps for which it can do all the +workarounds automatically. It also lets you install missing DLLs +or tweak various Wine settings individually. + +This version of Winetricks is built from the latest Git. + +It is also compatible with Terra WINE builds. + +%prep +%setup -qn winetricks-%{commit} + +sed -i -e s:steam:: -e s:flash:: tests/* + +%build +# Empty build section because RPM + +%install +%make_install +# some tarballs do not install appdata +install -Dm0644 -t %{buildroot}%{_datadir}/metainfo src/io.github.winetricks.Winetricks.metainfo.xml + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/winetricks.desktop + + +%files +%license COPYING +%license debian/copyright +%doc README.md +%{_bindir}/winetricks +%{_mandir}/man1/winetricks.1* +%{_datadir}/applications/winetricks.desktop +%{_datadir}/bash-completion/completions/winetricks +%{_datadir}/icons/hicolor/scalable/apps/winetricks.svg +%{_datadir}/metainfo/io.github.winetricks.Winetricks.metainfo.xml + + +%changelog +%autochangelog diff --git a/anda/apps/winetricks/stable/anda.hcl b/anda/apps/winetricks/stable/anda.hcl new file mode 100644 index 0000000000..a57839ea14 --- /dev/null +++ b/anda/apps/winetricks/stable/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "winetricks.spec" + } + labels { + subrepo = "extras" + } +} diff --git a/anda/apps/winetricks/stable/update.rhai b/anda/apps/winetricks/stable/update.rhai new file mode 100644 index 0000000000..bf79b1bee5 --- /dev/null +++ b/anda/apps/winetricks/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("Winetricks/winetricks")); diff --git a/anda/apps/winetricks/stable/winetricks.spec b/anda/apps/winetricks/stable/winetricks.spec new file mode 100644 index 0000000000..29132eb2d7 --- /dev/null +++ b/anda/apps/winetricks/stable/winetricks.spec @@ -0,0 +1,68 @@ +# Fedora sometimes sources the snapshots under stable versions and just bumps release +# For user clarity I have separated these into different packages + +Name: terra-winetricks +Version: 20250102 +Release: 1%{?dist} +Summary: Winetricks built to be compatible with Terra WINE builds +License: LGPL-2.1-or-later +URL: https://github.com/Winetricks/winetricks +Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +BuildRequires: desktop-file-utils +BuildRequires: gcc +BuildRequires: make +Requires: cabextract +Requires: gzip +Requires: unzip +Requires: wget +Requires: which +Requires: hicolor-icon-theme +Requires: (kdialog or zenity) +Requires: (wine-stable or wine-staging or wine-dev) +Conflicts: winetricks +Conflicts: winetricks-git +BuildArch: noarch +# need arch-specific wine, not available everywhere: +# - adopted from wine.spec +ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 +ExcludeArch: ppc64 ppc64le + +%description +Winetricks is an easy way to work around common problems in Wine. + +It has a menu of supported games/apps for which it can do all the +workarounds automatically. It also lets you install missing DLLs +or tweak various Wine settings individually. + + +%prep +%setup -q -n winetricks-%{version} + +sed -i -e s:steam:: -e s:flash:: tests/* + +%build +# Empty build section because RPM + +%install +%make_install +# some tarballs do not install appdata +install -Dm0644 -t %{buildroot}%{_datadir}/metainfo src/io.github.winetricks.Winetricks.metainfo.xml + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/winetricks.desktop + + +%files +%license COPYING +%license debian/copyright +%doc README.md +%{_bindir}/winetricks +%{_mandir}/man1/winetricks.1* +%{_datadir}/applications/winetricks.desktop +%{_datadir}/bash-completion/completions/winetricks +%{_datadir}/icons/hicolor/scalable/apps/winetricks.svg +%{_datadir}/metainfo/io.github.winetricks.Winetricks.metainfo.xml + + +%changelog +%autochangelog diff --git a/anda/apps/woeusb-ng/WoeUSB-ng.spec b/anda/apps/woeusb-ng/WoeUSB-ng.spec index cdb0820207..ae716fe328 100644 --- a/anda/apps/woeusb-ng/WoeUSB-ng.spec +++ b/anda/apps/woeusb-ng/WoeUSB-ng.spec @@ -1,6 +1,6 @@ Name: WoeUSB-ng Version: 0.2.12 -Release: 1%?dist +Release: 2%?dist Summary: Simple tool that enable you to create your own usb stick with Windows installer License: GPL-3.0-only Requires: parted dosfstools ntfsprogs p7zip p7zip-plugins xdg-utils grub2-tools @@ -8,28 +8,44 @@ URL: https://github.com/WoeUSB/WoeUSB-ng Source: https://github.com/WoeUSB/WoeUSB-ng/archive/refs/tags/v%version.tar.gz Patch0: https://patch-diff.githubusercontent.com/raw/WoeUSB/WoeUSB-ng/pull/79.patch BuildArch: noarch -BuildRequires: python3-devel python3-installer +Requires: python3-%{name} = %{evr} +BuildRequires: anda-srpm-macros python3-devel python3-installer pyproject-rpm-macros python3dist(pip) python3dist(setuptools) python3dist(termcolor) python3dist(wxpython) python3dist(wheel) %global _description %{expand: WoeUSB-ng is a simple tool that enable you to create your own usb stick windows installer from an iso image or a real DVD. This is a rewrite of original WoeUSB.} %description %_description +%package -n python3-%{name} +Summary: Python files for %{name} +Requires: %{name} = %{evr} +BuildArch: noarch + +%description -n python3-%{name} +Python files needed for %{name}. + %prep %autosetup -p1 - +%if 0%{?fedora} > 41 %generate_buildrequires %pyproject_buildrequires - +%endif %build +%if 0%{?fedora} <= 41 +%py3_build +%else %pyproject_wheel - +%endif %install +%if 0%{?fedora} <= 41 +%py3_install +%else %pyproject_install %pyproject_save_files WoeUSB +%endif install -Dpm644 miscellaneous/WoeUSB-ng.desktop %buildroot%_datadir/applications/WoeUSB-ng.desktop install -Dpm644 miscellaneous/com.github.woeusb.woeusb-ng.policy %buildroot%_datadir/polkit-1/actions/com.github.woeusb.woeusb-ng.policy @@ -37,14 +53,21 @@ install -Dpm644 miscellaneous/com.github.woeusb.woeusb-ng.policy %buildroot%_dat %check #pyproject_check_import - -%files -f %{pyproject_files} +%files %_bindir/woeusb %_bindir/woeusbgui %_datadir/applications/WoeUSB-ng.desktop %_iconsdir/hicolor/scalable/apps/woeusb-logo.png %_datadir/polkit-1/actions/com.github.woeusb.woeusb-ng.policy +%if 0%{?fedora} <= 41 +%files -n python3-%{name} +%{python3_sitelib}/WoeUSB/ +%{python3_sitelib}/woeusb_ng-%{version}-py%{python3_version}.egg-info/ +%else +%files -n python3-%{name} -f %{pyproject_files} +%endif + %changelog %autochangelog diff --git a/anda/apps/woeusb-ng/anda.hcl b/anda/apps/woeusb-ng/anda.hcl index f729a2237e..33d5f43947 100644 --- a/anda/apps/woeusb-ng/anda.hcl +++ b/anda/apps/woeusb-ng/anda.hcl @@ -1,4 +1,5 @@ project pkg { + arches = ["x86_64"] rpm { spec = "WoeUSB-ng.spec" } diff --git a/anda/apps/youtube-music/youtube-music.spec b/anda/apps/youtube-music/youtube-music.spec index 08ca29c985..03419406ed 100644 --- a/anda/apps/youtube-music/youtube-music.spec +++ b/anda/apps/youtube-music/youtube-music.spec @@ -1,18 +1,18 @@ %define debug_package %nil # Exclude private libraries since this is bundled with electron -%global __requires_exclude libffmpeg.so -%global __provides_exclude_from %{_datadir}/%{name}/.*\\.so +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ # macro shorthand for calling pnpm %global pnpm npx pnpm@%{pnpm_version} # Try to vendor PNPM directly from Fedora # but if this fails, you can try setting this to 1 to vendor PNPM directly from upstream -%global vendor_pnpm 0 +%global vendor_pnpm 1 Name: youtube-music -Version: 3.7.4 +Version: 3.10.0 Release: 1%?dist Summary: YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader) Source1: youtube-music.desktop @@ -32,6 +32,10 @@ BuildRequires: python3 gcc-c++ BuildRequires: pnpm nodejs20 %endif +Requires: nss +Requires: libXext +Requires: libXfixes + %description YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader) @@ -49,7 +53,7 @@ git checkout v%{version} %if 0%{?vendor_pnpm} curl -fsSL https://get.pnpm.io/install.sh | sh - source $HOME/.bashrc -pnpm env use --global 20 +pnpm env use --global 22 %endif pnpm install pnpm build diff --git a/anda/desktops/compiz9/compiz9.spec b/anda/desktops/compiz9/compiz9.spec index e4c86dcca7..43d887d68b 100644 --- a/anda/desktops/compiz9/compiz9.spec +++ b/anda/desktops/compiz9/compiz9.spec @@ -1,4 +1,4 @@ -%define _ubuntu_rel 22.10.20220822-0ubuntu13 +%define _ubuntu_rel 22.10.20220822-0ubuntu16 %global _hardened_build 0 Name: compiz9 diff --git a/anda/desktops/gnome/gnome-shell-extension-appmenu-is-back/gnome-shell-extension-appmenu-is-back.spec b/anda/desktops/gnome/gnome-shell-extension-appmenu-is-back/gnome-shell-extension-appmenu-is-back.spec index 7c10a07483..fe8aa23070 100644 --- a/anda/desktops/gnome/gnome-shell-extension-appmenu-is-back/gnome-shell-extension-appmenu-is-back.spec +++ b/anda/desktops/gnome/gnome-shell-extension-appmenu-is-back/gnome-shell-extension-appmenu-is-back.spec @@ -13,7 +13,7 @@ BuildArch: noarch Source0: https://github.com/fthx/appmenu-is-back/archive/refs/tags/v%{version}.tar.gz Patch0: https://github.com/fthx/appmenu-is-back/compare/v2..703a31acf900eb7bcab3462baeefa815ec7f13ab.patch -Requires: (gnome-shell >= 46~ with gnome-shell < 48~) +Requires: (gnome-shell >= 47~ with gnome-shell < 49~) Recommends: gnome-extensions-app %description diff --git a/anda/desktops/gnome/gnome-shell/0001-status-keyboard-Add-a-catch-around-reload-call.patch b/anda/desktops/gnome/gnome-shell/0001-status-keyboard-Add-a-catch-around-reload-call.patch deleted file mode 100644 index 20717d1caf..0000000000 --- a/anda/desktops/gnome/gnome-shell/0001-status-keyboard-Add-a-catch-around-reload-call.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 78a733bae62f8af15f0771d7efde55473f295e46 Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Wed, 16 Aug 2023 18:46:54 -0400 -Subject: [PATCH 1/3] status/keyboard: Add a catch around reload call - -Now that system input settings can get used in the user session -they're getting seen by the tests and the tests are complaining: - -Unhandled promise rejection. To suppress this warning, add an -error handler to your promise chain with .catch() or a try-catch block -around your await expression. - -This commit adds the catch it's asking for. ---- - js/ui/status/keyboard.js | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js -index cfc0a01f6b..4ef2f355d3 100644 ---- a/js/ui/status/keyboard.js -+++ b/js/ui/status/keyboard.js -@@ -204,7 +204,9 @@ class InputSourceSystemSettings extends InputSourceSettings { - this._options = ''; - this._model = ''; - -- this._reload(); -+ this._reload().catch(error => { -+ logError(error, 'Could not reload system input settings'); -+ }); - - Gio.DBus.system.signal_subscribe(this._BUS_NAME, - this._BUS_PROPS_IFACE, --- -2.43.1 - diff --git a/anda/desktops/gnome/gnome-shell/0002-status-keyboard-Load-keyboard-from-system-settings-i.patch b/anda/desktops/gnome/gnome-shell/0002-status-keyboard-Load-keyboard-from-system-settings-i.patch deleted file mode 100644 index 7b0ac52eae..0000000000 --- a/anda/desktops/gnome/gnome-shell/0002-status-keyboard-Load-keyboard-from-system-settings-i.patch +++ /dev/null @@ -1,136 +0,0 @@ -From 0c0cc4ce1d3e08eba3e701d565398e01aa479ff7 Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Wed, 16 Aug 2023 11:13:39 -0400 -Subject: [PATCH 2/3] status/keyboard: Load keyboard from system settings if - gsettings unconfigured - -Right now if a user hasn't configured their input sources, the code -falls back to -using the current layout on Xorg and the mutter default with wayland. - -This commit changes the code to instead fall back to using the system -default (as configured by localed). ---- - js/ui/status/keyboard.js | 62 +++++++++++++++++++++++++++++++--------- - 1 file changed, 48 insertions(+), 14 deletions(-) - -diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js -index 4ef2f355d3..d91eb41bc6 100644 ---- a/js/ui/status/keyboard.js -+++ b/js/ui/status/keyboard.js -@@ -22,6 +22,9 @@ import * as Util from '../../misc/util.js'; - export const INPUT_SOURCE_TYPE_XKB = 'xkb'; - export const INPUT_SOURCE_TYPE_IBUS = 'ibus'; - -+const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources'; -+const KEY_INPUT_SOURCES = 'sources'; -+ - export const LayoutMenuItem = GObject.registerClass( - class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem { - _init(displayName, shortName) { -@@ -278,18 +281,16 @@ class InputSourceSystemSettings extends InputSourceSettings { - } - - class InputSourceSessionSettings extends InputSourceSettings { -- constructor() { -+ constructor(settings) { - super(); - -- this._DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources'; -- this._KEY_INPUT_SOURCES = 'sources'; - this._KEY_MRU_SOURCES = 'mru-sources'; - this._KEY_KEYBOARD_OPTIONS = 'xkb-options'; - this._KEY_KEYBOARD_MODEL = 'xkb-model'; - this._KEY_PER_WINDOW = 'per-window'; - -- this._settings = new Gio.Settings({schema_id: this._DESKTOP_INPUT_SOURCES_SCHEMA}); -- this._settings.connect(`changed::${this._KEY_INPUT_SOURCES}`, this._emitInputSourcesChanged.bind(this)); -+ this._settings = settings; -+ this._settings.connect(`changed::${KEY_INPUT_SOURCES}`, this._emitInputSourcesChanged.bind(this)); - this._settings.connect(`changed::${this._KEY_KEYBOARD_OPTIONS}`, this._emitKeyboardOptionsChanged.bind(this)); - this._settings.connect(`changed::${this._KEY_KEYBOARD_MODEL}`, this._emitKeyboardModelChanged.bind(this)); - this._settings.connect(`changed::${this._KEY_PER_WINDOW}`, this._emitPerWindowChanged.bind(this)); -@@ -308,7 +309,7 @@ class InputSourceSessionSettings extends InputSourceSettings { - } - - get inputSources() { -- return this._getSourcesList(this._KEY_INPUT_SOURCES); -+ return this._getSourcesList(KEY_INPUT_SOURCES); - } - - get mruSources() { -@@ -363,13 +364,6 @@ export class InputSourceManager extends Signals.EventEmitter { - Meta.KeyBindingFlags.IS_REVERSED, - Shell.ActionMode.ALL, - this._switchInputSource.bind(this)); -- if (Main.sessionMode.isGreeter) -- this._settings = new InputSourceSystemSettings(); -- else -- this._settings = new InputSourceSessionSettings(); -- this._settings.connect('input-sources-changed', this._inputSourcesChanged.bind(this)); -- this._settings.connect('keyboard-options-changed', this._keyboardOptionsChanged.bind(this)); -- this._settings.connect('keyboard-model-changed', this._keyboardModelChanged.bind(this)); - - this._xkbInfo = KeyboardManager.getXkbInfo(); - this._keyboardManager = KeyboardManager.getKeyboardManager(); -@@ -381,16 +375,56 @@ export class InputSourceManager extends Signals.EventEmitter { - this._ibusManager.connect('property-updated', this._ibusPropertyUpdated.bind(this)); - this._ibusManager.connect('set-content-type', this._ibusSetContentType.bind(this)); - -+ this._inputSettings = new Gio.Settings({schema_id: DESKTOP_INPUT_SOURCES_SCHEMA}); -+ this._setupInputSettings(); -+ - global.display.connect('modifiers-accelerator-activated', this._modifiersSwitcher.bind(this)); - - this._sourcesPerWindow = false; - this._focusWindowNotifyId = 0; -- this._settings.connect('per-window-changed', this._sourcesPerWindowChanged.bind(this)); - this._sourcesPerWindowChanged(); - this._disableIBus = false; - this._reloading = false; - } - -+ _sessionHasNoInputSettings() { -+ return this._inputSettings.get_user_value(KEY_INPUT_SOURCES) === null; -+ } -+ -+ _reloadInputSettings() { -+ const hadNoSessionInputSettings = this._hasNoSessionInputSettings; -+ -+ if (Main.sessionMode.isGreeter) -+ this._hasNoSessionInputSettings = true; -+ else -+ this._hasNoSessionInputSettings = this._sessionHasNoInputSettings(); -+ -+ if (this._settings && hadNoSessionInputSettings === this._hasNoSessionInputSettings) -+ return; -+ -+ this._settings?.disconnectObject(this); -+ -+ if (this._hasNoSessionInputSettings) -+ this._settings = new InputSourceSystemSettings(); -+ else -+ this._settings = new InputSourceSessionSettings(this._inputSettings); -+ -+ this._settings.connectObject( -+ 'input-sources-changed', this._inputSourcesChanged.bind(this), -+ 'keyboard-options-changed', this._keyboardOptionsChanged.bind(this), -+ 'keyboard-model-changed', this._keyboardModelChanged.bind(this), -+ 'per-window-changed', this._sourcesPerWindowChanged.bind(this), -+ this); -+ this.reload(); -+ } -+ -+ _setupInputSettings() { -+ if (!Main.sessionMode.isGreeter) -+ this._inputSettings.connect(`changed::${KEY_INPUT_SOURCES}`, this._reloadInputSettings.bind(this)); -+ -+ this._reloadInputSettings(); -+ } -+ - reload() { - this._reloading = true; - this._keyboardManager.setKeyboardOptions(this._settings.keyboardOptions); --- -2.43.1 - diff --git a/anda/desktops/gnome/gnome-shell/0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch b/anda/desktops/gnome/gnome-shell/0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch deleted file mode 100644 index 3e8af0cabc..0000000000 --- a/anda/desktops/gnome/gnome-shell/0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch +++ /dev/null @@ -1,128 +0,0 @@ -From d060baeb69a2a7d80fe403fc8eec90e20aa6cb7f Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Wed, 16 Aug 2023 14:09:50 -0400 -Subject: [PATCH 3/3] status/keyboard: Use gnome-desktop API for getting - default input sources list - -At the moment, gnome-shell tries to figure out the default input sources -from localed. It fails to take into account the system locale and input -methods. - -This commit switches it to use a new function in gnome-desktop, -gnome_get_default_input_sources, which does most of the heavy -lifting itself, instead. ---- - js/ui/status/keyboard.js | 59 ++++++++++++++++++---------------------- - 1 file changed, 27 insertions(+), 32 deletions(-) - -diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js -index d91eb41bc6..19c36031f6 100644 ---- a/js/ui/status/keyboard.js -+++ b/js/ui/status/keyboard.js -@@ -3,6 +3,7 @@ - import Clutter from 'gi://Clutter'; - import Gio from 'gi://Gio'; - import GLib from 'gi://GLib'; -+import GnomeDesktop from 'gi://GnomeDesktop'; - import GObject from 'gi://GObject'; - import IBus from 'gi://IBus'; - import Meta from 'gi://Meta'; -@@ -25,6 +26,8 @@ export const INPUT_SOURCE_TYPE_IBUS = 'ibus'; - const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources'; - const KEY_INPUT_SOURCES = 'sources'; - -+Gio._promisify(GnomeDesktop, 'get_default_input_sources'); -+ - export const LayoutMenuItem = GObject.registerClass( - class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem { - _init(displayName, shortName) { -@@ -202,9 +205,9 @@ class InputSourceSystemSettings extends InputSourceSettings { - this._BUS_IFACE = 'org.freedesktop.locale1'; - this._BUS_PROPS_IFACE = 'org.freedesktop.DBus.Properties'; - -- this._layouts = ''; -- this._variants = ''; -- this._options = ''; -+ this._inputSourceIds = []; -+ this._inputSourceTypes = []; -+ this._options = []; - this._model = ''; - - this._reload().catch(error => { -@@ -221,30 +224,22 @@ class InputSourceSystemSettings extends InputSourceSettings { - } - - async _reload() { -- let props; -+ let inputSourceIds; -+ let inputSourceTypes; -+ let options; -+ let model; - try { -- const result = await Gio.DBus.system.call( -- this._BUS_NAME, -- this._BUS_PATH, -- this._BUS_PROPS_IFACE, -- 'GetAll', -- new GLib.Variant('(s)', [this._BUS_IFACE]), -- null, Gio.DBusCallFlags.NONE, -1, null); -- [props] = result.deepUnpack(); -+ [inputSourceIds, inputSourceTypes, options, model] = -+ await GnomeDesktop.get_default_input_sources(null); - } catch (e) { -- log(`Could not get properties from ${this._BUS_NAME}`); -+ logError(e, 'Could not get default input sources'); - return; - } - -- const layouts = props['X11Layout'].unpack(); -- const variants = props['X11Variant'].unpack(); -- const options = props['X11Options'].unpack(); -- const model = props['X11Model'].unpack(); -- -- if (layouts !== this._layouts || -- variants !== this._variants) { -- this._layouts = layouts; -- this._variants = variants; -+ if (inputSourceIds !== this._inputSourceIds || -+ inputSourceTypes !== this._inputSourceTypes) { -+ this._inputSourceIds = inputSourceIds; -+ this._inputSourceTypes = inputSourceTypes; - this._emitInputSourcesChanged(); - } - if (options !== this._options) { -@@ -258,21 +253,21 @@ class InputSourceSystemSettings extends InputSourceSettings { - } - - get inputSources() { -- let sourcesList = []; -- let layouts = this._layouts.split(','); -- let variants = this._variants.split(','); -- -- for (let i = 0; i < layouts.length && !!layouts[i]; i++) { -- let id = layouts[i]; -- if (variants[i]) -- id += `+${variants[i]}`; -- sourcesList.push({type: INPUT_SOURCE_TYPE_XKB, id}); -+ let sourcesList; -+ -+ if (this._inputSourceIds) { -+ sourcesList = this._inputSourceIds.map((id, index) => { -+ return {type: this._inputSourceTypes[index], id}; -+ }); -+ } else { -+ sourcesList = []; - } -+ - return sourcesList; - } - - get keyboardOptions() { -- return this._options.split(','); -+ return this._options; - } - - get keyboardModel() { --- -2.43.1 - diff --git a/anda/desktops/gnome/gnome-shell/gnome-shell-favourite-apps-firefox.patch b/anda/desktops/gnome/gnome-shell/gnome-shell-favourite-apps-firefox.patch index 326f82714e..cdbfdd5406 100644 --- a/anda/desktops/gnome/gnome-shell/gnome-shell-favourite-apps-firefox.patch +++ b/anda/desktops/gnome/gnome-shell/gnome-shell-favourite-apps-firefox.patch @@ -1,38 +1,9 @@ -From 551b8979483e127471c726fd1db1d52e063a7d81 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Florian=20M=C3=BCllner?= -Date: Wed, 17 Sep 2014 07:11:12 +0200 -Subject: [PATCH] Replace Web with Firefox in default favorites - ---- - data/org.gnome.shell.gschema.xml.in | 2 +- - js/ui/appFavorites.js | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in -index f4fa86d013..86b4bf85ee 100644 ---- a/data/org.gnome.shell.gschema.xml.in -+++ b/data/org.gnome.shell.gschema.xml.in -@@ -50,7 +50,7 @@ - - - -- [ 'org.gnome.Epiphany.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'org.gnome.TextEditor.desktop'] -+ [ 'org.mozilla.firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'org.gnome.TextEditor.desktop'] - List of desktop file IDs for favorite applications - - The applications corresponding to these identifiers -diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js -index 576df3800d..1f55a3c881 100644 ---- a/js/ui/appFavorites.js -+++ b/js/ui/appFavorites.js -@@ -51,6 +51,7 @@ const RENAMED_DESKTOP_IDS = { - 'gnotski.desktop': 'org.gnome.Klotski.desktop', - 'gtali.desktop': 'org.gnome.Tali.desktop', - 'iagno.desktop': 'org.gnome.Reversi.desktop', -+ 'firefox.desktop': 'org.mozilla.firefox.desktop', - 'nautilus.desktop': 'org.gnome.Nautilus.desktop', - 'org.gnome.gnome-2048.desktop': 'org.gnome.TwentyFortyEight.desktop', - 'org.gnome.taquin.desktop': 'org.gnome.Taquin.desktop', --- -2.43.0 - +diff --git a/data/default-apps/dash.txt b/data/default-apps/dash.txt +index 65db4babc..f354d621b 100644 +--- a/data/default-apps/dash.txt ++++ b/data/default-apps/dash.txt +@@ -1,2 +1,2 @@ +-org.gnome.Epiphany.desktop ++org.mozilla.firefox.desktop + org.gnome.Calendar.desktop +-- diff --git a/anda/desktops/gnome/gnome-shell/gnome-shell.spec b/anda/desktops/gnome/gnome-shell/gnome-shell.spec index 452fa5094f..be6afac342 100644 --- a/anda/desktops/gnome/gnome-shell/gnome-shell.spec +++ b/anda/desktops/gnome/gnome-shell/gnome-shell.spec @@ -1,6 +1,6 @@ %global tarball_version %%(echo %{version} | tr '~' '.') -%global major_version 47 -%global minor_version 3 +%global major_version 48 +%global minor_version 2 %if 0%{?rhel} %global portal_helper 0 @@ -10,12 +10,14 @@ Name: gnome-shell Version: %{major_version}.%{minor_version} -Release: 1%{?dist}.switcheroo +Release: 3%{?dist}.switcheroo Summary: Window management and application launching for GNOME +Provides: gnome-shell.switcheroo = %version-%release +Obsoletes: gnome-shell.switcheroo <= 47.3-2 License: GPL-2.0-or-later URL: https://wiki.gnome.org/Projects/GnomeShell -Source0: https://download.gnome.org/sources/gnome-shell/%{major_version}/%{name}-%{tarball_version}.tar.xz +Source0: https://download.gnome.org/sources/gnome-shell/%{major_version}/gnome-shell-%{tarball_version}.tar.xz # Replace Epiphany with Firefox in the default favourite apps list Patch: gnome-shell-favourite-apps-firefox.patch @@ -24,10 +26,6 @@ Patch: gnome-shell-favourite-apps-firefox.patch # downstream patch to stop trying on configuration errors. Patch: 0001-gdm-Work-around-failing-fingerprint-auth.patch -Patch: 0001-status-keyboard-Add-a-catch-around-reload-call.patch -Patch: 0002-status-keyboard-Load-keyboard-from-system-settings-i.patch -Patch: 0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch - # shell-app: improve discrete GPU detection # https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3193 Patch: 3193.patch @@ -39,20 +37,21 @@ Patch: 3193.patch %define gjs_version 1.73.1 %define gtk4_version 4.0.0 %define adwaita_version 1.5.0 -%define mutter_version 47.0 +%define mutter_version 48~rc %define polkit_version 0.100 -%define gsettings_desktop_schemas_version 47~alpha +%define gsettings_desktop_schemas_version 48~rc %define ibus_version 1.5.2 %define gnome_bluetooth_version 1:42.3 %define gstreamer_version 1.4.5 -%define pipewire_version 0.3.0 +%define pipewire_version 0.3.49 %define gnome_settings_daemon_version 3.37.1 +%define major_version %(c=%{version}; echo $c | cut -d. -f1 | cut -d~ -f1) + BuildRequires: pkgconfig(bash-completion) BuildRequires: gcc BuildRequires: meson BuildRequires: git -BuildRequires: pkgconfig(ibus-1.0) >= %{ibus_version} BuildRequires: desktop-file-utils BuildRequires: pkgconfig(libedataserver-1.2) >= %{eds_version} BuildRequires: pkgconfig(gcr-4) @@ -87,9 +86,12 @@ BuildRequires: gnome-bluetooth-libs-devel >= %{gnome_bluetooth_version} %endif # Bootstrap requirements BuildRequires: gtk-doc +# Handle upgrade path +Conflicts: %{name} < 48~rc-3 %ifnarch s390 s390x Recommends: gnome-bluetooth%{?_isa} >= %{gnome_bluetooth_version} %endif +Requires: %{name}-common = %{version}-%{release} Requires: gnome-desktop3%{?_isa} >= %{gnome_desktop_version} Requires: gcr%{?_isa} Requires: gobject-introspection%{?_isa} >= %{gobject_introspection_version} @@ -114,7 +116,9 @@ Requires: xdg-user-dirs-gtk # needed for schemas Requires: at-spi2-atk%{?_isa} # needed for on-screen keyboard -Requires: ibus%{?_isa} >= %{ibus_version} +Recommends: ibus%{?_isa} >= %{ibus_version} +# needed for gobject-introspection typelib +Requires: ibus-libs%{?_isa} >= %{ibus_version} # needed for "show keyboard layout" Requires: tecla # needed for the user menu @@ -150,6 +154,7 @@ Requires: webkitgtk6.0%{?_isa} ExcludeArch: %{ix86} %endif +Provides: gnome-shell(api) = %{major_version} Provides: desktop-notification-daemon = %{version}-%{release} Provides: PolicyKit-authentication-agent = %{version}-%{release} Provides: bundled(gvc) @@ -177,8 +182,16 @@ advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience. +%package common +Summary: Common files used by %{name} +Conflicts: %{name} < 48~rc-3 +BuildArch: noarch + +%description common +%{summary} + %prep -%autosetup -S git -n %{name}-%{tarball_version} +%autosetup -S git -n gnome-shell-%{tarball_version} %build %meson \ @@ -198,7 +211,7 @@ easy to use experience. mkdir -p %{buildroot}%{_datadir}/gnome-shell/extensions mkdir -p %{buildroot}%{_datadir}/gnome-shell/search-providers -%find_lang %{name} +%find_lang gnome-shell %check desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shell.desktop @@ -208,14 +221,13 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shell.Exten desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shell.PortalHelper.desktop %endif -%files -f %{name}.lang +%files -f gnome-shell.lang %license COPYING %doc NEWS README.md %{_bindir}/gnome-shell %{_bindir}/gnome-extensions %{_bindir}/gnome-shell-extension-tool %{_bindir}/gnome-shell-test-tool -%{_datadir}/glib-2.0/schemas/*.xml %{_datadir}/glib-2.0/schemas/00_org.gnome.shell.gschema.override %{_datadir}/applications/org.gnome.Shell.Extensions.desktop %{_datadir}/applications/org.gnome.Shell.desktop @@ -235,8 +247,11 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shell.Porta %{_datadir}/dbus-1/interfaces/org.gnome.Shell.PadOsd.xml %{_datadir}/dbus-1/interfaces/org.gnome.Shell.Screencast.xml %{_datadir}/dbus-1/interfaces/org.gnome.Shell.Screenshot.xml +%{_datadir}/dbus-1/interfaces/org.gnome.Shell.ScreenTime.xml %{_datadir}/dbus-1/interfaces/org.gnome.ShellSearchProvider.xml %{_datadir}/dbus-1/interfaces/org.gnome.ShellSearchProvider2.xml +%{_datadir}/desktop-directories/X-GNOME-Shell-System.directory +%{_datadir}/desktop-directories/X-GNOME-Shell-Utilities.directory %{_datadir}/icons/hicolor/scalable/apps/org.gnome.Shell.Extensions.svg %{_datadir}/icons/hicolor/symbolic/apps/org.gnome.Shell.Extensions-symbolic.svg %{_userunitdir}/org.gnome.Shell-disable-extensions.service @@ -258,5 +273,8 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shell.Porta %{_libexecdir}/gnome-shell-portal-helper %endif +%files common +%{_datadir}/glib-2.0/schemas/*.xml + %changelog %autochangelog diff --git a/anda/desktops/gnome/nautilus-open-any-terminal/anda.hcl b/anda/desktops/gnome/nautilus-open-any-terminal/anda.hcl new file mode 100644 index 0000000000..9a04b951e5 --- /dev/null +++ b/anda/desktops/gnome/nautilus-open-any-terminal/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "nautilus-open-any-terminal.spec" + } +} diff --git a/anda/desktops/gnome/nautilus-open-any-terminal/nautilus-open-any-terminal.spec b/anda/desktops/gnome/nautilus-open-any-terminal/nautilus-open-any-terminal.spec new file mode 100644 index 0000000000..62b31839ba --- /dev/null +++ b/anda/desktops/gnome/nautilus-open-any-terminal/nautilus-open-any-terminal.spec @@ -0,0 +1,101 @@ +%global pypi_name nautilus_open_any_terminal + +Name: nautilus-open-any-terminal +Version: 0.6.1 +Release: 2%?dist +Summary: Context-menu entry for opening other terminal in Nautilus +License: GPL-3.0-only +URL: https://github.com/Stunkymonkey/nautilus-open-any-terminal +Source0: %{pypi_source} +Source1: https://raw.githubusercontent.com/Stunkymonkey/nautilus-open-any-terminal/refs/tags/%version/README.md +Source2: https://raw.githubusercontent.com/Stunkymonkey/nautilus-open-any-terminal/refs/tags/%version/LICENSE +Packager: madonuko + +BuildArch: noarch +BuildRequires: python3-devel +BuildRequires: python3dist(setuptools-scm) +BuildRequires: python3dist(pip) +BuildRequires: gettext +Requires: python3-%{name} = %{version}-%{release} +Requires: %{name}-caja = %{version}-%{release} +Obsoletes: python3-%{name} < 0.6.1-2 + + +%global _description %{expand: +nautilus-open-any-terminal is an extension for nautilus, which adds an context-entry for opening other terminal emulators than `gnome-terminal`.} + +%description %_description + +%package -n %{name}-caja +Summary: Caja files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description -n nautilus-open-any-terminal-caja +Python-caja files for %{name}. + + +%package -n python3-nautilus-open-any-terminal +Summary: Python files for %{name} +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description -n python3-nautilus-open-any-terminal +Python files for %{name}. + + +%prep +%autosetup -n nautilus_open_any_terminal-%version +cp %{S:1} %{S:2} . + + +#generate_buildrequires +#pyproject_buildrequires + + +%build +%if 0%{?fedora} <= 41 +%py3_build +%else +%pyproject_wheel +%endif + + +%install +%if 0%{?fedora} <= 41 +%py3_install +%else +%pyproject_install +%pyproject_save_files -l %{pypi_name} +%endif + + +#check +#pyproject_check_import + +%files +%doc README.md +%license LICENSE +# These are GNOME config files +%_datadir/glib-2.0/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml +%_datadir/locale/*/LC_MESSAGES/nautilus-open-any-terminal.mo +# As asinine as it is these don't belong in a Python subpackage because they're Nautilus files +%_datadir/nautilus-python/extensions/%{pypi_name}.py +%if 0%{?fedora} > 41 +%_datadir/nautilus-python/extensions/__pycache__/%{pypi_name}.cpython-*.pyc +%endif + +%files -n %{name}-caja +# Congratulations! You have discovered a -caja subpackage +%_datadir/caja-python/extensions/nautilus_open_any_terminal.py +%if 0%{?fedora} > 41 +%_datadir/caja-python/extensions/__pycache__/%{pypi_name}.cpython-*.pyc +%endif + +%if 0%{?fedora} <= 41 +%files -n python3-nautilus-open-any-terminal +%{python3_sitelib}/%{pypi_name}/ +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%files -n python3-nautilus-open-any-terminal -f %{pyproject_files} +%endif diff --git a/anda/desktops/gnome/nautilus-open-any-terminal/update.rhai b/anda/desktops/gnome/nautilus-open-any-terminal/update.rhai new file mode 100644 index 0000000000..646e43ed9b --- /dev/null +++ b/anda/desktops/gnome/nautilus-open-any-terminal/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("nautilus_open_any_terminal")); diff --git a/anda/desktops/kde/kf6-kio/anda.hcl b/anda/desktops/kde/kf6-kio/anda.hcl index 24de21b76f..c848a83927 100644 --- a/anda/desktops/kde/kf6-kio/anda.hcl +++ b/anda/desktops/kde/kf6-kio/anda.hcl @@ -5,5 +5,6 @@ project pkg { labels { subrepo = "extras" updbranch = 1 + mock = 1 } } diff --git a/anda/desktops/kde/kf6-kio/kf6-kio.spec b/anda/desktops/kde/kf6-kio/kf6-kio.spec index 124637f8b7..22da5f23dc 100644 --- a/anda/desktops/kde/kf6-kio/kf6-kio.spec +++ b/anda/desktops/kde/kf6-kio/kf6-kio.spec @@ -1,17 +1,22 @@ %global framework kio %global stable_kf6 stable -%global majmin_ver_kf6 6.11 +%global majmin_ver_kf6 6.17 +%global ecm_ver 6.17.0 +%global ecm_rel 1 Name: kf6-%{framework} Version: %{majmin_ver_kf6}.0 Release: 1%{?dist}.switcheroo Summary: KDE Frameworks 6 Tier 3 solution for filesystem abstraction +Obsoletes: kf6-%{framework}.switcheroo < 6.14.0-4 + License: BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-only AND LGPL-2.0-only AND LGPL-2.0-or-later AND LGPL-2.1-only AND LGPL-2.1-or-later AND LGPL-3.0-only AND (GPL-2.0-only OR GPL-3.0-only) AND (LGPL-2.1-only OR LGPL-3.0-only) AND MIT URL: https://invent.kde.org/frameworks/%{framework} Source0: https://download.kde.org/%{stable_kf6}/frameworks/%{majmin_ver_kf6}/%{framework}-%{version}.tar.xz +Source1: https://download.kde.org/%{stable_kf6}/frameworks/%{majmin_ver_kf6}/%{framework}-%{version}.tar.xz.sig # https://invent.kde.org/frameworks/kio/-/issues/26 # I'm not sending this upstream because I'm not sure it's really @@ -25,9 +30,7 @@ Patch0: 0001-Give-the-kuriikwsfiltereng_private-a-VERSION-and-SOV.patch Patch101: kio-no-help-protocol.patch %endif -# https://invent.kde.org/frameworks/kio/-/merge_requests/1556 -Patch201: 1556.patch - +Provides: kf6-%{framework} BuildRequires: extra-cmake-modules BuildRequires: gcc-c++ BuildRequires: kf6-rpm-macros @@ -98,6 +101,7 @@ Requires: cmake(KF6Solid) Requires: cmake(KF6XmlGui) Requires: cmake(KF6WindowSystem) Requires: qt6-qtbase-devel +Obsoletes: kf6-kio.switcheroo-devel < 6.14.0-4 %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. @@ -106,6 +110,7 @@ developing applications that use %{name}. Summary: Documentation files for %{name} Requires: %{name}-core = %{version}-%{release} BuildArch: noarch +Obsoletes: kf6-kio.switcheroo-doc < 6.14.0-4 %description doc Documentation for %{name}. @@ -116,12 +121,14 @@ Requires: %{name}-core-libs%{?_isa} = %{version}-%{release} Requires: %{name}-doc = %{version}-%{release} Requires: kf6-filesystem Recommends: switcheroo-control +Obsoletes: kf6-kio.switcheroo-core < 6.14.0-4 %description core KIOCore library provides core non-GUI components for working with KIO. %package core-libs Summary: Runtime libraries for KIO Core Requires: %{name}-core%{?_isa} = %{version}-%{release} +Obsoletes: kf6-kio.switcheroo-core-libs < 6.14.0-4 %description core-libs %{summary}. @@ -131,6 +138,7 @@ Summary: Widgets for KIO Framework ## included here for completeness, even those -core already has a dependency. %{?kf6_kinit_requires} Requires: %{name}-core%{?_isa} = %{version}-%{release} +Obsoletes: kf6-kio.switcheroo-widgets < 6.14.0-4 %description widgets KIOWidgets contains classes that provide generic job control, progress reporting, etc. @@ -138,12 +146,14 @@ reporting, etc. %package widgets-libs Summary: Runtime libraries for KIO Widgets library Requires: %{name}-widgets%{?_isa} = %{version}-%{release} +Obsoletes: kf6-kio.switcheroo-widgets-libs < 6.14.0-4 %description widgets-libs %{summary}. %package file-widgets Summary: Widgets for file-handling for KIO Framework Requires: %{name}-widgets%{?_isa} = %{version}-%{release} +Obsoletes: kf6-kio.switcheroo-file-widgets < 6.14.0-4 %description file-widgets The KIOFileWidgets library provides the file selection dialog and its components. @@ -151,15 +161,24 @@ its components. %package gui Summary: Gui components for the KIO Framework Requires: %{name}-core%{?_isa} = %{version}-%{release} +Provides: kf6-kio-gui = %version-%release +Obsoletes: kf6-kio.switcheroo-gui < 6.14.0-4 %description gui %{summary}. %package qch-doc Summary: Developer Documentation files for %{name} BuildArch: noarch +Obsoletes: kf6-kio.switcheroo-qch-doc < 6.14.0-4 %description qch-doc Developer Documentation files for %{name} for use with KDevelop or QtCreator. +%package html +Summary: Developer Documentation files for %{name} +BuildArch: noarch +%description html +Developer Documentation files for %{name} in HTML format + %prep %autosetup -n %{framework}-%{version} -p1 @@ -167,12 +186,12 @@ Developer Documentation files for %{name} for use with KDevelop or QtCreator. %build %cmake_kf6 -%cmake_build +%cmake_build_kf6 %install -%cmake_install -%find_lang %{name} --all-name --with-man --with-html +%cmake_install_kf6 +%find_lang kf6-kio --all-name --with-man --with-html %files %license LICENSES/*.txt @@ -187,6 +206,7 @@ Developer Documentation files for %{name} for use with KDevelop or QtCreator. %{_kf6_plugindir}/kio/ %{_kf6_plugindir}/kded/ %{_kf6_plugindir}/kiod/ +%{_kf6_plugindir}/kio_dnd/ %{_kf6_datadir}/kf6/searchproviders/*.desktop %{_kf6_datadir}/applications/*.desktop %{_datadir}/dbus-1/services/org.kde.*.service @@ -195,7 +215,7 @@ Developer Documentation files for %{name} for use with KDevelop or QtCreator. %files core-libs %{_kf6_libdir}/libKF6KIOCore.so.* -%files doc -f %{name}.lang +%files doc -f kf6-kio.lang %files gui %{_kf6_libdir}/libKF6KIOGui.so.* @@ -217,12 +237,21 @@ Developer Documentation files for %{name} for use with KDevelop or QtCreator. %{_kf6_libdir}/cmake/KF6KIO/ %{_kf6_datadir}/kdevappwizard/templates/kioworker6.tar.bz2 %{_kf6_qtplugindir}/designer/kio6widgets.so -%{_qt6_docdir}/*.tags +%{_qt6_docdir}/*/*.tags +%{_qt6_docdir}/*/*.index %files qch-doc %{_qt6_docdir}/*.qch +%files html +%{_qt6_docdir}/*/* +%exclude %{_qt6_docdir}/*/*.tags +%exclude %{_qt6_docdir}/*/*.index + %changelog +* Fri Feb 07 2025 Marc Deop i Argemí - 6.11.0-1 +- 6.11.0 + * Fri Jan 17 2025 Fedora Release Engineering - 6.10.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild diff --git a/anda/desktops/kde/kf6-kio/update.rhai b/anda/desktops/kde/kf6-kio/update.rhai index 5825442cbd..9e455c5ee6 100644 --- a/anda/desktops/kde/kf6-kio/update.rhai +++ b/anda/desktops/kde/kf6-kio/update.rhai @@ -14,3 +14,7 @@ for entry in get(url).json().updates[0].title.split(' ') { } break; } + +let vr = bump::bodhi_vr("extra-cmake-modules", branch); +rpm.global("ecm_ver", vr[1]); +rpm.global("ecm_rel", vr[2]); diff --git a/anda/desktops/kde/lightdm-kde-greeter/lightdm-kde-greeter.spec b/anda/desktops/kde/lightdm-kde-greeter/lightdm-kde-greeter.spec index abfe7a2159..adeb1f8bb2 100644 --- a/anda/desktops/kde/lightdm-kde-greeter/lightdm-kde-greeter.spec +++ b/anda/desktops/kde/lightdm-kde-greeter/lightdm-kde-greeter.spec @@ -1,7 +1,7 @@ -%global commit c3f01539e3b036ae940e678f5739b37ca0300ce2 +%global commit 31d29530ad834c1bfb70ed43f9395a549fbace56 Name: lightdm-kde-greeter -Version: 6.0.2 +Version: 6.0.3 Release: 1%?dist Summary: Login screen using the LightDM framework License: GPL-3.0-or-later diff --git a/anda/desktops/lomiri-unity/lomiri-app-launch/2004-std-workaround.patch b/anda/desktops/lomiri-unity/lomiri-app-launch/2004-std-workaround.patch new file mode 100644 index 0000000000..7ae0684784 --- /dev/null +++ b/anda/desktops/lomiri-unity/lomiri-app-launch/2004-std-workaround.patch @@ -0,0 +1,11 @@ +--- a/CMakeLists.txt 2025-04-18 01:46:49.810910663 -0500 ++++ b/CMakeLists.txt 2025-04-18 02:07:05.663396088 -0500 +@@ -77,7 +77,7 @@ + -pthread + ) + +-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") ++set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu11") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") + + pkg_check_modules(GLIB2 REQUIRED glib-2.0) diff --git a/anda/desktops/lomiri-unity/lomiri-app-launch/lomiri-app-launch.spec b/anda/desktops/lomiri-unity/lomiri-app-launch/lomiri-app-launch.spec index 6775a051e4..463aa251db 100644 --- a/anda/desktops/lomiri-unity/lomiri-app-launch/lomiri-app-launch.spec +++ b/anda/desktops/lomiri-unity/lomiri-app-launch/lomiri-app-launch.spec @@ -1,19 +1,22 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri-app-launch -%global commit 3a0dacbbf99b45b67c39bb92449235c576cbf05a +%global commit ca7670c0a74c42f03c0bb4196773519c270a0d75 %forgemeta Name: lomiri-app-launch -Version: 0.1.11 +Version: 0.1.12 Release: 1%?dist Summary: Provides the Lomiri App Launch user space daemon License: GPL-3.0 URL: https://gitlab.com/ubports/development/core/lomiri-app-launch Source0: %{url}/-/archive/%commit/lomiri-app-launch-%commit.tar.gz +Patch0: https://sources.debian.org/data/main/l/lomiri-app-launch/0.1.11-1/debian/patches/2003_remove-werror.patch +Patch1: 2004-std-workaround.patch BuildRequires: cmake BuildRequires: pkgconfig -BuildRequires: g++ BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libatomic BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(lttng-ust) @@ -49,8 +52,6 @@ This package contains development files needed for lomiri-app-launch. %autosetup -n lomiri-app-launch-%commit %build -sed -i 's/-Werror//' ./CMakeLists.txt - # For some reason the macro of cmake fails on both clang and gcc cmake -DLOMIRI_APP_LAUNCH_ARCH=%{_arch} -DENABLE_COVERAGE=OFF -DENABLE_TESTS=OFF -B redhat-linux-build -DCMAKE_INSTALL_PREFIX:PATH=/usr -DENABLE_MIRCLIENT=off -DUSE_SYSTEMD=ON %cmake_build diff --git a/anda/desktops/lomiri-unity/lomiri-download-manager/lomiri-download-manager.spec b/anda/desktops/lomiri-unity/lomiri-download-manager/lomiri-download-manager.spec index ba57eccb1c..ef7f41d87c 100644 --- a/anda/desktops/lomiri-unity/lomiri-download-manager/lomiri-download-manager.spec +++ b/anda/desktops/lomiri-unity/lomiri-download-manager/lomiri-download-manager.spec @@ -1,9 +1,9 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri-download-manager -%global commit 682c4928a91da598767e0be2496d9c35af7db035 +%global commit 7f4c49f125209235b9a808a6e72d1fdfdd2b01ca %forgemeta Name: lomiri-download-manager -Version: 0.1.3 +Version: 0.2.1 Release: 1%?dist Summary: Upload Download Manager for Lomiri License: LGPLv3 diff --git a/anda/desktops/lomiri-unity/lomiri-indicator-network/lomiri-indicator-network.spec b/anda/desktops/lomiri-unity/lomiri-indicator-network/lomiri-indicator-network.spec index 50647f4a41..437bf29862 100644 --- a/anda/desktops/lomiri-unity/lomiri-indicator-network/lomiri-indicator-network.spec +++ b/anda/desktops/lomiri-unity/lomiri-indicator-network/lomiri-indicator-network.spec @@ -1,9 +1,9 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri-indicator-network -%global commit 8393f80825de7447a5567a90d3725b469fae471b +%global commit 4aa16a3674bf513995cf07fffaf700d007e726d8 %forgemeta Name: lomiri-indicator-network -Version: 1.1.0 +Version: 1.1.1 Release: 1%?dist Summary: The Network indicator for Ubuntu Touch License: GPL-3.0 AND LGPL-3.0 diff --git a/anda/desktops/lomiri-unity/lomiri-schemas/lomiri-schemas.spec b/anda/desktops/lomiri-unity/lomiri-schemas/lomiri-schemas.spec index c1698ba60c..89c169fe64 100644 --- a/anda/desktops/lomiri-unity/lomiri-schemas/lomiri-schemas.spec +++ b/anda/desktops/lomiri-unity/lomiri-schemas/lomiri-schemas.spec @@ -1,9 +1,9 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri-schemas -%global commit 4a74eca0e4dcb745521abf20f975854cc3478a70 +%global commit 139e6090d18040270e942429cf08f6b48a67b0cc %forgemeta Name: lomiri-schemas -Version: 0.1.7 +Version: 0.1.8 Release: 1%?dist Summary: Configuration schemas for lomiri License: LGPL-2.0-or-later diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/2002_use-Noto-font-instead-of-Ubuntu-font.patch b/anda/desktops/lomiri-unity/lomiri-system-settings/2002_use-Noto-font-instead-of-Ubuntu-font.patch new file mode 100644 index 0000000000..4b3558641e --- /dev/null +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/2002_use-Noto-font-instead-of-Ubuntu-font.patch @@ -0,0 +1,26 @@ +Description: In Debian, use Noto Sans font, not Ubuntu font. +Author: Mike Gabriel +Forwarded: not needed, Debian-specific + +--- a/plugins/background/Components/ListItemsHeader.qml ++++ b/plugins/background/Components/ListItemsHeader.qml +@@ -44,7 +44,7 @@ + } + + color: theme.palette.normal.foregroundText +- font.family: "Ubuntu" ++ font.family: "Noto Sans" + fontSize: "medium" + elide: Text.ElideRight + textFormat: Text.PlainText +--- a/plugins/battery/PageComponent.qml ++++ b/plugins/battery/PageComponent.qml +@@ -138,7 +138,7 @@ + ctx.lineWidth = units.dp(2) + + var fontHeight = FontUtils.sizeToPixels("small") +- ctx.font="%1px Ubuntu".arg(fontHeight) ++ ctx.font="%1px Noto Sans".arg(fontHeight) + + ctx.translate(0, 1) + diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/2011_build-without-trust-store.patch b/anda/desktops/lomiri-unity/lomiri-system-settings/2011_build-without-trust-store.patch new file mode 100644 index 0000000000..de4dec4b0c --- /dev/null +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/2011_build-without-trust-store.patch @@ -0,0 +1,121 @@ +Description: Disable all trust-store related settings. Not available in Debian. +Author: Mike Gabriel +Forwarded: not needed, Debian-specific + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -53,7 +53,7 @@ + pkg_check_modules(GIO REQUIRED gio-2.0 gio-unix-2.0) + pkg_check_modules(LIBSYSTEMD REQUIRED libsystemd) + pkg_check_modules(POLKIT_AGENT REQUIRED polkit-agent-1) +-pkg_check_modules(TRUST_STORE REQUIRED trust-store) ++#pkg_check_modules(TRUST_STORE REQUIRED trust-store) + pkg_search_module(UPOWER_GLIB REQUIRED upower-glib) + pkg_search_module(ACCOUNTSSERVICE REQUIRED accountsservice) + if (ENABLE_UBUNTU_ACCOUNTSSERVICE) +--- a/plugins/security-privacy/CMakeLists.txt ++++ b/plugins/security-privacy/CMakeLists.txt +@@ -18,8 +18,8 @@ + ${LIBSYSTEMD_LDFLAGS}) + + set(QML_SOURCES +- AppAccess.qml +- AppAccessControl.qml ++# AppAccess.qml ++# AppAccessControl.qml + here-terms.qml + Location.qml + LockSecurity.qml +@@ -37,8 +37,8 @@ + plugin.h + securityprivacy.cpp + securityprivacy.h +- trust-store-model.cpp +- trust-store-model.h ++# trust-store-model.cpp ++# trust-store-model.h + ) + add_library(LomiriSecurityPrivacyPanel MODULE ${PANEL_SOURCES} ${QML_SOURCES}) + +@@ -47,7 +47,7 @@ + QT_NO_KEYWORDS) + target_include_directories(LomiriSecurityPrivacyPanel PRIVATE + ${Intl_INCLUDE_DIRS} +- ${TRUST_STORE_INCLUDE_DIRS} ++# ${TRUST_STORE_INCLUDE_DIRS} + ${GLIB_INCLUDE_DIRS} + ) + target_link_libraries (LomiriSecurityPrivacyPanel +@@ -58,7 +58,7 @@ + Qt5::Quick + Qt5::DBus + LomiriSystemSettingsPrivate +- ${TRUST_STORE_LDFLAGS} ++# ${TRUST_STORE_LDFLAGS} + ${GLIB_LDFLAGS} + ) + +--- a/plugins/security-privacy/PageComponent.qml ++++ b/plugins/security-privacy/PageComponent.qml +@@ -64,15 +64,15 @@ + case 'location': + page = Qt.resolvedUrl("Location.qml"); + break; +- case 'permissions': +- page = Qt.resolvedUrl("AppAccess.qml") +- break; +- } +- } else if (pluginOptions && pluginOptions['service']) { +- // This whole else if branch will be removed once the +- // camera app asks for [1] as described in lp:1545733. +- // [1] settings:///system/permissions?service=camera +- page = Qt.resolvedUrl("AppAccess.qml"); ++// case 'permissions': ++// page = Qt.resolvedUrl("AppAccess.qml") ++// break; ++ } ++// } else if (pluginOptions && pluginOptions['service']) { ++// // This whole else if branch will be removed once the ++// // camera app asks for [1] as described in lp:1545733. ++// // [1] settings:///system/permissions?service=camera ++// page = Qt.resolvedUrl("AppAccess.qml"); + } + if (page) { + pageStack.addPageToNextColumn(root, page, opts); +@@ -222,10 +222,10 @@ + value: locationActionGroup.enabled.state + } + +- SettingsListItems.SingleValueProgression { +- text: i18n.tr("App permissions") +- onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) +- } ++// SettingsListItems.SingleValueProgression { ++// text: i18n.tr("App permissions") ++// onClicked: pageStack.addPageToNextColumn(root, Qt.resolvedUrl("AppAccess.qml"), {pluginManager: pluginManager}) ++// } + } + } + } +--- a/plugins/security-privacy/plugin.cpp ++++ b/plugins/security-privacy/plugin.cpp +@@ -37,7 +37,7 @@ + Q_ASSERT(uri == QLatin1String("Lomiri.SystemSettings.SecurityPrivacy")); + qmlRegisterSingletonType(uri, 1, 0, "Connectivity", connectivitySingeltonProvider); + qmlRegisterType(uri, 1, 0, "LomiriSecurityPrivacyPanel"); +- qmlRegisterType(uri, 1, 0, "TrustStoreModel"); ++// qmlRegisterType(uri, 1, 0, "TrustStoreModel"); + } + + void BackendPlugin::initializeEngine(QQmlEngine *engine, const char *uri) +--- a/tests/plugins/CMakeLists.txt ++++ b/tests/plugins/CMakeLists.txt +@@ -4,7 +4,7 @@ + add_subdirectory(bluetooth) + add_subdirectory(wifi) + add_subdirectory(notifications) +-add_subdirectory(security-privacy) ++#add_subdirectory(security-privacy) + + set(qmltest_DEFAULT_TARGETS qmluitests) + set(qmltest_DEFAULT_PROPERTIES ENVIRONMENT "LC_ALL=C") diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/2013_show-hotspot-on-desktop.patch b/anda/desktops/lomiri-unity/lomiri-system-settings/2013_show-hotspot-on-desktop.patch new file mode 100644 index 0000000000..2325e07504 --- /dev/null +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/2013_show-hotspot-on-desktop.patch @@ -0,0 +1,24 @@ +Description: Show hotspot feature on any device, not just phones. +Author: Mike Gabriel +Forwarded: not yet, Debian-specific for now + +--- a/plugins/hotspot/hotspot.settings ++++ b/plugins/hotspot/hotspot.settings +@@ -6,7 +6,8 @@ + "category": "network", + "priority": 2, + "form-factors": [ +- "phone" ++ "phone", ++ "tablet" + ], + "keywords": [ + "network", +@@ -14,6 +15,6 @@ + "tethering" + ], + "has-dynamic-keywords": false, +- "has-dynamic-visibility": true, ++ "has-dynamic-visibility": false, + "page-component": "PageComponent.qml" + } diff --git a/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec b/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec index a85c39e1ef..1942eff44c 100644 --- a/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec +++ b/anda/desktops/lomiri-unity/lomiri-system-settings/lomiri-system-settings.spec @@ -1,16 +1,17 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri-system-settings -%global commit 41b59dcc15bcd9ad237ec65d178e410e2ab239ee +%global commit 4490d86b835b0487bdc11f7a3bdf490ecdaa2074 %forgemeta Name: lomiri-system-settings -Version: 1.3.0 +Version: 1.3.2 Release: 1%?dist Summary: The system settings application for Lomiri License: GPLv3 URL: https://gitlab.com/ubports/development/core/lomiri-system-settings Source0: %{url}/-/archive/%commit/lomiri-system-settings-%commit.tar.gz -Patch0: https://sources.debian.org/data/main/l/lomiri-system-settings/1.0.1-2/debian/patches/1001_use-maliit-keyboard-for-language-plugin.patch -Patch1: https://sources.debian.org/data/main/l/lomiri-system-settings/1.0.1-2/debian/patches/2001_disable-current-language-switching.patch +Patch0: 2002_use-Noto-font-instead-of-Ubuntu-font.patch +Patch1: 2011_build-without-trust-store.patch +Patch2: 2013_show-hotspot-on-desktop.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -73,10 +74,10 @@ developing applications that use %{name}. %dir %{_datadir}/lomiri-system-settings %{_datadir}/lomiri-system-settings/*.settings %{_datadir}/lomiri-system-settings/*.svg -%{_datadir}/lomiri-system-settings/*.png +%dnl %{_datadir}/lomiri-system-settings/*.png %{_datadir}/lomiri-system-settings/url-map.ini -%dir %{_datadir}/lomiri-system-settings/icons -%{_datadir}/lomiri-system-settings/icons/*.svg +%dnl %dir %{_datadir}/lomiri-system-settings/icons +%dnl %{_datadir}/lomiri-system-settings/icons/*.svg %{_datadir}/lomiri-system-settings/qml-plugins/ %{_datadir}/lomiri-url-dispatcher/urls/lomiri-system-settings.url-dispatcher diff --git a/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec b/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec index 3fdcdb363a..89e4666c5b 100644 --- a/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec +++ b/anda/desktops/lomiri-unity/lomiri-ui-toolkit/lomiri-ui-toolkit.spec @@ -4,14 +4,13 @@ Name: lomiri-ui-toolkit Version: 1.3.5110 -Release: 1%?dist +Release: 2%?dist Summary: QML components to ease the creation of beautiful applications in QML for Lomiri License: LGPL-3.0 URL: https://gitlab.com/ubports/development/core/lomiri-ui-toolkit Source0: %{url}/-/archive/%commit/lomiri-ui-toolkit-%commit.tar.gz -Patch0: https://sources.debian.org/data/main/l/lomiri-ui-toolkit/1.3.5010%2Bdfsg-1/debian/patches/0002-fix-tests-on-qt-5.15.5.patch -Patch1: https://sources.debian.org/data/main/l/lomiri-ui-toolkit/1.3.5010%2Bdfsg-1/debian/patches/2003_stop-using-Ubuntu-fonts.patch +Patch0: https://sources.debian.org/data/main/l/lomiri-ui-toolkit/1.3.5110+dfsg-2/debian/patches/2003_stop-using-Ubuntu-fonts.patch BuildRequires: pkgconfig BuildRequires: make @@ -31,9 +30,12 @@ BuildRequires: qt5-qtfeedback BuildRequires: qt5-qtsystems-devel BuildRequires: qt5-qtdeclarative-devel BuildRequires: qt5-pim-devel +BuildRequires: python3-devel BuildRequires: python3-rpm-macros BuildRequires: qt5-qtsvg-devel BuildRequires: fdupes +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) Requires: qt5-qtgraphicaleffects Requires: qt5-qtfeedback @@ -82,7 +84,13 @@ Examples for Lomiri-ui-toolkit. %build %{qmake_qt5} 'CONFIG+=ubuntu-uitk-compat' 'CONFIG+=test' - +pushd tests/autopilot +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif +popd %make_build %install @@ -92,6 +100,15 @@ rm -rf %{buildroot}%{_qt5_qmldir}/Extinct %fdupes %buildroot%_libdir/qt5/qml/Lomiri/Components/ %fdupes %buildroot%_libdir/qt5/examples/%name/examples/ +pushd tests/autopilot +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif +mv lomiriuitoolkit/{tests,_custom_proxy_objects} -t %{buildroot}%{python3_sitelib}/lomiriuitoolkit/ +popd + %find_lang %{name} %find_lang %{name}-gallery @@ -138,6 +155,11 @@ rm -rf %{buildroot}%{_qt5_qmldir}/Extinct %{python3_sitelib}/lomiriuitoolkit/_custom_proxy_objects/ %{python3_sitelib}/lomiriuitoolkit/__pycache__/ %{python3_sitelib}/lomiriuitoolkit/tests/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/lomiriuitoolkit-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/lomiriuitoolkit-%{version}.dist-info/ +%endif %files doc %license COPYING.CC-BY-SA-3.0 diff --git a/anda/desktops/lomiri-unity/lomiri-url-dispatcher/lomiri-url-dispatcher.spec b/anda/desktops/lomiri-unity/lomiri-url-dispatcher/lomiri-url-dispatcher.spec index d8e74dad10..338303c598 100644 --- a/anda/desktops/lomiri-unity/lomiri-url-dispatcher/lomiri-url-dispatcher.spec +++ b/anda/desktops/lomiri-unity/lomiri-url-dispatcher/lomiri-url-dispatcher.spec @@ -1,10 +1,10 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri-url-dispatcher -%global commit 6b6f2277e2a63fe0893c1fddd1cc75da5da87eb7 +%global commit 8aa052982ef67fdd130ee7b5d4731eb2162e4e47 %forgemeta Name: lomiri-url-dispatcher -Version: 0.1.3 -Release: 2%{?dist} +Version: 0.1.4 +Release: 1%?dist Summary: A small library for handling URLs over dbus License: LGPL-3.0 diff --git a/anda/desktops/lomiri-unity/lomiri/lomiri.spec b/anda/desktops/lomiri-unity/lomiri/lomiri.spec index e2fae98e87..4b68a9d6e8 100644 --- a/anda/desktops/lomiri-unity/lomiri/lomiri.spec +++ b/anda/desktops/lomiri-unity/lomiri/lomiri.spec @@ -1,9 +1,9 @@ %global forgeurl https://gitlab.com/ubports/development/core/lomiri -%global commit 0b85fddd0123c86fe6b3464143df86a6d0ad6bb9 +%global commit 39840a77525e57f29cde9d6773bd2742feae2486 %forgemeta Name: lomiri -Version: 0.3.0 +Version: 0.5.0 Release: 1%?dist Summary: A convergent desktop environment by Ubports diff --git a/anda/desktops/lomiri-unity/unity-session/unity-session.spec b/anda/desktops/lomiri-unity/unity-session/unity-session.spec index 4571f30150..3b16f3fe93 100644 --- a/anda/desktops/lomiri-unity/unity-session/unity-session.spec +++ b/anda/desktops/lomiri-unity/unity-session/unity-session.spec @@ -2,7 +2,7 @@ Name: unity-session Summary: Lightdm profile for Unity 7 -Version: 47.0.1 +Version: 48.0 Release: 1%?dist License: GPL-2.0 diff --git a/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec b/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec index db0267dd2e..b8816bd7b5 100644 --- a/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec +++ b/anda/desktops/lomiri-unity/unity-shell/unity-shell.spec @@ -21,7 +21,7 @@ BuildRequires: pkgconfig(zeitgeist-2.0) BuildRequires: libappstream-glib-devel BuildRequires: libdbusmenu-devel BuildRequires: bamf-devel -BuildRequires: terra-libindicator-gtk3-devel +BuildRequires: libindicator-gtk3-devel BuildRequires: json-glib-devel BuildRequires: libnotify-devel BuildRequires: libsigc++20-devel @@ -30,6 +30,7 @@ BuildRequires: doxygen BuildRequires: pam-devel BuildRequires: boost-devel BuildRequires: python3-devel +BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: pkgconfig(libstartup-notification-1.0) BuildRequires: pkgconfig(nux-4.0) @@ -47,7 +48,7 @@ Requires: pam Requires: bamf-daemon Requires: unity-gtk-module-common Requires: compiz9 -Requires: terra-libindicator-gtk3 +Requires: libindicator-gtk3 Recommends: unity-greeter Recommends: unity-scope-home @@ -115,12 +116,20 @@ sed -i '/libgeis/d' CMakeLists.txt %cmake_build pushd uwidgets/ +%if 0%{?fedora} <= 41 %py3_build +%else +%pyproject_wheel +%endif popd %install pushd uwidgets/ +%if 0%{?fedora} <= 41 %py3_install +%else +%pyproject_install +%endif popd %cmake_install @@ -222,7 +231,11 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || : %doc README %license uwidgets/LICENCE %{_bindir}/uwidgets-runner +%if 0%{?fedora} <= 41 %{python3_sitearch}/uwidgets-*.egg-info/ +%else +%{python3_sitearch}/uwidgets-*.dist-info/ +%endif %{python3_sitearch}/uwidgets/ %changelog diff --git a/anda/desktops/mate/indicators/datetime/ayatana-indicator-datetime.spec b/anda/desktops/mate/indicators/datetime/ayatana-indicator-datetime.spec index 3baeddcd5e..d66ec12981 100644 --- a/anda/desktops/mate/indicators/datetime/ayatana-indicator-datetime.spec +++ b/anda/desktops/mate/indicators/datetime/ayatana-indicator-datetime.spec @@ -1,6 +1,6 @@ Name: ayatana-indicator-datetime Summary: A GTK implementation of the StatusNotifierItem Specification -Version: 24.5.0 +Version: 25.4.0 Release: 1%?dist License: GPL-3.0 URL: https://github.com/AyatanaIndicators/ayatana-indicator-datetime diff --git a/anda/desktops/mate/indicators/messages/ayatana-indicator-messages.spec b/anda/desktops/mate/indicators/messages/ayatana-indicator-messages.spec index 2e2b00a231..163a7595a2 100644 --- a/anda/desktops/mate/indicators/messages/ayatana-indicator-messages.spec +++ b/anda/desktops/mate/indicators/messages/ayatana-indicator-messages.spec @@ -1,6 +1,6 @@ Name: ayatana-indicator-messages Summary: Ayatana Indicator Messages Applet -Version: 24.5.0 +Version: 24.5.1 Release: 1%?dist License: GPLv3 URL: https://github.com/AyatanaIndicators/ayatana-indicator-messages diff --git a/anda/desktops/mate/indicators/session/ayatana-indicator-session.spec b/anda/desktops/mate/indicators/session/ayatana-indicator-session.spec index c35f995bc6..9ff7fc8609 100644 --- a/anda/desktops/mate/indicators/session/ayatana-indicator-session.spec +++ b/anda/desktops/mate/indicators/session/ayatana-indicator-session.spec @@ -1,6 +1,6 @@ Name: ayatana-indicator-session Summary: Ayatana Indicator Session Applet -Version: 24.5.0 +Version: 24.5.1 Release: 1%?dist License: GPL-3.0 URL: https://github.com/AyatanaIndicators/ayatana-indicator-session diff --git a/anda/desktops/mate/indicators/sound/ayatana-indicator-sound.spec b/anda/desktops/mate/indicators/sound/ayatana-indicator-sound.spec index 8e93b0d392..46730f6994 100644 --- a/anda/desktops/mate/indicators/sound/ayatana-indicator-sound.spec +++ b/anda/desktops/mate/indicators/sound/ayatana-indicator-sound.spec @@ -1,6 +1,6 @@ Name: ayatana-indicator-sound Summary: Ayatana Indicator Sound Applet -Version: 24.5.1 +Version: 24.5.2 Release: 1%?dist License: GPLv3 URL: https://github.com/AyatanaIndicators/ayatana-indicator-sound diff --git a/anda/desktops/mate/tweak/mate-tweak.spec b/anda/desktops/mate/tweak/mate-tweak.spec index 3a84b0eea5..f7dfeb93db 100644 --- a/anda/desktops/mate/tweak/mate-tweak.spec +++ b/anda/desktops/mate/tweak/mate-tweak.spec @@ -8,7 +8,7 @@ License: GPL-2.0 URL: https://github.com/ubuntu-mate/mate-tweak Source0: %url/archive/refs/tags/%version.tar.gz Requires: python3 -BuildRequires: python3dist(setuptools) rpm_macro(py3_build) intltool desktop-file-utils +BuildRequires: python3dist(setuptools) python3-devel python3dist(pip) intltool desktop-file-utils %description This is MATE Tweak, a fork of mintDesktop. @@ -19,10 +19,21 @@ python3 -m ensurepip python3 -m pip install distutils-extra-python %build +%if 0%{?fedora} <= 41 %py3_build +%else +%pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 %py3_install +%else +%pyproject_install +desktop-file-install data/*.desktop +cp -r %{buildroot}%{python3_sitelib}%{_prefix} -t %{buildroot} --preserve=all +rm -rf %{buildroot}%{python3_sitelib}%{_prefix} +%endif %check desktop-file-validate %buildroot%_datadir/applications/*.desktop @@ -39,9 +50,13 @@ desktop-file-validate %buildroot%_datadir/applications/*.desktop %_datadir/applications/%name.desktop %_datadir/applications/marco-{glx,no-composite,xr_glx_hybrid,xrender}.desktop %_datadir/polkit-1/actions/org.mate.%name.policy -%ghost %_prefix/lib/python3.*/site-packages/__pycache__ -%ghost %_prefix/lib/python3.*/site-packages/setup.py -%ghost %_prefix/lib/python3.*/site-packages/mate_tweak-%version-py3.*.egg-info/ +%{python3_sitelib}/__pycache__/ +%{python3_sitelib}/setup.py +%if 0%{?fedora} <= 41 +%{python3_sitelib}/mate_tweak-%version-py3.*.egg-info/ +%else +%{python3_sitelib}/mate_tweak-%{version}.dist-info/ +%endif %changelog %autochangelog diff --git a/anda/desktops/owl/anda.hcl b/anda/desktops/mwc/anda.hcl similarity index 72% rename from anda/desktops/owl/anda.hcl rename to anda/desktops/mwc/anda.hcl index a1210fb60c..25f863cc82 100644 --- a/anda/desktops/owl/anda.hcl +++ b/anda/desktops/mwc/anda.hcl @@ -1,6 +1,6 @@ project pkg { rpm { - spec = "owl.spec" + spec = "mwc.spec" } labels { nightly = 1 diff --git a/anda/desktops/owl/owl.spec b/anda/desktops/mwc/mwc.spec similarity index 59% rename from anda/desktops/owl/owl.spec rename to anda/desktops/mwc/mwc.spec index 48da27c9e3..c7bd207b98 100644 --- a/anda/desktops/owl/owl.spec +++ b/anda/desktops/mwc/mwc.spec @@ -1,22 +1,25 @@ -%global commit 15c6a00e3ee85bce1bff812b69652b1e3211f637 -%global commit_date 20250221 +%global commit 33b49684edb7a8ac65bbca4d7378959208fbe604 +%global commit_date 20250317 %global shortcommit %{sub %{commit} 1 7 } +%global ver 0.1.3 -Name: owl -Version: 0^%{commit_date}.%{shortcommit} +Name: mwc +Version: %{ver}^%{commit_date}git.%{shortcommit} Release: 1%{?dist} -Summary: Tiling Wayland compositor based on wlroots +Summary: Tiling Wayland compositor based on wlroots and scenefx License: MIT -URL: https://github.com/dqrk0jeste/owl +URL: https://github.com/dqrk0jeste/mwc Source0: %{url}/archive/%{commit}.tar.gz -BuildRequires: make gcc +BuildRequires: meson +BuildRequires: gcc BuildRequires: pkgconfig(libinput) +BuildRequires: pkgconfig(scenefx-0.2) +BuildRequires: pkgconfig(wlroots-0.18) BuildRequires: pkgconfig(wayland-protocols) BuildRequires: pkgconfig(xkbcommon) BuildRequires: wayland-devel -BuildRequires: wlroots-devel Requires: libdrm Requires: libinput @@ -30,6 +33,9 @@ Recommends: waybar kitty rofi-wayland Packager: sadlerm +Provides: owl = %{version}-%{release} +Obsoletes: owl < 0^20250124.9999999 + %description %{summary}. @@ -37,15 +43,12 @@ Packager: sadlerm %autosetup -n %{name}-%{commit} %build -%make_build all +%meson +%meson_build %install -install -Dm755 build/%{name} %{buildroot}%{_bindir}/%{name} -install -Dm755 build/%{name}-ipc %{buildroot}%{_bindir}/%{name}-ipc -install -Dm644 default.conf %{buildroot}%{_datadir}/%{name}/default.conf +%meson_install install -Dm644 examples/example.conf %{buildroot}%{_datadir}/%{name}/example.conf -install -Dm644 %{name}.desktop %{buildroot}%{_datadir}/wayland-sessions/%{name}.desktop -install -Dm644 %{name}-portals.conf %{buildroot}%{_datadir}/xdg-desktop-portal/%{name}-portals.conf %files %license LICENSE @@ -59,5 +62,8 @@ install -Dm644 %{name}-portals.conf %{buildroot}%{_datadir}/xdg-desktop-portal/% %changelog +* Thu Feb 27 2025 sadlerm +- New upstream name +- Package is now built with meson * Fri Jan 31 2025 sadlerm - Initial package diff --git a/anda/desktops/mwc/update.rhai b/anda/desktops/mwc/update.rhai new file mode 100644 index 0000000000..f8423343de --- /dev/null +++ b/anda/desktops/mwc/update.rhai @@ -0,0 +1,9 @@ +if filters.contains("nightly") { + rpm.global("commit", gh_commit("dqrk0jeste/mwc")); + let v = gh("dqrk0jeste/mwc"); + if rpm.changed() { + rpm.global("commit_date", date()); + v.crop(1); + rpm.global("ver", v); + } +} diff --git a/anda/desktops/owl/update.rhai b/anda/desktops/owl/update.rhai deleted file mode 100644 index 83e6cb9536..0000000000 --- a/anda/desktops/owl/update.rhai +++ /dev/null @@ -1,6 +0,0 @@ -if filters.contains("nightly") { - rpm.global("commit", gh_commit("dqrk0jeste/owl")); - if rpm.changed() { - rpm.global("commit_date", date()); - } -} diff --git a/anda/desktops/swayfx/swayfx.spec b/anda/desktops/swayfx/swayfx.spec index 933234d262..06f88fbff5 100644 --- a/anda/desktops/swayfx/swayfx.spec +++ b/anda/desktops/swayfx/swayfx.spec @@ -1,8 +1,8 @@ -%global swayVersion 1.9 +%global swayVersion 1.10.1 Name: swayfx -Version: 0.4 -Release: 2%{?dist} +Version: 0.5.2 +Release: 1%?dist Summary: SwayFX: Sway, but with eye candy! URL: https://github.com/WillPower3309/swayfx @@ -21,7 +21,7 @@ BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(json-c) >= 0.13 BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libevdev) -BuildRequires: pkgconfig(libinput) >= 1.21.0 +BuildRequires: pkgconfig(libinput) >= 1.26.0 BuildRequires: pkgconfig(libpcre2-8) BuildRequires: pkgconfig(libsystemd) >= 239 BuildRequires: pkgconfig(libudev) @@ -33,8 +33,8 @@ BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(wayland-cursor) BuildRequires: pkgconfig(wayland-server) >= 1.21.0 BuildRequires: pkgconfig(wayland-protocols) >= 1.24 -BuildRequires: (pkgconfig(wlroots) >= 0.17.0 with pkgconfig(wlroots) < 0.18) -BuildRequires: (pkgconfig(scenefx) >= 0.1 with pkgconfig(scenefx) < 0.2) +BuildRequires: pkgconfig(scenefx-0.4) +BuildRequires: pkgconfig(wlroots-0.19) BuildRequires: pkgconfig(xcb) BuildRequires: pkgconfig(xcb-icccm) BuildRequires: pkgconfig(xkbcommon) >= 1.5.0 @@ -46,7 +46,7 @@ Conflicts: sway Provides: sway = %{swayVersion} -Packager: Atmois +Packager: Atmois %description %{summary} @@ -61,15 +61,6 @@ Provides: sway-config = %{version}-%{release} Conflicts: sway-config -%package wallpapers -Summary: Wallpapers for Sway -BuildArch: noarch -License: CC0 - -%description wallpapers -Wallpaper collection provided with Sway - - # Require the wallpaper referenced in the config. # Weak dependency here causes a swaynag warning during the configuration load Requires: sway-wallpapers @@ -106,10 +97,20 @@ Recommends: (qt6-qtwayland if qt6-qtbase-gui) Upstream configuration for Sway. Includes all important dependencies for a typical desktop system with minimal or no divergence from the upstream. +%package wallpapers +Summary: Wallpapers for Sway +BuildArch: noarch +License: CC0 + +%description wallpapers +Wallpaper collection provided with Sway + %prep %autosetup -N -n %{name}-%{version} +%autopatch -p1 -M99 + %build %meson \ -Dsd-bus-provider=libsystemd \ @@ -148,4 +149,4 @@ install -d -m755 -pv %{buildroot}%{_sysconfdir}/sway/config.d %files wallpapers %license assets/LICENSE -%{_datadir}/backgrounds/sway \ No newline at end of file +%{_datadir}/backgrounds/sway diff --git a/anda/desktops/waylands/eww/eww.spec b/anda/desktops/waylands/eww/eww.spec index 37ce7d415b..1a8d9634df 100644 --- a/anda/desktops/waylands/eww/eww.spec +++ b/anda/desktops/waylands/eww/eww.spec @@ -1,7 +1,7 @@ # Generated by rust2rpm 27 -%global commit 5b4cc3e7a8055afb758421f4a114ef4032806e39 +%global commit fddb4a09b107237819e661151e007b99b5cab36d %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250216 +%global commit_date 20250630 %global ver v0.6.0 %bcond check 0 diff --git a/anda/desktops/waylands/hyprgraphics/anda.hcl b/anda/desktops/waylands/hyprgraphics/anda.hcl new file mode 100644 index 0000000000..58781b3836 --- /dev/null +++ b/anda/desktops/waylands/hyprgraphics/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprgraphics.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprgraphics/hyprgraphics.nightly.spec b/anda/desktops/waylands/hyprgraphics/hyprgraphics.nightly.spec new file mode 100644 index 0000000000..10e40bbe9c --- /dev/null +++ b/anda/desktops/waylands/hyprgraphics/hyprgraphics.nightly.spec @@ -0,0 +1,67 @@ +#? https://src.fedoraproject.org/rpms/hyprgraphics/blob/rawhide/f/hyprgraphics.spec + +%global realname hyprgraphics +%global ver 0.1.5 +%global commit 157cc52065a104fc3b8fa542ae648b992421d1c7 +%global commit_date 20250821 +%global shortcommit %{sub %commit 1 7} + +%bcond libjxl 1 +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: Graphics library for Hyprland + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprgraphics +Source0: %url/archive/%commit.tar.gz +Packager: madonuko + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: (pkgconfig(hyprlang) with hyprlang.nightly-devel) +BuildRequires: pkgconfig(cairo) +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libmagic) +BuildRequires: pkgconfig(spng) + +%if %{with libjxl} +BuildRequires: pkgconfig(libjxl) +BuildRequires: pkgconfig(libjxl_cms) +BuildRequires: pkgconfig(libjxl_threads) +%endif + +%description +%{summary}. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +%pkg_devel_files + + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%check +%ifarch s390x +rm tests/resource/images/hyprland.jpg +%endif +%ctest + +%files +%license LICENSE +%doc README.md +%{_libdir}/libhyprgraphics.so.0 +%{_libdir}/libhyprgraphics.so.%{ver} diff --git a/anda/desktops/waylands/hyprgraphics/update.rhai b/anda/desktops/waylands/hyprgraphics/update.rhai new file mode 100644 index 0000000000..6a9cc301c7 --- /dev/null +++ b/anda/desktops/waylands/hyprgraphics/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprgraphics")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprgraphics", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hypridle/anda.hcl b/anda/desktops/waylands/hypridle/anda.hcl new file mode 100644 index 0000000000..40774e84d7 --- /dev/null +++ b/anda/desktops/waylands/hypridle/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "hypridle.spec" + } +} diff --git a/anda/desktops/waylands/hypridle/ci_setup.rhai b/anda/desktops/waylands/hypridle/ci_setup.rhai new file mode 100644 index 0000000000..8d5329cfb4 --- /dev/null +++ b/anda/desktops/waylands/hypridle/ci_setup.rhai @@ -0,0 +1 @@ +sh("dnf swap sdbus-cpp sdbus-cpp.terra -y --allowerasing", #{}); diff --git a/anda/desktops/waylands/hypridle/hypridle.spec b/anda/desktops/waylands/hypridle/hypridle.spec new file mode 100644 index 0000000000..bf0639fa61 --- /dev/null +++ b/anda/desktops/waylands/hypridle/hypridle.spec @@ -0,0 +1,45 @@ +Name: hypridle +Version: 0.1.6 +Release: 1%?dist +Summary: Hyprland's idle daemon +License: BSD-3-Clause +URL: https://github.com/hyprwm/hypridle +Source0: %url/archive/refs/tags/v%version.tar.gz +Packager: madonuko +BuildRequires: cmake gcc gcc-c++ +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: (pkgconfig(hyprland-protocols) with hyprland-protocols.nightly-devel) +BuildRequires: (pkgconfig(hyprlang) with hyprlang.nightly-devel) +BuildRequires: (pkgconfig(sdbus-c++) with sdbus-cpp.terra-devel) +BuildRequires: (pkgconfig(hyprwayland-scanner) with hyprwayland-scanner.nightly-devel) +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) + +%description +%summary. + +%prep +%autosetup + +%build +%cmake -DCMAKE_BUILD_TYPE:STRING=Release +%cmake_build + +%install +%cmake_install + +%post +%systemd_user_post %name.service + +%preun +%systemd_user_preun %name.service + +%postun +%systemd_user_postun_with_restart %name.service + +%files +%doc README.md +%license LICENSE +%_bindir/hypridle +%_datadir/hypr/hypridle.conf +%_userunitdir/%name.service diff --git a/anda/desktops/waylands/hypridle/update.rhai b/anda/desktops/waylands/hypridle/update.rhai new file mode 100644 index 0000000000..2c18c969ae --- /dev/null +++ b/anda/desktops/waylands/hypridle/update.rhai @@ -0,0 +1,3 @@ +let v = gh_rawfile("hyprwm/hypridle", "main", "VERSION"); +v.trim(); +rpm.version(v); diff --git a/anda/desktops/waylands/hyprland-protocols/anda.hcl b/anda/desktops/waylands/hyprland-protocols/anda.hcl new file mode 100644 index 0000000000..9c18ee2a54 --- /dev/null +++ b/anda/desktops/waylands/hyprland-protocols/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "hyprland-protocols.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprland-protocols/hyprland-protocols.nightly.spec b/anda/desktops/waylands/hyprland-protocols/hyprland-protocols.nightly.spec new file mode 100644 index 0000000000..d142180c7a --- /dev/null +++ b/anda/desktops/waylands/hyprland-protocols/hyprland-protocols.nightly.spec @@ -0,0 +1,53 @@ +#? https://src.fedoraproject.org/rpms/hyprland-protocols/blob/rawhide/f/hyprland-protocols.spec + +%global realname hyprland-protocols +%global ver 0.6.4 +%global commit 613878cb6f459c5e323aaafe1e6f388ac8a36330 +%global commit_date 20250604 +%global shortcommit %{sub %commit 1 7} + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: Wayland protocol extensions for Hyprland +BuildArch: noarch + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprland-protocols +Source0: %url/archive/%commit.tar.gz + +BuildRequires: meson +Packager: madonuko +Provides: %realname = %evr +Conflicts: %realname + +%description +%{summary}. + +%package devel +Summary: Wayland protocol extensions for Hyprland +Provides: %realname-devel = %evr +Conflicts: %realname-devel + +%description devel +%{summary}. + + +%prep +%autosetup -p1 -n %realname-%commit + + +%build +%meson +%meson_build + + +%install +%meson_install + + +%files devel +%license LICENSE +%doc README.md +%{_datadir}/pkgconfig/%{realname}.pc +%{_datadir}/%{realname}/ diff --git a/anda/desktops/waylands/hyprland-protocols/update.rhai b/anda/desktops/waylands/hyprland-protocols/update.rhai new file mode 100644 index 0000000000..b41f30603a --- /dev/null +++ b/anda/desktops/waylands/hyprland-protocols/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprland-protocols")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprland-protocols", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hyprlang/anda.hcl b/anda/desktops/waylands/hyprlang/anda.hcl new file mode 100644 index 0000000000..155ff3d3dd --- /dev/null +++ b/anda/desktops/waylands/hyprlang/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprlang.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprlang/hyprlang.nightly.spec b/anda/desktops/waylands/hyprlang/hyprlang.nightly.spec new file mode 100644 index 0000000000..2725974aea --- /dev/null +++ b/anda/desktops/waylands/hyprlang/hyprlang.nightly.spec @@ -0,0 +1,57 @@ +#? https://src.fedoraproject.org/rpms/hyprlang/blob/rawhide/f/hyprlang.spec + +%global realname hyprlang +%global ver 0.6.3 +%global commit 23f0debd2003f17bd65f851cd3f930cff8a8c809 +%global commit_date 20250728 +%global shortcommit %{sub %commit 1 7} + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: The official implementation library for the hypr config language + +License: LGPL-3.0-only +URL: https://github.com/hyprwm/hyprlang +Source0: %url/archive/%commit.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) + +Provides: %realname = %evr +Conflicts: %realname + +%description +%{summary}. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %realname-devel = %evr +Conflicts: %realname-devel +%pkg_devel_files + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%check +%ctest + +%files +%license LICENSE +%doc README.md +%{_libdir}/libhyprlang.so.2 +%{_libdir}/libhyprlang.so.%{ver} + +%changelog +%autochangelog diff --git a/anda/desktops/waylands/hyprlang/update.rhai b/anda/desktops/waylands/hyprlang/update.rhai new file mode 100644 index 0000000000..bc8ee477cb --- /dev/null +++ b/anda/desktops/waylands/hyprlang/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprlang")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprlang", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hyprlock/anda.hcl b/anda/desktops/waylands/hyprlock/anda.hcl new file mode 100644 index 0000000000..20e01b64f6 --- /dev/null +++ b/anda/desktops/waylands/hyprlock/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "hyprlock.spec" + } +} diff --git a/anda/desktops/waylands/hyprlock/ci_setup.rhai b/anda/desktops/waylands/hyprlock/ci_setup.rhai new file mode 100644 index 0000000000..8d5329cfb4 --- /dev/null +++ b/anda/desktops/waylands/hyprlock/ci_setup.rhai @@ -0,0 +1 @@ +sh("dnf swap sdbus-cpp sdbus-cpp.terra -y --allowerasing", #{}); diff --git a/anda/desktops/waylands/hyprlock/hyprlock.spec b/anda/desktops/waylands/hyprlock/hyprlock.spec new file mode 100644 index 0000000000..a1b43e5187 --- /dev/null +++ b/anda/desktops/waylands/hyprlock/hyprlock.spec @@ -0,0 +1,46 @@ +Name: hyprlock +Version: 0.9.1 +Release: 1%?dist +Summary: Hyprland's GPU-accelerated screen locking utility +License: BSD-3-Clause +URL: https://github.com/hyprwm/%name +Source0: %url/archive/refs/tags/v%version.tar.gz +Packager: madonuko +BuildRequires: cmake gcc gcc-c++ +BuildRequires: pkgconfig(cairo) +BuildRequires: (pkgconfig(hyprgraphics) with hyprgraphics.nightly-devel) +BuildRequires: pkgconfig(hyprland-protocols) +BuildRequires: (pkgconfig(hyprlang) with hyprlang.nightly-devel) +BuildRequires: (pkgconfig(hyprutils) with hyprutils.nightly-devel) +BuildRequires: (pkgconfig(hyprwayland-scanner) with hyprwayland-scanner.nightly-devel) +BuildRequires: mesa-libgbm-devel +BuildRequires: mesa-libGL-devel +BuildRequires: pkgconfig(pam) +BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(sdbus-c++) >= 2.1.0 +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libwebp) +BuildRequires: pkgconfig(libmagic) + +%description +%summary. + +%prep +%autosetup + +%build +%cmake -DCMAKE_BUILD_TYPE:STRING=Release +%cmake_build + +%install +%cmake_install + +%files +%doc README.md +%license LICENSE +%_bindir/%name +%_pam_confdir/%name +%_datadir/hypr/%name.conf diff --git a/anda/desktops/waylands/hyprlock/update.rhai b/anda/desktops/waylands/hyprlock/update.rhai new file mode 100644 index 0000000000..05b9c25c0c --- /dev/null +++ b/anda/desktops/waylands/hyprlock/update.rhai @@ -0,0 +1,3 @@ +let v = gh_rawfile("hyprwm/hyprlock", "main", "VERSION"); +v.trim(); +rpm.version(v); diff --git a/anda/desktops/waylands/hyprutils/anda.hcl b/anda/desktops/waylands/hyprutils/anda.hcl new file mode 100644 index 0000000000..e60df70391 --- /dev/null +++ b/anda/desktops/waylands/hyprutils/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprutils.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprutils/hyprutils.nightly.spec b/anda/desktops/waylands/hyprutils/hyprutils.nightly.spec new file mode 100644 index 0000000000..51920b1e13 --- /dev/null +++ b/anda/desktops/waylands/hyprutils/hyprutils.nightly.spec @@ -0,0 +1,55 @@ +#? https://src.fedoraproject.org/rpms/hyprutils/blob/rawhide/f/hyprutils.spec + +%global realname hyprutils +%global ver 0.8.3 + +%global commit b364dcb7391709acb4492e100fe750ca722992e1 +%global commit_date 20250822 +%global shortcommit %{sub %commit 1 7} + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: Hyprland utilities library used across the ecosystem + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprutils +Source0: %url/archive/%commit.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(pixman-1) + +Provides: %realname = %evr +Conflicts: %realname + +%description +%{summary}. + +%package devel +Requires: %{name}%{?_isa} = %{version}-%{release} +Provides: %realname-devel = %evr +Conflicts: %realname-devel +%pkg_devel_files + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%check +%ctest + +%files +%license LICENSE +%doc README.md +%{_libdir}/lib%{realname}.so.%{ver} +%{_libdir}/lib%{realname}.so.* diff --git a/anda/desktops/waylands/hyprutils/update.rhai b/anda/desktops/waylands/hyprutils/update.rhai new file mode 100644 index 0000000000..44759f192b --- /dev/null +++ b/anda/desktops/waylands/hyprutils/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprutils")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprutils", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/hyprwayland-scanner/anda.hcl b/anda/desktops/waylands/hyprwayland-scanner/anda.hcl new file mode 100644 index 0000000000..5bf8800d86 --- /dev/null +++ b/anda/desktops/waylands/hyprwayland-scanner/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "hyprwayland-scanner.nightly.spec" + } + labels { + nightly = 1 + subrepo = "extras" + } +} diff --git a/anda/desktops/waylands/hyprwayland-scanner/hyprwayland-scanner.nightly.spec b/anda/desktops/waylands/hyprwayland-scanner/hyprwayland-scanner.nightly.spec new file mode 100644 index 0000000000..4374f029c3 --- /dev/null +++ b/anda/desktops/waylands/hyprwayland-scanner/hyprwayland-scanner.nightly.spec @@ -0,0 +1,55 @@ +#? https://src.fedoraproject.org/rpms/hyprwayland-scanner/blob/rawhide/f/hyprwayland-scanner.spec + +%global realname hyprwayland-scanner +%global ver 0.4.5 +%global commit b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d +%global shortcommit %{sub %commit 1 7} +%global commit_date 20250815 + +Name: %realname.nightly +Version: %ver^%{commit_date}git.%shortcommit +Release: 1%?dist +Summary: A Hyprland implementation of wayland-scanner, in and for C++ + +License: BSD-3-Clause +URL: https://github.com/hyprwm/hyprwayland-scanner +Source0: %url/archive/%commit.tar.gz + +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +BuildRequires: cmake +BuildRequires: cmake(pugixml) +BuildRequires: gcc-c++ + +Provides: %realname = %evr +Conflicts: %realname +Packager: madonuko + +%description +%{summary}. + +%package devel +Summary: A Hyprland implementation of wayland-scanner, in and for C++ +Provides: %realname-devel = %evr +Conflicts: %realname-devel + +%description devel +%{summary}. + +%prep +%autosetup -p1 -n %realname-%commit + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%files devel +%license LICENSE +%doc README.md +%{_bindir}/%{realname} +%{_libdir}/pkgconfig/%{realname}.pc +%{_libdir}/cmake/%{realname}/ diff --git a/anda/desktops/waylands/hyprwayland-scanner/update.rhai b/anda/desktops/waylands/hyprwayland-scanner/update.rhai new file mode 100644 index 0000000000..4d28ecb91b --- /dev/null +++ b/anda/desktops/waylands/hyprwayland-scanner/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("hyprwm/hyprwayland-scanner")); +if rpm.changed() { + rpm.global("ver", gh_rawfile("hyprwm/hyprwayland-scanner", "main", "VERSION")); + rpm.global("commit_date", date()); +} diff --git a/anda/desktops/waylands/mpvpaper/mpvpaper.spec b/anda/desktops/waylands/mpvpaper/mpvpaper.spec index 3588295b1d..360c1b71bc 100644 --- a/anda/desktops/waylands/mpvpaper/mpvpaper.spec +++ b/anda/desktops/waylands/mpvpaper/mpvpaper.spec @@ -1,5 +1,5 @@ Name: mpvpaper -Version: 1.7 +Version: 1.8 Release: 1%?dist Summary: A video wallpaper program for wlroots based wayland compositors License: GPL-3.0-or-later diff --git a/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec b/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec index c816be8f6c..e159f77edf 100644 --- a/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec +++ b/anda/desktops/waylands/swaylock-effects/swaylock-effects.spec @@ -3,7 +3,7 @@ Name: swaylock-effects Version: 1.7.0.0^1.%{shortcommit} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Swaylock, with fancy effects License: MIT @@ -31,32 +31,7 @@ Conflicts: swaylock swaylock-effects is a fork of swaylock which adds built-in screenshots and image manipulation effects like blurring. -%package bash-completion -Summary: Bash completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{name} and bash-completion) - -%description bash-completion -Bash command-line completion support for %{name}. - -%package zsh-completion -Summary: Zsh completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: zsh -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh command-line completion support for %{name}. - -%package fish-completion -Summary: Fish completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: fish -Supplements: (%{name} and fish) - -%description fish-completion -Fish command-line completion support for %{name}. +%pkg_completion -Bfz %binary_name %prep @@ -79,15 +54,6 @@ Fish command-line completion support for %{name}. %{_mandir}/man1/%{binary_name}.1.gz %config(noreplace) %{_sysconfdir}/pam.d/%{binary_name} -%files bash-completion -%{bash_completions_dir}/%{binary_name} - -%files zsh-completion -%{zsh_completions_dir}/_%{binary_name} - -%files fish-completion -%{fish_completions_dir}/%{binary_name}.fish - %changelog * Tue Feb 04 2025 sadlerm diff --git a/anda/desktops/waylands/swww/swww.spec b/anda/desktops/waylands/swww/swww.spec index b6d19e5097..31a49d129b 100644 --- a/anda/desktops/waylands/swww/swww.spec +++ b/anda/desktops/waylands/swww/swww.spec @@ -1,16 +1,19 @@ Name: swww -Version: 0.9.5 +Version: 0.10.3 Release: 1%?dist Summary: Wallpaper daemon for Wayland SourceLicense: GPL-3.0-only -License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND BSD-3-Clause AND (CC0-1.0 OR Apache-2.0) AND ISC AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) +License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) URL: https://github.com/LGFae/swww Source0: %url/archive/refs/tags/v%version.tar.gz +Packager: madonuko BuildRequires: anda-srpm-macros rust-packaging rpm_macro(bash_completions_dir) mold BuildRequires: scdoc BuildRequires: zstd BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-protocols) %description swww is a wallpaper daemon for Wayland that is controlled @@ -56,8 +59,8 @@ Zsh command-line completion support for %{name}. ./doc/gen.sh %install -%{cargo_install} & -cd daemon && %{cargo_install} & +(cd client && %{cargo_install}) & +(cd daemon && %{cargo_install}) & wait install -Dm644 -T completions/swww.bash %buildroot%bash_completions_dir/swww install -Dm644 -T completions/swww.fish %buildroot%fish_completions_dir/swww.fish @@ -73,7 +76,6 @@ install -Dm644 -t %buildroot%_mandir/man1 doc/generated/swww*1 %_mandir/man1/%name-clear.1.gz %_mandir/man1/%name-daemon.1.gz %_mandir/man1/%name-img.1.gz -%_mandir/man1/%name-init.1.gz %_mandir/man1/%name-kill.1.gz %_mandir/man1/%name-query.1.gz %_mandir/man1/%name-restore.1.gz diff --git a/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec b/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec index 0b82a98047..e271bd86e8 100644 --- a/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec +++ b/anda/desktops/waylands/walker/golang-github-abenz1267-walker.spec @@ -12,7 +12,7 @@ # https://github.com/abenz1267/walker %global goipath github.com/abenz1267/walker -Version: 0.12.16 +Version: 1.0.0.beta.5 %gometa -f diff --git a/anda/desktops/waylands/wpaperd/wpaperd.spec b/anda/desktops/waylands/wpaperd/wpaperd.spec index 495ff7d603..88e02a43a1 100644 --- a/anda/desktops/waylands/wpaperd/wpaperd.spec +++ b/anda/desktops/waylands/wpaperd/wpaperd.spec @@ -1,9 +1,8 @@ -%global elvish_completions_dir %_datadir/elvish/lib/completions -%bcond check 1 +%bcond check 0 Name: wpaperd -Version: 1.1.1 -Release: 1%?dist +Version: 1.2.2 +Release: 2%?dist Summary: Modern wallpaper daemon for Wayland License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR Artistic-2.0) AND GPL-3.0+ AND ISC AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) SourceLicense: GPL-3.0-or-later @@ -32,41 +31,7 @@ Supplements: wpaperd %description doc Man papes for %name. -%package bash-completion -Summary: Bash completion for %name -Requires: %{name} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{name} and bash-completion) - -%description bash-completion -Bash command line completion support for %{name}. - -%package elvish-completion -Summary: Elvish completion for %name -Requires: %{name} = %{version}-%{release} -Requires: elvish -Supplements: (%{name} and elvish-completion) - -%description elvish-completion -Elvish command line completion support for %{name}. - -%package fish-completion -Summary: Fish completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: fish -Supplements: (%{name} and fish) - -%description fish-completion -Fish command line completion support for %{name}. - -%package zsh-completion -Summary: Zsh completion for %{name} -Requires: %{name} = %{version}-%{release} -Requires: zsh -Supplements: (%{name} and zsh) - -%description zsh-completion -Zsh command line completion support for %{name}. +%pkg_completion -befz wpaperctl wpaperd %prep @@ -111,22 +76,6 @@ install -Dpm644 -t %buildroot%zsh_completions_dir target/rpm/completions/_* %_mandir/man1/wpaperd.1.gz %_mandir/man5/wpaperd-output.5.gz -%files bash-completion -%bash_completions_dir/wpaperctl.bash -%bash_completions_dir/wpaperd.bash - -%files elvish-completion -%elvish_completions_dir/wpaperctl.elv -%elvish_completions_dir/wpaperd.elv - -%files fish-completion -%fish_completions_dir/wpaperctl.fish -%fish_completions_dir/wpaperd.fish - -%files zsh-completion -%zsh_completions_dir/_wpaperctl -%zsh_completions_dir/_wpaperd - %changelog * Fri Dec 20 2024 madonuko - 1.1.1-1 - Initial package diff --git a/anda/devs/android-studio/stable/anda.hcl b/anda/devs/android-studio/stable/anda.hcl new file mode 100644 index 0000000000..25dfdd9494 --- /dev/null +++ b/anda/devs/android-studio/stable/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "android-studio.spec" + } +} diff --git a/anda/devs/android-studio/stable/android-studio.spec b/anda/devs/android-studio/stable/android-studio.spec new file mode 100644 index 0000000000..e69433345c --- /dev/null +++ b/anda/devs/android-studio/stable/android-studio.spec @@ -0,0 +1,66 @@ +%global debug_package %{nil} +%define __requires_exclude ^/usr/libexec/android-studio/.*$ +%define __provides_exclude ^/usr/libexec/android-studio/.*$ +%global __requires_exclude ^libaaudio\\.so.*|^libandroid\\.so.*|^libmediandk\\.so.*|^liblog\\.so.*|^libc\\.so.*|^libm\\.so.*|^libdl\\.so.*|^libcrypt\\.so.*|^libstdc\\+\\+\\.so.*|^libncursesw\\.so.*|^libtinfo\\.so.*|^libnsl\\.so.*|^libpanelw\\.so.*$ + +Name: android-studio +Version: 2025.1.2.12 +Release: 1%{?dist} +Summary: Official IDE for Android development +License: Apache-2.0 +Packager: like-engels +URL: https://developer.android.com/studio +Source0: https://dl.google.com/dl/android/studio/ide-zips/%{version}/android-studio-%{version}-linux.tar.gz + +Requires: alsa-lib +Requires: freetype +Requires: which +Requires: libXrender +Requires: libXtst +Requires: glibc +Requires: libsecret + +%description +Android Studio is the official IDE for Android development, and includes everything you need to build Android apps. + +%prep +%setup -q -n android-studio + +%install +mkdir -p %{buildroot}%{_libexecdir}/%{name} + +cp -a * %{buildroot}%{_libexecdir}/%{name} + +mkdir -p %{buildroot}%{_bindir} +ln -s %{_libexecdir}/%{name}/bin/studio %{buildroot}%{_bindir}/%{name} + +mkdir -p %{buildroot}%{_licensedir}/%{name} +install -Dm644 LICENSE.txt %{buildroot}%{_licensedir}/%{name}/LICENSE.txt + +install -Dm644 bin/studio.png %{buildroot}%{_datadir}/pixmaps/%{name}.png + +mkdir -p %{buildroot}%{_datadir}/applications +cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << 'EOF' +[Desktop Entry] +Version=1.0 +Type=Application +Name=Android Studio +Exec=android-studio %f +Icon=android-studio +Comment=The official Android IDE +Categories=Development;IDE; +Terminal=false +StartupNotify=true +StartupWMClass=jetbrains-studio +MimeType=application/x-extension-iml; +EOF + +%files +%license %{_licensedir}/%{name}/LICENSE.txt +%{_libexecdir}/%{name} +%{_bindir}/%{name} +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/applications/%{name}.desktop + +%changelog +%autochangelog diff --git a/anda/devs/android-studio/stable/update.rhai b/anda/devs/android-studio/stable/update.rhai new file mode 100644 index 0000000000..ef1c8dc082 --- /dev/null +++ b/anda/devs/android-studio/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(find(`https://redirector.gvt1.com/edgedl/android/studio/ide-zips/([\d.]+)/android-studio-[\d.]+-linux.tar.gz`, get("https://developer.android.com/studio"), 1)); diff --git a/anda/devs/asar/asar.spec b/anda/devs/asar/asar.spec index fdebd68ffd..bd4143cd8b 100644 --- a/anda/devs/asar/asar.spec +++ b/anda/devs/asar/asar.spec @@ -7,7 +7,7 @@ %global __provides_exclude_from %{_datadir}/%{name}/.*\\.so Name: asar -Version: 3.3.1 +Version: 4.0.1 Release: 1%?dist Summary: Simple extensive tar-like archive format with indexing License: MIT diff --git a/anda/devs/atac/anda.hcl b/anda/devs/atac/anda.hcl new file mode 100644 index 0000000000..326f9fa7dc --- /dev/null +++ b/anda/devs/atac/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "atac.spec" + } +} diff --git a/anda/devs/atac/atac.spec b/anda/devs/atac/atac.spec new file mode 100644 index 0000000000..e9ae8387e3 --- /dev/null +++ b/anda/devs/atac/atac.spec @@ -0,0 +1,43 @@ +%global crate atac + +%if 0%{?fedora} >= 42 +%global build_cflags %{__build_flags_lang_c} %{?_distro_extra_cflags} -std=gnu18 +%endif +%global __brp_mangle_shebangs %{nil} + +Name: atac +Version: 0.20.2 +Release: 1%?dist +Summary: Arguably a Terminal API Client + +License: MIT +URL: https://crates.io/crates/atac +Source: %{crates_source} + +Packager: xiaoshihou +BuildRequires: anda-srpm-macros cargo-rpm-macros mold + +%global _description %{expand: +Arguably a Terminal API Client. Feature-full, free, open-source, offline +and account-less.} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license LICENSE.dependencies +%doc README.md +%{_bindir}/%{crate} + + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies +%{cargo_build} --locked + +%install +%crate_install_bin diff --git a/anda/devs/atac/update.rhai b/anda/devs/atac/update.rhai new file mode 100644 index 0000000000..ffe2bc5881 --- /dev/null +++ b/anda/devs/atac/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("atac")); diff --git a/anda/devs/backport/anda.hcl b/anda/devs/backport/anda.hcl new file mode 100644 index 0000000000..4ba8d7de29 --- /dev/null +++ b/anda/devs/backport/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + rpm { + spec = "nodejs-backport.spec" + pre_script = "setup.sh" + } +} diff --git a/anda/devs/backport/nodejs-backport.spec b/anda/devs/backport/nodejs-backport.spec new file mode 100644 index 0000000000..012dad3a40 --- /dev/null +++ b/anda/devs/backport/nodejs-backport.spec @@ -0,0 +1,61 @@ +%global debug_package %{nil} +%global module backport +%bcond test 1 + +Name: node-%{module} +Version: 10.0.1 +Release: 1%?dist +Summary: Backport GitHub commits +SourceLicense: Apache-2.0 +License: Apache-2.0 AND +URL: https://github.com/sorenlouv/%{module} +%dnl Source0: http://registry.npmjs.org/%{module}/-/%{module}-%{version}.tgz +# Source the tests +Source1: tests-%{version}.tar.bz2 +BuildRequires: bsdtar +BuildRequires: nodejs-devel +BuildRequires: nodejs-packaging +BuildRequires: nodejs-npm +ExclusiveArch: %{nodejs_arches} noarch +Packager: Gilver E. + +%description +A simple CLI tool that automates the process of backporting commits on a GitHub repo. + +%prep +# Maybe I should make some NodeJS online macros... +# Global flag is needed or the module WILL NOT WORK via commandline without some manual intervention +npm install -g %{module}@%{version} --prefix=. +%setup -T -D -n lib/node_modules/%{module} +tar xjf %{SOURCE1} + +%build +# Empty build section, because RPM reasons + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{module} +mkdir -p %{buildroot}%{_bindir} +cp -r ./* -t %{buildroot}%{nodejs_sitelib}/%{module} +ln -sf %{nodejs_sitelib}/%{module}/bin/%{module} %{buildroot}%{_bindir}/%{module} + +# Should maybe package this so it's easier to call... +npm install -g license-checker --prefix=. +# This could also be made into a macro maybe? +bin/license-checker | sed '/.*repository:.*/d;/.*publisher:.*/d;/.*email:.*/d;/.*url:.*/d;/.*path:.*/d;/.*licenseFile:.*/d;/.*noticeFile:.*/d' > LICENSE.modules + +%check +%if %{with test} +NODE_ENV=test %{builddir}/bin/%{module} -R tests +%endif + +%files +%doc CHANGELOG.md +%doc README.md +%license LICENSE.txt +%license LICENSE.modules +%{nodejs_sitelib}/%{module}/ +%{_bindir}/%{module} + +%changelog +* Wed Jul 2 2025 Gilver E. - 9.6.6-1 +- Initial package diff --git a/anda/devs/backport/post.rhai b/anda/devs/backport/post.rhai new file mode 100644 index 0000000000..7ec2290326 --- /dev/null +++ b/anda/devs/backport/post.rhai @@ -0,0 +1 @@ +sh("rm -rfv anda/devs/backport/*.tar.bz2", #{}); diff --git a/anda/devs/backport/setup.sh b/anda/devs/backport/setup.sh new file mode 100755 index 0000000000..a6a7359998 --- /dev/null +++ b/anda/devs/backport/setup.sh @@ -0,0 +1,28 @@ +#!/usr/bin/bash + +## Some sources need to be fetched BEFORE the build process +# Also I'm just better at scripting in Bash and calling the Rhai sh function hundreds of times times sounded like hell +# Have I mentioned I hate runtime languages? + +node=backport +# Enable logs for debugging +set -x +# I guess just $PWD doesn't work for this +builddir=$(pwd)/anda/devs/$node + +# We only need the tests folder so sourcing the whole repo is overkill, Git can make a tarball of specific directories + +pushd $builddir +ver=$(cat ./*.spec | grep -P -m1 'Version:' | sed -e 's/Version://g' -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//') +url=$(sed -n 's/^URL:\s\(.*\)$/\1/p' ./*.spec | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' -e "s/%{module}/$node/") +dir=$node + +git clone --recurse-submodules -j$(nproc) $url.git + +pushd $dir +# I'm not sure why .tar.bz2 is the tar format of choice for this but it's also what Fedora does so it's what I'm doing +git archive --format=tar --prefix=tests/ v${ver}:src/test/ | bzip2 > ../tests-${ver}.tar.bz2 +popd +rm -rf $dir + +exit 0 diff --git a/anda/devs/backport/update.rhai b/anda/devs/backport/update.rhai new file mode 100644 index 0000000000..77c845c194 --- /dev/null +++ b/anda/devs/backport/update.rhai @@ -0,0 +1 @@ +rpm.version(npm("backport")); diff --git a/anda/devs/bun/bun-bin.spec b/anda/devs/bun/bun-bin.spec index 681b3c7d97..c374d2ad30 100644 --- a/anda/devs/bun/bun-bin.spec +++ b/anda/devs/bun/bun-bin.spec @@ -1,12 +1,12 @@ %define debug_package %nil %ifarch x86_64 -%global a x64 +%global a x64-baseline %elifarch aarch64 %global a aarch64 %endif Name: bun-bin -Version: 1.2.2 +Version: 1.2.20 Release: 1%?dist Summary: Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one License: MIT @@ -17,10 +17,10 @@ BuildRequires: unzip %description %summary. +%pkg_completion -bfz bun + %prep -unzip %SOURCE0 -%global buildsubdir bun-linux-%a -cd %buildsubdir +%autosetup -n bun-linux-%a cat< LICENSE MIT License @@ -61,6 +61,3 @@ ln -s bun %buildroot%_bindir/bunx %license LICENSE %_bindir/bun %_bindir/bunx -%bash_completions_dir/bun.bash -%fish_completions_dir/bun.fish -%zsh_completions_dir/_bun diff --git a/anda/devs/codium-marketplace/codium-marketplace.spec b/anda/devs/codium-marketplace/codium-marketplace.spec index fba321e07f..3701d312e9 100644 --- a/anda/devs/codium-marketplace/codium-marketplace.spec +++ b/anda/devs/codium-marketplace/codium-marketplace.spec @@ -2,7 +2,7 @@ Name: codium-marketplace Version: 1.65.0 -Release: 1%?dist +Release: 2%?dist Summary: Enable vscode marketplace in vscodium License: MIT BuildArch: noarch @@ -22,7 +22,7 @@ if [ $1 -gt 1 ]; then # update/install sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/ "serviceUrl": "https:\/\/marketplace.visualstudio.com\/_apis\/public\/gallery",/' \ -e '/^[[:blank:]]*"cacheUrl/d' \ -e '/^[[:blank:]]*"serviceUrl/a\ "cacheUrl": "https:\/\/vscode.blob.core.windows.net\/gallery\/index",' \ - -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/marketplace.visualstudio.com\/items"/' \ + -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/marketplace.visualstudio.com\/items",/' \ -e '/^[[:blank:]]*"linkProtectionTrustedDomains/d' \ /usr/share/codium/resources/app/product.json || true fi @@ -30,7 +30,7 @@ fi %preun sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/ "serviceUrl": "https:\/\/open-vsx.org\/vscode\/gallery",/' \ -e '/^[[:blank:]]*"cacheUrl/d' \ - -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/open-vsx.org\/vscode\/item"/' \ + -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/open-vsx.org\/vscode\/item",/' \ -e '/^[[:blank:]]*"linkProtectionTrustedDomains/d' \ -e '/^[[:blank:]]*"documentationUrl/i\ "linkProtectionTrustedDomains": ["https://open-vsx.org"],' \ /usr/share/codium/resources/app/product.json || true @@ -39,9 +39,9 @@ sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/ "serviceUrl": "https:\/\/open-vsx. sed -i -e 's/^[[:blank:]]*"serviceUrl":.*/ "serviceUrl": "https:\/\/marketplace.visualstudio.com\/_apis\/public\/gallery",/' \ -e '/^[[:blank:]]*"cacheUrl/d' \ -e '/^[[:blank:]]*"serviceUrl/a\ "cacheUrl": "https:\/\/vscode.blob.core.windows.net\/gallery\/index",' \ - -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/marketplace.visualstudio.com\/items"/' \ + -e 's/^[[:blank:]]*"itemUrl":.*/ "itemUrl": "https:\/\/marketplace.visualstudio.com\/items",/' \ -e '/^[[:blank:]]*"linkProtectionTrustedDomains/d' \ /usr/share/codium/resources/app/product.json || true %files -/tmp/terra-codium-marketplace-dummy-file \ No newline at end of file +/tmp/terra-codium-marketplace-dummy-file diff --git a/anda/devs/codium/codium.spec b/anda/devs/codium/codium.spec index 4baad4d10d..3d15d4b74c 100644 --- a/anda/devs/codium/codium.spec +++ b/anda/devs/codium/codium.spec @@ -12,7 +12,7 @@ %endif Name: codium -Version: 1.97.2.25045 +Version: 1.103.25610 Release: 1%?dist Summary: Code editing. Redefined. License: MIT diff --git a/anda/devs/devpod/DevPod.desktop b/anda/devs/devpod/DevPod.desktop new file mode 100644 index 0000000000..e51b0f7aeb --- /dev/null +++ b/anda/devs/devpod/DevPod.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=DevPod +Comment=Spin up dev environments in any infra +Exec=dev-pod-desktop +Icon=dev-pod-desktop +Terminal=false +StartupNotify=false +Categories=Development; diff --git a/anda/devs/devpod/anda.hcl b/anda/devs/devpod/anda.hcl new file mode 100644 index 0000000000..a108997db7 --- /dev/null +++ b/anda/devs/devpod/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-github-loft-sh-devpod.spec" + } +} diff --git a/anda/devs/devpod/golang-github-loft-sh-devpod.spec b/anda/devs/devpod/golang-github-loft-sh-devpod.spec new file mode 100644 index 0000000000..f540d06c83 --- /dev/null +++ b/anda/devs/devpod/golang-github-loft-sh-devpod.spec @@ -0,0 +1,100 @@ +%bcond check 0 +%global __brp_mangle_shebangs %{nil} + +# https://github.com/loft-sh/devpod +%global goipath github.com/loft-sh/devpod +Version: 0.6.15 + +%gometa -f + +%global common_description %{expand: +Codespaces but open-source, client-only and unopinionated: Works with any IDE +and lets you use any cloud, kubernetes or just localhost docker.} + +%global golicenses LICENSE +%global godocs docs examples COMMUNITY.md CONTRIBUTING.md README.md\\\ + SECURITY.md desktop/README.md e2e/README.md\\\ + loadtest/README.md + +Name: devpod +Release: 2%?dist +Summary: Spin up dev environments in any infra +Provides: golang-github-loft-sh-devpod +BuildRequires: anda-srpm-macros mold +BuildRequires: yarnpkg rust-packaging +Recommends: devpod-desktop + +License: MPL-2.0 +URL: https://devpod.sh +Source: %{gosource} +# gendesk --pkgname=DevPod --name=DevPod --exec=dev-pod-desktop --icon=dev-pod-desktop --categories='Development' -n +Source1: DevPod.desktop + +%description %{common_description} + +%package desktop +Summary: %summary +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND (BSD-3-Clause AND MIT) AND (BSD-3-Clause OR MIT) AND (BSD-3-Clause OR MIT OR Apache-2.0) AND BSL-1.0 AND CC0-1.0 AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND ISC AND MIT AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(gobject-2.0) +BuildRequires: pkgconfig(gdk-3.0) +BuildRequires: pkgconfig(javascriptcoregtk-4.1) +BuildRequires: pkgconfig(libsoup-3.0) +BuildRequires: pkgconfig(webkit2gtk-4.1) +Requires: libappindicator-gtk3 + +%description desktop %{common_description} + +%prep +#yarn set version 1.22.1 +%autosetup -n %name-%version +rm go.sum +cd desktop/src-tauri +%cargo_prep_online +sed -i '/"targets"/s@"all"@[]@' tauri.conf.json + +sed -i '/Comment=/s@DevPod@%summary@' %{S:1} + +%build +%define gomodulesmode GO111MODULE=on +# just remove -v -x for godsake +%define gobuild_baseflags %{gocompilerflags} -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a +%define gobuild_ldflags -s -w -X github.com/loft-sh/devpod/pkg/version.version="v%version" ${GO_LDFLAGS-${LDFLAGS-}} %{?currentgoldflags} -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) -compressdwarf=false -linkmode=external -extldflags '%{build_ldflags} %{?__golang_extldflags}' +%define gobuilddir %_builddir/%buildsubdir +# build cli +(%{gobuild -o %{gobuilddir}/bin/devpod .}) & + +pushd desktop +yarn version --new-version %version --no-git-tag-version & +yarn install & +pushd src-tauri +# cargo licenses +%{cargo_license_summary_online} & +%{cargo_license_online} > %_builddir/%buildsubdir/LICENSE.dependencies & +wait +cp %{gobuilddir}/bin/devpod bin/devpod-cli-%_arch-unknown-linux-gnu +popd # src-tauri +# ≈ %%cargo_build +/usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' \ + yarn run desktop:build -- -- %{__cargo_common_opts} --profile rpm +popd # desktop + + +%install +# go +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp bin/devpod %{buildroot}%{_bindir}/devpod-cli +# tauri +install -Dm755 "desktop/src-tauri/target/rpm/DevPod Desktop" %buildroot%_bindir/dev-pod-desktop +install -Dm644 %{S:1} -t %buildroot%_datadir/applications/ +install -Dm644 desktop/devpod.png %buildroot%_datadir/pixmaps/dev-pod-desktop.png + +%files +%license LICENSE +%doc README.md SECURITY.md +%{_bindir}/devpod-cli + +%files desktop +%_bindir/dev-pod-desktop +%_datadir/applications/DevPod.desktop +%_datadir/pixmaps/dev-pod-desktop.png diff --git a/anda/devs/devpod/update.rhai b/anda/devs/devpod/update.rhai new file mode 100644 index 0000000000..5e61578aae --- /dev/null +++ b/anda/devs/devpod/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("loft-sh/devpod")); diff --git a/anda/devs/edit/anda.hcl b/anda/devs/edit/anda.hcl new file mode 100644 index 0000000000..ce214676b7 --- /dev/null +++ b/anda/devs/edit/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "edit.spec" + } +} diff --git a/anda/devs/edit/edit.spec b/anda/devs/edit/edit.spec new file mode 100644 index 0000000000..e442deab3c --- /dev/null +++ b/anda/devs/edit/edit.spec @@ -0,0 +1,49 @@ +%global _description %{expand: +An editor that pays homage to the classic MS-DOS Editor, but with a modern interface and input controls similar to VS Code.} +%global crate edit +%bcond rust_nightly 0 + +Name: %{crate} +Version: 1.2.0 +Release: 1%?dist +Summary: A simple editor for simple needs. +SourceLicense: MIT +License: MIT AND (MIT OR Apache-2.0) +URL: https://github.com/microsoft/edit +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: anda-srpm-macros +BuildRequires: cargo-rpm-macros +%if %{with rust_nightly} +BuildRequires: rustup +%endif +BuildRequires: mold +Packager: Gilver E. + +%description %_description + +%prep +%autosetup -n %{name}-%{version} +%if %{with rust_nightly} +%rustup_nightly +%endif +%cargo_prep_online + +%build +%cargo_build + +%install +%crate_install_bin +%{cargo_license_online} > LICENSE.dependencies + +%files +%doc CODE_OF_CONDUCT.md +%doc README.md +%doc SECURITY.md +%license LICENSE +%license LICENSE.dependencies +%{_bindir}/%{name} + +%changelog +* Thu May 22 2025 Gilver E. - 1.0.0-1 +- Initial package + diff --git a/anda/devs/edit/update.rhai b/anda/devs/edit/update.rhai new file mode 100644 index 0000000000..f2c7849103 --- /dev/null +++ b/anda/devs/edit/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("microsoft/edit")); diff --git a/anda/devs/flow/flow-control.spec b/anda/devs/flow/flow-control.spec index c1e005b0f2..08807ad404 100644 --- a/anda/devs/flow/flow-control.spec +++ b/anda/devs/flow/flow-control.spec @@ -1,6 +1,6 @@ Name: flow-control Epoch: 1 -Version: 0.3.3 +Version: 0.5.0 Release: 1%?dist Summary: A programmer's text editor License: MIT diff --git a/anda/devs/flutter/flutter.spec b/anda/devs/flutter/flutter.spec index dbced8016d..a7c6456d8b 100644 --- a/anda/devs/flutter/flutter.spec +++ b/anda/devs/flutter/flutter.spec @@ -1,5 +1,5 @@ Name: flutter -Version: 3.29.0 +Version: 3.35.1 Release: 1%?dist Summary: SDK for crafting beautiful, fast user experiences from a single codebase License: BSD-3-Clause @@ -8,6 +8,7 @@ Group: Development/Building Source0: https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_%version-stable.tar.xz Requires: bash curl git file which zip xz Recommends: mesa-libGLU +AutoReqProv: no %description Flutter transforms the app development process. Build, test, and deploy @@ -16,8 +17,6 @@ beautiful mobile, web, desktop, and embedded apps from a single codebase. %prep tar xf %SOURCE0 -%build - %install mkdir -p %buildroot%_datadir %buildroot%_bindir mv %name/ %buildroot%_datadir/ diff --git a/anda/devs/ghostty/nightly/ghostty-nightly.spec b/anda/devs/ghostty/nightly/ghostty-nightly.spec index 7b8462240d..11ac05979d 100644 --- a/anda/devs/ghostty/nightly/ghostty-nightly.spec +++ b/anda/devs/ghostty/nightly/ghostty-nightly.spec @@ -1,27 +1,25 @@ -%global commit 38908e01268298ced33b7b6835e49b8c6d437e12 +%global commit 298f11166d4762741dd84fb48c8f96a09d0fb326 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global fulldate 2025-02-18 +%global fulldate 2025-08-21 %global commit_date %(echo %{fulldate} | sed 's/-//g') %global public_key RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV -%global base_ver 1.1.2 -%global dev_ver 1.1.3 -%if 0%{?fedora} <= 40 -%global cache_dir %{_builddir}/zig-cache -%else -%global cache_dir %{builddir}/zig-cache -%endif +%global ver 1.1.4 +%global base_name ghostty +%global appid com.mitchellh.%{base_name} -Name: ghostty-nightly -Version: %{base_ver}~tip^%{commit_date}git%{shortcommit} -Release: 2%{?dist} +Name: %{base_name}-nightly +Version: %{ver}~tip^%{commit_date}git%{shortcommit} +Release: 1%?dist %if 0%{?fedora} <= 41 Epoch: 1 %endif Summary: A fast, native terminal emulator written in Zig; this is the Tip (nightly) build. License: MIT AND MPL-2.0 AND OFL-1.1 AND (WTFPL OR CC0-1.0) AND Apache-2.0 -URL: https://ghostty.org/ -Source0: https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz -Source1: https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz.minisig +URL: https://%{base_name}.org +Source0: https://github.com/%{base_name}-org/%{base_name}/releases/download/tip/%{base_name}-source.tar.gz +Source1: https://github.com/%{base_name}-org/%{base_name}/releases/download/tip/%{base_name}-source.tar.gz.minisig +BuildRequires: anda-srpm-macros >= 0.2.15 +BuildRequires: gettext BuildRequires: gtk4-devel BuildRequires: libadwaita-devel BuildRequires: libX11-devel @@ -29,28 +27,34 @@ BuildRequires: minisign BuildRequires: ncurses BuildRequires: ncurses-devel BuildRequires: pandoc-cli -BuildRequires: zig +BuildRequires: systemd-rpm-macros +BuildRequires: zig >= 0.14.0 +BuildRequires: zig-rpm-macros +BuildRequires: pkgconfig(blueprint-compiler) BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(fontconfig) BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(gtk4-layer-shell-0) BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libadwaita-1) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(oniguruma) BuildRequires: pkgconfig(zlib) -Requires: %{name}-terminfo -Requires: %{name}-shell-integration +Requires: %{name}-terminfo = %{evr} +Requires: %{name}-shell-integration = %{evr} +Requires: (%{name}-kio = %{evr} if kf6-kio) Requires: gtk4 +Requires: gtk4-layer-shell Requires: libadwaita -Conflicts: ghostty -Provides: ghostty-tip = %{version}-%{release} +Conflicts: %{base_name} +Provides: %{base_name}-tip = %{ver}^%{commit_date}git%{shortcommit} %if 0%{?fedora} <= 41 Provides: %{name} = %{commit_date}.%{shortcommit} %endif Obsoletes: %{name} = 20250130.04d3636 -Packager: ShinyGil +Packager: Gilver E. %description 👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration. @@ -94,6 +98,54 @@ BuildArch: noarch %description zsh-completion Zsh shell completion for Ghostty. +%package kio +Summary: KIO support for Ghostty +Requires: %{name} = %{evr} +BuildArch: noarch + +%description kio +This package allows Ghostty to interact with KIO. + +%package nautilus +Summary: Nautilus menu support for Ghostty +Supplements: (%{name} and nautilus) +Requires: %{name} = %{evr} +BuildArch: noarch + +%description nautilus +This package enables Nautilus integration for Ghostty. + +%package vim +Summary: Vim plugins for Ghostty +Supplements: (%{name} and vim-filesystem) +Requires: %{name} = %{evr} +Requires: vim-enhanced +Requires: vim-filesystem +BuildArch: noarch + +%description vim +This package provides the Ghostty Vim plugins. + +%package neovim +Summary: Neovim plugins for Ghostty +Supplements: (%{name} and neovim) +Requires: %{name} = %{evr} +Requires: neovim +BuildArch: noarch + +%description neovim +This package provides the Neovim plugins for Ghostty. + +%package bat-syntax +Summary: Bat syntax for Ghostty +Supplements: (%{name} and bat) +Requires: %{name} = %{evr} +Requires: bat +BuildArch: noarch + +%description bat-syntax +This package provides the Bat syntax files for Ghostty. + %package shell-integration Summary: Ghostty shell integration Supplements: %{name} @@ -107,115 +159,138 @@ This package contains files allowing Ghostty to integrate with various shells. %package terminfo Summary: Ghostty terminfo +%if 0%{?fedora} >= 42 +Requires: ncurses-term >= 6.5-5.20250125 +%endif Supplements: %{name} %if 0%{?fedora} <= 41 Provides: %{name}-terminfo = %{commit_date}.%{shortcommit} %endif +Obsoletes: %{name}-terminfo-source < %{evr} BuildArch: noarch %description terminfo Ghostty's terminfo. Needed for basic terminal function. -%package terminfo-source -Summary: Source files for Ghostty's terminfo -Requires: %{name} -Requires: %{name}-terminfo -BuildArch: noarch - -%description terminfo-source -This package contains files for Ghostty's terminfo. Available for debugging use. - %prep /usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} -%autosetup -n ghostty-source +%autosetup -n %{base_name}-%{ver}-main+%{shortcommit} -ZIG_GLOBAL_CACHE_DIR="%{cache_dir}" ./nix/build-support/fetch-zig-cache.sh +ZIG_GLOBAL_CACHE_DIR="%{_zig_cache_dir}" ./nix/build-support/fetch-zig-cache.sh %build %install DESTDIR="%{buildroot}" \ -zig build \ - --summary all \ - --release=fast \ - --system "%{cache_dir}/p" \ +%{zig_build_target -r fast} \ --prefix "%{_prefix}" --prefix-lib-dir "%{_libdir}" \ --prefix-exe-dir "%{_bindir}" --prefix-include-dir "%{_includedir}" \ - --verbose \ - -Dversion-string="%{dev_ver}-dev+%{shortcommit}" \ - -Dcpu=baseline \ + -Dversion-string="%{ver}-dev+%{shortcommit}" \ -Dstrip=false \ -Dpie=true \ - -Demit-docs \ - -Demit-termcap \ - -Demit-terminfo + -Demit-docs -%files +# Don't conflict with ncurses-term on F42 and up +%if 0%{?fedora} >= 42 +rm -rf %{buildroot}%{_datadir}/terminfo/g/%{base_name} +%endif + +%find_lang %{appid} + +%files -f %{appid}.lang %doc README.md %license LICENSE -%_bindir/ghostty -%_datadir/applications/com.mitchellh.ghostty.desktop -%_datadir/bat/syntaxes/ghostty.sublime-syntax -%_datadir/ghostty/ -%_datadir/kio/servicemenus/com.mitchellh.ghostty.desktop -%_datadir/nautilus-python/extensions/ghostty.py -%_datadir/nvim/site/compiler/ghostty.vim -%_datadir/nvim/site/ftdetect/ghostty.vim -%_datadir/nvim/site/ftplugin/ghostty.vim -%_datadir/nvim/site/syntax/ghostty.vim -%_datadir/vim/vimfiles/compiler/ghostty.vim -%_datadir/vim/vimfiles/ftdetect/ghostty.vim -%_datadir/vim/vimfiles/ftplugin/ghostty.vim -%_datadir/vim/vimfiles/syntax/ghostty.vim -%_iconsdir/hicolor/16x16/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/16x16@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/32x32/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/32x32@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/128x128/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/128x128@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/256x256/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/256x256@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/512x512/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/1024x1024/apps/com.mitchellh.ghostty.png -%_mandir/man1/ghostty.1.gz -%_mandir/man5/ghostty.5.gz +%{_bindir}/%{base_name} +%{_datadir}/applications/%{appid}.desktop +%dir %{_datadir}/%{base_name} +%{_datadir}/%{base_name}/doc +%{_datadir}/%{base_name}/themes +%{_datadir}/metainfo/%{appid}.metainfo.xml +%{_datadir}/dbus-1/services/%{appid}.service +%{_iconsdir}/hicolor/16x16/apps/%{appid}.png +%{_iconsdir}/hicolor/16x16@2/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32@2/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128@2/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256@2/apps/%{appid}.png +%{_iconsdir}/hicolor/512x512/apps/%{appid}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{appid}.png +%{_mandir}/man1/%{base_name}.1.gz +%{_mandir}/man5/%{base_name}.5.gz +%{_userunitdir}/app-%{appid}.service %files bash-completion -%bash_completions_dir/ghostty.bash +%{bash_completions_dir}/%{base_name}.bash %files fish-completion -%fish_completions_dir/ghostty.fish +%{fish_completions_dir}/%{base_name}.fish %files zsh-completion -%zsh_completions_dir/_ghostty +%{zsh_completions_dir}/_%{base_name} + +%files kio +%{_datadir}/kio/servicemenus/%{appid}.desktop + +%files nautilus +%{_datadir}/nautilus-python/extensions/%{base_name}.py + +%files vim +%{_datadir}/vim/vimfiles/compiler/%{base_name}.vim +%{_datadir}/vim/vimfiles/ftdetect/%{base_name}.vim +%{_datadir}/vim/vimfiles/ftplugin/%{base_name}.vim +%{_datadir}/vim/vimfiles/syntax/%{base_name}.vim + +%files neovim +%{_datadir}/nvim/site/compiler/%{base_name}.vim +%{_datadir}/nvim/site/ftdetect/%{base_name}.vim +%{_datadir}/nvim/site/ftplugin/%{base_name}.vim +%{_datadir}/nvim/site/syntax/%{base_name}.vim + +%files bat-syntax +%{_datadir}/bat/syntaxes/%{base_name}.sublime-syntax %files shell-integration -%_datadir/ghostty/shell-integration/bash/bash-preexec.sh -%_datadir/ghostty/shell-integration/bash/ghostty.bash -%_datadir/ghostty/shell-integration/elvish/lib/ghostty-integration.elv -%_datadir/ghostty/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish -%_datadir/ghostty/shell-integration/zsh/.zshenv -%_datadir/ghostty/shell-integration/zsh/ghostty-integration +%dir %{_datadir}/%{base_name}/shell-integration +%{_datadir}/%{base_name}/shell-integration/bash/bash-preexec.sh +%{_datadir}/%{base_name}/shell-integration/bash/%{base_name}.bash +%{_datadir}/%{base_name}/shell-integration/elvish/lib/%{base_name}-integration.elv +%{_datadir}/%{base_name}/shell-integration/fish/vendor_conf.d/%{base_name}-shell-integration.fish +%{_datadir}/%{base_name}/shell-integration/zsh/.zshenv +%{_datadir}/%{base_name}/shell-integration/zsh/%{base_name}-integration %files terminfo -%_datadir/terminfo/g/ghostty -%_datadir/terminfo/x/xterm-ghostty +%if 0%{?fedora} < 42 +%{_datadir}/terminfo/g/%{base_name} +%endif +%{_datadir}/terminfo/x/xterm-%{base_name} -%files terminfo-source -%_datadir/terminfo/ghostty.termcap -%_datadir/terminfo/ghostty.terminfo +%post +%systemd_user_post app-%{appid}.service + +%preun +%systemd_user_preun app-%{appid}.service + +%postun +%systemd_user_postun app-%{appid}.service %changelog -* Fri Jan 31 2025 ShinyGil -- Update to 1.1.1-1%{?dist}.20250131tipc5508e7 +* Sat May 31 2025 Gilver E. - 1.1.4~tip^20250531git1ff9162 +- Updated for Zig 0.14.0 +- Updated for ncurses-term compatibility in Fedora 42 and Rawhide +* Wed Mar 05 2025 Gilver E. +- Update to 1.1.3~tip^20250305git66e8d91-2%{?dist} + * Ghostty now has localization support via gettext as well as corresponding localization files +* Fri Jan 31 2025 Gilver E. +- Update to 1.1.1~tip^20250131git5508e7-1%{?dist} * Low GHSA-98wc-794w-gjx3: Ghostty leaked file descriptors allowing the shell and any of its child processes to impact other Ghostty terminal instances * Better Git versioning scheme * Ghostty terminfo source files are now a subpackage * Shell integration and completion and terminfo subpackages are now properly noarch -* Tue Dec 31 2024 ShinyGil +* Tue Dec 31 2024 Gilver E. - Update to 20241231.3f7c3af * High CVE-2003-0063: Allows execution of arbitrary commands * Medium CVE-2003-0070: Allows execution of arbitrary commands - -* Thu Dec 26 2024 ShinyGil +* Thu Dec 26 2024 Gilver E. - Initial package diff --git a/anda/devs/ghostty/nightly/update.rhai b/anda/devs/ghostty/nightly/update.rhai index b4ced68b77..41a84906e2 100644 --- a/anda/devs/ghostty/nightly/update.rhai +++ b/anda/devs/ghostty/nightly/update.rhai @@ -7,7 +7,7 @@ if rpm.changed() { date.truncate(10); let html = get(`https://raw.githubusercontent.com/ghostty-org/ghostty/refs/heads/main/build.zig.zon`); let ver = find(".version = \"([\\d.]+)\"", html, 1); - rpm.global("base_ver", gh_tag("ghostty-org/ghostty")); rpm.global("fulldate", date); - rpm.global("dev_ver", ver) + rpm.global("ver", ver); + rpm.release(); } diff --git a/anda/devs/ghostty/stable/ghostty.spec b/anda/devs/ghostty/stable/ghostty.spec index ea25ae6186..fb73d22007 100644 --- a/anda/devs/ghostty/stable/ghostty.spec +++ b/anda/devs/ghostty/stable/ghostty.spec @@ -1,19 +1,16 @@ # Signing key from https://github.com/ghostty-org/ghostty/blob/main/PACKAGING.md %global public_key RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV -%if 0%{?fedora} <= 40 -%global cache_dir %{_builddir}/zig-cache -%else -%global cache_dir %{builddir}/zig-cache -%endif +%global appid com.mitchellh.ghostty Name: ghostty -Version: 1.1.2 +Version: 1.1.3 Release: 2%?dist Summary: A fast, native terminal emulator written in Zig. License: MIT AND MPL-2.0 AND OFL-1.1 AND (WTFPL OR CC0-1.0) AND Apache-2.0 URL: https://ghostty.org/ Source0: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz Source1: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz.minisig +BuildRequires: anda-srpm-macros >= 0.2.15 BuildRequires: gtk4-devel BuildRequires: libadwaita-devel BuildRequires: libX11-devel @@ -21,7 +18,8 @@ BuildRequires: minisign BuildRequires: ncurses BuildRequires: ncurses-devel BuildRequires: pandoc-cli -BuildRequires: zig +BuildRequires: zig >= 0.14.0 +BuildRequires: zig-rpm-macros BuildRequires: pkgconfig(bzip2) BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(fontconfig) @@ -34,10 +32,11 @@ BuildRequires: pkgconfig(oniguruma) BuildRequires: pkgconfig(zlib) Requires: %{name}-terminfo = %{version}-%{release} Requires: %{name}-shell-integration = %{version}-%{release} +Requires: (%{name}-kio = %{evr} if kf6-kio) Requires: gtk4 Requires: libadwaita Conflicts: ghostty-nightly -Packager: ShinyGil +Packager: Gilver E. %description 👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration. @@ -72,6 +71,54 @@ BuildArch: noarch %description zsh-completion Zsh shell completion for Ghostty. +%package kio +Summary: KIO support for Ghostty +Requires: %{name} = %{evr} +BuildArch: noarch + +%description kio +This package allows Ghostty to interact with KIO. + +%package nautilus +Summary: Nautilus menu support for Ghostty +Supplements: (%{name} and nautilus) +Requires: %{name} = %{evr} +BuildArch: noarch + +%description nautilus +This package enables Nautilus integration for Ghostty. + +%package vim +Summary: Vim plugins for Ghostty +Supplements: (%{name} and vim-filesystem) +Requires: %{name} = %{evr} +Requires: vim-enhanced +Requires: vim-filesystem +BuildArch: noarch + +%description vim +This package provides the Ghostty Vim plugins. + +%package neovim +Summary: Neovim plugins for Ghostty +Supplements: (%{name} and neovim) +Requires: %{name} = %{evr} +Requires: neovim +BuildArch: noarch + +%description neovim +This package provides the Neovim plugins for Ghostty. + +%package bat-syntax +Summary: Bat syntax for Ghostty +Supplements: (%{name} and bat) +Requires: %{name} = %{evr} +Requires: bat +BuildArch: noarch + +%description bat-syntax +This package provides the Bat syntax files for Ghostty. + %package shell-integration Summary: Ghostty shell integration Supplements: %{name} @@ -83,6 +130,10 @@ This package contains files allowing Ghostty to integrate with various shells. %package terminfo Summary: Ghostty terminfo Supplements: %{name} +%if 0%{?fedora} >= 42 +Requires: ncurses-term >= 6.5-5.20250125%{?dist} +%endif +Obsoletes: %{name}-terminfo-source < %{evr} BuildArch: noarch %description terminfo @@ -101,7 +152,7 @@ Source files for Ghostty's terminfo. Available for debugging use. /usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} %autosetup -export ZIG_GLOBAL_CACHE_DIR="%{cache_dir}" +export ZIG_GLOBAL_CACHE_DIR="%{_zig_cache_dir}" zig build --fetch zig fetch git+https://github.com/zigimg/zigimg#3a667bdb3d7f0955a5a51c8468eac83210c1439e zig fetch git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a900ad773618b @@ -110,86 +161,102 @@ zig fetch git+https://github.com/mitchellh/libxev#f6a672a78436d8efee1aa847a43a90 %install DESTDIR="%{buildroot}" \ -zig build \ - --summary all \ - --release=fast \ - --system "%{cache_dir}/p" \ +%{zig_build_target -r fast} \ --prefix "%{_prefix}" --prefix-lib-dir "%{_libdir}" \ --prefix-exe-dir "%{_bindir}" --prefix-include-dir "%{_includedir}" \ - --verbose \ - -Dversion-string=%{version} \ - -Dcpu=baseline \ + -Dversion-string="%{version}" \ -Dstrip=false \ -Dpie=true \ - -Demit-docs \ - -Demit-termcap \ - -Demit-terminfo + -Demit-docs + +#Don't conflict with ncurses-term on F42 and up +%if 0%{?fedora} >= 42 +rm -rf %{buildroot}%{_datadir}/terminfo/g/ghostty +%endif %files %doc README.md %license LICENSE -%_bindir/ghostty -%_datadir/applications/com.mitchellh.ghostty.desktop -%_datadir/bat/syntaxes/ghostty.sublime-syntax -%_datadir/ghostty/ -%_datadir/kio/servicemenus/com.mitchellh.ghostty.desktop -%_datadir/nautilus-python/extensions/ghostty.py -%_datadir/nvim/site/compiler/ghostty.vim -%_datadir/nvim/site/ftdetect/ghostty.vim -%_datadir/nvim/site/ftplugin/ghostty.vim -%_datadir/nvim/site/syntax/ghostty.vim -%_datadir/vim/vimfiles/compiler/ghostty.vim -%_datadir/vim/vimfiles/ftdetect/ghostty.vim -%_datadir/vim/vimfiles/ftplugin/ghostty.vim -%_datadir/vim/vimfiles/syntax/ghostty.vim -%_iconsdir/hicolor/16x16/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/16x16@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/32x32/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/32x32@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/128x128/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/128x128@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/256x256/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/256x256@2/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/512x512/apps/com.mitchellh.ghostty.png -%_iconsdir/hicolor/1024x1024/apps/com.mitchellh.ghostty.png -%_mandir/man1/ghostty.1.gz -%_mandir/man5/ghostty.5.gz +%{_bindir}/%{name} +%{_datadir}/applications/%{appid}.desktop +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/doc +%{_datadir}/%{name}/themes +%{_datadir}/metainfo/%{appid}.metainfo.xml +%{_iconsdir}/hicolor/16x16/apps/%{appid}.png +%{_iconsdir}/hicolor/16x16@2/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32/apps/%{appid}.png +%{_iconsdir}/hicolor/32x32@2/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128/apps/%{appid}.png +%{_iconsdir}/hicolor/128x128@2/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256/apps/%{appid}.png +%{_iconsdir}/hicolor/256x256@2/apps/%{appid}.png +%{_iconsdir}/hicolor/512x512/apps/%{appid}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{appid}.png +%{_mandir}/man1/%{name}.1.gz +%{_mandir}/man5/%{name}.5.gz +%{_userunitdir}/%{appid}.service +%{_prefix}/lib/dbus-1/services/%{appid}.service %files bash-completion -%bash_completions_dir/ghostty.bash +%{bash_completions_dir}/%{name}.bash %files fish-completion -%fish_completions_dir/ghostty.fish +%{fish_completions_dir}/%{name}.fish %files zsh-completion -%zsh_completions_dir/_ghostty +%{zsh_completions_dir}/_%{name} + +%files kio +%{_datadir}/kio/servicemenus/%{appid}.desktop + +%files nautilus +%{_datadir}/nautilus-python/extensions/%{name}.py + +%files vim +%{_datadir}/vim/vimfiles/compiler/%{name}.vim +%{_datadir}/vim/vimfiles/ftdetect/%{name}.vim +%{_datadir}/vim/vimfiles/ftplugin/%{name}.vim +%{_datadir}/vim/vimfiles/syntax/%{name}.vim + +%files neovim +%{_datadir}/nvim/site/compiler/%{name}.vim +%{_datadir}/nvim/site/ftdetect/%{name}.vim +%{_datadir}/nvim/site/ftplugin/%{name}.vim +%{_datadir}/nvim/site/syntax/%{name}.vim + +%files bat-syntax +%{_datadir}/bat/syntaxes/%{name}.sublime-syntax %files shell-integration -%_datadir/ghostty/shell-integration/bash/bash-preexec.sh -%_datadir/ghostty/shell-integration/bash/ghostty.bash -%_datadir/ghostty/shell-integration/elvish/lib/ghostty-integration.elv -%_datadir/ghostty/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish -%_datadir/ghostty/shell-integration/zsh/.zshenv -%_datadir/ghostty/shell-integration/zsh/ghostty-integration +%dir %{_datadir}/%{name}/shell-integration +%{_datadir}/%{name}/shell-integration/bash/bash-preexec.sh +%{_datadir}/%{name}/shell-integration/bash/%{name}.bash +%{_datadir}/%{name}/shell-integration/elvish/lib/%{name}-integration.elv +%{_datadir}/%{name}/shell-integration/fish/vendor_conf.d/%{name}-shell-integration.fish +%{_datadir}/%{name}/shell-integration/zsh/.zshenv +%{_datadir}/%{name}/shell-integration/zsh/%{name}-integration %files terminfo -%_datadir/terminfo/g/ghostty -%_datadir/terminfo/x/xterm-ghostty +%if 0%{?fedora} < 42 +%{_datadir}/terminfo/g/ghostty +%endif +%{_datadir}/terminfo/x/xterm-ghostty %files terminfo-source -%_datadir/terminfo/ghostty.termcap -%_datadir/terminfo/ghostty.terminfo +%{_datadir}/terminfo/ghostty.termcap +%{_datadir}/terminfo/ghostty.terminfo %changelog -* Fri Jan 31 2025 ShinyGil +* Fri Jan 31 2025 Gilver E. - Update to 1.1.0-1%{?dist} * Low GHSA-98wc-794w-gjx3: Ghostty leaked file descriptors allowing the shell and any of its child processes to impact other Ghostty terminal instances * Ghostty terminfo source files are now a subpackage * Shell integration and completion and terminfo subpackages are now properly noarch -* Tue Dec 31 2024 ShinyGil +* Tue Dec 31 2024 Gilver E. - Update to 1.0.1 * High CVE-2003-0063: Allows execution of arbitrary commands * Medium CVE-2003-0070: Allows execution of arbitrary commands -* Thu Dec 26 2024 ShinyGil +* Thu Dec 26 2024 Gilver E. - Initial package diff --git a/anda/devs/git-biance/anda.hcl b/anda/devs/git-biance/anda.hcl new file mode 100644 index 0000000000..30e78c3b04 --- /dev/null +++ b/anda/devs/git-biance/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "git-biance.spec" + } +} diff --git a/anda/devs/git-biance/git-biance.spec b/anda/devs/git-biance/git-biance.spec new file mode 100644 index 0000000000..3188598f56 --- /dev/null +++ b/anda/devs/git-biance/git-biance.spec @@ -0,0 +1,41 @@ +%global crate git-biance + +Name: git-biance +Version: 0.1.2 +Release: 1%?dist +Summary: Visualize code contributions in a GitHub-style graph. + +License: GPL-3.0 +URL: https://crates.io/crates/git-biance +Source: %{crates_source} + +Packager: xiaoshihou +BuildRequires: anda-srpm-macros cargo-rpm-macros mold + +%global _description %{expand: +biance(鞭策,biān cè,spur)is a small rust +program that shows and visualizes code contributions +in a git repository. +} + +%description %{_description} + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license LICENSE.dependencies +%doc README.md README-zh.md +%{_bindir}/%{crate} + + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install diff --git a/anda/devs/git-biance/update.rhai b/anda/devs/git-biance/update.rhai new file mode 100644 index 0000000000..942124dadf --- /dev/null +++ b/anda/devs/git-biance/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("git-biance")); diff --git a/anda/devs/kvrocks/kvrocks.spec b/anda/devs/kvrocks/kvrocks.spec index 76936334c5..063f438a6f 100644 --- a/anda/devs/kvrocks/kvrocks.spec +++ b/anda/devs/kvrocks/kvrocks.spec @@ -1,5 +1,5 @@ Name: kvrocks -Version: 2.11.1 +Version: 2.13.0 Release: 1%?dist Summary: Distributed key value NoSQL database that uses RocksDB License: Apache-2.0 diff --git a/anda/devs/lowfi/rust-lowfi.spec b/anda/devs/lowfi/rust-lowfi.spec index 300c00cf98..51e9268911 100644 --- a/anda/devs/lowfi/rust-lowfi.spec +++ b/anda/devs/lowfi/rust-lowfi.spec @@ -2,8 +2,8 @@ %global crate lowfi Name: rust-lowfi -Version: 1.5.6 -Release: 1%{?dist} +Version: 1.6.0 +Release: 1%?dist Summary: Extremely simple lofi player License: MIT diff --git a/anda/devs/micro/anda.hcl b/anda/devs/micro/anda.hcl new file mode 100644 index 0000000000..beefa6bf82 --- /dev/null +++ b/anda/devs/micro/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "micro-nightly.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/devs/micro/micro-nightly.spec b/anda/devs/micro/micro-nightly.spec new file mode 100644 index 0000000000..129f02f6ef --- /dev/null +++ b/anda/devs/micro/micro-nightly.spec @@ -0,0 +1,109 @@ +# Generated by go2rpm 1.15.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +# Naming variable as something other than "commit" is necessary +# to stop %%gometa from putting commit hash in release +%global commit_hash 094b02da4c983731b2f60fbf28803d14531638bc +%global commit_date 20250821 +%global shortcommit %{sub %{commit_hash} 1 7} +%global ver 2.0.14 + +# https://github.com/zyedidia/micro +%global goipath github.com/zyedidia/micro +Version: %{ver}^%{commit_date}git.%{shortcommit} + +%gometa -f + +%global common_description %{expand: +micro is a terminal-based text editor that aims to be easy to use and intuitive, while also taking advantage of the capabilities of modern terminals. It strives to be enjoyable as a full-time editor for people who prefer to work in a terminal, or those who regularly edit files over SSH.} + +%global golicenses LICENSE LICENSE-THIRD-PARTY +%global godocs README.md runtime/help/colors.md runtime/help/commands.md\\\ + runtime/help/copypaste.md runtime/help/defaultkeys.md\\\ + runtime/help/help.md runtime/help/keybindings.md\\\ + runtime/help/options.md runtime/help/plugins.md\\\ + runtime/help/tutorial.md + +Name: micro.nightly +Release: 2%{?dist} +Summary: A modern and intuitive terminal-based text editor + +License: MIT +URL: %{gourl} +Packager: sadlerm + +BuildRequires: anda-srpm-macros + +Recommends: wl-clipboard +Recommends: (xclip or xsel) + +Provides: micro-nightly = %{version}-%{release} +Provides: micro +Conflicts: micro + +%description %{common_description} + +%gopkg + +%global buildsubdir micro-%{version} + +%prep +git clone --recurse-submodules -q %{gourl} micro-%{version} +cd %{builddir}/micro-%{version} && git checkout -q %{commit_hash} +%gomkdir +%go_prep_online + +%build +%if %{without bootstrap} +go generate ./runtime + +MICRO_VERSION=$(go run ./tools/build-version.go) +MICRO_DATE=$(date --date=%{commit_date} +"%%B %%d, %%Y") + +LDFLAGS="-X internal/util.version=${MICRO_VERSION} \ + -X internal/util.hash=%{shortcommit} \ + -X 'internal/util.date=${MICRO_DATE}'" + +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/micro ./cmd/micro +%endif + +%install +%if %{without bootstrap} +install -Dm755 %{gobuilddir}/bin/micro -t %{buildroot}%{_bindir} +install -Dm644 assets/packaging/micro.1 -t %{buildroot}%{_mandir}/man1 +install -Dm644 assets/packaging/micro.desktop -t %{buildroot}%{_datadir}/applications +install -Dm644 assets/micro-logo-mark.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/micro.svg + +# for %%doc packaging +mv -v ./runtime/help . +%endif + +%if %{without bootstrap} +%if %{with check} +%check +%gotest ./internal/... ./cmd/micro/... +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE LICENSE-THIRD-PARTY +%doc README.md help +%{_bindir}/micro +%{_mandir}/man1/micro.1.gz +%{_datadir}/applications/micro.desktop +%{_datadir}/icons/hicolor/scalable/apps/micro.svg +%endif + +%changelog +%autochangelog diff --git a/anda/devs/micro/update.rhai b/anda/devs/micro/update.rhai new file mode 100644 index 0000000000..f87863b9e7 --- /dev/null +++ b/anda/devs/micro/update.rhai @@ -0,0 +1,7 @@ +rpm.global("commit_hash", gh_commit("zyedidia/micro")); +let v = gh("zyedidia/micro"); +if rpm.changed() { + rpm.global("commit_date", date()); + v.crop(1); + rpm.global("ver", v); +} diff --git a/anda/devs/neovide/neovide.spec b/anda/devs/neovide/neovide.spec index 259d2b6d51..516f1494ed 100644 --- a/anda/devs/neovide/neovide.spec +++ b/anda/devs/neovide/neovide.spec @@ -2,8 +2,8 @@ %global raw_forgeurl https://raw.githubusercontent.com/%{crate}/%{crate} Name: rust-neovide -Version: 0.14.0 -Release: 2%?dist +Version: 0.15.1 +Release: 1%?dist Summary: No Nonsense Neovim Client in Rust License: MIT diff --git a/anda/devs/rio/anda.hcl b/anda/devs/rio/anda.hcl new file mode 100644 index 0000000000..1bd79453a3 --- /dev/null +++ b/anda/devs/rio/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rio.spec" + } +} diff --git a/anda/devs/rio/rio.spec b/anda/devs/rio/rio.spec new file mode 100644 index 0000000000..b1c28ac14b --- /dev/null +++ b/anda/devs/rio/rio.spec @@ -0,0 +1,90 @@ +%global crate rioterm +%global _description %{expand: +A hardware-accelerated terminal emulator focusing to run in desktops and browsers.} +%bcond docs 1 + +Name: rio +Version: 0.2.29 +Release: 1%?dist +Summary: A hardware-accelerated terminal written in Rust. +SourceLicense: MIT +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND Apache-2.0 AND BSD-2-Clause AND BSL-1.0 AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND ISC AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND (MPL-2.0 OR GPL-3.0-only) AND MPL-2.0+ AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib +URL: https://rioterm.com/ +Source0: https://github.com/raphamorim/%{name}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: anda-srpm-macros +BuildRequires: cargo-rpm-macros +BuildRequires: desktop-file-utils +BuildRequires: freetype-devel +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: libxcb-devel +BuildRequires: libxkbcommon-devel +BuildRequires: mold +BuildRequires: sed +Requires: freetype +Requires: fontconfig +Requires: hicolor-icon-theme +Obsoletes: %{crate} < %{version}-%{release} +%if %{with docs} +Suggests: %{name}-doc = %{version}-%{release} +%endif +Packager: Gilver E. + +%description %_description + +%package devel +Summary: Development files for Rio +Requires: %{name} = %{version}-%{release} + +%description devel +This package contains the development libraries for Rio. + +%if %{with docs} +%package doc +Summary: Documentation for Rio + +%description doc +This package contains all official documentation files for the Rio terminal. +%endif + +%prep +%autosetup -n %{name}-%{version} +%cargo_prep_online +sed -i 's/Exec=.*/Exec=%{crate}/g' misc/%{name}.desktop + +%build +%cargo_build -a + +%install +install -Dm755 target/rpm/%{name} %{buildroot}%{_bindir}/%{crate} +install -Dm755 target/rpm/*.so -t %{buildroot}%{_libdir} +install -Dm644 docs/static/assets/%{name}-logo.svg %{buildroot}%{_iconsdir}/hicolor/scalable/apps/%{name}.svg +desktop-file-install misc/%{name}.desktop +%{cargo_license_online -a} > LICENSE.dependencies + +%check +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop + +%files +%doc README.md +%license LICENSE +%license LICENSE.dependencies +%{_bindir}/%{crate} +%{_datadir}/applications/%{name}.desktop +%{_iconsdir}/hicolor/scalable/apps/%{name}.svg + +%files devel +%{_libdir}/librio_backend.so +%{_libdir}/librio_proc_macros.so +%{_libdir}/libsugarloaf.so + +%if %{with docs} +%files doc +%doc docs/docs/* +%endif + +%changelog +* Mon May 5 2025 Gilver E. - 0.2.13-1 +- Added doc package +* Sat Mar 8 2025 Gilver E. +- Initial package diff --git a/anda/devs/rio/update.rhai b/anda/devs/rio/update.rhai new file mode 100644 index 0000000000..3cd7f82d9c --- /dev/null +++ b/anda/devs/rio/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("rioterm")); diff --git a/anda/devs/shibuya/anda.hcl b/anda/devs/shibuya/anda.hcl new file mode 100644 index 0000000000..d6b5c6eb66 --- /dev/null +++ b/anda/devs/shibuya/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-shibuya.spec" + } +} diff --git a/anda/devs/shibuya/python-shibuya.spec b/anda/devs/shibuya/python-shibuya.spec new file mode 100644 index 0000000000..0b77e3d467 --- /dev/null +++ b/anda/devs/shibuya/python-shibuya.spec @@ -0,0 +1,120 @@ +%global pypi_name shibuya +%global _description %{expand: +A responsive, good looking with modern design documentation theme for Sphinx, with great supports for many sphinx extensions.} +# I would love to enable the docs but Fedora has stopped maintaining their jupyter-sphinx package with 42 and it is required to build them +%bcond docs 0 + +Name: python-%{pypi_name} +Version: 2025.8.16 +Release: 1%?dist +Summary: A clean, responsive, and customizable Sphinx documentation theme with light/dark mode +License: BSD-3-Clause +URL: https://shibuya.lepture.com +%if %{with docs} +Source0: https://github.com/lepture/shibuya/archive/refs/tags/%{version}.tar.gz +%else +Source0: %{pypi_source} +%endif +BuildRequires: python3-devel +BuildRequires: python3-rpm-macros +BuildRequires: python3dist(babel) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(sphinx) +%if %{with docs} +BuildRequires: python3dist(jupyter-sphinx) +BuildRequires: python3dist(myst-parser) +BuildRequires: python3dist(shibuya) +BuildRequires: python3dist(sphinx-copybutton) +BuildRequires: python3dist(sphinx-design) +BuildRequires: python3dist(sphinx-togglebutton) +%endif +BuildArch: noarch +Packager: Gilver E. + +%description %_description + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} +Requires: python3dist(sphinx) +# This project is best used with its addons, hence this laundry list of weak deps +Recommends: python3dist(babel) +Recommends: python3dist(ipykernel) +Recommends: python3dist(jupyter-sphinx) +Recommends: python3dist(matplotlib) +Recommends: python3dist(myst-parser) +Recommends: python3dist(nbsphinx) +Recommends: python3dist(numpy) +Recommends: python3dist(numpydoc) +Recommends: python3dist(pandas) +Recommends: python3dist(sphinx-click) +Recommends: python3dist(sphinx-contributors) +Recommends: python3dist(sphinx-copybutton) +Recommends: python3dist(sphinx-design) +Recommends: python3dist(sphinx-docsearch) +Recommends: python3dist(sphinx-sitemap) +Recommends: python3dist(sphinx-sqlalchemy) +Recommends: python3dist(sphinx-togglebutton) +Recommends: python3dist(sphinxcontrib-mermaid) +Recommends: python3dist(sphinxcontrib-video) +Recommends: python3dist(sphinxcontrib-youtube) + +%description -n python3-%{pypi_name} %_description + +%if %{with docs} +%package -n python3-%{pypi_name}-doc +Summary: Doc files for Shibuya + +%description -n python3-%{pypi_name}-doc +This package contains the official docs for Shibuya. +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%if %{with docs} +sphinx-build docs build/_html -b dirhtml -a +pybabel extract -F babel.cfg src/shibuya/theme -o src/shibuya/locale/sphinx.pot +for l in de en es fr ja ko pt pt_BR zh zh_TW; do +pybabel init -D sphinx -i src/shibuya/locale/sphinx.pot -d src/shibuya/locale -l $l +pybabel update -D sphinx -i src/shibuya/locale/sphinx.pot -d src/shibuya/locale -l $l +pybabel compile -D sphinx -d src/shibuya/locale +done +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitelib}/%{pypi_name} +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif + +%if %{with docs} +%files -n python3-%{pypi_name}-doc +%doc build/_html/* +%doc src/shibuya/locale/{de,en,es,fr,ja,ko,pt,pt_BR,zh,zh_TW} +%endif + +%changelog +* Sat May 10 2025 Gilver E. - 2025.4.25-1 +- Initial package. diff --git a/anda/devs/shibuya/update.rhai b/anda/devs/shibuya/update.rhai new file mode 100644 index 0000000000..858bfdac80 --- /dev/null +++ b/anda/devs/shibuya/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("shibuya")); diff --git a/anda/devs/tracy/tracy.spec b/anda/devs/tracy/tracy.spec index 36f79cf155..7ec991aa9c 100644 --- a/anda/devs/tracy/tracy.spec +++ b/anda/devs/tracy/tracy.spec @@ -1,7 +1,7 @@ %global _desc Tracy is a real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications. Name: tracy -Version: 0.11.1 +Version: 0.12.2 Release: 1%?dist Summary: A real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications. License: BSD-3-Clause diff --git a/anda/devs/yadm/anda.hcl b/anda/devs/yadm/anda.hcl new file mode 100644 index 0000000000..5e67c2251a --- /dev/null +++ b/anda/devs/yadm/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "yadm.spec" + } +} diff --git a/anda/devs/yadm/update.rhai b/anda/devs/yadm/update.rhai new file mode 100644 index 0000000000..3a14a8a34b --- /dev/null +++ b/anda/devs/yadm/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("yadm-dev/yadm")); diff --git a/anda/devs/yadm/yadm.spec b/anda/devs/yadm/yadm.spec new file mode 100644 index 0000000000..081b8ba1e2 --- /dev/null +++ b/anda/devs/yadm/yadm.spec @@ -0,0 +1,44 @@ +Name: yadm +Version: 3.5.0 +Release: 2%{?dist} +Summary: Yet Another Dotfiles Manager + +License: GPL-3.0-only +URL: https://yadm.io +Source: https://github.com/yadm-dev/yadm/archive/refs/tags/%{version}.tar.gz +Packager: madonuko + +BuildArch: noarch +Requires: bash git + +%description +yadm is a tool for managing a collection of files across multiple computers, +using a shared Git repository. In addition, yadm provides a feature to select +alternate versions of files based on the operation system or host name. Lastly, +yadm supplies the ability to manage a subset of secure files, which are +encrypted before they are included in the repository. + + +%pkg_completion -Bfz + + +%prep +%autosetup + +%install +install -Dpm755 yadm -t %buildroot%_bindir +install -Dpm644 yadm.1 -t %buildroot%_mandir/man1 +install -Dpm644 -t %buildroot%bash_completions_dir completion/bash/yadm +install -Dpm644 -t %buildroot%fish_completions_dir completion/fish/yadm.fish +install -Dpm644 -t %buildroot%zsh_completions_dir completion/zsh/_yadm + +%files +%doc README.* CHANGES CONTRIBUTORS +%doc contrib +%license LICENSE +%_bindir/yadm +%_mandir/man1/yadm.1.gz + +%changelog +* Sun May 05 2024 madonuko - 0.5-1 +- Initial package. diff --git a/anda/devs/zed/nightly/anda.hcl b/anda/devs/zed/nightly/anda.hcl index d8f39ce7e0..e92820997f 100644 --- a/anda/devs/zed/nightly/anda.hcl +++ b/anda/devs/zed/nightly/anda.hcl @@ -4,5 +4,6 @@ project pkg { } labels { nightly = 1 + large = 1 } } diff --git a/anda/devs/zed/nightly/zed-nightly.spec b/anda/devs/zed/nightly/zed-nightly.spec index ffff81edb5..53983eb748 100644 --- a/anda/devs/zed/nightly/zed-nightly.spec +++ b/anda/devs/zed/nightly/zed-nightly.spec @@ -1,34 +1,36 @@ -%global commit c31c638006ac8fc7d4fb75cc474741ac2597fe5b +%global commit e1a96b68f0e3d995e57cd7ca5c7d8fd5b313944d %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250221 -%global ver 0.176.0 +%global commit_date 20250822 +%global ver 0.202.0 %bcond_with check +%bcond nightly 1 # Exclude input files from mangling %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ -# Use Mold as the linker -%global build_rustflags %build_rustflags -C link-arg=-fuse-ld=mold %global crate zed %global app_id dev.zed.Zed-Nightly +%global rustflags_debuginfo 0 + Name: zed-nightly Version: %ver^%commit_date.%shortcommit Release: 1%?dist Summary: Zed is a high-performance, multiplayer code editor - -License: MIT +SourceLicense: AGPL-3.0-only AND Apache-2.0 AND GPL-3.0-or-later +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 AND ISC) AND AGPL.3.0-only AND AGPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND GPL-3.0-or-later AND (ISC AND (Apache-2.0 OR ISC) AND OpenSSL) AND (ISC AND (Apache-2.0 OR ISC)) AND ISC AND (MIT AND (MIT OR Apache-2.0)) AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib URL: https://zed.dev/ -Source0: https://github.com/zed-industries/zed/archive/%{commit}.zip +Source0: https://github.com/zed-industries/zed/archive/%{commit}.tar.gz Conflicts: zed -Provides: zed +Conflicts: zed-preview BuildRequires: cargo-rpm-macros >= 24 BuildRequires: anda-srpm-macros BuildRequires: gcc -BuildRequires: g++ +BuildRequires: gcc-c++ +BuildRequires: gettext-envsubst BuildRequires: clang BuildRequires: mold BuildRequires: cmake @@ -36,20 +38,52 @@ BuildRequires: alsa-lib-devel BuildRequires: fontconfig-devel BuildRequires: wayland-devel BuildRequires: libxkbcommon-x11-devel +BuildRequires: openssl-devel +%if 0%{?fedora} BuildRequires: openssl-devel-engine +%endif BuildRequires: libzstd-devel BuildRequires: perl-FindBin BuildRequires: perl-IPC-Cmd BuildRequires: perl-File-Compare BuildRequires: perl-File-Copy BuildRequires: perl-lib +%if %{with nightly} +BuildRequires: rustup +%endif BuildRequires: vulkan-loader +Requires: (%name-rename-zeditor if zfs else %name-cli) +Suggests: %name-cli %description Code at the speed of thought - Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. +%package cli +Summary: Provides the /usr/bin/zed binary +Conflicts: zfs +Supplements: (%name unless zfs) +%description cli +This package provides the /usr/bin/zed binary. If you use zfs, install %name-rename-zeditor instead. +%files cli +%_bindir/zed + +%package rename-zeditor +Summary: Rename zed to zeditor to prevent collision with zfs +Provides: %name-cli +Conflicts: %name-cli +Supplements: (%name and zfs) +%description rename-zeditor +This package provides the %_bindir/zeditor binary instead of %_bindir/zed. This avoids conflicts with the zfs package. +The normal package is %name-cli. +%files rename-zeditor +%_bindir/zeditor + + %prep %autosetup -n %{crate}-%{commit} -p1 +%if %{with nightly} +%rustup_nightly +%endif %cargo_prep_online export DO_STARTUP_NOTIFY="true" @@ -74,10 +108,11 @@ export ZED_UPDATE_EXPLANATION="Run dnf up to update Zed Nightly from Terra." echo "nightly" > crates/zed/RELEASE_CHANNEL %cargo_build -- --package zed --package cli -script/generate-licenses +ALLOW_MISSING_LICENSES=1 script/generate-licenses %install install -Dm755 target/rpm/zed %{buildroot}%{_libexecdir}/zed-editor +install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zeditor install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zed %__cargo clean @@ -87,18 +122,44 @@ install -Dm644 crates/zed/resources/app-icon-nightly.png %{buildroot}%{_datadir} install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml +# The license generation script doesn't generate licenses for ALL compiled dependencies, just direct deps of Zed, and it does not "group" licenses +# Zed also needs a special approach to fetch the dep licenses +%{__cargo} tree \ + -Z avoid-dev-deps \ + --workspace \ + --edges no-build,no-dev,no-proc-macro \ + --target all \ + %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \ + --prefix none \ + --format "{l}: {p}" \ + | sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \ + | sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \ + | sort -u \ +> LICENSE.dependencies +mv assets/icons/LICENSES LICENSE.icons +mv assets/themes/LICENSES LICENSE.themes +mv assets/fonts/plex-mono/license.txt LICENSE.fonts + %if %{with check} %check %cargo_test %endif %files +%doc CODE_OF_CONDUCT.md +%doc README.md +%license LICENSE-AGPL +%license LICENSE-APACHE +%license LICENSE-GPL +%license LICENSE.dependencies +%license LICENSE.fonts +%license LICENSE.icons +%license LICENSE.themes +%license assets/licenses.md %{_libexecdir}/zed-editor -%{_bindir}/zed %{_datadir}/applications/%app_id.desktop %{_datadir}/pixmaps/%app_id.png %{_metainfodir}/%app_id.metainfo.xml -%license assets/licenses.md %changelog %autochangelog diff --git a/anda/devs/zed/preview/anda.hcl b/anda/devs/zed/preview/anda.hcl index 1851aadd09..4f9b04a0c5 100644 --- a/anda/devs/zed/preview/anda.hcl +++ b/anda/devs/zed/preview/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "zed-preview.spec" } + labels { + large = 1 + } } diff --git a/anda/devs/zed/preview/zed-preview.spec b/anda/devs/zed/preview/zed-preview.spec index 4b31c32c9f..f4cf9abaab 100644 --- a/anda/devs/zed/preview/zed-preview.spec +++ b/anda/devs/zed/preview/zed-preview.spec @@ -1,30 +1,31 @@ %bcond_with check -%global ver 0.175.2-pre +%global ver 0.201.2-pre # Exclude input files from mangling %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ -# Use Mold as the linker -%global build_rustflags %build_rustflags -C link-arg=-fuse-ld=mold %global crate zed %global app_id dev.zed.Zed-Preview +%global rustflags_debuginfo 0 + Name: zed-preview Version: %(echo %ver | sed 's/-/~/') -Release: pre1%?dist +Release: 3%?dist Summary: Zed is a high-performance, multiplayer code editor - -License: MIT +SourceLicense: AGPL-3.0-only AND Apache-2.0 AND GPL-3.0-or-later +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 AND ISC) AND AGPL.3.0-only AND AGPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND GPL-3.0-or-later AND (ISC AND (Apache-2.0 OR ISC) AND OpenSSL) AND (ISC AND (Apache-2.0 OR ISC)) AND ISC AND (MIT AND (MIT OR Apache-2.0)) AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib URL: https://zed.dev/ Source0: https://github.com/zed-industries/zed/archive/refs/tags/v%{ver}.tar.gz Conflicts: zed -Provides: zed +Conflicts: zed-nightly BuildRequires: cargo-rpm-macros >= 24 BuildRequires: anda-srpm-macros BuildRequires: gcc -BuildRequires: g++ +BuildRequires: gcc-c++ +BuildRequires: gettext-envsubst BuildRequires: clang BuildRequires: cmake BuildRequires: mold @@ -32,7 +33,10 @@ BuildRequires: alsa-lib-devel BuildRequires: fontconfig-devel BuildRequires: wayland-devel BuildRequires: libxkbcommon-x11-devel +BuildRequires: openssl-devel +%if 0%{?fedora} BuildRequires: openssl-devel-engine +%endif BuildRequires: libzstd-devel BuildRequires: perl-FindBin BuildRequires: perl-IPC-Cmd @@ -40,10 +44,33 @@ BuildRequires: perl-File-Compare BuildRequires: perl-File-Copy BuildRequires: perl-lib BuildRequires: vulkan-loader +Requires: (%name-rename-zeditor if zfs else %name-cli) +Suggests: %name-cli %description Code at the speed of thought - Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. +%package cli +Summary: Provides the /usr/bin/zed binary +Conflicts: zfs +Supplements: (%name unless zfs) +%description cli +This package provides the /usr/bin/zed binary. If you use zfs, install %name-rename-zeditor instead. +%files cli +%_bindir/zed + +%package rename-zeditor +Summary: Rename zed to zeditor to prevent collision with zfs +Provides: %name-cli +Conflicts: %name-cli +Supplements: (%name and zfs) +%description rename-zeditor +This package provides the %_bindir/zeditor binary instead of %_bindir/zed. This avoids conflicts with the zfs package. +The normal package is %name-cli. +%files rename-zeditor +%_bindir/zeditor + + %prep %autosetup -n %{crate}-%{ver} -p1 %cargo_prep_online @@ -70,10 +97,11 @@ export ZED_UPDATE_EXPLANATION="Run dnf up to update Zed Preview from Terra." echo "preview" > crates/zed/RELEASE_CHANNEL %cargo_build -- --package zed --package cli -script/generate-licenses +ALLOW_MISSING_LICENSES=1 script/generate-licenses %install install -Dm755 target/rpm/zed %{buildroot}%{_libexecdir}/zed-editor +install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zeditor install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zed %__cargo clean @@ -83,18 +111,44 @@ install -Dm644 crates/zed/resources/app-icon-preview.png %{buildroot}%{_datadir} install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml +# The license generation script doesn't generate licenses for ALL compiled dependencies, just direct deps of Zed, and it does not "group" licenses +# Zed also needs a special approach to fetch the dep licenses +%{__cargo} tree \ + -Z avoid-dev-deps \ + --workspace \ + --edges no-build,no-dev,no-proc-macro \ + --target all \ + %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \ + --prefix none \ + --format "{l}: {p}" \ + | sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \ + | sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \ + | sort -u \ +> LICENSE.dependencies +mv assets/icons/LICENSES LICENSE.icons +mv assets/themes/LICENSES LICENSE.themes +mv assets/fonts/plex-mono/license.txt LICENSE.fonts + %if %{with check} %check %cargo_test %endif %files +%doc CODE_OF_CONDUCT.md +%doc README.md +%license LICENSE-AGPL +%license LICENSE-APACHE +%license LICENSE-GPL +%license LICENSE.dependencies +%license LICENSE.fonts +%license LICENSE.icons +%license LICENSE.themes +%license assets/licenses.md %{_libexecdir}/zed-editor -%{_bindir}/zed %{_datadir}/applications/%app_id.desktop %{_datadir}/pixmaps/%app_id.png %{_metainfodir}/%app_id.metainfo.xml -%license assets/licenses.md %changelog %autochangelog diff --git a/anda/devs/zed/stable/anda.hcl b/anda/devs/zed/stable/anda.hcl index 443cfb8019..1291962830 100644 --- a/anda/devs/zed/stable/anda.hcl +++ b/anda/devs/zed/stable/anda.hcl @@ -2,4 +2,7 @@ project pkg { rpm { spec = "zed.spec" } + labels { + large = 1 + } } diff --git a/anda/devs/zed/stable/zed.spec b/anda/devs/zed/stable/zed.spec index cd70b27011..4c27743061 100644 --- a/anda/devs/zed/stable/zed.spec +++ b/anda/devs/zed/stable/zed.spec @@ -2,28 +2,29 @@ # Exclude input files from mangling %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ -# Use Mold as the linker -%global build_rustflags %build_rustflags -C link-arg=-fuse-ld=mold %global crate zed %global app_id dev.zed.Zed +%global rustflags_debuginfo 0 + Name: zed -Version: 0.174.6 +Version: 0.200.4 Release: 1%?dist Summary: Zed is a high-performance, multiplayer code editor - -License: MIT +SourceLicense: AGPL-3.0-only AND Apache-2.0 AND GPL-3.0-or-later +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 AND ISC) AND AGPL.3.0-only AND AGPL-3.0-or-later AND (Apache-2.0 OR BSL-1.0 OR MIT) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR MIT OR Apache-2.0) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR Apache-2.0) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CC0-1.0 AND GPL-3.0-or-later AND (ISC AND (Apache-2.0 OR ISC) AND OpenSSL) AND (ISC AND (Apache-2.0 OR ISC)) AND ISC AND (MIT AND (MIT OR Apache-2.0)) AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) AND Zlib URL: https://zed.dev/ Source0: https://github.com/zed-industries/zed/archive/refs/tags/v%{version}.tar.gz -Conflicts: zed -Provides: zed +Conflicts: zed-nightly +Conflicts: zed-preview BuildRequires: cargo-rpm-macros >= 24 BuildRequires: anda-srpm-macros BuildRequires: gcc -BuildRequires: g++ +BuildRequires: gcc-c++ +BuildRequires: gettext-envsubst BuildRequires: clang BuildRequires: cmake BuildRequires: mold @@ -31,7 +32,10 @@ BuildRequires: alsa-lib-devel BuildRequires: fontconfig-devel BuildRequires: wayland-devel BuildRequires: libxkbcommon-x11-devel +BuildRequires: openssl-devel +%if 0%{?fedora} BuildRequires: openssl-devel-engine +%endif BuildRequires: libzstd-devel BuildRequires: perl-FindBin BuildRequires: perl-IPC-Cmd @@ -40,10 +44,33 @@ BuildRequires: perl-File-Copy BuildRequires: perl-lib BuildRequires: vulkan-loader BuildRequires: libcurl-devel +Requires: (%name-rename-zeditor if zfs else %name-cli) +Suggests: %name-cli %description Code at the speed of thought - Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter. +%package cli +Summary: Provides the /usr/bin/zed binary +Conflicts: zfs +Supplements: (%name unless zfs) +%description cli +This package provides the /usr/bin/zed binary. If you use zfs, install %name-rename-zeditor instead. +%files cli +%_bindir/zed + +%package rename-zeditor +Summary: Rename zed to zeditor to prevent collision with zfs +Provides: %name-cli +Conflicts: %name-cli +Supplements: (%name and zfs) +%description rename-zeditor +This package provides the %_bindir/zeditor binary instead of %_bindir/zed. This avoids conflicts with the zfs package. +The normal package is %name-cli. +%files rename-zeditor +%_bindir/zeditor + + %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep_online @@ -70,10 +97,11 @@ export ZED_UPDATE_EXPLANATION="Run dnf up to update Zed from Terra." echo "stable" > crates/zed/RELEASE_CHANNEL %cargo_build -- --package zed --package cli -script/generate-licenses +ALLOW_MISSING_LICENSES=1 script/generate-licenses %install install -Dm755 target/rpm/zed %{buildroot}%{_libexecdir}/zed-editor +install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zeditor install -Dm755 target/rpm/cli %{buildroot}%{_bindir}/zed %__cargo clean @@ -83,18 +111,44 @@ install -Dm644 crates/zed/resources/app-icon.png %{buildroot}%{_datadir}/pixmaps install -Dm644 %app_id.metainfo.xml %{buildroot}%{_metainfodir}/%app_id.metainfo.xml +# The license generation script doesn't generate licenses for ALL compiled dependencies, just direct deps of Zed, and it does not "group" licenses +# Zed also needs a special approach to fetch the dep licenses +%{__cargo} tree \ + -Z avoid-dev-deps \ + --workspace \ + --edges no-build,no-dev,no-proc-macro \ + --target all \ + %{__cargo_parse_opts %{-n} %{-a} %{-f:-f%{-f*}}} \ + --prefix none \ + --format "{l}: {p}" \ + | sed -e "s: ($(pwd)[^)]*)::g" -e "s: / :/:g" -e "/\/.*:/{s/\// OR /}" \ + | sed -e '/.*(\*).*/d' -e '/^: pet/ s/./MIT&/' \ + | sort -u \ +> LICENSE.dependencies +mv assets/icons/LICENSES LICENSE.icons +mv assets/themes/LICENSES LICENSE.themes +mv assets/fonts/plex-mono/license.txt LICENSE.fonts + %if %{with check} %check %cargo_test %endif %files +%doc CODE_OF_CONDUCT.md +%doc README.md +%license LICENSE-AGPL +%license LICENSE-APACHE +%license LICENSE-GPL +%license LICENSE.dependencies +%license LICENSE.fonts +%license LICENSE.icons +%license LICENSE.themes +%license assets/licenses.md %{_libexecdir}/zed-editor -%{_bindir}/zed %{_datadir}/applications/%app_id.desktop %{_datadir}/pixmaps/%app_id.png %{_metainfodir}/%app_id.metainfo.xml -%license assets/licenses.md %changelog %autochangelog diff --git a/anda/devs/zsh-autocomplete/zsh-autocomplete.spec b/anda/devs/zsh-autocomplete/zsh-autocomplete.spec index 3a1efafcaf..663cce953d 100644 --- a/anda/devs/zsh-autocomplete/zsh-autocomplete.spec +++ b/anda/devs/zsh-autocomplete/zsh-autocomplete.spec @@ -1,7 +1,7 @@ %define debug_package %nil Name: zsh-autocomplete -Version: 24.09.04 +Version: 25.03.19 Release: 1%?dist Summary: Real-time type-ahead completion for Zsh License: MIT diff --git a/anda/fonts/cleartype/61-cleartype-calibri.conf b/anda/fonts/cleartype/61-cleartype-calibri.conf new file mode 100644 index 0000000000..b274e35648 --- /dev/null +++ b/anda/fonts/cleartype/61-cleartype-calibri.conf @@ -0,0 +1,16 @@ + + + + + sans-serif + + Calibri + + + + Calibri + + sans-serif + + + diff --git a/anda/fonts/cleartype/61-cleartype-cambria.conf b/anda/fonts/cleartype/61-cleartype-cambria.conf new file mode 100644 index 0000000000..9366092911 --- /dev/null +++ b/anda/fonts/cleartype/61-cleartype-cambria.conf @@ -0,0 +1,16 @@ + + + + + serif + + Cambria + + + + Cambria + + serif + + + diff --git a/anda/fonts/cleartype/61-cleartype-candara.conf b/anda/fonts/cleartype/61-cleartype-candara.conf new file mode 100644 index 0000000000..9b847903aa --- /dev/null +++ b/anda/fonts/cleartype/61-cleartype-candara.conf @@ -0,0 +1,16 @@ + + + + + serif + + Candara + + + + Candara + + serif + + + diff --git a/anda/fonts/cleartype/61-cleartype-consolas.conf b/anda/fonts/cleartype/61-cleartype-consolas.conf new file mode 100644 index 0000000000..53f50c8bac --- /dev/null +++ b/anda/fonts/cleartype/61-cleartype-consolas.conf @@ -0,0 +1,16 @@ + + + + + monospace + + Consolas + + + + Consolas + + monospace + + + diff --git a/anda/fonts/cleartype/61-cleartype-constantia.conf b/anda/fonts/cleartype/61-cleartype-constantia.conf new file mode 100644 index 0000000000..02007bf125 --- /dev/null +++ b/anda/fonts/cleartype/61-cleartype-constantia.conf @@ -0,0 +1,16 @@ + + + + + serif + + Constantia + + + + Constantia + + serif + + + diff --git a/anda/fonts/cleartype/61-cleartype-corbel.conf b/anda/fonts/cleartype/61-cleartype-corbel.conf new file mode 100644 index 0000000000..56ad63b0bf --- /dev/null +++ b/anda/fonts/cleartype/61-cleartype-corbel.conf @@ -0,0 +1,16 @@ + + + + + sans-serif + + Corbel + + + + Corbel + + sans-serif + + + diff --git a/anda/fonts/cleartype/anda.hcl b/anda/fonts/cleartype/anda.hcl new file mode 100644 index 0000000000..6807fb64d1 --- /dev/null +++ b/anda/fonts/cleartype/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "cleartype-fonts.spec" + } +} diff --git a/anda/fonts/cleartype/cleartype-fonts.spec b/anda/fonts/cleartype/cleartype-fonts.spec new file mode 100644 index 0000000000..33ac58305e --- /dev/null +++ b/anda/fonts/cleartype/cleartype-fonts.spec @@ -0,0 +1,146 @@ +%global debug_package %{nil} +%global fontname cleartype +%global fontlicense Microsoft EULA +%global fontlicenses EULA eula.txt + +%global fontfamily1 ClearType Calibri +%global fontsummary1 ClearType Calibri TTF font +%global fontpkgheader1 %{expand: +Obsoletes: %{name}-common < 1.0-5 +} + +%global fonts1 CALIBR*.TTF +%global fontconfs1 %{SOURCE1} +%global fontdescription1 %{expand: +%{common_description} +Microsoft Calibri font, part of the ClearType collection made available +in the PowerPointViewer package, still available on the Microsoft website. +} + +%global fontfamily2 ClearType Cambria +%global fontsummary2 ClearType Cambria TTF font +%global fontpkgheader2 %{expand: +Obsoletes: %{name}-common < 1.0-5 +} + +%global fonts2 CAMBRI*.TTF +%global fontconfs2 %{SOURCE2} +%global fontdescription2 %{expand: +%{common_description} +Microsoft Cambria font, part of the ClearType collection made available +in the PowerPointViewer package, still available on the Microsoft website. +} + +%global fontfamily3 ClearType Candara +%global fontsummary3 ClearType Candara TTF font +%global fontpkgheader3 %{expand: +Obsoletes: %{name}-common < 1.0-5 +} + +%global fonts3 CANDAR*.TTF +%global fontconfs3 %{SOURCE3} +%global fontdescription3 %{expand: +%{common_description} +Microsoft Candara font, part of the ClearType collection made available +in the PowerPointViewer package, still available on the Microsoft website. +} + +%global fontfamily4 ClearType Consolas +%global fontsummary4 ClearType Consolas TTF font +%global fontpkgheader4 %{expand: +Obsoletes: %{name}-common < 1.0-5 +} + +%global fonts4 CONSOL*.TTF +%global fontconfs4 %{SOURCE4} +%global fontdescription4 %{expand: +%{common_description} +Microsoft Consolas font, part of the ClearType collection made available +in the PowerPointViewer package, still available on the Microsoft website. +} + +%global fontfamily5 ClearType Constantia +%global fontsummary5 ClearType Constantia TTF font +%global fontpkgheader5 %{expand: +Obsoletes: %{name}-common < 1.0-5 +} + +%global fonts5 CONSTAN*.TTF +%global fontconfs5 %{SOURCE5} +%global fontdescription5 %{expand: +%{common_description} +Microsoft Constantia font, part of the ClearType collection made available +in the PowerPointViewer package, still available on the Microsoft website. +} + +%global fontfamily6 ClearType Corbel +%global fontsummary6 ClearType Corbel TTF font +%global fontpkgheader6 %{expand: +Obsoletes: %{name}-common < 1.0-5 +} + +%global fonts6 CORBEL*.TTF +%global fontconfs6 %{SOURCE6} +%global fontdescription6 %{expand: +%{common_description} +Microsoft Corbel font, part of the ClearType collection made available +in the PowerPointViewer package, still available on the Microsoft website. +} + +Name: %{fontname}-fonts +Version: 1.0 +Release: 1%{?dist} +Summary: Package containing ClearType fonts. +License: LicenseRef-MS-Core-Fonts +URL: https://mscorefonts2.sourceforge.net +Group: User Interface/X +Source0: https://sourceforge.net/projects/mscorefonts2/files/cabs/PowerPointViewer.exe +Source1: 61-%{fontname}-calibri.conf +Source2: 61-%{fontname}-cambria.conf +Source3: 61-%{fontname}-candara.conf +Source4: 61-%{fontname}-consolas.conf +Source5: 61-%{fontname}-constantia.conf +Source6: 61-%{fontname}-corbel.conf +BuildRequires: cabextract +BuildRequires: fontpackages-devel +Requires: xorg-x11-font-utils +Requires: fontconfig +Requires: %{fontname}-calibri-fonts +Requires: %{fontname}-cambria-fonts +Requires: %{fontname}-candara-fonts +Requires: %{fontname}-consolas-fonts +Requires: %{fontname}-constantia-fonts +Requires: %{fontname}-corbel-fonts +Requires(post): fontconfig +BuildArch: noarch +Packager: Gilver E. + +%fontpkg -a + +%description +ClearType fonts made available to the public in the PowerPoint Viewer package in 2006. + +%prep +%setup -cT +cabextract %{SOURCE0} +cabextract ppviewer.cab +%forgesetup -a + +%build +%fontbuild -a + +%install +%fontinstall -a + +%check +%fontcheck -a +%fontfiles -a + +%post +/usr/bin/fc-cache + +%files + +%changelog +* Mon Feb 24 2025 Gilver E. +- Initial package diff --git a/anda/fonts/geist/anda.hcl b/anda/fonts/geist/anda.hcl new file mode 100644 index 0000000000..0f62482d3b --- /dev/null +++ b/anda/fonts/geist/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "geist.spec" + } +} diff --git a/anda/fonts/geist/geist.spec b/anda/fonts/geist/geist.spec new file mode 100644 index 0000000000..54d8d27bae --- /dev/null +++ b/anda/fonts/geist/geist.spec @@ -0,0 +1,52 @@ +Name: geist-font +Version: 1.5.0 +Release: 1%?dist +URL: https://vercel.com/font +Source0: https://github.com/vercel/geist-font/archive/refs/tags/%version.tar.gz +License: OFL-1.1 +Summary: Geist is a new font family for Vercel, created by Vercel in collaboration with Basement Studio +BuildRequires: make python3 python3.10 python3.10-devel meson cairo cairo-devel gcc +BuildArch: noarch +Provides: geist = %evr +Packager: Owen Zimmerman + +%description +Geist is a new font family for Vercel, created by Vercel in collaboration with Basement Studio. + +Geist Sans is a sans-serif typeface designed for legibility and simplicity. It is a modern, geometric typeface +that is based on the principles of classic Swiss typography. It is designed to be used in +headlines, logos, posters, and other large display sizes. + +%package mono +Requires: %{name} = %{version}-%{release} +Summary: Geist Mono is a monospaced typeface that has been crafted to be the perfect partner to Geist Sans +Provides: geist-mono = %evr +Provides: geist-mono-fonts = %evr + +%description mono +Geist Mono is a monospaced typeface that has been crafted to be the perfect partner to Geist Sans. +It is designed to be used in code editors, diagrams, terminals, and other textbased interfaces where code is represented. + +%prep +%autosetup -n %name-%version + +%build +%make_build + +%install +mkdir -p %{buildroot}/usr/share/fonts/Geist/ +mkdir -p %{buildroot}/usr/share/fonts/GeistMono/ +install -Dm644 fonts/Geist/ttf/*.ttf %{buildroot}%{_datadir}/fonts/Geist/ +install -Dm644 fonts/GeistMono/ttf/*.ttf %{buildroot}%{_datadir}/fonts/GeistMono/ + +%files +%doc readme.md AUTHORS.txt CONTRIBUTORS.txt requirements-test.txt requirements.txt OFL.txt +%license LICENSE.txt +%{_datadir}/fonts/Geist/* + +%files mono +%{_datadir}/fonts/GeistMono/* + +%changelog +* Wed Jun 04 2025 Owen Zimmerman +- Package Geist fonts diff --git a/anda/fonts/geist/update.rhai b/anda/fonts/geist/update.rhai new file mode 100644 index 0000000000..0740bc084d --- /dev/null +++ b/anda/fonts/geist/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("vercel/geist-font")); diff --git a/anda/fonts/maple/maple-fonts.spec b/anda/fonts/maple/maple-fonts.spec index cd988ed0e1..97f362988f 100644 --- a/anda/fonts/maple/maple-fonts.spec +++ b/anda/fonts/maple/maple-fonts.spec @@ -1,6 +1,6 @@ %define debug_package %nil %define _ttfontsdir %{_datadir}/fonts/maple -%global upstream_ver v7.0-beta36 +%global upstream_ver v7.6 %define sanitized_ver %(echo "$( sed 's/^.//;s/-/~/' <<< "%{upstream_ver}" )") Name: maple-fonts diff --git a/anda/fonts/ms-core-tahoma/61-ms-core-tahoma.conf b/anda/fonts/ms-core-tahoma/61-ms-core-tahoma.conf new file mode 100644 index 0000000000..f95f9a8b5a --- /dev/null +++ b/anda/fonts/ms-core-tahoma/61-ms-core-tahoma.conf @@ -0,0 +1,16 @@ + + + + + sans-serif + + Tahoma + + + + Tahoma + + sans-serif + + + diff --git a/anda/fonts/ms-core-tahoma/anda.hcl b/anda/fonts/ms-core-tahoma/anda.hcl new file mode 100644 index 0000000000..4fca01acee --- /dev/null +++ b/anda/fonts/ms-core-tahoma/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "ms-core-tahoma-fonts.spec" + } +} diff --git a/anda/fonts/ms-core-tahoma/ms-core-tahoma-fonts.spec b/anda/fonts/ms-core-tahoma/ms-core-tahoma-fonts.spec new file mode 100644 index 0000000000..a48b4a7b70 --- /dev/null +++ b/anda/fonts/ms-core-tahoma/ms-core-tahoma-fonts.spec @@ -0,0 +1,66 @@ +%global fontlicense Microsoft EULA +%global fontlicenses License.txt + +%global fontfamily1 MS Core Tahoma +%global fontsummary1 Tahoma TTF font +%global fontpkgheader1 %{expand: +Obsoletes: %{name}-common < 1.0-5 +} + +%global fonts1 tahoma.ttf +%global fontconfs1 %{SOURCE1} +%global fontdescription1 %{expand: +%{common_description} +TTF Tahoma fonts that were made available to the public in the Word Reader +package. +} + +### Different name because of font package and setup macro weirdness +Name: mscore-tahoma-fonts +Version: 1.0 +Release: 1%{?dist} +Summary: Microsoft core Tahoma fonts for better Windows compatibility +License: LicenseRef-MS-Core-Fonts +URL: https://mscorefonts2.sourceforge.net +Group: User Interface/X +Source0: https://downloads.sourceforge.net/corefonts/the%%20fonts/final/wd97vwr32.exe +Source1: 61-ms-core-tahoma.conf +BuildRequires: cabextract +BuildRequires: fontpackages-devel +Requires: xorg-x11-font-utils +Requires: fontconfig +BuildArch: noarch +Packager: Gilver E. + +%fontpkg -a + +%description +TTF Tahoma fonts that were made available to the public in the Word Reader package. + +Improves the look of Windows documents. + + +%prep +%setup -cT +cabextract %{SOURCE0} +cabextract Viewer1.cab +%forgesetup -a + +%build +%fontbuild -a + +%install +%fontinstall -a + +%check +%fontcheck -a +%fontfiles -a + +%post +/usr/bin/fc-cache + +%files + +%changelog +* Mon Feb 24 2025 Gilver E. +- Initial package diff --git a/anda/fonts/ms-core-tahoma/post.rhai b/anda/fonts/ms-core-tahoma/post.rhai new file mode 100644 index 0000000000..4a8b4d90a3 --- /dev/null +++ b/anda/fonts/ms-core-tahoma/post.rhai @@ -0,0 +1,2 @@ +// Remove empty build package +sh("rm anda-build/rpm/rpms/mscore-*.rpm", #{}); diff --git a/anda/fonts/ms-core/61-ms-core-andale.conf b/anda/fonts/ms-core/61-ms-core-andale.conf new file mode 100644 index 0000000000..bc5ed9a1e3 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-andale.conf @@ -0,0 +1,16 @@ + + + + + monospace + + Andale Mono + + + + Andale Mono + + monospace + + + diff --git a/anda/fonts/ms-core/61-ms-core-arial.conf b/anda/fonts/ms-core/61-ms-core-arial.conf new file mode 100644 index 0000000000..9b17e5e225 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-arial.conf @@ -0,0 +1,16 @@ + + + + + sans-serif + + Arial + + + + Arial + + sans-serif + + + diff --git a/anda/fonts/ms-core/61-ms-core-comic.conf b/anda/fonts/ms-core/61-ms-core-comic.conf new file mode 100644 index 0000000000..99c9c8d6d6 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-comic.conf @@ -0,0 +1,16 @@ + + + + + cursive + + Comic Sans MS + + + + Comic Sans MS + + cursive + + + diff --git a/anda/fonts/ms-core/61-ms-core-courier.conf b/anda/fonts/ms-core/61-ms-core-courier.conf new file mode 100644 index 0000000000..8b79a00fe6 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-courier.conf @@ -0,0 +1,16 @@ + + + + + monospace + + Courier New + + + + Courier New + + monospace + + + diff --git a/anda/fonts/ms-core/61-ms-core-georgia.conf b/anda/fonts/ms-core/61-ms-core-georgia.conf new file mode 100644 index 0000000000..334f3e9d8a --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-georgia.conf @@ -0,0 +1,16 @@ + + + + + serif + + Georgia + + + + Georgia + + serif + + + diff --git a/anda/fonts/ms-core/61-ms-core-impact.conf b/anda/fonts/ms-core/61-ms-core-impact.conf new file mode 100644 index 0000000000..0b7c1f1370 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-impact.conf @@ -0,0 +1,16 @@ + + + + + sans-serif + + Impact + + + + Impact + + sans-serif + + + diff --git a/anda/fonts/ms-core/61-ms-core-times.conf b/anda/fonts/ms-core/61-ms-core-times.conf new file mode 100644 index 0000000000..8e988d820c --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-times.conf @@ -0,0 +1,16 @@ + + + + + serif + + Times New Roman + + + + Times New Roman + + serif + + + diff --git a/anda/fonts/ms-core/61-ms-core-trebuchet.conf b/anda/fonts/ms-core/61-ms-core-trebuchet.conf new file mode 100644 index 0000000000..db15919b85 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-trebuchet.conf @@ -0,0 +1,16 @@ + + + + + sans-serif + + Trebuchet MS + + + + Trebuchet MS + + sans-serif + + + diff --git a/anda/fonts/ms-core/61-ms-core-verdana.conf b/anda/fonts/ms-core/61-ms-core-verdana.conf new file mode 100644 index 0000000000..e13e2a1f37 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-verdana.conf @@ -0,0 +1,16 @@ + + + + + sans-serif + + Verdana + + + + Verdana + + sans-serif + + + diff --git a/anda/fonts/ms-core/61-ms-core-webdings.conf b/anda/fonts/ms-core/61-ms-core-webdings.conf new file mode 100644 index 0000000000..fc76c0a298 --- /dev/null +++ b/anda/fonts/ms-core/61-ms-core-webdings.conf @@ -0,0 +1,16 @@ + + + + + dingbats + + Webdings + + + + Webdings + + dingbats + + + diff --git a/anda/fonts/ms-core/anda.hcl b/anda/fonts/ms-core/anda.hcl new file mode 100644 index 0000000000..14df81c230 --- /dev/null +++ b/anda/fonts/ms-core/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "ms-core-fonts.spec" + } +} diff --git a/anda/fonts/ms-core/ms-core-fonts.spec b/anda/fonts/ms-core/ms-core-fonts.spec new file mode 100644 index 0000000000..8362b87c0d --- /dev/null +++ b/anda/fonts/ms-core/ms-core-fonts.spec @@ -0,0 +1,229 @@ +%global fontname ms-core +%global sf_url https://downloads.sourceforge.net/corefonts/the%20fonts/final +%global fontlicense Microsoft EULA +%global fontlicenses Licen.TXT + +%global fontfamily1 MS Core Andale +%global fontsummary1 Microsoft Andale Mono TTF font +%global fontpkgheader1 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts1 AndaleMo.TTF +%global fontconfs1 %{SOURCE8} +%global fontdescription1 %{expand: +%{common_description} +Andale Mono font for the web that prior to 2002 was available from +http://www.microsoft.com/typography/fontpack. +} + +%global fontfamily2 MS Core Arial +%global fontsummary2 Microsoft Arial TTF font +%global fontpkgheader2 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts2 Arial*.ttf AriBlk.TTF +%global fontconfs2 %{SOURCE9} +%global fontdescription2 %{expand: +%{common_description} +Microsoft Arial font for the web that prior to 2002 was available from +http://www.microsoft.com/typography/fontpack/, updated in the European +Union Expansion Update circa May 2007, still available on the Microsoft +website. +} + +%global fontfamily3 MS Core Comic +%global fontsummary3 Microsoft Comic Sans TTF font +%global fontpkgheader3 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts3 Comic*.TTF +%global fontconfs3 %{SOURCE10} +%global fontdescription3 %{expand: +%{common_description} +Comic Sans bold and regular font for the web that prior to 2002 was available +from http://www.microsoft.com/typography/fontpack. +} + +%global fontfamily4 MS Core Courier +%global fontsummary4 Microsoft Courier New TTF font +%global fontpkgheader4 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts4 cour*ttf +%global fontconfs4 %{SOURCE11} +%global fontdescription4 %{expand: +%{common_description} +Courier New bold, bold italic, italic and regular font for the web that prior +to 2002 was available from http://www.microsoft.com/typography/fontpack. +} + +%global fontfamily5 MS Core Georgia +%global fontsummary5 Microsoft Georgia TTF font +%global fontpkgheader5 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts5 Georgi*TTF +%global fontconfs5 %{SOURCE12} +%global fontdescription5 %{expand: +%{common_description} +Georgia font for the web that prior to 2002 was available from +http://www.microsoft.com/typography/fontpack. +} + +%global fontfamily6 MS Core Impact +%global fontsummary6 Microsoft Impact TTF font +%global fontpkgheader6 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts6 Impact.TTF +%global fontconfs6 %{SOURCE13} +%global fontdescription6 %{expand: +%{common_description} +Impact font for the web that prior to 2002 was available from +http://www.microsoft.com/typography/fontpack. +} + +%global fontfamily7 MS Core Times +%global fontsummary7 Microsoft Times New Roman TTF font +%global fontpkgheader7 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts7 Times*.ttf +%global fontconfs7 %{SOURCE14} +%global fontdescription7 %{expand: +%{common_description} +Microsoft Times New Roman font for the web that prior to 2002 was available from +http://www.microsoft.com/typography/fontpack/, updated in the European +Union Expansion Update circa May 2007, still available on the Microsoft +website. +} + +%global fontfamily8 MS Core Trebuchet +%global fontsummary8 Microsoft Trebuchet TTF font +%global fontpkgheader8 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts8 trebuc*.ttf +%global fontconfs8 %{SOURCE15} +%global fontdescription8 %{expand: +%{common_description} +Microsoft Trebuchet font for the web that prior to 2002 was available +from http://www.microsoft.com/typography/fontpack, updated +in the European Union Expansion Update circa May 2007, still available +on the Microsoft website. +} + +%global fontfamily9 MS Core Verdana +%global fontsummary9 Microsoft Verdana TTF font +%global fontpkgheader9 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts9 Verdana*.ttf +%global fontconfs9 %{SOURCE16} +%global fontdescription9 %{expand: +%{common_description} +Microsoft Verdana font for the web that prior to 2002 was available from +http://www.microsoft.com/typography/fontpack/, updated in the European +Union Expansion Update circa May 2007, still available on the Microsoft +website. +} + +%global fontfamily10 MS Core Webdings +%global fontsummary10 Microsoft Verdana TTF font +%global fontpkgheader10 %{expand: +Obsoletes: %{name}-common <= 2.2-4 +} + +%global fonts10 Webdings.TTF +%global fontconfs10 %{SOURCE17} +%global fontdescription10 %{expand: +%{common_description} +Webdings font for the web that prior to 2002 was available from +http://www.microsoft.com/typography/fontpack. +} + +Name: ms-core-fonts +Version: 2.2 +Release: 1%{?dist} +Summary: Microsoft core fonts +License: LicenseRef-MS-Core-Fonts +URL: https://mscorefonts2.sourceforge.net +Group: User Interface/X +Source0: https://sourceforge.net/projects/mscorefonts2/files/cabs/EUupdate.EXE +Source1: %{sf_url}/andale32.exe +Source2: %{sf_url}/arialb32.exe +Source3: %{sf_url}/comic32.exe +Source4: %{sf_url}/courie32.exe +Source5: %{sf_url}/georgi32.exe +Source6: %{sf_url}/impact32.exe +Source7: %{sf_url}/webdin32.exe +Source8: 61-ms-core-andale.conf +Source9: 61-ms-core-arial.conf +Source10: 61-ms-core-comic.conf +Source11: 61-ms-core-courier.conf +Source12: 61-ms-core-georgia.conf +Source13: 61-ms-core-impact.conf +Source14: 61-ms-core-times.conf +Source15: 61-ms-core-trebuchet.conf +Source16: 61-ms-core-verdana.conf +Source17: 61-ms-core-webdings.conf +BuildRequires: cabextract +BuildRequires: fontpackages-devel +Requires: fontconfig +Requires: %{fontname}-andale-fonts +Requires: %{fontname}-arial-fonts +Requires: %{fontname}-comic-fonts +Requires: %{fontname}-courier-fonts +Requires: %{fontname}-georgia-fonts +Requires: %{fontname}-impact-fonts +Requires: %{fontname}-times-fonts +Requires: %{fontname}-trebuchet-fonts +Requires: %{fontname}-verdana-fonts +Requires: %{fontname}-webdings-fonts +Requires: xorg-x11-font-utils +Requires(post): fontconfig +BuildArch: noarch +Packager: Gilver E. + +%fontpkg -a + +%description +TrueType core fonts that prior to 2002 were available from http://www.microsoft.com/typography/fontpack/ + +Updated in the European Union Expansion Update circa May 2007. + +Still available on the Microsoft website. + +%prep +%setup -cT +cabextract %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \ + %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} +%forgesetup -a + +%build +%fontbuild -a + +%install +%fontinstall -a + +%check +%fontcheck -a +%fontfiles -a + +%post +/usr/bin/fc-cache + +%files + +%changelog +* Mon Feb 24 2025 Gilver E. +- Initial package diff --git a/anda/fonts/nerd-fonts/anda.hcl b/anda/fonts/nerd-fonts/anda.hcl index db05b8ecef..50ebcbb342 100644 --- a/anda/fonts/nerd-fonts/anda.hcl +++ b/anda/fonts/nerd-fonts/anda.hcl @@ -3,4 +3,7 @@ project pkg { rpm { spec = "nerd-fonts.spec" } + labels { + no_upload_srpms = 1 + } } diff --git a/anda/fonts/nerd-fonts/nerd-fonts.spec b/anda/fonts/nerd-fonts/nerd-fonts.spec index ab7211591f..7060558edc 100644 --- a/anda/fonts/nerd-fonts/nerd-fonts.spec +++ b/anda/fonts/nerd-fonts/nerd-fonts.spec @@ -1,10 +1,10 @@ -%global flist 3270 Agave AnonymousPro Arimo AurulentSansMono BigBlueTerminal BitstreamVeraSansMono CascadiaCode CodeNewRoman Cousine DaddyTimeMono DejaVuSansMono DroidSansMono FantasqueSansMono FiraCode FiraMono Go-Mono Gohu Hack Hasklig HeavyData Hermit IBMPlexMono Inconsolata InconsolataGo InconsolataLGC Iosevka JetBrainsMono Lekton LiberationMono Lilex MPlus Meslo Monofur Monoid Mononoki NerdFontsSymbolsOnly Noto OpenDyslexic Overpass ProFont ProggyClean RobotoMono ShareTechMono SourceCodePro SpaceMono Terminus Tinos Ubuntu UbuntuMono VictorMono iA-Writer +%global flist 0xProto 3270 Agave AnonymousPro Arimo AurulentSansMono BigBlueTerminal BitstreamVeraSansMono CascadiaCode CascadiaMono CodeNewRoman ComicShannsMono CommitMono Cousine D2Coding DaddyTimeMono DejaVuSansMono DepartureMono DroidSansMono EnvyCodeR FantasqueSansMono FiraCode FiraMono GeistMono Go-Mono Gohu Hack Hasklig HeavyData Hermit iA-Writer IBMPlexMono Inconsolata InconsolataGo InconsolataLGC IntelOneMono Iosevka IosevkaTerm IosevkaTermSlab JetBrainsMono Lekton LiberationMono Lilex MartianMono Meslo Monaspace Monofur Monoid Mononoki MPlus NerdFontsSymbolsOnly Noto OpenDyslexic Overpass ProFont ProggyClean Recursive RobotoMono ShareTechMono SourceCodePro SpaceMono Terminus Tinos Ubuntu UbuntuMono UbuntuSans VictorMono ZedMono %global desc %{expand: Nerd Fonts is a project that patches developer targeted fonts with a high number of glyphs (icons).} Name: nerd-fonts -Version: 3.3.0 +Version: 3.4.0 Release: 1%?dist URL: https://nerdfonts.com/ Source0: https://raw.githubusercontent.com/ryanoasis/nerd-fonts/v%version/readme.md diff --git a/anda/fonts/open-huninn/open-huninn-fonts.spec b/anda/fonts/open-huninn/open-huninn-fonts.spec index 515b2e7951..761789dff0 100644 --- a/anda/fonts/open-huninn/open-huninn-fonts.spec +++ b/anda/fonts/open-huninn/open-huninn-fonts.spec @@ -1,6 +1,6 @@ Name: open-huninn-fonts Version: 2.1 -Release: 1%?dist +Release: 2%?dist URL: https://github.com/justfont/open-huninn-font Source0: %url/archive/refs/tags/v%version.tar.gz License: OFL-1.1 @@ -23,7 +23,7 @@ install -Dm644 font/jf-openhuninn-%version.ttf %buildroot/%_datadir/fonts/open-h %files %doc README.md -%license license.txt +%license LICENSE /%{_datadir}/fonts/open-huninn/ diff --git a/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec b/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec index 1be867c441..a6b01a8383 100644 --- a/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec +++ b/anda/fonts/sarasa-gothic/sarasa-gothic-fonts.spec @@ -1,5 +1,5 @@ Name: sarasa-gothic-fonts -Version: 1.0.28 +Version: 1.0.32 Release: 1%?dist URL: https://github.com/be5invis/Sarasa-Gothic Source0: %url/releases/download/v%version/Sarasa-TTC-%version.7z diff --git a/anda/fonts/seto/seto-fonts.spec b/anda/fonts/seto/seto-fonts.spec index 8f4f33653d..1f487fe20b 100644 --- a/anda/fonts/seto/seto-fonts.spec +++ b/anda/fonts/seto/seto-fonts.spec @@ -1,11 +1,11 @@ -Name: seto-fonts -Version: 6.20 -Release: 3%?dist -URL: https://setofont.osdn.jp/ -Source0: https://github.com/terrapkg/pkg-seto-fonts/archive/refs/tags/%version.tar.gz -License: OFL-1.1 -Summary: A handwritten font that contains kanji up to JIS 4th level and difficult kanji -BuildArch: noarch +Name: seto-fonts +Version: 6.20 +Release: 3%?dist +URL: https://ja.osdn.net/projects/setofont/ +Source0: https://github.com/terrapkg/pkg-seto-fonts/archive/refs/tags/%version.tar.gz +License: OFL-1.1 +Summary: A handwritten font that contains kanji up to JIS 4th level and difficult kanji +BuildArch: noarch %description diff --git a/anda/fonts/spleen/anda.hcl b/anda/fonts/spleen/anda.hcl new file mode 100644 index 0000000000..b4da366bc1 --- /dev/null +++ b/anda/fonts/spleen/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "spleen-fonts.spec" + } +} diff --git a/anda/fonts/spleen/spleen-fonts.spec b/anda/fonts/spleen/spleen-fonts.spec new file mode 100644 index 0000000000..e00030259e --- /dev/null +++ b/anda/fonts/spleen/spleen-fonts.spec @@ -0,0 +1,42 @@ +%global __make bmake +%global _make_output_sync %nil +%global fontcontact security@fyralabs.com +%global fontorg com.fyralabs.terra + +Version: 2.1.0 +Release: 1%?dist +URL: https://www.cambus.net/spleen-monospaced-bitmap-fonts/ + +%global fontlicense BSD-2-Clause +%global fontlicenses LICENSE +%global fontdocs FAQ ChangeLog AUTHORS README.md +%global fontfamily Spleen +%global fontsummary Monospaced bitmap fonts +%global fonts *.otf +%global fontdescription %fontsummary + +Source0: https://github.com/fcambus/spleen/archive/refs/tags/%version.zip + +BuildRequires: bmake fontforge +BuildRequires: bdf2sfd +BuildRequires: rpm_macro(fontpkg) + +%fontpkg + +%prep +%autosetup -n spleen-%version + +%build +%make_build sfd +%make_build otf +%fontbuild + +%install +install -Dm644 fonts.alias *.otf -t %buildroot%_fontbasedir/%name/ +%fontinstall -a + +%check +%fontcheck -a + +%fontfiles -a +%_fontbasedir/%name/fonts.alias diff --git a/anda/fonts/spleen/update.rhai b/anda/fonts/spleen/update.rhai new file mode 100644 index 0000000000..92c6f4a8cd --- /dev/null +++ b/anda/fonts/spleen/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("fcambus/spleen")); diff --git a/anda/games/chess-tui/anda.hcl b/anda/games/chess-tui/anda.hcl new file mode 100644 index 0000000000..c64d87b26e --- /dev/null +++ b/anda/games/chess-tui/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-chess-tui.spec" + } +} diff --git a/anda/games/chess-tui/rust-chess-tui.spec b/anda/games/chess-tui/rust-chess-tui.spec new file mode 100644 index 0000000000..f3c2c86236 --- /dev/null +++ b/anda/games/chess-tui/rust-chess-tui.spec @@ -0,0 +1,92 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +%global crate chess-tui + +Name: rust-chess-tui +Version: 1.6.1 +Release: %autorelease +Summary: Rusty chess game in your terminal 🦀 + +License: MIT +URL: https://crates.io/crates/chess-tui +Source: %{crates_source} + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +A rusty chess game in your terminal 🦀.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT AND (MIT OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib +# LICENSE.dependencies contains a full license breakdown + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license LICENSE.dependencies +%doc CONTRIBUTING.md +%doc README.md +%{_bindir}/chess-tui + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/CONTRIBUTING.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+chess-tui-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+chess-tui-devel %{_description} + +This package contains library source intended for building other packages which +use the "chess-tui" feature of the "%{crate}" crate. + +%files -n %{name}+chess-tui-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/anda/games/chess-tui/update.rhai b/anda/games/chess-tui/update.rhai new file mode 100644 index 0000000000..f1c80022ed --- /dev/null +++ b/anda/games/chess-tui/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("chess-tui")); diff --git a/anda/games/emulationstation-de/emulationstation-de.spec b/anda/games/emulationstation-de/emulationstation-de.spec index 5f8a365fa9..850900cfe6 100644 --- a/anda/games/emulationstation-de/emulationstation-de.spec +++ b/anda/games/emulationstation-de/emulationstation-de.spec @@ -8,8 +8,8 @@ %bcond_with kms Name: emulationstation-de -Version: 3.1.1 -Release: 1%{?dist} +Version: 3.3.0 +Release: 1%?dist Summary: ES-DE is a frontend for browsing and launching games from your multi-platform collection. Packager: Cappy Ishihara License: MIT diff --git a/anda/games/gamescope-session/gamescope-session.spec b/anda/games/gamescope-session/gamescope-session.spec index 22f091ae92..c1737193ff 100644 --- a/anda/games/gamescope-session/gamescope-session.spec +++ b/anda/games/gamescope-session/gamescope-session.spec @@ -1,8 +1,8 @@ %define debug_package %nil -%global commit 533e51f2f50aebc4457d04372ab9b05a9c56ac10 +%global commit 1c14e09d2cf75c9716fb8ca808d243ea9f5e9154 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250126 +%global commit_date 20250802 Name: gamescope-session Version: %commit_date.%shortcommit @@ -33,6 +33,7 @@ cp -r usr %buildroot/ %_userunitdir/gamescope-session-plus@.service %_datadir/gamescope-session-plus/device-quirks %_datadir/gamescope-session-plus/gamescope-session-plus +%_datadir/gamescope/scripts/50-custom/50-disable-explicit-sync.lua %changelog %autochangelog diff --git a/anda/games/heroic-games-launcher/afterPack.diff b/anda/games/heroic-games-launcher/afterPack.diff deleted file mode 100644 index 31ec723967..0000000000 --- a/anda/games/heroic-games-launcher/afterPack.diff +++ /dev/null @@ -1,7 +0,0 @@ ---- a/electron-builder.yml -+++ b/electron-builder.yml -@@ -3,3 +3,3 @@ appId: com.heroicgameslauncher.hgl - productName: Heroic --afterSign: sign/afterSign.js -+afterPack: sign/afterSign.js - files: diff --git a/anda/games/heroic-games-launcher/heroic-games-launcher.spec b/anda/games/heroic-games-launcher/heroic-games-launcher.spec index 10f86af09f..faee1d53ec 100644 --- a/anda/games/heroic-games-launcher/heroic-games-launcher.spec +++ b/anda/games/heroic-games-launcher/heroic-games-launcher.spec @@ -1,28 +1,34 @@ %global debug_package %{nil} -%global __requires_exclude libffmpeg.so -%global __provides_exclude_from %{_datadir}/heroic/.*\\.so -%global __provides_exclude_from %{_datadir}/heroic/.*\\.so.1 -%define _build_id_links none -%global git_name HeroicGamesLauncher +%global __provides_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*))$ +%ifnarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\aarch64*\\.so.*))$ +%elifarch aarch64 +%global __requires_exclude ^((libffmpeg[.]so.*)|(lib.*\\.so.*)|(.*\\x86_64*\\.so.*)|(.*\\x86-64*\\.so.*))$ +%endif +%global org_name Heroic-Games-Launcher +%global git_name %(echo %{org_name} | sed 's/-//g') +%global reverse_dns com.heroicgameslauncher.hgl +%global shortname heroic +%global legendary_version 0.20.37 +%global gogdl_version 1.1.2 +%global nile_version 1.1.2 +%global comet_version 0.2.0 -Name: heroic-games-launcher -Version: 2.15.2 -Release: 1%{?dist} +Name: %{shortname}-games-launcher +Version: 2.18.1 +Release: 1%?dist Summary: A games launcher for GOG, Amazon, and Epic Games License: GPL-3.0-only AND MIT AND BSD-3-Clause URL: https://heroicgameslauncher.com -Source0: https://github.com/Heroic-Games-Launcher/%{git_name}/archive/refs/tags/v%{version}.tar.gz -Source1: https://raw.githubusercontent.com/Heroic-Games-Launcher/%{git_name}/refs/heads/main/flatpak/com.heroicgameslauncher.hgl.desktop -### Makes it actually sign the package, though will say it was skipped first. -Patch0: afterPack.diff -BuildRequires: bsdtar +BuildRequires: anda-srpm-macros BuildRequires: desktop-file-utils -### Electron builder builds some things with GCC(++) and Make +# Electron builder builds some things with GCC(++), Git, and Make BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: libxcrypt-compat +BuildRequires: git BuildRequires: make BuildRequires: nodejs +BuildRequires: nodejs-npm BuildRequires: pnpm BuildRequires: python3 Requires: alsa-lib @@ -31,62 +37,80 @@ Requires: hicolor-icon-theme Requires: nss Requires: python3 Requires: which -Recommends: gamemode +Recommends: (falcond or gamemode) Recommends: mangohud Recommends: umu-launcher -Packager: ShinyGil +Provides: bundled(comet) = %{comet_version} +Provides: bundled(gogdl) = %{gogdl_version} +Provides: bundled(legendary) = %{legendary_version} +Provides: bundled(nile) = %{nile_version} +Packager: Gilver E. %description Heroic is a Free and Open Source Epic, GOG, and Amazon Prime Games launcher for Linux, Windows, and macOS. %prep -%autosetup -n %{git_name}-%{version} -p1 -sed -i 's/Exec=.*%u/Exec=\/usr\/share\/heroic\/heroic %u/g' %{SOURCE1} -sed -i 's/Icon=.*/Icon=heroic/g' %{SOURCE1} +%git_clone https://github.com/%{org_name}/%{git_name} v%{version} %build pnpm install pnpm run download-helper-binaries -### RPM doesn't work and it needs a package format to generate icons, AppImage isn't a good option for packaging because it will try to self update -pnpm dist:linux pacman +pnpm dist:linux +wait %install -mkdir -p %{buildroot}%{_datadir}/heroic -mv dist/linux-unpacked/* %{buildroot}%{_datadir}/heroic +mkdir -p %{buildroot}%{_datadir}/%{shortname} +mv $(find . -iname "*LICENSE*" -not -path "./node_modules/*" -and -not -path "./public/*") . +rm -rf dist/linux-unpacked/resources/app.asar.unpacked/node_modules/font-list/libs/{darwin,win32} +%ifarch aarch64 +# Keep the x86_64 Windows binaries run through Wine just in case +rm -rf dist/linux-unpacked/resources/app.asar.unpacked/build/bin/x64/{darwin,linux} +mv dist/linux-arm64-unpacked/* %{buildroot}%{_datadir}/%{shortname} +%else +rm -rf dist/linux-unpacked/resources/app.asar.unpacked/build/bin/arm64 +mv dist/linux-unpacked/* %{buildroot}%{_datadir}/%{shortname} +%endif mkdir -p %{buildroot}%{_bindir} -ln -sr %{_datadir}/heroic/heroic %{buildroot}%{_bindir}/%{name} -install -Dm644 public/icon.png %{buildroot}%{_datadir}/pixmaps/heroic.png -install -Dm644 dist/.icon-set/icon_16x16.png %{buildroot}%{_iconsdir}/hicolor/16x16/heroic.png -install -Dm644 dist/.icon-set/icon_32x32.png %{buildroot}%{_iconsdir}/hicolor/32x32/heroic.png -install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/heroic.png -install -Dm644 dist/.icon-set/icon_64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/heroic.png -install -Dm644 dist/.icon-set/icon_128x128.png %{buildroot}%{_iconsdir}/hicolor/128x128/heroic.png -install -Dm644 dist/.icon-set/icon_256x256.png %{buildroot}%{_iconsdir}/hicolor/256x256/heroic.png -install -Dm644 dist/.icon-set/icon_512x512.png %{buildroot}%{_iconsdir}/hicolor/512x512/heroic.png -install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/heroic.png -install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/applications/heroic.desktop +# Make names executable +ln -sr %{_datadir}/%{shortname}/%{shortname} %{buildroot}%{_bindir}/%{name} +ln -sr %{_datadir}/%{shortname}/%{shortname} %{buildroot}%{_bindir}/%{shortname} +install -Dm644 dist/.icon-set/icon_16x16.png %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{reverse_dns}.png +install -Dm644 dist/.icon-set/icon_32x32.png %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{reverse_dns}.png +install -Dm644 dist/.icon-set/icon_48x48.png %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{reverse_dns}.png +install -Dm644 dist/.icon-set/icon_64x64.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/%{reverse_dns}.png +install -Dm644 dist/.icon-set/icon_128x128.png %{buildroot}%{_iconsdir}/hicolor/128x128/apps/%{reverse_dns}.png +install -Dm644 dist/.icon-set/icon_256x256.png %{buildroot}%{_iconsdir}/hicolor/256x256/apps/%{reverse_dns}.png +install -Dm644 dist/.icon-set/icon_512x512.png %{buildroot}%{_iconsdir}/hicolor/512x512/apps/%{reverse_dns}.png +install -Dm644 dist/.icon-set/icon_1024.png %{buildroot}%{_iconsdir}/hicolor/1024x1024/apps/%{reverse_dns}.png +desktop-file-install --set-key=Exec --set-value="/usr/share/%{shortname}/%{shortname} %u" flatpak/%{reverse_dns}.desktop %check -desktop-file-validate %{buildroot}%{_datadir}/applications/heroic.desktop +desktop-file-validate %{buildroot}%{_datadir}/applications/%{reverse_dns}.desktop %files %doc README.md %doc CODE_OF_CONDUCT.md %license COPYING -%_datadir/heroic -%_datadir/pixmaps/heroic.png -%_bindir/heroic-games-launcher -%_datadir/applications/heroic.desktop -%_iconsdir/hicolor/16x16/heroic.png -%_iconsdir/hicolor/32x32/heroic.png -%_iconsdir/hicolor/48x48/heroic.png -%_iconsdir/hicolor/64x64/heroic.png -%_iconsdir/hicolor/128x128/heroic.png -%_iconsdir/hicolor/256x256/heroic.png -%_iconsdir/hicolor/512x512/heroic.png -%_iconsdir/hicolor/1024x1024/heroic.png +%license legendary.LICENSE +%license LICENSES.chromium.html +%license LICENSE.electron.txt +%dir %{_datadir}/%{shortname} +%{_datadir}/%{shortname}/* +%{_bindir}/%{shortname} +%{_bindir}/%{name} +%{_datadir}/applications/%{reverse_dns}.desktop +%{_iconsdir}/hicolor/16x16/apps/%{reverse_dns}.png +%{_iconsdir}/hicolor/32x32/apps/%{reverse_dns}.png +%{_iconsdir}/hicolor/48x48/apps/%{reverse_dns}.png +%{_iconsdir}/hicolor/64x64/apps/%{reverse_dns}.png +%{_iconsdir}/hicolor/128x128/apps/%{reverse_dns}.png +%{_iconsdir}/hicolor/256x256/apps/%{reverse_dns}.png +%{_iconsdir}/hicolor/512x512/apps/%{reverse_dns}.png +%{_iconsdir}/hicolor/1024x1024/apps/%{reverse_dns}.png %changelog -* Thu Jan 30 2025 ShinyGil +* Sun Mar 02 2025 Gilver E. +- Update to 2.16.0 +- Fix incorrect RPM dependencies +* Thu Jan 30 2025 Gilver E. - Initial package - diff --git a/anda/games/heroic-games-launcher/update.rhai b/anda/games/heroic-games-launcher/update.rhai index 9e0e58fde7..958a12b74a 100644 --- a/anda/games/heroic-games-launcher/update.rhai +++ b/anda/games/heroic-games-launcher/update.rhai @@ -1 +1,14 @@ -rpm.version(gh("Heroic-Games-Launcher/HeroicGamesLauncher")); +let v = gh_rawfile("Heroic-Games-Launcher/HeroicGamesLauncher", "main", "package.json").json()["version"]; +rpm.version(v); +// Versions for bundled binaries. Most important for Legendary as Fedora packages this. +if rpm.changed() { + let ts = gh_rawfile("Heroic-Games-Launcher/HeroicGamesLauncher", `v${v}`, "meta/downloadHelperBinaries.ts"); + let lv = find("legendary: '([\\d.]+)'", ts, 1); + let gv = find("gogdl: 'v([\\d.]+)'", ts, 1); + let nv = find("nile: 'v([\\d.]+)'", ts, 1); + let cv = find("comet: 'v([\\d.]+)'", ts, 1); + rpm.global("legendary_version", lv); + rpm.global("gogdl_version", gv); + rpm.global("nile_version", nv); + rpm.global("comet_version", cv); +} diff --git a/anda/games/inputplumber/inputplumber.spec b/anda/games/inputplumber/inputplumber.spec index 875ea52eef..6fd55dec2f 100644 --- a/anda/games/inputplumber/inputplumber.spec +++ b/anda/games/inputplumber/inputplumber.spec @@ -1,12 +1,15 @@ +%global __brp_mangle_shebangs %{nil} + Name: inputplumber -Version: 0.47.3 +Version: 0.62.2 Release: 1%?dist Summary: Open source input router and remapper daemon for Linux License: GPL-3.0-or-later URL: https://github.com/ShadowBlip/InputPlumber Source0: %{url}/archive/refs/tags/v%version.tar.gz +Patch0: make-install-dont-build.patch BuildRequires: libevdev-devel libiio-devel git make cargo libudev-devel llvm-devel clang-devel -BuildRequires: rust-packaging cargo-rpm-macros mold rpm_macro(cargo_prep_online) +BuildRequires: rust-packaging cargo-rpm-macros mold rpm_macro(cargo_prep_online) systemd-rpm-macros Requires: libevdev libiio Recommends: steam gamescope-session linuxconsoletools Packager: madonuko @@ -44,5 +47,7 @@ keyboards) and translate their input to a variety of virtual device formats. %_unitdir/inputplumber.service %_unitdir/inputplumber-suspend.service %_udevhwdbdir/59-inputplumber.hwdb +%_udevhwdbdir/60-inputplumber-autostart.hwdb +%_udevrulesdir/90-inputplumber-autostart.rules %_datadir/dbus-1/system.d/org.shadowblip.InputPlumber.conf %_datadir/inputplumber/ diff --git a/anda/games/inputplumber/make-install-dont-build.patch b/anda/games/inputplumber/make-install-dont-build.patch new file mode 100644 index 0000000000..de7f6053e1 --- /dev/null +++ b/anda/games/inputplumber/make-install-dont-build.patch @@ -0,0 +1,13 @@ +--- a/Makefile 2025-05-21 22:56:09.064696169 -0500 ++++ b/Makefile 2025-05-21 23:14:40.494058939 -0500 +@@ -41,8 +41,8 @@ + @awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST) + + .PHONY: install +-install: build ## Install inputplumber to the given prefix (default: PREFIX=/usr) +- install -D -m 755 target/$(TARGET_ARCH)/$(BUILD_TYPE)/$(NAME) \ ++install: ++ install -D -m 755 target/$(BUILD_TYPE)/$(NAME) \ + $(PREFIX)/bin/$(NAME) + install -D -m 644 rootfs/usr/share/dbus-1/system.d/$(DBUS_NAME).conf \ + $(PREFIX)/share/dbus-1/system.d/$(DBUS_NAME).conf diff --git a/anda/games/minecraft-java/minecraft-java.spec b/anda/games/minecraft-java/minecraft-java.spec index f558081007..2df0e94b45 100644 --- a/anda/games/minecraft-java/minecraft-java.spec +++ b/anda/games/minecraft-java/minecraft-java.spec @@ -17,7 +17,7 @@ ExclusiveArch: x86_64 Requires: java >= 1.8.0 Requires: gtk3 Requires: libgpg-error -Requires: (gnome-keyring or kwallet) +Requires: (gnome-keyring or kf6-kwallet or kf5-kwallet or kwallet) %description The official Linux release of the launcher for Minecraft, a game about placing blocks and going on adventures. diff --git a/anda/games/opengamepadui/opengamepadui.spec b/anda/games/opengamepadui/opengamepadui.spec index e29d8635f3..420e6890ec 100644 --- a/anda/games/opengamepadui/opengamepadui.spec +++ b/anda/games/opengamepadui/opengamepadui.spec @@ -1,5 +1,5 @@ Name: opengamepadui -Version: 0.35.8 +Version: 0.41.0 Release: 1%?dist Summary: Open source gamepad-native game launcher and overlay diff --git a/anda/games/osu-lazer/osu-lazer.spec b/anda/games/osu-lazer/osu-lazer.spec index d9e81d7316..483c40b3ef 100644 --- a/anda/games/osu-lazer/osu-lazer.spec +++ b/anda/games/osu-lazer/osu-lazer.spec @@ -1,9 +1,9 @@ -%define osuresver 2025.217.0 +%define osuresver 2025.819.0 %global debug_package %{nil} %define __strip /bin/true Name: osu-lazer -Version: 2025.221.0 +Version: 2025.816.0.lazer Release: 1%?dist Summary: The future of osu! and the beginning of an open era! Commonly known by the codename osu!lazer. Pew pew. ExclusiveArch: x86_64 diff --git a/anda/games/prismlauncher-nightly/anda.hcl b/anda/games/prismlauncher-nightly/anda.hcl index c776dc73ee..7d609cf7e9 100644 --- a/anda/games/prismlauncher-nightly/anda.hcl +++ b/anda/games/prismlauncher-nightly/anda.hcl @@ -5,5 +5,6 @@ project pkg { } labels { nightly = "1" + mock = 1 } } diff --git a/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec b/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec index 7467ed8bec..dd0ee5f0b3 100644 --- a/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec +++ b/anda/games/prismlauncher-nightly/prismlauncher-nightly.spec @@ -1,11 +1,10 @@ %global real_name prismlauncher %global nice_name PrismLauncher -%global commit 0af021fef2628e35ff9ebaa8340e080d0ddd6556 +%global commit 5480ce6b4418819ee0465fd96919167150a07c43 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global libnbtplusplus_commit 23b955121b8217c1c348a9ed2483167a6f3ff4ad -%global commit_date 20250220 +%global commit_date 20250822 %global snapshot_info %{commit_date}.%{shortcommit} %bcond_without qt6 @@ -36,8 +35,6 @@ Summary: Minecraft launcher with ability to manage multiple instances License: GPL-3.0-only AND Apache-2.0 AND LGPL-3.0-only AND GPL-3.0-or-later AND GPL-2.0-or-later AND ISC AND OFL-1.1 AND LGPL-2.1-only AND MIT AND BSD-2-Clause-FreeBSD AND BSD-3-Clause AND LGPL-3.0-or-later Group: Amusements/Games URL: https://prismlauncher.org/ -Source0: https://github.com/PrismLauncher/PrismLauncher/archive/%{commit}/%{real_name}-%{shortcommit}.tar.gz -Source1: https://github.com/PrismLauncher/libnbtplusplus/archive/%{libnbtplusplus_commit}/libnbtplusplus-%{libnbtplusplus_commit}.tar.gz Patch0: 0001-find-cmark-with-pkgconfig.patch BuildRequires: cmake >= 3.15 @@ -53,6 +50,7 @@ BuildRequires: temurin-17-jdk %else BuildRequires: java-17-openjdk-devel %endif +BuildRequires: anda-srpm-macros BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: tomlplusplus-devel @@ -112,12 +110,9 @@ multiple installations of Minecraft at once (Fork of MultiMC) %prep -%autosetup -p1 -n PrismLauncher-%{commit} +%git_clone https://github.com/%{nice_name}/%{nice_name}.git %{commit} -tar -xzf %{SOURCE1} -C libraries - -rmdir libraries/{extra-cmake-modules,filesystem,libnbtplusplus,zlib}/ -mv -f libraries/libnbtplusplus-%{libnbtplusplus_commit} libraries/libnbtplusplus +rm -rf libraries/{extra-cmake-modules,zlib}/ # Do not set RPATH sed -i "s|\$ORIGIN/||" CMakeLists.txt diff --git a/anda/games/prismlauncher/anda.hcl b/anda/games/prismlauncher/anda.hcl index 59962c6daf..3a35d4fe52 100644 --- a/anda/games/prismlauncher/anda.hcl +++ b/anda/games/prismlauncher/anda.hcl @@ -3,4 +3,7 @@ project pkg { spec = "prismlauncher.spec" extra_repos = ["https://packages.adoptium.net/artifactory/rpm/fedora/\\$releasever/\\$basearch"] } + labels { + mock = 1 + } } diff --git a/anda/games/prismlauncher/prismlauncher.spec b/anda/games/prismlauncher/prismlauncher.spec index 5c8f30aa28..817e6063de 100644 --- a/anda/games/prismlauncher/prismlauncher.spec +++ b/anda/games/prismlauncher/prismlauncher.spec @@ -22,7 +22,7 @@ Name: prismlauncher %else Name: prismlauncher-qt5 %endif -Version: 9.2 +Version: 9.4 Release: 1%?dist Summary: Minecraft launcher with ability to manage multiple instances # see COPYING.md for more information diff --git a/anda/games/rpcs3/anda.hcl b/anda/games/rpcs3/anda.hcl new file mode 100644 index 0000000000..f17fc5aed0 --- /dev/null +++ b/anda/games/rpcs3/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "rpcs3.spec" + } + labels { + mock = 1 + } +} diff --git a/anda/games/rpcs3/rpcs3.spec b/anda/games/rpcs3/rpcs3.spec new file mode 100644 index 0000000000..417d377911 --- /dev/null +++ b/anda/games/rpcs3/rpcs3.spec @@ -0,0 +1,105 @@ +%global _distro_extra_cflags -Wno-uninitialized +%global _distro_extra_cxxflags -include %_includedir/c++/*/cstdint +# GLIBCXX_ASSERTIONS is known to break RPCS3 +%global build_cflags %(echo %{__build_flags_lang_c} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS//g') %{?_distro_extra_cflags} +%global build_cxxflags %(echo %{__build_flags_lang_cxx} | sed 's/-Wp,-D_GLIBCXX_ASSERTIONS//g') %{?_distro_extra_cxxflags} +# Need to get rid of everything Clang can't use and undefine -Wunused-command-line-argument where possible due to the project's build flags +%global build_cflags %(echo %{build_cflags} | sed 's:-Werror ::g' | sed 's:-Wunused-command-line-argument ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-package-notes ::g') -Wno-unused-command-line-argument +%global build_cxxflags %(echo %{build_cxxflags} | sed 's:-Werror ::g' | sed 's:-Wunused-command-line-argument ::g' | sed 's:-specs\=/usr/lib/rpm/redhat/redhat-annobin-cc1 ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-hardened-ld-errors ::g' | sed 's:-specs=/usr/lib/rpm/redhat/redhat-package-notes ::g') -Wno-unused-command-line-argument +%global commit d72f95677e92fd6031214d20861379ed005207a5 +%global ver 0.0.37-18110 + +Name: rpcs3 +Version: %(echo %{ver} | sed 's/-/^/g') +Release: 1%?dist +Summary: PlayStation 3 emulator and debugger +License: GPL-2.0-only +URL: https://github.com/RPCS3/rpcs3 +%dnl Source0: %url/archive/refs/tags/v%version.tar.gz +BuildRequires: anda-srpm-macros glew openal-soft cmake vulkan-validation-layers git-core mold +BuildRequires: clang +BuildRequires: cmake(FAudio) +BuildRequires: cmake(OpenAL) +BuildRequires: cmake(OpenCV) +BuildRequires: cmake(Qt6Multimedia) +BuildRequires: cmake(Qt6Svg) +BuildRequires: pkgconfig(sdl3) +BuildRequires: pkgconfig(sndio) +BuildRequires: pkgconfig(jack) +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(glew) +BuildRequires: pkgconfig(flatbuffers) +BuildRequires: pkgconfig(libzstd) +BuildRequires: pkgconfig(libusb-1.0) +BuildRequires: pkgconfig(libevdev) +BuildRequires: pkgconfig(libudev) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(vulkan) +BuildRequires: pkgconfig(libffi) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(pugixml) +BuildRequires: pkgconfig(xkbcommon) +BuildRequires: pkgconfig(zlib) +BuildRequires: pkgconfig(sdl2) +BuildRequires: pkgconfig(libavcodec) +BuildRequires: pkgconfig(libavformat) +BuildRequires: pkgconfig(libavutil) +BuildRequires: pkgconfig(libswscale) +BuildRequires: pkgconfig(libswresample) +BuildRequires: pkgconfig(wayland-server) +BuildRequires: pkgconfig(wayland-cursor) +#BuildRequires: pkgconfig(wayland-eglstream) +BuildRequires: doxygen +BuildRequires: qt6-qtbase-private-devel vulkan-devel jack-audio-connection-kit-devel llvm-devel + +%description +%summary. + +%prep +%git_clone %url %commit + +%build +# Looking at the CMakeLists.txt, this is the intended compiler and there are no fixes for GCC on aarch64 +%cmake -DDISABLE_LTO=TRUE \ + -DZSTD_BUILD_STATIC=ON \ + -DCMAKE_SKIP_RPATH=ON \ + -DBUILD_SHARED_LIBS:BOOL=OFF \ + -DUSE_NATIVE_INSTRUCTIONS=OFF \ + -DCMAKE_C_FLAGS="$CFLAGS" \ + -DCMAKE_CXX_FLAGS="$CXXFLAGS" \ + -DSTATIC_LINK_LLVM=OFF \ + -DUSE_SYSTEM_FAUDIO=ON \ + -DUSE_SDL=ON \ + -DUSE_SYSTEM_SDL=ON \ + -DBUILD_LLVM=OFF \ + -DUSE_PRECOMPILED_HEADERS=OFF \ + -DUSE_DISCORD_RPC=ON \ + -DUSE_SYSTEM_FFMPEG=ON \ + -DUSE_SYSTEM_LIBPNG=ON \ + -DUSE_SYSTEM_ZLIB=ON \ + -DUSE_SYSTEM_OPENCV=ON \ + -DUSE_SYSTEM_CURL=ON \ + -DUSE_SYSTEM_FLATBUFFERS=OFF \ + -DUSE_SYSTEM_PUGIXML=OFF \ + -DUSE_SYSTEM_WOLFSSL=OFF \ + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ + -DCMAKE_LINKER=mold \ + -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS -fuse-ld=mold" \ + -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS -fuse-ld=mold" +%cmake_build + +%install +%cmake_install + +%files +%doc README.md +%license LICENSE +%_bindir/rpcs3 +%_datadir/applications/rpcs3.desktop +%_datadir/metainfo/rpcs3.metainfo.xml +%_datadir/rpcs3/ +%_iconsdir/hicolor/48x48/apps/rpcs3.png +%_iconsdir/hicolor/scalable/apps/rpcs3.svg diff --git a/anda/games/rpcs3/update.rhai b/anda/games/rpcs3/update.rhai new file mode 100644 index 0000000000..9387eb5f79 --- /dev/null +++ b/anda/games/rpcs3/update.rhai @@ -0,0 +1,9 @@ +let html = get("https://rpcs3.net/download"); +let v = find("Build ([\\d.]+-[\\d.]+)\\s+", html, 1); +rpm.global("ver", v); + +if rpm.changed () { + let c = find("Commit +Provides: steam_notif_daemon = %version-%release +BuildRequires: meson gcc +BuildRequires: pkgconfig(libsystemd) +BuildRequires: pkgconfig(libcurl) + +%description +%summary. + +%prep +%autosetup -n steam_notif_daemon-%version + +%build +%meson -Dsd-bus-provider=libsystemd +%meson_build + +%install +%meson_install + +%files +%doc README.md +%license LICENSE +%_bindir/steam_notif_daemon diff --git a/anda/games/steam-notif-daemon/update.rhai b/anda/games/steam-notif-daemon/update.rhai new file mode 100644 index 0000000000..3ec8a21ab1 --- /dev/null +++ b/anda/games/steam-notif-daemon/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("Jovian-Experiments/steam_notif_daemon")); diff --git a/anda/games/steam/steam.spec b/anda/games/steam/steam.spec index 5d3721c38c..1cb401d912 100644 --- a/anda/games/steam/steam.spec +++ b/anda/games/steam/steam.spec @@ -4,7 +4,7 @@ %global appstream_id com.valvesoftware.Steam Name: steam -Version: 1.0.0.82 +Version: 1.0.0.84 Release: 1%?dist Summary: Installer for the Steam software distribution service # Redistribution and repackaging for Linux is allowed, see license file. udev rules are MIT. @@ -30,12 +30,8 @@ Source6: https://raw.githubusercontent.com/denilsonsa/udev-joystick-black # Configure limits in systemd Source7: https://github.com/terrapkg/pkg-steam/raw/refs/heads/main/01-steam.conf -# Newer udev rules than what is bundled in the tarball -Source8: https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-input.rules -Source9: https://raw.githubusercontent.com/ValveSoftware/steam-devices/master/60-steam-vr.rules - # Steam restart script -Source11: steamrestart.sh +Source9: steamrestart.sh # Do not install desktop file in lib/steam, do not install apt sources Patch0: https://github.com/terrapkg/pkg-steam/raw/refs/heads/main/steam-makefile.patch @@ -115,8 +111,8 @@ Requires: SDL2%{?_isa} %endif # Game performance is increased with gamemode (for games that support it) -Recommends: gamemode -Recommends: gamemode%{?_isa} +Recommends: (falcond or gamemode) +Recommends: (gamemode%{?_isa} if gamemode(x86-64)) Recommends: (gnome-shell-extension-appindicator if gnome-shell) Recommends: (gnome-shell-extension-appindicator if gnome-shell) @@ -133,10 +129,11 @@ Recommends: xdg-user-dirs # Allow using Steam Runtime Launch Options Recommends: gobject-introspection -Requires: steam-devices = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: steam-devices +Requires: steam-device-rules -# Woarkaround for GNOME issues with libei -Recommends: (extest if gnome-shell) +# Workaround for GNOME issues with libei +Recommends: (extest-%{name} if gnome-shell) %description Steam is a software distribution service with an online store, automated @@ -145,16 +142,13 @@ and screenshot functionality, and many social features. This package contains the installer for the Steam software distribution service. -%package devices -Summary: Permissions required by Steam for gaming devices +%package device-rules +Summary: Fix for keyboard/mouse/tablet being detected as joystick in Linux +Obsoletes: steam-devices < %{version}-%{release} BuildArch: noarch -%description devices -Steam is a software distribution service with an online store, automated -installation, automatic updates, achievements, SteamCloud synchronized savegame -and screenshot functionality, and many social features. - -This package contains the necessary permissions for gaming devices. +%description device-rules +This package contains fixes for devices being detected incorrectly by Steam. %prep %autosetup -p1 -n %{name}-launcher @@ -171,7 +165,7 @@ rm -fr %{buildroot}%{_docdir}/%{name}/ \ %{buildroot}%{_bindir}/%{name}deps mkdir -p %{buildroot}%{_udevrulesdir}/ -install -m 644 -p %{SOURCE6} %{SOURCE8} %{SOURCE9} \ +install -m 644 -p %{SOURCE6} \ %{buildroot}%{_udevrulesdir}/ # Environment files @@ -183,7 +177,11 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system.conf.d/ mkdir -p %{buildroot}%{_prefix}/lib/systemd/user.conf.d/ install -m 644 -p %{SOURCE7} %{buildroot}%{_prefix}/lib/systemd/system.conf.d/ install -m 644 -p %{SOURCE7} %{buildroot}%{_prefix}/lib/systemd/user.conf.d/ -install -m 775 -p %{SOURCE11} %{buildroot}%{_bindir}/steamrestart +install -m 775 -p %{SOURCE9} %{buildroot}%{_bindir}/steamrestart + +# https://github.com/ValveSoftware/steam-for-linux/issues/9940 +desktop-file-edit --remove-key=PrefersNonDefaultGPU %{buildroot}%{_datadir}/applications/%{name}.desktop +desktop-file-edit --remove-key=X-KDE-RunOnDiscreteGpu %{buildroot}%{_datadir}/applications/%{name}.desktop %check desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop @@ -208,8 +206,8 @@ appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{appstream_id %dir %{_prefix}/lib/systemd/user.conf.d/ %{_prefix}/lib/systemd/user.conf.d/01-steam.conf -%files devices -%{_udevrulesdir}/* +%files device-rules +%{_udevrulesdir}/51-these-are-not-joysticks-rm.rules %changelog * Sun Sep 01 2024 Simone Caronni - 1.0.0.81-1 diff --git a/anda/games/steam/update.rhai b/anda/games/steam/update.rhai index 3114c49fcd..b7a61600f2 100644 --- a/anda/games/steam/update.rhai +++ b/anda/games/steam/update.rhai @@ -1 +1 @@ -rpm.version(find(`\nVersion:\s+1:(.+?)\s`, get("https://repo.steampowered.com/steam/archive/stable/steam_latest.dsc"), 1)); +rpm.version(find(`\nVersion:\s+1:(.+?)\s`, get("https://repo.steampowered.com/steam/archive/beta/steam_latest-beta.dsc"), 1)); diff --git a/anda/games/steamtinkerlaunch/git/anda.hcl b/anda/games/steamtinkerlaunch/git/anda.hcl new file mode 100644 index 0000000000..263fbadf27 --- /dev/null +++ b/anda/games/steamtinkerlaunch/git/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "steamtinkerlaunch-git.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/games/steamtinkerlaunch/git/steamtinkerlaunch-git.spec b/anda/games/steamtinkerlaunch/git/steamtinkerlaunch-git.spec new file mode 100644 index 0000000000..98447bf865 --- /dev/null +++ b/anda/games/steamtinkerlaunch/git/steamtinkerlaunch-git.spec @@ -0,0 +1,82 @@ +%global commit 8550ab26a712b7f5f6d0947070181446b9de61fd +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250715 +%global ver 12.12 +%global base_name steamtinkerlaunch +%global _description %{expand: +Steam Tinker Launch is a Linux wrapper tool for use with the Steam client which allows customizing and start tools and options for games quickly on the fly.} + +Name: %{base_name}-git +Version: %{ver}^%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Wrapper tool for use with the Steam client for custom launch options +License: GPL-3.0-or-later +URL: https://github.com/sonic2kk/steamtinkerlaunch +Source0: %{url}/archive/%{commit}/%{base_name}-%{commit}.tar.gz +BuildRequires: make +BuildRequires: sed +Requires: bash +Requires: gawk +Requires: git +Requires: procps-ng +Requires: tar +Requires: unzip +Requires: vim-common +Requires: wget +Requires: xdotool +Requires: xprop +Requires: xrandr +Requires: xwininfo +Requires: xxd +Requires: yad >= 7.2 +# Weak deps for various optional features +Recommends: gamemode +Recommends: gameconqueror +# Default to terra-gamescope if available as Fedora's Gamescope package is notoriously broken, otherwise recommend Fedora's +Recommends: (terra-gamescope or gamescope) +Recommends: ImageMagick +Recommends: innoextract +Recommends: jq +Recommends: mangohud +Recommends: net-toolsa +Recommends: p7zip +Recommends: rsync +Recommends: scummvm +Recommends: strace +Recommends: usbutils +Recommends: vkBasalt +# Default to whatever WINE source the user has +Recommends: (winehq-staging or wine) +Recommends: winetricks +Recommends: xdg-utils +# Terra tag policy +Provides: %{base_name}.git +Conflicts: %{base_name} +BuildArch: noarch +Packager: Gilver E. + +%description %_description + +%prep +%autosetup -p1 -n %{base_name}-%{commit} +# We only want the install commands from the Makefile +sed -i 's/.*sed.*//g' Makefile +# Let RPM handle the doc files +sed -i 's/.*doc.*//g' Makefile + +%build + +%install +%make_install PREFIX=%{buildroot}%{_prefix} + +%files +%license LICENSE +%doc README.md +%{_bindir}/steamtinkerlaunch +%{_datadir}/steamtinkerlaunch +%{_datadir}/applications/steamtinkerlaunch.desktop +%{_datadir}/icons/hicolor/scalable/apps/steamtinkerlaunch.svg + +%changelog +* Wed Mar 26 2025 Gilver E. - 12.12 +- Initial package diff --git a/anda/games/steamtinkerlaunch/git/update.rhai b/anda/games/steamtinkerlaunch/git/update.rhai new file mode 100644 index 0000000000..d6f444d26f --- /dev/null +++ b/anda/games/steamtinkerlaunch/git/update.rhai @@ -0,0 +1,8 @@ +rpm.global("commit", gh_commit("sonic2kk/steamtinkerlaunch")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); + let v = gh("sonic2kk/steamtinkerlaunch"); + v.crop(1); + rpm.global("ver", v); +} diff --git a/anda/games/steamtinkerlaunch/stable/anda.hcl b/anda/games/steamtinkerlaunch/stable/anda.hcl new file mode 100644 index 0000000000..58d0869f7a --- /dev/null +++ b/anda/games/steamtinkerlaunch/stable/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "steamtinkerlaunch.spec" + } +} diff --git a/anda/games/steamtinkerlaunch/stable/steamtinkerlaunch.spec b/anda/games/steamtinkerlaunch/stable/steamtinkerlaunch.spec new file mode 100644 index 0000000000..d888d26691 --- /dev/null +++ b/anda/games/steamtinkerlaunch/stable/steamtinkerlaunch.spec @@ -0,0 +1,75 @@ +%global _description %{expand: +Steam Tinker Launch is a Linux wrapper tool for use with the Steam client which allows customizing and start tools and options for games quickly on the fly.} + +Name: steamtinkerlaunch +Version: 12.12 +Release: 1%{?dist} +Summary: Wrapper tool for use with the Steam client for custom launch options +License: GPL-3.0-or-later +URL: https://github.com/sonic2kk/steamtinkerlaunch +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: make +BuildRequires: sed +Requires: bash +Requires: gawk +Requires: git +Requires: procps-ng +Requires: tar +Requires: unzip +Requires: vim-common +Requires: wget +Requires: xdotool +Requires: xprop +Requires: xrandr +Requires: xwininfo +Requires: xxd +Requires: yad >= 7.2 +# Weak deps for various optional features +Recommends: gamemode +Recommends: gameconqueror +# Default to terra-gamescope if available as Fedora's Gamescope package is notoriously broken, otherwise recommend Fedora's +Recommends: (terra-gamescope or gamescope) +Recommends: ImageMagick +Recommends: innoextract +Recommends: jq +Recommends: mangohud +Recommends: net-toolsa +Recommends: p7zip +Recommends: rsync +Recommends: scummvm +Recommends: strace +Recommends: usbutils +Recommends: vkBasalt +# Default to whatever WINE source the user has +Recommends: (winehq-staging or wine) +Recommends: winetricks +Recommends: xdg-utils +Conflicts: %{name}-git +BuildArch: noarch +Packager: Gilver E. + +%description %_description + +%prep +%autosetup -p1 -n %{name}-%{version} +# We only want the install commands from the Makefile +sed -i 's/.*sed.*//g' Makefile +# Let RPM handle the doc files +sed -i 's/.*doc.*//g' Makefile + +%build + +%install +%make_install PREFIX=%{buildroot}%{_prefix} + +%files +%license LICENSE +%doc README.md +%{_bindir}/steamtinkerlaunch +%{_datadir}/steamtinkerlaunch +%{_datadir}/applications/steamtinkerlaunch.desktop +%{_datadir}/icons/hicolor/scalable/apps/steamtinkerlaunch.svg + +%changelog +* Wed Mar 26 2025 Gilver E. - 12.12 +- Initial package diff --git a/anda/games/steamtinkerlaunch/stable/update.rhai b/anda/games/steamtinkerlaunch/stable/update.rhai new file mode 100644 index 0000000000..c9a6a93391 --- /dev/null +++ b/anda/games/steamtinkerlaunch/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("sonic2kk/steamtinkerlaunch")); diff --git a/anda/games/terra-gamescope/terra-gamescope.spec b/anda/games/terra-gamescope/terra-gamescope.spec index 6bdb023131..087dd1e74f 100755 --- a/anda/games/terra-gamescope/terra-gamescope.spec +++ b/anda/games/terra-gamescope/terra-gamescope.spec @@ -9,7 +9,7 @@ Name: terra-gamescope #Version: 100.%{gamescope_tag} Version: 104.%{short_commit} -Release: 1%?dist +Release: 2%?dist Summary: Micro-compositor for video games on Wayland License: BSD @@ -86,7 +86,9 @@ BuildRequires: git Requires: libliftoff%{?_isa} >= %{libliftoff_minver} Requires: xorg-x11-server-Xwayland Requires: terra-gamescope-libs = %{version}-%{release} +%ifarch x86_64 Requires: terra-gamescope-libs(x86-32) = %{version}-%{release} +%endif Recommends: mesa-dri-drivers Recommends: mesa-vulkan-drivers diff --git a/anda/games/umu/umu-launcher.spec b/anda/games/umu/umu-launcher.spec index 84b2bedd4d..66fec63446 100644 --- a/anda/games/umu/umu-launcher.spec +++ b/anda/games/umu/umu-launcher.spec @@ -1,5 +1,5 @@ Name: umu-launcher -Version: 1.2.5 +Version: 1.2.9 Release: 1%?dist Summary: A tool for launching non-steam games with proton @@ -32,8 +32,9 @@ Requires: python Requires: python3 %if %{?fedora} <= 41 Requires: python3-xlib -Requires: python3-filelock Requires: python3-pyzstd +Requires: python3-xxhash +Requires: python3-cbor2 AutoReqProv: no %endif @@ -55,10 +56,9 @@ BuildArch: x86_64 %{make_build} %install -%make_install PYTHONDIR=%python3_sitelib +%make_install PYTHONDIR=%{python3_sitelib} %files %_bindir/umu-run %_mandir/* -%_datadir/steam/compatibilitytools.d/umu-launcher/ %python3_sitelib/umu* diff --git a/anda/langs/crystal/crystal/crystal.spec b/anda/langs/crystal/crystal/crystal.spec index e073326742..2413d2e9d1 100644 --- a/anda/langs/crystal/crystal/crystal.spec +++ b/anda/langs/crystal/crystal/crystal.spec @@ -1,7 +1,7 @@ %define debug_package %nil Name: crystal -Version: 1.15.1 +Version: 1.17.1 Release: 1%?dist Summary: The Crystal Programming Language License: Apache-2.0 diff --git a/anda/langs/d/btdu/anda.hcl b/anda/langs/d/btdu/anda.hcl new file mode 100644 index 0000000000..0c2f5d88d5 --- /dev/null +++ b/anda/langs/d/btdu/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "btdu.spec" + } +} diff --git a/anda/langs/d/btdu/btdu.spec b/anda/langs/d/btdu/btdu.spec new file mode 100644 index 0000000000..3df7e69e0f --- /dev/null +++ b/anda/langs/d/btdu/btdu.spec @@ -0,0 +1,40 @@ +%define debug_package %nil + +Name: btdu +Version: 0.6.0 +Release: 1%?dist +Summary: Sampling disk usage profiler for btrfs +License: GPL-2.0-only +URL: https://github.com/CyberShadow/btdu +Source0: %url/archive/refs/tags/v%version.tar.gz +# gcc-gdc is built using ldc ironically +# let's just use ldc instead, they have the funny macros +BuildRequires: dub ldc mold +BuildRequires: pkgconfig(ncurses) +ExclusiveArch: %ldc_arches + +%description +%summary. + +%prep +%autosetup + +%build +# see macro _d_optflags +# got rid of -release +export DFLAGS="-O -gc -wi --linker=mold" +dub build -b release --parallel -n -y --compiler=ldmd2 # release-debug doesn't work + +%install +install -Dpm755 btdu -t %buildroot%_bindir +install -Dpm644 btdu.1 -t %buildroot%_mandir/man1 + +%files +%doc README.md +%license COPYING +%_bindir/btdu +%_mandir/man1/btdu.1.gz + +%changelog +* Sun May 05 2024 madonuko - 0.5-1 +- Initial package. diff --git a/anda/langs/d/btdu/update.rhai b/anda/langs/d/btdu/update.rhai new file mode 100644 index 0000000000..1689fa4601 --- /dev/null +++ b/anda/langs/d/btdu/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("CyberShadow/btdu")); diff --git a/anda/langs/dart/dart.spec b/anda/langs/dart/dart.spec index 2db7819fa1..2229a34619 100644 --- a/anda/langs/dart/dart.spec +++ b/anda/langs/dart/dart.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: dart -Version: 3.7.0 +Version: 3.9.1 Release: 1%?dist Summary: The Dart Language License: BSD-3-Clause diff --git a/anda/langs/go/albius/albius.spec b/anda/langs/go/albius/albius.spec index 35f0f7c4e0..c9a4a44aa2 100644 --- a/anda/langs/go/albius/albius.spec +++ b/anda/langs/go/albius/albius.spec @@ -1,6 +1,6 @@ %define debug_package %nil -%global commit e5c90d2e7406cc7c9652a49bd8eb67771a76eedf -%global commit_date 20241128 +%global commit 7409af7329c51416703c512f5e049368dfb3e710 +%global commit_date 20250613 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: albius diff --git a/anda/langs/go/chezmoi/anda.hcl b/anda/langs/go/chezmoi/anda.hcl new file mode 100644 index 0000000000..1b9cadbb43 --- /dev/null +++ b/anda/langs/go/chezmoi/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "chezmoi.spec" + } +} diff --git a/anda/langs/go/chezmoi/chezmoi.spec b/anda/langs/go/chezmoi/chezmoi.spec new file mode 100644 index 0000000000..b6db1a84c7 --- /dev/null +++ b/anda/langs/go/chezmoi/chezmoi.spec @@ -0,0 +1,74 @@ +# Generated by go2rpm 1.15.0 +%bcond check 0 +%bcond bootstrap 0 + +# https://github.com/twpayne/chezmoi +%global goipath github.com/twpayne/chezmoi +Version: 2.64.0 + +%gometa -f + +%global common_description %{expand: +Manage your dotfiles across multiple diverse machines, securely.} + +%global golicenses LICENSE assets/chezmoi.io/docs/license.md\\\ + assets/chezmoi.io/docs/reference/commands/license.md +%global godocs .markdownlint-cli2.yaml README.md docs\\\ + assets/chezmoi.io/snippets/config-format.md\\\ + assets/chezmoi.io/snippets/common-flags/exclude.md\\\ + assets/chezmoi.io/snippets/common-flags/format.md\\\ + assets/chezmoi.io/snippets/common-flags/include.md\\\ + assets/chezmoi.io/snippets/common-flags/init.md\\\ + assets/chezmoi.io/snippets/common-flags/nul-path-\\\ + separator.md assets/chezmoi.io/snippets/common-\\\ + flags/parent-dirs.md\\\ + assets/chezmoi.io/snippets/common-flags/path-style.md\\\ + assets/chezmoi.io/snippets/common-flags/recursive.md\\\ + assets/chezmoi.io/snippets/common-flags/tree.md + +Name: chezmoi +Release: 1%?dist +Summary: Manage your dotfiles across multiple diverse machines, securely + +License: MIT +URL: %{gourl} +Source: %{gosource} + +%description %{common_description} + +#gopkg + +%prep +%goprep + +%build +%define gomodulesmode GO111MODULE=on +%define __gobuild_extldflags -X main.version=%version -X main.builtBy=%vendor +go clean -modcache +rm go.sum +go mod tidy +%gobuild -o %{gobuilddir}/bin/chezmoi . + +%install +#gopkginstall +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +install -m 0644 -Dvp completions/chezmoi-completion.bash %{buildroot}%{bash_completions_dir}/chezmoi +install -m 0644 -Dvp completions/chezmoi.fish -t %{buildroot}%{fish_completions_dir}/ +install -m 0644 -Dvp completions/chezmoi.zsh %{buildroot}%{zsh_completions_dir}/_chezmoi + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%files +%license LICENSE +%doc README.md +%{_bindir}/chezmoi + +%pkg_completion -Bfz + +#gopkgfiles diff --git a/anda/langs/go/chezmoi/update.rhai b/anda/langs/go/chezmoi/update.rhai new file mode 100644 index 0000000000..375ad36766 --- /dev/null +++ b/anda/langs/go/chezmoi/update.rhai @@ -0,0 +1 @@ +rpm.version(`

The latest version of chezmoi is ([\d.]+)`.find(get("https://www.chezmoi.io"), 1)); diff --git a/anda/langs/go/curlie/golang-github-rs-curlie.spec b/anda/langs/go/curlie/golang-github-rs-curlie.spec index 364bca654d..8f3ebe62d8 100644 --- a/anda/langs/go/curlie/golang-github-rs-curlie.spec +++ b/anda/langs/go/curlie/golang-github-rs-curlie.spec @@ -3,7 +3,7 @@ # https://github.com/rs/curlie %global goipath github.com/rs/curlie -Version: 1.7.2 +Version: 1.8.2 %gometa -f @@ -14,7 +14,7 @@ The power of curl, the ease of use of httpie.} %global godocs README.md Name: %{goname} -Release: 1%{?dist} +Release: 1%?dist Summary: The power of curl, the ease of use of httpie License: MIT diff --git a/anda/langs/go/gh-act/anda.hcl b/anda/langs/go/gh-act/anda.hcl new file mode 100644 index 0000000000..3f970c527c --- /dev/null +++ b/anda/langs/go/gh-act/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "gh-act.spec" + } +} diff --git a/anda/langs/go/gh-act/gh-act.spec b/anda/langs/go/gh-act/gh-act.spec new file mode 100644 index 0000000000..ed09826687 --- /dev/null +++ b/anda/langs/go/gh-act/gh-act.spec @@ -0,0 +1,72 @@ +# Generated by go2rpm 1.15.0 +%bcond check 1 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +# https://github.com/nektos/act +%global goipath github.com/nektos/act +Version: 0.2.80 + +%gometa -f + +%global common_description %{expand: +Run your GitHub Actions locally +} + +%global golicenses LICENSE pkg/lookpath/LICENSE +%global godocs README.md + +Name: gh-act +Release: 1%?dist +Summary: None + +License: MIT AND ISC AND BSD-3-Clause AND Apache-2.0 AND BSD-2-Clause +URL: %{gourl} +Source: %{gosource} +Packager: xiaoshihou +BuildRequires: anda-srpm-macros + +%description %{common_description} + +%gopkg + +%prep +%autosetup -p1 -n act-%{version} +%go_prep_online + +%if %{without bootstrap} +%build +%define gomodulesmode GO111MODULE=on +%define __gobuild_extldflags -X main.version=%version +%gobuild -o %{gobuilddir}/bin/gh-act %{goipath} +%endif + +%install +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE pkg/lookpath/LICENSE +%doc CONTRIBUTING.md IMAGES.md README.md +%{_bindir}/gh-act +%endif + +%changelog +%autochangelog diff --git a/anda/langs/go/gh-act/update.rhai b/anda/langs/go/gh-act/update.rhai new file mode 100644 index 0000000000..1338f20ec2 --- /dev/null +++ b/anda/langs/go/gh-act/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("nektos/act")); diff --git a/anda/langs/go/glow/golang-github-charmbracelet-glow.spec b/anda/langs/go/glow/golang-github-charmbracelet-glow.spec index 26213a4ed1..fc26d74694 100644 --- a/anda/langs/go/glow/golang-github-charmbracelet-glow.spec +++ b/anda/langs/go/glow/golang-github-charmbracelet-glow.spec @@ -3,7 +3,7 @@ # https://github.com/charmbracelet/glow %global goipath github.com/charmbracelet/glow -Version: 2.0.0 +Version: 2.1.1 %gometa -f diff --git a/anda/langs/go/google-grpc/anda.hcl b/anda/langs/go/google-grpc/anda.hcl new file mode 100644 index 0000000000..c697e9b806 --- /dev/null +++ b/anda/langs/go/google-grpc/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "golang-google-grpc.terra.spec" + } +} diff --git a/anda/langs/go/google-grpc/golang-google-grpc.terra.spec b/anda/langs/go/google-grpc/golang-google-grpc.terra.spec new file mode 100644 index 0000000000..afa28a0a9b --- /dev/null +++ b/anda/langs/go/google-grpc/golang-google-grpc.terra.spec @@ -0,0 +1,106 @@ +#? https://src.fedoraproject.org/rpms/golang-google-grpc/blob/rawhide/f/golang-google-grpc.spec + +# Generated by go2rpm 1.14.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +# https://github.com/grpc/grpc-go +%global goipath google.golang.org/grpc +%global forgeurl https://github.com/grpc/grpc-go +Version: 1.75.0 + +%gometa -L + +%global common_description %{expand: +The Go language implementation of gRPC. HTTP/2 based RPC.} + +%global golicenses LICENSE NOTICE.txt +%global godocs examples AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md\\\ + GOVERNANCE.md MAINTAINERS.md README.md SECURITY.md\\\ + Documentation + +Name: golang-google-grpc.terra +Release: 1%?dist +Summary: The Go language implementation of gRPC. HTTP/2 based RPC + +License: Apache-2.0 +URL: %{gourl} +Source: %{gosource} +Conflicts: golang-google-grpc + +%description %{common_description} + +%{lua: + local s = rpm.expand("%gopkg"):gsub("golang%-google%-grpc", "golang-google-grpc.terra") + print(s) +} + +%prep +%goprep -A +%autopatch -p1 + +# Remove dependency on stackdriver due to dependency issues +# golang-contrib-opencensus-exporter-stackdriver-devel +rm -rf gcp/observability interop/observability/ + +%dnl %if %{without bootstrap} +%dnl %generate_buildrequires +%dnl %go_generate_buildrequires +%dnl %endif + +%if %{without bootstrap} +%build +%define gomodulesmode GO111MODULE=on +for cmd in cmd/* ; do + pushd $cmd + %gobuild -o %{gobuilddir}/bin/$(basename $cmd) . + popd +done +%endif + +%install +%gopkginstall +%if %{without bootstrap} +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif + +%if %{without bootstrap} +%if %{with check} +%check + +for test in "InvalidMetadata" \ + "SvrWriteStatusEarlyWrite" \ + "AuthorizationEngineEvaluate" \ + "HealthWatchServiceStatusSetBeforeStartingServer" \ + "PolicyEngineEvaluate" \ + "IdentityEncoding" \ + "Fallback" \ + "HealthCheckOff" \ + "ControlChannelCredsFailure" \ +; do +awk -i inplace '/^func.*'"$test"'\(/ { print; print "\tt.Skip(\"disabled failing test\")"; next}1' $(grep -rl $test) +done +%gocheck -d google.golang.org/grpc/security/advancedtls +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE NOTICE.txt +%doc examples AUTHORS CODE-OF-CONDUCT.md CONTRIBUTING.md GOVERNANCE.md +%doc MAINTAINERS.md README.md SECURITY.md Documentation +%{_bindir}/protoc-gen-go-grpc +%endif + +%{lua: + local s = rpm.expand("%gopkgfiles"):gsub("golang%-google%-grpc", "golang-google-grpc.terra", 1) + print(s) +} + +%changelog +%autochangelog diff --git a/anda/langs/go/google-grpc/update.rhai b/anda/langs/go/google-grpc/update.rhai new file mode 100644 index 0000000000..bbc89947ff --- /dev/null +++ b/anda/langs/go/google-grpc/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("grpc/grpc-go")); diff --git a/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec index bd9db6e08b..7545bf2141 100644 --- a/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec +++ b/anda/langs/go/lazygit/golang-github-jesseduffield-lazygit.spec @@ -2,7 +2,7 @@ # https://github.com/jesseduffield/lazygit %global goipath github.com/jesseduffield/lazygit -Version: 0.46.0 +Version: 0.54.2 %gometa -f @@ -13,7 +13,7 @@ Simple terminal UI for git commands.} %global godocs docs README.md VISION.md Name: golang-github-jesseduffield-lazygit -Release: 1%{?dist} +Release: 1%?dist Summary: Simple terminal UI for git commands License: MIT diff --git a/anda/langs/go/u-root/golang-github-u-root.spec b/anda/langs/go/u-root/golang-github-u-root.spec index 44e5b9abcd..7a2e4333ad 100644 --- a/anda/langs/go/u-root/golang-github-u-root.spec +++ b/anda/langs/go/u-root/golang-github-u-root.spec @@ -1,33 +1,40 @@ -# Generated by go2rpm 1.9.0 -%bcond_without check -%define debug_package %nil +# Generated by go2rpm 1.16.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif # https://github.com/u-root/u-root %global goipath github.com/u-root/u-root -Version: 0.14.0 +Version: 0.15.0 +%global commit 5721ed3ad38a5c889e6c1ed5bbf5242f98a4b591 %gometa -f - %global common_description %{expand: A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go.} %global golicenses LICENSE -%global godocs docs examples AUTHORS SECURITY.md tricksandtips.md\\\ - CONTRIBUTING.md README.md roadmap.md\\\ - cmds/core/tail/test_samples/read_backwards.txt\\\ - cmds/core/tail/test_samples/read_from_beginning.txt\\\ - cmds/exp/esxiboot/README.md\\\ - configs/README.md\\\ - configs/amd64_config.txt configs/arm_config.txt\\\ - configs/generic_config.txt integration/README.md\\\ - pkg/boot/systembooter/README.md pkg/smbios/README.md\\\ - pkg/tarutil/test2.txt pkg/tarutil/test0/a.txt\\\ - pkg/tarutil/test0/dir/b.txt pkg/tarutil/test1/a1.txt\\\ - tools/golang_patched_dce/README.md +%global godocs docs examples AUTHORS CONTRIBUTING.md README.md\\\ + SECURITY.md roadmap.md tricksandtips.md\\\ + cmds/exp/esxiboot/README.md cmds/exp/tftpd/README.md\\\ + cmds/exp/uefiboot/README.md cmds/exp/vmboot/README.md\\\ + configs/README.md configs/amd64_config.txt\\\ + configs/arm_config.txt configs/generic_config.txt\\\ + integration/README.md pkg/boot/systembooter/README.md\\\ + pkg/netcat/doc.md pkg/netstat/doc.md\\\ + pkg/smbios/README.md pkg/tc/readme.md\\\ + tools/golang_patched_dce/README.md tools/tinygo-\\\ + buildstatus/README.md tools/tinygobb/README.md -Name: %{goname} +Name: golang-github-u-root Release: 1%?dist Summary: A fully Go userland with Linux bootloaders! u-root can create a one-binary root file system (initramfs) containing a busybox-like set of tools written in Go @@ -35,40 +42,42 @@ License: BSD-3-Clause URL: %{gourl} Source: %{gosource} -BuildRequires: anda-srpm-macros - %description %{common_description} %gopkg %prep -%goprep +%goprep -A %autopatch -p1 -go mod download - +%if %{without bootstrap} %build -go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -s -w -extldflags '--static-pie'" -buildmode=pie -tags 'osusergo,netgo,static_build' -v -x -o %{gobuilddir}/bin/u-root %{goipath} +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/u-root %{goipath} +%endif %install %gopkginstall +%if %{without bootstrap} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%endif -# if {with check} -# check -# gocheck -# endif +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif +%if %{without bootstrap} %files %license LICENSE -%doc docs examples AUTHORS SECURITY.md tricksandtips.md CONTRIBUTING.md -%doc README.md roadmap.md cmds/core/tail/test_samples/read_backwards.txt -%doc cmds/core/tail/test_samples/read_from_beginning.txt -%doc configs/README.md tools/golang_patched_dce/README.md +%doc docs examples AUTHORS CONTRIBUTING.md README.md SECURITY.md roadmap.md +%doc tricksandtips.md %doc configs/amd64_config.txt configs/arm_config.txt configs/generic_config.txt -%doc integration/README.md pkg/boot/systembooter/README.md pkg/smbios/README.md -%{_bindir}/* +%{_bindir}/u-root +%endif %gopkgfiles diff --git a/anda/langs/groovy/groovy-docs/groovy-docs.spec b/anda/langs/groovy/groovy-docs/groovy-docs.spec index 602f5b1fc6..8f609f3ef9 100644 --- a/anda/langs/groovy/groovy-docs/groovy-docs.spec +++ b/anda/langs/groovy/groovy-docs/groovy-docs.spec @@ -1,5 +1,5 @@ Name: groovy-docs -Version: 4.0.25 +Version: 4.0.28 Release: 1%?dist Summary: Documentation for the Groovy programming language URL: https://groovy-lang.org/ diff --git a/anda/langs/groovy/groovy.spec b/anda/langs/groovy/groovy.spec index 06d0b3da0f..017dd64556 100644 --- a/anda/langs/groovy/groovy.spec +++ b/anda/langs/groovy/groovy.spec @@ -1,5 +1,5 @@ Name: groovy -Version: 4.0.25 +Version: 4.0.28 Release: 1%?dist Summary: A multi-faceted language for the Java platform BuildArch: noarch diff --git a/anda/langs/kotlin/kotlin-native/kotlin-native.spec b/anda/langs/kotlin/kotlin-native/kotlin-native.spec index 699527370a..ed1193dc7c 100644 --- a/anda/langs/kotlin/kotlin-native/kotlin-native.spec +++ b/anda/langs/kotlin/kotlin-native/kotlin-native.spec @@ -2,7 +2,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build Name: kotlin-native -Version: 2.1.10 +Version: 2.2.10 Release: 1%?dist Summary: LLVM backend for the Kotlin compiler ExclusiveArch: x86_64 diff --git a/anda/langs/kotlin/kotlin/kotlin.spec b/anda/langs/kotlin/kotlin/kotlin.spec index d5671714d1..704a440611 100644 --- a/anda/langs/kotlin/kotlin/kotlin.spec +++ b/anda/langs/kotlin/kotlin/kotlin.spec @@ -1,7 +1,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Name: kotlin -Version: 2.1.10 +Version: 2.2.10 Release: 1%?dist Summary: Statically typed programming language diff --git a/anda/langs/nim/choosenim/choosenim.spec b/anda/langs/nim/choosenim/choosenim.spec index b5316aae49..0f9840ac43 100644 --- a/anda/langs/nim/choosenim/choosenim.spec +++ b/anda/langs/nim/choosenim/choosenim.spec @@ -1,13 +1,10 @@ - Name: choosenim -Version: 0.8.12 +Version: 0.8.16 Release: 1%?dist Summary: Easily install and manage multiple versions of the Nim programming language License: BSD-3-Clause URL: https://github.com/nim-lang/choosenim Source0: %url/archive/refs/tags/v%version.tar.gz -# Fix for https://github.com/nim-lang/choosenim/issues/13 -Patch0: https://patch-diff.githubusercontent.com/raw/nim-lang/choosenim/pull/38.patch Packager: madonuko BuildRequires: nim BuildRequires: git-core anda-srpm-macros diff --git a/anda/langs/nim/grabnim/anda.hcl b/anda/langs/nim/grabnim/anda.hcl new file mode 100644 index 0000000000..c1d3337617 --- /dev/null +++ b/anda/langs/nim/grabnim/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "grabnim.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/langs/nim/grabnim/grabnim.spec b/anda/langs/nim/grabnim/grabnim.spec new file mode 100644 index 0000000000..8c147c8d51 --- /dev/null +++ b/anda/langs/nim/grabnim/grabnim.spec @@ -0,0 +1,30 @@ +%global commit b610436355c1440dcdb54fb486431359ee7e2a40 +%global commit_date 20250817 +%global shortcommit %{sub %commit 1 7} + +Name: grabnim +Version: 0~%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Simple tool to install and manage multiple nim compiler versions +License: MIT +URL: https://codeberg.org/janAkali/grabnim +Source0: %url/archive/%commit.tar.gz +Packager: madonuko +BuildRequires: nim + +%description +GrabNim is a simple tool to install, manage and switch between different versions of the Nim compiler. + +%prep +%autosetup -n %name + +%build +%nim_c %name + +%install +install -Dm755 %name -t %buildroot%_bindir + +%files +%doc README.md +%license LICENSE +%_bindir/%name diff --git a/anda/langs/nim/grabnim/update.rhai b/anda/langs/nim/grabnim/update.rhai new file mode 100644 index 0000000000..75f215ef43 --- /dev/null +++ b/anda/langs/nim/grabnim/update.rhai @@ -0,0 +1,6 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.global("commit", bump::codeberg_commit("janAkali/grabnim")); +if rpm.changed() { + rpm.global("commit_date", date()); +} diff --git a/anda/langs/nim/netto/anda.hcl b/anda/langs/nim/netto/anda.hcl new file mode 100644 index 0000000000..19833fbde7 --- /dev/null +++ b/anda/langs/nim/netto/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "netto.spec" + } +} diff --git a/anda/langs/nim/netto/netto.spec b/anda/langs/nim/netto/netto.spec new file mode 100644 index 0000000000..4f16887c14 --- /dev/null +++ b/anda/langs/nim/netto/netto.spec @@ -0,0 +1,34 @@ +Name: netto +Version: 0.1.1 +Release: 2%?dist +Summary: 📡 GUI Network Applet +License: GPL-3.0-or-later +URL: https://github.com/madonuko/netto +Source0: %url/archive/refs/tags/v%version.tar.gz +BuildRequires: anda-srpm-macros nim +BuildRequires: pkgconfig(libhelium-1) +BuildRequires: pkgconfig(libnm) + +%description +ネット (codename 🫘 納豆) is the new solution for setting up a new network. +Written proudly in libhelium and Nim, using libnm. + +%prep +%autosetup -Sgit + +%build +atlas init +atlas rep atlas.lock +%nim_c src/netto + +%install +install -Dpm755 src/netto -t %buildroot%_bindir +install -Dpm644 assets/netto.desktop -t %buildroot%_datadir/applications/ +install -Dpm644 assets/netto.svg -t %buildroot%_iconsdir/hicolor/scalable/apps/ + +%files +%doc README.md +%license LICENSE.md +%_bindir/netto +%_datadir/applications/netto.desktop +%_iconsdir/hicolor/scalable/apps/netto.svg diff --git a/anda/langs/nim/netto/update.rhai b/anda/langs/nim/netto/update.rhai new file mode 100644 index 0000000000..baa2d71031 --- /dev/null +++ b/anda/langs/nim/netto/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("madonuko/netto")); diff --git a/anda/langs/nim/nim-nightly/nim-nightly.spec b/anda/langs/nim/nim-nightly/nim-nightly.spec index 7878379fef..dab02258e2 100644 --- a/anda/langs/nim/nim-nightly/nim-nightly.spec +++ b/anda/langs/nim/nim-nightly/nim-nightly.spec @@ -1,8 +1,8 @@ %global csrc_commit 561b417c65791cd8356b5f73620914ceff845d10 -%global commit 1af88a2d20add67e3c376f0bc7144f9a0a843183 +%global commit b527db9ddd33fd16a8afd8467344fec81a54c84d %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global ver 2.3.1 -%global commit_date 20250220 +%global commit_date 20250822 %global debug_package %nil Name: nim-nightly @@ -14,14 +14,14 @@ URL: https://nim-lang.org Source0: https://github.com/nim-lang/Nim/archive/%commit.tar.gz Source1: nim.1 Source2: nimgrep.1 -Source3: nimble.1 Source4: nimsuggest.1 BuildRequires: gcc mold git gcc-c++ nodejs openssl-devel pkgconfig(bash-completion) gc-devel pcre pcre-devel Requires: redhat-rpm-config gcc Conflicts: choosenim # somehow wrong name and never noticed -Provides: nim-nightly = %version-%release Obsoletes: nim-nighlty < 2.1.1^20240404.9e1b170-2 +Conflicts: nim +Recommends: nim-nightly-tools nimble %description @@ -34,6 +34,7 @@ order of priority). Summary: Tools for Nim programming language Provides: nim-nightly-tools = %version-%release Obsoletes: nim-nighlty-tools < 2.1.1^20240404.9e1b170-2 +Conflicts: nim-tools %description tools Nim is a compiled, garbage-collected systems programming language with a @@ -103,8 +104,7 @@ sh ./install.sh %buildroot/usr/bin mkdir -p %buildroot/%_bindir %buildroot/%_datadir/bash-completion/completions %buildroot/usr/lib/nim %buildroot%_datadir install -Dpm755 bin/nim{grep,suggest,pretty} %buildroot/%_bindir install -Dpm644 tools/nim.bash-completion %buildroot/%_datadir/bash-completion/completions/nim -install -Dpm644 dist/nimble/nimble.bash-completion %buildroot/%_datadir/bash-completion/completions/nimble -install -Dpm644 -t%buildroot/%_mandir/man1 %SOURCE1 %SOURCE2 %SOURCE3 %SOURCE4 +install -Dpm644 -t%buildroot/%_mandir/man1 %SOURCE1 %SOURCE2 %SOURCE4 mv %buildroot%_bindir/nim %buildroot%_datadir/ ln -s %_datadir/nim/bin/nim %buildroot%_bindir/nim @@ -132,9 +132,9 @@ cp -r %buildroot%_prefix/lib/nim/dist %buildroot%_datadir/nim/ %files %license copying.txt dist/nimble/license.txt %doc doc/readme.txt -%_bindir/nim{,ble} -%_mandir/man1/nim{,ble}.1* -%_datadir/bash-completion/completions/nim{,ble} +%_bindir/nim +%_mandir/man1/nim.1.* +%_datadir/bash-completion/completions/nim %_datadir/nim/ %_prefix/lib/nim/ %_sysconfdir/nim/ diff --git a/anda/langs/nim/nim/nim.spec b/anda/langs/nim/nim/nim.spec index 1c430e99da..4ab05fb44f 100644 --- a/anda/langs/nim/nim/nim.spec +++ b/anda/langs/nim/nim/nim.spec @@ -2,8 +2,8 @@ %global debug_package %{nil} Name: nim -Version: 2.2.2 -Release: 1%?dist +Version: 2.2.4 +Release: 3%?dist Summary: Imperative, multi-paradigm, compiled programming language License: MIT and BSD URL: https://nim-lang.org @@ -14,6 +14,8 @@ Source4: nimsuggest.1 BuildRequires: gcc mold git-core gcc-c++ nodejs openssl-devel pkgconfig(bash-completion) gc-devel pcre-devel BuildRequires: redhat-rpm-config anda-srpm-macros Requires: gcc +Recommends: nim-tools +Conflicts: nimble %description @@ -22,6 +24,8 @@ design that focuses on efficiency, expressiveness, and elegance (in that order of priority). +%pkg_completion -B nim nimble + %package tools Summary: Tools for Nim programming language %description tools @@ -71,10 +75,6 @@ koch tools -t:-fPIE -l:-pie & nim c -d:danger -t:-fPIE -l:-pie nimsuggest/nimsuggest.nim & wait -%ifarch x86_64 -sed -i '/ + +%description +This package contains a Jupyter kernel for bash. + +%package -n python3-%{real_name} +Summary: %{summary} +Requires: bash +Requires: python-jupyter-filesystem + +%description -n python3-%{real_name} +This package contains a Jupyter kernel for bash. + +%prep +%autosetup -n %{pypi_name}-%{version} -p1 + +# Work around an install error +sed -i 's/from \.resources/from %{pypi_name}.resources/' %{pypi_name}/install.py + +%build +%pyproject_wheel +rst2html --no-datestamp README.rst README.html + +%install +%pyproject_install +%pyproject_save_files %{pypi_name} +export PYTHONPATH=$PWD +cd %{pypi_name} +%{python3} install.py --prefix %{buildroot}%{_prefix} +cd - + +%check +%pyproject_check_import + +%files -n python3-%{real_name} -f %{pyproject_files} +%doc README.html +%license LICENSE +%{_datadir}/jupyter/kernels/bash/ + +%changelog +* Mon May 26 2025 Gilver E. - 0.10.0-1 +- Initial port from Fedora diff --git a/anda/langs/python/bash-kernel/update.rhai b/anda/langs/python/bash-kernel/update.rhai new file mode 100644 index 0000000000..6d98ddf008 --- /dev/null +++ b/anda/langs/python/bash-kernel/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("bash_kernel")); diff --git a/anda/langs/python/colorthief/anda.hcl b/anda/langs/python/colorthief/anda.hcl new file mode 100644 index 0000000000..13650eb2df --- /dev/null +++ b/anda/langs/python/colorthief/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-colorthief.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/langs/python/colorthief/python-colorthief.spec b/anda/langs/python/colorthief/python-colorthief.spec new file mode 100644 index 0000000000..52b1138ad0 --- /dev/null +++ b/anda/langs/python/colorthief/python-colorthief.spec @@ -0,0 +1,77 @@ +## Spec originally from Fedora, only modified for multibranch support and Terra changes + +## ...I don't know why they have this here? +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} + +%global pypi_name colorthief + +Name: python-%{pypi_name} +Version: 0.2.1 +Release: 1%{?dist} +Summary: Grabs the dominant color or a representative color palette from an image + +# https://gitlab.com/fedora/legal/fedora-license-data/-/issues/382 +# License file provided by Python module, see: +# rpm -q --licensefiles {python3_sitelib}/{name}-{version}.dist-info/LICENSE +License: BSD-3-Clause +URL: https://github.com/fengsp/color-thief-py +Source0: %{pypi_source} +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(pillow) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +BuildArch: noarch +Packager: Gilver E. + +%global _description %{expand: +A Python module for grabbing the color palette from an image.} + +%description %_description + +%package -n python3-%{pypi_name} +Summary: %{summary} + +%description -n python3-%{pypi_name} %_description + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%pyproject_save_files %{pypi_name} +%endif + +%if 0%{?fedora} > 41 +%check +%pyproject_check_import +%endif + +%if 0%{?fedora} <= 41 || 0%{?rhel} +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.rst +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}.py +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%files -n python3-%{pypi_name} -f %{pyproject_files} +%license LICENSE +%doc README.rst +%endif + + +%changelog +* Mon May 26 2025 Gilver E. - 0.2.1-1 +- Initial port from Fedora diff --git a/anda/langs/python/colorthief/update.rhai b/anda/langs/python/colorthief/update.rhai new file mode 100644 index 0000000000..e0b7496e5a --- /dev/null +++ b/anda/langs/python/colorthief/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("colorthief")); diff --git a/anda/langs/python/colorz/anda.hcl b/anda/langs/python/colorz/anda.hcl new file mode 100644 index 0000000000..5bc35d8d14 --- /dev/null +++ b/anda/langs/python/colorz/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-colorz.spec" + } +} diff --git a/anda/langs/python/colorz/python-colorz.spec b/anda/langs/python/colorz/python-colorz.spec new file mode 100644 index 0000000000..5dd228c483 --- /dev/null +++ b/anda/langs/python/colorz/python-colorz.spec @@ -0,0 +1,64 @@ +%global pypi_name colorz + +Name: python-%{pypi_name} +Version: 1.0.3 +Release: 1%{?dist} +Summary: Color scheme generator +License: MIT +URL: https://github.com/metakirby5/colorz +Source0: %{pypi_source} +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +BuildArch: noarch +Packager: Gilver E. + +%description +A k-means color scheme generator. + +%package -n python3-%{pypi_name} +Summary: %{summary} +Requires: python3dist(pillow) +Requires: python3dist(scipy) +Requires: python3dist(setuptools) +%{?python_provide:%python_provide python3-%{pypi_name}} + + +%description -n python3-%{pypi_name} +A k-means color scheme generator. + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +%files -n python3-%{pypi_name} +%doc PKG-INFO +%doc README.rst +%{_bindir}/colorz +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}.py +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif + +%changelog +* Thu May 22 2025 Gilver - 1.0.3-1 +- Initial package. diff --git a/anda/langs/python/colorz/update.rhai b/anda/langs/python/colorz/update.rhai new file mode 100644 index 0000000000..579b53e3f0 --- /dev/null +++ b/anda/langs/python/colorz/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("colorz")); diff --git a/anda/langs/python/fast-colorthief/anda.hcl b/anda/langs/python/fast-colorthief/anda.hcl new file mode 100644 index 0000000000..bb6b85eca0 --- /dev/null +++ b/anda/langs/python/fast-colorthief/anda.hcl @@ -0,0 +1,5 @@ +project "pkg" { + rpm { + spec = "python-fast-colorthief.spec" + } +} diff --git a/anda/langs/python/fast-colorthief/python-fast-colorthief.spec b/anda/langs/python/fast-colorthief/python-fast-colorthief.spec new file mode 100644 index 0000000000..69529d2df6 --- /dev/null +++ b/anda/langs/python/fast-colorthief/python-fast-colorthief.spec @@ -0,0 +1,118 @@ +%global pypi_name fast-colorthief +%global debug_package %{nil} +%bcond docs 1 +# Fedora packages pybind11 but not the test module kill me +%bcond test 0 + +Name: python-%{pypi_name} +Version: 0.0.5 +Release: 1%{?dist} +Summary: Faster version of Colorthief +License: MIT +URL: https://github.com/bedapisl/fast-colorthief +Source0: %{pypi_source} +BuildRequires: cmake +BuildRequires: doxygen +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pybind11-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +# This package is not buildable on EL due to this dep. There's unfortunately not much I can do about this. +BuildRequires: python3-sphinxcontrib-rsvgconverter +BuildRequires: python3dist(breathe) +%if %{with test} +BuildRequires: python3dist(colorthief) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(pybind11-tests) +%endif +BuildRequires: python3dist(furo) +BuildRequires: python3dist(numpy) +BuildRequires: python3dist(pillow) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pybind11) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(sphinx) +BuildRequires: python3dist(sphinxcontrib-moderncmakedomain) +BuildRequires: python3dist(sphinx-copybutton) +Packager: Gilver E. + +%description +A Python module for selecting most dominant colors in the image. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +Requires: python3dist(numpy) +Requires: python3dist(pillow) + +%description -n python3-%{pypi_name} +A Python module for selecting most dominant colors in the image. + +A faster version of the original Colorthief. + +%if %{with docs} +%package -n python3-%{pypi_name}-doc +Summary: Docs for %{pypi_name} +BuildArch: noarch + +%description -n python3-%{pypi_name}-doc +Documentation files for %{pypi_name} +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +## This is not a fully Python project and is mostly C++ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%if %{with docs} +# Generate docs +# Only works in English currently. Sad. +PYTHONPATH=${PWD} sphinx-build pybind11/docs html -D language=en +# Remove the sphinx-build leftovers +rm -rf html/.{doctrees,buildinfo} +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +%if %{with test} +%check +%pytest +%endif + +%files -n python3-%{pypi_name} +%license pybind11/LICENSE +%doc PKG-INFO +%doc README.md +%{python3_sitearch}/__pycache__/* +%{python3_sitearch}/fast_colorthief.py +%{python3_sitearch}/version.py +%{python3_sitearch}/fast_colorthief_backend.cpython-*-%{_arch}-linux-gnu.so +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/fast_colorthief-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/fast_colorthief-%{version}.dist-info/ +%endif + +%if %{with docs} +%files -n python3-%{pypi_name}-doc +%doc html/* +%endif + +%changelog +* Sun May 11 2025 Gilver E. - 0.0.5-1 +- Initial package. diff --git a/anda/langs/python/fast-colorthief/update.rhai b/anda/langs/python/fast-colorthief/update.rhai new file mode 100644 index 0000000000..406e9de7fb --- /dev/null +++ b/anda/langs/python/fast-colorthief/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("fast-colorthief")); diff --git a/anda/langs/python/haishoku/anda.hcl b/anda/langs/python/haishoku/anda.hcl new file mode 100644 index 0000000000..0ddc866ba8 --- /dev/null +++ b/anda/langs/python/haishoku/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-haishoku.spec" + } +} diff --git a/anda/langs/python/haishoku/python-haishoku.spec b/anda/langs/python/haishoku/python-haishoku.spec new file mode 100644 index 0000000000..d7187805f3 --- /dev/null +++ b/anda/langs/python/haishoku/python-haishoku.spec @@ -0,0 +1,62 @@ +%global pypi_name haishoku +%global _description1 %{expand: +Haishoku is a development tool for grabbing the dominant color or representative color palette from an image, it depends on Python3 and Pillow.} +%global _description2 %{expand: +Haishoku is a development tool for grabbing the dominant color or representative color palette from an image.} + +Name: python-%{pypi_name} +Version: 1.1.8 +Release: 1%{?dist} +Summary: A development tool for grabbing the dominant color or representative color palette from an image +License: MIT +URL: https://github.com/LanceGin/haishoku +Source0: %{pypi_source} +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +BuildArch: noarch +Packager: Gilver E. + +%description %_description1 + +%package -n python3-%{pypi_name} +Summary: %{summary} +Requires: python3dist(pillow) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description2 + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +%files -n python3-%{pypi_name} +# This project does have README files but they are not included in the PyPi source +%doc PKG-INFO +%license LICENSE +%{python3_sitelib}/%{pypi_name}/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif + +%changelog +* Thu May 22 2025 Gilver E. - 1.1.8-1 +- Initial package. diff --git a/anda/langs/python/haishoku/update.rhai b/anda/langs/python/haishoku/update.rhai new file mode 100644 index 0000000000..70d621479c --- /dev/null +++ b/anda/langs/python/haishoku/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("haishoku")); diff --git a/anda/langs/python/ignis/anda.hcl b/anda/langs/python/ignis/anda.hcl new file mode 100644 index 0000000000..185d3fbfba --- /dev/null +++ b/anda/langs/python/ignis/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "python-ignis.spec" + } +} diff --git a/anda/langs/python/ignis/python-ignis.spec b/anda/langs/python/ignis/python-ignis.spec new file mode 100644 index 0000000000..b5074acdc0 --- /dev/null +++ b/anda/langs/python/ignis/python-ignis.spec @@ -0,0 +1,59 @@ +Name: python-ignis +Version: 0.5.1 +Release: 2%?dist +Summary: A widget framework for building desktop shells, written and configurable in Python + +License: LGPL-2.1-or-later +URL: https://ignis-sh.github.io/ignis +Source: https://github.com/linkfrg/ignis/archive/v%{version}/ignis-%{version}.tar.gz +Packager: madonuko + +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: gcc git-core +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gobject-introspection-1.0) +BuildRequires: pkgconfig(gio-2.0) +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(gtk4-layer-shell-0) +BuildRequires: pkgconfig(libpulse) +BuildRequires: python3dist(meson-python) +BuildRequires: python3dist(pip) + +%global _description %{expand: +%summary.} + +%description %_description + +%package -n python3-ignis +Summary: %{summary} + +%description -n python3-ignis %_description + + +%prep +%autosetup -p1 -n ignis-%{version} + + +%generate_buildrequires +%pyproject_buildrequires -R + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files 'ignis*' + + +%files -n python3-ignis -f %{pyproject_files} +%doc README.* +%license LICENSE +%{_bindir}/ignis + + +%changelog +* Sun May 05 2024 madonuko - 0.5-1 +- Initial package. diff --git a/anda/langs/python/ignis/update.rhai b/anda/langs/python/ignis/update.rhai new file mode 100644 index 0000000000..085895bca4 --- /dev/null +++ b/anda/langs/python/ignis/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("linkfrg/ignis")); diff --git a/anda/langs/python/jupyter-sphinx/anda.hcl b/anda/langs/python/jupyter-sphinx/anda.hcl new file mode 100644 index 0000000000..eeafa241cf --- /dev/null +++ b/anda/langs/python/jupyter-sphinx/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-jupyter-sphinx.spec" + } + labels { + subrepo = "extras" + } +} diff --git a/anda/langs/python/jupyter-sphinx/python-jupyter-sphinx.spec b/anda/langs/python/jupyter-sphinx/python-jupyter-sphinx.spec new file mode 100644 index 0000000000..8f95d36062 --- /dev/null +++ b/anda/langs/python/jupyter-sphinx/python-jupyter-sphinx.spec @@ -0,0 +1,103 @@ +## Taken from Fedora, but updated because this project isn't actually abandoned + +%global giturl https://github.com/jupyter/jupyter-sphinx + +# Tests fail in Anda due to an expected /tmp file not existing there? +%bcond test 0 + +Name: python-jupyter-sphinx +Version: 0.5.3 +Release: 1%{?dist} +Summary: Jupyter Sphinx extensions +License: BSD-3-Clause +URL: https://jupyter-sphinx.readthedocs.io/ +VCS: git:%{giturl}.git +Source0: %{giturl}/archive/v%{version}/jupyter-sphinx-%{version}.tar.gz +BuildRequires: make +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(bash-kernel) +BuildRequires: python3dist(hatchling) +BuildRequires: python3dist(ipykernel) +BuildRequires: python3dist(ipywidgets) +BuildRequires: python3dist(ipython) +BuildRequires: python3dist(matplotlib) +BuildRequires: python3dist(nbconvert) +BuildRequires: python3dist(nbformat) +BuildRequires: python3dist(numpy) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(sphinx) +# See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval +ExcludeArch: %{ix86} +BuildArch: noarch +Packager: Gilver E. + +%global _desc %{expand: +Jupyter-Sphinx enables running code embedded in Sphinx documentation and +embedding output of that code into the resulting document. It has +support for rich output such as images and even Jupyter interactive +widgets.} + +%description %_desc + +%package -n python3-jupyter-sphinx +Summary: %{summary} + +%description -n python3-jupyter-sphinx %_desc + +%package doc +# The content is BSD-3-Clause. Other licenses are due to files copied in by +# Sphinx. +# _static/_sphinx_javascript_frameworks_compat.js: BSD-2-Clause +# _static/alabaster.css: BSD-3-Clause +# _static/basic.css: BSD-2-Clause +# _static/custom.css: BSD-3-Clause +# _static/doctools.js: BSD-2-Clause +# _static/documentation_options.js: BSD-2-Clause +# _static/file.png: BSD-2-Clause +# _static/jquery*.js: MIT +# _static/js: MIT +# _static/language_data.js: BSD-2-Clause +# _static/minus.png: BSD-2-Clause +# _static/plus.png: BSD-2-Clause +# _static/searchtools.js: BSD-2-Clause +# _static/underscore*.js: MIT +# genindex.html: BSD-2-Clause +# search.html: BSD-2-Clause +# searchindex.js: BSD-2-Clause +License: BSD-3-Clause AND BSD-2-Clause AND MIT +Summary: Documentation for %{name} + +%description doc +Documentation for %{name}. + +%prep +%autosetup -n jupyter-sphinx-%{version} -p1 + +%build +%pyproject_wheel + +# Build the documentation +PYTHONPATH=$PWD make -C doc html +rm doc/build/html/.buildinfo + +%install +%pyproject_install +%pyproject_save_files jupyter_sphinx + +%if %{with test} +%check +export JUPYTER_PLATFORM_DIRS=1 +%pytest +%endif + +%files -n python3-jupyter-sphinx -f %{pyproject_files} +%doc README.md + +%files doc +%doc doc/build/html + +%changelog +* Mon May 26 2025 Gilver E. - 0.5.3-1 +- Initial port from Fedora diff --git a/anda/langs/python/jupyter-sphinx/update.rhai b/anda/langs/python/jupyter-sphinx/update.rhai new file mode 100644 index 0000000000..2c1c56139a --- /dev/null +++ b/anda/langs/python/jupyter-sphinx/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("jupyter-sphinx")); diff --git a/anda/langs/python/materialyoucolor/anda.hcl b/anda/langs/python/materialyoucolor/anda.hcl new file mode 100644 index 0000000000..3e4457e184 --- /dev/null +++ b/anda/langs/python/materialyoucolor/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "python-materialyoucolor.spec" + } +} diff --git a/anda/langs/python/materialyoucolor/python-materialyoucolor.spec b/anda/langs/python/materialyoucolor/python-materialyoucolor.spec new file mode 100644 index 0000000000..cccdaeafe5 --- /dev/null +++ b/anda/langs/python/materialyoucolor/python-materialyoucolor.spec @@ -0,0 +1,70 @@ +%global pypi_name materialyoucolor +%bcond test 0 + +Name: python-%{pypi_name} +Version: 2.0.10 +Release: 1%{?dist} +Summary: Material You color generation algorithms in pure python! +License: MIT +URL: https://github.com/T-Dynamos/materialyoucolor-python +Source0: %{pypi_source} +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(pillow) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(rich) +BuildRequires: python3dist(setuptools) +Packager: Gilver E. + +%description +Material You color generation algorithms in Python. + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Material You color generation algorithms in Python. + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +# Test image isn't included and I'm not supplying one +%if %{with test} +%check +%pytest test_image.jpg 1 +%endif + +%files -n python3-%{pypi_name} +%license LICENSE +%doc README.md +%{python3_sitearch}/%{pypi_name}/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ +%endif + + +%changelog +* Wed May 28 2025 Gilver E. - 2.0.10-1 +- Initial package. diff --git a/anda/langs/python/materialyoucolor/update.rhai b/anda/langs/python/materialyoucolor/update.rhai new file mode 100644 index 0000000000..b258c2de3d --- /dev/null +++ b/anda/langs/python/materialyoucolor/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("materialyoucolor")); diff --git a/anda/langs/python/mpv/python-mpv.spec b/anda/langs/python/mpv/python-mpv.spec index 9e42548f52..f65f454d3a 100644 --- a/anda/langs/python/mpv/python-mpv.spec +++ b/anda/langs/python/mpv/python-mpv.spec @@ -1,7 +1,7 @@ %define debug_package %nil Name: python3-mpv -Version: 1.0.7 +Version: 1.0.8 Release: 1%?dist Summary: Python interface to the awesome mpv media player License: GPL-2.0+ OR LGPL-2.1+ diff --git a/anda/langs/python/pillow-heif/python3-pillow-heif.spec b/anda/langs/python/pillow-heif/python3-pillow-heif.spec index 803ee65023..4e017729ed 100644 --- a/anda/langs/python/pillow-heif/python3-pillow-heif.spec +++ b/anda/langs/python/pillow-heif/python3-pillow-heif.spec @@ -6,7 +6,7 @@ %bcond_with doc Name: python-%{srcname} -Version: 0.21.0 +Version: 1.1.0 Release: 1%?dist Summary: Python library for working with HEIF images and plugin for Pillow @@ -22,6 +22,7 @@ BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-pillow-devel BuildRequires: libheif-devel +BuildRequires: python%{python3_pkgversion}dist(pip) %if %{with doc} BuildRequires: make BuildRequires: python%{python3_pkgversion}-sphinx @@ -72,7 +73,11 @@ Documentation for %{srcname}. %build # Native build +%if 0%{?fedora} <= 41 || 0%{?rhel} %py3_build +%else +%pyproject_wheel +%endif # Doc build %if %{with doc} @@ -83,7 +88,11 @@ rm -f docs/_build_py3/html/.buildinfo %install # Native build +%if 0%{?fedora} <= 41 || 0%{?rhel} %py3_install +%else +%pyproject_install +%endif %check # Check Python 3 modules @@ -97,7 +106,11 @@ popd %doc README.md CHANGELOG.md %license LICENSE.txt %{python3_sitearch}/pillow_heif/ +%if 0%{?fedora} <= 41 || 0%{?rhel} %{python3_sitearch}/pillow_heif-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/pillow_heif-%{version}.dist-info/ +%endif %{python3_sitearch}/_pillow_heif.*.so %files -n python%{python3_pkgversion}-%{srcname}-devel diff --git a/anda/langs/python/pip-system-certs/python-pip-system-certs.spec b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec index 6dfc694f2c..c301b56d5d 100644 --- a/anda/langs/python/pip-system-certs/python-pip-system-certs.spec +++ b/anda/langs/python/pip-system-certs/python-pip-system-certs.spec @@ -1,6 +1,6 @@ # Created by pyp2rpm-3.3.10 %global pypi_name pip-system-certs -%global pypi_version 4.0 +%global pypi_version 5.2 Name: python-%{pypi_name} Version: %{pypi_version} diff --git a/anda/langs/python/protobuf/python3-protobuf.spec b/anda/langs/python/protobuf/python3-protobuf.spec index 614edc8e52..8ab35d3a6f 100644 --- a/anda/langs/python/protobuf/python3-protobuf.spec +++ b/anda/langs/python/protobuf/python3-protobuf.spec @@ -2,7 +2,7 @@ %global pypi_name protobuf Name: python-%{pypi_name} -Version: 5.29.3 +Version: 6.32.0 Release: 1%?dist Summary: Protocol Buffers @@ -11,6 +11,7 @@ URL: https://developers.google.com/protocol-buffers/ Source0: %{pypi_source} BuildRequires: python3-devel gcc +BuildRequires: python3dist(pip) BuildRequires: python3dist(setuptools) %description @@ -30,16 +31,27 @@ Protocol Buffers are Google's data interchange format rm -rf %{pypi_name}.egg-info %build +%if 0%{?fedora} <= 41 || 0%{?rhel} %py3_build +%else +%pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 || 0%{?rhel} %py3_install +%else +%pyproject_install +%endif %files -n python3-%{pypi_name} %doc README.md -%{python3_sitearch}/google -%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info -%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}-nspkg.pth +%{python3_sitearch}/google/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitearch}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ +%endif %changelog * Sun Feb 19 2023 windowsboy111 - 4.22.0-1 diff --git a/anda/langs/python/pywal16/anda.hcl b/anda/langs/python/pywal16/anda.hcl new file mode 100644 index 0000000000..f98544e892 --- /dev/null +++ b/anda/langs/python/pywal16/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-pywal16.spec" + } +} diff --git a/anda/langs/python/pywal16/python-pywal16.spec b/anda/langs/python/pywal16/python-pywal16.spec new file mode 100644 index 0000000000..1393fb3ef7 --- /dev/null +++ b/anda/langs/python/pywal16/python-pywal16.spec @@ -0,0 +1,83 @@ +%global pypi_name pywal16 +%global _description %{expand: +Pywal is a tool that generates a color palette from the dominant colors in an image. It then applies the colors system-wide and on-the-fly in all of your favourite programs.} + +Name: python-%{pypi_name} +Version: 3.8.9 +Release: 1%?dist +Summary: 16 color fork of the original Pywal +License: MIT +URL: https://github.com/eylles/pywal16 +Source0: %{pypi_source} +BuildRequires: ImageMagick +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(colorama) +BuildRequires: python3dist(colorthief) +BuildRequires: python3dist(colorz) +BuildRequires: python3dist(fast-colorthief) +BuildRequires: python3dist(haishoku) +BuildRequires: python3dist(modern-colorthief) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(setuptools) +Obsoletes: python3-pywal < 3.5.0-1 +BuildArch: noarch +Packager: Gilver E. + +%description +This project is a 16 colors fork of Pywal. + +%package -n python3-%{pypi_name} +Summary: %{summary} +Requires: ImageMagick +Requires: python3dist(colorz) +Requires: python3dist(haishoku) +Requires: (python3dist(modern-colorthief) or python3dist(fast-colorthief) or python3dist(colorthief)) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} %_description + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +%build +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_build +%else +%pyproject_wheel +%endif + +%install +%if 0%{?fedora} <= 41 || 0%{?rhel} +%py3_install +%else +%pyproject_install +%endif + +install -Dm644 data/man/man1/wal.1 -t %{buildroot}%{_mandir}/man1 + +# For some reason this is where the project tries to install the manpage? +rm -rf %{buildroot}%{_prefix}/man + +%check +%pytest + +%files -n python3-%{pypi_name} +%doc PKG-INFO +%doc README.md +%license LICENSE.md +%{_bindir}/wal +%{_mandir}/man1/wal.1.* +%{python3_sitelib}/pywal/ +%if 0%{?fedora} <= 41 || 0%{?rhel} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif + +%changelog +* Wed May 28 2025 Gilver E. - 3.8.6-1 +- Initial package. diff --git a/anda/langs/python/pywal16/update.rhai b/anda/langs/python/pywal16/update.rhai new file mode 100644 index 0000000000..6c50d87f70 --- /dev/null +++ b/anda/langs/python/pywal16/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("pywal16")); diff --git a/anda/langs/python/sphinxcontrib-moderncmakedomain/anda.hcl b/anda/langs/python/sphinxcontrib-moderncmakedomain/anda.hcl new file mode 100644 index 0000000000..eb41c81af2 --- /dev/null +++ b/anda/langs/python/sphinxcontrib-moderncmakedomain/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "python-sphinxcontrib-moderncmakedomain.spec" + } +} diff --git a/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec b/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec new file mode 100644 index 0000000000..4df803be99 --- /dev/null +++ b/anda/langs/python/sphinxcontrib-moderncmakedomain/python-sphinxcontrib-moderncmakedomain.spec @@ -0,0 +1,69 @@ +# NOT made with pyp2rpm because it had no freaking clue what to do with this project +# Looking at the sources the real name should be sphinxcontrib-moderncmakedomain but it builds as sphinxcontrib_moderncmakedomain???? +%global pypi_name sphinxcontrib_moderncmakedomain +%global real_name sphinxcontrib-moderncmakedomain + +# Tests fail on EL even with Pytest due to the package versions +%if 0%{?rhel} +%bcond test 0 +%else +%bcond test 1 +%endif + +Name: python-%{real_name} +Version: 3.29.0 +Release: 2%{?dist} +Summary: Sphinx domain for modern CMake +License: BSD-3-Clause +URL: https://github.com/scikit-build/moderncmakedomain +Source0: %{pypi_source} +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3dist(hatchling) +%if 0%{?fedora} +BuildRequires: python3dist(nox) +%endif +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pytest) +BuildRequires: python3dist(setuptools) +BuildRequires: python3dist(sphinx) +BuildArch: noarch +Packager: Gilver E. + +%description +Modern CMake domain entries, originally from Kitware. + +%package -n python3-%{real_name} +Summary: %{summary} +Requires: python3dist(hatchling) +Requires: python3dist(sphinx) +Obsoletes: python3-%{pypi_name} < 3.29.0-2 +%{?python_provide:%python_provide python3-%{real_name}} + +%description -n python3-%{real_name} +Modern CMake domain entries, originally from Kitware. + +%prep +%autosetup -n %{pypi_name}-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install + +%if %{with test} +%check +nox -s tests +%endif + +%files -n python3-%{real_name} +%doc PKG-INFO +%doc README.md +%license LICENSE +%{python3_sitelib}/sphinxcontrib/moderncmakedomain +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ + +%changelog +* Sat May 10 2025 Gilver E. - 3.29.0-1 +- Initial package. diff --git a/anda/langs/python/sphinxcontrib-moderncmakedomain/update.rhai b/anda/langs/python/sphinxcontrib-moderncmakedomain/update.rhai new file mode 100644 index 0000000000..e22979ce3c --- /dev/null +++ b/anda/langs/python/sphinxcontrib-moderncmakedomain/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("sphinxcontrib-moderncmakedomain")); diff --git a/anda/langs/rust/bottom/rust-bottom.spec b/anda/langs/rust/bottom/rust-bottom.spec index bc557d41a1..9f3ca65a4d 100644 --- a/anda/langs/rust/bottom/rust-bottom.spec +++ b/anda/langs/rust/bottom/rust-bottom.spec @@ -4,8 +4,8 @@ %global crate bottom Name: rust-bottom -Version: 0.10.2 -Release: %autorelease +Version: 0.11.1 +Release: 1%?dist Summary: Customizable cross-platform graphical process/system monitor for the terminal License: MIT diff --git a/anda/langs/rust/eza/anda.hcl b/anda/langs/rust/eza/anda.hcl new file mode 100644 index 0000000000..07d9abe8bc --- /dev/null +++ b/anda/langs/rust/eza/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-eza.spec" + } +} diff --git a/anda/langs/rust/eza/eza-fix-metadata-auto.diff b/anda/langs/rust/eza/eza-fix-metadata-auto.diff new file mode 100644 index 0000000000..4e79a65459 --- /dev/null +++ b/anda/langs/rust/eza/eza-fix-metadata-auto.diff @@ -0,0 +1,15 @@ +--- eza-0.23.0/Cargo.toml 1970-01-01 08:00:01.000000000 +0800 ++++ eza-0.23.0/Cargo.toml 2025-07-23 12:49:16.775971979 +0800 +@@ -225,12 +225,5 @@ + [target.'cfg(target_os = "linux")'.dependencies.proc-mounts] + version = "0.3" + +-[target.'cfg(target_os = "windows")'.dependencies.windows-sys] +-version = "0.60.2" +-features = [ +- "Win32_System_Console", +- "Win32_Foundation", +-] +- + [target."cfg(unix)".dependencies.uzers] + version = "0.12.1" diff --git a/anda/langs/rust/eza/rust-eza.spec b/anda/langs/rust/eza/rust-eza.spec new file mode 100644 index 0000000000..1ff461e7a0 --- /dev/null +++ b/anda/langs/rust/eza/rust-eza.spec @@ -0,0 +1,206 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +%global crate eza + +Name: rust-eza +Version: 0.23.0 +Release: 2%?dist +Summary: Modern replacement for ls + +License: EUPL-1.2 +URL: https://crates.io/crates/eza +Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: eza-fix-metadata-auto.diff + +BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24 +BuildRequires: pandoc + +%global _description %{expand: +A modern replacement for ls.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND EUPL-1.2 AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) +# LICENSE.dependencies contains a full license breakdown + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE.txt +%license LICENSES/CC-BY-4.0.txt +%license LICENSE.dependencies +%doc CHANGELOG.md +%doc CODE_OF_CONDUCT.md +%doc CONTRIBUTING.md +%doc INSTALL.md +%doc README.md +%doc SECURITY.md +%doc TESTING.md +%{_bindir}/eza +%{_mandir}/man1/eza.1.gz +%{_mandir}/man5/eza_colors{,-explanation}.5.gz + +%pkg_completion -Bfzn %{crate} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE.txt +%license %{crate_instdir}/LICENSES/CC-BY-4.0.txt +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/CODE_OF_CONDUCT.md +%doc %{crate_instdir}/CONTRIBUTING.md +%doc %{crate_instdir}/INSTALL.md +%doc %{crate_instdir}/README.md +%doc %{crate_instdir}/SECURITY.md +%doc %{crate_instdir}/TESTING.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+git-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+git-devel %{_description} + +This package contains library source intended for building other packages which +use the "git" feature of the "%{crate}" crate. + +%files -n %{name}+git-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+git2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+git2-devel %{_description} + +This package contains library source intended for building other packages which +use the "git2" feature of the "%{crate}" crate. + +%files -n %{name}+git2-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+nix-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+nix-devel %{_description} + +This package contains library source intended for building other packages which +use the "nix" feature of the "%{crate}" crate. + +%files -n %{name}+nix-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+nix-generated-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+nix-generated-devel %{_description} + +This package contains library source intended for building other packages which +use the "nix-generated" feature of the "%{crate}" crate. + +%files -n %{name}+nix-generated-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+nix-local-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+nix-local-devel %{_description} + +This package contains library source intended for building other packages which +use the "nix-local" feature of the "%{crate}" crate. + +%files -n %{name}+nix-local-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+powertest-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+powertest-devel %{_description} + +This package contains library source intended for building other packages which +use the "powertest" feature of the "%{crate}" crate. + +%files -n %{name}+powertest-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+vendored-libgit2-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+vendored-libgit2-devel %{_description} + +This package contains library source intended for building other packages which +use the "vendored-libgit2" feature of the "%{crate}" crate. + +%files -n %{name}+vendored-libgit2-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+vendored-openssl-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+vendored-openssl-devel %{_description} + +This package contains library source intended for building other packages which +use the "vendored-openssl" feature of the "%{crate}" crate. + +%files -n %{name}+vendored-openssl-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +pandoc --standalone -f markdown -t man man/eza.1.md > man/eza.1 +pandoc --standalone -f markdown -t man man/eza_colors.5.md > man/eza_colors.5 +pandoc --standalone -f markdown -t man man/eza_colors-explanation.5.md > man/eza_colors-explanation.5 + +%install +%cargo_install + +install -Dpm 0644 completions/bash/eza -t %{buildroot}%{bash_completions_dir}/ +install -Dpm 0644 completions/fish/eza.fish -t %{buildroot}%{fish_completions_dir}/ +install -Dpm 0644 completions/zsh/_eza -t %{buildroot}%{zsh_completions_dir}/ +install -Dpm 0644 man/eza.1 -t %{buildroot}%{_mandir}/man1/ +install -Dpm 0644 man/eza_colors.5 -t %{buildroot}%{_mandir}/man5/ +install -Dpm 0644 man/eza_colors-explanation.5 -t %{buildroot}%{_mandir}/man5/ + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/anda/langs/rust/eza/update.rhai b/anda/langs/rust/eza/update.rhai new file mode 100644 index 0000000000..ebffb9da1d --- /dev/null +++ b/anda/langs/rust/eza/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("eza")); diff --git a/anda/langs/rust/felix/rust-felix.spec b/anda/langs/rust/felix/rust-felix.spec index dfd2e8a10a..0a600f0fb7 100644 --- a/anda/langs/rust/felix/rust-felix.spec +++ b/anda/langs/rust/felix/rust-felix.spec @@ -3,7 +3,7 @@ %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ Name: rust-felix -Version: 2.16.0 +Version: 2.16.1 Release: 1%?dist Summary: Tui file manager with vim-like key mapping diff --git a/anda/langs/rust/gitoxide/rust-gitoxide.spec b/anda/langs/rust/gitoxide/rust-gitoxide.spec index 0a09638e14..26d08644b3 100644 --- a/anda/langs/rust/gitoxide/rust-gitoxide.spec +++ b/anda/langs/rust/gitoxide/rust-gitoxide.spec @@ -5,7 +5,7 @@ %global crate gitoxide Name: rust-gitoxide -Version: 0.41.0 +Version: 0.45.0 Release: 1%?dist Summary: Command-line application for interacting with git repositories diff --git a/anda/langs/rust/gping/rust-gping.spec b/anda/langs/rust/gping/rust-gping.spec index af09112d5e..09fab69825 100644 --- a/anda/langs/rust/gping/rust-gping.spec +++ b/anda/langs/rust/gping/rust-gping.spec @@ -1,20 +1,19 @@ -# Generated by rust2rpm 23 -%bcond_without check +%global __brp_mangle_shebangs %{nil} -# shebangs = 21 mold @@ -25,54 +24,30 @@ Ping, but with a graph.} %package -n %{crate} Summary: %{summary} +License: (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND MIT AND (MIT AND Apache-2.0) AND (MIT OR Apache-2.0) AND Unicode-3.0 AND (Unlicense OR MIT) AND Zlib +# LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} -# FIXME: no license files detected +%license LICENSE +%license LICENSE.dependencies %doc readme.md %{_bindir}/gping -%package devel -Summary: %{summary} -BuildArch: noarch - -%description devel %{_description} - -This package contains library source intended for building other packages which -use the "%{crate}" crate. - -%files devel -# FIXME: no license files detected -%doc %{crate_instdir}/readme.md -%{crate_instdir}/ - -%package -n %{name}+default-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+default-devel %{_description} - -This package contains library source intended for building other packages which -use the "default" feature of the "%{crate}" crate. - -%files -n %{name}+default-devel -%ghost %{crate_instdir}/Cargo.toml - %prep -%autosetup -n %{crate}-%{version_no_tilde} -p1 +%autosetup -n %{crate}-%{version} -p1 %cargo_prep_online %build -%cargo_build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies %install %cargo_install +cp %{S:1} . %if %{with check} %check %cargo_test %endif - -%changelog -%autochangelog diff --git a/anda/langs/rust/jellyfin-rpc/rust-jellyfin-rpc-cli.spec b/anda/langs/rust/jellyfin-rpc/rust-jellyfin-rpc-cli.spec index d7c72a1b9f..a405cdb3eb 100644 --- a/anda/langs/rust/jellyfin-rpc/rust-jellyfin-rpc-cli.spec +++ b/anda/langs/rust/jellyfin-rpc/rust-jellyfin-rpc-cli.spec @@ -5,7 +5,7 @@ %global crate jellyfin-rpc-cli Name: rust-jellyfin-rpc-cli -Version: 1.3.1 +Version: 1.3.3 Release: 1%?dist Summary: Displays the content you're currently watching on Discord! diff --git a/anda/langs/rust/joshuto/rust-joshuto.spec b/anda/langs/rust/joshuto/rust-joshuto.spec index d641620486..dadba92643 100644 --- a/anda/langs/rust/joshuto/rust-joshuto.spec +++ b/anda/langs/rust/joshuto/rust-joshuto.spec @@ -2,9 +2,10 @@ %bcond_without check %global crate joshuto +%global __brp_mangle_shebangs %{nil} Name: rust-joshuto -Version: 0.9.7 +Version: 0.9.9 Release: 1%?dist Summary: Terminal file manager inspired by ranger diff --git a/anda/langs/rust/lan-mouse/anda.hcl b/anda/langs/rust/lan-mouse/anda.hcl new file mode 100644 index 0000000000..177426ceb2 --- /dev/null +++ b/anda/langs/rust/lan-mouse/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "lan-mouse.spec" + } +} diff --git a/anda/langs/rust/lan-mouse/lan-mouse.spec b/anda/langs/rust/lan-mouse/lan-mouse.spec new file mode 100644 index 0000000000..4e360c1414 --- /dev/null +++ b/anda/langs/rust/lan-mouse/lan-mouse.spec @@ -0,0 +1,73 @@ +# Generated by rust2rpm 27 +%bcond check 1 +%global rustflags_debuginfo 1 + +Name: lan-mouse +Version: 0.10.0 +Release: %autorelease +Summary: Software KVM Switch / mouse & keyboard sharing software for Local Area Networks + +License: GPL-3.0-or-later +URL: https://github.com/feschber/lan-mouse +Source0: %{url}/archive/refs/tags/v%version.tar.gz +Packager: ayykamp + +Requires: gtk4 +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: anda-srpm-macros +BuildRequires: cargo mold +BuildRequires: pkgconfig(glib-2.0) >= 2.66 +BuildRequires: pkgconfig(gtk4) >= 4.2 +BuildRequires: pkgconfig(libadwaita-1) >= 1.1 +BuildRequires: libXtst-devel + +%description +Software KVM Switch / mouse & keyboard sharing software for Local Area Networks. + +%prep +%autosetup -n lan-mouse-%{version} -p1 +%cargo_prep_online + + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + + +%install +%cargo_install + +# install app icon +install -D -d -m 0755 %{buildroot}%{_datadir}/icons/hicolor/scalable/apps +install -p -m 0644 %{_builddir}/%{name}-%{version}/lan-mouse-gtk/resources/de.feschber.LanMouse.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/apps + +# install desktop entry +install -D -d -m 0755 %{buildroot}%{_datadir}/applications +install -p -m 0644 %{_builddir}/%{name}-%{version}/de.feschber.LanMouse.desktop %{buildroot}%{_datadir}/applications + +# when using firewalld: install firewall rule +install -D -d -m 0755 %{buildroot}%{_prefix}/lib/firewalld/services +install -p -m 0644 %{_builddir}/%{name}-%{version}/firewall/lan-mouse.xml %{buildroot}%{_prefix}/lib/firewalld/services + +%if %{with check} +%check +%cargo_test +%endif + + +%files +%license LICENSE +%license LICENSE.dependencies +%doc DOC.md +%doc README.md +%{_bindir}/%{name} +%{_datadir}/icons/hicolor/scalable/apps/de.feschber.LanMouse.svg +%{_datadir}/applications/de.feschber.LanMouse.desktop +%dir %{_prefix}/lib/firewalld +%dir %{_prefix}/lib/firewalld/services +%{_prefix}/lib/firewalld/services/lan-mouse.xml + + +%changelog +* Fri Jun 27 2025 ayykamp +- Initial package diff --git a/anda/langs/rust/lan-mouse/update.rhai b/anda/langs/rust/lan-mouse/update.rhai new file mode 100644 index 0000000000..b8b3d3f067 --- /dev/null +++ b/anda/langs/rust/lan-mouse/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("feschber/lan-mouse")); diff --git a/anda/langs/rust/onefetch/anda.hcl b/anda/langs/rust/onefetch/anda.hcl deleted file mode 100644 index bd7888580c..0000000000 --- a/anda/langs/rust/onefetch/anda.hcl +++ /dev/null @@ -1,5 +0,0 @@ -project pkg { - rpm { - spec = "rust-onefetch.spec" - } -} diff --git a/anda/langs/rust/onefetch/onefetch-fix-metadata-auto.diff b/anda/langs/rust/onefetch/onefetch-fix-metadata-auto.diff deleted file mode 100644 index 60b7ecb7a4..0000000000 --- a/anda/langs/rust/onefetch/onefetch-fix-metadata-auto.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- onefetch-2.21.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ onefetch-2.21.0/Cargo.toml 2024-07-23T17:12:11.234589+00:00 -@@ -164,8 +164,3 @@ - [features] - fail-on-deprecated = [] - --[target."cfg(windows)".dependencies.enable-ansi-support] --version = "0.2.1" -- --[target."cfg(windows)".build-dependencies.winres] --version = "0.1" diff --git a/anda/langs/rust/onefetch/rust-onefetch.spec b/anda/langs/rust/onefetch/rust-onefetch.spec deleted file mode 100644 index b96a5fd539..0000000000 --- a/anda/langs/rust/onefetch/rust-onefetch.spec +++ /dev/null @@ -1,103 +0,0 @@ -# Generated by rust2rpm 26 -%bcond_without check - -%global crate onefetch - -Name: rust-onefetch -Version: 2.23.1 -Release: 1%?dist -Summary: Command-line Git information tool - -License: MIT -URL: https://crates.io/crates/onefetch -Source: %{crates_source} -# Automatically generated patch to strip dependencies and normalize metadata -Patch: onefetch-fix-metadata-auto.diff - -BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24 -BuildRequires: cmake mold - -%global _description %{expand: -Command-line Git information tool.} - -%description %{_description} - -%package -n %{crate} -Summary: %{summary} -License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) - -%description -n %{crate} %{_description} - -%files -n %{crate} -%license LICENSE.md -%license resources/license.cache.zstd -%license src/info/license.rs -%license LICENSE.dependencies -%doc CHANGELOG.md -%doc CONTRIBUTING.md -%doc README.md -%{_bindir}/onefetch - -%package devel -Summary: %{summary} -BuildArch: noarch - -%description devel %{_description} - -This package contains library source intended for building other packages which -use the "%{crate}" crate. - -%files devel -%license %{crate_instdir}/LICENSE.md -%license %{crate_instdir}/resources/license.cache.zstd -%license %{crate_instdir}/src/info/license.rs -%doc %{crate_instdir}/CHANGELOG.md -%doc %{crate_instdir}/CONTRIBUTING.md -%doc %{crate_instdir}/README.md -%{crate_instdir}/ - -%package -n %{name}+default-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+default-devel %{_description} - -This package contains library source intended for building other packages which -use the "default" feature of the "%{crate}" crate. - -%files -n %{name}+default-devel -%ghost %{crate_instdir}/Cargo.toml - -%package -n %{name}+fail-on-deprecated-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+fail-on-deprecated-devel %{_description} - -This package contains library source intended for building other packages which -use the "fail-on-deprecated" feature of the "%{crate}" crate. - -%files -n %{name}+fail-on-deprecated-devel -%ghost %{crate_instdir}/Cargo.toml - -%prep -%autosetup -n %{crate}-%{version} -p1 -%cargo_prep_online - -%build -cat< license.sh -%{cargo_license} > LICENSE.dependencies -EOF -sed -i "s/--offline//g" license.sh -bash license.sh - -%install -%cargo_install - -%if %{with check} -%check -%cargo_test -%endif - -%changelog -%autochangelog diff --git a/anda/langs/rust/onefetch/update.rhai b/anda/langs/rust/onefetch/update.rhai deleted file mode 100644 index bb9a2f71ec..0000000000 --- a/anda/langs/rust/onefetch/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(crates("onefetch")); diff --git a/anda/langs/rust/ouch/ouch-fix-metadata-auto.diff b/anda/langs/rust/ouch/ouch-fix-metadata-auto.diff index 4b23e58e2d..69692d0fe1 100644 --- a/anda/langs/rust/ouch/ouch-fix-metadata-auto.diff +++ b/anda/langs/rust/ouch/ouch-fix-metadata-auto.diff @@ -1,8 +1,17 @@ ---- ouch-0.5.1/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ ouch-0.5.1/Cargo.toml 2023-12-10T09:36:31.446957+00:00 -@@ -176,5 +176,3 @@ - ] - use_zstd_thin = ["zstd/thin"] +--- ouch-0.6.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ ouch-0.6.0/Cargo.toml 2025-04-20T17:51:00.814645+00:00 +@@ -223,9 +223,6 @@ + [build-dependencies.clap_mangen] + version = "0.2.24" -[target."cfg(not(unix))".dependencies.is_executable] -version = "1.0.1" +- + [profile.fast] + opt-level = 2 + lto = false +@@ -238,3 +235,4 @@ + lto = true + codegen-units = 1 + strip = true ++ diff --git a/anda/langs/rust/ouch/rust-ouch.spec b/anda/langs/rust/ouch/rust-ouch.spec index b745ec90d9..73300e87ef 100644 --- a/anda/langs/rust/ouch/rust-ouch.spec +++ b/anda/langs/rust/ouch/rust-ouch.spec @@ -1,11 +1,11 @@ -# Generated by rust2rpm 25 -%bcond_without check +# Generated by rust2rpm 27 +%bcond check 1 %global crate ouch Name: rust-ouch -Version: 0.5.1 -Release: 1%{?dist} +Version: 0.6.1 +Release: 1%?dist Summary: Command-line utility for easily compressing and decompressing files and directories License: MIT @@ -25,11 +25,14 @@ and directories.} %package -n %{crate} Summary: %{summary} +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND (BSD-3-Clause AND MIT) AND (BSD-3-Clause OR MIT) AND CC0-1.0 AND LGPL-3.0-only AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND Zlib +# LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE +%license LICENSE.dependencies %doc CHANGELOG.md %doc CONTRIBUTING.md %doc README.md @@ -40,7 +43,8 @@ Summary: %{summary} %cargo_prep_online %build -%cargo_build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies %install %cargo_install diff --git a/anda/langs/rust/pbpctrl/anda.hcl b/anda/langs/rust/pbpctrl/anda.hcl new file mode 100644 index 0000000000..ada11b625e --- /dev/null +++ b/anda/langs/rust/pbpctrl/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "pbpctrl.spec" + } + labels { + weekly = 4 + } +} diff --git a/anda/langs/rust/pbpctrl/pbpctrl.spec b/anda/langs/rust/pbpctrl/pbpctrl.spec new file mode 100644 index 0000000000..033e86e380 --- /dev/null +++ b/anda/langs/rust/pbpctrl/pbpctrl.spec @@ -0,0 +1,44 @@ +# Generated by rust2rpm 27 +%bcond check 0 + +Name: pbpctrl +Version: 0.1.8 +Release: %autorelease +Summary: Command-line utility for controlling Google Pixel Buds Pro + +SourceLicense: MIT OR Apache-2.0 +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-3-Clause OR MIT OR Apache-2.0) AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) +# LICENSE.dependencies contains a full license breakdown + +URL: https://github.com/qzed/pbpctrl +Source: %url/archive/refs/tags/v%version.tar.gz +Packager: madonuko + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: pkgconfig(dbus-1) +BuildRequires: protobuf-compiler +BuildRequires: protobuf-devel + +%global _description %{expand: +Command-line utility for controlling Google Pixel Buds Pro.} + +%description %{_description} + +%prep +%autosetup -n pbpctrl-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies +%{cargo_build} -p pbpctrl + +%install +install -Dm755 target/rpm/pbpctrl -t %buildroot%_bindir + +%files +%license LICENSE-APACHE +%license LICENSE-MIT +%license LICENSE.dependencies +%doc README.md +%{_bindir}/pbpctrl diff --git a/anda/langs/rust/pbpctrl/update.rhai b/anda/langs/rust/pbpctrl/update.rhai new file mode 100644 index 0000000000..5fdd1faec5 --- /dev/null +++ b/anda/langs/rust/pbpctrl/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("qzed/pbpctrl")); diff --git a/anda/langs/rust/rnote/rnote.spec b/anda/langs/rust/rnote/rnote.spec index 1a0893708c..4641617a5a 100644 --- a/anda/langs/rust/rnote/rnote.spec +++ b/anda/langs/rust/rnote/rnote.spec @@ -1,14 +1,17 @@ -%global build_rustflags %build_rustflags -C link-arg=-fuse-ld=mold +%global rustflags_debuginfo 1 Name: rnote -Version: 0.11.0 -Release: 1%?dist -Summary: Sketch and take handwritten notes. +Version: 0.12.0 +Release: 2%?dist +Summary: Sketch and take handwritten notes License: GPL-3.0 URL: https://github.com/flxzt/rnote +Packager: madonuko Source0: %{url}/archive/refs/tags/v%version.tar.gz -Requires: gtk4 -BuildRequires: cargo meson cmake libappstream-glib gcc-c++ pkgconfig(alsa) alsa-lib clang-devel python desktop-file-utils mold +Recommends: rnote-cli = %evr +BuildRequires: rust-packaging +BuildRequires: cargo meson cmake libappstream-glib gcc-c++ alsa-lib clang-devel python desktop-file-utils mold +BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(glib-2.0) >= 2.66 BuildRequires: pkgconfig(gtk4) >= 4.7 BuildRequires: pkgconfig(libadwaita-1) >= 1.2 @@ -20,12 +23,22 @@ notes and to annotate documents and pictures. Targeted at students, teachers and those who own a drawing tablet, it provides features like PDF and picture import/export, an infinite canvas and an adaptive UI for big and small screens. +%package cli +Summary: The cli version of rnote (`rnote-cli`) +License: GPL-3.0 + +%description cli +This provides the `rnote-cli` binary. For more information, see the `rnote` package. + + %prep %autosetup -n rnote-%{version} - +%cargo_prep_online %build %meson +%cargo_license_summary_online +%{cargo_license_online} > LICENSE.dependencies %meson_build @@ -35,9 +48,9 @@ import/export, an infinite canvas and an adaptive UI for big and small screens. %files %doc README.md -%license LICENSE - +%license LICENSE LICENSE.dependencies %_bindir/rnote +%_datadir/thumbnailers/rnote.thumbnailer %_datadir/applications/com.github.flxzt.rnote.desktop %_datadir/glib-2.0/schemas/com.github.flxzt.rnote.gschema.xml %_datadir/icons/hicolor/scalable/apps/com.github.flxzt.rnote.svg @@ -49,10 +62,7 @@ import/export, an infinite canvas and an adaptive UI for big and small screens. %_datadir/rnote/ %_datadir/fonts/rnote-fonts/ - -%changelog -* Wed Nov 2 2022 windowsboy111 - 0.5.7-1 -- Fix requires - -* Sun Oct 23 2022 windowsboy111 - 0.5.7-1 -- Initial package +%files cli +%doc README.md +%license LICENSE LICENSE.dependencies +%_bindir/rnote-cli diff --git a/anda/langs/rust/starship/0001-gix-0.61.1-0.61.0.patch b/anda/langs/rust/starship/0001-gix-0.61.1-0.61.0.patch deleted file mode 100644 index 5d61cce573..0000000000 --- a/anda/langs/rust/starship/0001-gix-0.61.1-0.61.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b62e3879abe83e0b879421a023d8e944e31f00cb Mon Sep 17 00:00:00 2001 -From: madomado -Date: Mon, 25 Mar 2024 18:33:25 +0800 -Subject: [PATCH] gix 0.61.1 -> 0.61.0 - ---- - Cargo.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Cargo.toml b/Cargo.toml -index d98ba90..c3059c9 100644 ---- a/Cargo.toml -+++ b/Cargo.toml -@@ -82,7 +82,7 @@ version = "1.0.4" - version = "0.4.3" - - [dependencies.gix] --version = "0.61.1" -+version = "0.61.0" - features = [ - "max-performance-safe", - "revision", --- -2.44.0 - diff --git a/anda/langs/rust/starship/rust-starship.spec b/anda/langs/rust/starship/rust-starship.spec index 6062fdc859..476004b035 100644 --- a/anda/langs/rust/starship/rust-starship.spec +++ b/anda/langs/rust/starship/rust-starship.spec @@ -4,7 +4,7 @@ %global crate starship Name: rust-starship -Version: 1.22.1 +Version: 1.23.0 Release: 1%?dist Summary: Minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️ @@ -20,6 +20,12 @@ BuildRequires: cmake BuildRequires: mold BuildRequires: git-core +# Old devel packages +Obsoletes: %{name}+gix-faster-devel < 1.23.0 +Obsoletes: %{name}+gix-features-devel < 1.23.0 +Obsoletes: %{name}+gix-max-perf-devel < 1.23.0 +Obsoletes: %{name}+libz-ng-sys-devel < 1.23.0 + %global _description %{expand: The minimal, blazing-fast, and infinitely customizable prompt for any shell! ☄🌌️.} @@ -88,54 +94,6 @@ use the "config-schema" feature of the "%{crate}" crate. %files -n %{name}+config-schema-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+gix-faster-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+gix-faster-devel %{_description} - -This package contains library source intended for building other packages which -use the "gix-faster" feature of the "%{crate}" crate. - -%files -n %{name}+gix-faster-devel -%ghost %{crate_instdir}/Cargo.toml - -%package -n %{name}+gix-features-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+gix-features-devel %{_description} - -This package contains library source intended for building other packages which -use the "gix-features" feature of the "%{crate}" crate. - -%files -n %{name}+gix-features-devel -%ghost %{crate_instdir}/Cargo.toml - -%package -n %{name}+gix-max-perf-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+gix-max-perf-devel %{_description} - -This package contains library source intended for building other packages which -use the "gix-max-perf" feature of the "%{crate}" crate. - -%files -n %{name}+gix-max-perf-devel -%ghost %{crate_instdir}/Cargo.toml - -%package -n %{name}+libz-ng-sys-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+libz-ng-sys-devel %{_description} - -This package contains library source intended for building other packages which -use the "libz-ng-sys" feature of the "%{crate}" crate. - -%files -n %{name}+libz-ng-sys-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+notify-devel Summary: %{summary} BuildArch: noarch diff --git a/anda/langs/rust/starship/starship-fix-metadata-auto.diff b/anda/langs/rust/starship/starship-fix-metadata-auto.diff index 18e975f69b..ce9f689d72 100644 --- a/anda/langs/rust/starship/starship-fix-metadata-auto.diff +++ b/anda/langs/rust/starship/starship-fix-metadata-auto.diff @@ -1,6 +1,6 @@ ---- starship-1.22.1/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ starship-1.22.1/Cargo.toml 2025-01-12T14:01:45.200436+00:00 -@@ -273,18 +273,3 @@ +--- a/Cargo.toml 2025-04-27 10:52:14.000000000 -0500 ++++ b/Cargo.toml 2025-04-27 12:39:59.385400385 -0500 +@@ -265,22 +265,6 @@ ] default-features = false @@ -8,7 +8,7 @@ -version = "0.2.0" - -[target."cfg(windows)".dependencies.windows] --version = "0.59.0" +-version = "0.61.0" -features = [ - "Win32_Foundation", - "Win32_UI_Shell", @@ -19,3 +19,11 @@ - -[target."cfg(windows)".build-dependencies.winres] -version = "0.1.12" +- + [profile.bench] + lto = "thin" + codegen-units = 16 + [dev-dependencies] + mockall = "0.13.1" + tempfile = "3.19.1" + diff --git a/anda/langs/rust/typst/anda.hcl b/anda/langs/rust/typst/anda.hcl new file mode 100644 index 0000000000..def2098125 --- /dev/null +++ b/anda/langs/rust/typst/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-typst.spec" + } +} diff --git a/anda/langs/rust/typst/rust-typst.spec b/anda/langs/rust/typst/rust-typst.spec new file mode 100644 index 0000000000..d8633cc5e6 --- /dev/null +++ b/anda/langs/rust/typst/rust-typst.spec @@ -0,0 +1,79 @@ +# Generated by rust2rpm 27 +%bcond check 0 + +%global crate typst + +Name: rust-typst +Version: 0.13.1 +Release: 2%?dist +Summary: New markup-based typesetting system that is powerful and easy to learn + +License: Apache-2.0 +URL: https://typst.app +Source: https://github.com/typst/typst/archive/refs/tags/v%version.tar.gz +Packager: madonuko + +BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24 +BuildRequires: pkgconfig(openssl) + +%global _description %{expand: +A new markup-based typesetting system that is powerful and easy to +learn.} + +%description %{_description} + +%package -n %crate +Summary: %{summary} +License: ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND CC0-1.0 AND ISC AND MIT AND (MIT AND (MIT OR Apache-2.0)) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR CC0-1.0) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) +Provides: %crate-cli = %version-%release + +%description -n %crate %{_description} + +%files -n %crate +%license LICENSE +%license LICENSE.dependencies +%doc README.md +%_bindir/typst +%_mandir/man1/typst-compile.1.gz +%_mandir/man1/typst-fonts.1.gz +%_mandir/man1/typst-init.1.gz +%_mandir/man1/typst-query.1.gz +%_mandir/man1/typst-update.1.gz +%_mandir/man1/typst-watch.1.gz +%_mandir/man1/typst.1.gz + + +%pkg_completion -Bfzn %crate + + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online +pushd crates/%{crate}-cli +%cargo_prep_online +popd + +%build +pushd crates/%{crate}-cli +%{cargo_license_summary_online} +%{cargo_license_online} > ../../LICENSE.dependencies +popd +export TYPST_VERSION="%version" +export GEN_ARTIFACTS=artifacts/ +export OPENSSL_NO_VENDOR=true +%{cargo_build} -p typst-cli + +%install +#? https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=typst-git#n60 +_artifacts='crates/typst-cli/artifacts' +install -Dm755 -t %buildroot%_bindir target/rpm/%crate +install -Dm644 -t %buildroot%_mandir/man1 $_artifacts/%{crate}*.1 +install -Dm644 -t %buildroot%zsh_completions_dir $_artifacts/_%crate +install -Dm644 -t %buildroot%fish_completions_dir $_artifacts/%crate.fish +# no .bash suffix +install -Dm644 $_artifacts/%crate.bash %buildroot%bash_completions_dir/%crate + +%if %{with check} +%check +%cargo_test +%endif diff --git a/anda/langs/rust/typst/update.rhai b/anda/langs/rust/typst/update.rhai new file mode 100644 index 0000000000..be8c5fed1d --- /dev/null +++ b/anda/langs/rust/typst/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("typst")); diff --git a/anda/langs/rust/usage/anda.hcl b/anda/langs/rust/usage/anda.hcl new file mode 100644 index 0000000000..30b76ddd07 --- /dev/null +++ b/anda/langs/rust/usage/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-usage-cli.spec" + } +} diff --git a/anda/langs/rust/usage/rust-usage-cli.spec b/anda/langs/rust/usage/rust-usage-cli.spec new file mode 100644 index 0000000000..676da76bb1 --- /dev/null +++ b/anda/langs/rust/usage/rust-usage-cli.spec @@ -0,0 +1,77 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +%global crate usage-cli + +Name: rust-usage-cli +Version: 2.2.2 +Release: 1%?dist +Summary: CLI for working with usage-based CLIs + +License: MIT +URL: https://crates.io/crates/usage-cli +Source: %{crates_source} +Source1: https://raw.githubusercontent.com/jdx/usage/refs/tags/v%version/LICENSE +Packager: madonuko + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +CLI for working with usage-based CLIs.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND ISC AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) +# LICENSE.dependencies contains a full license breakdown +Provides: usage = %version-%release + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license LICENSE.dependencies +%{_bindir}/usage + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license LICENSE +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +cp %{S:1} . +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif diff --git a/anda/langs/rust/usage/update.rhai b/anda/langs/rust/usage/update.rhai new file mode 100644 index 0000000000..5b57173e1a --- /dev/null +++ b/anda/langs/rust/usage/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("usage-cli")); diff --git a/anda/langs/rust/wild/anda.hcl b/anda/langs/rust/wild/anda.hcl new file mode 100644 index 0000000000..45e6b694f5 --- /dev/null +++ b/anda/langs/rust/wild/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-wild-linker.spec" + } +} diff --git a/anda/langs/rust/wild/rust-wild-linker.spec b/anda/langs/rust/wild/rust-wild-linker.spec new file mode 100644 index 0000000000..049c86f0d1 --- /dev/null +++ b/anda/langs/rust/wild/rust-wild-linker.spec @@ -0,0 +1,54 @@ +# Generated by rust2rpm 27 +%bcond check 0 + +%global crate wild-linker + +Name: rust-wild-linker +Version: 0.5.0 +Release: 1%?dist +Summary: Very fast linker for Linux + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/wild-linker +Source: %{crates_source} +Source1: https://github.com/davidlattimore/wild/archive/refs/tags/%version.tar.gz + +BuildRequires: cargo-rpm-macros >= 24 +BuildRequires: gcc-c++ + +%global _description %{expand: +A very fast linker for Linux.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR NCSA) AND (MIT OR Zlib OR Apache-2.0) AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) +# LICENSE.dependencies contains a full license breakdown +Provides: wild = %evr + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE-APACHE LICENSE-MIT +%license LICENSE.dependencies +%doc README.md +%{_bindir}/wild + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online +tar xf %{S:1} +cp wild-%version/LICENSE-* . + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif diff --git a/anda/langs/rust/wild/update.rhai b/anda/langs/rust/wild/update.rhai new file mode 100644 index 0000000000..ea2dd2af4d --- /dev/null +++ b/anda/langs/rust/wild/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("wild-linker")); diff --git a/anda/langs/rust/xdvdfs/anda.hcl b/anda/langs/rust/xdvdfs/anda.hcl new file mode 100644 index 0000000000..a0ae884d2b --- /dev/null +++ b/anda/langs/rust/xdvdfs/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-xdvdfs-cli.spec" + } +} diff --git a/anda/langs/rust/xdvdfs/rust-xdvdfs-cli.spec b/anda/langs/rust/xdvdfs/rust-xdvdfs-cli.spec new file mode 100644 index 0000000000..a45f7c2070 --- /dev/null +++ b/anda/langs/rust/xdvdfs/rust-xdvdfs-cli.spec @@ -0,0 +1,52 @@ +# Generated by rust2rpm 27 +%bcond check 0 + +%global crate xdvdfs-cli + +Name: rust-xdvdfs-cli +Version: 0.8.3 +Release: %autorelease +Summary: Tool for interacting with XISO/XDVDFS images + +License: MIT +URL: https://crates.io/crates/xdvdfs-cli +Source: %{crates_source} +Source1: https://raw.githubusercontent.com/antangelo/xdvdfs/v%version/LICENSE +Packager: madonuko + +BuildRequires: anda-srpm-macros +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +Tool for interacting with XISO/XDVDFS images.} + +%description %{_description} + +%package -n xdvdfs +Summary: %{summary} +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (Apache-2.0 OR MIT) AND MIT AND (MIT AND BSD-3-Clause) AND (MIT OR Apache-2.0) AND (Unlicense OR MIT) AND Zlib + +%description -n xdvdfs %{_description} + +%files -n xdvdfs +%license LICENSE +%license LICENSE.dependencies +%doc README.md +%{_bindir}/xdvdfs + +%prep +%autosetup -n %{crate}-%{version} -p1 +cp %{S:1} LICENSE +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif diff --git a/anda/langs/rust/xdvdfs/update.rhai b/anda/langs/rust/xdvdfs/update.rhai new file mode 100644 index 0000000000..df3efee4b3 --- /dev/null +++ b/anda/langs/rust/xdvdfs/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("xdvdfs-cli")); diff --git a/anda/langs/rust/xplr/rust-xplr.spec b/anda/langs/rust/xplr/rust-xplr.spec index 321d236d25..bd5aa919a0 100644 --- a/anda/langs/rust/xplr/rust-xplr.spec +++ b/anda/langs/rust/xplr/rust-xplr.spec @@ -4,8 +4,8 @@ %global crate xplr Name: rust-xplr -Version: 0.21.10 -Release: 1%{?dist} +Version: 1.0.1 +Release: 1%?dist Summary: Hackable, minimal, fast TUI file explorer License: MIT diff --git a/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec b/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec index 0886763050..69dfaf030e 100644 --- a/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec +++ b/anda/langs/rust/xwayland-satellite/xwayland-satellite.spec @@ -1,5 +1,5 @@ Name: xwayland-satellite -Version: 0.5.1 +Version: 0.7 Release: 1%?dist Summary: Xwayland outside your Wayland. License: MPL-2.0 diff --git a/anda/langs/rust/youki/youki.spec b/anda/langs/rust/youki/youki.spec index 36825db322..75cb7b5f4b 100644 --- a/anda/langs/rust/youki/youki.spec +++ b/anda/langs/rust/youki/youki.spec @@ -1,5 +1,5 @@ Name: youki -Version: 0.5.1 +Version: 0.5.5 Release: 1%?dist Summary: A container runtime written in Rust diff --git a/anda/langs/rust/zellij/rust-zellij.spec b/anda/langs/rust/zellij/rust-zellij.spec index 67f05ad290..a5d0da32c4 100644 --- a/anda/langs/rust/zellij/rust-zellij.spec +++ b/anda/langs/rust/zellij/rust-zellij.spec @@ -5,7 +5,7 @@ %global crate zellij Name: rust-zellij -Version: 0.41.2 +Version: 0.43.1 Release: 1%?dist Summary: Terminal workspace with batteries included diff --git a/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec b/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec index e2ad4311e8..df48184a9f 100644 --- a/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec +++ b/anda/langs/vala/vala-language-server-nightly/vala-language-server-nightly.spec @@ -1,9 +1,9 @@ %global real_name vala-language-server -%global commit 31cb5116a4a138365feb709ebb7b8670db604991 +%global commit a5d24a8cf7b61d0d2082234034905f0f8ed96726 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20240605 +%global commit_date 20250606 %global snapshot_info %{commit_date}.%{shortcommit} %global verrel 0.48.7 diff --git a/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec b/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec index d28f4ed86f..c1d4c11cd7 100644 --- a/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec +++ b/anda/langs/vala/vala-lint-nightly/vala-lint-nightly.spec @@ -1,9 +1,9 @@ %global real_name vala-lint -%global commit 4ed1443c35a8a84445fb59292d539358365d8263 +%global commit a1d1a7bc0f740920e592fd788a836c402fd9825c %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20240829 +%global commit_date 20250804 %global snapshot_info %{commit_date}.%{shortcommit} Name: vala-lint-nightly diff --git a/anda/langs/vala/vala-nightly/vala-nightly.spec b/anda/langs/vala/vala-nightly/vala-nightly.spec index 2f7d15a61f..4ecdd2b05e 100644 --- a/anda/langs/vala/vala-nightly/vala-nightly.spec +++ b/anda/langs/vala/vala-nightly/vala-nightly.spec @@ -3,11 +3,11 @@ %global priority 90 %global real_name vala -%global commit 32fabbe78a06a9cc46f67305dd51d1babd58e6d4 +%global commit ba1b29121791c2a2235f33cf87a11563ac7da945 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global repo https://gitlab.gnome.org/GNOME/%{real_name}.git -%global commit_date 20250221 +%global commit_date 20250806 %global snapshot_info %{commit_date}.%{shortcommit} Name: vala-nightly diff --git a/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec b/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec index e6cc115938..2c668bb758 100644 --- a/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec +++ b/anda/langs/vala/vala-panel-appmenu/vala-panel-appmenu.spec @@ -1,9 +1,9 @@ %global forgeurl https://gitlab.com/vala-panel-project/vala-panel-appmenu -%global commit 218bb4aaf1a1d9fcd89a71a14c8bf99cfd94ba1e +%global commit 6665f7708ef15baa5538f5582b81ceb75a104a24 %forgemeta Name: vala-panel-appmenu -Version: 24.05 +Version: 25.04 Release: 1%?dist License: LGPL-3.0-or-later Summary: Application Menu plugin for vala-panel diff --git a/anda/langs/zig/bootstrap/0000-remove-native-lib-directories-from-rpath.patch b/anda/langs/zig/bootstrap/0000-remove-native-lib-directories-from-rpath.patch new file mode 100644 index 0000000000..1e1c1f1709 --- /dev/null +++ b/anda/langs/zig/bootstrap/0000-remove-native-lib-directories-from-rpath.patch @@ -0,0 +1,18 @@ +--- a/src/main.zig 2025-04-25 06:01:31.337458939 -0500 ++++ b/src/main.zig 2025-04-25 06:03:02.239473385 -0500 +@@ -4072,6 +4072,15 @@ + + try create_module.lib_directories.ensureUnusedCapacity(arena, paths.lib_dirs.items.len); + for (paths.lib_dirs.items) |path| addLibDirectoryWarn2(&create_module.lib_directories, path, true); ++ ++ for (paths.lib_dirs.items) |native_lib_dir| { ++ for (0.., create_module.rpath_list.items) |i, rpath_dir| { ++ if (std.mem.eql(u8, native_lib_dir, rpath_dir)) { ++ _ = create_module.rpath_list.orderedRemove(i); ++ break; ++ } ++ } ++ } + } + + if (create_module.libc_paths_file) |paths_file| { diff --git a/anda/langs/zig/bootstrap/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch b/anda/langs/zig/bootstrap/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch new file mode 100644 index 0000000000..d4dd5bb4eb --- /dev/null +++ b/anda/langs/zig/bootstrap/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch @@ -0,0 +1,43 @@ +From 1796a91063dc5ed71418f164bb7d98ca65c33d4a Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 16 Jun 2025 20:46:25 +0200 +Subject: [PATCH] link.Elf: add root directory of libraries to linker path + +All the given dynamic shared objects will be linked with an absolute +path however they may link to other dynamic shared objects which won't +have an absolute path, for this we need to add the library path so that +lld can resolve it. + +Signed-off-by: Jan200101 +--- + src/link/Lld.zig | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/link/Lld.zig b/src/link/Lld.zig +index 4ea809428e..b8421dd60a 100644 +--- a/src/link/Lld.zig ++++ b/src/link/Lld.zig +@@ -1109,9 +1109,19 @@ fn elfLink(lld: *Lld, arena: Allocator) !void { + // Positional arguments to the linker such as object files. + var whole_archive = false; + ++ var lib_directories = std.StringArrayHashMap(void).init(gpa); ++ defer lib_directories.deinit(); ++ + for (base.comp.link_inputs) |link_input| switch (link_input) { + .res => unreachable, // Windows-only +- .dso => continue, ++ .dso => |dso| { ++ if (dso.path.root_dir.path) |root_dir| { ++ const lib_dir = try lib_directories.getOrPut(root_dir); ++ if (lib_dir.found_existing) continue; ++ try argv.append("-L"); ++ try argv.append(root_dir); ++ } ++ }, + .object, .archive => |obj| { + if (obj.must_link and !whole_archive) { + try argv.append("-whole-archive"); +-- +2.49.0 + diff --git a/anda/langs/zig/bootstrap/anda.hcl b/anda/langs/zig/bootstrap/anda.hcl new file mode 100644 index 0000000000..60172542b7 --- /dev/null +++ b/anda/langs/zig/bootstrap/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "zig-master-bootstrap.spec" + } +} diff --git a/anda/langs/zig/bootstrap/update.rhai b/anda/langs/zig/bootstrap/update.rhai new file mode 100644 index 0000000000..4e64359f58 --- /dev/null +++ b/anda/langs/zig/bootstrap/update.rhai @@ -0,0 +1,7 @@ +let url = `https://ziglang.org/download/index.json`; +let json = get(url).json(); +let v = json.master.version; +rpm.global("ver", v); +if rpm.changed() { + rpm.release(); +} diff --git a/anda/langs/zig/bootstrap/zig-master-bootstrap.spec b/anda/langs/zig/bootstrap/zig-master-bootstrap.spec new file mode 100644 index 0000000000..9648672faf --- /dev/null +++ b/anda/langs/zig/bootstrap/zig-master-bootstrap.spec @@ -0,0 +1,206 @@ +# https://ziglang.org/download/VERSION/release-notes.html#Support-Table +%global zig_arches x86_64 aarch64 riscv64 %{mips64} +# Signing key from https://ziglang.org/download/ +%global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U +# Not needed yet +%if 0%{?fedora} >= 42 || 0%{?rhel} >= 9 +%define llvm_compat 20 +%endif +%global llvm_version 20.0.0 +%global ver 0.16.0-dev.9+8248597a2 +%bcond bootstrap 1 +%bcond docs %{without bootstrap} +%bcond test 1 +%global zig_cache_dir %{builddir}/zig-cache +%global zig_build_options %{shrink: \ + --verbose \ + --release=fast \ + --summary all \ + \ + -Dtarget=native \ + -Dcpu=baseline \ + --zig-lib-dir lib \ + --build-id=sha1 \ + \ + --cache-dir "%{zig_cache_dir}" \ + --global-cache-dir "%{zig_cache_dir}" \ + \ + -Dversion-string="%(v=%{ver}; echo ${v:0:6})" \ + -Dstatic-llvm=false \ + -Denable-llvm=true \ + -Dno-langref=true \ + -Dstd-docs=false \ + -Dpie \ + -Dconfig_h="%{__cmake_builddir}/config.h" \ +} +%global zig_install_options %zig_build_options %{shrink: \ + --prefix "%{_prefix}" \ +} +%global zig_mirrors ("https://pkg.machengine.org/zig" "https://zigmirror.hryx.net/zig" "https://zig.linus.dev/zig" "https://zig.squirl.dev" "https://zig.florent.dev") +%global mirror_url %(mirrors=%{zig_mirrors}; index=$(( RANDOM % ${#mirrors[@]} )); echo ${mirrors[$index]}) + +Name: zig-master-bootstrap +Version: %(echo %{ver} | sed 's/-/~/g') +Release: 1%?dist +Summary: Boostrap builds for Zig. +License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 +URL: https://ziglang.org +Source0: %{mirror_url}/zig-%{ver}.tar.xz +Source1: %{mirror_url}/zig-%{ver}.tar.xz.minisig +Patch0: 0000-remove-native-lib-directories-from-rpath.patch +Patch3: 0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libxml2-devel +BuildRequires: llvm-devel +BuildRequires: clang-devel +BuildRequires: lld-devel +BuildRequires: zlib-devel +# for man page generation +BuildRequires: help2man +# for signature verification +BuildRequires: minisign +%if %{without bootstrap} +BuildRequires: %{name} = %{version} +%endif +%if %{with test} +BuildRequires: elfutils-libelf-devel +BuildRequires: libstdc++-static +%endif +Requires: %{name}-libs = %{version} +# Apache-2.0 WITH LLVM-exception OR NCSA OR MIT +Provides: bundled(compiler-rt) = %{llvm_version} +# LGPL-2.1-or-later AND SunPro AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later WITH GNU-compiler-exception AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND HPND AND CMU-Mach AND LGPL-2.0-or-later AND Unicode-3.0 AND GFDL-1.1-or-later AND GPL-1.0-or-later AND FSFUL AND MIT AND Inner-Net-2.0 AND X11 AND GPL-2.0-or-later WITH GCC-exception-2.0 AND GFDL-1.3-only AND GFDL-1.1-only +Provides: bundled(glibc) = 2.41 +# Apache-2.0 WITH LLVM-exception OR MIT OR NCSA +Provides: bundled(libcxx) = %{llvm_version} +# Apache-2.0 WITH LLVM-exception OR MIT OR NCSA +Provides: bundled(libcxxabi) = %{llvm_version} +# NCSA +Provides: bundled(libunwind) = %{llvm_version} +# BSD, LGPG, ZPL +Provides: bundled(mingw) = 3839e21b08807479a31d5a9764666f82ae2f0356 +# MIT +Provides: bundled(musl) = 1.2.5 +# Apache-2.0 WITH LLVM-exception AND Apache-2.0 AND MIT AND BSD-2-Clause +Provides: bundled(wasi-libc) = d03829489904d38c624f6de9983190f1e5e7c9c5 +Conflicts: zig +ExclusiveArch: %{zig_arches} +Packager: Gilver E. + +%description +Zig is an open source alternative to C. +This package provides the bootstrap to build full "prerelease"/master builds of Zig. +It is not recommended to use this build on its own. + +# The Zig stdlib only contains uncompiled code +%package libs +Summary: Zig Standard Library +Conflicts: zig-libs +BuildArch: noarch + +%description libs +Zig Standard Library + +%prep +/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} +%autosetup -p1 -n zig-%{ver} +%if %{without bootstrap} +# Ensure that the pre-build stage1 binary is not used +rm -f stage1/zig1.wasm +%endif + +%build +# zig doesn't know how to dynamically link llvm on its own so we need cmake to generate a header ahead of time +# if we provide the header we need to also build zigcpp + +# C_FLAGS: wasm2c output generates a lot of noise with -Wunused. +# EXTRA_BUILD_ARGS: explicitly specify a build-id +%cmake \ + -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-DNDEBUG -Wno-unused" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-DNDEBUG -Wno-unused" \ + \ + -DZIG_EXTRA_BUILD_ARGS:STRING="--verbose;--build-id=sha1" \ + -DZIG_SHARED_LLVM:BOOL=true \ + -DZIG_PIE:BOOL=true \ + \ + -DZIG_TARGET_MCPU:STRING=baseline \ + -DZIG_TARGET_TRIPLE:STRING=native \ + \ + -DZIG_VERSION:STRING="%(v=%{ver}; echo ${v:0:6})" + +%if %{with bootstrap} +%cmake_build --target stage3 +%else +%cmake_build --target zigcpp +zig build %{zig_build_options} + +# Zig has no official manpage +# https://github.com/ziglang/zig/issues/715 +help2man --no-discard-stderr --no-info "./zig-out/bin/zig" --version-option=version --output=zig.1 +%endif + + +%if %{with docs} +# Use the newly made stage 3 compiler to generate docs +# Zig has an extremely annoying issue with transitive failures when trying to build the docs, retry until it succeeds +max=3 +attempt=1 +while ./zig-out/bin/zig build docs \ + --verbose \ + --global-cache-dir "%{zig_cache_dir}" \ + -Dversion-string="%(v=%{ver}; echo ${v:0:6})"; [[ $? -ne 0 ]]; +do + echo "Transitive failure. Trying again." + + if [[ $attempt -eq $max ]] + then + break + fi + + sleep 1 + ((attempt++)) +done +%endif + +%install +%if %{with bootstrap} +%cmake_install +%else +DESTDIR="%{buildroot}" zig build install %{zig_install_options} + +install -Dpm644 zig.1 -t %{buildroot}%{_mandir}/man1/ +%endif + +%if %{with test} +%check +# Run reduced set of tests, based on the Zig CI +"%{buildroot}%{_bindir}/zig" test test/behavior.zig -Itest +%endif + +%files +%license LICENSE +%{_bindir}/zig +%if %{without bootstrap} +%{_mandir}/man1/zig.1.* +%endif + +%files libs +%{_prefix}/lib/zig + +%if %{with docs} +%files doc +%doc README.md +%doc zig-out/doc/langref.html +%doc zig-out/doc/std +%endif + +%changelog +* Sat May 10 2025 Gilver E. - 0.15.0~dev.482+2c241b263-2 +- Added GCC runtime dependency to pass system information to Zig +* Fri Apr 25 2025 Gilver E. - 0.15.0~dev.384+c06fecd46-2 +- Ported Fedora Zig patches +* Wed Apr 23 2025 Gilver E. +- Initial package diff --git a/anda/langs/zig/master/0000-remove-native-lib-directories-from-rpath.patch b/anda/langs/zig/master/0000-remove-native-lib-directories-from-rpath.patch new file mode 100644 index 0000000000..1e1c1f1709 --- /dev/null +++ b/anda/langs/zig/master/0000-remove-native-lib-directories-from-rpath.patch @@ -0,0 +1,18 @@ +--- a/src/main.zig 2025-04-25 06:01:31.337458939 -0500 ++++ b/src/main.zig 2025-04-25 06:03:02.239473385 -0500 +@@ -4072,6 +4072,15 @@ + + try create_module.lib_directories.ensureUnusedCapacity(arena, paths.lib_dirs.items.len); + for (paths.lib_dirs.items) |path| addLibDirectoryWarn2(&create_module.lib_directories, path, true); ++ ++ for (paths.lib_dirs.items) |native_lib_dir| { ++ for (0.., create_module.rpath_list.items) |i, rpath_dir| { ++ if (std.mem.eql(u8, native_lib_dir, rpath_dir)) { ++ _ = create_module.rpath_list.orderedRemove(i); ++ break; ++ } ++ } ++ } + } + + if (create_module.libc_paths_file) |paths_file| { diff --git a/anda/langs/zig/master/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch b/anda/langs/zig/master/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch new file mode 100644 index 0000000000..d4dd5bb4eb --- /dev/null +++ b/anda/langs/zig/master/0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch @@ -0,0 +1,43 @@ +From 1796a91063dc5ed71418f164bb7d98ca65c33d4a Mon Sep 17 00:00:00 2001 +From: Jan200101 +Date: Mon, 16 Jun 2025 20:46:25 +0200 +Subject: [PATCH] link.Elf: add root directory of libraries to linker path + +All the given dynamic shared objects will be linked with an absolute +path however they may link to other dynamic shared objects which won't +have an absolute path, for this we need to add the library path so that +lld can resolve it. + +Signed-off-by: Jan200101 +--- + src/link/Lld.zig | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/link/Lld.zig b/src/link/Lld.zig +index 4ea809428e..b8421dd60a 100644 +--- a/src/link/Lld.zig ++++ b/src/link/Lld.zig +@@ -1109,9 +1109,19 @@ fn elfLink(lld: *Lld, arena: Allocator) !void { + // Positional arguments to the linker such as object files. + var whole_archive = false; + ++ var lib_directories = std.StringArrayHashMap(void).init(gpa); ++ defer lib_directories.deinit(); ++ + for (base.comp.link_inputs) |link_input| switch (link_input) { + .res => unreachable, // Windows-only +- .dso => continue, ++ .dso => |dso| { ++ if (dso.path.root_dir.path) |root_dir| { ++ const lib_dir = try lib_directories.getOrPut(root_dir); ++ if (lib_dir.found_existing) continue; ++ try argv.append("-L"); ++ try argv.append(root_dir); ++ } ++ }, + .object, .archive => |obj| { + if (obj.must_link and !whole_archive) { + try argv.append("-whole-archive"); +-- +2.49.0 + diff --git a/anda/langs/zig/master/anda.hcl b/anda/langs/zig/master/anda.hcl new file mode 100644 index 0000000000..5daedf31a8 --- /dev/null +++ b/anda/langs/zig/master/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "zig-master.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/langs/zig/master/update.rhai b/anda/langs/zig/master/update.rhai new file mode 100644 index 0000000000..1ddb84e899 --- /dev/null +++ b/anda/langs/zig/master/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("zig-master-bootstrap", labels.branch)); diff --git a/anda/langs/zig/master/zig-master.spec b/anda/langs/zig/master/zig-master.spec new file mode 100644 index 0000000000..7aad2f01eb --- /dev/null +++ b/anda/langs/zig/master/zig-master.spec @@ -0,0 +1,220 @@ +# https://ziglang.org/download/VERSION/release-notes.html#Support-Table +%global zig_arches x86_64 aarch64 riscv64 %{mips64} +# Signing key from https://ziglang.org/download/ +%global public_key RWSGOq2NVecA2UPNdBUZykf1CCb147pkmdtYxgb3Ti+JO/wCYvhbAb/U +# Not needed yet +%if 0%{?fedora} >= 42 || 0%{?rhel} >= 9 +%define llvm_compat 20 +%endif +%global llvm_version 20.0.0 +%bcond bootstrap 0 +%bcond docs %{without bootstrap} +%bcond test 1 +%global zig_cache_dir %{builddir}/zig-cache +%global zig_mirrors ("https://pkg.machengine.org/zig" "https://zigmirror.hryx.net/zig" "https://zig.linus.dev/zig" "https://zig.squirl.dev" "https://zig.florent.dev") +%global mirror_url %(mirrors=%{zig_mirrors}; index=$(( RANDOM % ${#mirrors[@]} )); echo ${mirrors[$index]}) + +Name: zig-master +Version: 0.16.0~dev.9+8248597a2 +Release: 1%?dist +Summary: Master builds of the Zig language +License: MIT AND NCSA AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later AND GPL-2.0-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND Inner-Net-2.0 AND ISC AND LicenseRef-Fedora-Public-Domain AND GFDL-1.1-or-later AND ZPL-2.1 +URL: https://ziglang.org +Source0: %{mirror_url}/zig-%{version_no_tilde}.tar.xz +Source1: %{mirror_url}/zig-%{version_no_tilde}.tar.xz.minisig +Patch0: 0000-remove-native-lib-directories-from-rpath.patch +Patch3: 0005-link.Elf-add-root-directory-of-libraries-to-linker-p.patch +BuildRequires: cmake +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: libxml2-devel +BuildRequires: llvm-devel +BuildRequires: clang-devel +BuildRequires: lld-devel +BuildRequires: zlib-devel +# for man page generation +BuildRequires: help2man +# for signature verification +BuildRequires: minisign +%if %{without bootstrap} +BuildRequires: %{name}-bootstrap = %{version} +%endif +%if %{with test} +BuildRequires: elfutils-libelf-devel +BuildRequires: libstdc++-static +%endif +# For the version_no_tilde macro +BuildRequires: rust-srpm-macros +Requires: %{name}-libs = %{version} +# Apache-2.0 WITH LLVM-exception OR NCSA OR MIT +Provides: bundled(compiler-rt) = %{llvm_version} +# LGPL-2.1-or-later AND SunPro AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND BSD-3-Clause AND GPL-2.0-or-later AND LGPL-2.1-or-later WITH GNU-compiler-exception AND GPL-2.0-only AND ISC AND LicenseRef-Fedora-Public-Domain AND HPND AND CMU-Mach AND LGPL-2.0-or-later AND Unicode-3.0 AND GFDL-1.1-or-later AND GPL-1.0-or-later AND FSFUL AND MIT AND Inner-Net-2.0 AND X11 AND GPL-2.0-or-later WITH GCC-exception-2.0 AND GFDL-1.3-only AND GFDL-1.1-only +Provides: bundled(glibc) = 2.41 +# Apache-2.0 WITH LLVM-exception OR MIT OR NCSA +Provides: bundled(libcxx) = %{llvm_version} +# Apache-2.0 WITH LLVM-exception OR MIT OR NCSA +Provides: bundled(libcxxabi) = %{llvm_version} +# NCSA +Provides: bundled(libunwind) = %{llvm_version} +# BSD, LGPG, ZPL +Provides: bundled(mingw) = 3839e21b08807479a31d5a9764666f82ae2f0356 +# MIT +Provides: bundled(musl) = 1.2.5 +# Apache-2.0 WITH LLVM-exception AND Apache-2.0 AND MIT AND BSD-2-Clause +Provides: bundled(wasi-libc) = d03829489904d38c624f6de9983190f1e5e7c9c5 +Conflicts: zig +ExclusiveArch: %{zig_arches} +Packager: Gilver E. + +# Must be defined AFTER the version is +%global zig_build_options %{shrink: \ + --verbose \ + --release=fast \ + --summary all \ + \ + -Dtarget=native \ + -Dcpu=baseline \ + --zig-lib-dir lib \ + --build-id=sha1 \ + \ + --cache-dir "%{zig_cache_dir}" \ + --global-cache-dir "%{zig_cache_dir}" \ + \ + -Dversion-string="%(v=%{version_no_tilde}; echo ${v:0:6})" \ + -Dstatic-llvm=false \ + -Denable-llvm=true \ + -Dno-langref=true \ + -Dstd-docs=false \ + -Dpie \ + -Dconfig_h="%{__cmake_builddir}/config.h" \ +} +%global zig_install_options %zig_build_options %{shrink: \ + --prefix "%{_prefix}" \ +} + +%description +Zig is an open source alternative to C. +This package provides the master/"prerelease" builds of the Zig compiler and the associated runtime. +Please note these are not stable releases and should only be used for Zig projects that use these or Git versions of Zig. + +# The Zig stdlib only contains uncompiled code +%package libs +Summary: Zig Standard Library +Conflicts: zig-libs +BuildArch: noarch + +%description libs +Zig Standard Library + +%if %{with docs} +%package doc +Summary: Documentation for Zig +Conflicts: zig-doc +BuildArch: noarch +Requires: %{name} = %{version} + +%description doc +Documentation for Zig. For more information, visit %{url} +%endif + +%prep +/usr/bin/minisign -V -m %{SOURCE0} -x %{SOURCE1} -P %{public_key} +%autosetup -p1 -n zig-%{version_no_tilde} +%if %{without bootstrap} +# Ensure that the pre-build stage1 binary is not used +rm -f stage1/zig1.wasm +%endif + +%build +# zig doesn't know how to dynamically link llvm on its own so we need cmake to generate a header ahead of time +# if we provide the header we need to also build zigcpp + +# C_FLAGS: wasm2c output generates a lot of noise with -Wunused. +# EXTRA_BUILD_ARGS: explicitly specify a build-id +%cmake \ + -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO:STRING="-DNDEBUG -Wno-unused" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING="-DNDEBUG -Wno-unused" \ + \ + -DZIG_EXTRA_BUILD_ARGS:STRING="--verbose;--build-id=sha1" \ + -DZIG_SHARED_LLVM:BOOL=true \ + -DZIG_PIE:BOOL=true \ + \ + -DZIG_TARGET_MCPU:STRING=baseline \ + -DZIG_TARGET_TRIPLE:STRING=native \ + \ + -DZIG_VERSION:STRING="%(v=%{version_no_tilde}; echo ${v:0:6})" + +%if %{with bootstrap} +%cmake_build --target stage3 +%else +%cmake_build --target zigcpp +zig build %{zig_build_options} + +# Zig has no official manpage +# https://github.com/ziglang/zig/issues/715 +help2man --no-discard-stderr --no-info "./zig-out/bin/zig" --version-option=version --output=zig.1 +%endif + + +%if %{with docs} +# Use the newly made stage 3 compiler to generate docs +# Zig has an extremely annoying issue with transitive failures when trying to build the docs, retry until it succeeds +max=3 +attempt=1 +while ./zig-out/bin/zig build docs \ + --verbose \ + --global-cache-dir "%{zig_cache_dir}" \ + -Dversion-string="%(v=%{version_no_tilde}; echo ${v:0:6})"; [[ $? -ne 0 ]]; +do + echo "Transitive failure. Trying again." + + if [[ $attempt -eq $max ]] + then + break + fi + + sleep 1 + ((attempt++)) +done +%endif + +%install +%if %{with bootstrap} +%cmake_install +%else +DESTDIR="%{buildroot}" zig build install %{zig_install_options} + +install -Dpm644 zig.1 -t %{buildroot}%{_mandir}/man1/ +%endif + +%if %{with test} +%check +# Run reduced set of tests, based on the Zig CI +"%{buildroot}%{_bindir}/zig" test test/behavior.zig -Itest +%endif + +%files +%license LICENSE +%{_bindir}/zig +%if %{without bootstrap} +%{_mandir}/man1/zig.1.* +%endif + +%files libs +%{_prefix}/lib/zig + +%if %{with docs} +%files doc +%doc README.md +%doc zig-out/doc/langref.html +%doc zig-out/doc/std +%endif + +%changelog +* Sat May 10 2025 Gilver E. - 0.15.0~dev.482+2c241b263-2 +- Added GCC runtime dependency to pass system information to Zig +* Fri Apr 25 2025 Gilver E. - 0.15.0~dev.384+c06fecd46-2 +- Ported Fedora Zig patches +* Wed Apr 23 2025 Gilver E. +- Initial package diff --git a/anda/lib/apparmor/apparmor.spec b/anda/lib/apparmor/apparmor.spec index 85d4399eb7..f913501fc6 100644 --- a/anda/lib/apparmor/apparmor.spec +++ b/anda/lib/apparmor/apparmor.spec @@ -1,11 +1,12 @@ %{?python_enable_dependency_generator} %global __arch_install_post /bin/true +%global _sbindir /usr/sbin %bcond_with tests Name: apparmor -Version: 4.1.0~beta5 +Version: 5.0.0~alpha1 Release: 1%?dist Summary: AppArmor userspace components @@ -291,6 +292,7 @@ make -C utils check %{_mandir}/man5/apparmor.vim.5.gz %{_mandir}/man7/apparmor.7.gz %{_mandir}/man7/apparmor_xattrs.7.gz +%{_mandir}/man8/aa-load.8.gz %{_mandir}/man8/aa-teardown.8.gz %{_mandir}/man8/apparmor_parser.8.gz @@ -303,6 +305,7 @@ make -C utils check %config(noreplace) %{_sysconfdir}/apparmor/logprof.conf %config(noreplace) %{_sysconfdir}/apparmor/notify.conf %config(noreplace) %{_sysconfdir}/apparmor/severity.db +%{_bindir}/aa-easyprof %{_sbindir}/aa-audit %{_sbindir}/aa-autodep %{_sbindir}/aa-cleanprof @@ -318,11 +321,10 @@ make -C utils check %{_sbindir}/aa-status %{_sbindir}/aa-unconfined %{_sbindir}/apparmor_status -%{_bindir}/aa-easyprof %dir %{_datadir}/apparmor %{_datadir}/apparmor/easyprof %{_datadir}/apparmor/apparmor.vim -%{_datadir}/polkit-1/actions/com.ubuntu.pkexec.aa-notify.policy +%{_datadir}/polkit-1/actions/net.apparmor.pkexec.aa-notify.policy %{_mandir}/man5/logprof.conf.5.gz %{_mandir}/man8/aa-audit.8.gz %{_mandir}/man8/aa-autodep.8.gz diff --git a/anda/lib/args-hxx/args-hxx.spec b/anda/lib/args-hxx/args-hxx.spec index e23e40dbe5..53c28571ce 100644 --- a/anda/lib/args-hxx/args-hxx.spec +++ b/anda/lib/args-hxx/args-hxx.spec @@ -1,7 +1,7 @@ %define debug_package %nil Name: args-hxx -Version: 6.4.6 +Version: 6.4.7 Release: 1%?dist Summary: A simple header-only C++ argument parser library License: MIT diff --git a/anda/lib/astal/ags/ags.spec b/anda/lib/astal/ags/ags.spec new file mode 100644 index 0000000000..33dd2d9e69 --- /dev/null +++ b/anda/lib/astal/ags/ags.spec @@ -0,0 +1,84 @@ +# Generated by go2rpm 1.15.0 +%bcond check 0 +%bcond bootstrap 0 + +%if %{with bootstrap} +%global debug_package %{nil} +%endif + +%if %{with bootstrap} +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$ +%endif + +# https://github.com/Aylur/ags +%global goipath github.com/Aylur/ags +Version: 2.3.0 + +%gometa -f + +%global common_description %{expand: +Scaffolding CLI for Astal+TypeScript.} + +%global golicenses LICENSE +%global godocs docs README.md + +Name: ags +Release: %autorelease +Summary: Scaffolding CLI for Astal+TypeScript + +License: GPL-3.0-only +URL: %{gourl} +Source: %{gosource} +Provides: golang-github-aylur-ags = %version-%release +Packager: madonuko + +BuildRequires: anda-srpm-macros +%description %{common_description} + +%gopkg + +%prep +%goprep # -A +#autopatch -p1 +%go_prep_online + +%build +%dnl for cmd in cmd/* ; do +%dnl go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ +%dnl -ldflags "-X main.version=%{version} \ +%dnl -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ +%dnl -compressdwarf=false -linkmode=external \ +%dnl -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ +%dnl -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ +%dnl -Wl,--build-id=sha1'" \ +%dnl -o %{gobuilddir}/bin/$(basename $cmd) $cmd +%dnl done +go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${GO_BUILDTAGS-${BUILDTAGS-}}" -a -x \ + -ldflags "-X main.version=%{version} \ + -B 0x$(echo "%{name}-%{version}-%{release}-${SOURCE_DATE_EPOCH:-}" | sha1sum | cut -d ' ' -f1) \ + -compressdwarf=false -linkmode=external \ + -extldflags '-Wl,-z,relro -Wl,--as-needed -Wl,-z,pack-relative-relocs -Wl,-z,now \ + -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 \ + -Wl,--build-id=sha1'" \ + -o %{gobuilddir}/bin/ags . + +%install +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ + +%if %{without bootstrap} +%if %{with check} +%check +%gocheck +%endif +%endif + +%if %{without bootstrap} +%files +%license LICENSE +%doc docs README.md +%{_bindir}/ags +%endif + +%changelog +%autochangelog diff --git a/anda/lib/astal/ags/anda.hcl b/anda/lib/astal/ags/anda.hcl new file mode 100644 index 0000000000..036bed8deb --- /dev/null +++ b/anda/lib/astal/ags/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "ags.spec" + } +} diff --git a/anda/lib/astal/ags/update.rhai b/anda/lib/astal/ags/update.rhai new file mode 100644 index 0000000000..a520ca2506 --- /dev/null +++ b/anda/lib/astal/ags/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("Aylur/ags")); diff --git a/anda/lib/astal/astal-gtk/anda.hcl b/anda/lib/astal/astal-gtk/anda.hcl new file mode 100644 index 0000000000..3bcabbf812 --- /dev/null +++ b/anda/lib/astal/astal-gtk/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "astal-gtk.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/lib/astal/astal-gtk/astal-gtk.spec b/anda/lib/astal/astal-gtk/astal-gtk.spec new file mode 100644 index 0000000000..5b85dbdc31 --- /dev/null +++ b/anda/lib/astal/astal-gtk/astal-gtk.spec @@ -0,0 +1,107 @@ +%global commit 5d4eef6 +%global commit_date 20250812 + +Name: astal +Version: 0^%commit_date.%commit +Release: 1%?dist +Summary: Building blocks for creating custom desktop shells +License: LGPL-2.1-only +URL: https://aylur.github.io/astal +Packager: madonuko +BuildRequires: meson gobject-introspection vala valadoc cmake +BuildRequires: pkgconfig(astal-io-0.1) + +%description +The Linux Suite and Framework to Craft Desktop Shells and beautiful functional Wayland Widgets with GTK! + + +%package gtk3-libs +Summary: GTK 3 shared libraries for astal +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(gtk-layer-shell-0) +BuildRequires: pkgconfig(wayland-protocols) + +%description gtk3-libs +%summary. (GTK 3) + +This package contains shared libraries for astal-gtk3. + +%package gtk3-devel +Summary: GTK 3 development libraries for astal +Requires: %{name}-gtk3-libs%{?_isa} = %{version}-%{release} + +%description gtk3-devel +%summary. (GTK 3) + +This package contains development files and documentation for astal-gtk3. + + +%package gtk4-libs +Summary: GTK 4 shared libraries for astal +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(gtk4-layer-shell-0) + +%description gtk4-libs +%summary. (GTK 4) + +This package contains shared libraries for astal-gtk4. + +%package gtk4-devel +Summary: GTK 4 development libraries for astal +Requires: %{name}-gtk4-libs%{?_isa} = %{version}-%{release} + +%description gtk4-devel +%summary. (GTK 4) + +This package contains development files and documentation for astal-gtk4. + + +%prep +%git_clone https://github.com/Aylur/astal + +%build +my_build() { + cd lib/astal/$1 + %meson + %meson_build +} +my_build gtk3 & +my_build gtk4 & +wait + +%install +my_install() { + cd lib/astal/$1 + %meson_install +} +my_install gtk3 & +my_install gtk4 & +wait + + +%files gtk3-libs +%license LICENSE +%_libdir/libastal.so.3 +%_libdir/libastal.so.3.0.0 + +%files gtk3-devel +%_datadir/gir-1.0/Astal-3.0.gir +%_datadir/vala/vapi/astal-3.0.vapi +%_includedir/astal.h +%_libdir/girepository-1.0/Astal-3.0.typelib +%_libdir/libastal.so +%_libdir/pkgconfig/astal-3.0.pc + + +%files gtk4-libs +%license LICENSE +%_libdir/libastal-4.so.4 +%_libdir/libastal-4.so.4.0.0 + +%files gtk4-devel +%_datadir/gir-1.0/Astal-4.0.gir +%_datadir/vala/vapi/astal-4-4.0.vapi +%_includedir/astal-4.h +%_libdir/girepository-1.0/Astal-4.0.typelib +%_libdir/libastal-4.so +%_libdir/pkgconfig/astal-4-4.0.pc diff --git a/anda/lib/astal/astal-gtk/update.rhai b/anda/lib/astal/astal-gtk/update.rhai new file mode 100644 index 0000000000..add3305056 --- /dev/null +++ b/anda/lib/astal/astal-gtk/update.rhai @@ -0,0 +1,8 @@ +import "andax/bump_extras.rhai" as bump; + +let mg = bump::madoguchi_json("astal", labels.branch); +rpm.global("commit_date", `0\^(\d+)\.([[:xdigit:]]+)`.find(mg.ver, 1)); +rpm.global("commit", `0\^(\d+)\.([[:xdigit:]]+)`.find(mg.ver, 2)); +if rpm.changed() { + rpm.release(`^(\d+)\.`.find(mg.rel, 1)); +} diff --git a/anda/lib/astal/astal/anda.hcl b/anda/lib/astal/astal/anda.hcl new file mode 100644 index 0000000000..05e222653c --- /dev/null +++ b/anda/lib/astal/astal/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "astal.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/lib/astal/astal/astal.spec b/anda/lib/astal/astal/astal.spec new file mode 100644 index 0000000000..677507138a --- /dev/null +++ b/anda/lib/astal/astal/astal.spec @@ -0,0 +1,62 @@ + +%global commit 5d4eef66392b0dff99a63a4f39ff886624bd69dd +%global shortcommit %{sub %commit 1 7} +%global commit_date 20250812 + +Name: astal +Version: 0^%commit_date.%shortcommit +Release: 1%?dist +Summary: Building blocks for creating custom desktop shells +License: LGPL-2.1-only +URL: https://aylur.github.io/astal +Source0: https://github.com/Aylur/astal/archive/%commit.tar.gz +Provides: astal +Requires: %{name}-io-libs%{?_isa} = %{version}-%{release} +BuildRequires: meson gobject-introspection vala valadoc + +%description +The Linux Suite and Framework to Craft Desktop Shells and beautiful functional Wayland Widgets with GTK! + +%package io-libs +Summary: Shared libraries of libastal-io + +%description io-libs +%summary. (IO) + +This package contains shared libraries for astal-io. + +%package io-devel +Summary: Development libraries of libastal-io +Requires: %{name}-io-libs%{?_isa} = %{version}-%{release} + +%description io-devel +%summary. (IO) +This package contains development files and documentation for astal-io. + +%prep +%autosetup -n astal-%commit + +%build +cd lib/astal/io +%meson +%meson_build + +%install +cd lib/astal/io +%meson_install + +%files +%_bindir/astal + +%files io-libs +%license LICENSE +%_libdir/libastal-io.so.0 +%_libdir/libastal-io.so.0.1.0 + +%files io-devel +%_datadir/gir-1.0/AstalIO-0.1.gir +%_datadir/vala/vapi/astal-io-0.1.vapi +%_includedir/astal-io.h +%_libdir/girepository-1.0/AstalIO-0.1.typelib +%_libdir/libastal-io.so +%_libdir/pkgconfig/astal-io-0.1.pc diff --git a/anda/system/ivsc-firmware/update.rhai b/anda/lib/astal/astal/update.rhai similarity index 58% rename from anda/system/ivsc-firmware/update.rhai rename to anda/lib/astal/astal/update.rhai index 528a6c084b..c68d29af82 100644 --- a/anda/system/ivsc-firmware/update.rhai +++ b/anda/lib/astal/astal/update.rhai @@ -1,4 +1,4 @@ -rpm.global("commit", gh_commit("intel/ivsc-firmware")); +rpm.global("commit", gh_commit("Aylur/astal")); if rpm.changed() { rpm.release(); rpm.global("commit_date", date()); diff --git a/anda/lib/backtrace/libbacktrace-nightly.spec b/anda/lib/backtrace/libbacktrace-nightly.spec index 41a7db26f4..f60702c1c4 100644 --- a/anda/lib/backtrace/libbacktrace-nightly.spec +++ b/anda/lib/backtrace/libbacktrace-nightly.spec @@ -1,8 +1,8 @@ %global debug_package %nil -%global commit 0034e33946824057b48c5e686a3aefc761b37384 +%global commit 793921876c981ce49759114d7bb89bb89b2d3a2d %global shortcommit %(c=%commit; echo ${c:0:7}) -%global commit_date 20250211 +%global commit_date 20250411 %global _desc %{expand: A C library that may be linked into a C/C++ program to produce symbolic backtraces. diff --git a/anda/lib/deviceinfo/deviceinfo.spec b/anda/lib/deviceinfo/deviceinfo.spec index 0d7ad527e7..bf9aabb0ab 100644 --- a/anda/lib/deviceinfo/deviceinfo.spec +++ b/anda/lib/deviceinfo/deviceinfo.spec @@ -1,10 +1,10 @@ %global forgeurl https://gitlab.com/ubports/development/core/deviceinfo -%global commit e42f12b96d1745286f3c3c88b4a19bd7c3ead9ef +%global commit 4423aab5a9f25ac1f6baf0623c7cf7a040d254ff %forgemeta Name: deviceinfo -Version: 0.2.2 -Release: 1%{?dist} +Version: 0.2.3 +Release: 1%?dist Summary: Library to detect and configure devices License: GPLv3+ URL: https://gitlab.com/ubports/development/core/deviceinfo diff --git a/anda/lib/directxshadercompiler/DirectXShaderCompiler.spec b/anda/lib/directxshadercompiler/DirectXShaderCompiler.spec new file mode 100644 index 0000000000..98a8837bc1 --- /dev/null +++ b/anda/lib/directxshadercompiler/DirectXShaderCompiler.spec @@ -0,0 +1,152 @@ +# Disable in-source build. +%undefine __cmake_in_source_build + +# Metadata. +Name: DirectXShaderCompiler +Version: 1.8.2505.1 +Release: 5%?dist +Summary: A Direct X Shader compiler. +License: MIT +Packager: libffi + +# Project URL. +URL: https://github.com/microsoft/DirectXShaderCompiler + +# Build dependencies - tooling. +BuildRequires: gcc-c++ +BuildRequires: cmake >= 3.17.2 +BuildRequires: python3 +BuildRequires: git + +Provides: dxc = %{version}-%{release} +Requires: %{name}-libs + +# Sub-packages. + +%package devel +Summary: Development files for %{name}. +Requires: %{name}-libs +Requires: %{name}-static + +%package libs +Summary: Runtime shared libraries for %{name}. + +%package static +Summary: Static libraries for %{name}. + +# Descriptions. + +%description +The DirectX Shader Compiler project includes a compiler and related tools used +to compile High-Level Shader Language (HLSL) programs into DirectX Intermediate +Language (DXIL) representation. Applications that make use of DirectX for +graphics, games, and computation can use it to generate shader programs. + +%description devel +This package contains library and header files needed to develop new native +programs that use %{name}. + +%description libs +This package contains runtime shared libraries needed to link with native +programs that use %{name}. + +Provided files include: +* libdxcompiler.so, a .so providing a componentized compiler, assembler, +disassembler, and validator. +* and some other ones! + +%description static +Static libraries / binaries to link with applications at compile-time +for %{name}. + +# Prepare. + +%prep +%git_clone %{url} v%{version} + +# Build. +# Attribution: https://github.com/gentoo/guru/blob/master/dev-util/DirectXShaderCompiler/DirectXShaderCompiler-1.8.2407.ebuild +# Attribution: https://github.com/negativo17/DirectXShaderCompiler/blob/master/DirectXShaderCompiler.spec +%build +%cmake \ + -C ./cmake/caches/PredefinedParams.cmake \ + -DCMAKE_C_COMPILER=gcc \ + -DCMAKE_CXX_COMPILER=g++ \ + -DSPIRV_BUILD_TESTS=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DCMAKE_BUILD_TYPE=Fedora + +%cmake_build + +# Install. +# Attribution: https://github.com/negativo17/DirectXShaderCompiler/blob/master/DirectXShaderCompiler.spec +%install +mkdir %{buildroot}%{_bindir} -p +# Binaries. +install -m755 %{_vpath_builddir}/bin/dx{a,c,l,opt,r,v} \ + %{buildroot}%{_bindir}/ + +# Static libraries. +mkdir -p %{buildroot}%{_libdir} +for STATIC in libdxclib libdxcvalidator; do +install -m644 %{_vpath_builddir}/lib/$STATIC.a \ + %{buildroot}%{_libdir}/; done + +# Shared libraries. +install -m755 %{_vpath_builddir}/lib/*.so \ + %{buildroot}%{_libdir}/ + +# Headers. +mkdir -p %{buildroot}%{_includedir}/dxc +install -m644 include/dxc/*.h \ + %{buildroot}%{_includedir}/dxc/ + +# Test. +%check +%ctest + +# Files. +%files +%license LICENSE.TXT +%doc CONTRIBUTING.md README.md SECURITY.md ThirdPartyNotices.txt +%{_bindir}/dxa +%{_bindir}/dxc +%{_bindir}/dxl +%{_bindir}/dxopt +%{_bindir}/dxr +%{_bindir}/dxv + +%files libs +%{_libdir}/libdxcompiler.so +%{_libdir}/libdxil.so +%{_libdir}/libdxildll.so + +%files static +%{_libdir}/*.a + +%files devel +%{_includedir}/dxc/*.h + +# Changelog. +%changelog +* Sun Jul 20 2025 libffi - 1.8.2505.1-5 +- Removed support for building with external libraries. +- Internal changes to the build process. + +* Fri Jul 18 2025 libffi - 1.8.2505.1-4 +- Remove the `tools` and `cmake-utils` subpackages. +- Make the package provide the `dxc` package. +- Add license and some docs. +- Internal package changes. +- Bump upstream. + +* Mon May 5 2025 libffi - 1.8.2502-3 +- Provide unsupported build conditional for building with(out) + external libraries. + +* Sun May 4 2025 libffi - 1.8.2502-2 +- Refactor. +- Use subpackages. + +* Wed Apr 30 2025 libffi - 1.8.2502-1 +- Initial build. diff --git a/anda/lib/directxshadercompiler/anda.hcl b/anda/lib/directxshadercompiler/anda.hcl new file mode 100644 index 0000000000..75129ebe52 --- /dev/null +++ b/anda/lib/directxshadercompiler/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "DirectXShaderCompiler.spec" + } +} diff --git a/anda/lib/directxshadercompiler/update.rhai b/anda/lib/directxshadercompiler/update.rhai new file mode 100644 index 0000000000..ab0688829d --- /dev/null +++ b/anda/lib/directxshadercompiler/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("microsoft/DirectXShaderCompiler")); diff --git a/anda/lib/dwarfs/anda.hcl b/anda/lib/dwarfs/anda.hcl new file mode 100644 index 0000000000..7d4a28ea95 --- /dev/null +++ b/anda/lib/dwarfs/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "dwarfs.spec" + } +} diff --git a/anda/lib/dwarfs/dwarfs.spec b/anda/lib/dwarfs/dwarfs.spec new file mode 100644 index 0000000000..13c01aeaf1 --- /dev/null +++ b/anda/lib/dwarfs/dwarfs.spec @@ -0,0 +1,120 @@ +%global _description %{expand: +The Deduplicating Warp-speed Advanced Read-only File System. + +A fast high compression read-only file system for Linux and Windows.} + +Name: dwarfs +Version: 0.12.4 +Release: 1%?dist +Summary: A fast high compression read-only file system for Linux, Windows and macOS +License: GPL-3.0-or-later +URL: https://github.com/mhx/%{name} +Source0: https://github.com/mhx/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz +BuildRequires: binutils-devel +BuildRequires: bison +BuildRequires: boost-chrono +BuildRequires: boost-context +BuildRequires: boost-devel +BuildRequires: boost-filesystem +BuildRequires: boost-iostreams +BuildRequires: boost-program-options +BuildRequires: boost-regex +BuildRequires: boost-system +BuildRequires: boost-thread +BuildRequires: brotli-devel +BuildRequires: ccache +BuildRequires: clang +BuildRequires: cmake +BuildRequires: date-devel +BuildRequires: double-conversion-devel +BuildRequires: elfutils-devel +BuildRequires: file-devel +BuildRequires: flac-devel +BuildRequires: flex +BuildRequires: fmt-devel +BuildRequires: fuse3 +BuildRequires: fuse3-devel +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: git +BuildRequires: glog-devel +BuildRequires: gmock-devel +BuildRequires: google-benchmark-devel +BuildRequires: gtest-devel +BuildRequires: jemalloc-devel +BuildRequires: json-devel +BuildRequires: libacl-devel +BuildRequires: libarchive-devel +BuildRequires: libdwarf-devel +BuildRequires: libevent-devel +BuildRequires: libunwind-devel +BuildRequires: lz4-devel +BuildRequires: make +BuildRequires: ninja-build +BuildRequires: openssl-devel +BuildRequires: pkgconf +BuildRequires: range-v3-devel +BuildRequires: rubygem-ronn-ng +BuildRequires: utf8cpp-devel +BuildRequires: xxhash-devel +BuildRequires: xz-devel +Requires: bzip2-libs +Requires: gflags +Requires: libattr +Requires: libxml2 +Requires: libzstd +Requires: zlib-ng-compat +Packager: Gilver E. + +%description %_description + +%package devel +Summary: Development files for DWARFS. +Requires: %{name} + +%description devel +This package contains the development files for DWARFS. + +%prep +%autosetup + +%build +%cmake -DWITH_TESTS=ON \ +-DWITH_LIBDWARFS=ON \ +-DWITH_TOOLS=ON \ +-DWITH_FUSE_DRIVER=ON \ +-DBUILD_SHARED_LIBS=ON \ +-DWITH_MAN_OPTION=OFF \ +-DCMAKE_INSTALL_SBINDIR=%{_sbindir} \ +%cmake_build +%ctest -j + +%install +%cmake_install + +%files +%doc README.md +%doc CHANGES.md +%license LICENSE +%{_bindir}/dwarfsck +%{_bindir}/dwarfsextract +%{_bindir}/mkdwarfs +%{_sbindir}/dwarfs +%{_sbindir}/mount.dwarfs +%{_libdir}/libdwarfs_*.so.* +%{_mandir}/man1/dwarfs.1* +%{_mandir}/man1/dwarfsck.1* +%{_mandir}/man1/dwarfsextract.1* +%{_mandir}/man1/mkdwarfs.1* +%{_mandir}/man5/dwarfs-format.5* + +%files devel +%dir %{_libdir}/cmake/dwarfs +%{_libdir}/cmake/dwarfs/*.cmake +%{_libdir}/libdwarfs_*.so +%{_includedir}/dwarfs/*.h +%{_includedir}/dwarfs/*/*.h + +%changelog +* Thu Mar 20 2025 Gilver E. +- Initial package diff --git a/anda/lib/dwarfs/update.rhai b/anda/lib/dwarfs/update.rhai new file mode 100644 index 0000000000..663c6df68a --- /dev/null +++ b/anda/lib/dwarfs/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("mhx/dwarfs")); diff --git a/anda/lib/ipu6-camera-bins/anda.hcl b/anda/lib/ipu6-camera-bins/anda.hcl index 94e4030f11..fe9fc31319 100644 --- a/anda/lib/ipu6-camera-bins/anda.hcl +++ b/anda/lib/ipu6-camera-bins/anda.hcl @@ -4,6 +4,6 @@ project pkg { spec = "ipu6-camera-bins.spec" } labels { - weekly = 1 + nightly = 1 } } diff --git a/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec b/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec index 3322f90c00..1ae3f79089 100644 --- a/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec +++ b/anda/lib/ipu6-camera-bins/ipu6-camera-bins.spec @@ -1,65 +1,92 @@ %global debug_package %{nil} -%global commit 3c1cdd3e634bb4668a900d75efd4d6292b8c7d1d -%global commitdate 20240507 +%global commit 30e87664829782811a765b0ca9eea3a878a7ff29 +%global commit_date 20250627 %global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global ver 1.0.0 Name: ipu6-camera-bins -Summary: Binary libraries for Intel IPU6 -Version: %{commitdate}.%{shortcommit} +Summary: Libraries for Intel IPU6 +Version: %{ver}^%{commit_date}git.%{shortcommit} Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif License: Proprietary URL: https://github.com/intel/ipu6-camera-bins -Source0: https://github.com/intel/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz -BuildRequires: systemd-rpm-macros +Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildRequires: chrpath +BuildRequires: sed +BuildRequires: systemd-rpm-macros #Requires: gstreamer1-plugin-icamerasrc -Requires: v4l2-relayd Requires: intel-ipu6-kmod Requires: intel-vsc-firmware >= 20240513 +Requires: v4l2-relayd Obsoletes: ipu6-camera-bins-firmware < 0.0-11 -### For Akmods package -Provides: intel-ipu6-kmod-common = %{version} +# < 6.10 is falling out of third party and official support on Fedora +%if 0%{?fedora} +# Versioning scheme quirk +%if 0%{?fedora} <= 43 +Obsoletes: ivsc-firmware < 20250326.3377801-3 +%endif +Obsoletes: ivsc-firmware < 0^20250326git.3377801-3 +%endif +# Fix the stupid issue when changing versioning schemes +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Provides: %{name} = %{?epoch:%{epoch}:}%{commit_date}.%{shortcommit}-%{release} +Obsoletes: %{name} < %{?epoch:%{epoch}:}%{commit_date}.%{shortcommit}-2 +%endif ExclusiveArch: x86_64 +Packager: Gilver E. %description -Provides binaries for Intel IPU6, including libraries and firmware. - +Provides binary libraries for Intel IPU6. %package devel Summary: IPU6 development files -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Provides: %{name}-devel = %{?epoch:%{epoch}:}%{commit_date}.%{shortcommit}-%{release} +Obsoletes: %{name}-devel < %{?epoch:%{epoch}:}%{commit_date}.%{shortcommit}-2 +%endif %description devel This provides the header files for IPU6 development. %prep -%setup -q -n %{name}-%{commit} -chrpath --delete lib/*.so.* -sed -i \ - -e "s|libdir=\${exec_prefix}/lib|libdir=\${prefix}/%{_lib}|g" \ - lib/pkgconfig/*.pc +%autosetup -n %{name}-%{commit} +chrpath --delete lib/*.so.0 +chmod +x lib/*.so.0 +# The firmware is part of linux-firmware! +rm -r lib/firmware %build %install mkdir -p %{buildroot}%{_includedir}/ -mkdir -p %{buildroot}%{_libdir}/ cp -pr include/* %{buildroot}%{_includedir}/ -cp -pr lib/lib* lib/pkgconfig %{buildroot}%{_libdir}/ -chmod 755 %{buildroot}%{_libdir}/$target/*.so* - +install -Dm755 lib/*.so* -t %{buildroot}%{_libdir} +install -Dm644 lib/*.a -t %{buildroot}%{_libdir} +install -Dm644 lib/pkgconfig/* -t %{buildroot}%{_libdir}/pkgconfig +pushd %{buildroot}%{_libdir} + for i in *.so.0; do + ln -s $i `echo $i | sed -e "s|\.so\.0|\.so|"` + done + for i in pkgconfig/*.pc; do + sed -i -e "s|libdir=\${exec_prefix}/lib|libdir=%{_libdir}|g" "$i" + done +popd %files %license LICENSE -%doc README.md SECURITY.md -%{_libdir}/*.so* +%doc README.md +%doc SECURITY.md +%{_libdir}/*.so.* %files devel -%{_includedir}/* -%{_libdir}/pkgconfig/* +%{_includedir}/ipu6* +%{_libdir}/pkgconfig/*.pc %{_libdir}/*.a -%{_libdir}/*.so* - +%{_libdir}/*.so %changelog %autochangelog diff --git a/anda/lib/ipu6-camera-bins/update.rhai b/anda/lib/ipu6-camera-bins/update.rhai index df3627ccdd..81924f3613 100644 --- a/anda/lib/ipu6-camera-bins/update.rhai +++ b/anda/lib/ipu6-camera-bins/update.rhai @@ -2,4 +2,8 @@ rpm.global("commit", gh_commit("intel/ipu6-camera-bins")); if rpm.changed() { rpm.release(); rpm.global("commit_date", date()); + let v = gh("intel/ipu6-camera-bins"); + v.truncate(6); + v.crop(1); + rpm.global("ver", v); } diff --git a/anda/lib/libayatana-common/libayatana-common.spec b/anda/lib/libayatana-common/libayatana-common.spec index d323d61f4e..d649cd8f52 100644 --- a/anda/lib/libayatana-common/libayatana-common.spec +++ b/anda/lib/libayatana-common/libayatana-common.spec @@ -1,7 +1,7 @@ Name: libayatana-common Summary: Common functions for Ayatana System Indicators -Version: 0.9.10 -Release: 2%{?dist} +Version: 0.9.11 +Release: 2%?dist License: GPL-3.0 URL: https://github.com/AyatanaIndicators/libayatana-common Source0: %{url}/archive/refs/tags/%{version}.tar.gz @@ -48,12 +48,12 @@ This package contains the development header files for %{name}. %license COPYING %{_userunitdir}/ayatana-indicators.target %{_libdir}/libayatana-common.so.* -%{_libdir}/girepository-1.0/AyatanaCommon-0.0.typelib +%{_libdir}/girepository-1.0/AyatanaCommon-0.*.typelib %{_datadir}/glib-2.0/schemas/org.ayatana.common.gschema.xml %files devel %{_libdir}/libayatana-common.so -%{_datadir}/gir-1.0/AyatanaCommon-0.0.gir +%{_datadir}/gir-1.0/AyatanaCommon-0.*.gir %{_libdir}/pkgconfig/libayatana-common.pc %dir %{_includedir}/ayatana %dir %{_includedir}/ayatana/common diff --git a/anda/lib/libde265/libde265.spec b/anda/lib/libde265/libde265.spec index 08fe3fc697..f9baa6453d 100644 --- a/anda/lib/libde265/libde265.spec +++ b/anda/lib/libde265/libde265.spec @@ -1,8 +1,8 @@ Name: libde265 Summary: Open H.265 video codec implementation -Version: 1.0.15 -Release: 1%{?dist} -License: LGPLv3+ +Version: 1.0.16 +Release: 1%?dist +License: LGPL-3.0-or-later URL: https://www.libde265.org/ Source0: https://github.com/strukturag/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: autoconf @@ -50,13 +50,11 @@ autoreconf -vif %make_install find %{buildroot} -name '*.la' -delete -%{?ldconfig_scriptlets} - %files %license COPYING %doc AUTHORS %{_libdir}/%{name}.so.0 -%{_libdir}/%{name}.so.0.1.8 +%{_libdir}/%{name}.so.0.1.9 %files devel %doc README.md @@ -66,7 +64,6 @@ find %{buildroot} -name '*.la' -delete %files tools %doc README.md -%{_bindir}/acceleration_speed %{_bindir}/bjoentegaard %{_bindir}/block-rate-estim %{_bindir}/dec265 diff --git a/anda/lib/libfreeaptx/libfreeaptx.spec b/anda/lib/libfreeaptx/libfreeaptx.spec index def9829ec8..c323871278 100644 --- a/anda/lib/libfreeaptx/libfreeaptx.spec +++ b/anda/lib/libfreeaptx/libfreeaptx.spec @@ -1,10 +1,11 @@ -%global commit c176b7de9c2017d0fc1877659cea3bb6c330aafa +%global commit ad6748ac8b2ebbfae7d0c5608434f60592d61edc %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20210809 +%global commit_date 20250303 +%global ver 0.2.1 Name: libfreeaptx -Version: 0.1.1.%{commit_date}git%{shortcommit} -Release: 1%{?dist} +Version: %{ver}^%{commit_date}git.%{shortcommit} +Release: 2%?dist Summary: Free implementation of Audio Processing Technology codec (aptX) License: LGPLv2+ URL: https://github.com/iamthehorker/libfreeaptx @@ -43,10 +44,11 @@ The %{name}-tools package contains command line encoder and decoder utilities. %files %license COPYING %{_libdir}/%{name}.so.0 -%{_libdir}/%{name}.so.0.1.1 +%{_libdir}/%{name}.so.%{ver} %files devel %{_includedir}/freeaptx.h +%{_libdir}/%{name}.a %{_libdir}/%{name}.so %{_libdir}/pkgconfig/%{name}.pc diff --git a/anda/lib/libfreeaptx/update.rhai b/anda/lib/libfreeaptx/update.rhai index c99fd2cdca..3a6f9bebd5 100644 --- a/anda/lib/libfreeaptx/update.rhai +++ b/anda/lib/libfreeaptx/update.rhai @@ -2,4 +2,7 @@ rpm.global("commit", gh_commit("iamthehorker/libfreeaptx")); if rpm.changed() { rpm.release(); rpm.global("commit_date", date()); + let v = gh_tag("pali/libopenaptx")); + v.crop(1); + rpm.global("ver", v); } diff --git a/anda/lib/libhelium/libhelium.spec b/anda/lib/libhelium/libhelium.spec index c70a6be32e..6048fbdbf1 100644 --- a/anda/lib/libhelium/libhelium.spec +++ b/anda/lib/libhelium/libhelium.spec @@ -1,4 +1,4 @@ -%global ver 1.8.24 +%global ver 1.8.54 %global sanitized_ver %(echo %{ver} | sed -E 's/-/~/g') Summary: The Application Framework for tauOS apps Name: libhelium diff --git a/anda/lib/lovely-injector/anda.hcl b/anda/lib/lovely-injector/anda.hcl new file mode 100644 index 0000000000..68e56cfd6c --- /dev/null +++ b/anda/lib/lovely-injector/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + rpm { + spec = "lovely-injector.spec" + } + # arches = ["x86_64"] +} diff --git a/anda/lib/lovely-injector/lovely-injector.spec b/anda/lib/lovely-injector/lovely-injector.spec new file mode 100644 index 0000000000..a8a8a05a51 --- /dev/null +++ b/anda/lib/lovely-injector/lovely-injector.spec @@ -0,0 +1,76 @@ +# Generated by rust2rpm 27 +%bcond check 0 +%bcond rust_nightly 1 +%global debug_package %{nil} +%if %{with rust_nightly} +%define __cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' $HOME/.cargo/bin/cargo +%define __rustc $HOME/.cargo/bin/rustc +%define __rustdoc $HOME/.cargo/bin/rustdoc +%endif + +Name: lovely-injector +Version: 0.8.0 +Release: 1%?dist +Summary: A runtime lua injector for games built with LÖVE + +License: MIT +# LICENSE.dependencies contains a full license breakdown + +URL: https://github.com/ethangreen-dev/lovely-injector +Requires: love +BuildRequires: cmake +BuildRequires: gcc-c++ +Packager: Cappy Ishihara + +BuildRequires: mold anda-srpm-macros cargo-rpm-macros >= 24 +%if %{with rust_nightly} +BuildRequires: rustup +%endif + +%global _description %{expand: +%{summary}.} + +%description %{_description} + +%prep +rm -rf * +%git_clone %{url} v%{version} + +%if %{with rust_nightly} +rustup-init -y +. "$HOME/.cargo/env" +rustup toolchain install nightly +rustup override set nightly +%endif +%cargo_prep_online + + +%build +%{cargo_license_online} > LICENSE.dependencies +pushd crates/lovely-unix +%cargo_build +popd + +%install +# install library +install -Dm 644 target/rpm/liblovely.so %{buildroot}%{_libdir}/liblovely.so + +%if %{with check} +%check +pushd crates/lovely-unix +%cargo_test +popd +%endif + +%files +%license LICENSE.md +# Only include dobby-sys license for versions >= 0.8 +# Manually uncomment the next line when updating to 0.8 or later +%license crates/dobby-sys/LICENSE +%license LICENSE.dependencies +%{_libdir}/liblovely.so +%doc README.md + +%changelog +* Mon May 26 2025 Cappy Ishihara - 0.7.1-1 +- Initial package diff --git a/anda/lib/lovely-injector/update.rhai b/anda/lib/lovely-injector/update.rhai new file mode 100644 index 0000000000..c5ffa15a57 --- /dev/null +++ b/anda/lib/lovely-injector/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("ethangreen-dev/lovely-injector")); diff --git a/anda/lib/lsp-dsp/liblsp-dsp.spec b/anda/lib/lsp-dsp/liblsp-dsp.spec index 650779765c..e5010714ea 100644 --- a/anda/lib/lsp-dsp/liblsp-dsp.spec +++ b/anda/lib/lsp-dsp/liblsp-dsp.spec @@ -3,7 +3,7 @@ #define _empty_manifest_terminate_build 0 Name: liblsp-dsp -Version: 1.0.28 +Version: 1.0.30 Release: 1%?dist Summary: DSP library for signal processing License: LGPL-3.0 diff --git a/anda/lib/mesa-compat/Mesa-MLAA-License-Clarification-Email.txt b/anda/lib/mesa-compat/Mesa-MLAA-License-Clarification-Email.txt new file mode 100644 index 0000000000..30bdf2e9dd --- /dev/null +++ b/anda/lib/mesa-compat/Mesa-MLAA-License-Clarification-Email.txt @@ -0,0 +1,117 @@ + +Subject: RE: Question about Mesa MLAA license +From: Jorge Jimenez +Date: 01/08/2013 12:50 PM +To: Tom Callaway +CC: "jorge@iryoku.com" + +Yes to both questions. + +Thanks, +Jorge + +From: Tom Callaway +Sent: January 8, 2013 6:49 PM +To: Jorge Jimenez +CC: jorge@iryoku.com +Subject: Re: Question about Mesa MLAA license + +On 01/08/2013 12:39 PM, Jorge Jimenez wrote: +> Hi Tom, +> +> What we meant with that is that we made an exception for clause 2. +> Instead of clause 2, in the case of the Mesa project, you have to name +> the technique Jimenez's MLAA in the config options of Mesa. We did that +> just to allow them to solve license issues. This exception should be for +> the Mesa project, and any project using Mesa, like Fedora. +> +> We want to widespread usage of our MLAA, so we want to avoid any kind of +> license complications. Hope current one is good for Fedora, if not +> please tell, and we'll see what we can do! + +Okay, a few more questions: + +* If Fedora decides to simply reproduce the quoted statement: +"Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, +Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." + +Specifically, if this is done as part of documentation included with +Mesa, is that sufficient to meet clause 2 even if the Mesa config option +is not set as described in your exception? + +* Currently, the Mesa config option for MLAA says: "Morphological +anti-aliasing based on Jimenez\' MLAA. 0 to disable, 8 for default +quality". Is this in compliance with your exception? + +Thanks again, + +~tom + +== +Fedora Project + +Subject: RE: Question about Mesa MLAA license +From: Jorge Jimenez +Date: 01/08/2013 12:39 PM +To: "jorge@iryoku.com" , Tom Callaway + +Hi Tom, + +What we meant with that is that we made an exception for clause 2. +Instead of clause 2, in the case of the Mesa project, you have to name +the technique Jimenez's MLAA in the config options of Mesa. We did that +just to allow them to solve license issues. This exception should be for +the Mesa project, and any project using Mesa, like Fedora. + +We want to widespread usage of our MLAA, so we want to avoid any kind of +license complications. Hope current one is good for Fedora, if not +please tell, and we'll see what we can do! + +Cheers, +Jorge + +From: Tom Callaway +Sent: January 8, 2013 6:30 PM +To: jorge@iryoku.com +Subject: Question about Mesa MLAA license + +Jorge, + +Thanks for all of your fantastic graphics work! I have been auditing +Fedora (a popular distribution of Linux) for license compliance and I +came across your MLAA code in Mesa. + +The license says: + + * 2. Redistributions in binary form must reproduce the following +statement: + * + * "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia, + * Jose I. Echevarria, Fernando Navarro and Diego Gutierrez." + * + * Only for use in the Mesa project, this point 2 is filled by naming the + * technique Jimenez's MLAA in the Mesa config options. + +That wording is unclear. When you say "Only for use in the Mesa +project...", it seems like you could either be saying: + +- This code may only be used as part of Mesa. + +OR + +- In Mesa, you can comply with clause 2 by simply selecting "Jimenez's +MLAA" in the Mesa config options. + +***** + +If the first item is true, then we may have to remove the MLAA code from +Fedora's copy of Mesa. However, looking at the license on your SMAA +code, I do not believe it to be the case. Please let me know either way! + +Thanks in advance, + +Tom Callaway +Fedora Legal + +== +Fedora Project diff --git a/anda/lib/mesa-compat/anda.hcl b/anda/lib/mesa-compat/anda.hcl new file mode 100644 index 0000000000..f76205cd99 --- /dev/null +++ b/anda/lib/mesa-compat/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64", "aarch64", "i386"] + rpm { + spec = "mesa-compat.spec" + } + labels { + mock = 1 + subrepo = "mesa" + } +} diff --git a/anda/lib/mesa-compat/bazzite.patch b/anda/lib/mesa-compat/bazzite.patch new file mode 100644 index 0000000000..523c8c213f --- /dev/null +++ b/anda/lib/mesa-compat/bazzite.patch @@ -0,0 +1,329 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sat, 15 Mar 2025 16:39:08 +0100 +Subject: [BEGIN] SteamOS Changes + +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Bas Nieuwenhuizen +Date: Fri, 14 Jan 2022 15:58:45 +0100 +Subject: STEAMOS: radv: min image count override for FH5 + +Otherwise in combination with the vblank time reservation in +gamescope the game could get stuck in low power states. +--- + src/util/00-radv-defaults.conf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf +index 72f3438b39d..02d7ada7ad9 100644 +--- a/src/util/00-radv-defaults.conf ++++ b/src/util/00-radv-defaults.conf +@@ -221,5 +221,9 @@ Application bugs worked around in this file: + + ++ ++ ++ + + +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Pitoiset +Date: Thu, 22 Feb 2024 22:32:45 +0100 +Subject: STEAMOS: Dynamic swapchain override for gamescope limiter for DRI3 + only + +The original patch (from Bas) contained WSI VK support too but it's +been removed because the Gamescope WSI layer already handles that. + +Signed-off-by: Samuel Pitoiset +--- + .../frontends/dri/loader_dri3_helper.c | 42 ++++++++++++++++++- + .../frontends/dri/loader_dri3_helper.h | 1 + + 2 files changed, 41 insertions(+), 2 deletions(-) + +diff --git a/src/gallium/frontends/dri/loader_dri3_helper.c b/src/gallium/frontends/dri/loader_dri3_helper.c +index 9e4ca3f5707..7863623f8de 100644 +--- a/src/gallium/frontends/dri/loader_dri3_helper.c ++++ b/src/gallium/frontends/dri/loader_dri3_helper.c +@@ -297,6 +297,30 @@ dri3_update_max_num_back(struct loader_dri3_drawable *draw) + } + } + ++static unsigned ++gamescope_swapchain_override() ++{ ++ const char *path = getenv("GAMESCOPE_LIMITER_FILE"); ++ if (!path) ++ return 0; ++ ++ static simple_mtx_t mtx = SIMPLE_MTX_INITIALIZER; ++ static int fd = -1; ++ ++ simple_mtx_lock(&mtx); ++ if (fd < 0) { ++ fd = open(path, O_RDONLY); ++ } ++ simple_mtx_unlock(&mtx); ++ ++ if (fd < 0) ++ return 0; ++ ++ uint32_t override_value = 0; ++ pread(fd, &override_value, sizeof(override_value), 0); ++ return override_value; ++} ++ + void + loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval) + { +@@ -311,10 +335,12 @@ loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval) + * PS. changing from value A to B and A < B won't cause swap out of order but + * may still gets wrong target_msc value at the beginning. + */ +- if (draw->swap_interval != interval) ++ if (draw->orig_swap_interval != interval) + loader_dri3_swapbuffer_barrier(draw); + +- draw->swap_interval = interval; ++ draw->orig_swap_interval = interval; ++ if (gamescope_swapchain_override() != 1) ++ draw->swap_interval = interval; + } + + static void +@@ -443,6 +469,12 @@ loader_dri3_drawable_init(xcb_connection_t *conn, + + draw->swap_interval = dri_get_initial_swap_interval(draw->dri_screen_render_gpu); + ++ draw->orig_swap_interval = draw->swap_interval; ++ ++ unsigned gamescope_override = gamescope_swapchain_override(); ++ if (gamescope_override == 1) ++ draw->swap_interval = 1; ++ + dri3_update_max_num_back(draw); + + /* Create a new drawable */ +@@ -1087,6 +1119,12 @@ loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw, + if (draw->type == LOADER_DRI3_DRAWABLE_WINDOW) { + dri3_fence_reset(draw->conn, back); + ++ unsigned gamescope_override = gamescope_swapchain_override(); ++ if (gamescope_override == 1) ++ draw->swap_interval = 1; ++ else ++ draw->swap_interval = draw->orig_swap_interval; ++ + /* Compute when we want the frame shown by taking the last known + * successful MSC and adding in a swap interval for each outstanding swap + * request. target_msc=divisor=remainder=0 means "Use glXSwapBuffers() +diff --git a/src/gallium/frontends/dri/loader_dri3_helper.h b/src/gallium/frontends/dri/loader_dri3_helper.h +index 9061e9755e2..6cc64be298a 100644 +--- a/src/gallium/frontends/dri/loader_dri3_helper.h ++++ b/src/gallium/frontends/dri/loader_dri3_helper.h +@@ -170,6 +170,7 @@ struct loader_dri3_drawable { + bool block_on_depleted_buffers; + bool queries_buffer_age; + int swap_interval; ++ int orig_swap_interval; + + const struct loader_dri3_vtable *vtable; + +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Samuel Pitoiset +Date: Mon, 24 Feb 2025 17:48:21 +0100 +Subject: radv: stop computing the UUID using the physical device cache key + +Otherwise, the UUID changes for games that have shader-based drirc +workarounds and this breaks precompiled shaders on SteamDeck. + +Instead, use this pdev cache key to compute the logical device hash +which is common to all pipelines. + +Signed-off-by: Samuel Pitoiset +--- + src/amd/vulkan/radv_device.c | 6 +++++- + src/amd/vulkan/radv_physical_device.c | 1 - + 2 files changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c +index 2de839e5d6d..da732ae503e 100644 +--- a/src/amd/vulkan/radv_device.c ++++ b/src/amd/vulkan/radv_device.c +@@ -858,6 +858,7 @@ radv_device_init_cache_key(struct radv_device *device) + const struct radv_physical_device *pdev = radv_device_physical(device); + const struct radv_instance *instance = radv_physical_device_instance(pdev); + struct radv_device_cache_key *key = &device->cache_key; ++ struct mesa_blake3 ctx; + + key->keep_shader_info = device->keep_shader_info; + key->trap_excp_flags = device->trap_handler_shader && instance->trap_excp_flags; +@@ -879,7 +880,10 @@ radv_device_init_cache_key(struct radv_device *device) + key->primitives_generated_query = true; + } + +- _mesa_blake3_compute(key, sizeof(*key), device->cache_hash); ++ _mesa_blake3_init(&ctx); ++ _mesa_blake3_update(&ctx, &pdev->cache_key, sizeof(pdev->cache_key)); ++ _mesa_blake3_update(&ctx, &device->cache_key, sizeof(device->cache_key)); ++ _mesa_blake3_final(&ctx, device->cache_hash); + } + + static void +diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c +index 0d3660e7064..826c23a6c46 100644 +--- a/src/amd/vulkan/radv_physical_device.c ++++ b/src/amd/vulkan/radv_physical_device.c +@@ -206,7 +206,6 @@ radv_device_get_cache_uuid(struct radv_physical_device *pdev, void *uuid) + return -1; + #endif + +- _mesa_sha1_update(&ctx, &pdev->cache_key, sizeof(pdev->cache_key)); + _mesa_sha1_final(&ctx, sha1); + + memcpy(uuid, sha1, VK_UUID_SIZE); +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sat, 15 Mar 2025 16:39:25 +0100 +Subject: [BEGIN] SteamOS Backports + +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Natalie Vock +Date: Fri, 28 Feb 2025 14:21:57 +0100 +Subject: radv/rt: Limit monolithic pipelines to 50 stages + +Beyond that, monolithic pipelines just bloat to incredible sizes, +destroying compile times for questionable, if any, runtime perf benefit. + +Indiana Jones: The Great Circle has more than 100 stages and takes +several minutes to compile its RT pipeline on Deck when using monolithic +compilation, and yet separate shaders still end up faster (probably +because instruction cache coherency in traversal is better). + +Part-of: +--- + src/amd/vulkan/radv_pipeline_rt.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/amd/vulkan/radv_pipeline_rt.c b/src/amd/vulkan/radv_pipeline_rt.c +index 5a23dc99cc4..1421688d580 100644 +--- a/src/amd/vulkan/radv_pipeline_rt.c ++++ b/src/amd/vulkan/radv_pipeline_rt.c +@@ -600,7 +600,11 @@ radv_rt_compile_shaders(struct radv_device *device, struct vk_pipeline_cache *ca + + bool library = pipeline->base.base.create_flags & VK_PIPELINE_CREATE_2_LIBRARY_BIT_KHR; + +- bool monolithic = !library; ++ /* Beyond 50 shader stages, inlining everything bloats the shader a ton, increasing compile times and ++ * potentially even reducing runtime performance because of instruction cache coherency issues in the ++ * traversal loop. ++ */ ++ bool monolithic = !library && pipeline->stage_count < 50; + for (uint32_t i = 0; i < pCreateInfo->stageCount; i++) { + if (rt_stages[i].shader || rt_stages[i].nir) + continue; +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sat, 15 Mar 2025 16:39:33 +0100 +Subject: [BEGIN] Our Mesa backports + +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Maarten Lankhorst +Date: Mon, 17 Feb 2025 14:55:29 -0800 +Subject: anv: Mark images with format modifiers set as scanout. + +We currently use the presence of struct WSI_IMAGE_CREATE_INFO_MESA.scanout to mark the BO as scanout, +but this only handles the linear case, and fails when drm format modifiers are used. + +Also handle the case of exportable BO with tiling set to VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. +This fixes the gamescope handling of using vulkan allocated images for scanout. + +Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12633 +Signed-off-by: Maarten Lankhorst +Signed-off-by: Matthew Schwartz + +Normalspeak: fixes battlemage iGPUs in gamescope +--- + src/intel/vulkan/anv_device.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c +index 1884932bbc7..cbc1b4aad87 100644 +--- a/src/intel/vulkan/anv_device.c ++++ b/src/intel/vulkan/anv_device.c +@@ -1533,6 +1533,9 @@ VkResult anv_AllocateMemory( + dedicated_info->image != VK_NULL_HANDLE) { + ANV_FROM_HANDLE(anv_image, image, dedicated_info->image); + ++ if (image->vk.tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) ++ alloc_flags |= ANV_BO_ALLOC_SCANOUT; ++ + /* Apply implicit sync to be compatible with clients relying on + * implicit fencing. This matches the behavior in iris i915_batch + * submit. An example client is VA-API (iHD), so only dedicated +-- +2.49.0 + + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Mon, 24 Mar 2025 19:50:51 +0100 +Subject: Revert "winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM and GTT + allocations" + +This reverts commit 8c91624614c1f939974fe0d2d1a3baf83335cecb. + +Messes with AutoVRAM, who would have thought? +--- + src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +index 24ba28827f8..46461f8ee59 100644 +--- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c ++++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +@@ -618,11 +618,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *aws, + if (flags & RADEON_FLAG_GTT_WC) + request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC; + +- if (aws->info.has_local_buffers && +- initial_domain & (RADEON_DOMAIN_VRAM_GTT | RADEON_DOMAIN_DOORBELL) && +- flags & RADEON_FLAG_NO_INTERPROCESS_SHARING) +- request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID; +- + if (flags & RADEON_FLAG_DISCARDABLE && + aws->info.drm_minor >= 47) + request.flags |= AMDGPU_GEM_CREATE_DISCARDABLE; +-- +2.49.0 + diff --git a/anda/lib/mesa-compat/mesa-compat.spec b/anda/lib/mesa-compat/mesa-compat.spec new file mode 100644 index 0000000000..eb20fbcd17 --- /dev/null +++ b/anda/lib/mesa-compat/mesa-compat.spec @@ -0,0 +1,126 @@ +# Credit to LionHeartP from Nobara for most of the spec and letting me know about the need for this package <3 +%global origname mesa +%global ver 25.0.4 + +Name: %{origname}-compat +Summary: Mesa graphics libraries - legacy compatibility libraries +Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} +Release: 1%{?dist} +Epoch: 1 +License: MIT AND BSD-3-Clause AND SGI-B-2.0 +URL: http://www.mesa3d.org + +Source0: https://archive.mesa3d.org/mesa-%{ver}.tar.xz +# src/gallium/auxiliary/postprocess/pp_mlaa* have an ... interestingly worded license. +# Source1 contains email correspondence clarifying the license terms. +# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD. +Source1: Mesa-MLAA-License-Clarification-Email.txt +# Keep Mesa builds relatively the same +Patch0: bazzite.patch + +BuildRequires: meson >= 1.3.0 +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: gettext +%if 0%{?with_hardware} +BuildRequires: kernel-headers +%endif +BuildRequires: pkgconfig(expat) +BuildRequires: pkgconfig(zlib) >= 1.2.3 +BuildRequires: pkgconfig(libzstd) +BuildRequires: bison +BuildRequires: flex +BuildRequires: pkgconfig(libelf) +BuildRequires: llvm-devel >= 7.0.0 +BuildRequires: libdrm-devel +BuildRequires: python3-devel +BuildRequires: python3-mako +BuildRequires: python3-pycparser +BuildRequires: python3-pyyaml + +%description +%{summary}. + +%package libOSMesa +Summary: Mesa offscreen rendering libraries +Provides: libOSMesa +Provides: libOSMesa%{?_isa} +# New things should not rely on this as this library is dead upstream +Provides: deprecated() + +%description libOSMesa +%{summary}. + +%package libOSMesa-devel +Summary: Mesa offscreen rendering development package +Requires: %{name}-libOSMesa%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +# New things should not rely on this as this library is dead upstream +Provides: deprecated() + +%description libOSMesa-devel +%{summary}. + +%prep +%autosetup -n %{origname}-%{ver} -p1 +cp %{SOURCE1} docs/ + +%build +# We've gotten a report that enabling LTO for mesa breaks some games. See +# https://bugzilla.redhat.com/show_bug.cgi?id=1862771 for details. +# Disable LTO for now +%define _lto_cflags %{nil} + +%meson \ + -Dplatforms= \ + -Dosmesa=true \ + -Dgallium-drivers=llvmpipe \ + -Dgallium-vdpau=disabled \ + -Dgallium-va=disabled \ + -Dgallium-xa=disabled \ + -Dgallium-nine=false \ + -Dgallium-opencl=disabled \ + -Dgallium-rusticl=false \ + -Dvulkan-drivers= \ + -Dshared-glapi=enabled \ + -Dgles1=disabled \ + -Dgles2=disabled \ + -Dopengl=true \ + -Dgbm=disabled \ + -Dglvnd=disabled \ + -Dglx=disabled \ + -Degl=disabled \ + -Dllvm=enabled \ + -Dshared-llvm=enabled \ + -Dvalgrind=disabled \ + -Dbuild-tests=false \ + -Dmesa-clc=auto \ + -Dmicrosoft-clc=disabled \ + -Dxlib-lease=disabled \ + -Dandroid-libbacktrace=disabled \ + -Dlibunwind=disabled \ + -Dlmsensors=disabled \ +%ifarch %{ix86} + -Dglx-read-only-text=true \ +%endif + %{nil} +%meson_build + +%install +%meson_install + +# trim some garbage, the mesa base package handles these +rm -rf %{buildroot}%{_datadir}/drirc.d +rm -rf %{buildroot}%{_includedir}/GL/gl*.h +rm -rf %{buildroot}%{_includedir}/KHR + +%files libOSMesa +%{_libdir}/libOSMesa.so.8* +%files libOSMesa-devel +%dir %{_includedir}/GL +%{_includedir}/GL/osmesa.h +%{_libdir}/libOSMesa.so +%{_libdir}/pkgconfig/osmesa.pc + +%changelog +* Thu Apr 24 2025 Neal Gompa - 25.0.4-1 +- Initial split from mesa for compat libraries (rhbz#2362203) diff --git a/anda/lib/mesa/12633.patch b/anda/lib/mesa/12633.patch deleted file mode 100644 index 527e3b6e3d..0000000000 --- a/anda/lib/mesa/12633.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit d0279e717ee740746f0770c5a9870d752108e756 (HEAD -> makepkg) -Author: Maarten Lankhorst -Date: Mon Feb 17 14:55:29 2025 -0800 - - HACK: drm/xe gamescope fix - - Workaround gamescope DRM issues on Xe by allocating ANV_BO_ALLOC_SCANOUT - when using VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT - - Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/4292#note_2784316 - Signed-off-by: Matthew Schwartz - -diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c -index 1884932bbc7..cbc1b4aad87 100644 ---- a/src/intel/vulkan/anv_device.c -+++ b/src/intel/vulkan/anv_device.c -@@ -1533,6 +1533,9 @@ VkResult anv_AllocateMemory( - dedicated_info->image != VK_NULL_HANDLE) { - ANV_FROM_HANDLE(anv_image, image, dedicated_info->image); - -+ if (image->vk.tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) -+ alloc_flags |= ANV_BO_ALLOC_SCANOUT; -+ - /* Apply implicit sync to be compatible with clients relying on - * implicit fencing. This matches the behavior in iris i915_batch - * submit. An example client is VA-API (iHD), so only dedicated diff --git a/anda/lib/mesa/bazzite.patch b/anda/lib/mesa/bazzite.patch new file mode 100644 index 0000000000..e05c18db0c --- /dev/null +++ b/anda/lib/mesa/bazzite.patch @@ -0,0 +1,2751 @@ +From 21b062a757a202dcb737d40442b6145c34bb1e48 Mon Sep 17 00:00:00 2001 +From: Bas Nieuwenhuizen +Date: Fri, 14 Jan 2022 15:58:45 +0100 +Subject: [PATCH 01/11] STEAMOS: radv: min image count override for FH5 + +Otherwise in combination with the vblank time reservation in +gamescope the game could get stuck in low power states. +--- + src/util/00-radv-defaults.conf | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/util/00-radv-defaults.conf b/src/util/00-radv-defaults.conf +index b82e8d4da4d..c8d059571ad 100644 +--- a/src/util/00-radv-defaults.conf ++++ b/src/util/00-radv-defaults.conf +@@ -234,5 +234,9 @@ Application bugs worked around in this file: + + ++ ++ ++ + + +-- +2.50.1 + + +From e837814b4f33e48eaf6a79975cb738da39ed0fd2 Mon Sep 17 00:00:00 2001 +From: Samuel Pitoiset +Date: Thu, 22 Feb 2024 22:32:45 +0100 +Subject: [PATCH 02/11] STEAMOS: Dynamic swapchain override for gamescope + limiter for DRI3 only + +The original patch (from Bas) contained WSI VK support too but it's +been removed because the Gamescope WSI layer already handles that. + +Signed-off-by: Samuel Pitoiset +--- + .../frontends/dri/loader_dri3_helper.c | 42 ++++++++++++++++++- + .../frontends/dri/loader_dri3_helper.h | 1 + + 2 files changed, 41 insertions(+), 2 deletions(-) + +diff --git a/src/gallium/frontends/dri/loader_dri3_helper.c b/src/gallium/frontends/dri/loader_dri3_helper.c +index a795d45ce29..435ea2405a8 100644 +--- a/src/gallium/frontends/dri/loader_dri3_helper.c ++++ b/src/gallium/frontends/dri/loader_dri3_helper.c +@@ -297,6 +297,30 @@ dri3_update_max_num_back(struct loader_dri3_drawable *draw) + } + } + ++static unsigned ++gamescope_swapchain_override() ++{ ++ const char *path = getenv("GAMESCOPE_LIMITER_FILE"); ++ if (!path) ++ return 0; ++ ++ static simple_mtx_t mtx = SIMPLE_MTX_INITIALIZER; ++ static int fd = -1; ++ ++ simple_mtx_lock(&mtx); ++ if (fd < 0) { ++ fd = open(path, O_RDONLY); ++ } ++ simple_mtx_unlock(&mtx); ++ ++ if (fd < 0) ++ return 0; ++ ++ uint32_t override_value = 0; ++ pread(fd, &override_value, sizeof(override_value), 0); ++ return override_value; ++} ++ + void + loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval) + { +@@ -311,10 +335,12 @@ loader_dri3_set_swap_interval(struct loader_dri3_drawable *draw, int interval) + * PS. changing from value A to B and A < B won't cause swap out of order but + * may still gets wrong target_msc value at the beginning. + */ +- if (draw->swap_interval != interval) ++ if (draw->orig_swap_interval != interval) + loader_dri3_swapbuffer_barrier(draw); + +- draw->swap_interval = interval; ++ draw->orig_swap_interval = interval; ++ if (gamescope_swapchain_override() != 1) ++ draw->swap_interval = interval; + } + + static void +@@ -443,6 +469,12 @@ loader_dri3_drawable_init(xcb_connection_t *conn, + + draw->swap_interval = dri_get_initial_swap_interval(draw->dri_screen_render_gpu); + ++ draw->orig_swap_interval = draw->swap_interval; ++ ++ unsigned gamescope_override = gamescope_swapchain_override(); ++ if (gamescope_override == 1) ++ draw->swap_interval = 1; ++ + dri3_update_max_num_back(draw); + + /* Create a new drawable */ +@@ -1085,6 +1117,12 @@ loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw, + if (draw->type == LOADER_DRI3_DRAWABLE_WINDOW) { + dri3_fence_reset(draw->conn, back); + ++ unsigned gamescope_override = gamescope_swapchain_override(); ++ if (gamescope_override == 1) ++ draw->swap_interval = 1; ++ else ++ draw->swap_interval = draw->orig_swap_interval; ++ + /* Compute when we want the frame shown by taking the last known + * successful MSC and adding in a swap interval for each outstanding swap + * request. target_msc=divisor=remainder=0 means "Use glXSwapBuffers() +diff --git a/src/gallium/frontends/dri/loader_dri3_helper.h b/src/gallium/frontends/dri/loader_dri3_helper.h +index 26f138d1b83..3f0f3f66fac 100644 +--- a/src/gallium/frontends/dri/loader_dri3_helper.h ++++ b/src/gallium/frontends/dri/loader_dri3_helper.h +@@ -169,6 +169,7 @@ struct loader_dri3_drawable { + bool block_on_depleted_buffers; + bool queries_buffer_age; + int swap_interval; ++ int orig_swap_interval; + + const struct loader_dri3_vtable *vtable; + +-- +2.50.1 + + +From 354cf8783e49b082c97982f2e5be305ad6e4ab50 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sat, 15 Mar 2025 16:39:25 +0100 +Subject: [PATCH 03/11] [BEGIN] SteamOS Backports + +-- +2.50.1 + + +From c5a4eab20075dfa2f2bdfb87e55ecec262ef00f6 Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Sat, 15 Mar 2025 16:39:33 +0100 +Subject: [PATCH 04/11] [BEGIN] Our Mesa backports + +-- +2.50.1 + + +From 221b11df6d9cd7b66c8502fa51d8d72cfc377e5e Mon Sep 17 00:00:00 2001 +From: Antheas Kapenekakis +Date: Mon, 24 Mar 2025 19:50:51 +0100 +Subject: [PATCH 05/11] Revert "winsys/amdgpu: use VM_ALWAYS_VALID for all VRAM + and GTT allocations" + +This reverts commit 8c91624614c1f939974fe0d2d1a3baf83335cecb. + +Messes with AutoVRAM, who would have thought? +--- + src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +index d5646e9660b..a51348b44a8 100644 +--- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c ++++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +@@ -624,11 +624,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *aws, + if (flags & RADEON_FLAG_GTT_WC) + request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC; + +- if (aws->info.has_vm_always_valid && +- initial_domain & (RADEON_DOMAIN_VRAM_GTT | RADEON_DOMAIN_DOORBELL) && +- flags & RADEON_FLAG_NO_INTERPROCESS_SHARING) +- request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID; +- + if (flags & RADEON_FLAG_DISCARDABLE && + aws->info.drm_minor >= 47) + request.flags |= AMDGPU_GEM_CREATE_DISCARDABLE; +-- +2.50.1 + + +From cf8c0d66ed49f99d0d259c28fe72174d58c06de7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= +Date: Mon, 24 Mar 2025 21:25:29 +0100 +Subject: [PATCH 06/11] vulkan: implement VK_AMD_anti_lag as implicit vulkan + layer + +VkLayer_MESA_anti_lag is a lightweight implicit layer which provides +an open-source implementation of the VK_AMD_anti_lag vulkan extension. + +The algorithm used by this layer is very simplistic and only aims to +minimize the delay between calls to vkQueueSubmit or vkQueueSubmit2 +and the begin of the execution of the submission. + +In order to build VkLayer_MESA_anti_lag, pass -Dlayers=anti-lag to meson. +It is possible to either install the layer or to use + + VK_ADD_IMPLICIT_LAYER_PATH=/share/vulkan/implicit_layer.d/ + +for testing purposes. +(Keep in mind that you have to adjust the library_path in the json file in that case.) + +Part-of: +--- + meson.build | 1 + + meson.options | 2 +- + .../anti-lag-layer/VkLayer_MESA_anti_lag.json | 26 + + src/vulkan/anti-lag-layer/anti_lag_layer.c | 590 ++++++++++++ + src/vulkan/anti-lag-layer/anti_lag_layer.h | 111 +++ + .../anti-lag-layer/anti_lag_layer_interface.c | 899 ++++++++++++++++++ + src/vulkan/anti-lag-layer/meson.build | 26 + + src/vulkan/anti-lag-layer/ringbuffer.h | 58 ++ + src/vulkan/meson.build | 3 + + 9 files changed, 1715 insertions(+), 1 deletion(-) + create mode 100644 src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json + create mode 100644 src/vulkan/anti-lag-layer/anti_lag_layer.c + create mode 100644 src/vulkan/anti-lag-layer/anti_lag_layer.h + create mode 100644 src/vulkan/anti-lag-layer/anti_lag_layer_interface.c + create mode 100644 src/vulkan/anti-lag-layer/meson.build + create mode 100644 src/vulkan/anti-lag-layer/ringbuffer.h + +diff --git a/meson.build b/meson.build +index 427cfde435c..c6c6457abae 100644 +--- a/meson.build ++++ b/meson.build +@@ -95,6 +95,7 @@ with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay') + with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select') + with_vulkan_screenshot_layer = get_option('vulkan-layers').contains('screenshot') + with_vulkan_vram_report_limit_layer = get_option('vulkan-layers').contains('vram-report-limit') ++with_vulkan_anti_lag_layer = get_option('vulkan-layers').contains('anti-lag') + with_tools = get_option('tools') + if with_tools.contains('all') + with_tools = [ +diff --git a/meson.options b/meson.options +index c3c02c4c94f..cd0e56cc429 100644 +--- a/meson.options ++++ b/meson.options +@@ -299,7 +299,7 @@ option( + type : 'array', + value : [], + choices : [ +- 'device-select', 'intel-nullhw', 'overlay', 'screenshot', ++ 'device-select', 'intel-nullhw', 'overlay', 'screenshot', 'anti-lag', + 'vram-report-limit', + ], + description : 'List of vulkan layers to build' +diff --git a/src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json b/src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json +new file mode 100644 +index 00000000000..4e2ab794c9e +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/VkLayer_MESA_anti_lag.json +@@ -0,0 +1,26 @@ ++{ ++ "file_format_version": "1.2.1", ++ "layer": { ++ "name": "VK_LAYER_MESA_anti_lag", ++ "type": "GLOBAL", ++ "library_path": "libVkLayer_MESA_anti_lag.so", ++ "api_version": "1.4.303", ++ "implementation_version": "1", ++ "description": "Open-source implementation of the VK_AMD_anti_lag extension.", ++ "functions": { ++ "vkNegotiateLoaderLayerInterfaceVersion": "anti_lag_NegotiateLoaderLayerInterfaceVersion" ++ }, ++ "device_extensions": [ ++ { ++ "name": "VK_AMD_anti_lag", ++ "spec_version": "1", ++ "entrypoints": [ ++ "vkAntiLagUpdateAMD" ++ ] ++ } ++ ], ++ "disable_environment": { ++ "DISABLE_LAYER_MESA_ANTI_LAG": "1" ++ } ++ } ++} +\ No newline at end of file +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer.c b/src/vulkan/anti-lag-layer/anti_lag_layer.c +new file mode 100644 +index 00000000000..6c21e074024 +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer.c +@@ -0,0 +1,590 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#include "anti_lag_layer.h" ++#include ++#include "util/os_time.h" ++#include "util/simple_mtx.h" ++#include "vulkan/vulkan_core.h" ++#include "ringbuffer.h" ++#include "vk_alloc.h" ++#include "vk_util.h" ++ ++static bool ++evaluate_frame(device_context *ctx, frame *frame, bool force_wait) ++{ ++ if (frame->state != FRAME_PRESENT) { ++ /* This frame is not finished yet. */ ++ assert(!force_wait); ++ return false; ++ } ++ ++ int query_flags = VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT; ++ const uint32_t frame_idx = ringbuffer_index(ctx->frames, frame); ++ ++ /* Before we commit to completing a frame, all submits on all queues must have completed. */ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ queue_context *queue_ctx = &ctx->queues[i]; ++ ringbuffer_lock(queue_ctx->queries); ++ uint64_t expected_signal_value = queue_ctx->semaphore_value - queue_ctx->queries.size + ++ queue_ctx->submissions_per_frame[frame_idx]; ++ ringbuffer_unlock(queue_ctx->queries); ++ ++ if (force_wait) { ++ /* Wait for the timeline semaphore of the frame to be signaled. */ ++ struct VkSemaphoreWaitInfo wait_info = { ++ .sType = VK_STRUCTURE_TYPE_SEMAPHORE_WAIT_INFO, ++ .semaphoreCount = 1, ++ .pSemaphores = &queue_ctx->semaphore, ++ .pValues = &expected_signal_value, ++ }; ++ ctx->vtable.WaitSemaphores(ctx->device, &wait_info, 0); ++ } else { ++ /* Return early if the last timeline semaphore of the frame has not been signaled yet. */ ++ uint64_t signal_value; ++ ctx->vtable.GetSemaphoreCounterValue(ctx->device, queue_ctx->semaphore, &signal_value); ++ if (signal_value < expected_signal_value) ++ return false; ++ } ++ } ++ ++ /* For each queue, retrieve timestamp query results. */ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ queue_context *queue_ctx = &ctx->queues[i]; ++ ++ /* As we hold a global mtx and this is the only place where queries are free'd, ++ * we don't need to lock the query ringbuffer here in order to read the first entry. ++ */ ++ struct query *query = ringbuffer_first(queue_ctx->queries); ++ uint32_t query_idx = ringbuffer_index(queue_ctx->queries, query); ++ int num_timestamps = ++ MIN2(queue_ctx->submissions_per_frame[frame_idx], MAX_QUERIES - query_idx); ++ ++ while (num_timestamps > 0) { ++ /* Retreive timestamp results from this queue. */ ++ ctx->vtable.GetQueryPoolResults(ctx->device, queue_ctx->queryPool, query_idx, ++ num_timestamps, sizeof(uint64_t), &query->begin_gpu_ts, ++ sizeof(struct query), query_flags); ++ ++ ringbuffer_lock(queue_ctx->queries); ++ for (unsigned j = 0; j < num_timestamps; j++) { ++ ++ /* Calibrate device timestamps. */ ++ query->begin_gpu_ts = ++ ctx->calibration.delta + ++ (uint64_t)(query->begin_gpu_ts * ctx->calibration.timestamp_period); ++ if (query->begin_gpu_ts > query->submit_cpu_ts) ++ frame->min_delay = ++ MIN2(frame->min_delay, query->begin_gpu_ts - query->submit_cpu_ts); ++ ++ /* Check if we can reset half of the query pool at once. */ ++ uint32_t next_idx = ringbuffer_index(queue_ctx->queries, query) + 1; ++ const bool reset = next_idx == MAX_QUERIES || next_idx == MAX_QUERIES / 2; ++ if (reset) { ++ ringbuffer_unlock(queue_ctx->queries); ++ ctx->vtable.ResetQueryPool(ctx->device, queue_ctx->queryPool, ++ next_idx - MAX_QUERIES / 2, MAX_QUERIES / 2); ++ ringbuffer_lock(queue_ctx->queries); ++ } ++ ++ /* Free query. */ ++ ringbuffer_free(queue_ctx->queries, query); ++ queue_ctx->submissions_per_frame[frame_idx]--; ++ ++ query = ringbuffer_first(queue_ctx->queries); ++ } ++ ++ /* Ensure that the total number of queries across all frames is correct. */ ++ ASSERTED uint32_t count = 0; ++ for (unsigned i = 0; i < MAX_FRAMES; i++) ++ count += queue_ctx->submissions_per_frame[i]; ++ assert(count == queue_ctx->queries.size); ++ ++ query_idx = ringbuffer_index(queue_ctx->queries, query); ++ num_timestamps = ++ MIN2(queue_ctx->submissions_per_frame[frame_idx], MAX_QUERIES - query_idx); ++ ++ ringbuffer_unlock(queue_ctx->queries); ++ } ++ } ++ ++ frame->min_delay++; /* wrap UINT64_MAX in case we didn't have any submissions. */ ++ ++ return true; ++} ++ ++static bool ++calibrate_timestamps(device_context *ctx) ++{ ++ uint64_t ts[2]; ++ uint64_t deviation; ++ ++ VkCalibratedTimestampInfoKHR info[2] = { ++ { ++ .sType = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, ++ .timeDomain = VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR, ++ }, ++ { ++ .sType = VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_KHR, ++ .timeDomain = VK_TIME_DOMAIN_DEVICE_KHR, ++ }, ++ }; ++ ++ VkResult result = ctx->vtable.GetCalibratedTimestampsKHR(ctx->device, 2, info, ts, &deviation); ++ if (result == VK_SUCCESS) { ++ /* We take a moving average in order to avoid variance. */ ++ int64_t new_delta = ts[0] - (int64_t)(ts[1] * ctx->calibration.timestamp_period); ++ ++ if (ctx->calibration.delta == 0) { ++ ctx->calibration.delta = new_delta; ++ } else { ++ int64_t diff = new_delta - ctx->calibration.delta; ++ ctx->calibration.delta += diff / 8; ++ } ++ ++ /* Take a new calibrated timestamp every second. */ ++ ctx->calibration.recalibrate_when = ts[0] + 1000000000ull; ++ } ++ ++ return result == VK_SUCCESS; ++} ++ ++static void ++begin_next_frame(device_context *ctx) ++{ ++ frame *next_frame; ++ if (ctx->active_frame) { ++ assert(ctx->active_frame->state == FRAME_SUBMIT); ++ ctx->active_frame->state = FRAME_PRESENT; ++ next_frame = ringbuffer_next(ctx->frames, ctx->active_frame); ++ } else { ++ next_frame = ringbuffer_last(ctx->frames); ++ } ++ ++ /* If there is a frame ready, it becomes active. */ ++ if (next_frame->state == FRAME_INPUT) { ++ next_frame->state = FRAME_SUBMIT; ++ ctx->active_frame = next_frame; ++ } else { ++ ctx->active_frame = NULL; ++ } ++} ++ ++static void ++anti_lag_disable(device_context *ctx) ++{ ++ ringbuffer_lock(ctx->frames); ++ while (ctx->frames.size) { ++ /* Set force-wait=true, so that all pending timestamp queries get completed. */ ++ begin_next_frame(ctx); ++ frame *frame = ringbuffer_first(ctx->frames); ++ evaluate_frame(ctx, frame, true); ++ frame->state = FRAME_INVALID; ++ ringbuffer_free(ctx->frames, frame); ++ } ++ assert(!ctx->active_frame); ++ ringbuffer_unlock(ctx->frames); ++} ++ ++#define TARGET_DELAY 4000000ll /* 4 ms */ ++/** ++ * Returns the amount of time that we want the next frame to be delayed. ++ * ++ * The algorithm used by this function is very simplistic and only aims ++ * to minimize the delay between calls to vkQueueSubmit or vkQueueSubmit2 ++ * and the begin of the execution of the submission. ++ */ ++static int64_t ++get_wait_time(device_context *ctx) ++{ ++ /* Take the previous evaluated frame's delay as baseline. */ ++ int64_t imposed_delay = ctx->base_delay; ++ int64_t adaptation = 0; ++ ++ ringbuffer_lock(ctx->frames); ++ /* In case our ringbuffer is completely full and no frame is in PRESENT stage, ++ * just move the oldest frame to PRESENT stage, and force-wait. ++ */ ++ bool force_wait = ctx->frames.size == MAX_FRAMES; ++ frame *next_frame = ringbuffer_first(ctx->frames); ++ if (force_wait && next_frame->state != FRAME_PRESENT) ++ begin_next_frame(ctx); ++ ++ /* Also force-wait for the oldest frame if there is already 2 frames in PRESENT stage. */ ++ force_wait |= ringbuffer_next(ctx->frames, next_frame)->state == FRAME_PRESENT; ++ ringbuffer_unlock(ctx->frames); ++ ++ /* Take new evaluated frames into consideration. */ ++ while (evaluate_frame(ctx, next_frame, force_wait)) { ++ ++ if (next_frame->min_delay < TARGET_DELAY / 2 && ctx->adaptation <= 0) { ++ /* If there is no delay between submission and GPU start, halve the base delay and ++ * set the delay for this frame to zero, in order to account for sudden changes. ++ */ ++ ctx->base_delay = ctx->base_delay / 2; ++ adaptation = -ctx->base_delay; ++ } else { ++ /* We use some kind of exponential weighted moving average function here, ++ * in order to determine a base-delay. We use a smoothing-factor of roughly ++ * 3%, but don't discount the previous value. This helps keeping the delay ++ * slightly below the target of 5 ms, most of the time. ++ */ ++ int64_t diff = (int64_t)next_frame->min_delay - TARGET_DELAY; ++ ctx->base_delay = MAX2(0, ctx->base_delay + diff / 32); /* corresponds to ~3 % */ ++ ++ /* As the base-delay gets adjusted rather slowly, we additionally use the half of the ++ * diff as adaptation delay to account for sudden changes. A quarter of the adaptation ++ * is then subtracted for the next frame, so that we can avoid overcompensation. ++ */ ++ adaptation = diff / 2 - ctx->adaptation / 4; ++ } ++ ++ /* We only need space for one frame. */ ++ force_wait = false; ++ ++ ringbuffer_lock(ctx->frames); ++ next_frame->state = FRAME_INVALID; ++ ringbuffer_free(ctx->frames, next_frame); ++ next_frame = ringbuffer_first(ctx->frames); ++ ringbuffer_unlock(ctx->frames); ++ } ++ imposed_delay = ctx->base_delay + adaptation; ++ ctx->adaptation = adaptation; ++ ++ if (imposed_delay > 100000000) { ++ /* This corresponds to <10 FPS. Something might have gone wrong. */ ++ calibrate_timestamps(ctx); ++ ctx->base_delay = ctx->adaptation = imposed_delay = 0; ++ } ++ ++ return MAX2(0, imposed_delay); ++} ++ ++static void ++reset_frame(frame *frame) ++{ ++ assert(frame->state == FRAME_INVALID); ++ frame->frame_idx = 0; ++ frame->frame_start_time = 0; ++ frame->min_delay = UINT64_MAX; ++ frame->state = FRAME_INPUT; ++} ++ ++VKAPI_ATTR void VKAPI_CALL ++anti_lag_AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD *pData) ++{ ++ if (pData == NULL) ++ return; ++ ++ device_context *ctx = get_device_context(device); ++ if (pData->mode == VK_ANTI_LAG_MODE_OFF_AMD) { ++ /* Application request to disable Anti-Lag. */ ++ simple_mtx_lock(&ctx->mtx); ++ anti_lag_disable(ctx); ++ simple_mtx_unlock(&ctx->mtx); ++ return; ++ } ++ ++ uint64_t frame_idx = 0; ++ int64_t now = os_time_get_nano(); ++ int64_t imposed_delay = 0; ++ int64_t last_frame_begin = 0; ++ ++ if (pData->pPresentationInfo) { ++ /* The same frameIndex value should be used with VK_ANTI_LAG_STAGE_INPUT_AMD before ++ * the frame begins and with VK_ANTI_LAG_STAGE_PRESENT_AMD when the frame ends. ++ */ ++ frame_idx = pData->pPresentationInfo->frameIndex; ++ ++ /* This marks the end of the current frame. */ ++ if (pData->pPresentationInfo->stage == VK_ANTI_LAG_STAGE_PRESENT_AMD) { ++ /* If there is already a new frame pending, any submission that happens afterwards ++ * gets associated with the new frame. ++ */ ++ ringbuffer_lock(ctx->frames); ++ /* Check that the currently active frame is indeed the frame we are ending now. */ ++ while (ctx->active_frame && ctx->active_frame->frame_idx <= frame_idx) { ++ begin_next_frame(ctx); ++ } ++ ringbuffer_unlock(ctx->frames); ++ return; ++ } ++ } ++ ++ /* Lock this function, in order to avoid race conditions on frame allocation. */ ++ simple_mtx_lock(&ctx->mtx); ++ ++ /* VK_ANTI_LAG_STAGE_INPUT_AMD: This marks the begin of a new frame. ++ * Evaluate previous frames in order to determine the wait time. ++ */ ++ imposed_delay = get_wait_time(ctx); ++ int64_t next_deadline = now + imposed_delay; ++ ++ /* Ensure maxFPS adherence. */ ++ if (pData->maxFPS) { ++ int64_t frametime_period = 1000000000u / pData->maxFPS; ++ last_frame_begin = ringbuffer_last(ctx->frames)->frame_start_time; ++ next_deadline = MAX2(next_deadline, last_frame_begin + frametime_period); ++ } ++ ++ /* Recalibrate every now and then. */ ++ if (next_deadline > ctx->calibration.recalibrate_when) ++ calibrate_timestamps(ctx); ++ ++ /* Sleep until deadline is met. */ ++ os_time_nanosleep_until(next_deadline); ++ ++ /* Initialize new frame. */ ++ ringbuffer_lock(ctx->frames); ++ frame *new_frame = ringbuffer_alloc(ctx->frames); ++ reset_frame(new_frame); ++ new_frame->frame_start_time = next_deadline; ++ new_frame->imposed_delay = imposed_delay; ++ new_frame->frame_idx = frame_idx; ++ ++ /* Immediately set the frame active if there is no other frame already active. */ ++ if (!ctx->active_frame) ++ begin_next_frame(ctx); ++ ++ ringbuffer_unlock(ctx->frames); ++ simple_mtx_unlock(&ctx->mtx); ++} ++ ++static queue_context * ++get_queue_context(device_context *ctx, VkQueue queue) ++{ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ if (ctx->queues[i].queue == queue) ++ return &ctx->queues[i]; ++ } ++ ++ return NULL; ++} ++ ++static struct query * ++allocate_query(device_context *ctx, queue_context *queue_ctx) ++{ ++ if (!ctx->active_frame) ++ return NULL; ++ ++ /* Allow for a single frame to use at most half of the query pool. */ ++ uint32_t frame_idx = ringbuffer_index(ctx->frames, ctx->active_frame); ++ if (queue_ctx->submissions_per_frame[frame_idx] > MAX_QUERIES / 2) ++ return NULL; ++ ++ /* Check that the next query index has been reset properly: ++ * ++ * We use some double-buffering here in order to reduce the number of ++ * VkResetQueryPool commands. ++ * Return false if the next query-index allocation crosses into the half ++ * which still contains active queries, ++ */ ++ if (queue_ctx->queries.size > MAX_QUERIES / 2) { ++ struct query *last_query = ringbuffer_last(queue_ctx->queries); ++ uint32_t next_idx = ringbuffer_index(queue_ctx->queries, last_query) + 1; ++ if (next_idx == MAX_QUERIES || next_idx == MAX_QUERIES / 2) ++ return NULL; ++ } ++ ++ return ringbuffer_alloc(queue_ctx->queries); ++} ++ ++static bool ++get_commandbuffer(device_context *ctx, queue_context *queue_ctx, VkCommandBuffer *cmdbuffer) ++{ ++ uint64_t now = os_time_get_nano(); ++ ++ /* Begin critical section. */ ++ ringbuffer_lock(ctx->frames); ++ ringbuffer_lock(queue_ctx->queries); ++ struct query *query = allocate_query(ctx, queue_ctx); ++ if (query == NULL) { ++ ringbuffer_unlock(queue_ctx->queries); ++ ringbuffer_unlock(ctx->frames); ++ return false; ++ } ++ ++ query->submit_cpu_ts = now; ++ ++ /* Assign commandBuffer for timestamp. */ ++ *cmdbuffer = query->cmdbuffer; ++ ++ /* Increment timeline semaphore count. */ ++ queue_ctx->semaphore_value++; ++ ++ /* Add new submission entry for the current frame */ ++ assert(ctx->active_frame->state == FRAME_SUBMIT); ++ uint32_t frame_idx = ringbuffer_index(ctx->frames, ctx->active_frame); ++ queue_ctx->submissions_per_frame[frame_idx]++; ++ ++ ringbuffer_unlock(queue_ctx->queries); ++ ringbuffer_unlock(ctx->frames); ++ return true; ++} ++ ++static VkResult ++queue_submit2(device_context *ctx, VkQueue queue, uint32_t submitCount, ++ const VkSubmitInfo2 *pSubmits, VkFence fence, PFN_vkQueueSubmit2 queueSubmit2) ++{ ++ queue_context *queue_ctx = get_queue_context(ctx, queue); ++ if (!ctx->active_frame || !queue_ctx) ++ return queueSubmit2(queue, submitCount, pSubmits, fence); ++ ++ int first = -1; ++ VkCommandBuffer timestamp_cmdbuffer; ++ /* Check if any submission contains commandbuffers. */ ++ for (unsigned i = 0; i < submitCount; i++) { ++ if (pSubmits[i].commandBufferInfoCount) { ++ first = i; ++ break; ++ } ++ } ++ ++ /* Get timestamp commandbuffer. */ ++ if (first == -1 || !get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer)) ++ return queueSubmit2(queue, submitCount, pSubmits, fence); ++ ++ VkSubmitInfo2 *submits; ++ VkCommandBufferSubmitInfo *cmdbuffers; ++ VkSemaphoreSubmitInfo *semaphores; ++ VK_MULTIALLOC(ma); ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo2, submitCount); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBufferSubmitInfo, ++ pSubmits[first].commandBufferInfoCount + 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphoreSubmitInfo, ++ pSubmits[first].signalSemaphoreInfoCount + 1); ++ void *buf = vk_multialloc_zalloc(&ma, &ctx->alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!buf) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ ++ memcpy(submits, pSubmits, sizeof(VkSubmitInfo2) * submitCount); ++ VkSubmitInfo2 *submit_info = &submits[first]; ++ ++ /* Add commandbuffer to submission. */ ++ cmdbuffers[0] = (VkCommandBufferSubmitInfo){ ++ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_SUBMIT_INFO, ++ .commandBuffer = timestamp_cmdbuffer, ++ }; ++ memcpy(&cmdbuffers[1], submit_info->pCommandBufferInfos, ++ sizeof(VkCommandBufferSubmitInfo) * submit_info->commandBufferInfoCount); ++ submit_info->pCommandBufferInfos = cmdbuffers; ++ submit_info->commandBufferInfoCount++; ++ ++ /* Add timeline semaphore to submission. */ ++ memcpy(semaphores, submit_info->pSignalSemaphoreInfos, ++ sizeof(VkSemaphoreSubmitInfo) * submit_info->signalSemaphoreInfoCount); ++ semaphores[submit_info->signalSemaphoreInfoCount] = (VkSemaphoreSubmitInfo){ ++ .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, ++ .semaphore = queue_ctx->semaphore, ++ .value = queue_ctx->semaphore_value, ++ .stageMask = VK_PIPELINE_STAGE_2_ALL_COMMANDS_BIT, ++ }; ++ submit_info->pSignalSemaphoreInfos = semaphores; ++ submit_info->signalSemaphoreInfoCount++; ++ ++ /* Submit with added timestamp query commandbuffer. */ ++ VkResult res = queueSubmit2(queue, submitCount, submits, fence); ++ vk_free(&ctx->alloc, submits); ++ return res; ++} ++ ++VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 *pSubmits, ++ VkFence fence) ++{ ++ device_context *ctx = get_device_context(queue); ++ return queue_submit2(ctx, queue, submitCount, pSubmits, fence, ctx->vtable.QueueSubmit2KHR); ++} ++ ++VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 *pSubmits, ++ VkFence fence) ++{ ++ device_context *ctx = get_device_context(queue); ++ return queue_submit2(ctx, queue, submitCount, pSubmits, fence, ctx->vtable.QueueSubmit2); ++} ++ ++VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, ++ VkFence fence) ++{ ++ device_context *ctx = get_device_context(queue); ++ queue_context *queue_ctx = get_queue_context(ctx, queue); ++ if (!ctx->active_frame || !queue_ctx) ++ return ctx->vtable.QueueSubmit(queue, submitCount, pSubmits, fence); ++ ++ int first = -1; ++ VkCommandBuffer timestamp_cmdbuffer; ++ /* Check if any submission contains commandbuffers. */ ++ for (unsigned i = 0; i < submitCount; i++) { ++ if (pSubmits[i].commandBufferCount) { ++ first = i; ++ break; ++ } ++ } ++ ++ /* Get timestamp commandbuffer. */ ++ if (first == -1 || !get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer)) ++ return ctx->vtable.QueueSubmit(queue, submitCount, pSubmits, fence); ++ ++ VkSubmitInfo *submits; ++ VkCommandBuffer *cmdbuffers; ++ VkSemaphore *semaphores; ++ VkTimelineSemaphoreSubmitInfo *semaphore_info; ++ uint64_t *semaphore_values; ++ VK_MULTIALLOC(ma); ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo, submitCount); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBuffer, pSubmits[first].commandBufferCount + 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphore, pSubmits[first].signalSemaphoreCount + 1); ++ vk_multialloc_add(&ma, &semaphore_info, VkTimelineSemaphoreSubmitInfo, 1); ++ vk_multialloc_add(&ma, &semaphore_values, uint64_t, pSubmits[first].signalSemaphoreCount + 1); ++ void *buf = vk_multialloc_zalloc(&ma, &ctx->alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!buf) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ ++ memcpy(submits, pSubmits, sizeof(VkSubmitInfo) * submitCount); ++ VkSubmitInfo *submit_info = &submits[first]; ++ ++ /* Add commandbuffer to submission. */ ++ cmdbuffers[0] = timestamp_cmdbuffer; ++ memcpy(&cmdbuffers[1], submit_info->pCommandBuffers, ++ sizeof(VkCommandBuffer) * submit_info->commandBufferCount); ++ submit_info->pCommandBuffers = cmdbuffers; ++ submit_info->commandBufferCount++; ++ ++ /* Add timeline semaphore to submission. */ ++ const VkTimelineSemaphoreSubmitInfo *tlssi = ++ vk_find_struct_const(pSubmits[first].pNext, TIMELINE_SEMAPHORE_SUBMIT_INFO); ++ semaphores[0] = queue_ctx->semaphore; ++ memcpy(&semaphores[1], submit_info->pSignalSemaphores, ++ sizeof(VkSemaphore) * submit_info->signalSemaphoreCount); ++ submit_info->pSignalSemaphores = semaphores; ++ submit_info->signalSemaphoreCount++; ++ semaphore_values[0] = queue_ctx->semaphore_value; ++ if (tlssi) { ++ *semaphore_info = *tlssi; /* save original values */ ++ memcpy(&semaphore_values[1], tlssi->pSignalSemaphoreValues, ++ sizeof(uint64_t) * tlssi->signalSemaphoreValueCount); ++ ((VkTimelineSemaphoreSubmitInfo *)tlssi)->pSignalSemaphoreValues = semaphore_values; ++ ((VkTimelineSemaphoreSubmitInfo *)tlssi)->signalSemaphoreValueCount = ++ submit_info->signalSemaphoreCount; ++ } else { ++ *semaphore_info = (VkTimelineSemaphoreSubmitInfo){ ++ .sType = VK_STRUCTURE_TYPE_TIMELINE_SEMAPHORE_SUBMIT_INFO, ++ .pNext = submit_info->pNext, ++ .signalSemaphoreValueCount = submit_info->signalSemaphoreCount, ++ .pSignalSemaphoreValues = semaphore_values, ++ }; ++ submit_info->pNext = semaphore_info; ++ } ++ ++ /* Submit with added timestamp query commandbuffer. */ ++ VkResult res = ctx->vtable.QueueSubmit(queue, submitCount, submits, fence); ++ if (tlssi) ++ *(VkTimelineSemaphoreSubmitInfo *)tlssi = *semaphore_info; /* restore */ ++ vk_free(&ctx->alloc, buf); ++ return res; ++} +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer.h b/src/vulkan/anti-lag-layer/anti_lag_layer.h +new file mode 100644 +index 00000000000..31abb0f9aee +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer.h +@@ -0,0 +1,111 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#ifndef ANTI_LAG_LAYER_H ++#define ANTI_LAG_LAYER_H ++ ++#include "util/simple_mtx.h" ++#include "vulkan/vk_layer.h" ++#include "vulkan/vulkan_core.h" ++#include "ringbuffer.h" ++ ++#define MAX_FRAMES 8 ++#define MAX_QUERIES 256 ++ ++enum frame_state { ++ FRAME_INVALID = 0, ++ FRAME_INPUT, /* Frame is in input stage. */ ++ FRAME_SUBMIT, /* All current queueSubmit calls are associated with this frame. */ ++ FRAME_PRESENT, /* Frame is in present stage and latencies can be evaluated. */ ++}; ++ ++typedef struct frame { ++ uint64_t frame_idx; ++ uint64_t frame_start_time; ++ uint64_t min_delay; ++ uint64_t imposed_delay; ++ enum frame_state state; ++} frame; ++ ++struct query { ++ uint64_t begin_gpu_ts; ++ uint64_t submit_cpu_ts; ++ VkCommandBuffer cmdbuffer; ++}; ++ ++typedef struct queue_context { ++ VkQueue queue; ++ uint32_t queue_family_idx; ++ VkCommandPool cmdPool; ++ VkQueryPool queryPool; ++ VkSemaphore semaphore; ++ uint64_t semaphore_value; ++ uint8_t submissions_per_frame[MAX_FRAMES]; ++ RINGBUFFER_DECLARE(queries, struct query, MAX_QUERIES); ++} queue_context; ++ ++typedef struct device_context { ++ ++ struct DeviceDispatchTable { ++#define DECLARE_HOOK(fn) PFN_vk##fn fn ++ DECLARE_HOOK(GetDeviceProcAddr); ++ DECLARE_HOOK(SetDeviceLoaderData); ++ DECLARE_HOOK(DestroyDevice); ++ DECLARE_HOOK(QueueSubmit); ++ DECLARE_HOOK(QueueSubmit2); ++ DECLARE_HOOK(QueueSubmit2KHR); ++ DECLARE_HOOK(GetDeviceQueue); ++ DECLARE_HOOK(CreateCommandPool); ++ DECLARE_HOOK(DestroyCommandPool); ++ DECLARE_HOOK(CreateQueryPool); ++ DECLARE_HOOK(ResetQueryPool); ++ DECLARE_HOOK(DestroyQueryPool); ++ DECLARE_HOOK(GetQueryPoolResults); ++ DECLARE_HOOK(AllocateCommandBuffers); ++ DECLARE_HOOK(FreeCommandBuffers); ++ DECLARE_HOOK(BeginCommandBuffer); ++ DECLARE_HOOK(EndCommandBuffer); ++ DECLARE_HOOK(GetCalibratedTimestampsKHR); ++ DECLARE_HOOK(CmdWriteTimestamp); ++ DECLARE_HOOK(CreateSemaphore); ++ DECLARE_HOOK(DestroySemaphore); ++ DECLARE_HOOK(GetSemaphoreCounterValue); ++ DECLARE_HOOK(WaitSemaphores); ++#undef DECLARE_HOOK ++ } vtable; ++ ++ VkDevice device; ++ VkAllocationCallbacks alloc; ++ simple_mtx_t mtx; ++ ++ struct { ++ int64_t delta; ++ uint64_t recalibrate_when; ++ float timestamp_period; ++ } calibration; ++ ++ RINGBUFFER_DECLARE(frames, frame, MAX_FRAMES); ++ frame *active_frame; ++ int64_t base_delay; ++ int64_t adaptation; ++ ++ unsigned num_queues; ++ queue_context queues[]; ++} device_context; ++ ++device_context *get_device_context(const void *object); ++ ++void anti_lag_AntiLagUpdateAMD(VkDevice device, const VkAntiLagDataAMD *pData); ++VkResult anti_lag_QueueSubmit2KHR(VkQueue queue, uint32_t submitCount, ++ const VkSubmitInfo2 *pSubmits, VkFence fence); ++VkResult anti_lag_QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubmitInfo2 *pSubmits, ++ VkFence fence); ++VkResult anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, ++ VkFence fence); ++ ++VkResult anti_lag_NegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct); ++ ++#endif /* ANTI_LAG_LAYER_H */ +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c b/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c +new file mode 100644 +index 00000000000..d2ca4a7dd44 +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c +@@ -0,0 +1,899 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#include "util/simple_mtx.h" ++#include "vulkan/vk_layer.h" ++#include "vulkan/vulkan_core.h" ++#include "anti_lag_layer.h" ++#include "vk_alloc.h" ++#include "vk_util.h" ++ ++static uintptr_t ++object_to_key(const void *object) ++{ ++ return (uintptr_t)*(uintptr_t *)object; ++} ++ ++typedef struct instance_data { ++ struct InstanceDispatchTable { ++#define DECLARE_HOOK(fn) PFN_vk##fn fn ++ DECLARE_HOOK(GetInstanceProcAddr); ++ DECLARE_HOOK(CreateInstance); ++ DECLARE_HOOK(DestroyInstance); ++ DECLARE_HOOK(CreateDevice); ++ DECLARE_HOOK(EnumerateDeviceExtensionProperties); ++ DECLARE_HOOK(GetPhysicalDeviceFeatures2KHR); ++ DECLARE_HOOK(GetPhysicalDeviceFeatures2); ++ DECLARE_HOOK(GetPhysicalDeviceProperties); ++ DECLARE_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsEXT); ++ DECLARE_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsKHR); ++ DECLARE_HOOK(GetPhysicalDeviceQueueFamilyProperties); ++#undef DECLARE_HOOK ++ } vtable; ++ ++ VkInstance instance; ++ uint32_t apiVersion; ++ VkAllocationCallbacks alloc; ++ struct instance_data *next; ++} instance_data; ++ ++static void ++init_instance_vtable(instance_data *ctx, PFN_vkGetInstanceProcAddr gpa) ++{ ++ ctx->vtable.GetInstanceProcAddr = gpa; ++#define INIT_HOOK(fn) ctx->vtable.fn = (PFN_vk##fn)gpa(ctx->instance, "vk" #fn) ++ INIT_HOOK(CreateInstance); ++ INIT_HOOK(DestroyInstance); ++ INIT_HOOK(CreateDevice); ++ INIT_HOOK(EnumerateDeviceExtensionProperties); ++ INIT_HOOK(GetPhysicalDeviceFeatures2KHR); ++ INIT_HOOK(GetPhysicalDeviceFeatures2); ++ INIT_HOOK(GetPhysicalDeviceProperties); ++ INIT_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsEXT); ++ INIT_HOOK(GetPhysicalDeviceCalibrateableTimeDomainsKHR); ++ INIT_HOOK(GetPhysicalDeviceQueueFamilyProperties); ++#undef INIT_HOOK ++} ++ ++static simple_mtx_t instance_mtx = SIMPLE_MTX_INITIALIZER; ++static instance_data *instance_list = NULL; ++ ++static void ++add_instance(instance_data *instance) ++{ ++ simple_mtx_lock(&instance_mtx); ++ instance_data **ptr = &instance_list; ++ while (*ptr != NULL) ++ ptr = &(*ptr)->next; ++ *ptr = instance; ++ simple_mtx_unlock(&instance_mtx); ++} ++ ++static instance_data * ++remove_instance(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&instance_mtx); ++ instance_data **ptr = &instance_list; ++ while (*ptr && key != object_to_key((*ptr)->instance)) ++ ptr = &(*ptr)->next; ++ ++ instance_data *ctx = *ptr; ++ *ptr = ctx ? ctx->next : NULL; ++ simple_mtx_unlock(&instance_mtx); ++ return ctx; ++} ++ ++static instance_data * ++get_instance_data(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&instance_mtx); ++ instance_data *ctx = instance_list; ++ while (ctx && key != object_to_key(ctx->instance)) ++ ctx = ctx->next; ++ simple_mtx_unlock(&instance_mtx); ++ return ctx; ++} ++ ++static VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_CreateInstance(const VkInstanceCreateInfo *pCreateInfo, ++ const VkAllocationCallbacks *pAllocator, VkInstance *pInstance) ++{ ++ VkLayerInstanceCreateInfo *chain_info = (VkLayerInstanceCreateInfo *)(pCreateInfo->pNext); ++ while (chain_info && !(chain_info->sType == VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO && ++ chain_info->function == VK_LAYER_LINK_INFO)) { ++ chain_info = (VkLayerInstanceCreateInfo *)(chain_info->pNext); ++ } ++ ++ assert(chain_info && chain_info->u.pLayerInfo); ++ PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = ++ chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; ++ PFN_vkCreateInstance fpCreateInstance = ++ (PFN_vkCreateInstance)fpGetInstanceProcAddr(NULL, "vkCreateInstance"); ++ if (fpCreateInstance == NULL) ++ return VK_ERROR_INITIALIZATION_FAILED; ++ ++ /* Advance the link info for the next element on the chain. */ ++ chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; ++ ++ /* Create Instance. */ ++ VkResult result = fpCreateInstance(pCreateInfo, pAllocator, pInstance); ++ if (result != VK_SUCCESS) ++ return result; ++ ++ /* Create Instance context. */ ++ const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : vk_default_allocator(); ++ void *buf = vk_alloc(alloc, sizeof(instance_data), alignof(instance_data), ++ VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); ++ if (!buf) { ++ PFN_vkDestroyInstance fpDestroyInstance = ++ (PFN_vkDestroyInstance)fpGetInstanceProcAddr(*pInstance, "vkDestroyInstance"); ++ fpDestroyInstance(*pInstance, alloc); ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ } ++ instance_data *ctx = (instance_data *)buf; ++ ctx->apiVersion = pCreateInfo->pApplicationInfo && pCreateInfo->pApplicationInfo->apiVersion ++ ? pCreateInfo->pApplicationInfo->apiVersion ++ : VK_API_VERSION_1_0; ++ ctx->instance = *pInstance; ++ ctx->alloc = *alloc; ++ ctx->next = NULL; ++ init_instance_vtable(ctx, fpGetInstanceProcAddr); ++ add_instance(ctx); ++ ++ return VK_SUCCESS; ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_DestroyInstance(VkInstance instance, const VkAllocationCallbacks *pAllocator) ++{ ++ instance_data *ctx = remove_instance(instance); ++ if (ctx) { ++ ctx->vtable.DestroyInstance(instance, pAllocator); ++ vk_free(&ctx->alloc, ctx); ++ } ++} ++ ++typedef struct device_data { ++ VkDevice device; ++ PFN_vkGetDeviceProcAddr GetDeviceProcAddr; ++ device_context *ctx; /* NULL if anti-lag ext is not enabled. */ ++ struct device_data *next; ++} device_data; ++ ++static void ++init_device_vtable(device_context *ctx, PFN_vkGetDeviceProcAddr gpa, PFN_vkSetDeviceLoaderData sld, ++ bool calibrated_timestamps_khr, bool host_query_reset_ext, ++ bool timeline_semaphore_khr) ++{ ++ ctx->vtable.GetDeviceProcAddr = gpa; ++ ctx->vtable.SetDeviceLoaderData = sld; ++#define INIT_HOOK(fn) ctx->vtable.fn = (PFN_vk##fn)gpa(ctx->device, "vk" #fn) ++#define INIT_HOOK_ALIAS(fn, alias, cond) \ ++ ctx->vtable.fn = (PFN_vk##fn)gpa(ctx->device, cond ? "vk" #alias : "vk" #fn) ++ INIT_HOOK(DestroyDevice); ++ INIT_HOOK(QueueSubmit); ++ INIT_HOOK(QueueSubmit2); ++ INIT_HOOK(QueueSubmit2KHR); ++ INIT_HOOK(GetDeviceQueue); ++ INIT_HOOK(CreateCommandPool); ++ INIT_HOOK(DestroyCommandPool); ++ INIT_HOOK(CreateQueryPool); ++ INIT_HOOK_ALIAS(ResetQueryPool, ResetQueryPoolEXT, host_query_reset_ext); ++ INIT_HOOK(DestroyQueryPool); ++ INIT_HOOK(GetQueryPoolResults); ++ INIT_HOOK(AllocateCommandBuffers); ++ INIT_HOOK(FreeCommandBuffers); ++ INIT_HOOK(BeginCommandBuffer); ++ INIT_HOOK(EndCommandBuffer); ++ INIT_HOOK_ALIAS(GetCalibratedTimestampsKHR, GetCalibratedTimestampsEXT, !calibrated_timestamps_khr); ++ INIT_HOOK(CmdWriteTimestamp); ++ INIT_HOOK(CreateSemaphore); ++ INIT_HOOK(DestroySemaphore); ++ INIT_HOOK_ALIAS(GetSemaphoreCounterValue, GetSemaphoreCounterValueKHR, timeline_semaphore_khr); ++ INIT_HOOK_ALIAS(WaitSemaphores, WaitSemaphoresKHR, timeline_semaphore_khr); ++#undef INIT_HOOK ++#undef INIT_HOOK_ALIAS ++} ++ ++static simple_mtx_t device_mtx = SIMPLE_MTX_INITIALIZER; ++static device_data *device_list = NULL; ++ ++static void ++add_device(device_data *device) ++{ ++ simple_mtx_lock(&device_mtx); ++ device_data **ptr = &device_list; ++ while (*ptr != NULL) ++ ptr = &(*ptr)->next; ++ *ptr = device; ++ simple_mtx_unlock(&device_mtx); ++} ++ ++static device_data * ++remove_device(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&device_mtx); ++ device_data **ptr = &device_list; ++ while (*ptr && key != object_to_key((*ptr)->device)) ++ ptr = &(*ptr)->next; ++ ++ device_data *ctx = *ptr; ++ *ptr = ctx ? ctx->next : NULL; ++ simple_mtx_unlock(&device_mtx); ++ return ctx; ++} ++ ++static device_data * ++get_device_data(const void *object) ++{ ++ uintptr_t key = object_to_key(object); ++ simple_mtx_lock(&device_mtx); ++ device_data *ctx = device_list; ++ while (ctx && key != object_to_key(ctx->device)) ++ ctx = ctx->next; ++ simple_mtx_unlock(&device_mtx); ++ return ctx; ++} ++ ++device_context * ++get_device_context(const void *object) ++{ ++ device_data *data = get_device_data(object); ++ assert(data && data->ctx); ++ return data->ctx; ++} ++ ++static VkLayerDeviceCreateInfo * ++get_device_chain_info(const VkDeviceCreateInfo *pCreateInfo, VkLayerFunction func) ++{ ++ vk_foreach_struct_const (item, pCreateInfo->pNext) { ++ if (item->sType == VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO && ++ ((VkLayerDeviceCreateInfo *)item)->function == func) ++ return (VkLayerDeviceCreateInfo *)item; ++ } ++ return NULL; ++} ++ ++static bool ++should_enable_layer(instance_data *ctx, VkPhysicalDevice physicalDevice, ++ VkPhysicalDeviceAntiLagFeaturesAMD ext_feature) ++{ ++ /* The extension is not requested by the application. */ ++ if (!ext_feature.antiLag) ++ return false; ++ ++ /* Ensure that the underlying implementation does not expose VK_AMD_anti_lag itself. */ ++ ext_feature.antiLag = false; ++ VkPhysicalDeviceFeatures2 features = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, ++ .pNext = &ext_feature, ++ }; ++ ++ if (ctx->vtable.GetPhysicalDeviceFeatures2KHR) { ++ ctx->vtable.GetPhysicalDeviceFeatures2KHR(physicalDevice, &features); ++ return !ext_feature.antiLag; ++ } ++ ++ if (ctx->vtable.GetPhysicalDeviceFeatures2) { ++ ctx->vtable.GetPhysicalDeviceFeatures2(physicalDevice, &features); ++ return !ext_feature.antiLag; ++ } ++ ++ return false; ++} ++ ++static bool ++check_calibrated_timestamps(instance_data *data, VkPhysicalDevice physicalDevice, bool *has_khr) ++{ ++ VkResult res; ++ uint32_t count = 0; ++ res = data->vtable.EnumerateDeviceExtensionProperties(physicalDevice, NULL, &count, NULL); ++ VkExtensionProperties *extensions = ++ vk_alloc(&data->alloc, count * sizeof(VkExtensionProperties), alignof(VkExtensionProperties), ++ VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!extensions) ++ return false; ++ ++ res |= data->vtable.EnumerateDeviceExtensionProperties(physicalDevice, NULL, &count, extensions); ++ ++ *has_khr = false; ++ bool has_ext = false; ++ if (res == VK_SUCCESS) { ++ for (unsigned i = 0; i < count; i++) { ++ if (strcmp(extensions[i].extensionName, VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ *has_khr = true; ++ if (strcmp(extensions[i].extensionName, VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ has_ext = true; ++ } ++ } ++ ++ vk_free(&data->alloc, extensions); ++ return *has_khr || has_ext; ++} ++ ++/* Initialize per-queue context: ++ * ++ * This includes creating one CommandPool and one QueryPool per Queue as well as ++ * recording one CommandBuffer per timestamp query. ++ */ ++static VkResult ++init_queue_context(device_context *ctx, queue_context *queue_ctx) ++{ ++#define CHECK_RESULT(res, label) \ ++ if (res != VK_SUCCESS) { \ ++ goto label; \ ++ } ++ ++ VkResult result; ++ ++ /* Create command pool */ ++ struct VkCommandPoolCreateInfo pool_info = { ++ .sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, ++ .pNext = NULL, ++ .flags = 0, ++ .queueFamilyIndex = queue_ctx->queue_family_idx, ++ }; ++ result = ++ ctx->vtable.CreateCommandPool(ctx->device, &pool_info, &ctx->alloc, &queue_ctx->cmdPool); ++ CHECK_RESULT(result, fail_cmdpool) ++ ++ /* Create query pool */ ++ VkQueryPoolCreateInfo query_pool_info = { ++ .sType = VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, ++ .queryType = VK_QUERY_TYPE_TIMESTAMP, ++ .queryCount = MAX_QUERIES, ++ }; ++ result = ctx->vtable.CreateQueryPool(ctx->device, &query_pool_info, &ctx->alloc, ++ &queue_ctx->queryPool); ++ CHECK_RESULT(result, fail_querypool) ++ ctx->vtable.ResetQueryPool(ctx->device, queue_ctx->queryPool, 0, MAX_QUERIES); ++ ringbuffer_init(queue_ctx->queries); ++ ++ /* Create timeline semaphore */ ++ VkSemaphoreTypeCreateInfo timelineCreateInfo = { ++ .sType = VK_STRUCTURE_TYPE_SEMAPHORE_TYPE_CREATE_INFO, ++ .pNext = NULL, ++ .semaphoreType = VK_SEMAPHORE_TYPE_TIMELINE, ++ .initialValue = 0, ++ }; ++ VkSemaphoreCreateInfo createInfo = { ++ .sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, ++ .pNext = &timelineCreateInfo, ++ .flags = 0, ++ }; ++ result = ++ ctx->vtable.CreateSemaphore(ctx->device, &createInfo, &ctx->alloc, &queue_ctx->semaphore); ++ CHECK_RESULT(result, fail_semaphore); ++ ++ for (unsigned j = 0; j < MAX_QUERIES; j++) { ++ struct query *query = &queue_ctx->queries.data[j]; ++ ++ /* Allocate commandBuffer for timestamp. */ ++ VkCommandBufferAllocateInfo buffer_info = { ++ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, ++ .commandPool = queue_ctx->cmdPool, ++ .level = VK_COMMAND_BUFFER_LEVEL_PRIMARY, ++ .commandBufferCount = 1, ++ }; ++ result = ctx->vtable.AllocateCommandBuffers(ctx->device, &buffer_info, &query->cmdbuffer); ++ CHECK_RESULT(result, fail) ++ result = ctx->vtable.SetDeviceLoaderData(ctx->device, query->cmdbuffer); ++ CHECK_RESULT(result, fail) ++ ++ /* Record commandbuffer. */ ++ VkCommandBufferBeginInfo beginInfo = { ++ .sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, ++ }; ++ ++ result = ctx->vtable.BeginCommandBuffer(query->cmdbuffer, &beginInfo); ++ CHECK_RESULT(result, fail) ++ ctx->vtable.CmdWriteTimestamp(query->cmdbuffer, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, ++ queue_ctx->queryPool, j); ++ result = ctx->vtable.EndCommandBuffer(query->cmdbuffer); ++ CHECK_RESULT(result, fail) ++ } ++ ++#undef CHECK_RESULT ++ return result; ++ ++fail: ++ ctx->vtable.DestroySemaphore(ctx->device, queue_ctx->semaphore, &ctx->alloc); ++fail_semaphore: ++ ctx->vtable.DestroyQueryPool(ctx->device, queue_ctx->queryPool, &ctx->alloc); ++fail_querypool: ++ ctx->vtable.DestroyCommandPool(ctx->device, queue_ctx->cmdPool, &ctx->alloc); ++fail_cmdpool: ++ for (queue_context *qctx = ctx->queues; qctx != queue_ctx; qctx++) { ++ ctx->vtable.DestroyQueryPool(ctx->device, qctx->queryPool, &ctx->alloc); ++ ctx->vtable.DestroyCommandPool(ctx->device, qctx->cmdPool, &ctx->alloc); ++ } ++ ++ return result; ++} ++ ++static VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, ++ const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) ++{ ++ instance_data *instance_ctx = get_instance_data(physicalDevice); ++ VkLayerDeviceCreateInfo *chain_info = get_device_chain_info(pCreateInfo, VK_LAYER_LINK_INFO); ++ PFN_vkGetDeviceProcAddr fpGetDeviceProcAddr = chain_info->u.pLayerInfo->pfnNextGetDeviceProcAddr; ++ PFN_vkGetInstanceProcAddr fpGetInstanceProcAddr = ++ chain_info->u.pLayerInfo->pfnNextGetInstanceProcAddr; ++ PFN_vkCreateDevice fpCreateDevice = ++ (PFN_vkCreateDevice)fpGetInstanceProcAddr(instance_ctx->instance, "vkCreateDevice"); ++ if (fpCreateDevice == NULL) ++ return VK_ERROR_INITIALIZATION_FAILED; ++ ++ /* Advance the link info for the next element on the chain. */ ++ chain_info->u.pLayerInfo = chain_info->u.pLayerInfo->pNext; ++ ++ const VkAllocationCallbacks *alloc = pAllocator ? pAllocator : &instance_ctx->alloc; ++ device_data *data; ++ VkResult result; ++ ++ /* Only allocate a context and add to dispatch if the extension is enabled. */ ++ const VkPhysicalDeviceAntiLagFeaturesAMD *ext_features = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD); ++ bool enable = ext_features && should_enable_layer(instance_ctx, physicalDevice, *ext_features); ++ if (enable) { ++ /* Count queues with sufficient timestamp valid bits. */ ++ // TODO: make it work with less than 64 valid bits ++ unsigned num_queue_families = 0; ++ unsigned num_queues = 0; ++ for (unsigned i = 0; i < pCreateInfo->queueCreateInfoCount; i++) ++ num_queue_families = ++ MAX2(num_queue_families, pCreateInfo->pQueueCreateInfos[i].queueFamilyIndex + 1); ++ VkQueueFamilyProperties *queue_family_props = ++ vk_alloc(alloc, num_queue_families * sizeof(VkQueueFamilyProperties), ++ alignof(VkQueueFamilyProperties), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!queue_family_props) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ ++ instance_ctx->vtable.GetPhysicalDeviceQueueFamilyProperties( ++ physicalDevice, &num_queue_families, queue_family_props); ++ for (unsigned i = 0; i < pCreateInfo->queueCreateInfoCount; i++) { ++ uint32_t queue_family_idx = pCreateInfo->pQueueCreateInfos[i].queueFamilyIndex; ++ if (queue_family_props[queue_family_idx].timestampValidBits == 64 && ++ (queue_family_props[queue_family_idx].queueFlags & ++ (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT))) { ++ num_queues += pCreateInfo->pQueueCreateInfos[i].queueCount; ++ } ++ } ++ ++ /* Allocate the context. */ ++ device_context *ctx; ++ queue_context *queues; ++ VK_MULTIALLOC(ma); ++ vk_multialloc_add(&ma, &data, device_data, 1); ++ vk_multialloc_add(&ma, &ctx, struct device_context, 1); ++ vk_multialloc_add(&ma, &queues, queue_context, num_queues); ++ void *buf = vk_multialloc_zalloc(&ma, alloc, VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); ++ if (!buf) { ++ vk_free(alloc, queue_family_props); ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ } ++ ++ VkPhysicalDeviceProperties properties; ++ instance_ctx->vtable.GetPhysicalDeviceProperties(physicalDevice, &properties); ++ ++ /* Ensure that calibrated timestamps and host query reset extensions are enabled. */ ++ bool has_calibrated_timestamps = false; ++ bool has_calibrated_timestamps_khr = false; ++ bool has_vk12 = instance_ctx->apiVersion >= VK_API_VERSION_1_2 && ++ properties.apiVersion >= VK_API_VERSION_1_2; ++ bool has_host_query_reset = has_vk12; ++ bool has_host_query_reset_ext = false; ++ bool has_timeline_semaphore = has_vk12; ++ bool has_timeline_semaphore_khr = false; ++ for (unsigned i = 0; i < pCreateInfo->enabledExtensionCount; i++) { ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ has_calibrated_timestamps = has_calibrated_timestamps_khr = true; ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME) == 0) ++ has_calibrated_timestamps = true; ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME) == 0) ++ has_host_query_reset = has_host_query_reset_ext = true; ++ if (strcmp(pCreateInfo->ppEnabledExtensionNames[i], ++ VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME) == 0) ++ has_timeline_semaphore = has_timeline_semaphore_khr = true; ++ } ++ ++ /* Add missing extensions. */ ++ VkDeviceCreateInfo create_info = *pCreateInfo; ++ const char **ext_names = NULL; ++ uint32_t num_extra_extensions = ++ !has_calibrated_timestamps + !has_host_query_reset + !has_timeline_semaphore; ++ if (num_extra_extensions) { ++ ext_names = vk_alloc( ++ alloc, (pCreateInfo->enabledExtensionCount + num_extra_extensions) * sizeof(char *), ++ alignof(char *), VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); ++ if (!ext_names) { ++ result = VK_ERROR_OUT_OF_HOST_MEMORY; ++ goto fail; ++ } ++ ++ memcpy(ext_names, pCreateInfo->ppEnabledExtensionNames, ++ sizeof(char *) * pCreateInfo->enabledExtensionCount); ++ ++ if (!has_timeline_semaphore) { ++ has_timeline_semaphore_khr = true; ++ ext_names[create_info.enabledExtensionCount++] = ++ VK_KHR_TIMELINE_SEMAPHORE_EXTENSION_NAME; ++ } ++ if (!has_host_query_reset) { ++ has_host_query_reset_ext = true; ++ ext_names[create_info.enabledExtensionCount++] = VK_EXT_HOST_QUERY_RESET_EXTENSION_NAME; ++ } ++ if (!has_calibrated_timestamps) { ++ check_calibrated_timestamps(instance_ctx, physicalDevice, ++ &has_calibrated_timestamps_khr); ++ ext_names[create_info.enabledExtensionCount++] = ++ has_calibrated_timestamps_khr ? VK_KHR_CALIBRATED_TIMESTAMPS_EXTENSION_NAME ++ : VK_EXT_CALIBRATED_TIMESTAMPS_EXTENSION_NAME; ++ } ++ create_info.ppEnabledExtensionNames = ext_names; ++ } ++ ++ /* Ensure that hostQueryReset feature is enabled. */ ++ const VkPhysicalDeviceVulkan12Features *vk12 = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_VULKAN_1_2_FEATURES); ++ const VkPhysicalDeviceHostQueryResetFeatures *query_reset = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES); ++ const VkPhysicalDeviceTimelineSemaphoreFeatures *timeline_semaphore = ++ vk_find_struct_const(pCreateInfo->pNext, PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES); ++ uint32_t prev_hostQueryReset; ++ uint32_t prev_timelineSemaphore; ++ if (vk12) { ++ prev_hostQueryReset = vk12->hostQueryReset; ++ prev_timelineSemaphore = vk12->timelineSemaphore; ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->hostQueryReset = VK_TRUE; ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->timelineSemaphore = VK_TRUE; ++ } else { ++ if (query_reset) { ++ prev_hostQueryReset = query_reset->hostQueryReset; ++ ((VkPhysicalDeviceHostQueryResetFeatures *)query_reset)->hostQueryReset = VK_TRUE; ++ } else { ++ VkPhysicalDeviceHostQueryResetFeatures *feat = ++ alloca(sizeof(VkPhysicalDeviceHostQueryResetFeatures)); ++ *feat = (VkPhysicalDeviceHostQueryResetFeatures){ ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, ++ .pNext = (void *)create_info.pNext, ++ .hostQueryReset = VK_TRUE, ++ }; ++ create_info.pNext = feat; ++ } ++ if (timeline_semaphore) { ++ prev_timelineSemaphore = timeline_semaphore->timelineSemaphore; ++ ((VkPhysicalDeviceTimelineSemaphoreFeatures *)timeline_semaphore)->timelineSemaphore = ++ VK_TRUE; ++ } else { ++ VkPhysicalDeviceTimelineSemaphoreFeatures *feat = ++ alloca(sizeof(VkPhysicalDeviceTimelineSemaphoreFeatures)); ++ *feat = (VkPhysicalDeviceTimelineSemaphoreFeatures){ ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, ++ .pNext = (void *)create_info.pNext, ++ .timelineSemaphore = VK_TRUE, ++ }; ++ create_info.pNext = feat; ++ } ++ } ++ ++ /* Create Device. */ ++ result = fpCreateDevice(physicalDevice, &create_info, pAllocator, pDevice); ++ ++ if (vk12) { ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->hostQueryReset = prev_hostQueryReset; ++ ((VkPhysicalDeviceVulkan12Features *)vk12)->timelineSemaphore = prev_timelineSemaphore; ++ } else { ++ if (query_reset) ++ ((VkPhysicalDeviceHostQueryResetFeatures *)query_reset)->hostQueryReset = ++ prev_hostQueryReset; ++ if (timeline_semaphore) ++ ((VkPhysicalDeviceTimelineSemaphoreFeatures *)timeline_semaphore)->timelineSemaphore = ++ prev_timelineSemaphore; ++ } ++ if (ext_names) ++ vk_free(alloc, ext_names); ++ ++ if (result != VK_SUCCESS) ++ goto fail; ++ ++ /* Initialize Context. */ ++ data->ctx = ctx; ++ ctx->device = *pDevice; ++ chain_info = get_device_chain_info(pCreateInfo, VK_LOADER_DATA_CALLBACK); ++ PFN_vkSetDeviceLoaderData fpSetDeviceLoaderData = ++ (PFN_vkSetDeviceLoaderData)chain_info->u.pfnSetDeviceLoaderData; ++ init_device_vtable(ctx, fpGetDeviceProcAddr, fpSetDeviceLoaderData, ++ has_calibrated_timestamps_khr, has_host_query_reset_ext, ++ has_timeline_semaphore_khr); ++ simple_mtx_init(&ctx->mtx, mtx_plain); ++ ctx->num_queues = num_queues; ++ ctx->alloc = *alloc; ++ ctx->calibration.timestamp_period = properties.limits.timestampPeriod; ++ ringbuffer_init(ctx->frames); ++ ++ /* Initialize Queue contexts. */ ++ unsigned idx = 0; ++ for (unsigned i = 0; i < pCreateInfo->queueCreateInfoCount; i++) { ++ /* Skip queue families without sufficient timestamp valid bits. ++ * Also skip queue families which cannot do GRAPHICS or COMPUTE since they ++ * always heavily async in nature (DMA transfers and sparse for example). ++ * Video is also irrelvant here since it should never be a critical path ++ * in a game that wants anti-lag. */ ++ uint32_t queue_family_idx = pCreateInfo->pQueueCreateInfos[i].queueFamilyIndex; ++ if (queue_family_props[queue_family_idx].timestampValidBits != 64 || ++ !(queue_family_props[queue_family_idx].queueFlags & ++ (VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT))) ++ continue; ++ ++ for (unsigned j = 0; j < pCreateInfo->pQueueCreateInfos[i].queueCount; j++) { ++ VkQueue queue; ++ ctx->vtable.GetDeviceQueue(*pDevice, queue_family_idx, j, &queue); ++ ctx->queues[idx].queue = queue; ++ ctx->queues[idx].queue_family_idx = queue_family_idx; ++ result = init_queue_context(ctx, &ctx->queues[idx]); ++ idx++; ++ if (result != VK_SUCCESS) ++ goto fail; ++ } ++ } ++ assert(idx == num_queues); ++ fail: ++ vk_free(alloc, queue_family_props); ++ } else { ++ data = (device_data *)vk_alloc(alloc, sizeof(device_data), alignof(device_data), ++ VK_SYSTEM_ALLOCATION_SCOPE_DEVICE); ++ if (!data) ++ return VK_ERROR_OUT_OF_HOST_MEMORY; ++ result = fpCreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice); ++ data->ctx = NULL; ++ } ++ ++ if (result == VK_SUCCESS) { ++ data->device = *pDevice; ++ data->GetDeviceProcAddr = fpGetDeviceProcAddr; ++ data->next = NULL; ++ add_device(data); ++ } else { ++ vk_free(alloc, data); ++ } ++ ++ return result; ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_DestroyDevice(VkDevice pDevice, const VkAllocationCallbacks *pAllocator) ++{ ++ device_data *data = remove_device(pDevice); ++ assert(data && data->ctx); ++ device_context *ctx = data->ctx; ++ ++ /* Destroy per-queue context. ++ * The application must ensure that no work is active on the device. ++ */ ++ for (unsigned i = 0; i < ctx->num_queues; i++) { ++ queue_context *queue_ctx = &ctx->queues[i]; ++ ctx->vtable.DestroyQueryPool(ctx->device, queue_ctx->queryPool, &ctx->alloc); ++ ctx->vtable.DestroyCommandPool(ctx->device, queue_ctx->cmdPool, &ctx->alloc); ++ ctx->vtable.DestroySemaphore(ctx->device, queue_ctx->semaphore, &ctx->alloc); ++ } ++ ++ ctx->vtable.DestroyDevice(pDevice, pAllocator); ++ vk_free(&ctx->alloc, data); ++} ++ ++static bool ++is_anti_lag_supported(VkPhysicalDevice physicalDevice) ++{ ++ instance_data *data = get_instance_data(physicalDevice); ++ VkPhysicalDeviceProperties properties; ++ data->vtable.GetPhysicalDeviceProperties(physicalDevice, &properties); ++ if (properties.limits.timestampPeriod == 0.0 || !properties.limits.timestampComputeAndGraphics) ++ return false; ++ ++ /* Check whether calibrated timestamps are supported. */ ++ bool has_khr; ++ if (!check_calibrated_timestamps(data, physicalDevice, &has_khr)) ++ return false; ++ ++ /* Check whether timeline semaphores and host query reset are supported. */ ++ VkPhysicalDeviceTimelineSemaphoreFeatures timeline_semaphore = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TIMELINE_SEMAPHORE_FEATURES, ++ .timelineSemaphore = VK_FALSE, ++ }; ++ VkPhysicalDeviceHostQueryResetFeatures query_reset = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES, ++ .pNext = &timeline_semaphore, ++ .hostQueryReset = VK_FALSE, ++ }; ++ VkPhysicalDeviceFeatures2 features = { ++ .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, ++ .pNext = &query_reset, ++ }; ++ if (data->vtable.GetPhysicalDeviceFeatures2KHR) ++ data->vtable.GetPhysicalDeviceFeatures2KHR(physicalDevice, &features); ++ else if (data->vtable.GetPhysicalDeviceFeatures2) ++ data->vtable.GetPhysicalDeviceFeatures2(physicalDevice, &features); ++ if (!timeline_semaphore.timelineSemaphore || !query_reset.hostQueryReset) ++ return false; ++ ++ /* Check that DEVICE and CLOCK_MONOTONIC time domains are available. */ ++ VkResult res; ++ uint32_t count = 0; ++ PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsKHR ctd = ++ has_khr ? data->vtable.GetPhysicalDeviceCalibrateableTimeDomainsKHR ++ : data->vtable.GetPhysicalDeviceCalibrateableTimeDomainsEXT; ++ res = ctd(physicalDevice, &count, NULL); ++ VkTimeDomainKHR *time_domains = alloca(count * sizeof(VkTimeDomainKHR)); ++ res |= ctd(physicalDevice, &count, time_domains); ++ if (res != VK_SUCCESS) ++ return false; ++ ++ bool has_device_domain = false; ++ bool has_host_domain = false; ++ for (unsigned i = 0; i < count; i++) { ++ has_device_domain |= time_domains[i] == VK_TIME_DOMAIN_DEVICE_KHR; ++ has_host_domain |= time_domains[i] == VK_TIME_DOMAIN_CLOCK_MONOTONIC_KHR; ++ } ++ ++ return has_device_domain && has_host_domain; ++} ++ ++static VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, ++ uint32_t *pPropertyCount, ++ VkExtensionProperties *pProperties) ++{ ++ instance_data *instance_data = get_instance_data(physicalDevice); ++ ++ if (pLayerName && strcmp(pLayerName, "VK_LAYER_MESA_anti_lag") == 0) { ++ if (!is_anti_lag_supported(physicalDevice)) { ++ *pPropertyCount = 0; ++ return VK_SUCCESS; ++ } ++ ++ VK_OUTARRAY_MAKE_TYPED(VkExtensionProperties, out, pProperties, pPropertyCount); ++ vk_outarray_append_typed(VkExtensionProperties, &out, prop) ++ { ++ *prop = ++ (VkExtensionProperties){VK_AMD_ANTI_LAG_EXTENSION_NAME, VK_AMD_ANTI_LAG_SPEC_VERSION}; ++ } ++ return vk_outarray_status(&out); ++ } ++ ++ return instance_data->vtable.EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, ++ pPropertyCount, pProperties); ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice, ++ VkPhysicalDeviceFeatures2 *pFeatures) ++{ ++ instance_data *ctx = get_instance_data(physicalDevice); ++ ctx->vtable.GetPhysicalDeviceFeatures2(physicalDevice, pFeatures); ++ VkPhysicalDeviceAntiLagFeaturesAMD *anti_lag_features = ++ vk_find_struct(pFeatures->pNext, PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD); ++ ++ if (anti_lag_features) { ++ anti_lag_features->antiLag |= is_anti_lag_supported(physicalDevice); ++ } ++} ++ ++static VKAPI_ATTR void VKAPI_CALL ++anti_lag_GetPhysicalDeviceFeatures2KHR(VkPhysicalDevice physicalDevice, ++ VkPhysicalDeviceFeatures2 *pFeatures) ++{ ++ instance_data *ctx = get_instance_data(physicalDevice); ++ ctx->vtable.GetPhysicalDeviceFeatures2KHR(physicalDevice, pFeatures); ++ VkPhysicalDeviceAntiLagFeaturesAMD *anti_lag_features = ++ vk_find_struct(pFeatures->pNext, PHYSICAL_DEVICE_ANTI_LAG_FEATURES_AMD); ++ ++ if (anti_lag_features) { ++ anti_lag_features->antiLag |= is_anti_lag_supported(physicalDevice); ++ } ++} ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetInstanceProcAddr(VkInstance instance, const char *pName); ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetDeviceProcAddr(VkDevice device, const char *pName); ++ ++#define ADD_HOOK(fn) {"vk" #fn, (PFN_vkVoidFunction)anti_lag_##fn} ++static const struct { ++ const char *name; ++ PFN_vkVoidFunction ptr; ++} instance_funcptr_map[] = { ++ ADD_HOOK(GetInstanceProcAddr), ++ ADD_HOOK(CreateInstance), ++ ADD_HOOK(DestroyInstance), ++ ADD_HOOK(EnumerateDeviceExtensionProperties), ++ ADD_HOOK(CreateDevice), ++ ADD_HOOK(GetPhysicalDeviceFeatures2), ++ ADD_HOOK(GetPhysicalDeviceFeatures2KHR), ++}; ++ ++static const struct { ++ const char *name; ++ PFN_vkVoidFunction ptr; ++} device_funcptr_map[] = { ++ ADD_HOOK(GetDeviceProcAddr), ++ ADD_HOOK(DestroyDevice), ++ ADD_HOOK(AntiLagUpdateAMD), ++ ADD_HOOK(QueueSubmit), ++ ADD_HOOK(QueueSubmit2), ++ ADD_HOOK(QueueSubmit2KHR), ++}; ++#undef ADD_HOOK ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetInstanceProcAddr(VkInstance instance, const char *pName) ++{ ++ if (!pName) ++ return NULL; ++ ++ PFN_vkVoidFunction result = NULL; ++ if (instance) { ++ instance_data *ctx = get_instance_data(instance); ++ if (ctx) ++ result = ctx->vtable.GetInstanceProcAddr(instance, pName); ++ } ++ ++ /* Only hook instance functions which are exposed by the underlying impl. ++ * Ignore instance parameter for vkCreateInstance and vkCreateDevice. ++ */ ++ if (result || strcmp(pName, "vkCreateInstance") == 0 || strcmp(pName, "vkCreateDevice") == 0) { ++ for (uint32_t i = 0; i < ARRAY_SIZE(instance_funcptr_map); i++) { ++ if (strcmp(pName, instance_funcptr_map[i].name) == 0) ++ return instance_funcptr_map[i].ptr; ++ } ++ } ++ ++ return result; ++} ++ ++static VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL ++anti_lag_GetDeviceProcAddr(VkDevice device, const char *pName) ++{ ++ if (!pName || !device) ++ return NULL; ++ ++ device_data *data = get_device_data(device); ++ PFN_vkVoidFunction result = data->GetDeviceProcAddr(device, pName); ++ ++ /* Only hook device functions if the Layer extension is enabled. */ ++ if (data->ctx && (result || strcmp(pName, "vkAntiLagUpdateAMD") == 0)) { ++ for (uint32_t i = 0; i < ARRAY_SIZE(device_funcptr_map); i++) { ++ if (strcmp(pName, device_funcptr_map[i].name) == 0) ++ return device_funcptr_map[i].ptr; ++ } ++ } ++ ++ return result; ++} ++ ++PUBLIC VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_NegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct) ++{ ++ assert(pVersionStruct != NULL); ++ assert(pVersionStruct->sType == LAYER_NEGOTIATE_INTERFACE_STRUCT); ++ ++ if (pVersionStruct->loaderLayerInterfaceVersion >= 2) { ++ pVersionStruct->loaderLayerInterfaceVersion = 2; ++ pVersionStruct->pfnGetInstanceProcAddr = anti_lag_GetInstanceProcAddr; ++ pVersionStruct->pfnGetDeviceProcAddr = anti_lag_GetDeviceProcAddr; ++ pVersionStruct->pfnGetPhysicalDeviceProcAddr = NULL; ++ } ++ ++ return VK_SUCCESS; ++} +diff --git a/src/vulkan/anti-lag-layer/meson.build b/src/vulkan/anti-lag-layer/meson.build +new file mode 100644 +index 00000000000..264c55c8e75 +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/meson.build +@@ -0,0 +1,26 @@ ++# Copyright © 2025 Valve Corporation ++# SPDX-License-Identifier: MIT ++ ++vklayer_files = files( ++ 'anti_lag_layer.c', ++ 'anti_lag_layer_interface.c', ++) ++ ++shared_library( ++ 'VkLayer_MESA_anti_lag', ++ vklayer_files, ++ c_args : [no_override_init_args], ++ gnu_symbol_visibility : 'hidden', ++ dependencies : [ ++ idep_vulkan_util, idep_mesautil, ++ ], ++ include_directories : [inc_include, inc_util, inc_src], ++ link_args : cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro']), ++ install : true ++) ++ ++install_data( ++ files('VkLayer_MESA_anti_lag.json'), ++ install_dir : join_paths(get_option('datadir'), 'vulkan', 'implicit_layer.d'), ++ install_tag : 'runtime', ++) +diff --git a/src/vulkan/anti-lag-layer/ringbuffer.h b/src/vulkan/anti-lag-layer/ringbuffer.h +new file mode 100644 +index 00000000000..1747b7e720f +--- /dev/null ++++ b/src/vulkan/anti-lag-layer/ringbuffer.h +@@ -0,0 +1,58 @@ ++/* ++ * Copyright © 2025 Valve Corporation ++ * ++ * SPDX-License-Identifier: MIT ++ */ ++ ++#ifndef RINGBUFFER_H ++#define RINGBUFFER_H ++ ++#include "util/macros.h" ++ ++#define RINGBUFFER_DECLARE(name, type, N) \ ++ struct { \ ++ type data[N]; \ ++ uint32_t head; \ ++ uint32_t tail; \ ++ uint32_t size; \ ++ simple_mtx_t mtx; \ ++ } name ++ ++#define ringbuffer_init(buffer) \ ++ (buffer.head = buffer.tail = buffer.size = 0, simple_mtx_init(&buffer.mtx, mtx_plain)) ++ ++#define ringbuffer_lock(buffer) simple_mtx_lock(&buffer.mtx) ++#define ringbuffer_unlock(buffer) simple_mtx_unlock(&buffer.mtx) ++ ++static inline uint32_t ++__ringbuffer_add_wrap(uint32_t *val, uint32_t *size, uint32_t N) ++{ ++ uint32_t prev = *val; ++ *val = (*val + 1) % N; ++ *size = *size + 1; ++ assert(*size <= N); ++ return prev; ++} ++ ++#define ringbuffer_alloc(buffer) \ ++ (buffer.size == ARRAY_SIZE(buffer.data) \ ++ ? NULL \ ++ : &buffer.data[__ringbuffer_add_wrap(&buffer.head, &buffer.size, ARRAY_SIZE(buffer.data))]) ++ ++#define ringbuffer_free(buffer, elem) \ ++ assert(elem == NULL || elem == &buffer.data[buffer.tail]); \ ++ buffer.size--; \ ++ assert(buffer.size < ARRAY_SIZE(buffer.data)); \ ++ buffer.tail = (buffer.tail + 1) % ARRAY_SIZE(buffer.data) ++ ++#define ringbuffer_first(buffer) (&buffer.data[buffer.tail]) ++ ++#define ringbuffer_last(buffer) \ ++ (&buffer.data[(buffer.head + ARRAY_SIZE(buffer.data) - 1) % ARRAY_SIZE(buffer.data)]) ++ ++#define ringbuffer_index(buffer, elem) (elem - buffer.data) ++ ++#define ringbuffer_next(buffer, elem) \ ++ (&buffer.data[(ringbuffer_index(buffer, elem) + 1) % ARRAY_SIZE(buffer.data)]) ++ ++#endif /* RINGBUFFER_H */ +diff --git a/src/vulkan/meson.build b/src/vulkan/meson.build +index 3225b5f4a9d..cf62ecc6ae7 100644 +--- a/src/vulkan/meson.build ++++ b/src/vulkan/meson.build +@@ -98,3 +98,6 @@ endif + if with_vulkan_vram_report_limit_layer + subdir('vram-report-limit-layer') + endif ++if with_vulkan_anti_lag_layer ++ subdir('anti-lag-layer') ++endif +-- +2.50.1 + + +From e4adbbe12d9aafdaf80f340f685cf7bd7758d385 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= +Date: Thu, 30 May 2024 11:55:46 +0200 +Subject: [PATCH 07/11] util/time: add os_time_nanosleep_until() function + +Part-of: +--- + src/util/os_time.c | 16 +++++++++++++++- + src/util/os_time.h | 2 ++ + 2 files changed, 17 insertions(+), 1 deletion(-) + +diff --git a/src/util/os_time.c b/src/util/os_time.c +index da8ad7a80b8..209b7ae442c 100644 +--- a/src/util/os_time.c ++++ b/src/util/os_time.c +@@ -60,7 +60,21 @@ os_time_get_nano(void) + return ts.tv_nsec + ts.tv_sec*INT64_C(1000000000); + } + +- ++void ++os_time_nanosleep_until(int64_t deadline) ++{ ++#if DETECT_OS_LINUX || DETECT_OS_MANAGARM ++ struct timespec time; ++ time.tv_sec = deadline / INT64_C(1000000000); ++ time.tv_nsec = deadline % INT64_C(1000000000); ++ while (clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &time, &time) == EINTR); ++#else ++ int64_t duration = deadline - os_time_get_nano(); ++ if (duration > 0) { ++ os_time_sleep(duration / 1000); ++ } ++#endif ++} + + void + os_time_sleep(int64_t usecs) +diff --git a/src/util/os_time.h b/src/util/os_time.h +index 6ca37eac769..4217ff37b68 100644 +--- a/src/util/os_time.h ++++ b/src/util/os_time.h +@@ -74,6 +74,8 @@ os_localtime(const time_t *timer, struct tm *buf) + #endif + } + ++void ++os_time_nanosleep_until(int64_t deadline); + + /* + * Sleep. +-- +2.50.1 + + +From 22d1adddbaff70c62207396a12576329f477174f Mon Sep 17 00:00:00 2001 +From: Hans-Kristian Arntzen +Date: Thu, 26 Jun 2025 13:00:20 +0200 +Subject: [PATCH 08/11] anti-lag: Only consider timestamps from queues which + have presented. + +Avoids stray submissions to compute queues to nullify the delay. + +Signed-off-by: Hans-Kristian Arntzen +Part-of: +--- + src/vulkan/anti-lag-layer/anti_lag_layer.c | 24 ++++++++++++++++++- + src/vulkan/anti-lag-layer/anti_lag_layer.h | 3 +++ + .../anti-lag-layer/anti_lag_layer_interface.c | 2 ++ + 3 files changed, 28 insertions(+), 1 deletion(-) + +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer.c b/src/vulkan/anti-lag-layer/anti_lag_layer.c +index 6c21e074024..d7543a5dfd9 100644 +--- a/src/vulkan/anti-lag-layer/anti_lag_layer.c ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer.c +@@ -8,6 +8,7 @@ + #include + #include "util/os_time.h" + #include "util/simple_mtx.h" ++#include "util/u_atomic.h" + #include "vulkan/vulkan_core.h" + #include "ringbuffer.h" + #include "vk_alloc.h" +@@ -400,7 +401,11 @@ get_commandbuffer(device_context *ctx, queue_context *queue_ctx, VkCommandBuffer + /* Begin critical section. */ + ringbuffer_lock(ctx->frames); + ringbuffer_lock(queue_ctx->queries); +- struct query *query = allocate_query(ctx, queue_ctx); ++ ++ /* Don't record timestamps for queues that are not deemed sensitive to latency. */ ++ struct query *query = ++ p_atomic_read(&queue_ctx->latency_sensitive) ? allocate_query(ctx, queue_ctx) : NULL; ++ + if (query == NULL) { + ringbuffer_unlock(queue_ctx->queries); + ringbuffer_unlock(ctx->frames); +@@ -588,3 +593,20 @@ anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pS + vk_free(&ctx->alloc, buf); + return res; + } ++ ++VKAPI_ATTR VkResult VKAPI_CALL ++anti_lag_QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo) ++{ ++ /* When multiple queues are in flight, the min-delay approach ++ * has problems. An async compute queue could be submitted to ++ * with very low delay while the main graphics queue would be swamped with work. ++ * If we take a global min-delay over all queues, the algorithm would ++ * assume that there is very low delay and thus sleeps are disabled, but ++ * unless the graphics work depends directly on the async compute work, ++ * this is a false assumption. */ ++ device_context *ctx = get_device_context(queue); ++ queue_context *queue_ctx = get_queue_context(ctx, queue); ++ p_atomic_set(&queue_ctx->latency_sensitive, true); ++ ++ return ctx->vtable.QueuePresentKHR(queue, pPresentInfo); ++} +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer.h b/src/vulkan/anti-lag-layer/anti_lag_layer.h +index 31abb0f9aee..d03d246d79c 100644 +--- a/src/vulkan/anti-lag-layer/anti_lag_layer.h ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer.h +@@ -39,6 +39,7 @@ struct query { + typedef struct queue_context { + VkQueue queue; + uint32_t queue_family_idx; ++ bool latency_sensitive; + VkCommandPool cmdPool; + VkQueryPool queryPool; + VkSemaphore semaphore; +@@ -74,6 +75,7 @@ typedef struct device_context { + DECLARE_HOOK(DestroySemaphore); + DECLARE_HOOK(GetSemaphoreCounterValue); + DECLARE_HOOK(WaitSemaphores); ++ DECLARE_HOOK(QueuePresentKHR); + #undef DECLARE_HOOK + } vtable; + +@@ -105,6 +107,7 @@ VkResult anti_lag_QueueSubmit2(VkQueue queue, uint32_t submitCount, const VkSubm + VkFence fence); + VkResult anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pSubmits, + VkFence fence); ++VkResult anti_lag_QueuePresentKHR(VkQueue queue, const VkPresentInfoKHR *pPresentInfo); + + VkResult anti_lag_NegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct); + +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c b/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c +index d2ca4a7dd44..6a803e24fe6 100644 +--- a/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer_interface.c +@@ -194,6 +194,7 @@ init_device_vtable(device_context *ctx, PFN_vkGetDeviceProcAddr gpa, PFN_vkSetDe + INIT_HOOK(CmdWriteTimestamp); + INIT_HOOK(CreateSemaphore); + INIT_HOOK(DestroySemaphore); ++ INIT_HOOK(QueuePresentKHR); + INIT_HOOK_ALIAS(GetSemaphoreCounterValue, GetSemaphoreCounterValueKHR, timeline_semaphore_khr); + INIT_HOOK_ALIAS(WaitSemaphores, WaitSemaphoresKHR, timeline_semaphore_khr); + #undef INIT_HOOK +@@ -833,6 +834,7 @@ static const struct { + ADD_HOOK(QueueSubmit), + ADD_HOOK(QueueSubmit2), + ADD_HOOK(QueueSubmit2KHR), ++ ADD_HOOK(QueuePresentKHR), + }; + #undef ADD_HOOK + +-- +2.50.1 + + +From be19fb7abf7dba7aaff2ff809a6a0a8f6ac68ce4 Mon Sep 17 00:00:00 2001 +From: Hans-Kristian Arntzen +Date: Thu, 26 Jun 2025 14:22:07 +0200 +Subject: [PATCH 09/11] anti-lag: Submit timestamps early in a frame. + +Allows detecting if the queue ends up going idle due to +a cross-queue dependency. Since we're only considering delays from +specific queues, we would not be able to detect low-latency situations +arising from the start of a frame happening on async queues. + +Until we observe real work happening for a queue in a frame context, +submit timestamps ahead of any other waits. + +Signed-off-by: Hans-Kristian Arntzen +Part-of: +--- + src/vulkan/anti-lag-layer/anti_lag_layer.c | 114 ++++++++++++++++----- + 1 file changed, 86 insertions(+), 28 deletions(-) + +diff --git a/src/vulkan/anti-lag-layer/anti_lag_layer.c b/src/vulkan/anti-lag-layer/anti_lag_layer.c +index d7543a5dfd9..f730ca00f9c 100644 +--- a/src/vulkan/anti-lag-layer/anti_lag_layer.c ++++ b/src/vulkan/anti-lag-layer/anti_lag_layer.c +@@ -366,13 +366,9 @@ get_queue_context(device_context *ctx, VkQueue queue) + } + + static struct query * +-allocate_query(device_context *ctx, queue_context *queue_ctx) ++allocate_query(queue_context *queue_ctx, uint32_t frame_idx) + { +- if (!ctx->active_frame) +- return NULL; +- + /* Allow for a single frame to use at most half of the query pool. */ +- uint32_t frame_idx = ringbuffer_index(ctx->frames, ctx->active_frame); + if (queue_ctx->submissions_per_frame[frame_idx] > MAX_QUERIES / 2) + return NULL; + +@@ -394,7 +390,8 @@ allocate_query(device_context *ctx, queue_context *queue_ctx) + } + + static bool +-get_commandbuffer(device_context *ctx, queue_context *queue_ctx, VkCommandBuffer *cmdbuffer) ++get_commandbuffer(device_context *ctx, queue_context *queue_ctx, VkCommandBuffer *cmdbuffer, ++ bool has_command_buffer, bool has_wait_before_cmdbuffer, bool *early_submit) + { + uint64_t now = os_time_get_nano(); + +@@ -403,8 +400,24 @@ get_commandbuffer(device_context *ctx, queue_context *queue_ctx, VkCommandBuffer + ringbuffer_lock(queue_ctx->queries); + + /* Don't record timestamps for queues that are not deemed sensitive to latency. */ +- struct query *query = +- p_atomic_read(&queue_ctx->latency_sensitive) ? allocate_query(ctx, queue_ctx) : NULL; ++ bool need_query = ctx->active_frame && p_atomic_read(&queue_ctx->latency_sensitive); ++ uint32_t frame_idx; ++ struct query *query = NULL; ++ ++ if (need_query) { ++ assert(ctx->active_frame->state == FRAME_SUBMIT); ++ frame_idx = ringbuffer_index(ctx->frames, ctx->active_frame); ++ ++ /* For the very first submissions in a frame (until we observe real GPU work happening), ++ * we would want to submit a timestamp before anything else, including waits. ++ * This allows us to detect a sensitive queue going idle before we can submit work to it. ++ * If the queue in question depends on semaphores from other unrelated queues, ++ * we may not easily be able to detect that situation without adding a lot more complexity. ++ */ ++ *early_submit = has_wait_before_cmdbuffer && queue_ctx->submissions_per_frame[frame_idx] == 0; ++ if (has_command_buffer || *early_submit) ++ query = allocate_query(queue_ctx, frame_idx); ++ } + + if (query == NULL) { + ringbuffer_unlock(queue_ctx->queries); +@@ -421,8 +434,6 @@ get_commandbuffer(device_context *ctx, queue_context *queue_ctx, VkCommandBuffer + queue_ctx->semaphore_value++; + + /* Add new submission entry for the current frame */ +- assert(ctx->active_frame->state == FRAME_SUBMIT); +- uint32_t frame_idx = ringbuffer_index(ctx->frames, ctx->active_frame); + queue_ctx->submissions_per_frame[frame_idx]++; + + ringbuffer_unlock(queue_ctx->queries); +@@ -435,13 +446,17 @@ queue_submit2(device_context *ctx, VkQueue queue, uint32_t submitCount, + const VkSubmitInfo2 *pSubmits, VkFence fence, PFN_vkQueueSubmit2 queueSubmit2) + { + queue_context *queue_ctx = get_queue_context(ctx, queue); +- if (!ctx->active_frame || !queue_ctx) ++ if (!ctx->active_frame || !queue_ctx || !submitCount) + return queueSubmit2(queue, submitCount, pSubmits, fence); + ++ bool has_wait_before_cmdbuffer = false; + int first = -1; + VkCommandBuffer timestamp_cmdbuffer; + /* Check if any submission contains commandbuffers. */ + for (unsigned i = 0; i < submitCount; i++) { ++ if (pSubmits[i].waitSemaphoreInfoCount != 0) ++ has_wait_before_cmdbuffer = true; ++ + if (pSubmits[i].commandBufferInfoCount) { + first = i; + break; +@@ -449,23 +464,42 @@ queue_submit2(device_context *ctx, VkQueue queue, uint32_t submitCount, + } + + /* Get timestamp commandbuffer. */ +- if (first == -1 || !get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer)) ++ bool early_submit; ++ if (!get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer, first >= 0, ++ has_wait_before_cmdbuffer, &early_submit)) { + return queueSubmit2(queue, submitCount, pSubmits, fence); ++ } + + VkSubmitInfo2 *submits; + VkCommandBufferSubmitInfo *cmdbuffers; + VkSemaphoreSubmitInfo *semaphores; + VK_MULTIALLOC(ma); +- vk_multialloc_add(&ma, &submits, VkSubmitInfo2, submitCount); +- vk_multialloc_add(&ma, &cmdbuffers, VkCommandBufferSubmitInfo, +- pSubmits[first].commandBufferInfoCount + 1); +- vk_multialloc_add(&ma, &semaphores, VkSemaphoreSubmitInfo, +- pSubmits[first].signalSemaphoreInfoCount + 1); ++ ++ if (early_submit) { ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo2, submitCount + 1); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBufferSubmitInfo, 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphoreSubmitInfo, 1); ++ first = 0; ++ } else { ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo2, submitCount); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBufferSubmitInfo, ++ pSubmits[first].commandBufferInfoCount + 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphoreSubmitInfo, ++ pSubmits[first].signalSemaphoreInfoCount + 1); ++ } ++ + void *buf = vk_multialloc_zalloc(&ma, &ctx->alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); + if (!buf) + return VK_ERROR_OUT_OF_HOST_MEMORY; + +- memcpy(submits, pSubmits, sizeof(VkSubmitInfo2) * submitCount); ++ if (early_submit) { ++ memcpy(submits + 1, pSubmits, sizeof(VkSubmitInfo2) * submitCount); ++ submits[0] = (VkSubmitInfo2){.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO_2}; ++ submitCount++; ++ } else { ++ memcpy(submits, pSubmits, sizeof(VkSubmitInfo2) * submitCount); ++ } ++ + VkSubmitInfo2 *submit_info = &submits[first]; + + /* Add commandbuffer to submission. */ +@@ -518,13 +552,17 @@ anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pS + { + device_context *ctx = get_device_context(queue); + queue_context *queue_ctx = get_queue_context(ctx, queue); +- if (!ctx->active_frame || !queue_ctx) ++ if (!ctx->active_frame || !queue_ctx || !submitCount) + return ctx->vtable.QueueSubmit(queue, submitCount, pSubmits, fence); + ++ bool has_wait_before_cmdbuffer = false; + int first = -1; + VkCommandBuffer timestamp_cmdbuffer; +- /* Check if any submission contains commandbuffers. */ ++ /* Check if any submission contains commandbuffers or waits before those. */ + for (unsigned i = 0; i < submitCount; i++) { ++ if (pSubmits[i].waitSemaphoreCount != 0) ++ has_wait_before_cmdbuffer = true; ++ + if (pSubmits[i].commandBufferCount) { + first = i; + break; +@@ -532,8 +570,11 @@ anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pS + } + + /* Get timestamp commandbuffer. */ +- if (first == -1 || !get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer)) ++ bool early_submit; ++ if (!get_commandbuffer(ctx, queue_ctx, ×tamp_cmdbuffer, first >= 0, ++ has_wait_before_cmdbuffer, &early_submit)) { + return ctx->vtable.QueueSubmit(queue, submitCount, pSubmits, fence); ++ } + + VkSubmitInfo *submits; + VkCommandBuffer *cmdbuffers; +@@ -541,16 +582,33 @@ anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pS + VkTimelineSemaphoreSubmitInfo *semaphore_info; + uint64_t *semaphore_values; + VK_MULTIALLOC(ma); +- vk_multialloc_add(&ma, &submits, VkSubmitInfo, submitCount); +- vk_multialloc_add(&ma, &cmdbuffers, VkCommandBuffer, pSubmits[first].commandBufferCount + 1); +- vk_multialloc_add(&ma, &semaphores, VkSemaphore, pSubmits[first].signalSemaphoreCount + 1); +- vk_multialloc_add(&ma, &semaphore_info, VkTimelineSemaphoreSubmitInfo, 1); +- vk_multialloc_add(&ma, &semaphore_values, uint64_t, pSubmits[first].signalSemaphoreCount + 1); ++ ++ if (early_submit) { ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo, submitCount + 1); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBuffer, 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphore, 1); ++ vk_multialloc_add(&ma, &semaphore_info, VkTimelineSemaphoreSubmitInfo, 1); ++ vk_multialloc_add(&ma, &semaphore_values, uint64_t, 1); ++ first = 0; ++ } else { ++ vk_multialloc_add(&ma, &submits, VkSubmitInfo, submitCount); ++ vk_multialloc_add(&ma, &cmdbuffers, VkCommandBuffer, pSubmits[first].commandBufferCount + 1); ++ vk_multialloc_add(&ma, &semaphores, VkSemaphore, pSubmits[first].signalSemaphoreCount + 1); ++ vk_multialloc_add(&ma, &semaphore_info, VkTimelineSemaphoreSubmitInfo, 1); ++ vk_multialloc_add(&ma, &semaphore_values, uint64_t, pSubmits[first].signalSemaphoreCount + 1); ++ } + void *buf = vk_multialloc_zalloc(&ma, &ctx->alloc, VK_SYSTEM_ALLOCATION_SCOPE_COMMAND); + if (!buf) + return VK_ERROR_OUT_OF_HOST_MEMORY; + +- memcpy(submits, pSubmits, sizeof(VkSubmitInfo) * submitCount); ++ if (early_submit) { ++ memcpy(submits + 1, pSubmits, sizeof(VkSubmitInfo) * submitCount); ++ submits[0] = (VkSubmitInfo){.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO}; ++ submitCount++; ++ } else { ++ memcpy(submits, pSubmits, sizeof(VkSubmitInfo) * submitCount); ++ } ++ + VkSubmitInfo *submit_info = &submits[first]; + + /* Add commandbuffer to submission. */ +@@ -562,7 +620,7 @@ anti_lag_QueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo *pS + + /* Add timeline semaphore to submission. */ + const VkTimelineSemaphoreSubmitInfo *tlssi = +- vk_find_struct_const(pSubmits[first].pNext, TIMELINE_SEMAPHORE_SUBMIT_INFO); ++ vk_find_struct_const(submit_info->pNext, TIMELINE_SEMAPHORE_SUBMIT_INFO); + semaphores[0] = queue_ctx->semaphore; + memcpy(&semaphores[1], submit_info->pSignalSemaphores, + sizeof(VkSemaphore) * submit_info->signalSemaphoreCount); +-- +2.50.1 + + +From aaaa9d5cd9891b88b8a94692f0f49036233da227 Mon Sep 17 00:00:00 2001 +From: Kyle Gospodnetich +Date: Sun, 18 May 2025 09:40:01 -0700 +Subject: [PATCH 10/11] [BEGIN] Proton-GE Patches + +-- +2.50.1 + + +From c4bb61d428cc14bc21f9a10f530fd37aa32a4c24 Mon Sep 17 00:00:00 2001 +From: Kyle Gospodnetich +Date: Sun, 18 May 2025 09:42:23 -0700 +Subject: [PATCH 11/11] radv: min image count patch for Wine Wayland/Path of + Exile 2 Credit to Glorious Eggroll. + +--- + src/amd/vulkan/radv_instance.c | 2 +- + src/asahi/vulkan/hk_instance.c | 2 +- + src/freedreno/vulkan/tu_device.cc | 2 +- + src/intel/vulkan/anv_instance.c | 2 +- + src/intel/vulkan_hasvk/anv_device.c | 2 +- + src/nouveau/vulkan/nvk_instance.c | 2 +- + src/panfrost/vulkan/panvk_instance.c | 2 +- + src/util/00-mesa-defaults.conf | 10 ++++++---- + src/util/driconf.h | 4 ++-- + src/virtio/vulkan/vn_instance.c | 2 +- + src/vulkan/wsi/wsi_common.c | 2 +- + src/vulkan/wsi/wsi_common.h | 4 ++++ + src/vulkan/wsi/wsi_common_private.h | 3 ++- + src/vulkan/wsi/wsi_common_wayland.c | 21 +++++++++++++++++---- + src/vulkan/wsi/wsi_common_x11.c | 4 ++-- + 15 files changed, 42 insertions(+), 22 deletions(-) + +diff --git a/src/amd/vulkan/radv_instance.c b/src/amd/vulkan/radv_instance.c +index 6bcf18847bd..2773003911b 100644 +--- a/src/amd/vulkan/radv_instance.c ++++ b/src/amd/vulkan/radv_instance.c +@@ -151,7 +151,7 @@ static const struct debug_control trace_options[] = { + static const driOptionDescription radv_dri_options[] = { + DRI_CONF_SECTION_PERFORMANCE + DRI_CONF_ADAPTIVE_SYNC(true) +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false) + DRI_CONF_VK_KHR_PRESENT_WAIT(false) +diff --git a/src/asahi/vulkan/hk_instance.c b/src/asahi/vulkan/hk_instance.c +index 69e315ff979..b0361133793 100644 +--- a/src/asahi/vulkan/hk_instance.c ++++ b/src/asahi/vulkan/hk_instance.c +@@ -80,7 +80,7 @@ hk_EnumerateInstanceExtensionProperties(const char *pLayerName, + static const driOptionDescription hk_dri_options[] = { + DRI_CONF_SECTION_PERFORMANCE + DRI_CONF_ADAPTIVE_SYNC(true) +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false) + DRI_CONF_VK_KHR_PRESENT_WAIT(false) +diff --git a/src/freedreno/vulkan/tu_device.cc b/src/freedreno/vulkan/tu_device.cc +index 2c72aff780d..f9d95c63bbe 100644 +--- a/src/freedreno/vulkan/tu_device.cc ++++ b/src/freedreno/vulkan/tu_device.cc +@@ -1671,7 +1671,7 @@ tu_destroy_physical_device(struct vk_physical_device *device) + + static const driOptionDescription tu_dri_options[] = { + DRI_CONF_SECTION_PERFORMANCE +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_KHR_PRESENT_WAIT(false) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false) +diff --git a/src/intel/vulkan/anv_instance.c b/src/intel/vulkan/anv_instance.c +index 268a5f3425b..0ab889654ae 100644 +--- a/src/intel/vulkan/anv_instance.c ++++ b/src/intel/vulkan/anv_instance.c +@@ -10,7 +10,7 @@ + static const driOptionDescription anv_dri_options[] = { + DRI_CONF_SECTION_PERFORMANCE + DRI_CONF_ADAPTIVE_SYNC(true) +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_KHR_PRESENT_WAIT(false) + DRI_CONF_VK_XWAYLAND_WAIT_READY(false) +diff --git a/src/intel/vulkan_hasvk/anv_device.c b/src/intel/vulkan_hasvk/anv_device.c +index 81f08e50e5d..7e9d43df7ce 100644 +--- a/src/intel/vulkan_hasvk/anv_device.c ++++ b/src/intel/vulkan_hasvk/anv_device.c +@@ -65,7 +65,7 @@ + static const driOptionDescription anv_dri_options[] = { + DRI_CONF_SECTION_PERFORMANCE + DRI_CONF_ADAPTIVE_SYNC(true) +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_KHR_PRESENT_WAIT(false) + DRI_CONF_VK_XWAYLAND_WAIT_READY(true) +diff --git a/src/nouveau/vulkan/nvk_instance.c b/src/nouveau/vulkan/nvk_instance.c +index 37e7abe1584..29da7e3a0b3 100644 +--- a/src/nouveau/vulkan/nvk_instance.c ++++ b/src/nouveau/vulkan/nvk_instance.c +@@ -98,7 +98,7 @@ nvk_init_debug_flags(struct nvk_instance *instance) + static const driOptionDescription nvk_dri_options[] = { + DRI_CONF_SECTION_PERFORMANCE + DRI_CONF_ADAPTIVE_SYNC(true) +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false) + DRI_CONF_VK_KHR_PRESENT_WAIT(false) +diff --git a/src/panfrost/vulkan/panvk_instance.c b/src/panfrost/vulkan/panvk_instance.c +index 31abc8f4369..8c8f7a8ca0c 100644 +--- a/src/panfrost/vulkan/panvk_instance.c ++++ b/src/panfrost/vulkan/panvk_instance.c +@@ -151,7 +151,7 @@ panvk_kmod_free(const struct pan_kmod_allocator *allocator, void *data) + static const driOptionDescription panvk_dri_options[] = { + DRI_CONF_SECTION_PERFORMANCE + DRI_CONF_ADAPTIVE_SYNC(true) +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false) + DRI_CONF_VK_KHR_PRESENT_WAIT(false) +diff --git a/src/util/00-mesa-defaults.conf b/src/util/00-mesa-defaults.conf +index d42526732fa..eaab8afc3e9 100644 +--- a/src/util/00-mesa-defaults.conf ++++ b/src/util/00-mesa-defaults.conf +@@ -634,24 +634,24 @@ TODO: document the other workarounds. + + + + + +- + + +- + + + +- + +@@ -712,10 +712,12 @@ TODO: document the other workarounds. + + + + + + + + +diff --git a/src/util/driconf.h b/src/util/driconf.h +index 8faa15fb560..c94de3f45fe 100644 +--- a/src/util/driconf.h ++++ b/src/util/driconf.h +@@ -449,8 +449,8 @@ + DRI_CONF_OPT_B(vk_wsi_force_swapchain_to_current_extent, def, \ + "Force VkSwapchainCreateInfoKHR::imageExtent to be VkSurfaceCapabilities2KHR::currentExtent") + +-#define DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(def) \ +- DRI_CONF_OPT_I(vk_x11_override_min_image_count, def, 0, 999, \ ++#define DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(def) \ ++ DRI_CONF_OPT_I(vk_override_min_image_count, def, 0, 999, \ + "Override the VkSurfaceCapabilitiesKHR::minImageCount (0 = no override)") + + #define DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(def) \ +diff --git a/src/virtio/vulkan/vn_instance.c b/src/virtio/vulkan/vn_instance.c +index 1942d77f67c..23c8e19188c 100644 +--- a/src/virtio/vulkan/vn_instance.c ++++ b/src/virtio/vulkan/vn_instance.c +@@ -70,8 +70,8 @@ static const struct vk_instance_extension_table + static const driOptionDescription vn_dri_options[] = { + /* clang-format off */ + DRI_CONF_SECTION_PERFORMANCE ++ DRI_CONF_VK_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_ENSURE_MIN_IMAGE_COUNT(false) +- DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0) + DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false) + DRI_CONF_VK_XWAYLAND_WAIT_READY(true) + DRI_CONF_VENUS_IMPLICIT_FENCING(false) +diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c +index f78e4baa22a..047d5dcdeaf 100644 +--- a/src/vulkan/wsi/wsi_common.c ++++ b/src/vulkan/wsi/wsi_common.c +@@ -220,7 +220,7 @@ wsi_device_init(struct wsi_device *wsi, + #endif + + #ifdef VK_USE_PLATFORM_WAYLAND_KHR +- result = wsi_wl_init_wsi(wsi, alloc, pdevice); ++ result = wsi_wl_init_wsi(wsi, alloc, pdevice, dri_options); + if (result != VK_SUCCESS) + goto fail; + #endif +diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h +index 44c81ccddf0..a97e7c2a948 100644 +--- a/src/vulkan/wsi/wsi_common.h ++++ b/src/vulkan/wsi/wsi_common.h +@@ -209,6 +209,10 @@ struct wsi_device { + struct { + /* Don't use the commit-timing protocol for pacing */ + bool disable_timestamps; ++ ++ /* Override the minimum number of images on the swapchain. ++ * 0 = no override */ ++ double override_minImageCount; + } wayland; + + /* +diff --git a/src/vulkan/wsi/wsi_common_private.h b/src/vulkan/wsi/wsi_common_private.h +index f138fee5519..1d1b55ac7e5 100644 +--- a/src/vulkan/wsi/wsi_common_private.h ++++ b/src/vulkan/wsi/wsi_common_private.h +@@ -420,7 +420,8 @@ void wsi_x11_finish_wsi(struct wsi_device *wsi_device, + const VkAllocationCallbacks *alloc); + VkResult wsi_wl_init_wsi(struct wsi_device *wsi_device, + const VkAllocationCallbacks *alloc, +- VkPhysicalDevice physical_device); ++ VkPhysicalDevice physical_device, ++ const struct driOptionCache *dri_options); + void wsi_wl_finish_wsi(struct wsi_device *wsi_device, + const VkAllocationCallbacks *alloc); + VkResult wsi_win32_init_wsi(struct wsi_device *wsi_device, +diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c +index dd15d03846b..df68d2ea006 100644 +--- a/src/vulkan/wsi/wsi_common_wayland.c ++++ b/src/vulkan/wsi/wsi_common_wayland.c +@@ -58,6 +58,7 @@ + #include + #include + #include ++#include + + #include + +@@ -1668,9 +1669,12 @@ wsi_wl_surface_get_support(VkIcdSurfaceBase *surface, + #define WSI_WL_DEFAULT_NUM_IMAGES 3 + + static uint32_t +-wsi_wl_surface_get_min_image_count(struct wsi_wl_display *display, ++wsi_wl_surface_get_min_image_count(struct wsi_device *wsi_device, struct wsi_wl_display *display, + const VkSurfacePresentModeEXT *present_mode) + { ++ if (wsi_device->wayland.override_minImageCount) ++ return wsi_device->wayland.override_minImageCount; ++ + if (present_mode) { + return present_mode->presentMode == VK_PRESENT_MODE_MAILBOX_KHR ? + WSI_WL_BUMPED_NUM_IMAGES : WSI_WL_DEFAULT_NUM_IMAGES; +@@ -1719,7 +1723,7 @@ wsi_wl_surface_get_capabilities(VkIcdSurfaceBase *icd_surface, + display = &temp_display; + } + +- caps->minImageCount = wsi_wl_surface_get_min_image_count(display, present_mode); ++ caps->minImageCount = wsi_wl_surface_get_min_image_count(wsi_device, display, present_mode); + + if (!wsi_wl_surface->display) + wsi_wl_display_finish(&temp_display); +@@ -3481,7 +3485,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, + const VkSurfacePresentModeEXT mode = + { VK_STRUCTURE_TYPE_SURFACE_PRESENT_MODE_EXT, NULL, pCreateInfo->presentMode }; + +- uint32_t min_images = wsi_wl_surface_get_min_image_count(wsi_wl_surface->display, &mode); ++ uint32_t min_images = wsi_wl_surface_get_min_image_count(wsi_device, wsi_wl_surface->display, &mode); + bool requires_image_count_bump = min_images == WSI_WL_BUMPED_NUM_IMAGES; + if (requires_image_count_bump) + num_images = MAX2(min_images, num_images); +@@ -3676,7 +3680,8 @@ fail: + VkResult + wsi_wl_init_wsi(struct wsi_device *wsi_device, + const VkAllocationCallbacks *alloc, +- VkPhysicalDevice physical_device) ++ VkPhysicalDevice physical_device, ++ const struct driOptionCache *dri_options) + { + struct wsi_wayland *wsi; + VkResult result; +@@ -3702,6 +3707,14 @@ wsi_wl_init_wsi(struct wsi_device *wsi_device, + + wsi_device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND] = &wsi->base; + ++ if (dri_options) ++ { ++ if (driCheckOption(dri_options, "vk_override_min_image_count", DRI_INT)) { ++ wsi_device->wayland.override_minImageCount = ++ driQueryOptioni(dri_options, "vk_override_min_image_count"); ++ } ++ } ++ + return VK_SUCCESS; + + fail: +diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c +index 2edb7bf2bf3..0f9e2a422c0 100644 +--- a/src/vulkan/wsi/wsi_common_x11.c ++++ b/src/vulkan/wsi/wsi_common_x11.c +@@ -2924,9 +2924,9 @@ wsi_x11_init_wsi(struct wsi_device *wsi_device, + } + + if (dri_options) { +- if (driCheckOption(dri_options, "vk_x11_override_min_image_count", DRI_INT)) { ++ if (driCheckOption(dri_options, "vk_override_min_image_count", DRI_INT)) { + wsi_device->x11.override_minImageCount = +- driQueryOptioni(dri_options, "vk_x11_override_min_image_count"); ++ driQueryOptioni(dri_options, "vk_override_min_image_count"); + } + if (driCheckOption(dri_options, "vk_x11_strict_image_count", DRI_BOOL)) { + wsi_device->x11.strict_imageCount = +-- +2.50.1 + diff --git a/anda/lib/mesa/gnome-shell-glthread-disable.patch b/anda/lib/mesa/gnome-shell-glthread-disable.patch new file mode 100644 index 0000000000..b2caeb8df5 --- /dev/null +++ b/anda/lib/mesa/gnome-shell-glthread-disable.patch @@ -0,0 +1,11 @@ +diff -up mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf +--- mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf.dma 2022-11-25 10:32:32.175879868 +1000 ++++ mesa-22.3.0-rc4/src/util/00-mesa-defaults.conf 2022-11-25 10:32:43.743067470 +1000 +@@ -653,6 +653,7 @@ TODO: document the other workarounds. + + + +

  • `.find(get("https://sndio.org"), 1)); diff --git a/anda/multimedia/vvenc/update.rhai b/anda/multimedia/vvenc/update.rhai new file mode 100644 index 0000000000..cb650ae083 --- /dev/null +++ b/anda/multimedia/vvenc/update.rhai @@ -0,0 +1,4 @@ +let v = gh_tag("fraunhoferhhi/vvenc"); +if `[\d.]+-rc\d+`.find_all(v).len == 0 { + rpm.version(v); +} diff --git a/anda/multimedia/vvenc/vvenc.spec b/anda/multimedia/vvenc/vvenc.spec index 260403c943..40d7399898 100644 --- a/anda/multimedia/vvenc/vvenc.spec +++ b/anda/multimedia/vvenc/vvenc.spec @@ -1,15 +1,24 @@ +%global build_cxxflags %{__build_flags_lang_cxx} %{?_distro_extra_cxxflags} -Wno-error=maybe-uninitialized -Wno-error=uninitialized + Name: vvenc -Version: 1.12.1 -Release: 1%{?dist} +Version: 1.13.1 +Release: 3%{?dist} Summary: VVenC, the Fraunhofer Versatile Video Encoder License: BSD-3-Clause URL: https://github.com/fraunhoferhhi/%{name} Source0: %{url}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +# Fixes for i386/ARM32 builds +Patch0: %{url}/commit/ebce395254d9d7be7dc00cec7b49c7ed1d9eebec.patch +Patch1: %{url}/commit/bfd55ee783bfe30fc73f6f314b066b84bb1e5b60.patch +Patch2: %{url}/commit/982fcaac22488415899ae6c6ef7977a728a88e94.patch BuildRequires: cmake BuildRequires: gcc-c++ +# Define this after the version is defined +%global vvenc_majorminor %(v=%{version}; echo ${v:0:4}) + %description VVenC, the Fraunhofer Versatile Video Encoder, is a fast and efficient software H.266/VVC encoder implementation with the following main features: @@ -40,7 +49,6 @@ developing applications that use %{name}. %autosetup -p1 %build -export CXXFLAGS="%{optflags} -Wno-error=maybe-uninitialized -Wno-error=uninitialized" %cmake \ -DCMAKE_SKIP_INSTALL_RPATH=OFF \ -DVVENC_INSTALL_FULLFEATURE_APP=ON @@ -56,7 +64,7 @@ export CXXFLAGS="%{optflags} -Wno-error=maybe-uninitialized -Wno-error=uninitial %files libs %license LICENSE.txt %doc README.md changelog.txt -%{_libdir}/lib%{name}.so.1.12 +%{_libdir}/lib%{name}.so.%{vvenc_majorminor} %{_libdir}/lib%{name}.so.%{version} %files devel @@ -66,8 +74,4 @@ export CXXFLAGS="%{optflags} -Wno-error=maybe-uninitialized -Wno-error=uninitial %{_libdir}/pkgconfig/lib%{name}.pc %changelog -* Mon Nov 11 2024 Simone Caronni - 1.12.1-1 -- Update to 1.12.1. - -* Mon Aug 19 2024 Simone Caronni - 1.12.0-1 -- First build. \ No newline at end of file +%autochangelog diff --git a/anda/multimedia/x264/x264.spec b/anda/multimedia/x264/x264.spec index 544683a41d..db33845824 100644 --- a/anda/multimedia/x264/x264.spec +++ b/anda/multimedia/x264/x264.spec @@ -36,7 +36,7 @@ Summary: H264/AVC video streams encoder Name: x264 Version: 0.%{api} -Release: 15%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist} +Release: 16%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist} License: GPLv2+ URL: https://www.videolan.org/developers/x264.html Source0: https://code.videolan.org/videolan/x264/-/archive/%gitversion.tar.bz2 @@ -93,6 +93,8 @@ scratch. This package contains the development files. +%pkg_completion -B x264 + %global x_configure \ ./configure \\\ --host=%{_host} \\\ @@ -177,9 +179,6 @@ install -pm644 generic/{AUTHORS,COPYING} %{buildroot}%{_pkgdocdir}/ %files %{_bindir}/x264 -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/x264 %files libs %dir %{_pkgdocdir} diff --git a/anda/multimedia/zrythm/zrythm.spec b/anda/multimedia/zrythm/zrythm.spec index 0693700124..40d41b235f 100644 --- a/anda/multimedia/zrythm/zrythm.spec +++ b/anda/multimedia/zrythm/zrythm.spec @@ -2,7 +2,7 @@ Name: zrythm Version: %(echo %v | sed 's@-@~@g' | sed 's@^v@@') -Release: 1%?dist +Release: 2%?dist Summary: Highly automated and intuitive digital audio workstation License: AGPL-3.0-or-later Packager: madonuko @@ -97,6 +97,8 @@ tools, limitless automation capabilities, powerful mixing features, chord assistance and support for various plugin and file formats. +%pkg_completion -Bf + %prep %autosetup -n %name-%v @@ -136,5 +138,3 @@ CXXFLAGS=$(echo "$CFLAGS -fuse-ld=mold" | sed -E "s@\b-Werror\b@@") %_datadir/mime/packages/org.zrythm.Zrythm-mime.xml %_datadir/metainfo/org.zrythm.Zrythm.appdata.xml %_mandir/man1/zrythm.1.* -%bash_completions_dir/zrythm -%fish_completions_dir/zrythm.fish diff --git a/anda/stardust/magnetar/stardust-magnetar.spec b/anda/stardust/magnetar/stardust-magnetar.spec index f88d40193f..d2e3deef8d 100644 --- a/anda/stardust/magnetar/stardust-magnetar.spec +++ b/anda/stardust/magnetar/stardust-magnetar.spec @@ -1,5 +1,5 @@ -%global commit d00c5ecf0bcaf2b4382ec3b4f3373ea5b761ee7b -%global commit_date 20241230 +%global commit 63ff648bb64c23023a0047ea3ff2c0b6b1fd3caf +%global commit_date 20250404 %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Exclude input files from mangling %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ diff --git a/anda/stardust/server/stardust-server.spec b/anda/stardust/server/stardust-server.spec index 195de310b9..f77eab6e01 100644 --- a/anda/stardust/server/stardust-server.spec +++ b/anda/stardust/server/stardust-server.spec @@ -1,15 +1,15 @@ -%global commit c830becbff8907809c87dc0949f9a0abd4d77ed6 -%global commit_date 20241102 +%global commit 3e31905b5bc9bd78e285099ed94a4b31fdc6810b +%global commit_date 20250402 %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Exclude input files from mangling %global __brp_mangle_shebangs_exclude_from ^/usr/src/.*$ Name: stardust-xr-server -Version: 0.45.1 +Version: %commit_date.%shortcommit Release: 1%?dist Summary: Usable Linux display server that reinvents human-computer interaction for all kinds of XR. URL: https://github.com/StardustXR/server -Source0: %url/archive/refs/tags/%version.tar.gz +Source0: %url/archive/%commit/server-%commit.tar.gz License: GPL-2.0-only BuildRequires: cargo cmake anda-srpm-macros cargo-rpm-macros gcc-c++ mold @@ -24,7 +24,7 @@ Packager: Owen Zimmerman Usable Linux display server that reinvents human-computer interaction for all kinds of XR, from putting 2D/XR apps into various 3D shells for varying uses to SDF-based interaction. %prep -%autosetup -n server-%version +%autosetup -n server-%commit %cargo_prep_online %build diff --git a/anda/stardust/telescope/stardust-telescope.spec b/anda/stardust/telescope/stardust-telescope.spec index 6e2fcc55a5..5830464444 100644 --- a/anda/stardust/telescope/stardust-telescope.spec +++ b/anda/stardust/telescope/stardust-telescope.spec @@ -1,7 +1,7 @@ %define debug_package %nil -%global commit 31aaa1d6a3c1cbf1795981432c9ec2cbcc142ba9 -%global commit_date 20250121 +%global commit e33764c69179e35b60ad03931544a87357e1e81f +%global commit_date 20250413 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: stardust-xr-telescope diff --git a/anda/system/avstplg/avstplg.spec b/anda/system/avstplg/avstplg.spec index 4c5b15e060..e77934e578 100644 --- a/anda/system/avstplg/avstplg.spec +++ b/anda/system/avstplg/avstplg.spec @@ -1,5 +1,5 @@ -%global commit e1176e63ccbee51ab59fdb8afaed2bf5af8427d1 -%global commit_date 20240711 +%global commit 11f6a53130182a85908505b9120313f8b817f32c +%global commit_date 20250328 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global debug_package %{nil} %define __os_install_post %{nil} diff --git a/anda/system/cros-keyboard-map/cros-keyboard-map.spec b/anda/system/cros-keyboard-map/cros-keyboard-map.spec index 6893b3cdbc..4401eb3229 100644 --- a/anda/system/cros-keyboard-map/cros-keyboard-map.spec +++ b/anda/system/cros-keyboard-map/cros-keyboard-map.spec @@ -1,6 +1,6 @@ -%global commit_date 20250123 +%global commit_date 20250619 -%global tree_commit 4647ce2297a7142dabe3cae1de718a69cb370448 +%global tree_commit 4e12f63955c1309c4e9580841083f05614f9e367 %global tree_shortcommit %(c=%{tree_commit}; echo ${c:0:7}) %global um_commit 46892acafb2fff3f3ace425d4694382c92645feb diff --git a/anda/system/cros-keyboard-map/update.rhai b/anda/system/cros-keyboard-map/update.rhai index aef26dd922..b2a2ff53f4 100644 --- a/anda/system/cros-keyboard-map/update.rhai +++ b/anda/system/cros-keyboard-map/update.rhai @@ -1,6 +1,6 @@ if filters.contains("nightly") { rpm.global("tree_commit", gh_commit("WeirdTreeThing/cros-keyboard-map")); - rpm.global("commit", gh_commit("WeirdTreeThing/cros-keyboard-map")); + rpm.global("um_commit", gh_commit("Ultramarine-Linux/cros-keyboard-map")); if rpm.changed() { rpm.release(); rpm.global("commit_date", date()); diff --git a/anda/system/depthcharge-tools/depthcharge-tools.spec b/anda/system/depthcharge-tools/depthcharge-tools.spec index 02f2cf57b0..77bc2946e1 100644 --- a/anda/system/depthcharge-tools/depthcharge-tools.spec +++ b/anda/system/depthcharge-tools/depthcharge-tools.spec @@ -1,10 +1,10 @@ Name: depthcharge-tools -Version: 0.6.2 +Version: 0.6.3 Release: 1%?dist Summary: Tools to manage the Chrome OS bootloader License: GPL-2.0-or-later -URL: https://github.com/alpernebbi/depthcharge-tools -Source0: %url/archive/v%version/v%version.tar.gz +URL: https://gitlab.postmarketos.org/postmarketOS/depthcharge-tools +Source0: %url/-/archive/v%version/%name-v%version.tar.gz Requires: vboot-utils dtc gzip lz4 python3-setuptools uboot-tools vboot-utils xz BuildRequires: python3-setuptools python3-rpm-macros systemd-rpm-macros redhat-rpm-config python3-docutils BuildArch: noarch @@ -13,8 +13,10 @@ BuildArch: noarch depthcharge-tools is a collection of tools that ease and automate interacting with depthcharge, the Chrome OS bootloader. +%pkg_completion -Bz mkdepthcharge depthchargectl + %prep -%autosetup +%autosetup -n %name-v%version %build python3 setup.py build @@ -26,7 +28,8 @@ install -Dm644 systemd/*.install %buildroot/usr/lib/kernel/install.d/ install -Dm644 systemd/*.service %buildroot%_unitdir/ install -Dm644 completions/_mkdepthcharge.bash %buildroot%bash_completions_dir/mkdepthcharge install -Dm644 completions/_depthchargectl.bash %buildroot%bash_completions_dir/depthchargectl -install -Dm644 completions/_{mkdepthcharge,depthchargectl}.zsh %buildroot%zsh_completions_dir/ +install -Dm644 completions/_mkdepthcharge.zsh %buildroot%zsh_completions_dir/_mkdepthcharge +install -Dm644 completions/_depthchargectl.zsh %buildroot%zsh_completions_dir/_depthchargectl rst2man mkdepthcharge.rst | gzip > mkdepthcharge.1.gz rst2man depthchargectl.rst | gzip > depthchargectl.1.gz install -Dm644 *.1.gz %buildroot%_mandir/man1/ @@ -36,10 +39,8 @@ install -Dm644 *.1.gz %buildroot%_mandir/man1/ %license LICENSE %_bindir/{mkdepthcharge,depthchargectl} %_mandir/man1/{mkdepthcharge,depthchargectl}.1.gz -%bash_completions_dir/{mkdepthcharge,depthchargectl} /usr/lib/kernel/install.d/90-depthcharge-tools.install %_unitdir/depthchargectl-bless.service -%zsh_completions_dir/_{mkdepthcharge,depthchargectl}.zsh %_prefix/lib/python%python3_version/site-packages/depthcharge_tools-%version-py%python3_version.egg-info/ %_prefix/lib/python%python3_version/site-packages/depthcharge_tools/ diff --git a/anda/system/depthcharge-tools/update.rhai b/anda/system/depthcharge-tools/update.rhai index 9994806760..8f693f252d 100644 --- a/anda/system/depthcharge-tools/update.rhai +++ b/anda/system/depthcharge-tools/update.rhai @@ -1 +1 @@ -rpm.version(gh("alpernebbi/depthcharge-tools")); +rpm.version(gitlab_tag("gitlab.postmarketos.org", "685")); diff --git a/anda/system/dracut-strip-trigger/LICENSE b/anda/system/dracut-strip-trigger/LICENSE new file mode 120000 index 0000000000..5853aaea53 --- /dev/null +++ b/anda/system/dracut-strip-trigger/LICENSE @@ -0,0 +1 @@ +../../../LICENSE \ No newline at end of file diff --git a/anda/system/dracut-strip-trigger/anda.hcl b/anda/system/dracut-strip-trigger/anda.hcl new file mode 100644 index 0000000000..d6b890bd3f --- /dev/null +++ b/anda/system/dracut-strip-trigger/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "dracut-strip-trigger.spec" + } +} diff --git a/anda/system/dracut-strip-trigger/dracut-strip-trigger.spec b/anda/system/dracut-strip-trigger/dracut-strip-trigger.spec new file mode 100644 index 0000000000..d788cbaa62 --- /dev/null +++ b/anda/system/dracut-strip-trigger/dracut-strip-trigger.spec @@ -0,0 +1,37 @@ +Name: dracut-strip-trigger +Version: 0 +Release: 3%?dist +Summary: Strip initramfs aggressively +License: GPL-3.0-only +Requires(post): dracut +Source0: LICENSE + +%global _desc %{expand: +Strip initramfs automatically for each kernel update using --hostonly --aggressive-strip. +Do not install this package if you plan to use the system on different devices (e.g. +raw images like Raspberry Pi images).} + +%description %_desc + +%prep +cat< README +%name %_desc +EOF +cp %{S:0} . + +%files +%doc README +%license LICENSE + +%post +echo 'Regenerating all initramfs…' +dracut --force --parallel --regenerate-all --hostonly --strip --aggressive-strip +echo 'All non-rescue initramfs have been regenerated.' +echo 'If you have problems booting up, use the rescue image, then uninstall `%name`.' + +%triggerpostun -- installonlypkg(kernel) +dracut --force --hostonly --strip --aggressive-strip + +%postun +echo 'Regenerating all initramfs…' +[ $1 = 0 ] && dracut --force --parallel --regenerate-all --no-hostonly --strip diff --git a/anda/system/epsonscan2/anda.hcl b/anda/system/epsonscan2/anda.hcl new file mode 100644 index 0000000000..c520cd979d --- /dev/null +++ b/anda/system/epsonscan2/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "epsonscan2.spec" + } +} diff --git a/anda/system/epsonscan2/epsonscan2.spec b/anda/system/epsonscan2/epsonscan2.spec new file mode 100644 index 0000000000..1a7e6616cf --- /dev/null +++ b/anda/system/epsonscan2/epsonscan2.spec @@ -0,0 +1,119 @@ +# Despite supposedly being a purely C++ project it will not build without this flag. Don't ask me. +%global build_cflags %{__build_flags_lang_c} %{?_distro_extra_cflags} -Wno-implicit-function-declaration +%global build_cxxflags %(%{__build_flags_lang_cxx}) %{?_distro_extra_cxxflags} -Wno-template-body + +Name: epsonscan2 +Version: 6.7.70.0 +Release: 1 +Summary: Package for Epson scanner drivers and software +# This was a licensing determination nightmare +License: LGPL-2.1-or-later AND MIT AND Zlib AND LicenseRef-SHA1 +URL: https://support.epson.net/linux/en/epsonscan2.php +# This software doesn't have versioned download links, absolute nightmare +Source0: https://download3.ebz.epson.net/dsc/f/03/00/16/60/70/c7fc14e41ec84255008c6125b63bcac40f55e11c/epsonscan2-%{version}-%{release}.src.tar.gz +# The non-free-plugin should be redistributable as far as anything I can find in the license but it is NOT provided externally?? Repackage the RPM I guess. +%ifarch x86_64 +Source1: https://download3.ebz.epson.net/dsc/f/03/00/16/14/40/9cb99579f9fa7facf54f77f0ce6fe5600677f30a/epsonscan2-bundle-%{version}.x86_64.rpm.tar.gz +%endif +BuildRequires: boost-filesystem >= 1.36.0 +BuildRequires: boost-devel >= 1.36.0 +BuildRequires: cmake >= 2.8.12.2 +BuildRequires: cpio +BuildRequires: gcc-c++ +BuildRequires: libharu +BuildRequires: libjpeg-turbo-devel +BuildRequires: libpng-devel +BuildRequires: libsane-hpaio +BuildRequires: libtiff-devel +BuildRequires: libusbx-devel +BuildRequires: make +BuildRequires: qt-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: qtsinglecoreapplication-qt5 +BuildRequires: rapidjson-devel +BuildRequires: sane-backends-devel +BuildRequires: systemd-rpm-macros +Requires: qt5-qtbase +Packager: Gilver E. + +%description +This package contains all essential software to use Epson scanners. + +%ifarch x86_64 +%package non-free-plugin +License: Epson End User Software License Agreement +Summary: Non free plugin for Epson scanners +Requires: %{name} = %{version}-%{release} + +%description non-free-plugin +Non-free but redistributable plugin for %{name}. +%endif + +%prep +%autosetup -n %{name}-%{version}-%{release} +%ifarch x86_64 +gzip -dc '%{SOURCE1}' | tar -xof - --strip-components=1 +rpm2cpio plugins/*.rpm | cpio -idmv +%endif + +%build +# CMake macro fails to generate the build files somehow? This works however. I don't really understand. +%cmake \ + -DBUILD_TYPE=Release + +%cmake_build + +%install +%cmake_install + +# The CMakeLists.txt fails to do these steps correctly. +# The file is also very annoying to patch. Thank God this doesn't seem to update anymore. +mkdir -p %{buildroot}%{_udevrulesdir} +mv %{buildroot}/lib/udev/rules.d/60-%{name}.rules -t %{buildroot}%{_udevrulesdir} +install -Dpm644 desktop/rpm/x86_64/%{name}.desktop -t %{buildroot}%{_datadir}/applications/ + +mkdir -p %{buildroot}%{_libdir}/sane +ln -sf ../%{name}/libsane-%{name}.so %{buildroot}%{_libdir}/sane/libsane-%{name}.so.1 +ln -sf ../%{name}/libsane-%{name}.so %{buildroot}%{_libdir}/sane/libsane-%{name}.so.1.0.0 + +# Let RPM handle the doc files. This project's build incorrectly puts licenses in this folder. +rm -rf %{buildroot}%{_defaultdocdir}/%{name}* + +%ifarch x86_64 +mv usr/share/doc/%{name}*/* -t plugins +rm -rf usr/share/doc/%{name}* +cp -pr usr %{buildroot} +%endif + +%files +%doc changelog.Debian +%doc NEWS +%doc README +%license AUTHORS +%license COPYING +%license LICENSE +%{_bindir}/%{name} +%{_libdir}/%{name}/*.so* +%{_libdir}/%{name}/detectalert +%{_libdir}/%{name}/Resources +%{_libdir}/sane/* +%{_udevrulesdir}/60-%{name}.rules +%{_sysconfdir}/sane.d/dll.d/%{name} +%{_datadir}/applications/%{name}.desktop + +%ifarch x86_64 +%files non-free-plugin +%doc plugins/NEWS +%license plugins/COPYING.EPSON +%license plugins/copyright +%{_libdir}/%{name}/libexec +%{_libdir}/%{name}/non-free-exec +%{_libdir}/%{name}-ocr +%{_libexecdir}/%{name}-ocr +%{_datadir}/%{name} +%{_datadir}/%{name}-ocr +%endif + +%changelog +* Thu May 1 2025 Gilver E. +- Initial package diff --git a/anda/system/falcond-profiles/anda.hcl b/anda/system/falcond-profiles/anda.hcl new file mode 100644 index 0000000000..87c2fb9934 --- /dev/null +++ b/anda/system/falcond-profiles/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "falcond-profiles.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/falcond-profiles/falcond-profiles.spec b/anda/system/falcond-profiles/falcond-profiles.spec new file mode 100644 index 0000000000..249ef87ffb --- /dev/null +++ b/anda/system/falcond-profiles/falcond-profiles.spec @@ -0,0 +1,41 @@ +%global commit 96c2cdfee69761d2c29caebb4b1e9ff7cc904f7a +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250613 + +Name: falcond-profiles +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%{?dist} +Summary: Profiles for falcond +License: MIT +URL: https://github.com/PikaOS-Linux/falcond-profiles +Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz +Requires: falcond +BuildArch: noarch +Packager: Gilver E. + +%description +This package contains the profiles needed for falcond. + +%prep +%autosetup -n %{name}-%{commit} + +%build +# Hi, I'm empty! + +%install +install -Dm644 usr/share/falcond/system.conf -t %{buildroot}%{_datadir}/falcond/ +install -Dm644 usr/share/falcond/profiles/*.conf -t %{buildroot}%{_datadir}/falcond/profiles/ +install -Dm644 usr/share/falcond/profiles/handheld/* -t %{buildroot}%{_datadir}/falcond/profiles/handheld/ +install -Dm644 usr/share/falcond/profiles/htpc/* -t %{buildroot}%{_datadir}/falcond/profiles/htpc/ + +%files +%doc README.md +%license LICENSE +%{_datadir}/falcond/system.conf +%{_datadir}/falcond/profiles/*.conf +%{_datadir}/falcond/profiles/handheld/*.conf +%{_datadir}/falcond/profiles/htpc/*.conf + +%changelog +* Thu Jun 19 2025 Gilver E. - 0^20250613git.96c2cdf-1 +- Initial package diff --git a/anda/system/falcond-profiles/update.rhai b/anda/system/falcond-profiles/update.rhai new file mode 100644 index 0000000000..3efa480e31 --- /dev/null +++ b/anda/system/falcond-profiles/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("PikaOS-Linux/falcond-profiles")); + if rpm.changed() { + rpm.global("commit_date", date()); + rpm.release(); +} diff --git a/anda/system/falcond/anda.hcl b/anda/system/falcond/anda.hcl new file mode 100644 index 0000000000..0b5df9a392 --- /dev/null +++ b/anda/system/falcond/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "falcond.spec" + } +} diff --git a/anda/system/falcond/falcond.preset b/anda/system/falcond/falcond.preset new file mode 100644 index 0000000000..ab43d0cb0b --- /dev/null +++ b/anda/system/falcond/falcond.preset @@ -0,0 +1 @@ +enable falcond.service diff --git a/anda/system/falcond/falcond.spec b/anda/system/falcond/falcond.spec new file mode 100644 index 0000000000..dd4503b4f4 --- /dev/null +++ b/anda/system/falcond/falcond.spec @@ -0,0 +1,62 @@ +%global _include_minidebuginfo 0 + +Name: falcond +Version: 1.1.7 +Release: 1%?dist +Summary: Advanced Linux Gaming Performance Daemon +License: MIT +URL: https://git.pika-os.com/general-packages/falcond +Source0: %{url}/archive/v%{version}.tar.gz +Source1: %{name}.preset +BuildRequires: anda-srpm-macros >= 0.2.18 +BuildRequires: systemd-rpm-macros +BuildRequires: zig >= 0.14.0 +BuildRequires: zig-rpm-macros +Requires: %{name}-profiles +Requires: (scx-scheds or scx-scheds-nightly) +Conflicts: gamemode +Packager: Gilver E. + +%description +falcond is a powerful system daemon designed to automatically optimize your Linux gaming experience. +It intelligently manages system resources and performance settings on a per-game basis. +This eliminates the need to manually configure settings for each game. + +%prep +%autosetup -n %{name}/%{name} + +%build + +%install +install -Dm644 debian/%{name}.service -t %{buildroot}%{_unitdir} +install -Dm644 %{SOURCE1} %{buildroot}%{_presetdir}/60-%{name}.preset +# When DNF supports microarchitectures the fallback option for -c can be used here instead +DESTDIR="%{buildroot}" \ +%ifarch x86_64 +%{zig_build_target -r fast -c x86_64_v2 -s} \ +%elifarch aarch64 +%{zig_build_target -r fast -s} \ +%endif + +%post +%systemd_post %{name}.service + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%files +%doc ../README.md +%license ../LICENSE +%{_bindir}/%{name} +%{_unitdir}/%{name}.service +%{_presetdir}/60-%{name}.preset + +%changelog +* Fri Jun 20 2025 Gilver E. - 1.1.5-2 +- Enable service by default +- Enable aarch64 CPU features +* Thu Jun 19 2025 Gilver E. - 1.1.5-1 +- Initial package diff --git a/anda/system/falcond/update.rhai b/anda/system/falcond/update.rhai new file mode 100644 index 0000000000..97d99c287b --- /dev/null +++ b/anda/system/falcond/update.rhai @@ -0,0 +1 @@ +rpm.version(get("https://git.pika-os.com/api/v1/repos/general-packages/falcond/releases").json_arr()[0].tag_name); diff --git a/anda/system/intel-ipu6-kmod/0000-probe-improvements.patch b/anda/system/intel-ipu6-kmod/0000-probe-improvements.patch deleted file mode 100644 index 83be7f74df..0000000000 --- a/anda/system/intel-ipu6-kmod/0000-probe-improvements.patch +++ /dev/null @@ -1,183 +0,0 @@ ---- a/drivers/media/pci/intel/ipu-isys-csi2.c -+++ b/drivers/media/pci/intel/ipu-isys-csi2.c -@@ -532,8 +532,10 @@ int ipu_isys_csi2_init(struct ipu_isys_csi2 *csi2, - NR_OF_CSI2_SINK_PADS, 0, - CSI2_PAD_SOURCE, - CSI2_PAD_SINK); -- if (rval) -+ if (rval) { -+ dev_err(&isys->adev->dev, "ipu_isys_subdev_init() err %d\n", rval); - goto fail; -+ } - - csi2->asd.pad[CSI2_PAD_SINK].flags |= MEDIA_PAD_FL_MUST_CONNECT; - ---- a/drivers/media/pci/intel/ipu-isys-subdev.c -+++ b/drivers/media/pci/intel/ipu-isys-subdev.c -@@ -849,17 +849,22 @@ int ipu_isys_subdev_init(struct ipu_isys_subdev *asd, - return -ENOMEM; - - rval = media_entity_pads_init(&asd->sd.entity, num_pads, asd->pad); -- if (rval) -+ if (rval) { -+ dev_err(&asd->isys->adev->dev, "%s: media_entity_pads_init(%d) err %d\n", __func__, num_pads, rval); - goto out_mutex_destroy; -+ } - - if (asd->ctrl_init) { - rval = v4l2_ctrl_handler_init(&asd->ctrl_handler, nr_ctrls); -- if (rval) -+ if (rval) { -+ dev_err(&asd->isys->adev->dev, "%s: v4l2_ctrl_handler_init() err %d\n", __func__, rval); - goto out_media_entity_cleanup; -+ } - - asd->ctrl_init(&asd->sd); - if (asd->ctrl_handler.error) { - rval = asd->ctrl_handler.error; -+ dev_err(&asd->isys->adev->dev, "%s: ctrl_handler.error %d\n", __func__, rval); - goto out_v4l2_ctrl_handler_free; - } - ---- a/drivers/media/pci/intel/ipu-isys.c -+++ b/drivers/media/pci/intel/ipu-isys.c -@@ -396,8 +396,10 @@ static int isys_register_subdevices(struct ipu_isys *isys) - rval = ipu_isys_csi2_init(&isys->csi2[i], isys, - isys->pdata->base + - csi2->offsets[i], i); -- if (rval) -+ if (rval) { -+ dev_err(&isys->adev->dev, "ipu_isys_csi2_init() err %d\n", rval); - goto fail; -+ } - - isys->isr_csi2_bits |= IPU_ISYS_UNISPART_IRQ_CSI2(i); - } -@@ -1009,12 +1011,16 @@ static int isys_register_devices(struct ipu_isys *isys) - goto out_v4l2_device_unregister; - - rval = isys_notifier_init(isys); -- if (rval) -+ if (rval) { -+ dev_err(&isys->adev->dev, "isys_notifier_init() err %d\n", rval); - goto out_isys_unregister_subdevices; -+ } - - rval = v4l2_device_register_subdev_nodes(&isys->v4l2_dev); -- if (rval) -+ if (rval) { -+ dev_err(&isys->adev->dev, "error registering subdev nodes %d\n", rval); - goto out_isys_notifier_cleanup; -+ } - - return 0; - -@@ -1561,8 +1567,10 @@ static int isys_probe(struct ipu_bus_device *adev) - if (rval) - goto out_remove_pkg_dir_shared_buffer; - rval = isys_iwake_watermark_init(isys); -- if (rval) -+ if (rval) { -+ dev_err(&adev->dev, "isys_iwake_watermark_init() err %d\n", rval); - goto out_unregister_devices; -+ } - - ipu_mmu_hw_cleanup(adev->mmu); - ---- a/drivers/media/pci/intel/ipu-isys.c -+++ b/drivers/media/pci/intel/ipu-isys.c -@@ -382,15 +382,12 @@ static int isys_register_subdevices(struct ipu_isys *isys) - const struct ipu_isys_internal_csi2_pdata *csi2 = - &isys->pdata->ipdata->csi2; - struct ipu_isys_csi2_be_soc *csi2_be_soc; -- unsigned int i, k; -- int rval; -+ int i = 0, k = 0, rval; - - isys->csi2 = devm_kcalloc(&isys->adev->dev, csi2->nports, - sizeof(*isys->csi2), GFP_KERNEL); -- if (!isys->csi2) { -- rval = -ENOMEM; -- goto fail; -- } -+ if (!isys->csi2) -+ return -ENOMEM; - - for (i = 0; i < csi2->nports; i++) { - rval = ipu_isys_csi2_init(&isys->csi2[i], isys, -@@ -425,7 +422,8 @@ static int isys_register_subdevices(struct ipu_isys *isys) - if (rval) { - dev_info(&isys->adev->dev, - "can't create link csi2->be_soc\n"); -- goto fail; -+ isys_unregister_subdevices(isys); -+ return rval; - } - } - } -@@ -433,7 +431,16 @@ static int isys_register_subdevices(struct ipu_isys *isys) - return 0; - - fail: -- isys_unregister_subdevices(isys); -+ while (--k >= 0) { -+ dev_info(&isys->adev->dev, "foo %d\n", k); -+ ipu_isys_csi2_be_soc_cleanup(&isys->csi2_be_soc[k]); -+ } -+ -+ while (--i >= 0) { -+ dev_info(&isys->adev->dev, "bar %d\n", k); -+ ipu_isys_csi2_cleanup(&isys->csi2[i]); -+ } -+ - return rval; - } - ---- a/drivers/media/pci/intel/ipu-isys.c -+++ b/drivers/media/pci/intel/ipu-isys.c -@@ -1170,8 +1170,7 @@ static void isys_remove(struct ipu_bus_device *adev) - - dev_info(&adev->dev, "removed\n"); - #ifdef CONFIG_DEBUG_FS -- if (isp->ipu_dir) -- debugfs_remove_recursive(isys->debugfsdir); -+ debugfs_remove_recursive(isys->debugfsdir); - #endif - - list_for_each_entry_safe(fwmsg, safe, &isys->framebuflist, head) { -@@ -1217,6 +1216,7 @@ static void isys_remove(struct ipu_bus_device *adev) - - mutex_destroy(&isys->stream_mutex); - mutex_destroy(&isys->mutex); -+ mutex_destroy(&isys->lib_mutex); - - if (isys->short_packet_source == IPU_ISYS_SHORT_PACKET_FROM_TUNIT) { - u32 trace_size = IPU_ISYS_SHORT_PACKET_TRACE_BUFFER_SIZE; -@@ -1587,7 +1587,15 @@ static int isys_probe(struct ipu_bus_device *adev) - isys_iwake_watermark_cleanup(isys); - isys_unregister_devices(isys); - out_remove_pkg_dir_shared_buffer: -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 9, 0) - cpu_latency_qos_remove_request(&isys->pm_qos); -+#else -+ pm_qos_remove_request(&isys->pm_qos); -+#endif -+ ipu_trace_uninit(&adev->dev); -+#ifdef CONFIG_DEBUG_FS -+ debugfs_remove_recursive(isys->debugfsdir); -+#endif - if (!isp->secure_mode) - ipu_cpd_free_pkg_dir(adev, isys->pkg_dir, - isys->pkg_dir_dma_addr, -@@ -1598,10 +1606,10 @@ static int isys_probe(struct ipu_bus_device *adev) - release_firmware: - if (!isp->secure_mode) - release_firmware(isys->fw); -- ipu_trace_uninit(&adev->dev); - - mutex_destroy(&isys->mutex); - mutex_destroy(&isys->stream_mutex); -+ mutex_destroy(&isys->lib_mutex); - - if (isys->short_packet_source == IPU_ISYS_SHORT_PACKET_FROM_TUNIT) - mutex_destroy(&isys->short_packet_tracing_mutex); diff --git a/anda/system/intel-ipu6-kmod/0001-fix-compilation-6.8.patch b/anda/system/intel-ipu6-kmod/0001-fix-compilation-6.8.patch deleted file mode 100644 index 45bb8de9ca..0000000000 --- a/anda/system/intel-ipu6-kmod/0001-fix-compilation-6.8.patch +++ /dev/null @@ -1,73 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -83,10 +83,10 @@ export CONFIG_VIDEO_OV02E10 = m - export CONFIG_VIDEO_HM2170 = m - export CONFIG_VIDEO_HM2172 = m - export CONFIG_VIDEO_HI556 = m -+export CONFIG_VIDEO_GC5035 = m - - ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_OV2740)),true) - export CONFIG_VIDEO_OV2740 = m --export CONFIG_VIDEO_GC5035 = m - endif - obj-y += drivers/media/i2c/ - ---- a/drivers/media/i2c/gc5035.c -+++ b/drivers/media/i2c/gc5035.c -@@ -1497,7 +1497,11 @@ static int gc5035_set_fmt(struct v4l2_subdev *sd, - - mutex_lock(&gc5035->mutex); - if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) - *v4l2_subdev_get_try_format(sd, sd_state, fmt->pad) = fmt->format; -+#else -+ *v4l2_subdev_state_get_format(sd_state, fmt->pad) = fmt->format; -+#endif - } else { - gc5035->cur_mode = mode; - h_blank = mode->hts_def - mode->width; -@@ -1522,7 +1526,11 @@ static int gc5035_get_fmt(struct v4l2_subdev *sd, - - mutex_lock(&gc5035->mutex); - if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) - fmt->format = *v4l2_subdev_get_try_format(sd, sd_state, fmt->pad); -+#else -+ fmt->format = *v4l2_subdev_state_get_format(sd_state, fmt->pad); -+#endif - } else { - fmt->format.width = mode->width; - fmt->format.height = mode->height; -@@ -1714,7 +1722,9 @@ static const struct v4l2_subdev_video_ops gc5035_video_ops = { - }; - - static const struct v4l2_subdev_pad_ops gc5035_pad_ops = { -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) - .init_cfg = gc5035_entity_init_cfg, -+#endif - .enum_mbus_code = gc5035_enum_mbus_code, - .enum_frame_size = gc5035_enum_frame_sizes, - .get_fmt = gc5035_get_fmt, -@@ -1730,6 +1740,12 @@ static const struct media_entity_operations gc5035_subdev_entity_ops = { - .link_validate = v4l2_subdev_link_validate, - }; - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) -+static const struct v4l2_subdev_internal_ops gc5035_internal_ops = { -+ .init_state = gc5035_entity_init_cfg, -+}; -+#endif -+ - static int gc5035_set_exposure(struct gc5035 *gc5035, u32 val) - { - u32 caltime = 0; -@@ -2091,6 +2107,9 @@ static int gc5035_probe(struct i2c_client *client) - mutex_init(&gc5035->mutex); - sd = &gc5035->subdev; - v4l2_i2c_subdev_init(sd, client, &gc5035_subdev_ops); -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0) -+ sd->internal_ops = &gc5035_internal_ops; -+#endif - ret = gc5035_initialize_controls(gc5035); - if (ret) { - dev_err_probe(dev, ret, "Failed to initialize controls\n"); diff --git a/anda/system/intel-ipu6-kmod/0002-fix-compilation-6.10.patch b/anda/system/intel-ipu6-kmod/0002-fix-compilation-6.10.patch deleted file mode 100644 index 0ce55a5d2c..0000000000 --- a/anda/system/intel-ipu6-kmod/0002-fix-compilation-6.10.patch +++ /dev/null @@ -1,85 +0,0 @@ -From 5917297efb44d52548a052c04e9f759926ca2ddd Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Tue, 11 Jun 2024 11:39:34 +0200 -Subject: [PATCH 2/6] media: ipu6: Fix compilation with kernels >= 6.10 - -Fix compilation with kernels >= 6.10. - -Signed-off-by: Hans de Goede -[vicamo: update for v6.12-rc1] -Signed-off-by: You-Sheng Yang ---- - drivers/media/pci/intel/ipu-mmu.c | 1 + - drivers/media/pci/intel/ipu-psys.c | 31 ++++++++++++++++++++++++++++++ - drivers/media/pci/intel/ipu.c | 1 + - 3 files changed, 33 insertions(+) - -diff --git a/drivers/media/pci/intel/ipu-mmu.c b/drivers/media/pci/intel/ipu-mmu.c -index a36a6ded8..b06c9f8c1 100644 ---- a/drivers/media/pci/intel/ipu-mmu.c -+++ b/drivers/media/pci/intel/ipu-mmu.c -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include "ipu.h" - #include "ipu-platform.h" -diff --git a/drivers/media/pci/intel/ipu-psys.c b/drivers/media/pci/intel/ipu-psys.c -index b12ecf3fc..87fab7cf8 100644 ---- a/drivers/media/pci/intel/ipu-psys.c -+++ b/drivers/media/pci/intel/ipu-psys.c -@@ -128,6 +128,37 @@ ipu_psys_lookup_kbuffer_by_kaddr(struct ipu_psys_fh *fh, void *kaddr) - return NULL; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0) -+/* Dropped from 6.10, use our own copy for now */ -+static int follow_pfn(struct vm_area_struct *vma, unsigned long address, unsigned long *pfn) -+{ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) -+ spinlock_t *ptl; -+ pte_t *ptep; -+ -+ if (follow_pte(vma, address, &ptep, &ptl)) -+ return -EINVAL; -+ -+ *pfn = pte_pfn(ptep_get(ptep)); -+ pte_unmap_unlock(ptep, ptl); -+#else -+ struct follow_pfnmap_args args = { -+ .vma = vma, -+ .address = address, -+ }; -+ int ret; -+ -+ ret = follow_pfnmap_start(&args); -+ if (ret) -+ return ret; -+ -+ *pfn = args.pfn; -+ follow_pfnmap_end(&args); -+#endif -+ return 0; -+} -+#endif -+ - static int ipu_psys_get_userpages(struct ipu_dma_buf_attach *attach) - { - struct vm_area_struct *vma; -diff --git a/drivers/media/pci/intel/ipu.c b/drivers/media/pci/intel/ipu.c -index 33592a662..fc091a11a 100644 ---- a/drivers/media/pci/intel/ipu.c -+++ b/drivers/media/pci/intel/ipu.c -@@ -15,6 +15,7 @@ - #include - #include - #include -+#include - - #include "ipu.h" - #include "ipu-buttress.h" --- -2.47.0 - diff --git a/anda/system/intel-ipu6-kmod/0003-prefix-modules.patch b/anda/system/intel-ipu6-kmod/0003-prefix-modules.patch deleted file mode 100644 index 50cab6d22d..0000000000 --- a/anda/system/intel-ipu6-kmod/0003-prefix-modules.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 3ddee5543a8caa4bb716fd0ff815d52b0d09bbb1 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Mon, 10 Jun 2024 19:30:48 +0200 -Subject: [PATCH 3/6] Makefile: prefix ipu6 modules with icamera- instead of - intel- - -Now that IPU6 isys support has landed upstream, using an auxbus approach -rather then the custom ipu6-bus, there is a conflict between the mainline -intel-ipu6* kernel modules and the out of tree ipu6-drivers intel-ipu6* -kernel modules. - -Rename the out of tree ipu6 modules to icamera-ipu6* so that both can be -installed together and the user can easily switch by blacklisting one of -the 2 sets of modules. - -Signed-off-by: Hans de Goede ---- - drivers/media/pci/intel/ipu6/Makefile | 18 +++++++++--------- - 1 file changed, 9 insertions(+), 9 deletions(-) - -diff --git a/drivers/media/pci/intel/ipu6/Makefile b/drivers/media/pci/intel/ipu6/Makefile -index 23f8cdba4..92cd9fe1b 100644 ---- a/drivers/media/pci/intel/ipu6/Makefile -+++ b/drivers/media/pci/intel/ipu6/Makefile -@@ -8,7 +8,7 @@ endif - ccflags-y += -DIPU_TPG_FRAME_SYNC -DIPU_PSYS_GPC \ - -DIPU_ISYS_GPC - --intel-ipu6-objs += ../ipu.o \ -+icamera-ipu6-objs += ../ipu.o \ - ../ipu-bus.o \ - ../ipu-dma.o \ - ../ipu-mmu.o \ -@@ -18,12 +18,12 @@ intel-ipu6-objs += ../ipu.o \ - ipu6.o \ - ../ipu-fw-com.o - ifdef CONFIG_IPU_ISYS_BRIDGE --intel-ipu6-objs += ../cio2-bridge.o -+icamera-ipu6-objs += ../cio2-bridge.o - endif - --obj-$(CONFIG_VIDEO_INTEL_IPU6) += intel-ipu6.o -+obj-$(CONFIG_VIDEO_INTEL_IPU6) += icamera-ipu6.o - --intel-ipu6-isys-objs += ../ipu-isys.o \ -+icamera-ipu6-isys-objs += ../ipu-isys.o \ - ../ipu-isys-csi2.o \ - ipu6-isys.o \ - ipu6-isys-phy.o \ -@@ -36,26 +36,26 @@ intel-ipu6-isys-objs += ../ipu-isys.o \ - ../ipu-isys-queue.o \ - ../ipu-isys-subdev.o - --obj-$(CONFIG_VIDEO_INTEL_IPU6) += intel-ipu6-isys.o -+obj-$(CONFIG_VIDEO_INTEL_IPU6) += icamera-ipu6-isys.o - --intel-ipu6-psys-objs += ../ipu-psys.o \ -+icamera-ipu6-psys-objs += ../ipu-psys.o \ - ipu6-psys.o \ - ipu-resources.o \ - ipu6-psys-gpc.o \ - ipu6-l-scheduler.o \ - ipu6-ppg.o - --intel-ipu6-psys-objs += ipu-fw-resources.o \ -+icamera-ipu6-psys-objs += ipu-fw-resources.o \ - ipu6-fw-resources.o \ - ipu6se-fw-resources.o \ - ipu6ep-fw-resources.o \ - ../ipu-fw-psys.o - - ifeq ($(CONFIG_COMPAT),y) --intel-ipu6-psys-objs += ../ipu-psys-compat32.o -+icamera-ipu6-psys-objs += ../ipu-psys-compat32.o - endif - --obj-$(CONFIG_VIDEO_INTEL_IPU6) += intel-ipu6-psys.o -+obj-$(CONFIG_VIDEO_INTEL_IPU6) += icamera-ipu6-psys.o - - ccflags-y += -I$(srcpath)/$(src)/../../../../../include/ - ccflags-y += -I$(srcpath)/$(src)/../ --- -2.47.0 - diff --git a/anda/system/intel-ipu6-kmod/0004-fix-compilation-6.11.patch b/anda/system/intel-ipu6-kmod/0004-fix-compilation-6.11.patch deleted file mode 100644 index b24c4aed65..0000000000 --- a/anda/system/intel-ipu6-kmod/0004-fix-compilation-6.11.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 5c1e910f6c473f7f53377219e1f00b36e6ae7da1 Mon Sep 17 00:00:00 2001 -From: You-Sheng Yang -Date: Thu, 8 Aug 2024 14:30:51 +0800 -Subject: [PATCH 4/6] media: ipu6: Fix compilation with kernels >= 6.11 - -Signed-off-by: You-Sheng Yang ---- - drivers/media/pci/intel/ipu-bus.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/drivers/media/pci/intel/ipu-bus.c b/drivers/media/pci/intel/ipu-bus.c -index 0569ccb61..234fde8f1 100644 ---- a/drivers/media/pci/intel/ipu-bus.c -+++ b/drivers/media/pci/intel/ipu-bus.c -@@ -75,9 +75,13 @@ static const struct dev_pm_ops ipu_bus_pm_ops = { - #define IPU_BUS_PM_OPS NULL - #endif - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0) - static int ipu_bus_match(struct device *dev, struct device_driver *drv) -+#else -+static int ipu_bus_match(struct device *dev, const struct device_driver *drv) -+#endif - { -- struct ipu_bus_driver *adrv = to_ipu_bus_driver(drv); -+ const struct ipu_bus_driver *adrv = to_ipu_bus_driver(drv); - - dev_dbg(dev, "bus match: \"%s\" --- \"%s\"\n", dev_name(dev), - adrv->wanted); --- -2.47.0 - diff --git a/anda/system/intel-ipu6-kmod/0005-fix-compilation-6.12.patch b/anda/system/intel-ipu6-kmod/0005-fix-compilation-6.12.patch deleted file mode 100644 index 89aa9e931a..0000000000 --- a/anda/system/intel-ipu6-kmod/0005-fix-compilation-6.12.patch +++ /dev/null @@ -1,269 +0,0 @@ -From 3bbe043c6c92ef8fb2482077911ca6ea5fb2ef52 Mon Sep 17 00:00:00 2001 -From: You-Sheng Yang -Date: Fri, 11 Oct 2024 01:44:50 +0800 -Subject: [PATCH 5/6] media: ipu6: Fix compilation with kernels >= 6.12: move - asm/unaligned.h to linux/unaligned.h - -Accommodate to v6.12-rc2 commit 5f60d5f6bbc12 ("move asm/unaligned.h to -linux/unaligned.h"). - -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2083996 -Signed-off-by: You-Sheng Yang -Signed-off-by: Hans de Goede ---- - drivers/media/i2c/hi556.c | 6 +++++- - drivers/media/i2c/hm11b1.c | 6 +++++- - drivers/media/i2c/hm2170.c | 6 +++++- - drivers/media/i2c/hm2172.c | 6 +++++- - drivers/media/i2c/ov01a10.c | 6 +++++- - drivers/media/i2c/ov01a1s.c | 6 +++++- - drivers/media/i2c/ov02c10.c | 6 +++++- - drivers/media/i2c/ov02e10.c | 6 +++++- - drivers/media/i2c/ov2740.c | 6 +++++- - drivers/media/i2c/ov8856.c | 6 +++++- - 10 files changed, 50 insertions(+), 10 deletions(-) - -diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c -index 4fc020b65..90080438b 100644 ---- a/drivers/media/i2c/hi556.c -+++ b/drivers/media/i2c/hi556.c -@@ -1,14 +1,18 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2019 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/hm11b1.c b/drivers/media/i2c/hm11b1.c -index f3900d29f..173bb32eb 100644 ---- a/drivers/media/i2c/hm11b1.c -+++ b/drivers/media/i2c/hm11b1.c -@@ -1,13 +1,17 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2020-2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/hm2170.c b/drivers/media/i2c/hm2170.c -index 102eec25a..060bb04d1 100644 ---- a/drivers/media/i2c/hm2170.c -+++ b/drivers/media/i2c/hm2170.c -@@ -1,7 +1,12 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include -@@ -9,7 +14,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/hm2172.c b/drivers/media/i2c/hm2172.c -index 3362d3151..422166f04 100644 ---- a/drivers/media/i2c/hm2172.c -+++ b/drivers/media/i2c/hm2172.c -@@ -1,7 +1,12 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include -@@ -9,7 +14,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c -index 78ae01811..aa47a50e5 100644 ---- a/drivers/media/i2c/ov01a10.c -+++ b/drivers/media/i2c/ov01a10.c -@@ -1,13 +1,17 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2020-2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c -index f7cf2218c..639b0921f 100644 ---- a/drivers/media/i2c/ov01a1s.c -+++ b/drivers/media/i2c/ov01a1s.c -@@ -1,13 +1,17 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2020-2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c -index 40865f8e3..0a1fed161 100644 ---- a/drivers/media/i2c/ov02c10.c -+++ b/drivers/media/i2c/ov02c10.c -@@ -1,7 +1,12 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include -@@ -9,7 +14,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/ov02e10.c b/drivers/media/i2c/ov02e10.c -index 916def90f..ea82040f2 100644 ---- a/drivers/media/i2c/ov02e10.c -+++ b/drivers/media/i2c/ov02e10.c -@@ -1,7 +1,12 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2023 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include -@@ -9,7 +14,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c -index bd9b68e34..4ed0094f7 100644 ---- a/drivers/media/i2c/ov2740.c -+++ b/drivers/media/i2c/ov2740.c -@@ -1,7 +1,12 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include -@@ -9,7 +14,6 @@ - #include - #include - #include --#include - #include - #include - #include -diff --git a/drivers/media/i2c/ov8856.c b/drivers/media/i2c/ov8856.c -index 1c4469ea0..a2c7c8c22 100644 ---- a/drivers/media/i2c/ov8856.c -+++ b/drivers/media/i2c/ov8856.c -@@ -1,13 +1,17 @@ - // SPDX-License-Identifier: GPL-2.0 - // Copyright (c) 2021-2022 Intel Corporation. - -+#include -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - #include -+#else -+#include -+#endif - #include - #include - #include - #include - #include --#include - #include - #include - #include --- -2.47.0 - diff --git a/anda/system/intel-ipu6-kmod/0006-fix-compilation-6.12-no-no_llseek.patch b/anda/system/intel-ipu6-kmod/0006-fix-compilation-6.12-no-no_llseek.patch deleted file mode 100644 index e4501d4763..0000000000 --- a/anda/system/intel-ipu6-kmod/0006-fix-compilation-6.12-no-no_llseek.patch +++ /dev/null @@ -1,53 +0,0 @@ -From f89a4e3da45753d012b3c40bfe9c8b56671e5306 Mon Sep 17 00:00:00 2001 -From: You-Sheng Yang -Date: Fri, 11 Oct 2024 01:28:38 +0800 -Subject: [PATCH 6/6] media: ipu6: Fix compilation with kernels >= 6.12: - Finally take no_llseek out - -Accommodate to v6.12-rc1 commit cb787f4ac0c2 ("[tree-wide] finally take -no_llseek out"). - -Bug-Ubuntu: https://bugs.launchpad.net/bugs/2083996 -Signed-off-by: You-Sheng Yang -Signed-off-by: Hans de Goede ---- - drivers/media/pci/intel/ipu-trace.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/drivers/media/pci/intel/ipu-trace.c b/drivers/media/pci/intel/ipu-trace.c -index 282ac659a..2dc458a1d 100644 ---- a/drivers/media/pci/intel/ipu-trace.c -+++ b/drivers/media/pci/intel/ipu-trace.c -@@ -517,7 +517,9 @@ static const struct file_operations ipu_traceconf_fops = { - .release = traceconf_release, - .read = traceconf_read, - .write = traceconf_write, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - .llseek = no_llseek, -+#endif - }; - - static void wptraceconf_dump(struct ipu_device *isp) -@@ -673,7 +675,9 @@ static const struct file_operations ipu_wptraceconf_fops = { - .release = wptraceconf_release, - .read = wptraceconf_read, - .write = wptraceconf_write, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - .llseek = no_llseek, -+#endif - }; - - static int gettrace_open(struct inode *inode, struct file *file) -@@ -740,7 +744,9 @@ static const struct file_operations ipu_gettrace_fops = { - .release = gettrace_release, - .read = gettrace_read, - .write = gettrace_write, -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 12, 0) - .llseek = no_llseek, -+#endif - }; - - int ipu_trace_init(struct ipu_device *isp, void __iomem *base, --- -2.47.0 - diff --git a/anda/system/intel-ipu6-kmod/0007-modules-per-kernel.patch b/anda/system/intel-ipu6-kmod/0007-modules-per-kernel.patch deleted file mode 100644 index 69bceb020d..0000000000 --- a/anda/system/intel-ipu6-kmod/0007-modules-per-kernel.patch +++ /dev/null @@ -1,773 +0,0 @@ -From 2c4ad1398dddfb307e8a40a714a6d5f70d6d14cb Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Mon, 10 Jun 2024 13:05:53 +0200 -Subject: [PATCH 4/4] Makefile: Adjust which modules to build for which - kernel-versions for Fedora - -Fedora's kernels have not enabled various IPU6 related drivers as soon -as they were mainlined. Instead they were enabled at later times. - -Fix the automatic disabling of certain modules to match when they were -enabled in the Fedora kernels: - -Do not build ljca for kernels >= 6.7 -Do not build ivsc for kernels >= 6.10 -Do not build ov2740 for kernels >= 6.10 (1) -Do not build ov01a10 for kernels >= 6.10 -Do not build hi556 for kernels >= 6.10 (2) -Do not build cio2-bridge for kernels >= 6.10 (3) - -1) Also switch the Kconfig symbols for mainlined sensor drivers from -CONFIG_VIDEO_FOO to CONFIG_ICAMERA_FOO to avoid these still being -set when they should not because of the CONFIG_VIDEO_FOO symbols -inherited from the base kernel. - -2) hi556 was enabled in earlier Fedora patches but the mainline version -missed reset GPIO / clk / regulator support - -3) The mainline ipu6-bridge is only used for kernels >= 6.10 because it -lacked ACPI HIDs for many of the still out of tree sensor drivers, see: -https://lore.kernel.org/linux-media/20240610173418.16119-1-hdegoede@redhat.com/ - -Signed-off-by: Hans de Goede ---- - Makefile | 20 ++++++++++++-------- - drivers/media/i2c/Makefile | 7 ++++--- - drivers/media/i2c/hi556.c | 20 ++++++++++---------- - drivers/media/i2c/hm2170.c | 20 ++++++++++---------- - drivers/media/i2c/hm2172.c | 20 ++++++++++---------- - drivers/media/i2c/ov01a10.c | 18 +++++++++--------- - drivers/media/i2c/ov01a1s.c | 20 ++++++++++---------- - drivers/media/i2c/ov02c10.c | 20 ++++++++++---------- - drivers/media/i2c/ov02e10.c | 20 ++++++++++---------- - 9 files changed, 85 insertions(+), 80 deletions(-) - -diff --git a/Makefile b/Makefile -index 4734c4497..5d716eb61 100644 ---- a/Makefile -+++ b/Makefile -@@ -20,15 +20,16 @@ version_lt = $(shell \ - echo "false"; \ - fi) - --KV_IVSC := 6.6.0 --KV_IPU_BRIDGE := 6.6.0 --KV_OV2740 := 6.8.0 -+KV_LJCA := 6.7.0 -+KV_IVSC := 6.10.0 -+KV_IPU_BRIDGE := 6.10.0 -+KV_OV2740 := 6.10.0 - - KERNEL_SRC ?= /lib/modules/$(KERNELRELEASE)/build - MODSRC := $(shell pwd) - --ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_IVSC)),true) --$(warning build ljca ivsc) -+ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_LJCA)),true) -+$(warning build ljca) - obj-m += ljca.o - ljca-y := drivers/mfd/ljca.o - -@@ -40,7 +41,10 @@ gpio-ljca-y := drivers/gpio/gpio-ljca.o - - obj-m += i2c-ljca.o - i2c-ljca-y := drivers/i2c/busses/i2c-ljca.o -+endif - -+ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_IVSC)),true) -+$(warning build ivsc) - obj-m += mei-vsc.o - mei-vsc-y := drivers/misc/mei/spi-vsc.o - mei-vsc-y += drivers/misc/mei/hw-vsc.o -@@ -77,16 +81,16 @@ obj-y += drivers/media/pci/intel/ - - export CONFIG_VIDEO_HM11B1 = m - export CONFIG_VIDEO_OV01A1S = m --export CONFIG_VIDEO_OV01A10 = m - export CONFIG_VIDEO_OV02C10 = m - export CONFIG_VIDEO_OV02E10 = m - export CONFIG_VIDEO_HM2170 = m - export CONFIG_VIDEO_HM2172 = m --export CONFIG_VIDEO_HI556 = m - export CONFIG_VIDEO_GC5035 = m - - ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_OV2740)),true) --export CONFIG_VIDEO_OV2740 = m -+export CONFIG_ICAMERA_OV2740 = m -+export CONFIG_ICAMERA_OV01A10 = m -+export CONFIG_ICAMERA_HI556 = m - endif - obj-y += drivers/media/i2c/ - -diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile -index 1f395448b..f49609620 100644 ---- a/drivers/media/i2c/Makefile -+++ b/drivers/media/i2c/Makefile -@@ -4,11 +4,12 @@ - obj-$(CONFIG_VIDEO_HM11B1) += hm11b1.o - obj-$(CONFIG_VIDEO_GC5035) += gc5035.o - obj-$(CONFIG_VIDEO_OV01A1S) += ov01a1s.o --obj-$(CONFIG_VIDEO_OV01A10) += ov01a10.o - obj-$(CONFIG_VIDEO_OV02C10) += ov02c10.o - obj-$(CONFIG_VIDEO_OV02E10) += ov02e10.o --obj-$(CONFIG_VIDEO_OV2740) += ov2740.o - obj-$(CONFIG_VIDEO_HM2170) += hm2170.o - obj-$(CONFIG_VIDEO_HM2170) += hm2172.o --obj-$(CONFIG_VIDEO_HI556) += hi556.o - obj-$(CONFIG_POWER_CTRL_LOGIC) += power_ctrl_logic.o -+ -+obj-$(CONFIG_ICAMERA_OV2740) += ov2740.o -+obj-$(CONFIG_ICAMERA_OV01A10) += ov01a10.o -+obj-$(CONFIG_ICAMERA_HI556) += hi556.o -diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c -index 4fc020b65..2adb5a1fe 100644 ---- a/drivers/media/i2c/hi556.c -+++ b/drivers/media/i2c/hi556.c -@@ -12,7 +12,7 @@ - #include - #include - #include --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - #include - -@@ -510,7 +510,7 @@ struct hi556 { - /* Clock provider */ - struct clk *img_clk; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - struct vsc_mipi_config conf; - struct vsc_camera_status status; -@@ -527,7 +527,7 @@ struct hi556 { - - /* True if the device has been identified */ - bool identified; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - bool use_intel_vsc; - #endif -@@ -704,7 +704,7 @@ static int hi556_set_ctrl(struct v4l2_ctrl *ctrl) - ret = hi556_test_pattern(hi556, ctrl->val); - break; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - case V4L2_CID_PRIVACY: - dev_dbg(&client->dev, "set privacy to %d", ctrl->val); -@@ -732,7 +732,7 @@ static int hi556_init_controls(struct hi556 *hi556) - int ret; - - ctrl_hdlr = &hi556->ctrl_handler; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9); - #else -@@ -771,7 +771,7 @@ static int hi556_init_controls(struct hi556 *hi556) - h_blank); - if (hi556->hblank) - hi556->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - hi556->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hi556_ctrl_ops, - V4L2_CID_PRIVACY, 0, 1, 1, -@@ -836,7 +836,7 @@ static int hi556_identify_module(struct hi556 *hi556) - return 0; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static void hi556_vsc_privacy_callback(void *handle, - enum vsc_privacy_status status) -@@ -936,7 +936,7 @@ static int hi556_power_off(struct device *dev) - struct hi556 *hi556 = to_hi556(sd); - int ret = 0; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (hi556->use_intel_vsc) { - ret = vsc_release_camera_sensor(&hi556->status); -@@ -961,7 +961,7 @@ static int hi556_power_on(struct device *dev) - struct hi556 *hi556 = to_hi556(sd); - int ret; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (hi556->use_intel_vsc) { - hi556->conf.lane_num = HI556_DATA_LANES; -@@ -1217,7 +1217,7 @@ static int hi556_get_pm_resources(struct device *dev) - struct hi556 *hi556 = to_hi556(sd); - int ret; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - acpi_handle handle = ACPI_HANDLE(dev); - struct acpi_handle_list dep_devices; -diff --git a/drivers/media/i2c/hm2170.c b/drivers/media/i2c/hm2170.c -index 102eec25a..2987e0cbe 100644 ---- a/drivers/media/i2c/hm2170.c -+++ b/drivers/media/i2c/hm2170.c -@@ -13,7 +13,7 @@ - #include - #include - #include --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - #include - #endif -@@ -615,7 +615,7 @@ struct hm2170 { - struct v4l2_ctrl *vblank; - struct v4l2_ctrl *hblank; - struct v4l2_ctrl *exposure; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - struct vsc_mipi_config conf; - struct vsc_camera_status status; -@@ -792,7 +792,7 @@ static int hm2170_set_ctrl(struct v4l2_ctrl *ctrl) - ret = hm2170_test_pattern(hm2170, ctrl->val); - break; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - case V4L2_CID_PRIVACY: - dev_dbg(&client->dev, "set privacy to %d", ctrl->val); -@@ -825,7 +825,7 @@ static int hm2170_init_controls(struct hm2170 *hm2170) - int ret = 0; - - ctrl_hdlr = &hm2170->ctrl_handler; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9); - #else -@@ -864,7 +864,7 @@ static int hm2170_init_controls(struct hm2170 *hm2170) - h_blank); - if (hm2170->hblank) - hm2170->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - hm2170->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hm2170_ctrl_ops, - V4L2_CID_PRIVACY, 0, 1, 1, -@@ -904,7 +904,7 @@ static void hm2170_update_pad_format(const struct hm2170_mode *mode, - fmt->field = V4L2_FIELD_NONE; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static void hm2170_vsc_privacy_callback(void *handle, - enum vsc_privacy_status status) -@@ -984,7 +984,7 @@ static int hm2170_set_stream(struct v4l2_subdev *sd, int enable) - return ret; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static int hm2170_power_off(struct device *dev) - { -@@ -1323,7 +1323,7 @@ static int hm2170_probe(struct i2c_client *client) - } - - v4l2_i2c_subdev_init(&hm2170->sd, client, &hm2170_subdev_ops); --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - hm2170->conf.lane_num = HM2170_DATA_LANES; - /* frequency unit 100k */ -@@ -1389,7 +1389,7 @@ probe_error_v4l2_ctrl_handler_free: - mutex_destroy(&hm2170->mutex); - - probe_error_ret: --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - hm2170_power_off(&client->dev); - #endif -@@ -1399,7 +1399,7 @@ probe_error_ret: - - static const struct dev_pm_ops hm2170_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(hm2170_suspend, hm2170_resume) --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - SET_RUNTIME_PM_OPS(hm2170_power_off, hm2170_power_on, NULL) - #endif -diff --git a/drivers/media/i2c/hm2172.c b/drivers/media/i2c/hm2172.c -index 3362d3151..8e1d1f883 100644 ---- a/drivers/media/i2c/hm2172.c -+++ b/drivers/media/i2c/hm2172.c -@@ -15,7 +15,7 @@ - #include - #include - #include --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - #include - -@@ -927,7 +927,7 @@ struct hm2172 { - struct gpio_desc *reset; - struct gpio_desc *handshake; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - struct vsc_mipi_config conf; - struct vsc_camera_status status; -@@ -942,7 +942,7 @@ struct hm2172 { - - /* Streaming on/off */ - bool streaming; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - bool use_intel_vsc; - #endif -@@ -1109,7 +1109,7 @@ static int hm2172_set_ctrl(struct v4l2_ctrl *ctrl) - ret = hm2172_test_pattern(hm2172, ctrl->val); - break; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - case V4L2_CID_PRIVACY: - dev_dbg(&client->dev, "set privacy to %d", ctrl->val); -@@ -1142,7 +1142,7 @@ static int hm2172_init_controls(struct hm2172 *hm2172) - int ret = 0; - - ctrl_hdlr = &hm2172->ctrl_handler; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9); - #else -@@ -1183,7 +1183,7 @@ static int hm2172_init_controls(struct hm2172 *hm2172) - if (hm2172->hblank) - hm2172->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - hm2172->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hm2172_ctrl_ops, - V4L2_CID_PRIVACY, 0, 1, 1, -@@ -1223,7 +1223,7 @@ static void hm2172_update_pad_format(const struct hm2172_mode *mode, - fmt->field = V4L2_FIELD_NONE; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static void hm2172_vsc_privacy_callback(void *handle, - enum vsc_privacy_status status) -@@ -1309,7 +1309,7 @@ static int hm2172_power_off(struct device *dev) - struct hm2172 *hm2172 = to_hm2172(sd); - int ret = 0; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (hm2172->use_intel_vsc) { - ret = vsc_release_camera_sensor(&hm2172->status); -@@ -1336,7 +1336,7 @@ static int hm2172_power_on(struct device *dev) - struct hm2172 *hm2172 = to_hm2172(sd); - int ret; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (hm2172->use_intel_vsc) { - hm2172->conf.lane_num = HM2172_DATA_LANES; -@@ -1392,7 +1392,7 @@ static int hm2172_get_pm_resources(struct device *dev) - struct hm2172 *hm2172 = to_hm2172(sd); - int ret = 0; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - acpi_handle handle = ACPI_HANDLE(dev); - struct acpi_handle_list dep_devices; -diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c -index 78ae01811..31f1e7a3d 100644 ---- a/drivers/media/i2c/ov01a10.c -+++ b/drivers/media/i2c/ov01a10.c -@@ -11,7 +11,7 @@ - #include - #include - #include --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - #include - #endif -@@ -296,7 +296,7 @@ struct ov01a10 { - /* To serialize asynchronus callbacks */ - struct mutex mutex; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - struct vsc_mipi_config conf; - struct vsc_camera_status status; -@@ -469,7 +469,7 @@ static int ov01a10_set_ctrl(struct v4l2_ctrl *ctrl) - ret = ov01a10_test_pattern(ov01a10, ctrl->val); - break; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - case V4L2_CID_PRIVACY: - dev_dbg(&client->dev, "set privacy to %d", ctrl->val); -@@ -500,7 +500,7 @@ static int ov01a10_init_controls(struct ov01a10 *ov01a10) - int ret = 0; - - ctrl_hdlr = &ov01a10->ctrl_handler; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9); - #else -@@ -539,7 +539,7 @@ static int ov01a10_init_controls(struct ov01a10 *ov01a10) - if (ov01a10->hblank) - ov01a10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ov01a10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, - &ov01a10_ctrl_ops, -@@ -661,7 +661,7 @@ static int ov01a10_set_stream(struct v4l2_subdev *sd, int enable) - return ret; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static void ov01a10_vsc_privacy_callback(void *handle, - enum vsc_privacy_status status) -@@ -1016,7 +1016,7 @@ static int ov01a10_probe(struct i2c_client *client) - return -ENOMEM; - - v4l2_i2c_subdev_init(&ov01a10->sd, client, &ov01a10_subdev_ops); --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ov01a10->conf.lane_num = OV01A10_DATA_LANES; - /* frequency unit 100k */ -@@ -1082,7 +1082,7 @@ probe_error_v4l2_ctrl_handler_free: - mutex_destroy(&ov01a10->mutex); - - probe_error_ret: --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ov01a10_power_off(&client->dev); - #endif -@@ -1092,7 +1092,7 @@ probe_error_ret: - - static const struct dev_pm_ops ov01a10_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(ov01a10_suspend, ov01a10_resume) --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - SET_RUNTIME_PM_OPS(ov01a10_power_off, ov01a10_power_on, NULL) - #endif -diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c -index f7cf2218c..85f9c684c 100644 ---- a/drivers/media/i2c/ov01a1s.c -+++ b/drivers/media/i2c/ov01a1s.c -@@ -17,7 +17,7 @@ - #elif IS_ENABLED(CONFIG_POWER_CTRL_LOGIC) - #include "power_ctrl_logic.h" - #endif --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - #include - #endif -@@ -303,7 +303,7 @@ struct ov01a1s { - struct v4l2_ctrl *vblank; - struct v4l2_ctrl *hblank; - struct v4l2_ctrl *exposure; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - struct v4l2_ctrl *privacy_status; - -@@ -337,7 +337,7 @@ struct ov01a1s { - #if IS_ENABLED(CONFIG_INTEL_SKL_INT3472) || IS_ENABLED(CONFIG_POWER_CTRL_LOGIC) - OV01A1S_USE_INT3472 = 1, - #endif --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - OV01A1S_USE_INTEL_VSC = 2, - #endif -@@ -508,7 +508,7 @@ static int ov01a1s_set_ctrl(struct v4l2_ctrl *ctrl) - ret = ov01a1s_test_pattern(ov01a1s, ctrl->val); - break; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - case V4L2_CID_PRIVACY: - dev_dbg(&client->dev, "set privacy to %d", ctrl->val); -@@ -539,7 +539,7 @@ static int ov01a1s_init_controls(struct ov01a1s *ov01a1s) - int ret = 0; - - ctrl_hdlr = &ov01a1s->ctrl_handler; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9); - #else -@@ -577,7 +577,7 @@ static int ov01a1s_init_controls(struct ov01a1s *ov01a1s) - 1, h_blank); - if (ov01a1s->hblank) - ov01a1s->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ov01a1s->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, - &ov01a1s_ctrl_ops, -@@ -619,7 +619,7 @@ static void ov01a1s_update_pad_format(const struct ov01a1s_mode *mode, - fmt->field = V4L2_FIELD_NONE; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static void ov01a1s_vsc_privacy_callback(void *handle, - enum vsc_privacy_status status) -@@ -729,7 +729,7 @@ static int ov01a1s_power_off(struct device *dev) - if (ov01a1s->power_type == OV01A1S_USE_INT3472) - ret = power_ctrl_logic_set_power(0); - #endif --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (ov01a1s->power_type == OV01A1S_USE_INTEL_VSC) { - ret = vsc_release_camera_sensor(&ov01a1s->status); -@@ -764,7 +764,7 @@ static int ov01a1s_power_on(struct device *dev) - if (ov01a1s->power_type == OV01A1S_USE_INT3472) - ret = power_ctrl_logic_set_power(1); - #endif --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (ov01a1s->power_type == OV01A1S_USE_INTEL_VSC) { - ret = vsc_acquire_camera_sensor(&ov01a1s->conf, -@@ -1125,7 +1125,7 @@ static int ov01a1s_parse_power(struct ov01a1s *ov01a1s) - { - int ret = 0; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ov01a1s->conf.lane_num = OV01A1S_DATA_LANES; - /* frequency unit 100k */ -diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c -index 40865f8e3..4f58d5ac9 100644 ---- a/drivers/media/i2c/ov02c10.c -+++ b/drivers/media/i2c/ov02c10.c -@@ -13,7 +13,7 @@ - #include - #include - #include --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - #include - -@@ -697,7 +697,7 @@ struct ov02c10 { - struct gpio_desc *reset; - struct gpio_desc *handshake; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - struct vsc_mipi_config conf; - struct vsc_camera_status status; -@@ -717,7 +717,7 @@ IS_ENABLED(CONFIG_INTEL_VSC) - - /* Module name index */ - u8 module_name_index; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - - bool use_intel_vsc; -@@ -857,7 +857,7 @@ static int ov02c10_set_ctrl(struct v4l2_ctrl *ctrl) - ret = ov02c10_test_pattern(ov02c10, ctrl->val); - break; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - case V4L2_CID_PRIVACY: - dev_dbg(&client->dev, "set privacy to %d", ctrl->val); -@@ -888,7 +888,7 @@ static int ov02c10_init_controls(struct ov02c10 *ov02c10) - int ret = 0; - - ctrl_hdlr = &ov02c10->ctrl_handler; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9); - #else -@@ -926,7 +926,7 @@ IS_ENABLED(CONFIG_INTEL_VSC) - 1, h_blank); - if (ov02c10->hblank) - ov02c10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ov02c10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, - &ov02c10_ctrl_ops, -@@ -1102,7 +1102,7 @@ static int ov02c10_get_pm_resources(struct device *dev) - struct ov02c10 *ov02c10 = to_ov02c10(sd); - int ret; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - acpi_handle handle = ACPI_HANDLE(dev); - struct acpi_handle_list deps; -@@ -1162,7 +1162,7 @@ IS_ENABLED(CONFIG_INTEL_VSC) - return 0; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static void ov02c10_vsc_privacy_callback(void *handle, - enum vsc_privacy_status status) -@@ -1179,7 +1179,7 @@ static int ov02c10_power_off(struct device *dev) - struct ov02c10 *ov02c10 = to_ov02c10(sd); - int ret = 0; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (ov02c10->use_intel_vsc) { - ret = vsc_release_camera_sensor(&ov02c10->status); -@@ -1206,7 +1206,7 @@ static int ov02c10_power_on(struct device *dev) - struct ov02c10 *ov02c10 = to_ov02c10(sd); - int ret; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (ov02c10->use_intel_vsc) { - ov02c10->conf.lane_num = ov02c10->mipi_lanes; -diff --git a/drivers/media/i2c/ov02e10.c b/drivers/media/i2c/ov02e10.c -index 916def90f..c5c373aa6 100644 ---- a/drivers/media/i2c/ov02e10.c -+++ b/drivers/media/i2c/ov02e10.c -@@ -13,7 +13,7 @@ - #include - #include - #include --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - #include - -@@ -289,7 +289,7 @@ struct ov02e10 { - struct gpio_desc *reset; - struct gpio_desc *handshake; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - struct vsc_mipi_config conf; - struct vsc_camera_status status; -@@ -304,7 +304,7 @@ struct ov02e10 { - - /* Streaming on/off */ - bool streaming; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - bool use_intel_vsc; - #endif -@@ -486,7 +486,7 @@ static int ov02e10_set_ctrl(struct v4l2_ctrl *ctrl) - ret = ov02e10_test_pattern(ov02e10, ctrl->val); - break; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - case V4L2_CID_PRIVACY: - dev_dbg(&client->dev, "set privacy to %d", ctrl->val); -@@ -520,7 +520,7 @@ static int ov02e10_init_controls(struct ov02e10 *ov02e10) - int ret; - - ctrl_hdlr = &ov02e10->ctrl_handler; --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9); - #else -@@ -561,7 +561,7 @@ static int ov02e10_init_controls(struct ov02e10 *ov02e10) - if (ov02e10->hblank) - ov02e10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - ov02e10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &ov02e10_ctrl_ops, - V4L2_CID_PRIVACY, 0, 1, 1, -@@ -602,7 +602,7 @@ static void ov02e10_update_pad_format(const struct ov02e10_mode *mode, - fmt->field = V4L2_FIELD_NONE; - } - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - static void ov02e10_vsc_privacy_callback(void *handle, - enum vsc_privacy_status status) -@@ -696,7 +696,7 @@ static int ov02e10_get_pm_resources(struct device *dev) - struct ov02e10 *ov02e10 = to_ov02e10(sd); - int ret; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - acpi_handle handle = ACPI_HANDLE(dev); - struct acpi_handle_list dep_devices; -@@ -763,7 +763,7 @@ static int ov02e10_power_off(struct device *dev) - struct ov02e10 *ov02e10 = to_ov02e10(sd); - int ret = 0; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (ov02e10->use_intel_vsc) { - ret = vsc_release_camera_sensor(&ov02e10->status); -@@ -790,7 +790,7 @@ static int ov02e10_power_on(struct device *dev) - struct ov02e10 *ov02e10 = to_ov02e10(sd); - int ret; - --#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \ -+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ - IS_ENABLED(CONFIG_INTEL_VSC) - if (ov02e10->use_intel_vsc) { - ov02e10->conf.lane_num = OV02E10_DATA_LANES; --- -2.45.1 - diff --git a/anda/system/intel-ipu6-kmod/intel-ipu6-kmod.spec b/anda/system/intel-ipu6-kmod/intel-ipu6-kmod.spec deleted file mode 100644 index de891408c3..0000000000 --- a/anda/system/intel-ipu6-kmod/intel-ipu6-kmod.spec +++ /dev/null @@ -1,93 +0,0 @@ -%global commit0 aecec2aaef069fea56aa921cf5d7e449bb7a0b82 -%global date 20240624 -%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -%global commit1 a6dccbbf5a955489d20d996234b6ebb481183ed7 -%global date 20240416 -%global shortcommit1 %(c=%{commit0}; echo ${c:0:7}) -%define buildforkernels akmod -%global debug_package %{nil} -%global realname intel-ipu6 - -Name: %{realname}-kmod -Version: %{date}.%{shortcommit0} -Release: 1%{?dist} -Summary: Kernel drivers for the IPU 6 and sensors -License: GPL-3.0-only -URL: https://github.com/intel/ipu6-drivers -Source0: https://github.com/intel/ipu6-drivers/archive/%{commit0}.tar.gz#/ipu6-drivers-%{shortcommit0}.tar.gz -Source1: https://github.com/intel/ivsc-driver/archive/%{commit1}.tar.gz#/ivsc-driver-%{shortcommit1}.tar.gz -### intel/ipu6-drivers | PR #214 | Ipu6-isys probe improvements -## https://github.com/intel/ipu6-drivers/pull/214 -Patch0: 0000-probe-improvements.patch -### intel/ipu6-drivers | PR #239 | gc5035: Fix compilation with kernels >= 6.8 -## https://github.com/intel/ipu6-drivers/pull/239 -Patch1: 0001-fix-compilation-6.8.patch -### intel/ipu6-drivers | PR #242 | media: ipu6: Fix compilation with kernels >= 6.10 -## https://github.com/intel/ipu6-drivers/pull/242 -Patch2: 0002-fix-compilation-6.10.patch -### intel-ipu6-drivers | PR #243 | Rename ipu6 .ko files to avoid conflict with upstream ipu6 isys support -## https://github.com/intel/ipu6-drivers/pull/243 -Patch3: 0003-prefix-modules.patch -### intel/ipu6-drivers | PR #261 | media: ipu6: Fix compilation with kernels >= 6.11 -## https://github.com/intel/ipu6-drivers/pull/261 -Patch4: 0004-fix-compilation-6.11.patch -### intel/ipu6-drivers | PR #283 | media: ipu6: Fix compilation with kernels >= 6.12 -## https://github.com/intel/ipu6-drivers/pull/283 -Patch5: 0005-fix-compilation-6.12.patch -Patch6: 0006-fix-compilation-6.12-no-no_llseek.patch -### jwrdegoede/ipu6-drivers | Commit 2c4ad13 | Makefile: Adjust which modules to build for which kernel-versions for Fedora -## https://github.com/jwrdegoede/ipu6-drivers/commit/2c4ad1398dddfb307e8a40a714a6d5f70d6d14cb -Patch7: 0007-modules-per-kernel.patch -BuildRequires: gcc -BuildRequires: elfutils-libelf-devel -BuildRequires: kmodtool - -%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{realname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"}) } - -%description -Kernel drivers for Intel iVSC, IPU 6, and sensors. - -%prep -%{?kmodtool_check} -kmodtool --target %{_target_cpu} --repo terra --kmodname %{realname} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} - -%autosetup -p1 -n ipu6-drivers-%{commit0} -a 1 - -cp -av ivsc-driver-%{commit1}/{backport-include,drivers,include} . -rm -fr intel-vsc-%{commit1} - -for kernel_version in %{?kernel_versions}; do - mkdir _kmod_build_${kernel_version%%___*} - cp -fr backport-include drivers include Makefile _kmod_build_${kernel_version%%___*} -done - -%build -for kernel_version in %{?kernel_versions}; do - pushd _kmod_build_${kernel_version%%___*}/ - %make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules - popd -done - -%install -for kernel_version in %{?kernel_versions}; do - mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - install -p -m 0755 \ - _kmod_build_${kernel_version%%___*}/*.ko \ - _kmod_build_${kernel_version%%___*}/drivers/media/i2c/*.ko \ - _kmod_build_${kernel_version%%___*}/drivers/media/pci/intel/ipu6/*.ko \ - %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ -done -%{?akmod_install} - -### Reloading the modules is needed for %{PATCH0} to take effect properly on some kernels, as well for the changes to be properly reverted on uninstall. -## See: https://github.com/intel/ipu6-drivers/pull/214#issuecomment-1986110818 -%post -/usr/sbin/rmmod -f intel_ipu6_psys intel_ipu6_isys intel_ipu6 -/usr/sbin/modprobe -a intel_ipu6 intel_ipu6_isys intel_ipu6_psys - -%postun -/usr/sbin/rmmod -f intel_ipu6_psys intel_ipu6_isys intel_ipu6 -/usr/sbin/modprobe -a intel_ipu6 intel_ipu6_isys intel_ipu6_psys - -%changelog -%autochangelog diff --git a/anda/system/intel-lpmd/anda.hcl b/anda/system/intel-lpmd/anda.hcl new file mode 100644 index 0000000000..f838f1d9ff --- /dev/null +++ b/anda/system/intel-lpmd/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "intel-lpmd.spec" + } +} diff --git a/anda/system/intel-lpmd/intel-lpmd.spec b/anda/system/intel-lpmd/intel-lpmd.spec new file mode 100644 index 0000000000..aea520d41d --- /dev/null +++ b/anda/system/intel-lpmd/intel-lpmd.spec @@ -0,0 +1,46 @@ +%global _distro_extra_cflags -Wno-unused-variable -Wno-unused-function -Wno-switch -I/usr/lib/gcc/**/include/ + +Name: intel-lpmd +Version: 0.0.9 +Release: 1%?dist +Summary: Linux daemon designed to optimize active idle power +License: GPL-2.0-only +URL: https://github.com/intel/intel-lpmd +Packager: madonuko +Source0: %url/archive/refs/tags/v%version.tar.gz +ExclusiveArch: x86_64 +BuildRequires: automake autoconf-archive glib2-devel dbus-glib-devel libxml2-devel libnl3-devel systemd-devel gtk-doc upower-devel +BuildRequires: gcc + +%description +Intel Low Power Mode Daemon (lpmd) is a Linux daemon designed to optimize active idle power. It selects the most power-efficient CPUs based on a configuration file or CPU topology. Depending on system utilization and other hints, it puts the system into Low Power Mode by activating the power-efficient CPUs and disabling the rest, and restores the system from Low Power Mode by activating all CPUs. + +%prep +%autosetup +sed -i 's@mandb || true@@' Makefile.am + +%conf +./autogen.sh --prefix=%_usr + +%build +%make_build + +%install +%make_install + +%if "%_sbindir" == "%_bindir" +mv %buildroot{%_usr/sbin/*,%_bindir} +%endif + +%files +%doc README.md ChangeLog AUTHORS NEWS security.md +%license COPYING +%_bindir/intel_lpmd_control +%_sbindir/intel_lpmd +%_datadir/dbus-1/system-services/org.freedesktop.intel_lpmd.service +%_mandir/man5/intel_lpmd_config.xml.5.gz +%_mandir/man8/intel_lpmd.8.* +%_mandir/man8/intel_lpmd_control.8.* +%_usr%_sysconfdir/intel_lpmd/ +%_sysconfdir/dbus-1/system.d/org.freedesktop.intel_lpmd.conf +%_unitdir/intel_lpmd.service diff --git a/anda/system/intel-lpmd/update.rhai b/anda/system/intel-lpmd/update.rhai new file mode 100644 index 0000000000..c7a632c5f3 --- /dev/null +++ b/anda/system/intel-lpmd/update.rhai @@ -0,0 +1 @@ +rpm.version(`(?m)^### Release ([\d.]+)$`.find(gh_rawfile("intel/intel-lpmd", "main", "README.md"), 1)); diff --git a/anda/system/ipu6-camera-hal/0000-lib-path.patch b/anda/system/ipu6-camera-hal/0000-lib-path.patch deleted file mode 100644 index df8913015d..0000000000 --- a/anda/system/ipu6-camera-hal/0000-lib-path.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- ipu6-camera-hal-8863bda8b15bef415f112700d0fb04e00a48dbee.old/cmake/libcamhal.pc.cmakein 2024-08-06 08:24:01.897232057 +0200 -+++ ipu6-camera-hal-8863bda8b15bef415f112700d0fb04e00a48dbee/cmake/libcamhal.pc.cmakein 2024-08-06 08:25:08.361731743 +0200 -@@ -1,6 +1,6 @@ - prefix=@CMAKE_INSTALL_PREFIX@ - exec_prefix=${prefix}/@CMAKE_INSTALL_SUB_PATH@ --libdir=${prefix}/lib/@CMAKE_INSTALL_SUB_PATH@ -+libdir=${prefix}/lib64/@CMAKE_INSTALL_SUB_PATH@ - includedir=${prefix}/include/@CMAKE_INSTALL_SUB_PATH@/libcamhal - - Name: libcamhal ---- a/src/hal/hal_adaptor/HalAdaptor.cpp -+++ b/src/hal/hal_adaptor/HalAdaptor.cpp -@@ -62,7 +62,7 @@ static void load_camera_hal_library() { - CheckAndLogError((strlen(pciID) == 0), VOID_VALUE, "%s, Failed to read PCI id. %d", __func__, - ret); - -- std::string libName = "/usr/lib/"; -+ std::string libName = "/usr/lib64/"; - if (IPU6_UPSTREAM) { - if (strstr(pciID, "0x7d19") != nullptr /* MTL */) { - libName += "ipu_mtl_upstream"; ---- ipu6-camera-hal-8863bda8b15bef415f112700d0fb04e00a48dbee.old/src/platformdata/PlatformData.h 2024-08-06 08:24:01.919232222 +0200 -+++ ipu6-camera-hal-8863bda8b15bef415f112700d0fb04e00a48dbee/src/platformdata/PlatformData.h 2024-08-06 08:25:08.362731750 +0200 -@@ -89,7 +89,7 @@ - #define MAX_CAMERA_NUMBER 100 - // Temporarily using current path to save aiqd file for none CAL platforms. - #define CAMERA_CACHE_DIR "./" --#define CAMERA_DEFAULT_CFG_PATH "/etc/camera/" -+#define CAMERA_DEFAULT_CFG_PATH "/usr/share/camera/" - #define CAMERA_GRAPH_DESCRIPTOR_FILE "gcss/graph_descriptor.xml" - #define CAMERA_GRAPH_SETTINGS_DIR "gcss/" - #endif diff --git a/anda/system/ipu6-camera-hal/0001-CMakeLists-fixes.patch b/anda/system/ipu6-camera-hal/0001-CMakeLists-fixes.patch deleted file mode 100644 index 82924624ce..0000000000 --- a/anda/system/ipu6-camera-hal/0001-CMakeLists-fixes.patch +++ /dev/null @@ -1,48 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -266,7 +266,7 @@ add_library(camhal_static STATIC ${LIBCAMHAL_SRCS}) - if (NOT CAL_BUILD AND (NOT "${CMAKE_INSTALL_SUB_PATH}" STREQUAL "")) - set(CMAKE_SKIP_RPATH TRUE) - set_target_properties(camhal PROPERTIES LINK_FLAGS -- "-Wl,-rpath,/usr/lib/${CMAKE_INSTALL_SUB_PATH}") -+ "-Wl,-rpath,${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/${CMAKE_INSTALL_SUB_PATH}") - add_compile_definitions(SUB_CONFIG_PATH="${CMAKE_INSTALL_SUB_PATH}") - endif() - set_target_properties(camhal_static PROPERTIES OUTPUT_NAME "camhal") -@@ -399,9 +399,9 @@ endif() #ENABLE_SANDBOXING - if (NOT CAL_BUILD) - # Install headers - if ("${CMAKE_INSTALL_SUB_PATH}" STREQUAL "") -- install(DIRECTORY include/ DESTINATION usr/include/libcamhal) -+ install(DIRECTORY include/ DESTINATION include/libcamhal) - if (SUPPORT_LIVE_TUNING) -- install(FILES modules/livetune/LiveTuning.h DESTINATION usr/include/libcamhal/api) -+ install(FILES modules/livetune/LiveTuning.h DESTINATION include/libcamhal/api) - endif() #SUPPORT_LIVE_TUNING - endif() - -@@ -421,18 +421,18 @@ endif() - # Install libraries - if (${CMAKE_VERSION} VERSION_LESS 3.11) - install(TARGETS camhal camhal_static -- LIBRARY DESTINATION usr/lib/${CMAKE_INSTALL_SUB_PATH} -- ARCHIVE DESTINATION usr/lib/${CMAKE_INSTALL_SUB_PATH} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CMAKE_INSTALL_SUB_PATH} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CMAKE_INSTALL_SUB_PATH} - ) - else() --install(TARGETS camhal camhal_static DESTINATION usr/lib/${CMAKE_INSTALL_SUB_PATH}) -+install(TARGETS camhal camhal_static DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CMAKE_INSTALL_SUB_PATH}) - endif() - - # Install package config file - configure_file(${PROJECT_SOURCE_DIR}/cmake/libcamhal.pc.cmakein - ${PROJECT_SOURCE_DIR}/libcamhal.pc @ONLY) - install(FILES libcamhal.pc -- DESTINATION usr/${CMAKE_INSTALL_LIBDIR}/${CMAKE_INSTALL_SUB_PATH}/pkgconfig) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/${CMAKE_INSTALL_SUB_PATH}/pkgconfig) - - endif() #NOT CAL_BUILD - - - diff --git a/anda/system/ipu6-camera-hal/0001-Drop-Werror.patch b/anda/system/ipu6-camera-hal/0001-Drop-Werror.patch new file mode 100644 index 0000000000..24470dad69 --- /dev/null +++ b/anda/system/ipu6-camera-hal/0001-Drop-Werror.patch @@ -0,0 +1,36 @@ +From 1ec565d6b067d165cfbf8f68fc008e68fa94cfc0 Mon Sep 17 00:00:00 2001 +From: Hans de Goede +Date: Sun, 2 Feb 2025 08:52:52 +0100 +Subject: [PATCH] Drop -Werror +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Drop -Werror to stop the following false-positive gcc-15 warning +breaking the build: + +/builddir/build/BUILD/ipu6-camera-hal-0.0-build/ipu6-camera-hal-b6f6eeb68f06cd0d4a2463b8950847b1b98cebaa/src/core/psysprocessor/PGCommon.cpp: In member function ‘icamera::PGCommon::init()’: +/builddir/build/BUILD/ipu6-camera-hal-0.0-build/ipu6-camera-hal-b6f6eeb68f06cd0d4a2463b8950847b1b98cebaa/src/core/psysprocessor/PGCommon.cpp:122:73: error: argument 1 range [18446744071562067968, 18446744073709551615] exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] + 122 | mPgTerminals = std::unique_ptr(new uint8_t[mTerminalCount]); + | ^ + +Signed-off-by: Hans de Goede +--- + CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f7b515a..27a20fa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -80,7 +80,6 @@ message(STATUS "install prefix: " ${CMAKE_INSTALL_PREFIX}) + set (CMAKE_CXX_STANDARD 11) + add_compile_options( + -Wall +- -Werror + -fstack-protector + -fPIE + -fPIC +-- +2.48.1 + diff --git a/anda/system/ipu6-camera-hal/0002-set-mainline.patch b/anda/system/ipu6-camera-hal/0002-set-mainline.patch deleted file mode 100644 index 057036a047..0000000000 --- a/anda/system/ipu6-camera-hal/0002-set-mainline.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/v4l2/MediaControl.cpp -+++ b/src/v4l2/MediaControl.cpp -@@ -886,6 +886,15 @@ int MediaControl::mediaCtlSetup(int cameraId, MediaCtlConf* mc, int width, int h - ivscName.c_str(), link.sinkEntityName.c_str()); - link.srcEntity = ivsc->info.id; - link.srcEntityName = ivscName; -+ /* -+ * Since mainline kernel commit 48f5fd8967f8 ("media: -+ * ivsc: csi: Swap SINK and SOURCE pads") the src-pad -+ * on the mainline ivsc mc-entity is pad 1, where on -+ * older versions it is pad 0, so this needs to be set -+ * dynamically. -+ * The src-pad is the other pad of the found ivsc sink. -+ */ -+ link.srcPad = !ivsc->links[i].sink->index; - break; - } - } - - diff --git a/anda/system/ipu6-camera-hal/60-intel-ipu6.rules b/anda/system/ipu6-camera-hal/60-intel-ipu6.rules index 967b72cb12..1fc0806b5b 100644 --- a/anda/system/ipu6-camera-hal/60-intel-ipu6.rules +++ b/anda/system/ipu6-camera-hal/60-intel-ipu6.rules @@ -1,16 +1,28 @@ # Tiger Lake -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", RUN+="/usr/bin/echo /usr/lib64/ipu_tgl > /etc/ld.so.conf.d/ipu6-x86_64.conf" +SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x9a19", GOTO="ipu6_tgl" # Alder Lake-N -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", RUN+="/usr/bin/echo /usr/lib64/ipu_adl > /etc/ld.so.conf.d/ipu6-x86_64.conf" +SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x465d", GOTO="ipu6_adl" # Alder Lake-P -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x462e", RUN+="/usr/bin/echo /usr/lib64/ipu_adl > /etc/ld.so.conf.d/ipu6-x86_64.conf" +SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x462e", GOTO="ipu6_adl" # Raptor Lake-P -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa75d", RUN+="/usr/bin/echo /usr/lib64/ipu_adl > /etc/ld.so.conf.d/ipu6-x86_64.conf" +SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0xa75d", GOTO="ipu6_adl" # Meteor Lake -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x7d19", RUN+="/usr/bin/echo /usr/lib64/ipu_mtl > /etc/ld.so.conf.d/ipu6-x86_64.conf" -# Lunar Lake -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x645d", RUN+="/usr/bin/echo /usr/lib64/ipu_lnl > /etc/ld.so.conf.d/ipu6-x86_64.conf" -# Jasper Lake -SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x4e19", RUN+="/usr/bin/echo /usr/lib64/ipu_jsl > /etc/ld.so.conf.d/ipu6-x86_64.conf" +SUBSYSTEM=="pci", ATTR{vendor}=="0x8086", ATTR{device}=="0x7d19", GOTO="ipu6_mtl" + +GOTO="ipu6_end" + +LABEL="ipu6_tgl" +RUN+="/bin/ln -sf /usr/share/defaults/etc/camera/ipu6/v4l2-relayd /run/v4l2-relayd" +GOTO="ipu6_end" + +LABEL="ipu6_adl" +RUN+="/bin/ln -sf /usr/share/defaults/etc/camera/ipu6ep/v4l2-relayd /run/v4l2-relayd" +GOTO="ipu6_end" + +LABEL="ipu6_mtl" +RUN+="/bin/ln -sf /usr/share/defaults/etc/camera/ipu6epmtl/v4l2-relayd /run/v4l2-relayd" +GOTO="ipu6_end" + +LABEL="ipu6_end" KERNEL=="ipu-psys0", TAG+="uaccess" diff --git a/anda/system/ipu6-camera-hal/anda.hcl b/anda/system/ipu6-camera-hal/anda.hcl index b156dc5ec2..1718d7a1f3 100644 --- a/anda/system/ipu6-camera-hal/anda.hcl +++ b/anda/system/ipu6-camera-hal/anda.hcl @@ -4,6 +4,6 @@ project pkg { spec = "ipu6-camera-hal.spec" } labels { - weekly = 1 + nightly = 1 } } diff --git a/anda/system/ipu6-camera-hal/icamera_ipu6_isys.conf b/anda/system/ipu6-camera-hal/icamera_ipu6_isys.conf deleted file mode 100644 index 5631cb2d2d..0000000000 --- a/anda/system/ipu6-camera-hal/icamera_ipu6_isys.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Move the special isys /dev/video# node out of the way of -# normal v4l2 devices such as v4l2loopback -options icamera_ipu6_isys video_nr=8,9,10,11,12,13,14,15 diff --git a/anda/system/ipu6-camera-hal/ipu6-camera-hal.spec b/anda/system/ipu6-camera-hal/ipu6-camera-hal.spec index 51ba9cedfe..08b3902c55 100644 --- a/anda/system/ipu6-camera-hal/ipu6-camera-hal.spec +++ b/anda/system/ipu6-camera-hal/ipu6-camera-hal.spec @@ -1,31 +1,25 @@ -%global commit 289e645dffbd0ea633f10bb4f93855f1e4429e9a -%global commitdate 20240509 +%global commit c933525a6efe8229a7129b7b0b66798f19d2bef7 +%global commit_date 20250627 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global build_cflags %{__build_flags_lang_c} %{?_distro_extra_cflags} -Wno-alloc-size-larger-than %global build_cxxflags %{__build_flags_lang_cxx} %{?_distro_extra_cxxflags} -Wno-alloc-size-larger-than %global __cmake_in_source_build 1 +%global ver 1.0.0 Name: ipu6-camera-hal Summary: Hardware abstraction layer for Intel IPU6 -URL: https://github.com/intel/ipu6-camera-hal -Version: %{commitdate}.%{shortcommit} -Release: 2%{?dist} +Version: %{ver}^%{commit_date}git.%{shortcommit} +Release: 1%?dist License: Apache-2.0 -Source0: https://github.com/intel/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +URL: https://github.com/intel/ipu6-camera-hal +Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Source1: 60-intel-ipu6.rules Source2: v4l2-relayd-adl Source3: v4l2-relayd-tgl -Source4: icamera_ipu6_isys.conf -Source5: ipu6-driver-select.sh -### RPM Fusion | [ipu6-camera-hal] Update to the latest commit | MODIFIED -## https://lists.rpmfusion.org/archives/list/rpmfusion-commits@lists.rpmfusion.org/thread/O6IPZMHMP7A3LQBDY4AEORTDEX4P6ESY -Patch00: 0000-lib-path.patch -### intel/ipu6-camera-hal | PR #113 | CMakeLists fixes -## https://github.com/intel/ipu6-camera-hal/pull/113 -Patch01: 0001-CMakeLists-fixes.patch -### intel/ipu6-camera-hal | PR #114 | MediaControl: Dymically set mainline IVSC media-entity src-pad index -## https://github.com/intel/ipu6-camera-hal/pull/114 -Patch02: 0002-set-mainline.patch +Source4: ipu6-driver-select.sh +### RPM Fusion | [ipu6-camera-hal] Fix build with gcc15 +## https://lists.rpmfusion.org/archives/list/rpmfusion-commits@lists.rpmfusion.org/thread/TDMTM3WHMTHKCIN3XAUVWK3OBARW5SKO +Patch0: 0001-Drop-Werror.patch BuildRequires: systemd-rpm-macros BuildRequires: ipu6-camera-bins-devel >= 0.0-11 BuildRequires: cmake @@ -33,8 +27,13 @@ BuildRequires: gcc BuildRequires: g++ BuildRequires: expat-devel BuildRequires: libdrm-devel -ExclusiveArch: x86_64 Requires: ipu6-camera-bins >= 0.0-11 +# Fix the stupid issue when changing versioning schemes +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Provides: %{name} = %{commit_date}.%{shortcommit}-%{release} +%endif +ExclusiveArch: x86_64 +Packager: Gilver E. %description This package provides the basic Hardware Avstraction Layer (HAL) access APIs for IPU6. @@ -49,78 +48,33 @@ This provides the necessary header files for IPU6 HAL development. %prep %autosetup -p1 -n %{name}-%{commit} -sed -i "s|/etc/camera/|/usr/share/camera/|g" \ - src/platformdata/PlatformData.h - %build -for i in ipu_tgl ipu_adl ipu_mtl; do - export PKG_CONFIG_PATH=%{_libdir}/$i/pkgconfig/ - export LDFLAGS="$RPM_LD_FLAGS -Wl,-rpath=%{_libdir}/$i" - mkdir $i && pushd $i - if [ $i = "ipu_tgl" ]; then - IPU_VERSION=ipu6 - elif [ $i = "ipu_adl" ]; then - IPU_VERSION=ipu6ep - elif [ $i = "ipu_mtl" ]; then - IPU_VERSION=ipu6epmtl - else - IPU_VERSION=ipu - fi - %cmake \ - -DBUILD_CAMHAL_ADAPTOR=ON \ - -DBUILD_CAMHAL_PLUGIN=ON \ - -DBUILD_CAMHAL_TESTS=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_SUB_PATH:PATH="$i" \ - -DCMAKE_INSTALL_SYSCONFDIR=%{_datadir} \ - -DIPU_VER="$IPU_VERSION" \ - -DUSE_PG_LITE_PIPE=ON .. - %make_build - popd -done - -### hal_adaptor.so dispatches between different libcamhal.so builds so only build it once! -mkdir hal_adaptor && pushd hal_adaptor -%cmake ../src/hal/hal_adaptor -%make_build -popd +%cmake -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_INSTALL_SYSCONFDIR:PATH="%{_datadir}/defaults/etc" \ + -DBUILD_CAMHAL_ADAPTOR=ON \ + -DBUILD_CAMHAL_PLUGIN=ON \ + -DIPU_VERSIONS="ipu6;ipu6ep;ipu6epmtl" \ + -DUSE_PG_LITE_PIPE=ON +%cmake_build %install -for i in ipu_tgl ipu_adl ipu_mtl; do - pushd $i - %make_install - rm %{buildroot}%{_libdir}/$i/libcamhal.a - rm -r %{buildroot}%{_libdir}/$i/pkgconfig - popd -done - -pushd hal_adaptor -%make_install -popd +%cmake_install +# camera-hal will try to use the static libs instead of .so files if present +# Fedora does -devel-static packages, maybe I could do this as well in a different spec so it will not affect builds? +rm %{buildroot}%{_libdir}/libcamhal/plugins/*.a install -Dpm 0644 %{SOURCE1} %{buildroot}%{_udevrulesdir}/60-intel-ipu6.rules ### v4l2-relayd configuration examples (mtl uses same config as adl) -install -Dpm 0644 %{SOURCE2} %{buildroot}%{_datadir}/camera/ipu_adl/v4l2-relayd -install -Dpm 0644 %{SOURCE2} %{buildroot}%{_datadir}/camera/ipu_mtl/v4l2-relayd -install -Dpm 0644 %{SOURCE3} %{buildroot}%{_datadir}/camera/ipu_tgl/v4l2-relayd - -### Make kmod-intel-ipu6 use /dev/video7 leaving /dev/video0 for loopback -install -Dpm 0644 %{SOURCE4} %{buildroot}%{_modprobedir}/icamera_ipu6_isys.conf +install -Dpm 0644 %{SOURCE2} %{buildroot}%{_datadir}/defaults/etc/camera/ipu6/v4l2-relayd +install -Dpm 0644 %{SOURCE3} %{buildroot}%{_datadir}/defaults/etc/camera/ipu6ep/v4l2-relayd +install -Dpm 0644 %{SOURCE3} %{buildroot}%{_datadir}/defaults/etc/camera/ipu6epmtl/v4l2-relayd ### Script to switch between proprietary and open IPU6 stacks -install -Dpm 0755 %{SOURCE5} %{buildroot}%{_bindir}/ipu6-driver-select - -### Needed for GStreamer ICamera builds. -ln -sf hal_adaptor %{buildroot}%{_includedir}/libcamhal -ln -sf hal_adaptor.pc %{buildroot}%{_libdir}/pkgconfig/libcamhal.pc +install -Dpm 0755 %{SOURCE4} %{buildroot}%{_bindir}/ipu6-driver-select %posttrans -### Ensure that v4l2-relayd service enabled if ipu6-driver-select is installed -if [ ! -f /etc/modprobe.d/ipu6-driver-select.conf ]; then - /usr/bin/ipu6-driver-select proprietary -fi ### Skip triggering if udevd isn't accessible if [ -S /run/udev/control ]; then /usr/bin/udevadm control --reload @@ -128,20 +82,18 @@ if [ -S /run/udev/control ]; then fi %files +%doc README.md +%doc SECURITY.md %license LICENSE -%ghost %{_sysconfdir}/modprobe.d/ipu6-driver-select.conf %{_bindir}/ipu6-driver-select -%{_libdir}/ipu*/libcamhal.so* -%{_libdir}/libhal_adaptor.so.* -%{_datadir}/camera -%{_modprobedir}/icamera_ipu6_isys.conf +%{_libdir}/libcamhal.so.* +%{_libdir}/libcamhal +%{_datadir}/defaults %{_udevrulesdir}/60-intel-ipu6.rules %files devel -%{_includedir}/hal_adaptor %{_includedir}/libcamhal -%{_libdir}/libhal_adaptor.so -%{_libdir}/pkgconfig/hal_adaptor.pc +%{_libdir}/libcamhal.so %{_libdir}/pkgconfig/libcamhal.pc diff --git a/anda/system/ipu6-camera-hal/ipu6-driver-select.sh b/anda/system/ipu6-camera-hal/ipu6-driver-select.sh index 4f7333d3b9..d6a4862ab1 100644 --- a/anda/system/ipu6-camera-hal/ipu6-driver-select.sh +++ b/anda/system/ipu6-camera-hal/ipu6-driver-select.sh @@ -3,12 +3,12 @@ set -e function show_help () { - echo "Usage: 'ipu6-driver-select [ proprietary | open ]'" + echo "Usage: 'ipu6-driver-select [ proprietary | foss ]'" exit 1 } -function needs_reboot () { - echo "Reboot your system for the changes to take effect" +function needs_pipewire_restart () { + echo "Run 'systemctl --user restart pipewire' for the changes to take effect" exit 0 } @@ -17,17 +17,13 @@ if (( $# != 1 )); then fi case "$1" in - "open") - echo "blacklist icamera-ipu6" > /etc/modprobe.d/ipu6-driver-select.conf - echo "blacklist icamera-ipu6-isys" >> /etc/modprobe.d/ipu6-driver-select.conf - echo "blacklist icamera-ipu6-psys" >> /etc/modprobe.d/ipu6-driver-select.conf - systemctl disable v4l2-relayd.service - needs_reboot + "foss") + systemctl disable --now v4l2-relayd.service + needs_pipewire_restart ;; "proprietary") - echo "blacklist intel-ipu6" > /etc/modprobe.d/ipu6-driver-select.conf - systemctl enable v4l2-relayd.service - needs_reboot + systemctl enable --now v4l2-relayd.service + needs_pipewire_restart ;; *) show_help diff --git a/anda/system/ipu6-camera-hal/update.rhai b/anda/system/ipu6-camera-hal/update.rhai new file mode 100644 index 0000000000..2c9fac76e3 --- /dev/null +++ b/anda/system/ipu6-camera-hal/update.rhai @@ -0,0 +1,9 @@ +rpm.global("commit", gh_commit("intel/ipu6-camera-hal")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); + let v = gh("intel/ipu6-camera-hal"); + v.truncate(6); + v.crop(1); + rpm.global("ver", v); +} diff --git a/anda/system/intel-ipu6-kmod/anda.hcl b/anda/system/ipu6-drivers/akmod/anda.hcl similarity index 67% rename from anda/system/intel-ipu6-kmod/anda.hcl rename to anda/system/ipu6-drivers/akmod/anda.hcl index 77b034f644..0305b7a9f9 100644 --- a/anda/system/intel-ipu6-kmod/anda.hcl +++ b/anda/system/ipu6-drivers/akmod/anda.hcl @@ -1,8 +1,10 @@ project pkg { + arches = ["x86_64"] rpm { spec = "intel-ipu6-kmod.spec" } labels { mock = 1 + updbranch = 1 } } diff --git a/anda/system/ipu6-drivers/akmod/intel-ipu6-kmod.spec b/anda/system/ipu6-drivers/akmod/intel-ipu6-kmod.spec new file mode 100644 index 0000000000..1553aa78ef --- /dev/null +++ b/anda/system/ipu6-drivers/akmod/intel-ipu6-kmod.spec @@ -0,0 +1,68 @@ +%global buildforkernels akmod +%global debug_package %{nil} +%global commit 9bff73689ea2502f6e3bc34769fd699cde3ffeea +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250627 +%global modulename intel-ipu6 +# Actual "release" version, currently unused as the release versions are back and forth on if on if they use 1.0.0 or 1.0.1 +%global ver 1.0.1 + +Name: %{modulename}-kmod +Summary: Akmods module for %{modulename} +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%?dist +License: GPL-2.0-or-later +URL: https://github.com/intel/ipu6-drivers +Source0: https://github.com/intel/ipu6-drivers/archive/%{commit}/ipu6-drivers-%{shortcommit}.tar.gz +BuildRequires: elfutils-libelf-devel +BuildRequires: gcc +BuildRequires: kmodtool +Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: akmods +Requires: akmod-intel-usbio +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Provides: %{name} = %{commitdate}.%{shortcommit}-%{release} +Provides: akmod-%{modulename} = %{commitdate}.%{shortcommit}-%{release} +%endif + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{modulename} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +This package enables the Intel IPU6 image processor. + +%prep +# Error out if there was something wrong with kmodtool: +%{?kmodtool_check} +# Print kmodtool output for debugging purposes: +kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -p1 -n ipu6-drivers-%{commit} +patch -p1 -i patches/*.patch +rm -fr dkms.conf .github + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr drivers include Makefile _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + %make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules + popd +done + +%install +for kernel_version in %{?kernel_versions}; do + # Print out modules that are getting built: + find _kmod_build_${kernel_version%%___*} -name "*.ko" + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 \ + _kmod_build_${kernel_version%%___*}/drivers/media/i2c/*.ko \ + _kmod_build_${kernel_version%%___*}/drivers/media/pci/intel/ipu6/psys/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +%autochangelog diff --git a/anda/system/ipu6-drivers/akmod/update.rhai b/anda/system/ipu6-drivers/akmod/update.rhai new file mode 100644 index 0000000000..a20505ac68 --- /dev/null +++ b/anda/system/ipu6-drivers/akmod/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec | grep '%global commit_date' | sed -E 's/.+commit_date //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commit_date", d); + let v = sh("cat anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/ipu6-drivers/dkms/anda.hcl b/anda/system/ipu6-drivers/dkms/anda.hcl new file mode 100644 index 0000000000..f189196e65 --- /dev/null +++ b/anda/system/ipu6-drivers/dkms/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "dkms-intel-ipu6.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/ipu6-drivers/dkms/dkms-intel-ipu6.conf b/anda/system/ipu6-drivers/dkms/dkms-intel-ipu6.conf new file mode 100644 index 0000000000..6519d3b436 --- /dev/null +++ b/anda/system/ipu6-drivers/dkms/dkms-intel-ipu6.conf @@ -0,0 +1,40 @@ +PACKAGE_NAME=ipu6-drivers +PACKAGE_VERSION=0.1 +AUTOINSTALL="yes" +BUILD_EXCLUSIVE_CONFIG="CONFIG_VIDEO_V4L2_I2C CONFIG_V4L2_CCI_I2C" + +BUILT_MODULE_NAME[0]="hm11b1" +BUILT_MODULE_LOCATION[0]="drivers/media/i2c" +DEST_MODULE_LOCATION[0]="/extra" + +BUILT_MODULE_NAME[1]="ov01a1s" +BUILT_MODULE_LOCATION[1]="drivers/media/i2c" +DEST_MODULE_LOCATION[1]="/extra" + +BUILT_MODULE_NAME[2]="ov02c10" +BUILT_MODULE_LOCATION[2]="drivers/media/i2c" +DEST_MODULE_LOCATION[2]="/extra" + +BUILT_MODULE_NAME[3]="ov02e10" +BUILT_MODULE_LOCATION[3]="drivers/media/i2c" +DEST_MODULE_LOCATION[3]="/extra" + +BUILT_MODULE_NAME[4]="hm2170" +BUILT_MODULE_LOCATION[4]="drivers/media/i2c" +DEST_MODULE_LOCATION[4]="/extra" + +BUILT_MODULE_NAME[5]="hm2172" +BUILT_MODULE_LOCATION[5]="drivers/media/i2c" +DEST_MODULE_LOCATION[5]="/extra" + +BUILT_MODULE_NAME[6]="ov05c10" +BUILT_MODULE_LOCATION[6]="drivers/media/i2c" +DEST_MODULE_LOCATION[6]="/extra" + +BUILT_MODULE_NAME[7]="intel-ipu6-psys" +BUILT_MODULE_LOCATION[7]="drivers/media/pci/intel/ipu6/psys" +DEST_MODULE_LOCATION[7]="/extra" + +BUILT_MODULE_NAME[8]="imx471" +BUILT_MODULE_LOCATION[8]="drivers/media/i2c" +DEST_MODULE_LOCATION[8]="/extra" diff --git a/anda/system/ipu6-drivers/dkms/dkms-intel-ipu6.spec b/anda/system/ipu6-drivers/dkms/dkms-intel-ipu6.spec new file mode 100644 index 0000000000..0c9c54abbf --- /dev/null +++ b/anda/system/ipu6-drivers/dkms/dkms-intel-ipu6.spec @@ -0,0 +1,60 @@ +%global debug_package %{nil} +%global commit 9bff73689ea2502f6e3bc34769fd699cde3ffeea +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250627 +%global modulename intel-ipu6 +# Actual "release" version, currently unused as the release versions are back and forth on if on if they use 1.0.0 or 1.0.1 +%global ver 1.0.1 + +Name: dkms-%{modulename} +Summary: DKMS module for %{modulename} +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%?dist +License: GPL-2.0-or-later +URL: https://github.com/intel/ipu6-drivers +Source0: %{url}/archive/%{commit}.tar.gz#/ipu6-drivers-%{shortcommit}.tar.gz +Source1: %{name}.conf +BuildRequires: elfutils-libelf-devel +BuildRequires: gcc +BuildRequires: systemd-rpm-macros +Provides: %{modulename}-kmod +Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Requires: dkms-usbio-drivers +BuildArch: noarch +Packager: Gilver E. + +%description +This package enables the Intel IPU6 image processor. + +%prep +%autosetup -p1 -n ipu6-drivers-%{commit} +# Pre-apply patch listed in dkms.conf: +patch -p1 -i patches/*.patch +rm -fr patch* .github + +cp -f %{SOURCE1} dkms.conf + +%build + +%install +# Create empty tree: +mkdir -p %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/ +cp -fr * %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/ + +%post +dkms add -m %{dkms_name} -v %{version} -q || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{dkms_name} -v %{version} -q || : +dkms install -m %{dkms_name} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{dkms_name} -v %{version} -q --all || : + +%files +%{_usrsrc}/%{dkms_name}-%{version} + +%changelog +* Thu Apr 24 2025 Gilver E. +- Initial package diff --git a/anda/system/ipu6-drivers/dkms/update.rhai b/anda/system/ipu6-drivers/dkms/update.rhai new file mode 100644 index 0000000000..a20505ac68 --- /dev/null +++ b/anda/system/ipu6-drivers/dkms/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec | grep '%global commit_date' | sed -E 's/.+commit_date //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commit_date", d); + let v = sh("cat anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/ipu6-drivers/kmod-common/anda.hcl b/anda/system/ipu6-drivers/kmod-common/anda.hcl new file mode 100644 index 0000000000..27781c612f --- /dev/null +++ b/anda/system/ipu6-drivers/kmod-common/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "intel-ipu6-drivers.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec b/anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec new file mode 100644 index 0000000000..41f581ac99 --- /dev/null +++ b/anda/system/ipu6-drivers/kmod-common/intel-ipu6-drivers.spec @@ -0,0 +1,39 @@ +%global debug_package %{nil} +%global commit 9bff73689ea2502f6e3bc34769fd699cde3ffeea +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250627 +# Actual "release" version, currently unused as the release versions are back and forth on if on if they use 1.0.0 or 1.0.1 +# Use this if they ever stop doing that I guess +%global ver 1.0.1 + +Name: intel-ipu6-drivers +Summary: Common files for Intel IPU6 drivers +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%?dist +License: GPL-2.0-or-later +URL: https://github.com/intel/ipu6-drivers +Source0: https://github.com/intel/ipu6-drivers/archive/%{commit}/ipu6-drivers-%{shortcommit}.tar.gz +Requires: ipu6-camera-bins +Requires: intel-ipu6-kmod = %{?epoch:%{epoch}:}%{version} +Provides: intel-ipu6-kmod-common = %{?epoch:%{epoch}:}%{version}-%{release} +BuildArch: noarch +Packager: Gilver E. + +%description +Common files for the Intel IPU6 camera drivers. + +%prep +%autosetup -n ipu6-drivers-%{commit} + +%build + +%install + +%files +%license LICENSE +%doc README.md +%doc SECURITY.md + +%changelog +* Thu Apr 24 2025 Gilver E. +- Initial package diff --git a/anda/system/ipu6-drivers/kmod-common/update.rhai b/anda/system/ipu6-drivers/kmod-common/update.rhai new file mode 100644 index 0000000000..71e742e661 --- /dev/null +++ b/anda/system/ipu6-drivers/kmod-common/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("intel/ipu6-drivers")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/system/ivsc-firmware/anda.hcl b/anda/system/ivsc-firmware/anda.hcl index 3417d3cddf..abbf8c7165 100644 --- a/anda/system/ivsc-firmware/anda.hcl +++ b/anda/system/ivsc-firmware/anda.hcl @@ -1,8 +1,6 @@ project pkg { + arches = ["x86_64"] rpm { spec = "ivsc-firmware.spec" } - labels { - weekly = 1 - } } diff --git a/anda/system/ivsc-firmware/ivsc-firmware.spec b/anda/system/ivsc-firmware/ivsc-firmware.spec index 64e540e8a3..5af20b271e 100644 --- a/anda/system/ivsc-firmware/ivsc-firmware.spec +++ b/anda/system/ivsc-firmware/ivsc-firmware.spec @@ -1,16 +1,24 @@ %global debug_package %{nil} -%global commit 74a01d1208a352ed85d76f959c68200af4ead918 -%global commitdate 20230811 +%global commit 3377801f46b86e03c464bfb03ca3c486e9b0db00 +%global commit_date 20250326 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: ivsc-firmware Summary: Intel iVSC firmware URL: https://github.com/intel/ivsc-firmware -Version: %{commitdate}.%{shortcommit} -Release: 1%?dist +Version: 0^%{commit_date}git.%{shortcommit} +Release: 3%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif License: Proprietary Source0: https://github.com/intel/%{name}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz Requires: ipu6-camera-bins +# Fix the stupid issue when changing versioning schemes +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Provides: %{name} = %{?epoch:%{epoch}:}%{commit_date}.%{shortcommit}-%{release} +Obsoletes: %{name} < %{?epoch:%{epoch}:}20230811.74a01d1-2 +%endif ExclusiveArch: x86_64 %description @@ -32,8 +40,12 @@ done popd %files +%doc README.md +%doc SECURITY.md %license LICENSE %{_prefix}/lib/firmware/vsc/ %changelog -%autochangelog +* Tue Apr 1 2025 Gilver E. - 0^20250326git.3377801-2%{?dist} - FINAL +- Final update as the project is archived +- Include the doc files diff --git a/anda/games/joycond/anda.hcl b/anda/system/joycond/anda.hcl similarity index 100% rename from anda/games/joycond/anda.hcl rename to anda/system/joycond/anda.hcl diff --git a/anda/games/joycond/joycond.spec b/anda/system/joycond/joycond.spec similarity index 84% rename from anda/games/joycond/joycond.spec rename to anda/system/joycond/joycond.spec index 41bce51cca..2bb0f1a80d 100644 --- a/anda/games/joycond/joycond.spec +++ b/anda/system/joycond/joycond.spec @@ -1,4 +1,4 @@ -%global commit 9d1f5098b716681d087cca695ad714218a18d4e8 +%global commit 39d5728d41b70840342ddc116a59125b337fbde2 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commit_date %(date '+%Y%m%d') Name: joycond @@ -9,6 +9,7 @@ License: GPL-3.0-or-later URL: https://github.com/DanielOgorchock/joycond Source0: %url/archive/%{commit}/%{commit}.tar.gz#/%{name}-%{commit_date}.git~%{shortcommit}.tar.gz Patch0: https://github.com/terrapkg/pkg-joycond/raw/refs/heads/main/0001-Revert-virt_ctrlr_passthrough-send-uevent-change-eve.patch +Patch1: https://github.com/terrapkg/pkg-joycond/raw/refs/heads/main/0001-Change-permissions-for-hidraw-access.patch Packager: Cappy Ishihara BuildRequires: libevdev-devel libudev-devel BuildRequires: cmake make systemd-rpm-macros gcc-c++ @@ -27,9 +28,6 @@ joycond is a linux daemon which uses the evdev devices provided by hid-nintendo %install %cmake_install -mkdir -p %buildroot%_unitdir %buildroot%_prefix -mv %buildroot%_sysconfdir/systemd/system/joycond.service %buildroot%_unitdir/joycond.service -mv %buildroot/lib/udev/ %buildroot%_prefix/lib/ %post %systemd_post joycond.service @@ -46,3 +44,4 @@ mv %buildroot/lib/udev/ %buildroot%_prefix/lib/ %_udevrulesdir/89-joycond.rules %_unitdir/joycond.service %_sysconfdir/modules-load.d/joycond.conf +%_datadir/metainfo/com.github.DanielOgorchock.joycond.metainfo.xml \ No newline at end of file diff --git a/anda/system/limine/limine.spec b/anda/system/limine/limine.spec index 2b045d4df7..390f870454 100644 --- a/anda/system/limine/limine.spec +++ b/anda/system/limine/limine.spec @@ -1,11 +1,12 @@ Name: limine -Version: 9.0.0 +Version: 9.6.1 Release: 1%?dist Summary: Modern, advanced, portable, multiprotocol bootloader License: BSD-2-Clause URL: https://limine-bootloader.org Source0: https://github.com/limine-bootloader/limine/releases/download/v%version/limine-%version.tar.gz Source1: https://raw.githubusercontent.com/limine-bootloader/limine/v%version/README.md +Packager: madonuko BuildRequires: nasm mtools llvm lld clang make %description @@ -23,13 +24,12 @@ cp %SOURCE1 . %install %make_install + %files -%doc README.md CONFIG.md PHILOSOPHY.md PROTOCOL.md COPYING USAGE.md +%doc README.md 3RDPARTY.md FAQ.md CONFIG.md PROTOCOL.md COPYING USAGE.md +%doc %_datadir/doc/limine/LICENSES/LicenseRef-scancode-bsd-no-disclaimer-unmodified.txt %license COPYING %_bindir/limine %_includedir/limine.h %_datadir/limine/ %_mandir/man1/limine.1.gz - -%changelog -%autochangelog diff --git a/anda/system/logiops/anda.hcl b/anda/system/logiops/anda.hcl new file mode 100644 index 0000000000..64e6e8555f --- /dev/null +++ b/anda/system/logiops/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "logiops.spec" + } +} diff --git a/anda/system/logiops/logiops.spec b/anda/system/logiops/logiops.spec new file mode 100644 index 0000000000..f93dcc1f91 --- /dev/null +++ b/anda/system/logiops/logiops.spec @@ -0,0 +1,44 @@ +Name: logiops +Version: 0.3.5 +Release: 1%?dist +Summary: An unofficial userspace driver for HID++ Logitech devices +License: GPL-3.0-only +URL: https://github.com/PixlOne/logiops +Packager: madonuko +BuildRequires: cmake libevdev-devel systemd-devel libconfig-devel gcc-c++ glib2-devel +Provides: logid = %evr + +%description +This is an unofficial driver for Logitech mice and keyboard. + +This is currently only compatible with HID++ >2.0 devices. + +%prep +%git_clone %url v%version + +%build +%cmake -DCMAKE_BUILD_TYPE=Release +%cmake_build + +%install +%cmake_install + +echo "enable logid.service" | install -Dm644 /dev/stdin %buildroot%_presetdir/96-%name.preset + +%post +%systemd_post logid.service + +%preun +%systemd_preun logid.service + +%postun +%systemd_postun_with_restart logid.service + +%files +%doc README.md +%license LICENSE +%_bindir/logid +%_datadir/dbus-1/system.d/pizza.pixl.LogiOps.conf +%_presetdir/96-%name.preset +%dnl %_sysconfdir/logid.cfg +%_unitdir/logid.service diff --git a/anda/system/logiops/update.rhai b/anda/system/logiops/update.rhai new file mode 100644 index 0000000000..e0077be403 --- /dev/null +++ b/anda/system/logiops/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("PixlOne/logiops")); diff --git a/anda/system/nvidia-patch/anda.hcl b/anda/system/nvidia-patch/anda.hcl index 96eebb3875..8ea88871d3 100644 --- a/anda/system/nvidia-patch/anda.hcl +++ b/anda/system/nvidia-patch/anda.hcl @@ -4,5 +4,6 @@ project "pkg" { } labels { nightly = "1" + subrepo = "nvidia" } -} \ No newline at end of file +} diff --git a/anda/system/nvidia-patch/nvidia-patch.spec b/anda/system/nvidia-patch/nvidia-patch.spec index 64353127ce..64e211cd9e 100644 --- a/anda/system/nvidia-patch/nvidia-patch.spec +++ b/anda/system/nvidia-patch/nvidia-patch.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} -%global commit ab88d5ec996e841255e3c5215a360b7de306f375 +%global commit cab3ed667dfd8aa2f5c4bbc9dfa8a3475299a47a %global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global commit_date 20250212 +%global commit_date 20250822 %global patches %{_datadir}/src/nvidia-patch @@ -15,7 +15,7 @@ URL: https://github.com/keylase/nvidia-patch Source0: %{url}/archive/%{commit}.tar.gz BuildRequires: tar -Requires: akmod-nvidia +Requires: nvidia-kmod %description NVENC patch removes restriction on maximum number of simultaneous NVENC video encoding sessions imposed by Nvidia to consumer-grade GPUs. diff --git a/anda/system/nvidia/dkms-nvidia/closed/anda.hcl b/anda/system/nvidia/dkms-nvidia/closed/anda.hcl new file mode 100644 index 0000000000..1fc99a9f40 --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/closed/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "dkms-nvidia.spec" + } + labels { + subrepo = "nvidia" + } +} diff --git a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.conf b/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.conf new file mode 100644 index 0000000000..1b1ecb2efb --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.conf @@ -0,0 +1,28 @@ +PACKAGE_NAME="nvidia" +PACKAGE_VERSION="__VERSION_STRING" +AUTOINSTALL="yes" + +MODULE_VARIANT=kernel + +# Quote make to avoid DKMS replacing it with "make -j$parallel_jobs KERNELRELEASE=$kernelver" +MAKE[0]="'make' -j$(nproc) -C ${MODULE_VARIANT} KERNEL_UNAME=${kernelver} modules" + +BUILT_MODULE_NAME[0]="nvidia" +BUILT_MODULE_LOCATION[0]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[0]="/extra" + +BUILT_MODULE_NAME[1]="nvidia-modeset" +BUILT_MODULE_LOCATION[1]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[1]="/extra" + +BUILT_MODULE_NAME[2]="nvidia-drm" +BUILT_MODULE_LOCATION[2]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[2]="/extra" + +BUILT_MODULE_NAME[3]="nvidia-uvm" +BUILT_MODULE_LOCATION[3]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[3]="/extra" + +BUILT_MODULE_NAME[4]="nvidia-peermem" +BUILT_MODULE_LOCATION[4]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[4]="/extra" diff --git a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec b/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec new file mode 100644 index 0000000000..ea35ae369d --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec @@ -0,0 +1,62 @@ +## NVIDIA DKMS package, based on the work of Negativo17 with tweaks for Terra. + +# RPM inexplicably thinks this package deps on a version of libcrypto it does not? +%global __requires_exclude (libcrypto\\.so\\.1\\.1.*)$ +%global debug_package %{nil} +%global modulename nvidia + +Name: dkms-%{modulename} +Version: 580.76.05 +Release: 1%?dist +Summary: NVIDIA display driver kernel module +Epoch: 3 +License: NVIDIA License +URL: https://www.nvidia.com/object/unix.html +Source0: https://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run +Source1: %{name}.conf +BuildRequires: sed +Provides: %{modulename}-kmod = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Conflicts: akmod-nvidia +# Unlike most DKMS packages, this package is NOT noarch! +ExclusiveArch: x86_64 aarch64 + +%description +This package provides the proprietary NVIDIA kernel driver modules. + +%prep +sh %{SOURCE0} -x --target dkms-nvidia-%{version}-%{_arch} +%setup -T -D -n dkms-nvidia-%{version}-%{_arch} +%autopatch -p1 + +cp -f %{SOURCE1} dkms.conf + +sed -i -e 's/__VERSION_STRING/%{version}/g' dkms.conf + +%build + +%install +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr * %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +rm -f %{buildroot}%{_usrsrc}/%{modulename}-%{version}/*/dkms.conf + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : +dracut --regenerate-all --force --quiet + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : +if [ "$1" == 0 ]; then + dracut --regenerate-all --force --quiet +fi + +%files +%{_usrsrc}/%{modulename}-%{version} + +%changelog +%autochangelog diff --git a/anda/system/nvidia/dkms-nvidia/closed/modules.conf b/anda/system/nvidia/dkms-nvidia/closed/modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/closed/modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/nvidia/nvidia-kmod/update.rhai b/anda/system/nvidia/dkms-nvidia/closed/update.rhai similarity index 100% rename from anda/system/nvidia/nvidia-kmod/update.rhai rename to anda/system/nvidia/dkms-nvidia/closed/update.rhai diff --git a/anda/system/nvidia/dkms-nvidia/open/anda.hcl b/anda/system/nvidia/dkms-nvidia/open/anda.hcl new file mode 100644 index 0000000000..3bc9d135c7 --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/open/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "dkms-nvidia-open.spec" + } + labels { + subrepo = "nvidia" + } +} diff --git a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.conf b/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.conf new file mode 100644 index 0000000000..5db6994392 --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.conf @@ -0,0 +1,28 @@ +PACKAGE_NAME="nvidia" +PACKAGE_VERSION="__VERSION_STRING" +AUTOINSTALL="yes" + +MODULE_VARIANT=kernel-open + +# Quote make to avoid DKMS replacing it with "make -j$parallel_jobs KERNELRELEASE=$kernelver" +MAKE[0]="'make' -j$(nproc) -C ${MODULE_VARIANT} KERNEL_UNAME=${kernelver} modules" + +BUILT_MODULE_NAME[0]="nvidia" +BUILT_MODULE_LOCATION[0]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[0]="/extra" + +BUILT_MODULE_NAME[1]="nvidia-modeset" +BUILT_MODULE_LOCATION[1]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[1]="/extra" + +BUILT_MODULE_NAME[2]="nvidia-drm" +BUILT_MODULE_LOCATION[2]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[2]="/extra" + +BUILT_MODULE_NAME[3]="nvidia-uvm" +BUILT_MODULE_LOCATION[3]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[3]="/extra" + +BUILT_MODULE_NAME[4]="nvidia-peermem" +BUILT_MODULE_LOCATION[4]="${MODULE_VARIANT}" +DEST_MODULE_LOCATION[4]="/extra" diff --git a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec b/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec new file mode 100644 index 0000000000..c5deff7b67 --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec @@ -0,0 +1,60 @@ +## NVIDIA DKMS package, based on the work of Negativo17 with tweaks for Terra. + +%global debug_package %{nil} +%global modulename nvidia + +Name: dkms-%{modulename}-open +Version: 580.76.05 +Release: 1%?dist +Summary: NVIDIA display driver kernel module +Epoch: 3 +License: NVIDIA License +URL: https://www.nvidia.com/object/unix.html +Source0: https://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run +Source1: %{name}.conf +BuildRequires: sed +Provides: %{modulename}-open-kmod = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Conflicts: akmod-nvidia +# Unlike most DKMS packages, this package is NOT noarch! +ExclusiveArch: x86_64 aarch64 + +%description +This package provides the NVIDIA kernel driver modules. + +%prep +sh %{SOURCE0} -x --target dkms-nvidia-%{version}-%{_arch} +%setup -T -D -n dkms-nvidia-%{version}-%{_arch} +%autopatch -p1 + +cp -f %{SOURCE1} dkms.conf + +sed -i -e 's/__VERSION_STRING/%{version}/g' dkms.conf + +%build + +%install +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr * %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +rm -f %{buildroot}%{_usrsrc}/%{modulename}-%{version}/*/dkms.conf + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : +dracut --regenerate-all --force --quiet + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : +if [ "$1" == 0 ]; then + dracut --regenerate-all --force --quiet +fi + +%files +%{_usrsrc}/%{modulename}-%{version} + +%changelog +%autochangelog diff --git a/anda/system/nvidia/dkms-nvidia/open/modules.conf b/anda/system/nvidia/dkms-nvidia/open/modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/open/modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/nvidia/dkms-nvidia/open/update.rhai b/anda/system/nvidia/dkms-nvidia/open/update.rhai new file mode 100644 index 0000000000..e5eff132c0 --- /dev/null +++ b/anda/system/nvidia/dkms-nvidia/open/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_driver_version()); diff --git a/anda/system/nvidia/libva-nvidia-driver/anda.hcl b/anda/system/nvidia/libva-nvidia-driver/anda.hcl index d3a613011e..007aa44ec7 100644 --- a/anda/system/nvidia/libva-nvidia-driver/anda.hcl +++ b/anda/system/nvidia/libva-nvidia-driver/anda.hcl @@ -6,5 +6,6 @@ project "pkg" { labels = { subrepo = "nvidia" mock = 1 + nightly = 1 } -} \ No newline at end of file +} diff --git a/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec b/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec index 4b1ba9be71..80b71db25e 100644 --- a/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec +++ b/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec @@ -1,13 +1,17 @@ -%global commit0 c519e97ef7af581c109f49b6973269fb16d1bc54 -%global date 20250206 +%global commit0 e02b9c5c714f35a7576f0c1e549327e060fc7903 +%global date 20250819 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global upstream_name nvidia-vaapi-driver +%ifarch %ix86 +%global build_cflags %{__build_flags_lang_c} %{?_distro_extra_cflags} -Wno-error=format= +%endif + Name: libva-nvidia-driver Epoch: 1 -Version: 0.0.13%{!?tag:^%{date}git%{shortcommit0}} -Release: 1%{?dist} +Version: 0.0.14%{!?tag:^%{date}git%{shortcommit0}} +Release: 2%?dist Summary: VA-API user mode driver for Nvidia GPUs License: MIT URL: https://github.com/elFarto/%{upstream_name} @@ -35,6 +39,11 @@ Provides: %{upstream_name} = %{version}-%{release} Provides: nvdec-vaapi-driver = %{version}-%{release} Requires: mesa-filesystem +%if 0%{?fedora} +%ifarch x86_64 +Requires: %{name}(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} +%endif +%endif %description This is a VA-API implementation that uses NVDEC as a backend. This @@ -91,4 +100,4 @@ decode of web content, and may not operate correctly in other applications. - Add latest fixes. * Sat Feb 04 2023 Simone Caronni - 0.0.8-1.20230131git2bb71a5 -- Rebase to latest snapshot. \ No newline at end of file +- Rebase to latest snapshot. diff --git a/anda/system/nvidia/nvidia-container-toolkit/nvidia-container-toolkit.spec b/anda/system/nvidia/nvidia-container-toolkit/nvidia-container-toolkit.spec index 887eda961b..62253019ac 100644 --- a/anda/system/nvidia/nvidia-container-toolkit/nvidia-container-toolkit.spec +++ b/anda/system/nvidia/nvidia-container-toolkit/nvidia-container-toolkit.spec @@ -1,6 +1,6 @@ Name: nvidia-container-toolkit -Version: 1.17.4 -Release: 2%?dist +Version: 1.17.8 +Release: 1%?dist Summary: NVIDIA Container Toolkit License: Apache-2.0 Group: Development/Tools/Other diff --git a/anda/system/nvidia/nvidia-driver/nvidia-driver.spec b/anda/system/nvidia/nvidia-driver/nvidia-driver.spec index e74d6f8f12..e4055754ea 100644 --- a/anda/system/nvidia/nvidia-driver/nvidia-driver.spec +++ b/anda/system/nvidia/nvidia-driver/nvidia-driver.spec @@ -1,5 +1,6 @@ %global debug_package %{nil} -%global __strip /bin/true +%global __strip %{nil} +%global __brp_strip_comment_note %{nil} %global __brp_ldconfig %{nil} %define _build_id_links none @@ -9,7 +10,7 @@ %endif Name: nvidia-driver -Version: 570.86.16 +Version: 580.76.05 Release: 1%?dist Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Epoch: 3 @@ -73,6 +74,14 @@ Requires: libglvnd-glx%{?_isa} >= 1.0 Requires: libglvnd-opengl%{?_isa} >= 1.0 Requires: libnvidia-ml%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: vulkan-loader +%if 0%{?fedora} +%ifarch x86_64 +Requires: %{name}-libs(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} +%endif +%endif +# dlopened +Requires: libnvidia-gpucomp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: libnvidia-ml%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Conflicts: nvidia-x11-drv-libs Conflicts: nvidia-x11-drv-470xx-libs @@ -91,6 +100,14 @@ Requires: libnvidia-ml = %{?epoch:%{epoch}:}%{version}-%{release} %ifarch x86_64 aarch64 Requires: libnvidia-cfg = %{?epoch:%{epoch}:}%{version}-%{release} %endif +%if 0%{?fedora} +%ifarch x86_64 +Requires: %{name}-cuda-libs(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} +%endif +%endif +# dlopened: +Requires: libnvidia-gpucomp%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: libnvidia-ml = %{?epoch:%{epoch}:}%{version}-%{release} Conflicts: xorg-x11-drv-nvidia-cuda-libs Conflicts: xorg-x11-drv-nvidia-470xx-cuda-libs @@ -102,7 +119,12 @@ This package provides the CUDA libraries for %{name}-cuda. Summary: NVIDIA OpenGL-based Framebuffer Capture libraries Provides: nvidia-driver-NvFBCOpenGL = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: nvidia-driver-NvFBCOpenGL < %{?epoch:%{epoch}:}%{version}-%{release} -# Loads libnvidia-encode.so at runtime +%if 0%{?fedora} +%ifarch x86_64 +Requires: libnvidia-fbc(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} +%endif +%endif +# dlopened: Requires: %{name}-cuda-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description -n libnvidia-fbc @@ -111,10 +133,27 @@ optionally encode the composited framebuffer of an X screen. NvFBC are private APIs that are only available to NVIDIA approved partners for use in remote graphics scenarios. +%package -n libnvidia-gpucomp +Summary: NVIDIA library for shader compilation (nvgpucomp) +%if 0%{?fedora} +%ifarch x86_64 +Requires: libnvidia-gpucomp(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} +%endif +%endif + +%description -n libnvidia-gpucomp +This package contains the private libnvidia-gpucomp runtime library which is used by +other driver components. + %package -n libnvidia-ml Summary: NVIDIA Management Library (NVML) Provides: cuda-nvml%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Provides: nvidia-driver-NVML = %{?epoch:%{epoch}:}%{version}-%{release} +%if 0%{?fedora} +%ifarch x86_64 +Requires: libnvidia-ml(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} +%endif +%endif Obsoletes: nvidia-driver-NVML < %{?epoch:%{epoch}:}%{version}-%{release} %description -n libnvidia-ml @@ -148,6 +187,7 @@ Conflicts: xorg-x11-drv-nvidia-470xx-cuda %description cuda This package provides the CUDA integration components for %{name}. +%if 0%{?fedora} || 0%{?rhel} < 10 %package -n xorg-x11-nvidia Summary: X.org X11 NVIDIA driver and extensions Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version} @@ -159,12 +199,18 @@ Conflicts: xorg-x11-drv-nvidia-470xx %description -n xorg-x11-nvidia The NVIDIA X.org X11 driver and associated components. +%endif %endif %prep source %{SOURCE99} export VERSION=%{version} +%ifarch %ix86 +export ARCH=x86_64 +%else +export ARCH=%{_arch} +%endif unpack() { set_vars @@ -174,23 +220,8 @@ unpack() { create_tarball } -%ifarch %{ix86} -export ARCH=x86_64 unpack -%setup -D -T -n %{name}-%{version}-i386 -%endif - -%ifarch x86_64 -export ARCH=x86_64 -unpack -%setup -D -T -n %{name}-%{version}-x86_64 -%endif - -%ifarch aarch64 -export ARCH=aarch64 -unpack -%setup -D -T -n %{name}-%{version}-aarch64 -%endif +%setup -D -T -n %{name}-%{version}-%{_arch} %ifarch x86_64 %if 0%{?rhel} == 8 @@ -268,10 +299,12 @@ install -p -m 0755 nvidia-{debugdump,smi,cuda-mps-control,cuda-mps-server,bug-re mkdir -p %{buildroot}%{_mandir}/man1/ install -p -m 0644 nvidia-{smi,cuda-mps-control}*.gz %{buildroot}%{_mandir}/man1/ +%if 0%{?fedora} || 0%{?rhel} < 10 # X stuff install -p -m 0644 -D %{SOURCE10} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf install -p -m 0755 -D nvidia_drv.so %{buildroot}%{_libdir}/xorg/modules/drivers/nvidia_drv.so install -p -m 0755 -D libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/xorg/modules/extensions/libglxserver_nvidia.so +%endif # NVIDIA specific configuration files mkdir -p %{buildroot}%{_datadir}/nvidia/ @@ -292,19 +325,6 @@ install -p -m 0755 systemd/nvidia-sleep.sh %{buildroot}%{_bindir}/ install -p -m 0755 -D systemd/system-sleep/nvidia %{buildroot}%{_systemd_util_dir}/system-sleep/nvidia install -p -m 0644 -D nvidia-dbus.conf %{buildroot}%{_datadir}/dbus-1/system.d/nvidia-dbus.conf -%if 0%{?fedora} >= 41 -mkdir -p %{buildroot}%{_unitdir}/systemd-suspend.service.d/ -cat > %{buildroot}%{_unitdir}/systemd-suspend.service.d/10-nvidia.conf << EOF -[Service] -Environment="SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=false" -EOF -mkdir -p %{buildroot}%{_unitdir}/systemd-homed.service.d/ -cat > %{buildroot}%{_unitdir}/systemd-homed.service.d/10-nvidia.conf << EOF -[Service] -Environment="SYSTEMD_HOME_LOCK_FREEZE_SESSION=false" -EOF -%endif - # Ignore powerd binary exiting if hardware is not present # We should check for information in the DMI table sed -i -e 's/ExecStart=/ExecStart=-/g' %{buildroot}%{_unitdir}/nvidia-powerd.service @@ -318,6 +338,17 @@ install -p -m 0644 -D %{SOURCE40} %{buildroot}%{_metainfodir}/com.nvidia.driver. mkdir -p %{buildroot}%{_datadir}/pixmaps/ cp %{SOURCE42} %{buildroot}%{_datadir}/pixmaps/ +# nvsandboxutils configuration +install -p -m 0644 -D sandboxutils-filelist.json %{buildroot}%{_datadir}/nvidia/files.d/sandboxutils-filelist.json + +# dnf needs-restarting plugin +# dnf4 only for the moment: https://github.com/rpm-software-management/dnf5/issues/1815 +%if 0%{?fedora} < 42 || 0%{?rhel} +mkdir -p %{buildroot}%{_sysconfdir}/dnf/plugins/needs-restarting.d +echo %{name} > %{buildroot}%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{name}.conf +echo %{name}-cuda > %{buildroot}%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{name}-cuda.conf +%endif + %check # Using appstreamcli: appstreamcli validate --strict # Icon type local is not supported by appstreamcli for drivers @@ -332,18 +363,21 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me %systemd_post nvidia-powerd.service %systemd_post nvidia-resume.service %systemd_post nvidia-suspend.service +%systemd_post nvidia-suspend-then-hibernate.service %preun %systemd_preun nvidia-hibernate.service %systemd_preun nvidia-powerd.service %systemd_preun nvidia-resume.service %systemd_preun nvidia-suspend.service +%systemd_preun nvidia-suspend-then-hibernate.service %postun %systemd_postun nvidia-hibernate.service %systemd_postun nvidia-powerd.service %systemd_postun nvidia-resume.service %systemd_postun nvidia-suspend.service +%systemd_postun nvidia-suspend-then-hibernate.service %endif @@ -370,15 +404,17 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me %{_unitdir}/nvidia-powerd.service %{_unitdir}/nvidia-resume.service %{_unitdir}/nvidia-suspend.service -%if 0%{?fedora} >= 41 -%{_unitdir}/systemd-suspend.service.d/10-nvidia.conf -%{_unitdir}/systemd-homed.service.d/10-nvidia.conf +%{_unitdir}/nvidia-suspend-then-hibernate.service +%if 0%{?fedora} < 42 || 0%{?rhel} +%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{name}.conf %endif +%if 0%{?fedora} || 0%{?rhel} < 10 %files -n xorg-x11-nvidia %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf %{_libdir}/xorg/modules/extensions/libglxserver_nvidia.so %{_libdir}/xorg/modules/drivers/nvidia_drv.so +%endif %files -n libnvidia-cfg %{_libdir}/libnvidia-cfg.so.1 @@ -390,10 +426,14 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me %{_bindir}/nvidia-cuda-mps-server %{_bindir}/nvidia-debugdump %{_bindir}/nvidia-smi +%{_datadir}/nvidia/files.d/sandboxutils-filelist.json %{_mandir}/man1/nvidia-cuda-mps-control.1.* %{_mandir}/man1/nvidia-smi.* %{_prefix}/lib/nvidia/alternate-install-present %{_systemd_util_dir}/system-preset/70-nvidia-driver-cuda.preset +%if 0%{?fedora} < 42 || 0%{?rhel} +%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{name}-cuda.conf +%endif %endif @@ -434,6 +474,9 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me %endif %ifarch x86_64 %{_datadir}/vulkansc/icd.d/nvidia_icd.%{_target_cpu}.json +%if v"%{version}" > v"570.144" +%{_libdir}/libnvidia-present.so.%{version} +%endif %{_libdir}/libnvidia-vksc-core.so.1 %{_libdir}/libnvidia-vksc-core.so.%{version} %dir %{_libdir}/nvidia @@ -462,6 +505,11 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me %ifarch x86_64 aarch64 %{_libdir}/libcudadebugger.so.1 %{_libdir}/libcudadebugger.so.%{version} +%if v"%{version}" > v"570.144" +%{_libdir}/libnvidia-nvvm70.so.4 +%endif +%{_libdir}/libnvidia-sandboxutils.so.1 +%{_libdir}/libnvidia-sandboxutils.so.%{version} %endif %ifarch x86_64 %if 0%{?rhel} == 8 @@ -469,235 +517,18 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me %else %{_libdir}/libnvidia-pkcs11-openssl3.so.%{version} %endif -%{_libdir}/libnvidia-sandboxutils.so.1 -%{_libdir}/libnvidia-sandboxutils.so.%{version} %endif %files -n libnvidia-fbc %{_libdir}/libnvidia-fbc.so.1 %{_libdir}/libnvidia-fbc.so.%{version} +%files -n libnvidia-gpucomp +%{_libdir}/libnvidia-gpucomp.so.%{version} + %files -n libnvidia-ml %{_libdir}/libnvidia-ml.so.1 %{_libdir}/libnvidia-ml.so.%{version} %changelog -* Thu Dec 05 2024 Simone Caronni - 3:565.77-1 -- Update to 565.77. - -* Mon Nov 25 2024 Simone Caronni - 3:565.57.01-5 -- Switch back to local icon. - -* Fri Nov 15 2024 Simone Caronni - 3:565.57.01-4 -- Do not manipulate appstream metadata using libappstream-glib. - -* Sat Nov 09 2024 Simone Caronni - 3:565.57.01-3 -- Switch to remote icon for Appstream metadata. "appstremcli validate", instead - of "appstream-util validate", prints out that local is not a valid icon type, - even if the documentation says so. - -* Sun Oct 27 2024 Simone Caronni - 3:565.57.01-2 -- Add workaround for system sleep on systemd 256+. - -* Wed Oct 23 2024 Simone Caronni - 3:565.57.01-1 -- Update to 565.57.01. - -* Thu Oct 10 2024 Simone Caronni - 3:560.35.03-4 -- Enable nvidia-persistenced by default if installed through a systemd preset. - -* Wed Sep 04 2024 Simone Caronni - 3:560.35.03-3 -- Unbundle nvidia-egl-platform-base. - -* Fri Aug 30 2024 Simone Caronni - 3:560.35.03-2 -- Split out X.org components. - -* Wed Aug 21 2024 Simone Caronni - 3:560.35.03-1 -- Update to 560.35.03. - -* Tue Aug 06 2024 Simone Caronni - 3:560.31.02-1 -- Update to 560.31.02. -- Update EGL requirements. - -* Mon Aug 05 2024 Simone Caronni - 3:560.28.03-1 -- Update to 560.28.03. -- Add Vulkan Safety Critical library and offline Pipeline Cache Compiler. -- Temporarily add new EGL libraries. - -* Mon Jul 15 2024 Simone Caronni - 3:555.58.02-3 -- Provider of cuda-nvml still needs _isa. - -* Sat Jul 13 2024 Simone Caronni - 3:555.58.02-2 -- Remove isa Provides/Requires. - -* Tue Jul 02 2024 Simone Caronni - 3:555.58.02-1 -- Update to 555.58.02. -- Reorganize some libraries that get dynamically opened by other components. - -* Sat Jun 29 2024 Simone Caronni - 3:555.58-4 -- Adjust Appstream icon path. - -* Fri Jun 28 2024 Simone Caronni - 3:555.58-3 -- Switch to local icon for Appstream metadata before madness takes over. - -* Fri Jun 28 2024 Simone Caronni - 3:555.58-2 -- Make sure there are no redirects in the Appstream metadata URLs. - -* Thu Jun 27 2024 Simone Caronni - 3:555.58-1 -- Update to 555.58. - -* Wed Jun 26 2024 Simone Caronni - 3:555.52.04-2 -- Update AppData metadata, add new custom key entry: - https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/2034 - -* Thu Jun 06 2024 Simone Caronni -- Update to 555.52.04. - -* Fri May 31 2024 Simone Caronni - 3:555.42.02-3 -- Fix file format specification for Vulkan layers. - -* Mon May 27 2024 Simone Caronni - 3:555.42.02-2 -- Add GBM loader library symlink also for i686 libraries (#156). -- Also own the %%_libdir/gbm directory. - -* Wed May 22 2024 Simone Caronni - 3:555.42.02-1 -- Update to 555.42.02. - -* Fri Apr 26 2024 Simone Caronni - 3:550.78-1 -- Update to 550.78. - -* Fri Apr 26 2024 Simone Caronni - 3:550.76-2 -- Install Vulkan loader in a more similar way to Mesa packages. - -* Thu Apr 18 2024 Simone Caronni - 3:550.76-1 -- Update to 550.76. - -* Mon Apr 15 2024 Simone Caronni - 3:550.67-2 -- Fix egl requirements. - -* Sun Mar 24 2024 Simone Caronni - 3:550.67-1 -- Update to 550.67. - -* Thu Mar 14 2024 Simone Caronni - 3:550.54.14-3 -- Clean up SPEC file. - -* Fri Mar 08 2024 Simone Caronni - 3:550.54.14-2 -- Add support for aarch64. -- Clean up SPEC file. - -* Sun Mar 03 2024 Simone Caronni - 3:550.54.14-1 -- Update to 550.54.14. - -* Thu Feb 22 2024 Simone Caronni - 3:550.40.07-1 -- Update to 550.40.07. - -* Fri Feb 16 2024 Simone Caronni - 3:545.29.06-3 -- Re-add explicit egl-wayland dependency (reverts - cd6f2b9044d90f71f94fa91be1cc0cad343a1560). - -* Mon Dec 18 2023 Simone Caronni - 3:545.29.06-2 -- Do not mark nvidia-powerd unit as failed if the binary exits. - -* Fri Dec 01 2023 Simone Caronni - 3:545.29.06-1 -- Update to 545.29.06. - -* Mon Nov 13 2023 Simone Caronni - 3:545.29.02-2 -- Create kernel module tarball with proprietary and open source modules. - -* Tue Oct 31 2023 Simone Caronni - 3:545.29.02-1 -- Update to 545.29.02. - -* Wed Oct 18 2023 Simone Caronni - 3:545.23.06-1 -- Update to 545.23.06. - -* Fri Sep 22 2023 Simone Caronni - 3:535.113.01-1 -- Update to 535.113.01. - -* Thu Aug 24 2023 Simone Caronni - 3:535.104.05-1 -- Update to 535.104.05. - -* Wed Aug 09 2023 Simone Caronni - 3:535.98-1 -- Update to 535.98. - -* Wed Jul 19 2023 Simone Caronni - 3:535.86.05-1 -- Update to 535.86.05. - -* Thu Jun 15 2023 Simone Caronni - 3:535.54.03-1 -- Update to 535.54.03. - -* Tue Jun 13 2023 Simone Caronni - 3:535.43.02-1 -- Update to 535.43.02. - -* Fri Mar 24 2023 Simone Caronni - 3:530.41.03-1 -- Update to 530.41.03. - -* Wed Mar 08 2023 Simone Caronni - 3:530.30.02-1 -- Update to 530.30.02. - -* Fri Feb 10 2023 Simone Caronni - 3:525.89.02-1 -- Update to 525.89.02. - -* Fri Jan 20 2023 Simone Caronni - 3:525.85.05-1 -- Update to 525.85.05. - -* Mon Jan 09 2023 Simone Caronni - 3:525.78.01-1 -- Update to 525.78.01. - -* Tue Dec 13 2022 Simone Caronni - 3:525.60.11-2 -- Drop nvidia-driver-devel subpackage. -- Trim changelog. - -* Tue Nov 29 2022 Simone Caronni - 3:525.60.11-1 -- Update to 525.60.11. - -* Thu Oct 13 2022 Simone Caronni - 3:520.56.06-1 -- Update to 520.56.06. - -* Wed Sep 21 2022 Simone Caronni - 3:515.76-1 -- Update to 515.76. - -* Mon Aug 08 2022 Simone Caronni - 3:515.65.01-1 -- Update to 515.65.01. - -* Wed Jun 29 2022 Simone Caronni - 3:515.57-1 -- Update to 515.57. - -* Wed Jun 01 2022 Simone Caronni - 3:515.48.07-1 -- Update to 515.48.07. - -* Sun May 15 2022 Simone Caronni - 3:515.43.04-2 -- Rename libnvidia-vulkan-producer.so versioned library (#128). - -* Thu May 12 2022 Simone Caronni - 3:515.43.04-1 -- Update to 515.43.04. - -* Mon May 02 2022 Simone Caronni - 3:510.68.02-1 -- Update to 510.68.02. - -* Mon Mar 28 2022 Simone Caronni - 3:510.60.02-1 -- Update to 510.60.02. - -* Thu Mar 03 2022 Simone Caronni - 3:510.54-3 -- nvidia-resume is no longer triggered by nvidia-sleep.sh. - -* Fri Feb 25 2022 Simone Caronni - 3:510.54-2 -- nvidia-smi dlopens NVML, add explicit dependency to cuda subpackage. - -* Mon Feb 14 2022 Simone Caronni - 3:510.54-1 -- Update to 510.54. - -* Sat Feb 12 2022 Simone Caronni - 3:510.47.03-4 -- Drop libva-vdpau-driver hard dependency. - -* Mon Feb 07 2022 Simone Caronni - 3:510.47.03-3 -- Fix GBM condition. - -* Sat Feb 05 2022 Simone Caronni - 3:510.47.03-2 -- Drop explicit dependency on egl-wayland, it's auto generated and not needed on - i686 libs. Minimum version 1.1.7 required. - -* Wed Feb 02 2022 Simone Caronni - 3:510.47.03-1 -- Update to 510.47.03. -- Use external GBM library. -- Install GBM only on CentOS/RHEL 9+ and Fedora 35. It's also supported in - CentOS Stream 8 (8.6+/Mesa 21.2), but there's no easy way to check for Stream - in the SPEC file. +%autochangelog diff --git a/anda/system/nvidia/nvidia-kmod-common/10-nvidia-fallback.rules b/anda/system/nvidia/nvidia-kmod-common/10-nvidia-fallback.rules new file mode 100644 index 0000000000..5ead9f6780 --- /dev/null +++ b/anda/system/nvidia/nvidia-kmod-common/10-nvidia-fallback.rules @@ -0,0 +1,2 @@ +SUBSYSTEM=="pci", ATTRS{vendor}=="0x12d2", ATTRS{class}=="0x030000", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service" +SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", ATTRS{class}=="0x030[02]00", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service" diff --git a/anda/system/nvidia/nvidia-kmod-common/99-nvidia.conf b/anda/system/nvidia/nvidia-kmod-common/99-nvidia.conf deleted file mode 100644 index 6d64aaeb34..0000000000 --- a/anda/system/nvidia/nvidia-kmod-common/99-nvidia.conf +++ /dev/null @@ -1,3 +0,0 @@ -# Omit the nvidia driver from the ramdisk, to avoid needing to regenerate -# the ramdisk on updates. -omit_drivers+=" nvidia nvidia-drm nvidia-modeset nvidia-peermem nvidia-uvm " diff --git a/anda/system/nvidia/nvidia-kmod-common/kernel.conf b/anda/system/nvidia/nvidia-kmod-common/MODULE_VARIANT.txt similarity index 75% rename from anda/system/nvidia/nvidia-kmod-common/kernel.conf rename to anda/system/nvidia/nvidia-kmod-common/MODULE_VARIANT.txt index 34603d9738..b10acb2a04 100644 --- a/anda/system/nvidia/nvidia-kmod-common/kernel.conf +++ b/anda/system/nvidia/nvidia-kmod-common/MODULE_VARIANT.txt @@ -13,8 +13,5 @@ # +-------------+---------------------+----------------+ # TERRA-SPECIFIC NOTES: -# Since we are focused on HWE, we will use proprietary drivers for now. -# At least until Pascal/Maxwell support is added to the open source drivers, or until -# everyone stops using them in the near future. - -MODULE_VARIANT=kernel +# The default module versions have been added to the DKMS and Akmods packages. +# This file now exists only to explain how the variable works. diff --git a/anda/system/nvidia/nvidia-kmod-common/nvidia-boot-update b/anda/system/nvidia/nvidia-kmod-common/nvidia-boot-update deleted file mode 100755 index 46cad2f238..0000000000 --- a/anda/system/nvidia/nvidia-kmod-common/nvidia-boot-update +++ /dev/null @@ -1,186 +0,0 @@ -#!/bin/sh - - -# EL8 (grub2 with BootLoaderSpec patches) -# -# kernel options: grub.cfg + grubenv + /etc/kernel/cmdline -# kernel options in /boot/loader/entries/*.conf use kernelopts from /boot/grub2/grubenv -# grubby -# - updates kernelopts in /boot/grub2/grubenv -# - does not update /etc/default/grub -# - does not update kernelopts in grub.cfg -# grub.cfg: -# - UEFI: /etc/grub2-efi.cfg -> /boot/efi/EFI//grub.cfg -# - BIOS: /etc/grub2.cfg -> /boot/grub2/grub.cfg - - -# EL9 (grub2 with BootLoaderSpec patches) -# -# kernel options: grub.cfg + /etc/kernel/cmdline + /boot/loader/entries/*.conf -# manually update: /etc/default/grub + /etc/kernel/cmdline -# grub2-mkconfig does not update /boot/loader/entries/*.conf -# grub.cfg: -# - UEFI: /etc/grub2-efi.cfg -> /boot/efi/EFI//grub.cfg -# - BIOS: /etc/grub2.cfg -> /boot/grub2/grub.cfg - - -# Fedora (grub2 with BootLoaderSpec patches) -# -# kernel options: grub.cfg + /etc/kernel/cmdline + /boot/loader/entries/*.conf -# manually update: /etc/default/grub + /etc/kernel/cmdline -# grub2-mkconfig does not update /boot/loader/entries/*.conf -# grub.cfg: -# - UEFI/BIOS: /boot/grub2/grub.cfg - - -# Fedora (systemd-boot) -# -# kernel options: grub.cfg + /boot/efi/loader/entries/*.conf (UEFI only) -# grubby as an updateloaderentries alias: -# - updates all entries in /boot/efi/loader/entries/*.conf -# - does not work with multiple parameters at once -# - does not update /etc/kernel/cmdline - - -# Complete use case coverage, regardless of boot loaders: -# -# - update options in /etc/default/grub -# - regenerate grub.cfg/grubenv -# - update options in /boot/{efi/}loader/entries/*.conf entries -# - update options in /etc/kernel/cmdline -# - cover both UEFI and BIOS case - -CMDLINE_ARGS_ADD="_dracutopts_in" -CMDLINE_ARGS_REMOVE="_dracutopts_rm" - -print_usage() { -cat <> /etc/default/grub - else - for param in $CMDLINE_ARGS_ADD; do - echo ${GRUB_CMDLINE_LINUX} | grep -q $param - [ $? -eq 1 ] && GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} ${param}" - done - for param in $CMDLINE_ARGS_REMOVE; do - echo ${GRUB_CMDLINE_LINUX} | grep -q $param - [ $? -eq 0 ] && GRUB_CMDLINE_LINUX="$(echo ${GRUB_CMDLINE_LINUX} | sed -e "s/ $param//g")" - done - sed -i -e "s|^GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX=\"${GRUB_CMDLINE_LINUX}\"|g" /etc/default/grub - fi - - grub2-mkconfig -o $GRUB_CFG &>/dev/null - - fi - - if [ -v BLS_ENTRIES ]; then - - for config_file in $BLS_ENTRIES/*.conf; do - for param in $CMDLINE_ARGS_ADD; do - grep -q $param $config_file - [ $? -eq 1 ] && sed -i -e "s|^options.*|& $param|" $config_file - done - for param in $CMDLINE_ARGS_REMOVE; do - grep -q $param $config_file - [ $? -eq 0 ] && sed -i -e "s| $param||" $config_file - done - done - - fi - -} - -preun() { - - if [ -v GRUB_CFG ]; then - - for param in $CMDLINE_ARGS_ADD; do - echo ${GRUB_CMDLINE_LINUX} | grep -q $param - [ $? -eq 0 ] && GRUB_CMDLINE_LINUX="$(echo ${GRUB_CMDLINE_LINUX} | sed -e "s/ $param//g")" - done - sed -i -e "s|^GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX=\"${GRUB_CMDLINE_LINUX}\"|g" /etc/default/grub - - grub2-mkconfig -o $GRUB_CFG &>/dev/null - - fi - - if [ -v BLS_ENTRIES ]; then - - for config_file in $BLS_ENTRIES/*.conf; do - for param in $CMDLINE_ARGS_ADD; do - grep -q $param $config_file - [ $? -eq 0 ] && sed -i -e "s| $param||" $config_file - done - done - - fi - -} - -case "$1" in - post) - check - post - exit 0 - ;; - preun) - check - preun - exit 0 - ;; - *) - print_usage - exit 0 - ;; -esac diff --git a/anda/system/nvidia/nvidia-kmod-common/nvidia-fallback.service b/anda/system/nvidia/nvidia-kmod-common/nvidia-fallback.service new file mode 100644 index 0000000000..8e08e806f0 --- /dev/null +++ b/anda/system/nvidia/nvidia-kmod-common/nvidia-fallback.service @@ -0,0 +1,17 @@ +[Unit] +Description=Fallback to nouveau as nvidia did not load +After=akmods.service +Before=display-manager.service +ConditionKernelCommandLine=rd.driver.blacklist=nouveau +ConditionPathExists=!/sys/module/nvidia + + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=-/sbin/modprobe nouveau +ExecStartPost=-/bin/plymouth message --text="NVIDIA kernel module missing. Falling back to Nouveau." + + +[Install] +WantedBy=graphical.target diff --git a/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec b/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec index 7a9402c72b..4e8e38fce2 100644 --- a/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec +++ b/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec @@ -4,10 +4,10 @@ # gsp_*.bin: ELF 64-bit LSB executable, UCB RISC-V %global _binaries_in_noarch_packages_terminate_build 0 -%global __strip /bin/true +%global __brp_strip %{nil} Name: nvidia-kmod-common -Version: 570.86.16 +Version: 580.76.05 Release: 1%?dist Summary: Common file for NVIDIA's proprietary driver kernel modules Epoch: 3 @@ -17,21 +17,23 @@ URL: http://www.nvidia.com/object/unix.html BuildArch: noarch Source0: http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run -Source17: nvidia-boot-update -Source18: kernel.conf +Source18: MODULE_VARIANT.txt Source19: nvidia-modeset.conf Source20: nvidia.conf Source21: 60-nvidia.rules -Source24: 99-nvidia.conf +Source22: nvidia-fallback.service +Source23: 10-nvidia-fallback.rules # UDev rule location (_udevrulesdir) and systemd macros: BuildRequires: systemd-rpm-macros -# Owns /usr/lib/firmware: -Requires: linux-firmware +Requires: dracut Requires: nvidia-modprobe -Requires: nvidia-kmod = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-driver = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-driver-libs = %{?epoch:%{epoch}:}%{version} +Requires: (nvidia-open-kmod = %{?epoch:%{epoch}:}%{version} or nvidia-kmod = %{?epoch:%{epoch}:}%{version}) Provides: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} +Provides: nvidia-open-kmod-common = %{?epoch:%{epoch}:}%{version} Obsoletes: cuda-nvidia-kmod-common < %{?epoch:%{epoch}:}%{version} %description @@ -43,25 +45,12 @@ sh %{SOURCE0} -x --target nvidia-kmod-%{version}-x86_64 %setup -T -D -n nvidia-kmod-%{version}-x86_64 %install -# Script for post/preun tasks -install -p -m 0755 -D %{SOURCE17} %{buildroot}%{_sbindir}/nvidia-boot-update -sed -i \ - -e 's/_dracutopts_in/%{_dracutopts_in}/g' \ - -e 's/_dracutopts_rm/%{_dracutopts_rm}/g' \ - %{buildroot}%{_sbindir}/nvidia-boot-update - -# Choice of kernel module type: -install -p -m 0644 -D %{SOURCE18} %{buildroot}%{_sysconfdir}/nvidia/kernel.conf - # Nvidia modesetting support: install -p -m 0644 -D %{SOURCE19} %{buildroot}%{_sysconfdir}/modprobe.d/nvidia-modeset.conf # Load nvidia-uvm, enable complete power management: install -p -m 0644 -D %{SOURCE20} %{buildroot}%{_modprobedir}/nvidia.conf -# Avoid Nvidia modules getting in the initrd: -install -p -m 0644 -D %{SOURCE24} %{buildroot}%{_dracut_conf_d}/99-nvidia.conf - # UDev rules # https://github.com/NVIDIA/nvidia-modprobe/blob/master/modprobe-utils/nvidia-modprobe-utils.h#L33-L46 # https://github.com/negativo17/nvidia-kmod-common/issues/11 @@ -72,349 +61,35 @@ install -p -m 644 -D %{SOURCE21} %{buildroot}%{_udevrulesdir}/60-nvidia.rules mkdir -p %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version}/ install -p -m 644 firmware/* %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version} -%post -%{_sbindir}/nvidia-boot-update post +# Old kernel.conf rewritten as a doc file. +cp %{SOURCE18} . + +# Fallback service. Fall back to Nouveau if NVIDIA drivers fail. +# This is actually from RPM Fusion. +install -Dm644 %{SOURCE22} -t %{buildroot}%{_unitdir} +install -Dm644 %{SOURCE23} -t %{buildroot}%{_udevrulesdir} + +%pre +# Remove the kernel command line adjustments one last time when doing an upgrade +# from a version that was still setting up the command line parameters: +if [ "$1" -eq "2" ] && [ -x %{_bindir}/nvidia-boot-update ]; then + %{_bindir}/nvidia-boot-update preun -%preun -if [ "$1" -eq "0" ]; then - %{_sbindir}/nvidia-boot-update preun fi ||: +%triggerin -- nvidia-kmod,nvidia-open-kmod +dracut --regenerate-all --force + %files -%{_dracut_conf_d}/99-nvidia.conf +%doc MODULE_VARIANT.txt %{_modprobedir}/nvidia.conf +%dir %{_prefix}/lib/firmware +%dir %{_prefix}/lib/firmware/nvidia %{_prefix}/lib/firmware/nvidia/%{version} -%{_sbindir}/nvidia-boot-update %config(noreplace) %{_sysconfdir}/modprobe.d/nvidia-modeset.conf -%config(noreplace) %{_sysconfdir}/nvidia/kernel.conf +%{_udevrulesdir}/10-nvidia-fallback.rules %{_udevrulesdir}/60-nvidia.rules +%{_unitdir}/nvidia-fallback.service %changelog -* Wed Dec 25 2024 Simone Caronni - 3:565.77-2 -- Run nvidia-modprobe only on add/bind (thanks os369510). - -* Thu Dec 05 2024 Simone Caronni - 3:565.77-1 -- Update to 565.77. - -* Tue Oct 29 2024 Simone Caronni - 3:565.57.01-2 -- Update power management configuration. - -* Wed Oct 23 2024 Simone Caronni - 3:565.57.01-1 -- Update to 565.57.01. - -* Fri Oct 11 2024 Simone Caronni - 3:560.35.03-2 -- Fix configuration file replacement (#14). - -* Wed Aug 21 2024 Simone Caronni - 3:560.35.03-1 -- Update to 560.35.03. - -* Tue Aug 06 2024 Simone Caronni - 3:560.31.02-1 -- Update to 560.31.02. - -* Mon Aug 05 2024 Simone Caronni - 3:560.28.03-1 -- Update to 560.28.03. - -* Tue Jul 02 2024 Simone Caronni - 3:555.58.02-1 -- Update to 555.58.02. - -* Thu Jun 27 2024 Simone Caronni - 3:555.58-1 -- Update to 555.58. - -* Thu Jun 06 2024 Simone Caronni - 3:555.52.04-1 -- Update to 555.52.04. - -* Fri May 31 2024 Simone Caronni - 3:555.42.02-2 -- Fix typo in preun scriptlet. - -* Wed May 22 2024 Simone Caronni - 3:555.42.02-1 -- Update to 555.42.02. - -* Fri Apr 26 2024 Simone Caronni - 3:550.78-1 -- Update to 550.78. - -* Thu Apr 18 2024 Simone Caronni - 3:550.76-1 -- Update to 550.76. - -* Sun Mar 24 2024 Simone Caronni - 3:550.67-1 -- Update to 550.67. - -* Mon Mar 11 2024 Simone Caronni - 3:550.54.14-2 -- Add support for installing drivers without a configured bootloader (i.e. - kickstart case). -- Add support for sdboot. - -* Sun Mar 03 2024 Simone Caronni - 3:550.54.14-1 -- Update to 550.54.14. - -* Tue Feb 06 2024 Simone Caronni - 3:550.40.07-1 -- Update to 550.40.07. - -* Fri Dec 01 2023 Simone Caronni - 3:545.29.06-1 -- Update to 545.29.06. - -* Tue Nov 14 2023 Simone Caronni - 3:545.29.02-5 -- Update location of configuration file for kernel module variant. - -* Mon Nov 13 2023 Simone Caronni - 3:545.29.02-4 -- Allow installing proprietary or open source kernel modules. - -* Sat Nov 04 2023 Simone Caronni - 3:545.29.02-3 -- Second part of the fix for issue - https://github.com/negativo17/nvidia-kmod-common/issues/11. - -* Sat Nov 04 2023 Simone Caronni - 3:545.29.02-2 -- First part of fix for issue - https://github.com/negativo17/nvidia-kmod-common/issues/11. - -* Tue Oct 31 2023 Simone Caronni - 3:545.29.02-1 -- Update to 545.29.02. - -* Thu Oct 19 2023 Simone Caronni - 3:545.23.06-2 -- Also remove old simpledrm workaround if still present. - -* Wed Oct 18 2023 Simone Caronni - 3:545.23.06-1 -- Update to 545.23.06. - -* Fri Sep 22 2023 Simone Caronni - 3:535.113.01-1 -- Update to 535.113.01. - -* Thu Aug 24 2023 Simone Caronni - 3:535.104.05-1 -- Update to 535.104.05. - -* Wed Aug 09 2023 Simone Caronni - 3:535.98-1 -- Update to 535.98. - -* Wed Jul 19 2023 Simone Caronni - 3:535.86.05-1 -- Update to 535.86.05. - -* Thu Jun 15 2023 Simone Caronni - 3:535.54.03-1 -- Update to 535.54.03. - -* Tue Jun 13 2023 Simone Caronni - 3:535.43.02-1 -- Update to 535.43.02. - -* Fri Mar 24 2023 Simone Caronni - 3:530.41.03-1 -- Update to 530.41.03. - -* Wed Mar 08 2023 Simone Caronni - 3:530.30.02-1 -- Update to 530.30.02. - -* Wed Mar 08 2023 Simone Caronni - 3:525.89.02-2 -- Drop workaround for simpledrm support (fixed in 525.60.11). - -* Fri Feb 10 2023 Simone Caronni - 3:525.89.02-1 -- Update to 525.89.02. - -* Fri Jan 20 2023 Simone Caronni - 3:525.85.05-1 -- Update to 525.85.05. - -* Mon Jan 09 2023 Simone Caronni - 3:525.78.01-1 -- Update to 525.78.01. - -* Tue Nov 29 2022 Simone Caronni - 3:525.60.11-1 -- Update to 525.60.11. - -* Thu Oct 13 2022 Simone Caronni - 3:520.56.06-1 -- Update to 520.56.06. - -* Wed Sep 21 2022 Simone Caronni - 3:515.76-1 -- Update to 515.76. - -* Mon Aug 08 2022 Simone Caronni - 3:515.65.01-1 -- Update to 515.65.01. - -* Wed Jun 29 2022 Simone Caronni - 3:515.57-1 -- Update to 515.57. - -* Thu Jun 09 2022 Simone Caronni - 3:515.48.07-2 -- Adjust conditionals. -- Drop removal of nvidia-drm.modeset=1 from the kernel command line. -- Add nvidia-drm.modeset=1 to the configuration file also on RHEL/CentOS. - -* Wed Jun 01 2022 Simone Caronni - 3:515.48.07-1 -- Update to 515.48.07. - -* Tue May 31 2022 Simone Caronni - 3:515.43.04-2 -- Blacklist nouveau for modprobe. - -* Thu May 12 2022 Simone Caronni - 3:515.43.04-1 -- Update to 515.43.04. - -* Mon May 02 2022 Simone Caronni - 3:510.68.02-1 -- Update to 510.68.02. - -* Mon Mar 28 2022 Simone Caronni - 3:510.60.02-1 -- Update to 510.60.02. - -* Mon Feb 14 2022 Simone Caronni - 3:510.54-1 -- Update to 510.54. - -* Wed Feb 02 2022 Simone Caronni - 3:510.47.03-1 -- Update to 510.47.03. - -* Tue Dec 14 2021 Simone Caronni - 3:495.46-1 -- Update to 495.46. - -* Fri Dec 10 2021 Jamie Nguyen - 3:495.44-4 -- Source grub file before rewriting GRUB_CMDLINE_LINUX in preun. Without this, - we are clearing out GRUB_CMDLINE_LINUX when this package gets removed. - -* Sun Nov 07 2021 Simone Caronni - 3:495.44-3 -- Avoid duplication on modprobe configuration file names (second file in - /usr/lib/modprobe.d gets ignored). Thanks Jens Peters. -- Fix issue with missing quotes in /etc/default/grub and multiple parameters. - Thanks Roshan Shariff. - -* Sat Nov 06 2021 Simone Caronni - 3:495.44-2 -- Update configuration files and boot options. - -* Tue Nov 02 2021 Simone Caronni - 3:495.44-1 -- Update to 495.44. -- Also disable bundling nvidia-peermem in initrd. - -* Tue Nov 02 2021 Simone Caronni - 3:470.82.00-1 -- Update to 470.82.00. - -* Tue Sep 21 2021 Simone Caronni - 3:470.74-1 -- Update to 470.74. - -* Fri Aug 20 2021 Simone Caronni - 3:470.63.01-3 -- SPEC file cleanup. -- Enable modesetting by default for Fedora 35+ - -* Fri Aug 20 2021 Simone Caronni - 3:470.63.01-2 -- Enable complete power management. - -* Wed Aug 11 2021 Simone Caronni - 3:470.63.01-1 -- Update to 470.63.01. - -* Tue Jul 20 2021 Simone Caronni - 3:470.57.02-1 -- Update to 470.57.02. - -* Wed Jun 30 2021 Simone Caronni - 3:470.42.01-1 -- Update to 470.42.01. - -* Wed May 26 2021 Simone Caronni - 3:465.31-1 -- Update to 465.31. - -* Sat May 01 2021 Simone Caronni - 3:465.27-1 -- Update to 465.27. - -* Sun Apr 18 2021 Simone Caronni - 3:465.24.02-1 -- Update to 465.24.02. - -* Fri Apr 09 2021 Simone Caronni - 3:465.19.01-1 -- Update to 465.19.01. - -* Fri Mar 19 2021 Simone Caronni - 3:460.67-1 -- Update to 460.67. - -* Mon Mar 01 2021 Simone Caronni - 3:460.56-1 -- Update to 460.56. - -* Wed Jan 27 2021 Simone Caronni - 3:460.39-1 -- Update to 460.39. - -* Thu Jan 7 2021 Simone Caronni - 3:460.32.03-1 -- Update to 460.32.03. - -* Sun Dec 20 2020 Simone Caronni - 3:460.27.04-1 -- Update to 460.27.04. -- Update comments in modprobe file. - -* Mon Dec 07 2020 Simone Caronni - 3:455.45.01-2 -- Remove CentOS/RHEL 6 support. - -* Wed Nov 18 2020 Simone Caronni - 3:455.45.01-1 -- Update to 455.45.01. - -* Mon Nov 02 2020 Simone Caronni - 3:455.38-1 -- Update to 455.38. - -* Mon Oct 12 2020 Simone Caronni - 3:455.28-1 -- Update to 455.28. - -* Tue Oct 06 2020 Simone Caronni - 3:450.80.02-1 -- Update to 450.80.02. - -* Thu Aug 20 2020 Simone Caronni - 3:450.66-1 -- Update to 450.66. - -* Fri Jul 10 2020 Simone Caronni - 3:450.57-1 -- Update to 450.57. - -* Thu Jun 25 2020 Simone Caronni - 3:440.100-1 -- Update to 440.100. - -* Thu Apr 09 2020 Simone Caronni - 3:440.82-1 -- Update to 440.82. - -* Fri Feb 28 2020 Simone Caronni - 3:440.64-1 -- Update to 440.64. - -* Tue Feb 04 2020 Simone Caronni - 3:440.59-1 -- Update to 440.59. - -* Sat Dec 14 2019 Simone Caronni - 3:440.44-1 -- Update to 440.44. - -* Sat Nov 30 2019 Simone Caronni - 3:440.36-1 -- Update to 440.36. - -* Mon Nov 11 2019 Simone Caronni - 3:440.31-2 -- Fix udev rules synax (thanks Leigh) - -* Sat Nov 09 2019 Simone Caronni - 3:440.31-1 -- Update to 440.31. - -* Thu Oct 17 2019 Simone Caronni - 3:440.26-1 -- Update to 440.26. - -* Tue Oct 01 2019 Simone Caronni - 3:435.21-3 -- Remove workaround for onboard GPU devices. -- Fix typo on udev character device rules (thanks tbaederr). - -* Tue Oct 01 2019 Simone Caronni - 3:435.21-2 -- Fix build on CentOS/RHEL 8 - -* Tue Sep 03 2019 Simone Caronni - 3:435.21-1 -- Update to 435.21. - -* Thu Aug 22 2019 Simone Caronni - 3:435.17-1 -- Update to 435.17. -- Add power management functions as per documentation. -- Require systemd-rpm-macros instead of systemd on Fedora/RHEL 8+. - -* Wed Jul 31 2019 Simone Caronni - 3:430.40-1 -- Update to 430.40. - -* Fri Jul 12 2019 Simone Caronni - 3:430.34-1 -- Update to 430.34. - -* Wed Jun 12 2019 Simone Caronni - 3:430.26-1 -- Update to 430.26. - -* Thu Jun 06 2019 Simone Caronni - 3:430.14-2 -- Do not run post/preun scriptlets on Atomic/Silverblue. - -* Sat May 18 2019 Simone Caronni - 3:430.14-1 -- Update to 430.14. - -* Thu May 09 2019 Simone Caronni - 3:418.74-1 -- Update to 418.74. -- Remove fallback scenario (thanks Karol Herbst). - -* Thu Apr 18 2019 Simone Caronni - 3:418.56-2 -- Obsoletes cuda-nvidia-kmod-common (thanks Timm). - -* Sun Mar 24 2019 Simone Caronni - 3:418.56-1 -- Update to 418.56. - -* Fri Feb 22 2019 Simone Caronni - 3:418.43-1 -- Update to 418.43. - -* Wed Feb 06 2019 Simone Caronni - 3:418.30-1 -- Update to 418.30. - -* Sun Feb 03 2019 Simone Caronni - 3:415.27-1 -- First build. +%autochangelog diff --git a/anda/system/nvidia/nvidia-kmod-common/nvidia.conf b/anda/system/nvidia/nvidia-kmod-common/nvidia.conf index bb90a99750..0e4083bf5e 100644 --- a/anda/system/nvidia/nvidia-kmod-common/nvidia.conf +++ b/anda/system/nvidia/nvidia-kmod-common/nvidia.conf @@ -1,8 +1,6 @@ -# Nouveau must be blacklisted here as well beside from the initrd to avoid a -# delayed loading (for example on Optimus laptops where the Nvidia card is not -# driving the main display). +# NOVA must be blacklisted as it conflicts with both these drivers and Nouveau. -blacklist nouveau +blacklist nova-core # Make a soft dependency for nvidia-uvm as adding the module loading to # /usr/lib/modules-load.d/nvidia-uvm.conf for systemd consumption, makes the diff --git a/anda/system/nvidia/nvidia-kmod/anda.hcl b/anda/system/nvidia/nvidia-kmod/closed/anda.hcl similarity index 100% rename from anda/system/nvidia/nvidia-kmod/anda.hcl rename to anda/system/nvidia/nvidia-kmod/closed/anda.hcl diff --git a/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec b/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec new file mode 100644 index 0000000000..986688e74c --- /dev/null +++ b/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec @@ -0,0 +1,65 @@ +# Build only the akmod package and no kernel module packages: +%define buildforkernels akmod + +%global debug_package %{nil} + +Name: nvidia-kmod +Version: 580.76.05 +Release: 1%?dist +Summary: NVIDIA display driver kernel module +Epoch: 3 +License: NVIDIA License +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: x86_64 aarch64 + +Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run +Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: akmods + + +# Get the needed BuildRequires (in parts depending on what we build for): +BuildRequires: kmodtool + +# kmodtool does its magic here: +%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +The NVidia %{version} display driver kernel module for kernel %{kversion}. + +%prep +# Error out if there was something wrong with kmodtool: +%{?kmodtool_check} +# Print kmodtool output for debugging purposes: +kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch} +%setup -T -D -n nvidia-kmod-%{version}-%{_arch} +%autopatch -p1 + +rm -f */dkms.conf + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr kernel* _kmod_build_${kernel_version%%___*} +done + +%build +export MODULE_VARIANT=kernel +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + make %{?_smp_mflags} -C ${MODULE_VARIANT} \ + KERNEL_UNAME="${kernel_version%%___*}" modules + popd +done + +%install +export MODULE_VARIANT=kernel +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +%autochangelog diff --git a/anda/system/nvidia/nvidia-kmod/closed/update.rhai b/anda/system/nvidia/nvidia-kmod/closed/update.rhai new file mode 100644 index 0000000000..e5eff132c0 --- /dev/null +++ b/anda/system/nvidia/nvidia-kmod/closed/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_driver_version()); diff --git a/anda/system/nvidia/nvidia-kmod/nvidia-kmod.spec b/anda/system/nvidia/nvidia-kmod/nvidia-kmod.spec deleted file mode 100644 index 45b40d045e..0000000000 --- a/anda/system/nvidia/nvidia-kmod/nvidia-kmod.spec +++ /dev/null @@ -1,202 +0,0 @@ -# Build only the akmod package and no kernel module packages: -%define buildforkernels akmod - -%global debug_package %{nil} - -Name: nvidia-kmod -Version: 570.86.16 -Release: 1%?dist -Summary: NVIDIA display driver kernel module -Epoch: 3 -License: NVIDIA License -URL: http://www.nvidia.com/object/unix.html -ExclusiveArch: x86_64 aarch64 - -Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run - - -# Get the needed BuildRequires (in parts depending on what we build for): -BuildRequires: kmodtool - -# kmodtool does its magic here: -%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } - -%description -The NVidia %{version} display driver kernel module for kernel %{kversion}. - -%prep -# Error out if there was something wrong with kmodtool: -%{?kmodtool_check} -# Print kmodtool output for debugging purposes: -kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null - -sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch} -%setup -T -D -n nvidia-kmod-%{version}-%{_arch} - -rm -f */dkms.conf - -for kernel_version in %{?kernel_versions}; do - mkdir _kmod_build_${kernel_version%%___*} - cp -fr kernel* _kmod_build_${kernel_version%%___*} -done - -%build -if [ -f /etc/nvidia/kernel.conf ]; then - . /etc/nvidia/kernel.conf -fi -for kernel_version in %{?kernel_versions}; do - pushd _kmod_build_${kernel_version%%___*}/ - make %{?_smp_mflags} -C ${MODULE_VARIANT} \ - KERNEL_UNAME="${kernel_version%%___*}" modules - popd -done - -%install -if [ -f /etc/nvidia/kernel.conf ]; then - . /etc/nvidia/kernel.conf -fi -for kernel_version in %{?kernel_versions}; do - mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \ - %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ -done -%{?akmod_install} - -%changelog -* Thu Dec 05 2024 Simone Caronni - 3:565.77-1 -- Update to 565.77. - -* Mon Nov 25 2024 Simone Caronni - 3:565.57.01-2 -- Add kernel 6.12 patch. - -* Wed Oct 23 2024 Simone Caronni - 3:565.57.01-1 -- Update to 565.57.01. - -* Fri Oct 11 2024 Simone Caronni - 3:560.35.03-2 -- Add kernel 6.11 patch. - -* Wed Aug 21 2024 Simone Caronni - 3:560.35.03-1 -- Update to 560.35.03. - -* Tue Aug 06 2024 Simone Caronni - 3:560.31.02-1 -- Update to 560.31.02. - -* Mon Aug 05 2024 Simone Caronni - 3:560.28.03-1 -- Update to 560.28.03. - -* Tue Jul 02 2024 Simone Caronni - 3:555.58.02-1 -- Update to 555.58.02. - -* Thu Jun 27 2024 Simone Caronni - 3:555.58-1 -- Update to 555.58. - -* Thu Jun 06 2024 Simone Caronni - 3:555.52.04-1 -- Update to 555.52.04. - -* Wed May 22 2024 Simone Caronni - 3:555.42.02-1 -- Update to 555.42.02. - -* Fri Apr 26 2024 Simone Caronni - 3:550.78-1 -- Update to 550.78. - -* Thu Apr 18 2024 Simone Caronni - 3:550.76-1 -- Update to 550.76. - -* Sun Mar 24 2024 Simone Caronni - 3:550.67-1 -- Update to 550.67. - -* Sat Mar 09 2024 Simone Caronni - 3:550.54.14-2 -- Enable aarch64. - -* Sun Mar 03 2024 Simone Caronni - 3:550.54.14-1 -- Update to 550.54.14. - -* Tue Feb 06 2024 Simone Caronni - 3:550.40.07-1 -- Update to 550.40.07. - -* Tue Feb 06 2024 Simone Caronni - 3:545.29.06-2 -- Add patch to fix build with the latest 6.6/6.7 kernels. - -* Fri Dec 01 2023 Simone Caronni - 3:545.29.06-1 -- Update to version 545.29.06. - -* Tue Nov 14 2023 Simone Caronni - 3:545.29.02-3 -- Update location of configuration file. - -* Mon Nov 13 2023 Simone Caronni - 3:545.29.02-2 -- Trim changelog. -- Drop custom signing and compressing in favour of kmodtool. -- Allow building proprietary or open source modules. -- Adjust compile command to match with what Nvidia ships nowadays. - -* Tue Oct 31 2023 Simone Caronni - 3:545.29.02-1 -- Update to 545.29.02. - -* Wed Oct 18 2023 Simone Caronni - 3:545.23.06-1 -- Update to 545.23.06. - -* Fri Sep 22 2023 Simone Caronni - 3:535.113.01-1 -- Update to 535.113.01. - -* Thu Aug 24 2023 Simone Caronni - 3:535.104.05-1 -- Update to 535.104.05. - -* Wed Aug 09 2023 Simone Caronni - 3:535.98-1 -- Update to 535.98. - -* Wed Jul 19 2023 Simone Caronni - 3:535.86.05-1 -- Update to 535.86.05. - -* Thu Jun 15 2023 Simone Caronni - 3:535.54.03-1 -- Update to 535.54.03. - -* Tue Jun 13 2023 Simone Caronni - 3:535.43.02-1 -- Update to 535.43.02. - -* Fri Mar 24 2023 Simone Caronni - 3:530.41.03-1 -- Update to 530.41.03. - -* Wed Mar 08 2023 Simone Caronni - 3:530.30.02-1 -- Update to 530.30.02. - -* Fri Feb 10 2023 Simone Caronni - 3:525.89.02-1 -- Update to 525.89.02. - -* Fri Jan 20 2023 Simone Caronni - 3:525.85.05-1 -- Update to 525.85.05. - -* Mon Jan 09 2023 Simone Caronni - 3:525.78.01-1 -- Update to 525.78.01. - -* Tue Nov 29 2022 Simone Caronni - 3:525.60.11-1 -- Update to 525.60.11. - -* Thu Oct 13 2022 Simone Caronni - 3:520.56.06-1 -- Update to 520.56.06. - -* Wed Sep 21 2022 Simone Caronni - 3:515.76-1 -- Update to 515.76. - -* Mon Aug 08 2022 Simone Caronni - 3:515.65.01-1 -- Update to 515.65.01. - -* Wed Jun 29 2022 Simone Caronni - 3:515.57-1 -- Update to 515.57. - -* Wed Jun 01 2022 Simone Caronni - 3:515.48.07-1 -- Update to 515.48.07. - -* Thu May 12 2022 Simone Caronni - 3:515.43.04-1 -- Update to 515.43.04. - -* Mon May 02 2022 Simone Caronni - 3:510.68.02-1 -- Update to 510.68.02. - -* Mon Mar 28 2022 Simone Caronni - 3:510.60.02-1 -- Update to 510.60.02. - -* Mon Feb 14 2022 Simone Caronni - 3:510.54-1 -- Update to 510.54. - -* Wed Feb 02 2022 Simone Caronni - 3:510.47.03-1 -- Update to 510.47.03. \ No newline at end of file diff --git a/anda/system/nvidia/nvidia-kmod/open/anda.hcl b/anda/system/nvidia/nvidia-kmod/open/anda.hcl new file mode 100644 index 0000000000..2caf4b7e53 --- /dev/null +++ b/anda/system/nvidia/nvidia-kmod/open/anda.hcl @@ -0,0 +1,9 @@ +project "pkg" { + rpm { + spec = "nvidia-open-kmod.spec" + } + labels { + mock = 1 + subrepo = "nvidia" + } +} diff --git a/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec b/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec new file mode 100644 index 0000000000..685d1a3fa5 --- /dev/null +++ b/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec @@ -0,0 +1,65 @@ +# Build only the akmod package and no kernel module packages: +%define buildforkernels akmod + +%global debug_package %{nil} + +Name: nvidia-open-kmod +Version: 580.76.05 +Release: 1%?dist +Summary: NVIDIA display driver kernel module +Epoch: 3 +License: NVIDIA License +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: x86_64 aarch64 + +Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run +Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: akmods + + +# Get the needed BuildRequires (in parts depending on what we build for): +BuildRequires: kmodtool + +# kmodtool does its magic here: +%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +The NVidia %{version} display driver kernel module for kernel %{kversion}. + +%prep +# Error out if there was something wrong with kmodtool: +%{?kmodtool_check} +# Print kmodtool output for debugging purposes: +kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch} +%setup -T -D -n nvidia-kmod-%{version}-%{_arch} +%autopatch -p1 + +rm -f */dkms.conf + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr kernel* _kmod_build_${kernel_version%%___*} +done + +%build +export MODULE_VARIANT=kernel-open +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + make %{?_smp_mflags} -C ${MODULE_VARIANT} \ + KERNEL_UNAME="${kernel_version%%___*}" modules + popd +done + +%install +export MODULE_VARIANT=kernel-open +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +%autochangelog diff --git a/anda/system/nvidia/nvidia-kmod/open/update.rhai b/anda/system/nvidia/nvidia-kmod/open/update.rhai new file mode 100644 index 0000000000..e5eff132c0 --- /dev/null +++ b/anda/system/nvidia/nvidia-kmod/open/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_driver_version()); diff --git a/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec b/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec index 145b12d3c5..585e91954d 100644 --- a/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec +++ b/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec @@ -1,5 +1,5 @@ Name: nvidia-modprobe -Version: 570.86.16 +Version: 580.76.05 Release: 1%?dist Summary: NVIDIA kernel module loader Epoch: 3 diff --git a/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec b/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec index c2ed246fbc..8e23ff3431 100644 --- a/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec +++ b/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec @@ -1,5 +1,5 @@ Name: nvidia-persistenced -Version: 570.86.16 +Version: 580.76.05 Release: 1%?dist Summary: A daemon to maintain persistent software state in the NVIDIA driver Epoch: 3 @@ -47,7 +47,9 @@ make %{?_smp_mflags} \ PREFIX=%{_prefix} \ STRIP_CMD=true +%if 0%{?fedora} < 42 mv %{buildroot}%{_bindir} %{buildroot}%{_sbindir} +%endif mkdir -p %{buildroot}%{_sharedstatedir}/%{name} # Systemd unit files @@ -65,272 +67,13 @@ install -p -m 644 -D %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %files %license COPYING %{_mandir}/man1/%{name}.1.* +%if 0%{?fedora} < 42 %{_sbindir}/%{name} +%else +%{_bindir}/%{name} +%endif %{_unitdir}/%{name}.service %{_sharedstatedir}/%{name} %changelog -* Thu Dec 05 2024 Simone Caronni - 3:565.77-1 -- Update to 565.77. - -* Wed Oct 23 2024 Simone Caronni - 3:565.57.01-1 -- Update to 565.57.01. - -* Wed Aug 21 2024 Simone Caronni - 3:560.35.03-1 -- Update to 560.35.03. - -* Tue Aug 06 2024 Simone Caronni - 3:560.31.02-1 -- Update to 560.31.02. - -* Mon Aug 05 2024 Simone Caronni - 3:560.28.03-1 -- Update to 560.28.03. - -* Tue Jul 02 2024 Simone Caronni - 3:555.58.02-1 -- Update to 555.58.02. -- Require dynamically loaded library libnvidia-cfg. - -* Thu Jun 27 2024 Simone Caronni - 3:555.58-1 -- Update to 555.58. - -* Thu Jun 06 2024 Simone Caronni - 3:555.52.04-1 -- Update to 555.52.04. - -* Wed May 22 2024 Simone Caronni - 3:555.42.02-1 -- Update to 555.42.02. - -* Tue Apr 30 2024 Simone Caronni - 3:550.78-2 -- Switch to Nvidia provided tarball. - -* Fri Apr 26 2024 Simone Caronni - 3:550.78-1 -- Update to 550.78. - -* Thu Apr 18 2024 Simone Caronni - 3:550.76-1 -- Update to 550.76. - -* Sun Mar 24 2024 Simone Caronni - 3:550.67-1 -- Update to 550.67. - -* Mon Mar 18 2024 Simone Caronni - 3:550.54.14-4 -- Clean up build requirements. - -* Sat Mar 09 2024 Simone Caronni - 3:550.54.14-3 -- Enable aarch64. - -* Thu Mar 07 2024 Simone Caronni - 3:550.54.14-2 -- Run nvidia-persistenced as root as Nvidia does. - -* Sun Mar 03 2024 Simone Caronni - 3:550.54.14-1 -- Update to 550.54.14. - -* Tue Feb 06 2024 Simone Caronni - 3:550.40.07-1 -- Update to 550.40.07. - -* Fri Dec 01 2023 Simone Caronni - 3:545.29.06-1 -- Update to 545.29.06. - -* Tue Oct 31 2023 Simone Caronni - 3:545.29.02-1 -- Update to 545.29.02. - -* Wed Oct 18 2023 Simone Caronni - 3:545.23.06-1 -- Update to 545.23.06. - -* Fri Sep 22 2023 Simone Caronni - 3:535.113.01-1 -- Update to 535.113.01. - -* Thu Aug 24 2023 Simone Caronni - 3:535.104.05-1 -- Update to 535.104.05. - -* Wed Aug 09 2023 Simone Caronni - 3:535.98-1 -- Update to 535.98. - -* Wed Jul 19 2023 Simone Caronni - 3:535.86.05-1 -- Update to 535.86.05. - -* Thu Jun 15 2023 Simone Caronni - 3:535.54.03-1 -- Update to 535.54.03. - -* Tue Jun 13 2023 Simone Caronni - 3:535.43.02-1 -- Update to 535.43.02. - -* Fri Mar 24 2023 Simone Caronni - 3:530.41.03-1 -- Update to 530.41.03. - -* Wed Mar 08 2023 Simone Caronni - 3:530.30.02-1 -- Update to 530.30.02. - -* Fri Feb 10 2023 Simone Caronni - 3:525.89.02-1 -- Update to 525.89.02. - -* Fri Jan 20 2023 Simone Caronni - 3:525.85.05-1 -- Update to 525.85.05. - -* Mon Jan 09 2023 Simone Caronni - 3:525.78.01-1 -- Update to 525.78.01. - -* Tue Nov 29 2022 Simone Caronni - 3:525.60.11-1 -- Update to 525.60.11. - -* Thu Oct 13 2022 Simone Caronni - 3:520.56.06-1 -- Update to 520.56.06. - -* Wed Sep 21 2022 Simone Caronni - 3:515.76-1 -- Update to 515.76. - -* Mon Aug 08 2022 Simone Caronni - 3:515.65.01-1 -- Update to 515.65.01. - -* Wed Jun 29 2022 Simone Caronni - 3:515.57-1 -- Update to 515.57. - -* Wed Jun 01 2022 Simone Caronni - 3:515.48.07-1 -- Update to 515.48.07. - -* Thu May 12 2022 Simone Caronni - 3:515.43.04-1 -- Update to 515.43.04. - -* Mon May 02 2022 Simone Caronni - 3:510.68.02-1 -- Update to 510.68.02. - -* Mon Mar 28 2022 Simone Caronni - 3:510.60.02-1 -- Update to 510.60.02. - -* Mon Feb 14 2022 Simone Caronni - 3:510.54-1 -- Update to 510.54. - -* Wed Feb 02 2022 Simone Caronni - 3:510.47.03-1 -- Update to 510.47.03. - -* Tue Dec 14 2021 Simone Caronni - 3:495.46-1 -- Update to 495.46. - -* Tue Nov 02 2021 Simone Caronni - 3:495.44-1 -- Update to 495.44. - -* Tue Nov 02 2021 Simone Caronni - 3:470.82.00-1 -- Update to 470.82.00. - -* Tue Sep 21 2021 Simone Caronni - 3:470.74-1 -- Update to 470.74. - -* Wed Aug 11 2021 Simone Caronni - 3:470.63.01-1 -- Update to 470.63.01. - -* Tue Jul 20 2021 Simone Caronni - 3:470.57.02-1 -- Update to 470.57.02. - -* Wed Jun 30 2021 Simone Caronni - 3:470.42.01-1 -- Update to 470.42.01. - -* Wed May 26 2021 Simone Caronni - 3:465.31-1 -- Update to 465.31. - -* Sat May 01 2021 Simone Caronni - 3:465.27-1 -- Update to 465.27. - -* Sun Apr 18 2021 Simone Caronni - 3:465.24.02-1 -- Update to 465.24.02. -- Switch to github sources. - -* Fri Apr 09 2021 Simone Caronni - 3:465.19.01-1 -- Update to 465.19.01. - -* Fri Mar 19 2021 Simone Caronni - 3:460.67-1 -- Update to 460.67. - -* Mon Mar 01 2021 Simone Caronni - 3:460.56-1 -- Update to 460.56. - -* Wed Jan 27 2021 Simone Caronni - 3:460.39-1 -- Update to 460.39. - -* Thu Jan 7 2021 Simone Caronni - 3:460.32.03-1 -- Update to 460.32.03. - -* Sun Dec 20 2020 Simone Caronni - 3:460.27.04-1 -- Update to 460.27.04. -- Trim changelog. - -* Mon Dec 07 2020 Simone Caronni - 3:455.45.01-2 -- Remove RHEL/CentOS 6 support. - -* Wed Nov 18 2020 Simone Caronni - 3:455.45.01-1 -- Update to 455.45.01. - -* Mon Nov 02 2020 Simone Caronni - 3:455.38-1 -- Update to 455.38. - -* Mon Oct 12 2020 Simone Caronni - 3:455.28-1 -- Update to 455.28. - -* Tue Oct 06 2020 Simone Caronni - 3:450.80.02-1 -- Update to 450.80.02. - -* Thu Aug 20 2020 Simone Caronni - 3:450.66-1 -- Update to 450.66. - -* Fri Jul 10 2020 Simone Caronni - 3:450.57-1 -- Update to 450.57. - -* Thu Jun 25 2020 Simone Caronni - 3:440.100-1 -- Update to 440.100. - -* Tue Apr 14 2020 Simone Caronni - 3:440.82-2 -- Update requirements according to package guidelines. - -* Thu Apr 09 2020 Simone Caronni - 3:440.82-1 -- Update to 440.82. - -* Fri Feb 28 2020 Simone Caronni - 3:440.64-1 -- Update to 440.64. - -* Tue Feb 04 2020 Simone Caronni - 3:440.59-1 -- Update to 440.59. - -* Sat Dec 14 2019 Simone Caronni - 3:440.44-1 -- Update to 440.44. - -* Sat Nov 30 2019 Simone Caronni - 3:440.36-1 -- Update to 440.36. - -* Sat Nov 09 2019 Simone Caronni - 3:440.31-1 -- Update to 440.31. - -* Thu Oct 17 2019 Simone Caronni - 3:440.26-1 -- Update to 440.26. - -* Mon Sep 02 2019 Simone Caronni - 3:435.21-1 -- Update to 435.21. - -* Thu Aug 22 2019 Simone Caronni - 3:435.17-1 -- Update to 435.17. - -* Wed Jul 31 2019 Simone Caronni - 3:430.40-1 -- Update to 430.40. - -* Fri Jul 12 2019 Simone Caronni - 3:430.34-1 -- Update to 430.34. - -* Wed Jun 12 2019 Simone Caronni - 3:430.26-1 -- Update to 430.26. - -* Sat May 18 2019 Simone Caronni - 3:430.14-1 -- Update to 430.14. - -* Thu May 09 2019 Simone Caronni - 3:418.74-1 -- Update to 418.74. - -* Sun Mar 24 2019 Simone Caronni - 3:418.56-1 -- Update to 418.56. - -* Fri Feb 22 2019 Simone Caronni - 3:418.43-1 -- Update to 418.43. -- Trim changelog. - -* Wed Feb 06 2019 Simone Caronni - 3:418.30-1 -- Update to 418.30. - -* Sun Feb 03 2019 Simone Caronni - 3:415.27-2 -- Do not require nvidia-kmod-common, already required by nvidia-driver-cuda. - -* Thu Jan 17 2019 Simone Caronni - 3:415.27-1 -- Update to 415.27. +%autochangelog diff --git a/anda/system/nvidia/nvidia-settings/nvidia-settings.spec b/anda/system/nvidia/nvidia-settings/nvidia-settings.spec index b1c66fbd66..1e7090d36e 100644 --- a/anda/system/nvidia/nvidia-settings/nvidia-settings.spec +++ b/anda/system/nvidia/nvidia-settings/nvidia-settings.spec @@ -1,5 +1,5 @@ Name: nvidia-settings -Version: 570.86.16 +Version: 580.76.05 Release: 1%?dist Summary: Configure the NVIDIA graphics driver Epoch: 3 diff --git a/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec b/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec index e0132daca5..07eb0e284a 100644 --- a/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec +++ b/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec @@ -1,5 +1,5 @@ Name: nvidia-xconfig -Version: 570.86.16 +Version: 580.76.05 Release: 1%?dist Summary: NVIDIA X configuration file editor Epoch: 3 diff --git a/anda/system/opentabletdriver/opentabletdriver.spec b/anda/system/opentabletdriver/opentabletdriver.spec index 1c01461a36..aabc5673a8 100644 --- a/anda/system/opentabletdriver/opentabletdriver.spec +++ b/anda/system/opentabletdriver/opentabletdriver.spec @@ -6,11 +6,11 @@ %global __requires_exclude_from ^/usr/lib/opentabletdriver/.*$ %global __os_install_post %{nil} %global dotnet_sdk_version 8.0 -%global dotnet_runtime_version 6.0 +%global dotnet_runtime_version 8.0 Name: opentabletdriver Version: 0.6.5.1 -Release: 1%?dist +Release: 2%?dist Summary: A cross-platform open source tablet driver License: LGPLv3 URL: https://github.com/OpenTabletDriver/OpenTabletDriver @@ -19,7 +19,7 @@ Packager: Cappy Ishihara # This package can be built using a newer .NET SDK version, but you -# specifically need .NET 6.0 to run it. +# specifically need .NET 8.0 to run it. BuildRequires: dotnet-sdk-%{dotnet_sdk_version} BuildRequires: git jq systemd-rpm-macros BuildRequires: gtk3-devel diff --git a/anda/system/readymade/git/anda.hcl b/anda/system/readymade/git/anda.hcl new file mode 100644 index 0000000000..e8898266d1 --- /dev/null +++ b/anda/system/readymade/git/anda.hcl @@ -0,0 +1,7 @@ +project pkg { + rpm { + spec = "readymade-git.spec" + } + labels { + } +} diff --git a/anda/system/readymade/git/readymade-git.spec b/anda/system/readymade/git/readymade-git.spec new file mode 100644 index 0000000000..0bff01b51a --- /dev/null +++ b/anda/system/readymade/git/readymade-git.spec @@ -0,0 +1,66 @@ +%global commit 5f9416645827ecf6ed781f2255afef1e05fd8e2f +%global commit_date 20250702 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: readymade-git +Version: %commit_date.%shortcommit +Release: 1%?dist +Summary: Install ready-made distribution images! +License: GPL-3.0-or-later +URL: https://github.com/FyraLabs/readymade +Source0: %url/archive/%commit.tar.gz +Source1: https://github.com/FyraLabs/rdms_proc_macros/archive/HEAD.tar.gz +BuildRequires: anda-srpm-macros rust-packaging mold +BuildRequires: pkgconfig(libhelium-1) +BuildRequires: clang-devel +BuildRequires: cmake +Conflicts: readymade +Obsoletes: readymade-nightly < 20250502.4dc78ec-3 + +Requires: efibootmgr + +%description +Readymade is a simple Linux Distribution installer. + +It is created as a replacement to Red Hat's Anaconda installer. + + +%package config-ultramarine +Summary: Readymade Configuration for Ultramarine Linux +Requires: readymade-git +Provides: readymade-git-config +Conflicts: readymade-config-ultramarine +Obsoletes: readymade-nightly-config-ultramarine < 20250502.4dc78ec-3 + +%description config-ultramarine +This package contains the configuration files for Readymade to install Ultramarine Linux. + + +%prep +%autosetup -n readymade-%commit +tar xf %{S:1} +rmdir taidan_proc_macros && mv rdms_proc_macros* taidan_proc_macros +%cargo_prep_online + +%build +%{cargo_build} --locked + +%install +install -Dm755 target/rpm/readymade -t %buildroot%_bindir +./install.sh %buildroot +ln -sf %{_datadir}/applications/com.fyralabs.Readymade.desktop %{buildroot}%{_datadir}/applications/liveinst.desktop + + +%files config-ultramarine +%_sysconfdir/readymade.toml + + +%files +%license LICENSE +%_bindir/readymade +%_datadir/polkit-1/actions/com.fyralabs.pkexec.readymade.policy +%_datadir/applications/com.fyralabs.Readymade.desktop +%_datadir/applications/liveinst.desktop +%ghost %_datadir/readymade +%_datadir/icons/hicolor/scalable/apps/com.fyralabs.Readymade.svg + diff --git a/anda/system/readymade/git/update.rhai b/anda/system/readymade/git/update.rhai new file mode 100644 index 0000000000..70173214d0 --- /dev/null +++ b/anda/system/readymade/git/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("FyraLabs/readymade")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/system/readymade/stable/anda.hcl b/anda/system/readymade/stable/anda.hcl new file mode 100644 index 0000000000..4dec03fdad --- /dev/null +++ b/anda/system/readymade/stable/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "readymade.spec" + } +} diff --git a/anda/system/readymade/stable/readymade.spec b/anda/system/readymade/stable/readymade.spec new file mode 100644 index 0000000000..91622a69bd --- /dev/null +++ b/anda/system/readymade/stable/readymade.spec @@ -0,0 +1,58 @@ +Name: readymade +Version: 0.12.5 +Release: 1%?dist +Summary: Install ready-made distribution images! +License: GPL-3.0-or-later +URL: https://github.com/FyraLabs/readymade +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +Source1: https://github.com/FyraLabs/rdms_proc_macros/archive/HEAD.tar.gz +BuildRequires: anda-srpm-macros rust-packaging mold +BuildRequires: pkgconfig(libhelium-1) +BuildRequires: clang-devel +BuildRequires: cmake + +Requires: efibootmgr + +%description +Readymade is a simple Linux Distribution installer. + +It is created as a replacement to Red Hat's Anaconda installer. + + +%package config-ultramarine +Summary: Readymade Configuration for Ultramarine Linux +Requires: readymade +Provides: readymade-config + +%description config-ultramarine +This package contains the configuration files for Readymade to install Ultramarine Linux. + + +%prep +%autosetup +tar xf %{S:1} +rmdir taidan_proc_macros && mv rdms_proc_macros* taidan_proc_macros +%cargo_prep_online + +%build +%{cargo_build} --locked + +%install +%crate_install_bin +./install.sh %buildroot +ln -sf %{_datadir}/applications/com.fyralabs.Readymade.desktop %{buildroot}%{_datadir}/applications/liveinst.desktop + + +%files config-ultramarine +%_sysconfdir/readymade.toml + + +%files +%license LICENSE +%_bindir/readymade +%_datadir/polkit-1/actions/com.fyralabs.pkexec.readymade.policy +%_datadir/applications/com.fyralabs.Readymade.desktop +%_datadir/applications/liveinst.desktop +%ghost %_datadir/readymade +%_datadir/icons/hicolor/scalable/apps/com.fyralabs.Readymade.svg + diff --git a/anda/system/readymade/stable/update.rhai b/anda/system/readymade/stable/update.rhai new file mode 100644 index 0000000000..80d9960011 --- /dev/null +++ b/anda/system/readymade/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("FyraLabs/readymade")); diff --git a/anda/system/rtl8821cu/akmod/anda.hcl b/anda/system/rtl8821cu/akmod/anda.hcl new file mode 100644 index 0000000000..59a0838e97 --- /dev/null +++ b/anda/system/rtl8821cu/akmod/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "rtl8821cu-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/rtl8821cu/akmod/rtl8821cu-kmod.spec b/anda/system/rtl8821cu/akmod/rtl8821cu-kmod.spec new file mode 100644 index 0000000000..3466e5e331 --- /dev/null +++ b/anda/system/rtl8821cu/akmod/rtl8821cu-kmod.spec @@ -0,0 +1,67 @@ +%global commit 945c687aa1e62ee0b95b1ddd1dbfdbd513c30152 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250722 +%global ver 5.12.0.4 +%global modulename rtl8821cu +%global git_name 8821cu-20210916 +%define buildforkernels akmod +%global debug_package %{nil} +%global _description %{expand: +Linux Driver for USB Wi-Fi Adapters that are based on the RTL8811CU, RTL8821CU, RTL8821CUH, and RTL8731AU chipsets.} + +Name: %{modulename}-kmod +Version: %{ver}^%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Linux Driver for USB Wi-Fi Adapters using RTL8821 chipsets +License: GPL-2.0-only +URL: https://github.com/morrownr/8821cu-20210916 +Source0: %{url}/archive/%{commit}.tar.gz#/%{git_name}-%{shortcommit}.tar.gz +BuildRequires: kmodtool +BuildRequires: systemd-rpm-macros +Requires: %{modulename}-kmod-common = %{version} +Requires: akmods +Conflicts: dkms-%{modulename} +Packager: Gilver E. + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description %_description + +%prep +%{?kmodtool_check} +kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -n %{git_name}-%{commit} + +%ifarch armv7hl +sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile +sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile +%elifarch aarch64 +sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile +sed -i 's/CONFIG_PLATFORM_ARM_RPI = y/CONFIG_PLATFORM_ARM_RPI = n/g' Makefile +sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile +%endif + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr core hal include os_dep platform Kconfig Makefile halmac.mk _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + %make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules + popd +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +* Wed May 28 2025 Gilver E. - 5.12.0.4^20250508git.d74134a-1 +- Initial package diff --git a/anda/system/rtl8821cu/akmod/update.rhai b/anda/system/rtl8821cu/akmod/update.rhai new file mode 100644 index 0000000000..49c8be1847 --- /dev/null +++ b/anda/system/rtl8821cu/akmod/update.rhai @@ -0,0 +1,12 @@ +let c = sh("cat anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec | grep '%global commit_date' | sed -E 's/.+commit_date //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commit_date", d); + let v = sh("cat anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} diff --git a/anda/system/rtl8821cu/dkms/anda.hcl b/anda/system/rtl8821cu/dkms/anda.hcl new file mode 100644 index 0000000000..3d716dd0ca --- /dev/null +++ b/anda/system/rtl8821cu/dkms/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "dkms-rtl8821cu.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/system/rtl8821cu/dkms/dkms-rtl8821cu.spec b/anda/system/rtl8821cu/dkms/dkms-rtl8821cu.spec new file mode 100644 index 0000000000..ac4c9fc36b --- /dev/null +++ b/anda/system/rtl8821cu/dkms/dkms-rtl8821cu.spec @@ -0,0 +1,78 @@ +%global commit 945c687aa1e62ee0b95b1ddd1dbfdbd513c30152 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250722 +%global ver 5.12.0.4 +%global modulename rtl8821cu +%global git_name 8821cu-20210916 +%global debug_package %{nil} +%global _description %{expand: +Linux Driver for USB Wi-Fi Adapters that are based on the RTL8811CU, RTL8821CU, RTL8821CUH, and RTL8731AU chipsets.} + +Name: dkms-%{modulename} +Version: %{ver}^%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Linux Driver for USB Wi-Fi Adapters using RTL8821 chipsets +License: GPL-2.0-only +URL: https://github.com/morrownr/8821cu-20210916 +Source0: %{url}/archive/%{commit}.tar.gz#/%{git_name}-%{shortcommit}.tar.gz +Source1: no-weak-modules.conf +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: %{modulename}-kmod-common = %{version} +Requires: dkms +# Required for DKMS to build the kmod +Requires: gcc +Requires: bc +Requires: make +Provides: %{modulename}-kmod +Conflicts: akmod-%{modulename} +Packager: Gilver E. + +%description %_description + +%prep +%autosetup -n %{git_name}-%{commit} + +sed -i 's/PACKAGE_VERSION=".*"/PACKAGE_VERSION="%{version}"/g' dkms.conf + +# Technically this package is noarch. However it cannot be built that way due to arch dependencies for the built kmod. +%ifarch armv7hl +sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile +sed -i 's/CONFIG_PLATFORM_ARM_RPI = n/CONFIG_PLATFORM_ARM_RPI = y/g' Makefile +%elifarch aarch64 +sed -i 's/CONFIG_PLATFORM_I386_PC = y/CONFIG_PLATFORM_I386_PC = n/g' Makefile +sed -i 's/CONFIG_PLATFORM_ARM_RPI = y/CONFIG_PLATFORM_ARM_RPI = n/g' Makefile +sed -i 's/CONFIG_PLATFORM_ARM64_RPI = n/CONFIG_PLATFORM_ARM64_RPI = y/g' Makefile +%endif + +%build +# Hi, I'm empty. + +%install +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr core hal include os_dep platform Kconfig Makefile halmac.mk dkms-make.sh dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%if 0%{?fedora} +# Do not enable weak modules support in Fedora (no kABI): +install -Dpm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : + +%files +%{_usrsrc}/%{modulename}-%{version}/ +%if 0%{?fedora} +%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%changelog +* Wed May 28 2025 Gilver E. - 5.12.0.4^20250508git.d74134a-1 +- Initial package diff --git a/anda/system/rtl8821cu/dkms/no-weak-modules.conf b/anda/system/rtl8821cu/dkms/no-weak-modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/rtl8821cu/dkms/no-weak-modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/rtl8821cu/dkms/update.rhai b/anda/system/rtl8821cu/dkms/update.rhai new file mode 100644 index 0000000000..49c8be1847 --- /dev/null +++ b/anda/system/rtl8821cu/dkms/update.rhai @@ -0,0 +1,12 @@ +let c = sh("cat anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec | grep '%global commit_date' | sed -E 's/.+commit_date //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commit_date", d); + let v = sh("cat anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} diff --git a/anda/system/rtl8821cu/kmod-common/anda.hcl b/anda/system/rtl8821cu/kmod-common/anda.hcl new file mode 100644 index 0000000000..2e9d418795 --- /dev/null +++ b/anda/system/rtl8821cu/kmod-common/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "rtl8821cu-kmod-common.spec" + } + labels { + nightly = "1" + } +} diff --git a/anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec b/anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec new file mode 100644 index 0000000000..e4fb7e8c3a --- /dev/null +++ b/anda/system/rtl8821cu/kmod-common/rtl8821cu-kmod-common.spec @@ -0,0 +1,51 @@ +%global commit 945c687aa1e62ee0b95b1ddd1dbfdbd513c30152 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250722 +%global ver 5.12.0.4 +%global modulename rtl8821cu +%global git_name 8821cu-20210916 +%global debug_package %{nil} + +Name: %{modulename}-kmod-common +Version: %{ver}^%{commit_date}git.%{shortcommit} +Release: 1%?dist +Summary: Common files and documentation for the rtl8821cu driver +License: GPL-2.0-only +URL: https://github.com/morrownr/8821cu-20210916 +Source0: %{url}/archive/%{commit}.tar.gz#/%{git_name}-%{shortcommit}.tar.gz +BuildRequires: systemd-rpm-macros +Requires: rtl8821cu-kmod = %{version} +BuildArch: noarch +Packager: Gilver E. + +%description +Necessary files for the %{modulename} driver. + +%package -n %{modulename}-doc +Summary: Docs for the rtl8821cu driver + +%description -n %{modulename}-doc +Documentation files for the Linux rtl8821cu driver. + +%prep +%autosetup -n %{git_name}-%{commit} + +%build +# Empty build section for RPM reasons + +%install +install -Dm644 8821cu.conf -t %{buildroot}%{_modprobedir} + +%files +%doc README.md +%license LICENSE +%{_modprobedir}/8821cu.conf + +%files -n %{modulename}-doc +%doc FAQ.md +%doc supported-device-IDs +%doc docs/* + +%changelog +* Wed May 28 2025 Gilver E. - 5.12.0.4^20250508git.d74134a-1 +- Initial package diff --git a/anda/system/rtl8821cu/kmod-common/update.rhai b/anda/system/rtl8821cu/kmod-common/update.rhai new file mode 100644 index 0000000000..a85d8ad2dc --- /dev/null +++ b/anda/system/rtl8821cu/kmod-common/update.rhai @@ -0,0 +1,7 @@ +rpm.global("commit", gh_commit("morrownr/8821cu-20210916")); + if rpm.changed() { + rpm.global("commit_date", date()); + rpm.release(); + let v = find(`PACKAGE_VERSION="([\d.]+)"`, gh_rawfile("morrownr/8821cu-20210916", "main", "dkms.conf"), 1); + rpm.global("ver", v); +} diff --git a/anda/system/scx-scheds/nightly/anda.hcl b/anda/system/scx-scheds/nightly/anda.hcl new file mode 100644 index 0000000000..5f81ec00fd --- /dev/null +++ b/anda/system/scx-scheds/nightly/anda.hcl @@ -0,0 +1,8 @@ +project pkg { + rpm { + spec = "scx-scheds-nightly.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/scx-scheds/nightly/scx-scheds-nightly.spec b/anda/system/scx-scheds/nightly/scx-scheds-nightly.spec new file mode 100644 index 0000000000..c431e60b7b --- /dev/null +++ b/anda/system/scx-scheds/nightly/scx-scheds-nightly.spec @@ -0,0 +1,112 @@ +%global commit 910ec138361437cb1720361b04d5aac11af7c8c2 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250822 +%global ver 1.0.15 + +Name: scx-scheds-nightly +Version: %{ver}^%{commitdate}.git.%{shortcommit} +Release: 1%?dist +Summary: Nightly builds of sched_ext schedulers and tools +SourceLicense: GPL-2.0-only +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND ISC AND (LGPL-2.1-only OR BSD-2-Clause) AND LGPL-2.1 AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND (MPL-2.0 OR MIT OR Apache-2.0) AND MPL-2.0-only and MPL-2.0-or-later AND (Unlicense OR MIT) AND Zlib +URL: https://github.com/sched-ext/scx +Source0: %{URL}/archive/%{commit}/scx-%{commit}.tar.gz +BuildRequires: anda-srpm-macros +BuildRequires: bpftool +BuildRequires: cargo +BuildRequires: cargo-rpm-macros +BuildRequires: clang >= 17 +BuildRequires: elfutils-libelf +BuildRequires: elfutils-libelf-devel +BuildRequires: gcc +BuildRequires: git +BuildRequires: jq +BuildRequires: jq-devel +BuildRequires: libseccomp-devel +BuildRequires: lld >= 17 +BuildRequires: llvm >= 17 +BuildRequires: meson >= 1.2 +BuildRequires: protobuf-compiler +BuildRequires: python3 +BuildRequires: rust +BuildRequires: systemd +BuildRequires: systemd-rpm-macros +BuildRequires: zlib-ng-compat +Requires: elfutils-libelf +Requires: jq +Requires: libseccomp +Requires: protobuf +Requires: zlib +Conflicts: rust-scx_utils-devel +Conflicts: scx_c_schedulers +Conflicts: scx_layered +Conflicts: scx_rustland +Conflicts: scx_rusty +Conflicts: scx-scheds +Provides: rust-scx_utils-devel +Provides: scx_c_schedulers +Provides: scxctl = %{version} +Provides: scx_layered +Provides: scx_rustland +Provides: scx_rusty +Obsoletes: scxctl <= 0.3.4 +Packager: Gilver E. + +%description +sched_ext is a Linux kernel feature which enables implementing kernel thread schedulers in BPF and dynamically loading them. + +This package contains nightly builds of the sched_ext schedulers. + +%package devel +License: GPL-2.0-only +%pkg_devel_files +%doc BREAKING_CHANGES.md +%doc DEVELOPER_GUIDE.md +%license LICENSE + +%prep +%autosetup -p1 -n scx-%{commit} + +%cargo_prep_online + +%build +%meson \ + -Dsystemd=enabled \ + -Dopenrc=disabled +%meson_build + + +%install +%meson_install + +%{cargo_license_online} > LICENSE.dependencies + +%post +%systemd_post scx_loader.service +%systemd_post scx.service + +%preun +%systemd_preun scx_loader.service +%systemd_preun scx.service + +%postun +%systemd_postun_with_restart scx_loader.service +%systemd_postun_with_restart scx.service + +%files +%doc OVERVIEW.md +%doc README.md +%license LICENSE +%license LICENSE.dependencies +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/default/scx +%{_bindir}/scx* +%{_bindir}/vmlinux_docify +%{_unitdir}/scx_loader.service +%{_unitdir}/scx.service +%{_datadir}/dbus-1/system.d/org.scx.Loader.conf +%{_datadir}/dbus-1/system-services/org.scx.Loader.service +%attr(0644,root,root) %config(noreplace) %{_datadir}/scx_loader/config.toml + +%changelog +* Sun Jun 15 2025 Gilver E. - 1.0.13^20250612.git.c1507b0-1 +- Initial package diff --git a/anda/system/scx-scheds/nightly/update.rhai b/anda/system/scx-scheds/nightly/update.rhai new file mode 100644 index 0000000000..5675ab6cac --- /dev/null +++ b/anda/system/scx-scheds/nightly/update.rhai @@ -0,0 +1,8 @@ +rpm.global("commit", gh_commit("sched-ext/scx")); +if rpm.changed() { + rpm.release(); + rpm.global("commitdate", date()); + let v = gh("sched-ext/scx"); + v.crop(1); + rpm.global("ver", v); +} diff --git a/anda/system/scx-scheds/stable/anda.hcl b/anda/system/scx-scheds/stable/anda.hcl new file mode 100644 index 0000000000..b221e7e271 --- /dev/null +++ b/anda/system/scx-scheds/stable/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "scx-scheds.spec" + } +} diff --git a/anda/system/scx-scheds/stable/scx-scheds.spec b/anda/system/scx-scheds/stable/scx-scheds.spec new file mode 100644 index 0000000000..0726e0e5e8 --- /dev/null +++ b/anda/system/scx-scheds/stable/scx-scheds.spec @@ -0,0 +1,103 @@ +Name: scx-scheds +Version: 1.0.15 +Release: 1%?dist +Summary: sched_ext schedulers and tools +SourceLicense: GPL-2.0-only +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND ((MIT OR Apache-2.0) AND Unicode-3.0) AND (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND Apache-2.0 AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND ISC AND (LGPL-2.1-only OR BSD-2-Clause) AND LGPL-2.1 AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND (MPL-2.0 OR MIT OR Apache-2.0) AND MPL-2.0-only and MPL-2.0-or-later AND (Unlicense OR MIT) AND Zlib +URL: https://github.com/sched-ext/scx +Source0: %{URL}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: anda-srpm-macros +BuildRequires: bpftool +BuildRequires: cargo +BuildRequires: cargo-rpm-macros +BuildRequires: clang >= 17 +BuildRequires: elfutils-libelf +BuildRequires: elfutils-libelf-devel +BuildRequires: gcc +BuildRequires: git +BuildRequires: jq +BuildRequires: jq-devel +BuildRequires: libseccomp-devel +BuildRequires: lld >= 17 +BuildRequires: llvm >= 17 +BuildRequires: meson >= 1.2 +BuildRequires: protobuf-compiler +BuildRequires: python3 +BuildRequires: rust +BuildRequires: systemd +BuildRequires: systemd-rpm-macros +BuildRequires: zlib-ng-compat +Requires: elfutils-libelf +Requires: jq +Requires: libseccomp +Requires: protobuf +Requires: zlib +Conflicts: rust-scx_utils-devel +Conflicts: scx_c_schedulers +Conflicts: scx_layered +Conflicts: scx_rustland +Conflicts: scx_rusty +Conflicts: scx-scheds-git +Provides: rust-scx_utils-devel +Provides: scx_c_schedulers +Provides: scxctl = %{version} +Provides: scx_layered +Provides: scx_rustland +Provides: scx_rusty +Obsoletes: scxctl >= 0.3.4 +Packager: Gilver E. + +%description +sched_ext is a Linux kernel feature which enables implementing kernel thread schedulers in BPF and dynamically loading them. + +%package devel +License: GPL-2.0-only +%pkg_devel_files +%doc BREAKING_CHANGES.md +%doc DEVELOPER_GUIDE.md +%license LICENSE + +%prep +%autosetup -n scx-%{version} -p1 +%cargo_prep_online + +%build +%meson \ + -Dsystemd=enabled \ + -Dopenrc=disabled \ + -Dlibalpm=disabled +%meson_build + +%install +%meson_install + +%{cargo_license_online} > LICENSE.dependencies + +%post +%systemd_post scx_loader.service +%systemd_post scx.service + +%preun +%systemd_preun scx_loader.service +%systemd_preun scx.service + +%postun +%systemd_postun_with_restart scx_loader.service +%systemd_postun_with_restart scx.service + +%files +%doc OVERVIEW.md +%doc README.md +%license LICENSE +%license LICENSE.dependencies +%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/default/scx +%{_bindir}/scx* +%{_bindir}/vmlinux_docify +%{_unitdir}/scx_loader.service +%{_unitdir}/scx.service +%{_datadir}/dbus-1/system.d/org.scx.Loader.conf +%{_datadir}/dbus-1/system-services/org.scx.Loader.service + +%changelog +* Sun Jun 15 2025 Gilver E. - 1.0.13-1 +- Initial package diff --git a/anda/system/scx-scheds/stable/update.rhai b/anda/system/scx-scheds/stable/update.rhai new file mode 100644 index 0000000000..154a7af1b1 --- /dev/null +++ b/anda/system/scx-scheds/stable/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("sched-ext/scx")); diff --git a/anda/system/si-cik-amdgpu/anda.hcl b/anda/system/si-cik-amdgpu/anda.hcl new file mode 100644 index 0000000000..a0b3834e72 --- /dev/null +++ b/anda/system/si-cik-amdgpu/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "si-cik-amdgpu.spec" + } +} diff --git a/anda/system/si-cik-amdgpu/si-cik-amdgpu.spec b/anda/system/si-cik-amdgpu/si-cik-amdgpu.spec new file mode 100644 index 0000000000..fba10fafc4 --- /dev/null +++ b/anda/system/si-cik-amdgpu/si-cik-amdgpu.spec @@ -0,0 +1,52 @@ +%global commit c0c7df418d9d5eb499b72f738fa4c9c4ee7fcbc6 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20250620 + +Name: si-cik-amdgpu +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%{?dist} +Summary: Modprobe config to enable the amdgpu drivers on Southern Islands (SI) and CIK (Sea Islands) +License: GPL-3.0-only +URL: https://github.com/terrapkg/pkg-si-cik-amdgpu +Source0: %{url}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz +BuildRequires: systemd-rpm-macros +Requires(post): dracut +Requires(postun): dracut +BuildArch: noarch +Packager: Gilver E. + +%description +%{summary}. + +Forcing these generations of cards to use the amdgpu driver generally improves performance, especially for gaming. + +DISCLAIMER: +Using the amdgpu driver with SI and CIK GPUs is NOT officially supported. +You SHOULD NOT report any issues with doing so to AMD or Mesa. + +Using this driver with these GPUs is known in some cases to cause a higher power draw. +If this is not a potential tradeoff you are comfortable with, please do not use this config. + +%prep +%autosetup -n pkg-%{name}-%{commit} + +%build +# [Crickets chirping] + +%install +install -Dm644 amdgpu.conf -t %{buildroot}%{_modprobedir} + +%post +dracut -f --regenerate-all + +%postun +dracut -f --regenerate-all + +%files +%doc README.md +%license LICENSE +%{_modprobedir}/amdgpu.conf + +%changelog +* Fri Jun 20 2025 Gilver E. - 0^20250620git.c0c7df4-1 +- Initial package diff --git a/anda/system/surface-dtx-daemon/surface-dtx-daemon.spec b/anda/system/surface-dtx-daemon/surface-dtx-daemon.spec index 73c0e01ebc..75d319178e 100644 --- a/anda/system/surface-dtx-daemon/surface-dtx-daemon.spec +++ b/anda/system/surface-dtx-daemon/surface-dtx-daemon.spec @@ -1,10 +1,10 @@ %global debug_package %{nil} -%global ver v0.3.8-1 +%global ver v0.3.9-1 %global ver2 %(echo %{ver} | sed 's/^v//') Name: terra-surface-dtx-daemon Version: %(echo %ver | sed 's/-/~/g') -Release: 3%{?dist} +Release: 4%{?dist} Summary: Surface Detachment System (DTX) Daemon License: MIT URL: https://github.com/linux-surface/surface-dtx-daemon @@ -18,6 +18,8 @@ Linux User-Space Detachment System (DTX) Daemon for the Surface ACPI Driver (and Surface Books). Currently only the Surface Book 2 is supported, due to lack of driver-support on the Surface Book 1. This may change in the future. +%pkg_completion -Bfz surface-dtx-daemon surface-dtx-userd + %prep %autosetup -n surface-dtx-daemon-%{ver2} %cargo_prep_online @@ -71,12 +73,6 @@ install -D -m644 "target/surface-dtx-userd.fish" "%{buildroot}/usr/share/fish/ve /usr/bin/surface-dtx-userd /usr/lib/systemd/system/surface-dtx-daemon.service /usr/lib/systemd/user/surface-dtx-userd.service -/usr/share/bash-completion/completions/surface-dtx-daemon -/usr/share/bash-completion/completions/surface-dtx-userd -/usr/share/zsh/site-functions/_surface-dtx-daemon -/usr/share/zsh/site-functions/_surface-dtx-userd -/usr/share/fish/vendor_completions.d/surface-dtx-daemon.fish -/usr/share/fish/vendor_completions.d/surface-dtx-userd.fish %changelog * Wed Feb 5 2025 Owen Zimmerman diff --git a/anda/system/usbio-drivers/akmod/anda.hcl b/anda/system/usbio-drivers/akmod/anda.hcl new file mode 100644 index 0000000000..7b35cc7a64 --- /dev/null +++ b/anda/system/usbio-drivers/akmod/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "intel-usbio-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/usbio-drivers/akmod/intel-usbio-kmod.spec b/anda/system/usbio-drivers/akmod/intel-usbio-kmod.spec new file mode 100644 index 0000000000..827958604f --- /dev/null +++ b/anda/system/usbio-drivers/akmod/intel-usbio-kmod.spec @@ -0,0 +1,64 @@ +%global buildforkernels akmod +%global debug_package %{nil} +%global commit 4fb690c6d15a81c492954636c2db396cb700a119 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commit_date 20241210 +%global modulename intel-usbio + +Name: %{modulename}-kmod +Summary: Kernel drivers for the USBIO Extension +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%?dist +License: GPL-2.0-only +URL: https://github.com/intel/usbio-drivers +Source0: %{url}/archive/%{commit}.tar.gz#/usbio-drivers-%{shortcommit}.tar.gz +Patch0: https://github.com/jwrdegoede/usbio-drivers/commit/d5f08986936a7fda0cce543c73fb8d9bab76eae2.patch +Patch1: https://github.com/jwrdegoede/usbio-drivers/commit/47b34a6f467eebb4e9fc59f5e25618fe760fbf33.patch +Patch2: https://github.com/jwrdegoede/usbio-drivers/commit/0eae85556558b410635ad03ed5eccb9648e11fce.patch +BuildRequires: elfutils-libelf-devel +BuildRequires: gcc +BuildRequires: kmodtool +Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: akmods +Requires: akmod-intel-ipu6 +Packager: Gilver E. + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{modulename} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +This package enables USBIO Extension drivers on Intel Alder Lake, Raptor Lake, Meteor Lake and Lunar Lake platforms. + +%prep +# error out if there was something wrong with kmodtool +%{?kmodtool_check} + +# print kmodtool output for debugging purposes: +kmodtool --target %{_target_cpu} --repo terra --kmodname %{modulename} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -p1 -n usbio-drivers-%{commit} +rm -fr .github + +for kernel_version in %{?kernel_versions} ; do + cp -a ./* _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions} ; do + make -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} modules +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/gpio/ + mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/i2c/busses/ + mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/mfd/ + install -m 755 _kmod_build_${kernel_version%%___*}/drivers/gpio/*.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/gpio/ + install -m 755 _kmod_build_${kernel_version%%___*}/drivers/i2c/busses/*.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/i2c/busses/ + install -m 755 _kmod_build_${kernel_version%%___*}/drivers/mfd/*.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/drivers/mfd/ + install -m 755 _kmod_build_${kernel_version%%___*}/*.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix} +done +%{?akmod_install} + +%changelog +* Mon Jun 16 2025 Gilver E. - 0^20250312git4fb690c +- Initial package diff --git a/anda/system/usbio-drivers/akmod/update.rhai b/anda/system/usbio-drivers/akmod/update.rhai new file mode 100644 index 0000000000..c62610c1f0 --- /dev/null +++ b/anda/system/usbio-drivers/akmod/update.rhai @@ -0,0 +1,10 @@ +let c = sh("cat anda/system/usbio-drivers/kmod-common/intel-usbio-drivers.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/usbio-drivers/kmod-common/intel-usbio-drivers.spec | grep '%global commit_date' | sed -E 's/.+commit_date //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commit_date", d); +} + diff --git a/anda/system/usbio-drivers/dkms/anda.hcl b/anda/system/usbio-drivers/dkms/anda.hcl new file mode 100644 index 0000000000..2a32b7cd0c --- /dev/null +++ b/anda/system/usbio-drivers/dkms/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "dkms-intel-usbio.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/system/usbio-drivers/dkms/dkms-intel-usbio.conf b/anda/system/usbio-drivers/dkms/dkms-intel-usbio.conf new file mode 100644 index 0000000000..457331f700 --- /dev/null +++ b/anda/system/usbio-drivers/dkms/dkms-intel-usbio.conf @@ -0,0 +1,12 @@ +PACKAGE_NAME="usbio-drivers" +PACKAGE_VERSION="0.1" +AUTOINSTALL="yes" + +BUILT_MODULE_NAME[0]="usbio" +DEST_MODULE_LOCATION[0]="/extra" + +BUILT_MODULE_NAME[1]="gpio-usbio" +DEST_MODULE_LOCATION[1]="/extra" + +BUILT_MODULE_NAME[2]="i2c-usbio" +DEST_MODULE_LOCATION[2]="/extra" diff --git a/anda/system/usbio-drivers/dkms/dkms-intel-usbio.spec b/anda/system/usbio-drivers/dkms/dkms-intel-usbio.spec new file mode 100644 index 0000000000..4996afbfa9 --- /dev/null +++ b/anda/system/usbio-drivers/dkms/dkms-intel-usbio.spec @@ -0,0 +1,56 @@ +%global commit 4fb690c6d15a81c492954636c2db396cb700a119 +%global shortcommit %{sub %{commit} 1 7} +%global commit_date 20250312 +%global debug_package %{nil} +%global modulename intel-usbio + +Name: dkms-%{modulename} +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%{?dist} +Summary: Kernel drivers for the USBIO Extension +License: GPL-2.0-only +URL: https://github.com/intel/usbio-drivers +Source0: %{url}/archive/%{commit}.tar.gz#/usbio-drivers-%{shortcommit}.tar.gz +Source2: %{name}.conf +Patch0: https://github.com/jwrdegoede/usbio-drivers/commit/d5f08986936a7fda0cce543c73fb8d9bab76eae2.patch +Patch1: https://github.com/jwrdegoede/usbio-drivers/commit/47b34a6f467eebb4e9fc59f5e25618fe760fbf33.patch +Patch2: https://github.com/jwrdegoede/usbio-drivers/commit/0eae85556558b410635ad03ed5eccb9648e11fce.patch +Provides: %{modulename}-kmod = %{version} +Requires: dkms +Requires: dkms-intel-ipu6 +BuildArch: noarch +Packager: Gilver E. + +%description +This package enables USBIO Extension drivers on Intel Alder Lake, Raptor Lake, Meteor Lake and Lunar Lake platforms. + +%prep +%autosetup -p1 -n usbio-drivers-%{commit} +rm -fr .github + +cp -f %{SOURCE2} dkms.conf + +%build + +%install +# Create empty tree: +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr * %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%post +dkms add -m %{modulename} -v %{version} -q || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all || : + +%files +%{_usrsrc}/%{modulename}-%{version} + +%changelog +* Mon Jun 16 2025 Gilver E. - 0^20250312git4fb690c +- Initial package + diff --git a/anda/system/usbio-drivers/dkms/update.rhai b/anda/system/usbio-drivers/dkms/update.rhai new file mode 100644 index 0000000000..c62610c1f0 --- /dev/null +++ b/anda/system/usbio-drivers/dkms/update.rhai @@ -0,0 +1,10 @@ +let c = sh("cat anda/system/usbio-drivers/kmod-common/intel-usbio-drivers.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/usbio-drivers/kmod-common/intel-usbio-drivers.spec | grep '%global commit_date' | sed -E 's/.+commit_date //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commit_date", d); +} + diff --git a/anda/system/usbio-drivers/kmod-common/anda.hcl b/anda/system/usbio-drivers/kmod-common/anda.hcl new file mode 100644 index 0000000000..ecd4675c91 --- /dev/null +++ b/anda/system/usbio-drivers/kmod-common/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "intel-usbio-drivers.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/usbio-drivers/kmod-common/intel-usbio-drivers.spec b/anda/system/usbio-drivers/kmod-common/intel-usbio-drivers.spec new file mode 100644 index 0000000000..bb9a354cbc --- /dev/null +++ b/anda/system/usbio-drivers/kmod-common/intel-usbio-drivers.spec @@ -0,0 +1,40 @@ +%global commit 4fb690c6d15a81c492954636c2db396cb700a119 +%global shortcommit %{sub %{commit} 1 7} +%global commit_date 20250312 +%global debug_package %{nil} + +Name: dkms-%{modulename} +Version: 0^%{commit_date}git.%{shortcommit} +Release: 1%{?dist} +Summary: Common files for the USBIO drivers +License: GPL-2.0-only +URL: https://github.com/intel/usbio-drivers +Source0: %{url}/archive/%{commit}.tar.gz#/usbio-drivers-%{shortcommit}.tar.gz +BuildRequires: anda-srpm-macros +Provides: intel-usbio-kmod-common = %{evr} +Requires: intel-ipu6-kmod-common +BuildArch: noarch +Packager: Gilver E. + +%description +This package contains the common files for the UBSIO kernel modules. + +%prep +%autosetup -p1 -n usbio-drivers-%{commit} + +%build +# Hi, I'm empty. + +%install +# Hi, I'm also empty! + +%files +%doc CODE_OF_CONDUCT.md +%doc README.md +%doc SECURITY.md +%doc security.md +%license LICENSE.txt + +%changelog +* Mon Jun 16 2025 Gilver E. - 0^20250312git4fb690c +- Initial package diff --git a/anda/system/usbio-drivers/kmod-common/update.rhai b/anda/system/usbio-drivers/kmod-common/update.rhai new file mode 100644 index 0000000000..f9b29962bd --- /dev/null +++ b/anda/system/usbio-drivers/kmod-common/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("intel/usbio-drivers")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/system/uutils-coreutils-replace/coreutils-fix-metadata.diff b/anda/system/uutils-coreutils-replace/coreutils-fix-metadata.diff index 2ae3d7b2f0..793737b640 100644 --- a/anda/system/uutils-coreutils-replace/coreutils-fix-metadata.diff +++ b/anda/system/uutils-coreutils-replace/coreutils-fix-metadata.diff @@ -2,39 +2,52 @@ +++ coreutils-*/Cargo.toml @@ -18,6 +18,7 @@ categories = ["command-line-utilities"] - rust-version = "1.79.0" + rust-version = "1.82.0" edition = "2021" +autobins = false - + build = "build.rs" - -@@ -325,7 +326,7 @@ - rand_core = "0.6.4" + +@@ -25,7 +26,11 @@ + all-features = true + + [features] +-default = ["feat_common_core"] ++default = [ ++ "feat_acl", ++ "feat_common_core", ++ "feat_selinux", ++] + ## OS feature shortcodes + macos = ["feat_os_macos"] + unix = ["feat_os_unix"] +@@ -325,7 +330,7 @@ + rand_core = "0.9.0" rayon = "1.10" regex = "1.10.4" --rstest = "0.24.0" -+rstest = ">=0.24" +-rstest = "0.25.0" ++rstest = ">=0.25,<0.28" rust-ini = "0.21.0" same-file = "1.0.6" self_cell = "1.0.4" -@@ -514,7 +515,7 @@ +@@ -516,7 +521,7 @@ rstest = { workspace = true } - + [target.'cfg(any(target_os = "linux", target_os = "android"))'.dev-dependencies] -procfs = { version = "0.17", default-features = false } -+procfs = { version = ">=0.16, <0.18", default-features = false } - ++procfs = { version = ">=0.17, <0.18", default-features = false } + [target.'cfg(unix)'.dev-dependencies] nix = { workspace = true, features = ["process", "signal", "user", "term"] } -@@ -537,11 +538,6 @@ +@@ -538,11 +543,6 @@ name = "coreutils" path = "src/bin/coreutils.rs" -- + -[[bin]] -name = "uudoc" -path = "src/bin/uudoc.rs" -required-features = ["uudoc"] - +- # The default release profile. It contains all optimizations, without # sacrificing debug info. With this profile (like in the standard # release profile), the debug info and the stack traces will still be available. diff --git a/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec b/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec index 71a27ffd2c..b8bd2c1674 100644 --- a/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec +++ b/anda/system/uutils-coreutils-replace/uutils-coreutils-replace.spec @@ -5,8 +5,8 @@ %endif Name: uutils-coreutils-replace -Version: 0.0.29 -Release: 2%?dist +Version: 0.1.0 +Release: 1%?dist Summary: Cross-platform Rust rewrite of the GNU coreutils License: MIT URL: https://github.com/uutils/coreutils diff --git a/anda/system/v4l2-relayd/anda.hcl b/anda/system/v4l2-relayd/anda.hcl index febd3dbe1f..bc3f3adf60 100644 --- a/anda/system/v4l2-relayd/anda.hcl +++ b/anda/system/v4l2-relayd/anda.hcl @@ -3,6 +3,6 @@ project pkg { spec = "v4l2-relayd.spec" } labels { - weekly = 1 + nightly = 1 } } diff --git a/anda/system/v4l2-relayd/v4l2-relayd.spec b/anda/system/v4l2-relayd/v4l2-relayd.spec index a29e83df0f..b3e48a1f28 100644 --- a/anda/system/v4l2-relayd/v4l2-relayd.spec +++ b/anda/system/v4l2-relayd/v4l2-relayd.spec @@ -1,5 +1,5 @@ -%global commit 35a06d89747ff31fbaabf744b7dae585bfa86723 -%global commit_date 20220126 +%global commit fda071b434a9978c754f557474812aa5d48b24ba +%global commit_date 20250616 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: v4l2-relayd diff --git a/anda/system/v4l2loopback/akmod/anda.hcl b/anda/system/v4l2loopback/akmod/anda.hcl new file mode 100644 index 0000000000..f646d65261 --- /dev/null +++ b/anda/system/v4l2loopback/akmod/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "v4l2loopback-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/v4l2loopback/akmod/update.rhai b/anda/system/v4l2loopback/akmod/update.rhai new file mode 100644 index 0000000000..15672a87c9 --- /dev/null +++ b/anda/system/v4l2loopback/akmod/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("v4l2loopback", labels.branch)); diff --git a/anda/system/v4l2loopback/akmod/v4l2loopback-kmod.spec b/anda/system/v4l2loopback/akmod/v4l2loopback-kmod.spec new file mode 100644 index 0000000000..395340a22a --- /dev/null +++ b/anda/system/v4l2loopback/akmod/v4l2loopback-kmod.spec @@ -0,0 +1,70 @@ +# The reason why this package is a separate from the main one despite using the same sources +# is because akmods use the srpm to build the kmod package, and if the kmod package is included +# in the main package, akmods will reinstall the userspace package every time the kernel is updated. + +# I made the mistake of combining the specs when I ported this from RPMFusion, but to be fair +# they barely document anything. + +%global buildforkernels akmod +%global debug_package %{nil} +%global commit 2c9b67072b15d903fecde67c7f269abeafee4c25 +%global commitdate 20230503 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global modulename v4l2loopback +%global _description %{expand: +This module allows you to create \"virtual video devices.\" Normal \(v4l2\) applications will read these devices as if they were ordinary video devices, but the video will not be read from e.g. a capture card but instead it is generated by another application.} + + +Name: %{modulename}-kmod +Summary: Kernel module (kmod) for V4L2 loopback devices +Version: 0.15.1 +Release: 1%?dist +License: GPL-2.0-or-later +URL: https://github.com/v4l2loopback/v4l2loopback +Source0: %{url}/archive/v%{version}/%{modulename}-%{version}.tar.gz +BuildRequires: gcc +BuildRequires: make +BuildRequires: help2man +BuildRequires: systemd-rpm-macros +BuildRequires: kmodtool +Requires: akmods +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-akmod-modules = %{?epoch:%{epoch}:}%{version} +Requires: help2man +Requires: kernel-devel +Conflicts: dkms-%{modulename} +Packager: Cappy Ishihara + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{modulename} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description %_description + +%prep +%{?kmodtool_check} + +kmodtool --target %{_target_cpu} --repo terra --kmodname %{modulename} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%setup -q -c +(cd v4l2loopback-%{version} +) + +for kernel_version in %{?kernel_versions} ; do + cp -a v4l2loopback-%{version} _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions} ; do + make V=1 %{?_smp_mflags} -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} modules +done + + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -D -m 755 _kmod_build_${kernel_version%%___*}/v4l2loopback.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/*.ko +done +%{?akmod_install} + +%changelog +%autochangelog diff --git a/anda/system/v4l2loopback/dkms/anda.hcl b/anda/system/v4l2loopback/dkms/anda.hcl new file mode 100644 index 0000000000..74c2e9914c --- /dev/null +++ b/anda/system/v4l2loopback/dkms/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "dkms-v4l2loopback.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/v4l2loopback/dkms/dkms-v4l2loopback.spec b/anda/system/v4l2loopback/dkms/dkms-v4l2loopback.spec new file mode 100644 index 0000000000..7bd955246d --- /dev/null +++ b/anda/system/v4l2loopback/dkms/dkms-v4l2loopback.spec @@ -0,0 +1,56 @@ +%global debug_package %{nil} +%global modulename v4l2loopback +%global _description %{expand: +This module allows you to create \"virtual video devices.\" Normal \(v4l2\) applications will read these devices as if they were ordinary video devices, but the video will not be read from e.g. a capture card but instead it is generated by another application.} + +Name: dkms-%{modulename} +Version: 0.15.1 +Release: 1%?dist +Summary: Utils for V4L2 loopback devices +License: GPL-2.0-or-later +URL: https://github.com/v4l2loopback/v4l2loopback +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: no-weak-modules.conf +BuildRequires: systemd-rpm-macros +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Requires: help2man +Conflicts: akmod-%{modulename} +BuildArch: noarch +Packager: Gilver E. + +%description %_description + +%prep +%autosetup -p1 -n %{modulename}-%{version} + +%build + +%install +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version} +cp -fr v4l2loopback.h v4l2loopback.c v4l2loopback_formats.h dkms.conf Kbuild Makefile %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%if 0%{?fedora} +# Do not enable weak modules support in Fedora (no kABI): +install -Dpm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : + +%files +%{_usrsrc}/%{modulename}-%{version} +%if 0%{?fedora} +%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%changelog +* Fri Mar 07 2025 Gilver E. +- Initial package diff --git a/anda/system/v4l2loopback/dkms/no-weak-modules.conf b/anda/system/v4l2loopback/dkms/no-weak-modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/v4l2loopback/dkms/no-weak-modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/v4l2loopback/dkms/update.rhai b/anda/system/v4l2loopback/dkms/update.rhai new file mode 100644 index 0000000000..15672a87c9 --- /dev/null +++ b/anda/system/v4l2loopback/dkms/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("v4l2loopback", labels.branch)); diff --git a/anda/system/v4l2loopback/anda.hcl b/anda/system/v4l2loopback/kmod-common/anda.hcl similarity index 63% rename from anda/system/v4l2loopback/anda.hcl rename to anda/system/v4l2loopback/kmod-common/anda.hcl index 14eb49b671..ca17cc3b34 100644 --- a/anda/system/v4l2loopback/anda.hcl +++ b/anda/system/v4l2loopback/kmod-common/anda.hcl @@ -1,8 +1,6 @@ project pkg { + arches = ["x86_64", "aarch64"] rpm { spec = "v4l2loopback.spec" } - labels { - mock = 1 - } } diff --git a/anda/system/v4l2loopback/modprobe-d-98-v4l2loopback.conf b/anda/system/v4l2loopback/kmod-common/modprobe-d-98-v4l2loopback.conf similarity index 100% rename from anda/system/v4l2loopback/modprobe-d-98-v4l2loopback.conf rename to anda/system/v4l2loopback/kmod-common/modprobe-d-98-v4l2loopback.conf diff --git a/anda/system/v4l2loopback/kmod-common/update.rhai b/anda/system/v4l2loopback/kmod-common/update.rhai new file mode 100644 index 0000000000..609ecb5f33 --- /dev/null +++ b/anda/system/v4l2loopback/kmod-common/update.rhai @@ -0,0 +1 @@ +rpm.version(gh_tag("v4l2loopback/v4l2loopback")); diff --git a/anda/system/v4l2loopback/kmod-common/v4l2loopback.spec b/anda/system/v4l2loopback/kmod-common/v4l2loopback.spec new file mode 100644 index 0000000000..d0dc6041e6 --- /dev/null +++ b/anda/system/v4l2loopback/kmod-common/v4l2loopback.spec @@ -0,0 +1,69 @@ +%global debug_package %{nil} +%global commit 2c9b67072b15d903fecde67c7f269abeafee4c25 +%global commitdate 20230503 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: v4l2loopback +Summary: Utils for V4L2 loopback devices +Version: 0.15.1 +Release: 1%?dist +License: GPL-2.0-or-later +URL: https://github.com/v4l2loopback/v4l2loopback +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Source1: modprobe-d-98-v4l2loopback.conf +BuildRequires: gcc +BuildRequires: make +BuildRequires: help2man +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: (%{name}-kmod = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version}) +Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version} +### For compatibility with older names +Provides: %{name}-utils = %{version}-%{release} +Obsoletes: %{name}-utils < 0.12.5-2 +Packager: Cappy Ishihara + + +%description +Allows you to create "virtual video devices". Normal (v4l2) applications will read these devices as if they were ordinary video devices, but the video will not be read from e.g. a capture card but instead it is generated by another application. + +%package akmod-modules +Summary: Modules for Akmods +Requires: akmod-%{name} +BuildArch: noarch + +%description akmod-modules +Akmods modules for the akmod-%{name} package. + +%prep +%autosetup -p1 -n %{name}-%{version} + +/usr/bin/sed -nE '/^PACKAGE_NAME/{s@^.+"(.+)"@\1@; s|-|_|g; p}' dkms.conf > %{name}.conf + +%build +%{set_build_flags} +%make_build utils + +%install +%{set_build_flags} +%make_build utils + + +make V=1 %{?_smp_mflags} install-utils DESTDIR=%{buildroot} PREFIX=%{_prefix} +make V=1 %{?_smp_mflags} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix} +install -Dm644 %{SOURCE1} %{buildroot}%{_modprobedir}/98-v4l2loopback.conf +install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir} + + +%files +%doc README.md AUTHORS NEWS +%license COPYING +%attr(0755,root,root) %{_bindir}/v4l2loopback-ctl +%attr(0644,root,root) %{_mandir}/man1/v4l2loopback-ctl.1* +%{_modprobedir}/98-v4l2loopback.conf + +%files akmod-modules +%{_modulesloaddir}/v4l2loopback.conf + +%changelog +%autochangelog diff --git a/anda/system/v4l2loopback/modules-load-d-v4l2loopback.conf b/anda/system/v4l2loopback/modules-load-d-v4l2loopback.conf deleted file mode 100644 index d394e47bc8..0000000000 --- a/anda/system/v4l2loopback/modules-load-d-v4l2loopback.conf +++ /dev/null @@ -1 +0,0 @@ -v4l2loopback diff --git a/anda/system/v4l2loopback/update.rhai b/anda/system/v4l2loopback/update.rhai deleted file mode 100644 index fd9dec4b15..0000000000 --- a/anda/system/v4l2loopback/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(gh_tag("umlaeute/v4l2loopback")); diff --git a/anda/system/v4l2loopback/v4l2loopback.spec b/anda/system/v4l2loopback/v4l2loopback.spec deleted file mode 100644 index 9bfe51ec06..0000000000 --- a/anda/system/v4l2loopback/v4l2loopback.spec +++ /dev/null @@ -1,95 +0,0 @@ -%global buildforkernels akmod -%global debug_package %{nil} - -%global commit 2c9b67072b15d903fecde67c7f269abeafee4c25 -%global commitdate 20230503 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) - - -%global prjname v4l2loopback - -Name: %{prjname} -Summary: Utils for V4L2 loopback devices -Version: 0.13.2 -Release: 2%{?dist} -License: GPLv2+ -URL: https://github.com/umlaeute/v4l2loopback -Source0: %{url}/archive/v%{version}/%{prjname}-%{version}.tar.gz - -Source1: modprobe-d-98-v4l2loopback.conf -Source2: modules-load-d-v4l2loopback.conf -BuildRequires: gcc -BuildRequires: make -BuildRequires: help2man -BuildRequires: systemd-rpm-macros -BuildRequires: kmodtool -BuildRequires: systemd-rpm-macros -Requires: kmod-v4l2loopback = %{version}-%{release} -Provides: %{name}-kmod-common = %{version}-%{release} -# Required for akmod-v4l2loopback -Requires: help2man -### For compatibility with older names -Provides: %{name}-utils = %{version}-%{release} -Obsoletes: %{name}-utils < 0.12.5-2 - -%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } - -%description -Allows creation of virtual video devices. Normal (v4l2) applications will read these devices as if they were ordinary video devices. - -%package kmod -Summary: Kernel module (kmod) for %{name} -Requires: kernel-devel - -%description kmod -This module allows you to create "virtual video devices". Normal (v4l2) applications will read these devices as if they were ordinary video devices, but the video will not be read from e.g. a capture card but instead it is generated by another application. - - - -%prep -%{?kmodtool_check} -kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null - -%autosetup -p1 -n %{name}-%{version} - -# for kernel_version in %{?kernel_versions} ; do -# cp -av ./* _kmod_build_${kernel_version%%___*} -# done - -%build - -for kernel_version in %{?kernel_versions} ; do - make V=1 %{?_smp_mflags} M=${PWD}/_kmod_build_${kernel_version%%___*} VERSION=v%{version} v4l2loopback -done - -%{set_build_flags} -%make_build utils - -%install -for kernel_version in %{?kernel_versions}; do - mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - install -D -m 755 v4l2loopback.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/*.ko -done - -%{set_build_flags} -%make_build utils - -%{?akmod_install} -make V=1 %{?_smp_mflags} install-utils DESTDIR=%{buildroot} PREFIX=%{_prefix} -make V=1 %{?_smp_mflags} install-man DESTDIR=%{buildroot} PREFIX=%{_prefix} -install -D -m 0644 %{SOURCE1} %{buildroot}%{_modprobedir}/98-v4l2loopback.conf -install -D -m 0644 %{SOURCE2} %{buildroot}%{_modulesloaddir}/v4l2loopback.conf - - - -%files -%doc README.md AUTHORS NEWS -%license COPYING -%attr(0755,root,root) %{_bindir}/v4l2loopback-ctl -%attr(0644,root,root) %{_mandir}/man1/v4l2loopback-ctl.1* -%{_modprobedir}/98-v4l2loopback.conf -%{_modulesloaddir}/v4l2loopback.conf - -%changelog -%autochangelog diff --git a/anda/system/wine-dxvk/anda.hcl b/anda/system/wine-dxvk/anda.hcl new file mode 100644 index 0000000000..7f713b90ec --- /dev/null +++ b/anda/system/wine-dxvk/anda.hcl @@ -0,0 +1,11 @@ +project pkg { + arches = ["x86_64", "i386"] + rpm { + spec = "wine-dxvk.spec" + extra_repos = ["https://repos.fyralabs.com/terrarawhide-mesa"] + } + labels { + mock = 1 + subrepo = "extras" + } +} diff --git a/anda/system/wine-dxvk/update.rhai b/anda/system/wine-dxvk/update.rhai new file mode 100644 index 0000000000..67de8c26cf --- /dev/null +++ b/anda/system/wine-dxvk/update.rhai @@ -0,0 +1,8 @@ +rpm.version(gh("doitsujin/dxvk")); +if rpm.changed() { + let json = get("https://api.github.com/repos/doitsujin/dxvk/contents/subprojects").json_arr(); + rpm.global("libdisplay_commit", json[0].sha); + let rawfile = get("https://gitlab.freedesktop.org/emersion/libdisplay-info/-/raw/main/meson.build?ref_type=heads"); + let v = find("version: '([\\d.]+....)'", rawfile, 1); + rpm.global("libdisplay_ver", v); +} diff --git a/anda/system/wine-dxvk/wine-dxvk.spec b/anda/system/wine-dxvk/wine-dxvk.spec new file mode 100644 index 0000000000..873ff6d89c --- /dev/null +++ b/anda/system/wine-dxvk/wine-dxvk.spec @@ -0,0 +1,233 @@ +# Compatibility package for Terra WINE +%global debug_package %{nil} +%{?mingw_package_header} + +%global libdisplay_ver 0.3.0-dev +%global libdisplay_commit 275e6459c7ab1ddd4b125f28d0440716e4888078 +%global libdisplay_shortcommit %(c=%{libdisplay_commit}; echo ${c:0:7}) + +%ifarch x86_64 +%global winepedir x86_64-windows +%global target_x86_type 64 +%global mingw_sysroot %mingw64_sysroot +%global mingw_build_win64 1 +%global mingw_build_win32 0 +%else +%global winepedir i386-windows +%global target_x86_type 32 +%global mingw_sysroot %mingw32_sysroot +%global mingw_build_win64 0 +%global mingw_build_win32 1 +%endif + +%global wine_lib_dir %{_datadir}/wine-staging/lib64 + +Name: terra-wine-dxvk +Version: 2.7 +Release: 1%?dist +Summary: Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine + +License: zlib AND MIT +URL: https://github.com/doitsujin/dxvk +Source0: %{url}/archive/v%{version}/dxvk-%{version}.tar.gz +Source1: https://gitlab.freedesktop.org/frog/libdisplay-info/-/archive/%{libdisplay_commit}/libdisplay-info-%{libdisplay_shortcommit}.tar.gz + +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: glslang +BuildRequires: meson +BuildRequires: terra-wine-staging +BuildRequires: wine-staging +BuildRequires: wine-staging-devel + +%ifarch x86_64 +BuildRequires: mingw64-filesystem +BuildRequires: mingw64-binutils +BuildRequires: mingw64-headers +BuildRequires: mingw64-cpp +BuildRequires: mingw64-gcc +BuildRequires: mingw64-gcc-c++ +BuildRequires: mingw64-winpthreads-static +BuildRequires: mingw64-vulkan-headers +BuildRequires: mingw64-spirv-headers +%else +BuildRequires: mingw32-filesystem +BuildRequires: mingw32-binutils +BuildRequires: mingw32-headers +BuildRequires: mingw32-cpp +BuildRequires: mingw32-gcc +BuildRequires: mingw32-gcc-c++ +BuildRequires: mingw32-winpthreads-static +BuildRequires: mingw32-vulkan-headers +BuildRequires: mingw32-spirv-headers +%endif + +Requires(pre): vulkan-tools + +# Disable ISA dep on WINE until I figure out what we are doing with 32-bit WINE, currently these are non-WOW64 builds +Requires: terra-wine-staging +Requires: terra-wine-dxvk-dxgi%{?_isa} = %{version}-%{release} +Requires: vulkan-loader%{?_isa} + +# We want x86_64 users to always have also 32 bit lib, it's the same what wine does +%ifarch x86_64 +Requires: terra-wine-dxvk(x86-32) = %{version}-%{release} +%endif + +# Recommend also d3d8, d3d9, and d3d10 +Recommends: terra-wine-dxvk-d3d8%{?_isa} = %{version}-%{release} +Recommends: terra-wine-dxvk-d3d9%{?_isa} = %{version}-%{release} +Recommends: terra-wine-dxvk-d3d10%{?_isa} = %{version}-%{release} + +# I'm looking into setting these up for the different WINE builds +# Huge WIP +Requires(posttrans): %{_sbindir}/alternatives wine-staging +Requires(preun): %{_sbindir}/alternatives + +ExclusiveArch: %{ix86} x86_64 + +Provides: bundled(libdisplay-info) = %(echo %{libdisplay_ver} | sed 's/-/~/g')^git%{libdisplay_shortcommit} + +%description +%{summary} + +%package dxgi +Summary: DXVK DXGI implementation +%ifarch x86_64 +Requires: terra-wine-dxvk-dxgi(x86-32) = %{version}-%{release} +%endif + +%description dxgi +%{summary} + +This package doesn't enable the use of this DXGI implementation, +it should be installed and overridden per prefix. + +%package d3d10 +Summary: DXVK D3D10 implementation + +Requires: terra-wine-dxvk%{?_isa} = %{version}-%{release} + +# We want x86_64 users to always have also 32 bit lib, it's the same what wine does +%ifarch x86_64 +Requires: terra-wine-dxvk-d3d10(x86-32) = %{version}-%{release} +%endif + +%description d3d10 +%{summary} + +%package d3d9 +Summary: DXVK D3D9 implementation + +Requires: terra-wine-dxvk%{?_isa} = %{version}-%{release} + +# We want x86_64 users to always have also 32 bit lib, it's the same what wine does +%ifarch x86_64 +Requires: terra-wine-dxvk-d3d9(x86-32) = %{version}-%{release} +%endif + +%description d3d9 +%{summary} + +%package d3d8 +Summary: DXVK D3D8 implementation + +Requires: terra-wine-dxvk%{?_isa} = %{version}-%{release} + +# We want x86_64 users to always have also 32 bit lib, it's the same what wine does +%ifarch x86_64 +Requires: terra-wine-dxvk-d3d8(x86-32) = %{version}-%{release} +%endif + +%description d3d8 +%{summary} + +%prep +%autosetup -n dxvk-%{version} -p1 -a1 +rm -rf subprojects/libdisplay-info && mv libdisplay-info-%{libdisplay_commit} subprojects/libdisplay-info + +%build +%mingw_meson --buildtype=plain --wrap-mode=nodownload --auto-features=enabled --cross-file ../build-win%{target_x86_type}.txt --buildtype release +%mingw_ninja + +%install +%mingw_ninja_install +winebuild --builtin %buildroot%mingw_sysroot/mingw/bin/dxgi.dll +winebuild --builtin %buildroot%mingw_sysroot/mingw/bin/d3d8.dll +winebuild --builtin %buildroot%mingw_sysroot/mingw/bin/d3d9.dll +winebuild --builtin %buildroot%mingw_sysroot/mingw/bin/d3d10core.dll +winebuild --builtin %buildroot%mingw_sysroot/mingw/bin/d3d11.dll + +install -Dpm644 %buildroot%mingw_sysroot/mingw/bin/dxgi.dll %{buildroot}%{wine_lib_dir}/wine/%{winepedir}/dxvk-dxgi.dll +install -Dpm644 %buildroot%mingw_sysroot/mingw/bin/d3d8.dll %{buildroot}%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d8.dll +install -Dpm644 %buildroot%mingw_sysroot/mingw/bin/d3d9.dll %{buildroot}%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d9.dll +install -Dpm644 %buildroot%mingw_sysroot/mingw/bin/d3d10core.dll %{buildroot}%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d10core.dll +install -Dpm644 %buildroot%mingw_sysroot/mingw/bin/d3d11.dll %{buildroot}%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d11.dll + +# Clean-up +rm -rf %buildroot%mingw_sysroot/mingw + + + +%posttrans +if vulkaninfo |& grep "ERROR_INITIALIZATION_FAILED\|ERROR_SURFACE_LOST_KHR\|Vulkan support is incomplete" > /dev/null; then + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/d3d11.dll 'wine-d3d11%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d11.dll 5 +else + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/d3d11.dll 'wine-d3d11%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d11.dll 20 +fi + +%posttrans dxgi +if vulkaninfo |& grep "ERROR_INITIALIZATION_FAILED\|ERROR_SURFACE_LOST_KHR\|Vulkan support is incomplete" > /dev/null; then + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/dxgi.dll 'wine-dxgi%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-dxgi.dll 5 +else + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/dxgi.dll 'wine-dxgi%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-dxgi.dll 20 +fi + +%posttrans d3d10 +if vulkaninfo |& grep "ERROR_INITIALIZATION_FAILED\|ERROR_SURFACE_LOST_KHR\|Vulkan support is incomplete" > /dev/null; then + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/d3d10core.dll 'wine-d3d10core%{?_isa}'%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d10core.dll 5 +else + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/d3d10core.dll 'wine-d3d10core%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d10core.dll 20 +fi + +%posttrans d3d9 +if vulkaninfo |& grep "ERROR_INITIALIZATION_FAILED\|ERROR_SURFACE_LOST_KHR\|Vulkan support is incomplete" > /dev/null; then + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/d3d9.dll 'wine-d3d9%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d9.dll 5 +else + %{_sbindir}/alternatives --install %{wine_lib_dir}/wine/%{winepedir}/d3d9.dll 'wine-d3d9%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d9.dll 20 +fi + +%postun +%{_sbindir}/alternatives --remove 'wine-d3d11%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d11.dll + +%postun d3d10 +%{_sbindir}/alternatives --remove 'wine-d3d10core%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d10core.dll + +%postun d3d9 +%{_sbindir}/alternatives --remove 'wine-d3d9%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d9.dll + +%postun dxgi +%{_sbindir}/alternatives --remove 'wine-dxgi%{?_isa}' %{wine_lib_dir}/wine/%{winepedir}/dxvk-dxgi.dll +%files +%license LICENSE +%doc README.md +%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d11.dll + +%files d3d10 +%license LICENSE +%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d10core.dll + +%files d3d9 +%license LICENSE +%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d9.dll + +%files d3d8 +%license LICENSE +%{wine_lib_dir}/wine/%{winepedir}/dxvk-d3d8.dll + +%files dxgi +%license LICENSE +%{wine_lib_dir}/wine/%{winepedir}/dxvk-dxgi.dll + +%changelog +%autochangelog diff --git a/anda/system/wine/dev/anda.hcl b/anda/system/wine/dev/anda.hcl new file mode 100644 index 0000000000..ae57da621e --- /dev/null +++ b/anda/system/wine/dev/anda.hcl @@ -0,0 +1,11 @@ +project pkg { + arches = ["x86_64", "aarch64", "i386"] + rpm { + spec = "wine-dev.spec" + extra_repos = ["https://repos.fyralabs.com/terrarawhide-mesa"] + } + labels { + mock = 1 + subrepo = "extras" + } +} diff --git a/anda/system/wine/dev/update.rhai b/anda/system/wine/dev/update.rhai new file mode 100644 index 0000000000..2eb7aa9c54 --- /dev/null +++ b/anda/system/wine/dev/update.rhai @@ -0,0 +1,11 @@ +let v = (gitlab_tag("gitlab.winehq.org", "5")); +rpm.global("ver", v); // Sometimes the development branch includes RC candidates +if rpm.changed () { + rpm.release(); + // Find the current highest release + let matches = (find_all("[\\d.]+\\.[0x]", get("https://dl.winehq.org/wine/source/"))); + matches.dedup(); + let s = sh(`echo ${matches} | sed 's/,//g;s/\[//g;s/\]//g;s/"//g' | tr ' ' '\n' | sort -nr | tr '\n' ' '`, #{"stdout": "piped"}).ctx.stdout; + s.truncate(4); + rpm.global("srcmajor", s); +} diff --git a/anda/system/wine/dev/wine-dev.spec b/anda/system/wine/dev/wine-dev.spec new file mode 100644 index 0000000000..bbdd03d77f --- /dev/null +++ b/anda/system/wine/dev/wine-dev.spec @@ -0,0 +1,422 @@ +# Terra WINE Development branch +# Based on WineHQ's WINE builds with changes for our repos and update system + + +%define _lto_cflags %{nil} +%global flavor %nil +%global compat_package terra-wine-dev +# Cannot use the _datadir macro here or it will cause mass macro recursion +%global _prefix /usr/share/wine-dev +%global srcmajor 10.x +# Make this as a variable instead in case of WINE RCs +%global ver wine-10.13 +%global cleanver %(echo %{ver} | sed 's/v//g;s/wine-//g') + +# This is unfortunate but a lot of Fedora's/SUSE's hardening flags break WINE +%undefine _hardened_build + +# Upstream WineHQ names this -devel, I have renamed it dev to signify it is the dev branch +# Also less confusing because it has a devel package +Name: wine-dev +Version: %(echo %{cleanver} | sed 's/-/~/g') +Release: 1%?dist +Epoch: 1 +Summary: WINE Is Not An Emulator - runs MS Windows programs +License: LGPL-2.0-or-later +Group: Emulators +URL: https://www.winehq.org + +%define lib_major 1 +%define lib_name lib%{name}1 +%define lib_name_devel lib%{name}-devel + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%define wine %{name}64 +%define mark64 ()(64bit) +%else +%define wine %{name} +%define mark64 %{nil} +%endif +%endif + +%if 0%{?fedora} >= 40 +%define wine %{name} +%ifarch x86_64 +%define mark64 ()(64bit) +%else +%define mark64 %{nil} +%endif +%endif + +Source0: https://dl.winehq.org/wine/source/%{srcmajor}/wine-%{cleanver}.tar.xz +Source1: https://dl.winehq.org/wine/source/%{srcmajor}/wine-%{cleanver}.tar.xz.sign + +# Alexandres key +Source99: wine.keyring + +BuildRequires: alsa-lib-devel +BuildRequires: audiofile-devel +BuildRequires: autoconf +BuildRequires: bison +BuildRequires: coreutils +BuildRequires: cups-devel +BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: flex +BuildRequires: fontconfig-devel +BuildRequires: fontforge +BuildRequires: fontpackages-devel +BuildRequires: freeglut-devel +BuildRequires: freetype-devel +BuildRequires: gawk +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: giflib-devel +BuildRequires: gnupg2 +BuildRequires: gnutls-devel +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel +BuildRequires: icoutils +BuildRequires: ImageMagick-devel +BuildRequires: krb5-devel +BuildRequires: lcms2-devel +BuildRequires: libattr-devel +BuildRequires: libavcodec-free-devel +BuildRequires: libavformat-free-devel +BuildRequires: libavutil-free-devel +BuildRequires: libgphoto2-devel +BuildRequires: libieee1284-devel +BuildRequires: libnetapi-devel +BuildRequires: libpcap-devel +BuildRequires: librsvg2 +BuildRequires: librsvg2-devel +BuildRequires: libstdc++-devel +BuildRequires: libudev-devel +BuildRequires: libusb1-devel +BuildRequires: libv4l-devel +BuildRequires: libX11-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXcursor-devel +BuildRequires: libXext-devel +BuildRequires: libXi-devel +BuildRequires: libXinerama-devel +BuildRequires: libxkbcommon-devel +BuildRequires: libXmu-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXxf86dga-devel +BuildRequires: libXxf86vm-devel +BuildRequires: lzma +BuildRequires: mesa-compat-libOSMesa-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libGLU-devel +BuildRequires: mingw32-gcc +BuildRequires: mingw64-gcc +BuildRequires: ncurses-devel +BuildRequires: ocl-icd-devel +BuildRequires: opencl-headers +BuildRequires: pcsc-lite-devel +BuildRequires: pulseaudio-libs-devel +BuildRequires: samba-devel +BuildRequires: sane-backends-devel +BuildRequires: SDL2-devel +BuildRequires: unixODBC-devel +BuildRequires: unzip +BuildRequires: util-linux +BuildRequires: vulkan-devel +BuildRequires: xz + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%package -n %{wine} +%endif +%endif + +Summary: WINE Is Not An Emulator - runs MS Windows programs +Group: Emulators +%ifarch x86_64 +Conflicts: %{name} +%else +Conflicts: %{name}64 +%endif +%if 0%{?fedora} < 40 +Requires: %{name}-common = %{epoch}:%{version}-%{release} +%endif +Requires: %{compat_package} = %{epoch}:%{version}-%{release} +Provides: %{lib_name} = %{epoch}:%{version}-%{release} +Provides: %{name}-bin = %{epoch}:%{version}-%{release} +Obsoletes: %{lib_name} <= %{epoch}:%{version}-%{release} + +%ifarch %{ix86} +%package -n %{name}-common +Summary: WINE Is Not An Emulator - runs MS Windows programs (32-bit common files) +Group: Emulators +Requires: %{name}-bin = %{epoch}:%{version}-%{release} + +%description -n %{name}-common +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This package contains the files needed to support 32-bit Windows +programs, and is used by both %{name} and %{name}64. +%endif + +%define dlopenreq() %(F=/usr/%{_lib}/lib%{1}.so;[ -e $F ] && (file $F|grep -q ASCII && grep -o 'lib[^ ]*' $F|sed -e "s/\$/%{mark64}/"||objdump -p $F | grep SONAME | awk '{ print $2 "%{mark64}" }') || echo "wine-missing-buildrequires-on-%{1}") +Requires: %dlopenreq asound +Requires: %dlopenreq attr +Requires: %dlopenreq cups +Requires: %dlopenreq dbus-1 +Requires: %dlopenreq fontconfig +Requires: %dlopenreq freetype +Requires: %dlopenreq gnutls +Requires: %dlopenreq krb5 +Requires: %dlopenreq ncurses +Requires: %dlopenreq odbc +Requires: %dlopenreq OSMesa +Requires: %dlopenreq sane +Requires: %dlopenreq SDL2 +Requires: %dlopenreq v4l1 +Requires: %dlopenreq vulkan +Requires: %dlopenreq Xcomposite +Requires: %dlopenreq Xcursor +Requires: %dlopenreq Xi +Requires: %dlopenreq Xinerama +Requires: %dlopenreq Xrandr +Requires: %dlopenreq Xrender +Requires: %dlopenreq Xxf86vm +%if 0%{?fedora} +Suggests: sane-frontends +%endif +Requires(post): desktop-file-utils +Requires(postun): desktop-file-utils + +%define desc Wine is a program which allows running Microsoft Windows programs \ +(including DOS, Windows 3.x and Win32 executables) on Unix. It \ +consists of a program loader which loads and executes a Microsoft \ +Windows binary, and a library (called Winelib) that implements Windows \ +API calls using their Unix or X11 equivalents. The library may also \ +be used for porting Win32 code into native Unix executables. + +%description +%desc + +%ifarch x86_64 +%description -n %{wine} +%desc +%endif + +%package -n %{wine}-devel +Summary: Static libraries and headers for %{name} (64-bit) +Group: Development/C +Requires: %{wine} = %{epoch}:%{version}-%{release} +%ifarch x86_64 +Conflicts: %{name}-devel +%else +Conflicts: %{name}64-devel +%endif +Provides: %{lib_name_devel} = %{epoch}:%{version}-%{release} +Obsoletes: %{lib_name_devel} <= %{epoch}:%{version}-%{release} +%description -n %{wine}-devel +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This package contains the libraries and header files needed to +develop programs which make use of Wine. + +%package -n %compat_package +Summary: WINE Is Not An Emulator - runs MS Windows programs +Group: Emulators +Requires: %{wine} = %{epoch}:%{version}-%{release} +%if 0%{?fedora} < 40 +Conflicts: wine wine64 wine-core wine-common wine-desktop wine-devel +%else +Conflicts: wine wine64 wine-core wine-common wine-desktop +%endif + +%description -n %compat_package +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This compatibility package allows to use %{wine} system-wide as +the default Wine version. + +%prep +# Pull key from key server, if this fails import local copy and then refresh it to make sure it is up to date +gpg --keyserver hkp://keys.gnupg.net --recv-keys CEFAC8EAAF17519D || { gpg --with-fingerprint --import %{SOURCE99} && gpg --refresh-keys; } +gpg --update-trustdb +gpg --verify --with-fingerprint %{SOURCE1} %{SOURCE0} +%setup -n wine-%{version} -q -T -b0 + +%build +# MinGW GCC does not support these options +%define debug_package %{nil} +export LDFLAGS="$(echo "%{build_ldflags}" | sed -e 's/-Wl,-z,relro//' -e 's/-Wl,--build-id=sha1//' -e 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-package-notes//')" +%ifarch x86_64 +export CFLAGS="$(echo "%{optflags}" | sed -e 's/-O2//' -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//') -O2" +%else +export CFLAGS="$(echo "%{optflags}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//')" +%endif +%configure \ + --with-gstreamer \ + --disable-tests \ +%if 0%{?fedora} >= 40 + --enable-archs=i386,x86_64 \ +%else +%ifarch x86_64 + --enable-win64 \ +%endif +%endif + --with-x +make -j4 + +%install +%makeinstall LDCONFIG=/bin/true + +# Compat symlinks for bindir +mkdir -p "%{buildroot}/usr/bin" +for _file in $(ls "%{buildroot}%{_bindir}"); do \ + ln -s "%{_bindir}/$_file" "%{buildroot}/usr/bin/$_file"; \ +done +%if 0%{?fedora} < 40 +%ifarch x86_64 +for _file in wine wine-preloader; do \ + ln -s "%{_prefix}/bin/$_file" "%{buildroot}/usr/bin/$_file"; \ +done +%endif +%endif + +# Compat symlinks for desktop file +mkdir -p "%{buildroot}/usr/share/applications" +for _file in $(ls "%{buildroot}%{_datadir}/applications"); do \ + ln -s "%{_datadir}/applications/$_file" "%{buildroot}/usr/share/applications/$_file"; \ +done + +# Compat manpages +%if 0%{?fedora} || 0%{?scientificlinux} || 0%{?centos} >= 700 || 0%{?rhel} >= 700 +for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \ + if [ -d "%{buildroot}%{_mandir}/$_dir" ]; then \ + mkdir -p "$(dirname "%{buildroot}/usr/share/man/$_dir")"; \ + cp -pr "%{buildroot}%{_mandir}/$_dir" "%{buildroot}/usr/share/man/$_dir"; \ + else \ + mkdir -p "%{buildroot}/usr/share/man/$_dir"; \ + fi; \ +done +%else +for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \ + mkdir -p "%{buildroot}/usr/share/man/$_dir"; \ +done +%endif + +%ifarch x86_64 +#install -p -m 0644 loader/wine.man "%{buildroot}/usr/share/man/man1/wine.1" +#install -p -m 0644 loader/wine.de.UTF-8.man "%{buildroot}/usr/share/man/de.UTF-8/man1/wine.1" +#install -p -m 0644 loader/wine.fr.UTF-8.man "%{buildroot}/usr/share/man/fr.UTF-8/man1/wine.1" +#install -p -m 0644 loader/wine.pl.UTF-8.man "%{buildroot}/usr/share/man/pl.UTF-8/man1/wine.1" +%endif + +%files -n %{wine} +%doc ANNOUNCE.md AUTHORS README.md +%license LICENSE + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%{_bindir}/wine64 +%{_bindir}/wine64-preloader +%endif +%endif +%{_bindir}/function_grep.pl +%{_bindir}/msiexec +%{_bindir}/msidb +%{_bindir}/notepad +%{_bindir}/regedit +%{_bindir}/regsvr32 +%{_bindir}/widl +%{_bindir}/wineboot +%{_bindir}/winebuild +%{_bindir}/winecfg +%{_bindir}/wineconsole* +%{_bindir}/winecpp +%{_bindir}/winedbg +%{_bindir}/winedump +%{_bindir}/winefile +%{_bindir}/wineg++ +%{_bindir}/winegcc +%{_bindir}/winemaker +%{_bindir}/winemine +%{_bindir}/winepath +%{_bindir}/wineserver +%{_bindir}/wmc +%{_bindir}/wrc +%lang(de) %{_mandir}/de.UTF-8/man?/winemaker.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wineserver.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/winemaker.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wineserver.?* +%{_mandir}/man?/widl.1* +%{_mandir}/man?/winebuild.1* +%{_mandir}/man?/winecpp.1* +%{_mandir}/man?/winedbg.1* +%{_mandir}/man?/winedump.1* +%{_mandir}/man?/wineg++.1* +%{_mandir}/man?/winegcc.1* +%{_mandir}/man?/winemaker.1* +%{_mandir}/man?/wmc.1* +%{_mandir}/man?/wrc.1* +%{_mandir}/man?/msiexec.?* +%{_mandir}/man?/notepad.?* +%{_mandir}/man?/regedit.?* +%{_mandir}/man?/regsvr32.?* +%{_mandir}/man?/wineboot.?* +%{_mandir}/man?/winecfg.?* +%{_mandir}/man?/wineconsole.?* +%{_mandir}/man?/winefile.?* +%{_mandir}/man?/winemine.?* +%{_mandir}/man?/winepath.?* +%{_mandir}/man?/wineserver.?* +%dir %{_datadir}/wine +%{_datadir}/wine/wine.inf +%{_datadir}/wine/nls/*.nls +%{_datadir}/applications/*.desktop +%dir %{_datadir}/wine/fonts +%{_datadir}/wine/fonts/* + +%if 0%{?fedora} < 40 +%ifarch %{ix86} +%files -n %{name}-common +%{_bindir}/wine +%{_bindir}/wine-preloader +%{_mandir}/man?/wine.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wine.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?* +%lang(pl) %{_mandir}/pl.UTF-8/man?/wine.?* +%endif +%else +%{_bindir}/wine +#%{_bindir}/wine-preloader +%{_mandir}/man?/wine.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wine.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?* +%lang(pl) %{_mandir}/pl.UTF-8/man?/wine.?* +%endif + +%if 0%{?fedora} < 40 +%ifarch %ix86 x86_64 +%{_libdir}/wine/%{_arch}-unix/*.* +%{_libdir}/wine/%{_arch}-windows/*.* +%endif +%else +%{_libdir}/wine/%{_arch}-unix/* +%{_libdir}/wine/i386-windows/*.* +%{_libdir}/wine/x86_64-windows/*.* +%endif + +%files -n %{wine}-devel +%{_includedir}/* + +%files -n %compat_package +/usr/bin/* +/usr/share/applications/*.desktop +/usr/share/man/man?/* +%lang(de) /usr/share/man/de.UTF-8/man?/* +%lang(fr) /usr/share/man/fr.UTF-8/man?/* +%lang(pl) /usr/share/man/pl.UTF-8/man?/* diff --git a/anda/system/wine/dev/wine.keyring b/anda/system/wine/dev/wine.keyring new file mode 100644 index 0000000000..1b658e615b --- /dev/null +++ b/anda/system/wine/dev/wine.keyring @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFY4SBYBEAC11sh4AMhIhiLxj76FXsluVJIU4nZjVmexar+/5WMlVvMX+Dxk +lUbKDCBOUMtPFsAXMpcxOGwscCr3WMuI8WszTjKDs3mdQ37o/pzXMbRhY0oZV29Z +EhNLds14qhMLlQiDEm5lJ5bOsLevHJ9hR4wvwY6UR881xsiXsNU+iNMRP0cWeRjQ +84pSCLOt9i+D8rdllVob871gN/tjY4Ll13Tg7qmtFE1YEFJaLb2yik0bO7gPkig/ +ADmKMBhOtgAHU9i+gmtP+x+agk7cbXkR06Pd9VBkd9nYlFXbR+zcE15AqauEF1Y2 +V9RbW/Ewt4Fmgr+QQnJhiSMO2BUTS2Q0CC3LznB9QOdEriUmeXGJdim0OJiwYDDX +4CNRk+2CAePbrZnGv+YXgeNPHvFa0Baj73HP8Ptok+OeyWIenRPHG3Ni+O5p1n5k +QK0bHqIwChMtAJvzdoC77XIJhbCtStmvo2FdSA8YcG4stlz+Wk1ZtNMen83ZEscS +OXEVpxcPGlbmWmkWj8DF5zbB1dRdh4T6LLM4nZViBu7oGD76z3c/x2zc7l3pyVHx +Cw70a+r+6LvUwnvCiApCBS72uDc4zZtnkNUQHlXHkz9wEeYUtUB0wkCYWPZy7BZy +0aFfKWK4Jg7uGx/mdHRCJ35MdXWxeQ4yPUE+tF951s167ANr1+ayt87pQwARAQAB +tChBbGV4YW5kcmUgSnVsbGlhcmQgPGp1bGxpYXJkQHdpbmVocS5vcmc+iQI3BBMB +AgAhAhsDAh4BAheABQJWOEvIBQsJCAcDBRUKCQgLBRYCAwEAAAoJEM76yOqvF1Gd +UqkQAJw6ot97efCon6qMA7ctJTqhOvnPSxf430aZgaTuNBEfY3RPeWC+k11cTvKV +dny9xwC+N8U2Jfdd0iXqlwUdM4ThOKZCXGOykCHJmrYGPqWsjGKUO7EoMwJB00qi +nOJdgj7zWLb6MuuKx2eavGYVLCFG4sQ8fjX0+sxuD+Cl++UyS9+t/C3ijeXTxaZn +qSLFKUFzyngXIUhFxMLkUdh397WeTaBtUTyLT0lwOKTllxIyC/+t2e9QcfgdLE/q +wKmRjihNq6I5JOQfO8JynUoR8WzKQaCX5VL6ZPaQa8ZzUdS/h0WlMlQuD5mrcDBa +ZQjqPEIL6/oExk1a7yeQFKNKisq94rVF0Ly1o7w+n+7X4lT9T9zhiPKVXvlxHB0h +SeJm4j/qDq1DSiGVfIR2CChObyeHAZhQZMMr/Ni9XtqzHsd2qhcP1ZYvbQZ2UK/N +Lv398VY/f+kXApFMDQLj1jGA8aXbkE8ChIAiZAAzVMg2wJ2x5/7bImbICsvGSwfx +awlsHzc7CR0Pj2Kdgr7UtsDk+cBRQMEqAIGWiCOKnBD8eoNGaiCoLHI/3ce4dJ/y +pXFtJSkJa8wpK4+xdckAvtPQZgOV5gLCJqNqEF+8aIjsTwwu7dcIXG2qLHD5C5tq +viuZtOYO7UdQbIHuYY5Xy8/W7hQRfIaq1NfKf9qJx4hrCWLviEYEEBECAAYFAlY4 +S3QACgkQ9ebp7rlGHdcg6ACfXNdYTmPe1Ej0rd+eO+yuDF/kwccAoItuIMi7EXu0 +FR4Ui8cBaZI3hweFuQINBFY4SBYBEAD7ZonYuSKxToJ4plL22rv4wPPbqACcLbIG +5t3s/Gb3/twOtaCgOEFhzNv+8K87jX6iSHJYeGhu7e2eRxeGHkrqliNJoHUi9Ddu +ygHqhoNmSHNSqI36/TU5yCRArKS3wwq7cafGnncdVOLBYfj497IxGK8fANhDf7TV +vqUGIb06gkpWbrwmUWgV8pk7MHgL93T5Ph+KSgdEbOSePFwQb9piyp9vWNmZnqK2 +9TFNtTULGtQa0y8ZCNSSEh4YP/DxDraq1OJ2Gh3WHSQ4f2hfGXJMzr4cyIrOJHQ8 +mby6xHmvldsAGsZJ/CSMj27UhJJYOzNCxWOp9NBNARB/6N1Ikvv9Vs6G7lZ4Dmuk +wvAWqzlomO/ctt0XmvY7N7ddIviDCQ0Z5bGJQlOWuIBR04tt7CePNzxG91q8x7FN +P8r+BSvxtGheeFiQYsC5FINYWUelL/SU8/U9sG30YLpujvjB5mqYZJtmotSqFbwl +81/bLU170OdG9n7FWp09f9yB1KlSq3hSwKBKu2bGUy2sS6w5MqEtxBHVUjLlS9oP +GQK+wr1m70rgfK/2N3HdcSqr2e2aKxnCx5wDvqB19Zq0TX5CXobEy3ohnul3Ez7a +2HBq543rdZpS9xuF2IHK6zMn5Xv0WKrODxIOnjs1mKbQzP5/6PVOejH/AnO38pCb +hoj0/zvnKQARAQABiQIfBBgBAgAJBQJWOEgWAhsMAAoJEM76yOqvF1Gde00QAJMF +OZhnPeiDFigLsqiqPGQzqSlZ5r4rQ3t6txfBYDclTq3rMqmk75bxteZHpSgMvdHF +SgqrvcyCJP5F8IRbk+J/tUb10icnl7+vsb6PfNXXflX0cIeAC9yqB3Z6RO77NoMy +HzMlw4EcNUXdmC46s+h6y74BeWWLBwYR18XgTSuw3gYpL7P0lqM2d7H6HCQMkZD/ +on9pT3lOc5k9YeM+B+Ak0nDyJGrdj6EES/ukrmq/szJhx+2zMbKU6Ds/uIRE0zuS +VUPnCy+3KPuJk+xLWtuVD2v2G0PXBrKKcgLfQzTQeGT5R/8rTt2w3ah4dXYRG5Ad +N5fIaTfjJTZGmht3pvHuucoloqMWl6DD7a3XZjWtUBMhPboAZiCmXiBWn3c26ITu +N9j4gSpl3hbWYJXjTWocGs2YyiuMRsO6Minfz5l2/iZjp8xHJ8GajuLGQES7CwGH +uShQ0hknHZmrH0d6xOhD64czgmTI2HraujWz+u31sHM1yEJgQKAtEL2AKWGSadly +/eI2rCQDEn6mIe34I04SPr/XrTpFClmUBbZBBir7KMRhB8B9ERdJElbtb4ubGZ0D +FCYpueJgVv9agvV2ONVb/K0BIevJy9v5+FbSFIQG/spkwf/71olib93iUr9tKTaE +mOMR1xJlCiQvAQYsmqwM9FHDmGJYTQE1WbVZu4gZ +=6vF7 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/anda/system/wine/stable/anda.hcl b/anda/system/wine/stable/anda.hcl new file mode 100644 index 0000000000..49b50d5736 --- /dev/null +++ b/anda/system/wine/stable/anda.hcl @@ -0,0 +1,11 @@ +project pkg { + arches = ["x86_64", "aarch64", "i386"] + rpm { + spec = "wine-stable.spec" + extra_repos = ["https://repos.fyralabs.com/terrarawhide-mesa"] + } + labels { + mock = 1 + subrepo = "extras" + } +} diff --git a/anda/system/wine/stable/update.rhai b/anda/system/wine/stable/update.rhai new file mode 100644 index 0000000000..c28c5da8e8 --- /dev/null +++ b/anda/system/wine/stable/update.rhai @@ -0,0 +1,8 @@ +let v = []; +// Only find versions ending in .0. Stable WINE always ends in .0 +for matches in find_all("[\\d.]+\\.0", get("https://dl.winehq.org/wine/source/")) { + v += matches[0].parse_float(); +} +v.dedup(); +v.sort(); +rpm.version(`${v[v.len()-1]}`); diff --git a/anda/system/wine/stable/wine-stable.spec b/anda/system/wine/stable/wine-stable.spec new file mode 100644 index 0000000000..c869ae36cf --- /dev/null +++ b/anda/system/wine/stable/wine-stable.spec @@ -0,0 +1,414 @@ +# Terra WINE Stable branch +# Based on WineHQ's WINE builds with changes for our repos and update system + +%define _lto_cflags %{nil} + +%global flavor %nil +%define compat_package terra-wine-stable +%define _prefix /usr/share/wine-stable + +# This is unfortunate but a lot of Fedora's/SUSE's hardening flags break WINE +%undefine _hardened_build + +Name: wine-stable +Version: 10.0 +Release: 2%{?dist} +Epoch: 1 +Summary: WINE Is Not An Emulator - runs MS Windows programs +License: LGPL-2.0-or-later +Group: Emulators +URL: https://www.winehq.org/ + +%define lib_major 1 +%define lib_name lib%{name}1 +%define lib_name_devel lib%{name}-devel + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%define wine %{name}64 +%define mark64 ()(64bit) +%else +%define wine %{name} +%define mark64 %{nil} +%endif +%endif + +%if 0%{?fedora} >= 40 +%define wine %{name} +%ifarch x86_64 +%define mark64 ()(64bit) +%else +%define mark64 %{nil} +%endif +%endif + +Source0: https://dl.winehq.org/wine/source/%{version}/wine-%{version}.tar.xz +Source1: https://dl.winehq.org/wine/source/%{version}/wine-%{version}.tar.xz.sign + +# Alexandres key +Source99: wine.keyring + +BuildRequires: alsa-lib-devel +BuildRequires: audiofile-devel +BuildRequires: autoconf +BuildRequires: bison +BuildRequires: coreutils +BuildRequires: cups-devel +BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: flex +BuildRequires: fontconfig-devel +BuildRequires: fontforge +BuildRequires: fontpackages-devel +BuildRequires: freeglut-devel +BuildRequires: freetype-devel +BuildRequires: gawk +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: giflib-devel +BuildRequires: gnupg2 +BuildRequires: gnutls-devel +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel +BuildRequires: icoutils +BuildRequires: ImageMagick-devel +BuildRequires: krb5-devel +BuildRequires: lcms2-devel +BuildRequires: libattr-devel +BuildRequires: libavcodec-free-devel +BuildRequires: libavformat-free-devel +BuildRequires: libavutil-free-devel +BuildRequires: libgphoto2-devel +BuildRequires: libieee1284-devel +BuildRequires: libnetapi-devel +BuildRequires: libpcap-devel +BuildRequires: librsvg2 +BuildRequires: librsvg2-devel +BuildRequires: libstdc++-devel +BuildRequires: libudev-devel +BuildRequires: libusb1-devel +BuildRequires: libv4l-devel +BuildRequires: libX11-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXcursor-devel +BuildRequires: libXext-devel +BuildRequires: libXi-devel +BuildRequires: libXinerama-devel +BuildRequires: libxkbcommon-devel +BuildRequires: libXmu-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXxf86dga-devel +BuildRequires: libXxf86vm-devel +BuildRequires: lzma +BuildRequires: mesa-compat-libOSMesa-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libGLU-devel +BuildRequires: mingw32-gcc +BuildRequires: mingw64-gcc +BuildRequires: ncurses-devel +BuildRequires: ocl-icd-devel +BuildRequires: opencl-headers +BuildRequires: pcsc-lite-devel +BuildRequires: pulseaudio-libs-devel +BuildRequires: samba-devel +BuildRequires: sane-backends-devel +BuildRequires: SDL2-devel +BuildRequires: unixODBC-devel +BuildRequires: unzip +BuildRequires: util-linux +BuildRequires: vulkan-devel +BuildRequires: xz + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%package -n %{wine} +%endif +%endif + +Summary: WINE Is Not An Emulator - runs MS Windows programs +Group: Emulators +%ifarch x86_64 +Conflicts: %{name} +%else +Conflicts: %{name}64 +%endif +%if 0%{?fedora} < 40 +Requires: %{name}-common = %{epoch}:%{version}-%{release} +%endif +Requires: %{compat_package} = %{epoch}:%{version}-%{release} +Provides: %{lib_name} = %{epoch}:%{version}-%{release} +Provides: %{name}-bin = %{epoch}:%{version}-%{release} +Obsoletes: %{lib_name} <= %{epoch}:%{version}-%{release} + +%ifarch %{ix86} +%package -n %{name}-common +Summary: WINE Is Not An Emulator - runs MS Windows programs (32-bit common files) +Group: Emulators +Requires: %{name}-bin = %{epoch}:%{version}-%{release} + +%description -n %{name}-common +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This package contains the files needed to support 32-bit Windows +programs, and is used by both %{name} and %{name}64. +%endif + +%define dlopenreq() %(F=/usr/%{_lib}/lib%{1}.so;[ -e $F ] && (file $F|grep -q ASCII && grep -o 'lib[^ ]*' $F|sed -e "s/\$/%{mark64}/"||objdump -p $F | grep SONAME | awk '{ print $2 "%{mark64}" }') || echo "wine-missing-buildrequires-on-%{1}") +Requires: %dlopenreq asound +Requires: %dlopenreq attr +Requires: %dlopenreq cups +Requires: %dlopenreq dbus-1 +Requires: %dlopenreq fontconfig +Requires: %dlopenreq freetype +Requires: %dlopenreq gnutls +Requires: %dlopenreq krb5 +Requires: %dlopenreq ncurses +Requires: %dlopenreq odbc +Requires: %dlopenreq OSMesa +Requires: %dlopenreq sane +Requires: %dlopenreq SDL2 +Requires: %dlopenreq v4l1 +Requires: %dlopenreq vulkan +Requires: %dlopenreq Xcomposite +Requires: %dlopenreq Xcursor +Requires: %dlopenreq Xi +Requires: %dlopenreq Xinerama +Requires: %dlopenreq Xrandr +Requires: %dlopenreq Xrender +Requires: %dlopenreq Xxf86vm +Suggests: sane-frontends + +Requires(post): desktop-file-utils +Requires(postun): desktop-file-utils + +%define desc Wine is a program which allows running Microsoft Windows programs \ +(including DOS, Windows 3.x and Win32 executables) on Unix. It \ +consists of a program loader which loads and executes a Microsoft \ +Windows binary, and a library (called Winelib) that implements Windows \ +API calls using their Unix or X11 equivalents. The library may also \ +be used for porting Win32 code into native Unix executables. + +%description +%desc + +%ifarch x86_64 +%description -n %{wine} +%desc +%endif + +%package -n %{wine}-devel +Summary: Static libraries and headers for %{name} (64-bit) +Group: Development/C +Requires: %{wine} = %{epoch}:%{version}-%{release} +%ifarch x86_64 +Conflicts: %{name}-devel +%else +Conflicts: %{name}64-devel +%endif +Provides: %{lib_name_devel} = %{epoch}:%{version}-%{release} +Obsoletes: %{lib_name_devel} <= %{epoch}:%{version}-%{release} +%description -n %{wine}-devel +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This package contains the libraries and header files needed to +develop programs which make use of Wine. + +%package -n %compat_package +Summary: WINE Is Not An Emulator - runs MS Windows programs +Group: Emulators +Requires: %{wine} = %{epoch}:%{version}-%{release} +%if 0%{?fedora} < 40 +Conflicts: wine wine64 wine-core wine-common wine-desktop wine-devel +%else +Conflicts: wine wine64 wine-core wine-common wine-desktop +%endif + +%description -n %compat_package +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This compatibility package allows to use %{wine} system-wide as +the default Wine version. + +%prep +# Pull key from key server, if this fails import local copy and then refresh it to make sure it is up to date +gpg --keyserver hkp://keys.gnupg.net --recv-keys CEFAC8EAAF17519D || { gpg --with-fingerprint --import %{SOURCE99} && gpg --refresh-keys; } +gpg --update-trustdb +gpg --verify --with-fingerprint %{SOURCE1} %{SOURCE0} +%setup -n wine-%{version} -q -T -b0 + +%build +# MinGW GCC does not support these options +%define debug_package %{nil} +export LDFLAGS="$(echo "%{build_ldflags}" | sed -e 's/-Wl,-z,relro//' -e 's/-Wl,--build-id=sha1//' -e 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-package-notes//')" +%ifarch x86_64 +export CFLAGS="$(echo "%{optflags}" | sed -e 's/-O2//' -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//') -O2" +%else +export CFLAGS="$(echo "%{optflags}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//')" +%endif +%configure \ + --with-gstreamer \ + --disable-tests \ +%if 0%{?fedora} >= 40 + --enable-archs=i386,x86_64 \ +%else +%ifarch x86_64 + --enable-win64 \ +%endif +%endif + --with-x +make -j4 + +%install +%makeinstall LDCONFIG=/bin/true + +# Compat symlinks for bindir +mkdir -p "%{buildroot}/usr/bin" +for _file in $(ls "%{buildroot}/%{_bindir}"); do \ + ln -s "%{_bindir}/$_file" "%{buildroot}/usr/bin/$_file"; \ +done +%if 0%{?fedora} < 40 +%ifarch x86_64 +for _file in wine wine-preloader; do \ + ln -s "%{_prefix}/bin/$_file" "%{buildroot}/usr/bin/$_file"; \ +done +%endif +%endif + +# Compat symlinks for desktop file +mkdir -p "%{buildroot}/usr/share/applications" +for _file in $(ls "%{buildroot}/%{_datadir}/applications"); do \ + ln -s "%{_datadir}/applications/$_file" "%{buildroot}/usr/share/applications/$_file"; \ +done + +# Compat manpages +%if 0%{?fedora} || 0%{?scientificlinux} || 0%{?centos} >= 700 || 0%{?rhel} >= 700 +for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \ + if [ -d "%{buildroot}/%{_mandir}/$_dir" ]; then \ + mkdir -p "$(dirname "%{buildroot}/usr/share/man/$_dir")"; \ + cp -pr "%{buildroot}/%{_mandir}/$_dir" "%{buildroot}/usr/share/man/$_dir"; \ + else \ + mkdir -p "%{buildroot}/usr/share/man/$_dir"; \ + fi; \ +done +%else +for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \ + mkdir -p "%{buildroot}/usr/share/man/$_dir"; \ +done +%endif + +%ifarch x86_64 +install -p -m 0644 loader/wine.man "%{buildroot}/usr/share/man/man1/wine.1" +install -p -m 0644 loader/wine.de.UTF-8.man "%{buildroot}/usr/share/man/de.UTF-8/man1/wine.1" +install -p -m 0644 loader/wine.fr.UTF-8.man "%{buildroot}/usr/share/man/fr.UTF-8/man1/wine.1" +install -p -m 0644 loader/wine.pl.UTF-8.man "%{buildroot}/usr/share/man/pl.UTF-8/man1/wine.1" +%endif + +%files -n %{wine} +%doc ANNOUNCE.md AUTHORS README.md +%license LICENSE + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%{_bindir}/wine64 +%{_bindir}/wine64-preloader +%endif +%endif +%{_bindir}/function_grep.pl +%{_bindir}/msiexec +%{_bindir}/msidb +%{_bindir}/notepad +%{_bindir}/regedit +%{_bindir}/regsvr32 +%{_bindir}/widl +%{_bindir}/wineboot +%{_bindir}/winebuild +%{_bindir}/winecfg +%{_bindir}/wineconsole* +%{_bindir}/winecpp +%{_bindir}/winedbg +%{_bindir}/winedump +%{_bindir}/winefile +%{_bindir}/wineg++ +%{_bindir}/winegcc +%{_bindir}/winemaker +%{_bindir}/winemine +%{_bindir}/winepath +%{_bindir}/wineserver +%{_bindir}/wmc +%{_bindir}/wrc +%lang(de) %{_mandir}/de.UTF-8/man?/winemaker.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wineserver.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/winemaker.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wineserver.?* +%{_mandir}/man?/widl.1* +%{_mandir}/man?/winebuild.1* +%{_mandir}/man?/winecpp.1* +%{_mandir}/man?/winedbg.1* +%{_mandir}/man?/winedump.1* +%{_mandir}/man?/wineg++.1* +%{_mandir}/man?/winegcc.1* +%{_mandir}/man?/winemaker.1* +%{_mandir}/man?/wmc.1* +%{_mandir}/man?/wrc.1* +%{_mandir}/man?/msiexec.?* +%{_mandir}/man?/notepad.?* +%{_mandir}/man?/regedit.?* +%{_mandir}/man?/regsvr32.?* +%{_mandir}/man?/wineboot.?* +%{_mandir}/man?/winecfg.?* +%{_mandir}/man?/wineconsole.?* +%{_mandir}/man?/winefile.?* +%{_mandir}/man?/winemine.?* +%{_mandir}/man?/winepath.?* +%{_mandir}/man?/wineserver.?* +%dir %{_datadir}/wine +%{_datadir}/wine/wine.inf +%{_datadir}/wine/nls/*.nls +%{_datadir}/applications/*.desktop +%dir %{_datadir}/wine/fonts +%{_datadir}/wine/fonts/* + +%if 0%{?fedora} < 40 +%ifarch %{ix86} +%files -n %{name}-common +%{_bindir}/wine +%{_bindir}/wine-preloader +%{_mandir}/man?/wine.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wine.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?* +%lang(pl) %{_mandir}/pl.UTF-8/man?/wine.?* +%endif +%else +%{_bindir}/wine +%{_bindir}/wine-preloader +%{_mandir}/man?/wine.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wine.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?* +%lang(pl) %{_mandir}/pl.UTF-8/man?/wine.?* +%endif + +%if 0%{?fedora} < 40 +%ifarch %ix86 x86_64 +%{_libdir}/wine/%{_arch}-unix/*.* +%{_libdir}/wine/%{_arch}-windows/*.* +%endif +%else +%{_libdir}/wine/%{_arch}-unix/* +%{_libdir}/wine/i386-windows/*.* +%{_libdir}/wine/x86_64-windows/*.* +%endif + +%files -n %{wine}-devel +%{_includedir}/* + +%files -n %compat_package +/usr/bin/* +/usr/share/applications/*.desktop +/usr/share/man/man?/* +%lang(de) /usr/share/man/de.UTF-8/man?/* +%lang(fr) /usr/share/man/fr.UTF-8/man?/* +%lang(pl) /usr/share/man/pl.UTF-8/man?/* diff --git a/anda/system/wine/stable/wine.keyring b/anda/system/wine/stable/wine.keyring new file mode 100644 index 0000000000..1b658e615b --- /dev/null +++ b/anda/system/wine/stable/wine.keyring @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFY4SBYBEAC11sh4AMhIhiLxj76FXsluVJIU4nZjVmexar+/5WMlVvMX+Dxk +lUbKDCBOUMtPFsAXMpcxOGwscCr3WMuI8WszTjKDs3mdQ37o/pzXMbRhY0oZV29Z +EhNLds14qhMLlQiDEm5lJ5bOsLevHJ9hR4wvwY6UR881xsiXsNU+iNMRP0cWeRjQ +84pSCLOt9i+D8rdllVob871gN/tjY4Ll13Tg7qmtFE1YEFJaLb2yik0bO7gPkig/ +ADmKMBhOtgAHU9i+gmtP+x+agk7cbXkR06Pd9VBkd9nYlFXbR+zcE15AqauEF1Y2 +V9RbW/Ewt4Fmgr+QQnJhiSMO2BUTS2Q0CC3LznB9QOdEriUmeXGJdim0OJiwYDDX +4CNRk+2CAePbrZnGv+YXgeNPHvFa0Baj73HP8Ptok+OeyWIenRPHG3Ni+O5p1n5k +QK0bHqIwChMtAJvzdoC77XIJhbCtStmvo2FdSA8YcG4stlz+Wk1ZtNMen83ZEscS +OXEVpxcPGlbmWmkWj8DF5zbB1dRdh4T6LLM4nZViBu7oGD76z3c/x2zc7l3pyVHx +Cw70a+r+6LvUwnvCiApCBS72uDc4zZtnkNUQHlXHkz9wEeYUtUB0wkCYWPZy7BZy +0aFfKWK4Jg7uGx/mdHRCJ35MdXWxeQ4yPUE+tF951s167ANr1+ayt87pQwARAQAB +tChBbGV4YW5kcmUgSnVsbGlhcmQgPGp1bGxpYXJkQHdpbmVocS5vcmc+iQI3BBMB +AgAhAhsDAh4BAheABQJWOEvIBQsJCAcDBRUKCQgLBRYCAwEAAAoJEM76yOqvF1Gd +UqkQAJw6ot97efCon6qMA7ctJTqhOvnPSxf430aZgaTuNBEfY3RPeWC+k11cTvKV +dny9xwC+N8U2Jfdd0iXqlwUdM4ThOKZCXGOykCHJmrYGPqWsjGKUO7EoMwJB00qi +nOJdgj7zWLb6MuuKx2eavGYVLCFG4sQ8fjX0+sxuD+Cl++UyS9+t/C3ijeXTxaZn +qSLFKUFzyngXIUhFxMLkUdh397WeTaBtUTyLT0lwOKTllxIyC/+t2e9QcfgdLE/q +wKmRjihNq6I5JOQfO8JynUoR8WzKQaCX5VL6ZPaQa8ZzUdS/h0WlMlQuD5mrcDBa +ZQjqPEIL6/oExk1a7yeQFKNKisq94rVF0Ly1o7w+n+7X4lT9T9zhiPKVXvlxHB0h +SeJm4j/qDq1DSiGVfIR2CChObyeHAZhQZMMr/Ni9XtqzHsd2qhcP1ZYvbQZ2UK/N +Lv398VY/f+kXApFMDQLj1jGA8aXbkE8ChIAiZAAzVMg2wJ2x5/7bImbICsvGSwfx +awlsHzc7CR0Pj2Kdgr7UtsDk+cBRQMEqAIGWiCOKnBD8eoNGaiCoLHI/3ce4dJ/y +pXFtJSkJa8wpK4+xdckAvtPQZgOV5gLCJqNqEF+8aIjsTwwu7dcIXG2qLHD5C5tq +viuZtOYO7UdQbIHuYY5Xy8/W7hQRfIaq1NfKf9qJx4hrCWLviEYEEBECAAYFAlY4 +S3QACgkQ9ebp7rlGHdcg6ACfXNdYTmPe1Ej0rd+eO+yuDF/kwccAoItuIMi7EXu0 +FR4Ui8cBaZI3hweFuQINBFY4SBYBEAD7ZonYuSKxToJ4plL22rv4wPPbqACcLbIG +5t3s/Gb3/twOtaCgOEFhzNv+8K87jX6iSHJYeGhu7e2eRxeGHkrqliNJoHUi9Ddu +ygHqhoNmSHNSqI36/TU5yCRArKS3wwq7cafGnncdVOLBYfj497IxGK8fANhDf7TV +vqUGIb06gkpWbrwmUWgV8pk7MHgL93T5Ph+KSgdEbOSePFwQb9piyp9vWNmZnqK2 +9TFNtTULGtQa0y8ZCNSSEh4YP/DxDraq1OJ2Gh3WHSQ4f2hfGXJMzr4cyIrOJHQ8 +mby6xHmvldsAGsZJ/CSMj27UhJJYOzNCxWOp9NBNARB/6N1Ikvv9Vs6G7lZ4Dmuk +wvAWqzlomO/ctt0XmvY7N7ddIviDCQ0Z5bGJQlOWuIBR04tt7CePNzxG91q8x7FN +P8r+BSvxtGheeFiQYsC5FINYWUelL/SU8/U9sG30YLpujvjB5mqYZJtmotSqFbwl +81/bLU170OdG9n7FWp09f9yB1KlSq3hSwKBKu2bGUy2sS6w5MqEtxBHVUjLlS9oP +GQK+wr1m70rgfK/2N3HdcSqr2e2aKxnCx5wDvqB19Zq0TX5CXobEy3ohnul3Ez7a +2HBq543rdZpS9xuF2IHK6zMn5Xv0WKrODxIOnjs1mKbQzP5/6PVOejH/AnO38pCb +hoj0/zvnKQARAQABiQIfBBgBAgAJBQJWOEgWAhsMAAoJEM76yOqvF1Gde00QAJMF +OZhnPeiDFigLsqiqPGQzqSlZ5r4rQ3t6txfBYDclTq3rMqmk75bxteZHpSgMvdHF +SgqrvcyCJP5F8IRbk+J/tUb10icnl7+vsb6PfNXXflX0cIeAC9yqB3Z6RO77NoMy +HzMlw4EcNUXdmC46s+h6y74BeWWLBwYR18XgTSuw3gYpL7P0lqM2d7H6HCQMkZD/ +on9pT3lOc5k9YeM+B+Ak0nDyJGrdj6EES/ukrmq/szJhx+2zMbKU6Ds/uIRE0zuS +VUPnCy+3KPuJk+xLWtuVD2v2G0PXBrKKcgLfQzTQeGT5R/8rTt2w3ah4dXYRG5Ad +N5fIaTfjJTZGmht3pvHuucoloqMWl6DD7a3XZjWtUBMhPboAZiCmXiBWn3c26ITu +N9j4gSpl3hbWYJXjTWocGs2YyiuMRsO6Minfz5l2/iZjp8xHJ8GajuLGQES7CwGH +uShQ0hknHZmrH0d6xOhD64czgmTI2HraujWz+u31sHM1yEJgQKAtEL2AKWGSadly +/eI2rCQDEn6mIe34I04SPr/XrTpFClmUBbZBBir7KMRhB8B9ERdJElbtb4ubGZ0D +FCYpueJgVv9agvV2ONVb/K0BIevJy9v5+FbSFIQG/spkwf/71olib93iUr9tKTaE +mOMR1xJlCiQvAQYsmqwM9FHDmGJYTQE1WbVZu4gZ +=6vF7 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/anda/system/wine/staging/anda.hcl b/anda/system/wine/staging/anda.hcl new file mode 100644 index 0000000000..4e0642affd --- /dev/null +++ b/anda/system/wine/staging/anda.hcl @@ -0,0 +1,11 @@ +project pkg { + arches = ["x86_64", "aarch64", "i386"] + rpm { + spec = "wine-staging.spec" + extra_repos = ["https://repos.fyralabs.com/terrarawhide-mesa"] + } + labels { + mock = 1 + subrepo = "extras" + } +} diff --git a/anda/system/wine/staging/update.rhai b/anda/system/wine/staging/update.rhai new file mode 100644 index 0000000000..ddfc756bc5 --- /dev/null +++ b/anda/system/wine/staging/update.rhai @@ -0,0 +1,12 @@ +let v = (gitlab_tag("gitlab.winehq.org", "231")); +v.crop(1); +rpm.version(v); +if rpm.changed () { + rpm.release(); + // Only find versions ending in .x (point releases). Staging is always point releases. + let matches = (find_all("[\\d.]+\\.x", get("https://dl.winehq.org/wine/source/"))); + matches.dedup(); + let s = sh(`echo ${matches} | sed 's/,//g;s/\[//g;s/\]//g;s/"//g' | tr ' ' '\n' | sort -nr | tr '\n' ' '`, #{"stdout": "piped"}).ctx.stdout; + s.truncate(4); + rpm.global("srcmajor", s); +} diff --git a/anda/system/wine/staging/wine-staging.spec b/anda/system/wine/staging/wine-staging.spec new file mode 100644 index 0000000000..5bc64a85bf --- /dev/null +++ b/anda/system/wine/staging/wine-staging.spec @@ -0,0 +1,418 @@ +# Terra WINE Staging branch +# Based on WineHQ's WINE builds with changes for our repos and update system + +# Gonna be real man, WINE is a mess +%global _default_patch_fuzz 2 +# This is unfortunate but a lot of Fedora's/SUSE's hardening flags break WINE +%define _lto_cflags %{nil} + +%global flavor %nil +# I love MinGW +%global build_type_safety_c 0 + +%define compat_package terra-wine-staging +%define _prefix /usr/share/wine-staging +%undefine _hardened_build + +%global srcmajor 10.x + + +Name: wine-staging +Version: 10.13 +Release: 1%?dist +Epoch: 1 +Summary: WINE Is Not An Emulator - runs MS Windows programs +License: LGPL-2.0-or-later +Group: Emulators +URL: https://www.winehq.org + +%define lib_major 1 +%define lib_name lib%{name}1 +%define lib_name_devel lib%{name}-devel + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%define wine %{name}64 +%define mark64 ()(64bit) +%else +%define wine %{name} +%define mark64 %{nil} +%endif +%endif + +%if 0%{?fedora} >= 40 +%define wine %{name} +%ifarch x86_64 +%define mark64 ()(64bit) +%else +%define mark64 %{nil} +%endif +%endif + +Source0: https://dl.winehq.org/wine/source/%{srcmajor}/wine-%{version}.tar.xz +Source1: https://dl.winehq.org/wine/source/%{srcmajor}/wine-%{version}.tar.xz.sign + +# The official GitLab repo containing the patches does not appear to be downloadable so we have to download them from the mirror. What +Source100: https://github.com/wine-staging/wine-staging/archive/v%{version}.tar.gz#/wine-staging-%{version}.tar.xz + +# Alexandres key +Source99: wine.keyring + +BuildRequires: alsa-lib-devel +BuildRequires: audiofile-devel +BuildRequires: autoconf +BuildRequires: bison +BuildRequires: coreutils +BuildRequires: cups-devel +BuildRequires: dbus-devel +BuildRequires: desktop-file-utils +BuildRequires: flex +BuildRequires: fontconfig-devel +BuildRequires: fontforge +BuildRequires: fontpackages-devel +BuildRequires: freeglut-devel +BuildRequires: freetype-devel +BuildRequires: gawk +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: giflib-devel +BuildRequires: gnupg2 +BuildRequires: gnutls-devel +BuildRequires: gstreamer1-devel +BuildRequires: gstreamer1-plugins-base-devel +BuildRequires: gtk3-devel +BuildRequires: icoutils +BuildRequires: ImageMagick-devel +BuildRequires: krb5-devel +BuildRequires: libattr-devel +BuildRequires: libavcodec-free-devel +BuildRequires: libavformat-free-devel +BuildRequires: libavutil-free-devel +BuildRequires: libgcrypt-devel +BuildRequires: libgphoto2-devel +BuildRequires: libieee1284-devel +BuildRequires: libnetapi-devel +BuildRequires: libpcap-devel +BuildRequires: librsvg2 +BuildRequires: librsvg2-devel +BuildRequires: libstdc++-devel +BuildRequires: libudev-devel +BuildRequires: libusb1-devel +BuildRequires: libv4l-devel +BuildRequires: libva-devel +BuildRequires: libX11-devel +BuildRequires: libXcomposite-devel +BuildRequires: libXcursor-devel +BuildRequires: libXext-devel +BuildRequires: libXi-devel +BuildRequires: libXinerama-devel +BuildRequires: libxkbcommon-devel +BuildRequires: libXmu-devel +BuildRequires: libXrandr-devel +BuildRequires: libXrender-devel +BuildRequires: libXxf86dga-devel +BuildRequires: libXxf86vm-devel +BuildRequires: lzma +BuildRequires: mesa-compat-libOSMesa-devel +BuildRequires: mesa-libGL-devel +BuildRequires: mesa-libGLU-devel +BuildRequires: mingw32-gcc +BuildRequires: mingw64-gcc +BuildRequires: ncurses-devel +BuildRequires: ocl-icd-devel +BuildRequires: opencl-headers +BuildRequires: pcsc-lite-devel +BuildRequires: pulseaudio-libs-devel +BuildRequires: samba-devel +BuildRequires: sane-backends-devel +BuildRequires: SDL2-devel +BuildRequires: unixODBC-devel +BuildRequires: unzip +BuildRequires: util-linux +BuildRequires: vulkan-devel +BuildRequires: xz + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%package -n %{wine} +%endif +%endif + +Summary: WINE Is Not An Emulator - runs MS Windows programs +Group: Emulators +%ifarch x86_64 +Conflicts: %{name} +%else +Conflicts: %{name}64 +%endif +%if 0%{?fedora} < 40 +Requires: %{name}-common = %{epoch}:%{version}-%{release} +%endif +Requires: %{compat_package} = %{epoch}:%{version}-%{release} +Provides: %{lib_name} = %{epoch}:%{version}-%{release} +Obsoletes: %{lib_name} <= %{epoch}:%{version}-%{release} +Provides: %{name}-bin = %{epoch}:%{version}-%{release} + +%ifarch %{ix86} +%package -n %{name}-common +Summary: WINE Is Not An Emulator - runs MS Windows programs (32-bit common files) +Group: Emulators +Requires: %{name}-bin = %{epoch}:%{version}-%{release} + +%description -n %{name}-common +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This package contains the files needed to support 32-bit Windows +programs, and is used by both %{name} and %{name}64. +%endif + +%define dlopenreq() %(F=/usr/%{_lib}/lib%{1}.so;[ -e $F ] && (file $F|grep -q ASCII && grep -o 'lib[^ ]*' $F|sed -e "s/\$/%{mark64}/"||objdump -p $F | grep SONAME | awk '{ print $2 "%{mark64}" }') || echo "wine-missing-buildrequires-on-%{1}") +Requires: %dlopenreq asound +Requires: %dlopenreq attr +Requires: %dlopenreq cups +Requires: %dlopenreq dbus-1 +Requires: %dlopenreq fontconfig +Requires: %dlopenreq freetype +Requires: %dlopenreq gnutls +Requires: %dlopenreq krb5 +Requires: %dlopenreq ncurses +Requires: %dlopenreq odbc +Requires: %dlopenreq OSMesa +Requires: %dlopenreq sane +Requires: %dlopenreq SDL2 +Requires: %dlopenreq v4l1 +Requires: %dlopenreq vulkan +Requires: %dlopenreq Xcomposite +Requires: %dlopenreq Xcursor +Requires: %dlopenreq Xi +Requires: %dlopenreq Xinerama +Requires: %dlopenreq Xrandr +Requires: %dlopenreq Xrender +Requires: %dlopenreq Xxf86vm +%if 0%{?fedora} +Suggests: sane-frontends +%endif +Requires(post): desktop-file-utils +Requires(postun): desktop-file-utils + +%define desc Wine is a program which allows running Microsoft Windows programs \ +(including DOS, Windows 3.x and Win32 executables) on Unix. It \ +consists of a program loader which loads and executes a Microsoft \ +Windows binary, and a library (called Winelib) that implements Windows \ +API calls using their Unix or X11 equivalents. The library may also \ +be used for porting Win32 code into native Unix executables. + +%description +%desc + +%ifarch x86_64 +%description -n %{wine} +%desc +%endif + +%package -n %{wine}-devel +Summary: Static libraries and headers for %{name} (64-bit) +Group: Development/C +Requires: %{wine} = %{epoch}:%{version}-%{release} +%ifarch x86_64 +Conflicts: %{name}-devel +%else +Conflicts: %{name}64-devel +%endif +Provides: %{lib_name_devel} = %{epoch}:%{version}-%{release} +Obsoletes: %{lib_name_devel} <= %{epoch}:%{version}-%{release} +%description -n %{wine}-devel +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This package contains the libraries and header files needed to +develop programs which make use of Wine. + +%package -n %compat_package +Summary: WINE Is Not An Emulator - runs MS Windows programs +Group: Emulators +Requires: %{wine} = %{epoch}:%{version}-%{release} +Conflicts: wine wine64 wine-core wine-common wine-desktop wine-devel + +%description -n %compat_package +Wine is a program which allows running Microsoft Windows programs +(including DOS, Windows 3.x and Win32 executables) on Unix. + +This compatibility package allows to use %{wine} system-wide as +the default Wine version. + +%prep +# Pull key from key server, if this fails import local copy and then refresh it to make sure it is up to date +gpg --keyserver hkp://keys.gnupg.net --recv-keys CEFAC8EAAF17519D || { gpg --with-fingerprint --import %{SOURCE99} && gpg --refresh-keys; } +gpg --update-trustdb +gpg --verify --with-fingerprint %{SOURCE1} %{SOURCE0} +%setup -n wine-%{version} -q -T -b0 + +# apply wine staging patch set on top of the wine release. +tar xf %{SOURCE100} +./wine-staging-%{version}/staging/patchinstall.py --all -W shell32-IconCache -W server-Stored_ACLs + +%build +# MinGW GCC does not support these options +%define debug_package %{nil} +export LDFLAGS="$(echo "%{build_ldflags}" | sed -e 's/-Wl,-z,relro//' -e 's/-Wl,--build-id=sha1//' -e 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-package-notes//')" +%ifarch x86_64 +export CFLAGS="$(echo "%{optflags}" | sed -e 's/-O2//' -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//') -O2" +%else +export CFLAGS="$(echo "%{optflags}" | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//' -e 's/-fcf-protection//' -e 's/-fstack-protector-strong//' -e 's/-fstack-clash-protection//')" +%endif +autoreconf -i -f +%configure \ + --with-gstreamer \ + --disable-tests \ + --with-xattr \ + --enable-archs=i386,x86_64 \ + --with-x + +make -j4 + +%install +%makeinstall LDCONFIG=/bin/true + +# Compat symlinks for bindir +mkdir -p "%{buildroot}/usr/bin" +for _file in $(ls "%{buildroot}%{_bindir}"); do \ + ln -s "%{_bindir}/$_file" "%{buildroot}/usr/bin/$_file"; \ +done + +# Compat symlinks for desktop file +mkdir -p "%{buildroot}/usr/share/applications" +for _file in $(ls "%{buildroot}/%{_datadir}/applications"); do \ + ln -s "%{_datadir}/applications/$_file" "%{buildroot}/usr/share/applications/$_file"; \ +done + +# Compat manpages +%if 0%{?fedora} || 0%{?scientificlinux} || 0%{?centos} >= 700 || 0%{?rhel} >= 700 +for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \ + if [ -d "%{buildroot}/%{_mandir}/$_dir" ]; then \ + mkdir -p "$(dirname "%{buildroot}/usr/share/man/$_dir")"; \ + cp -pr "%{buildroot}/%{_mandir}/$_dir" "%{buildroot}/usr/share/man/$_dir"; \ + else \ + mkdir -p "%{buildroot}/usr/share/man/$_dir"; \ + fi; \ +done +%else +for _dir in man1 de.UTF-8/man1 fr.UTF-8/man1 pl.UTF-8/man1; do \ + mkdir -p "%{buildroot}/usr/share/man/$_dir"; \ +done +%endif + +%ifarch x86_64 +#install -p -m 0644 loader/wine.man "%{buildroot}/usr/share/man/man1/wine.1" +#install -p -m 0644 loader/wine.de.UTF-8.man "%{buildroot}/usr/share/man/de.UTF-8/man1/wine.1" +#install -p -m 0644 loader/wine.fr.UTF-8.man "%{buildroot}/usr/share/man/fr.UTF-8/man1/wine.1" +#install -p -m 0644 loader/wine.pl.UTF-8.man "%{buildroot}/usr/share/man/pl.UTF-8/man1/wine.1" +%endif + +%files -n %{wine} +%doc ANNOUNCE.md AUTHORS README.md +%license LICENSE + +%if 0%{?fedora} < 40 +%ifarch x86_64 +%{_bindir}/wine64 +%{_bindir}/wine64-preloader +%endif +%endif +%{_bindir}/function_grep.pl +%{_bindir}/msidb +%{_bindir}/msiexec +%{_bindir}/notepad +%{_bindir}/regedit +%{_bindir}/regsvr32 +%{_bindir}/widl +%{_bindir}/wineboot +%{_bindir}/winebuild +%{_bindir}/winecfg +%{_bindir}/wineconsole* +%{_bindir}/winecpp +%{_bindir}/winedbg +%{_bindir}/winedump +%{_bindir}/winefile +%{_bindir}/wineg++ +%{_bindir}/winegcc +%{_bindir}/winemaker +%{_bindir}/winemine +%{_bindir}/winepath +%{_bindir}/wineserver +%{_bindir}/wmc +%{_bindir}/wrc +%lang(de) %{_mandir}/de.UTF-8/man?/winemaker.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wineserver.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/winemaker.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wineserver.?* +%{_mandir}/man?/widl.1* +%{_mandir}/man?/winebuild.1* +%{_mandir}/man?/winecpp.1* +%{_mandir}/man?/winedbg.1* +%{_mandir}/man?/winedump.1* +%{_mandir}/man?/wineg++.1* +%{_mandir}/man?/winegcc.1* +%{_mandir}/man?/winemaker.1* +%{_mandir}/man?/wmc.1* +%{_mandir}/man?/wrc.1* +%{_mandir}/man?/msiexec.?* +%{_mandir}/man?/notepad.?* +%{_mandir}/man?/regedit.?* +%{_mandir}/man?/regsvr32.?* +%{_mandir}/man?/wineboot.?* +%{_mandir}/man?/winecfg.?* +%{_mandir}/man?/wineconsole.?* +%{_mandir}/man?/winefile.?* +%{_mandir}/man?/winemine.?* +%{_mandir}/man?/winepath.?* +%{_mandir}/man?/wineserver.?* +%dir %{_datadir}/wine +%{_datadir}/wine/wine.inf +%{_datadir}/wine/nls/*.nls +%{_datadir}/applications/*.desktop +%dir %{_datadir}/wine/fonts +%{_datadir}/wine/fonts/* +# %{_datadir}/wine/color/* + +%if 0%{?fedora} < 40 +%ifarch %{ix86} +%files -n %{name}-common +%{_bindir}/wine +%{_bindir}/wine-preloader +%{_mandir}/man?/wine.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wine.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?* +%lang(pl) %{_mandir}/pl.UTF-8/man?/wine.?* +%endif +%else +%{_bindir}/wine +#%{_bindir}/wine-preloader +%{_mandir}/man?/wine.?* +%lang(de) %{_mandir}/de.UTF-8/man?/wine.?* +%lang(fr) %{_mandir}/fr.UTF-8/man?/wine.?* +%lang(pl) %{_mandir}/pl.UTF-8/man?/wine.?* +%endif + +%if 0%{?fedora} < 40 +%ifarch %ix86 x86_64 +%{_libdir}/wine/%{_arch}-unix/*.* +%{_libdir}/wine/%{_arch}-windows/*.* +%endif +%else +%{_libdir}/wine/%{_arch}-unix/* +%{_libdir}/wine/i386-windows/*.* +%{_libdir}/wine/x86_64-windows/*.* +%endif + +%files -n %{wine}-devel +%{_includedir}/* + +%files -n %compat_package +/usr/bin/* +/usr/share/applications/*.desktop +/usr/share/man/man?/* +%lang(de) /usr/share/man/de.UTF-8/man?/* +%lang(fr) /usr/share/man/fr.UTF-8/man?/* +%lang(pl) /usr/share/man/pl.UTF-8/man?/* diff --git a/anda/system/wine/staging/wine.keyring b/anda/system/wine/staging/wine.keyring new file mode 100644 index 0000000000..1b658e615b --- /dev/null +++ b/anda/system/wine/staging/wine.keyring @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFY4SBYBEAC11sh4AMhIhiLxj76FXsluVJIU4nZjVmexar+/5WMlVvMX+Dxk +lUbKDCBOUMtPFsAXMpcxOGwscCr3WMuI8WszTjKDs3mdQ37o/pzXMbRhY0oZV29Z +EhNLds14qhMLlQiDEm5lJ5bOsLevHJ9hR4wvwY6UR881xsiXsNU+iNMRP0cWeRjQ +84pSCLOt9i+D8rdllVob871gN/tjY4Ll13Tg7qmtFE1YEFJaLb2yik0bO7gPkig/ +ADmKMBhOtgAHU9i+gmtP+x+agk7cbXkR06Pd9VBkd9nYlFXbR+zcE15AqauEF1Y2 +V9RbW/Ewt4Fmgr+QQnJhiSMO2BUTS2Q0CC3LznB9QOdEriUmeXGJdim0OJiwYDDX +4CNRk+2CAePbrZnGv+YXgeNPHvFa0Baj73HP8Ptok+OeyWIenRPHG3Ni+O5p1n5k +QK0bHqIwChMtAJvzdoC77XIJhbCtStmvo2FdSA8YcG4stlz+Wk1ZtNMen83ZEscS +OXEVpxcPGlbmWmkWj8DF5zbB1dRdh4T6LLM4nZViBu7oGD76z3c/x2zc7l3pyVHx +Cw70a+r+6LvUwnvCiApCBS72uDc4zZtnkNUQHlXHkz9wEeYUtUB0wkCYWPZy7BZy +0aFfKWK4Jg7uGx/mdHRCJ35MdXWxeQ4yPUE+tF951s167ANr1+ayt87pQwARAQAB +tChBbGV4YW5kcmUgSnVsbGlhcmQgPGp1bGxpYXJkQHdpbmVocS5vcmc+iQI3BBMB +AgAhAhsDAh4BAheABQJWOEvIBQsJCAcDBRUKCQgLBRYCAwEAAAoJEM76yOqvF1Gd +UqkQAJw6ot97efCon6qMA7ctJTqhOvnPSxf430aZgaTuNBEfY3RPeWC+k11cTvKV +dny9xwC+N8U2Jfdd0iXqlwUdM4ThOKZCXGOykCHJmrYGPqWsjGKUO7EoMwJB00qi +nOJdgj7zWLb6MuuKx2eavGYVLCFG4sQ8fjX0+sxuD+Cl++UyS9+t/C3ijeXTxaZn +qSLFKUFzyngXIUhFxMLkUdh397WeTaBtUTyLT0lwOKTllxIyC/+t2e9QcfgdLE/q +wKmRjihNq6I5JOQfO8JynUoR8WzKQaCX5VL6ZPaQa8ZzUdS/h0WlMlQuD5mrcDBa +ZQjqPEIL6/oExk1a7yeQFKNKisq94rVF0Ly1o7w+n+7X4lT9T9zhiPKVXvlxHB0h +SeJm4j/qDq1DSiGVfIR2CChObyeHAZhQZMMr/Ni9XtqzHsd2qhcP1ZYvbQZ2UK/N +Lv398VY/f+kXApFMDQLj1jGA8aXbkE8ChIAiZAAzVMg2wJ2x5/7bImbICsvGSwfx +awlsHzc7CR0Pj2Kdgr7UtsDk+cBRQMEqAIGWiCOKnBD8eoNGaiCoLHI/3ce4dJ/y +pXFtJSkJa8wpK4+xdckAvtPQZgOV5gLCJqNqEF+8aIjsTwwu7dcIXG2qLHD5C5tq +viuZtOYO7UdQbIHuYY5Xy8/W7hQRfIaq1NfKf9qJx4hrCWLviEYEEBECAAYFAlY4 +S3QACgkQ9ebp7rlGHdcg6ACfXNdYTmPe1Ej0rd+eO+yuDF/kwccAoItuIMi7EXu0 +FR4Ui8cBaZI3hweFuQINBFY4SBYBEAD7ZonYuSKxToJ4plL22rv4wPPbqACcLbIG +5t3s/Gb3/twOtaCgOEFhzNv+8K87jX6iSHJYeGhu7e2eRxeGHkrqliNJoHUi9Ddu +ygHqhoNmSHNSqI36/TU5yCRArKS3wwq7cafGnncdVOLBYfj497IxGK8fANhDf7TV +vqUGIb06gkpWbrwmUWgV8pk7MHgL93T5Ph+KSgdEbOSePFwQb9piyp9vWNmZnqK2 +9TFNtTULGtQa0y8ZCNSSEh4YP/DxDraq1OJ2Gh3WHSQ4f2hfGXJMzr4cyIrOJHQ8 +mby6xHmvldsAGsZJ/CSMj27UhJJYOzNCxWOp9NBNARB/6N1Ikvv9Vs6G7lZ4Dmuk +wvAWqzlomO/ctt0XmvY7N7ddIviDCQ0Z5bGJQlOWuIBR04tt7CePNzxG91q8x7FN +P8r+BSvxtGheeFiQYsC5FINYWUelL/SU8/U9sG30YLpujvjB5mqYZJtmotSqFbwl +81/bLU170OdG9n7FWp09f9yB1KlSq3hSwKBKu2bGUy2sS6w5MqEtxBHVUjLlS9oP +GQK+wr1m70rgfK/2N3HdcSqr2e2aKxnCx5wDvqB19Zq0TX5CXobEy3ohnul3Ez7a +2HBq543rdZpS9xuF2IHK6zMn5Xv0WKrODxIOnjs1mKbQzP5/6PVOejH/AnO38pCb +hoj0/zvnKQARAQABiQIfBBgBAgAJBQJWOEgWAhsMAAoJEM76yOqvF1Gde00QAJMF +OZhnPeiDFigLsqiqPGQzqSlZ5r4rQ3t6txfBYDclTq3rMqmk75bxteZHpSgMvdHF +SgqrvcyCJP5F8IRbk+J/tUb10icnl7+vsb6PfNXXflX0cIeAC9yqB3Z6RO77NoMy +HzMlw4EcNUXdmC46s+h6y74BeWWLBwYR18XgTSuw3gYpL7P0lqM2d7H6HCQMkZD/ +on9pT3lOc5k9YeM+B+Ak0nDyJGrdj6EES/ukrmq/szJhx+2zMbKU6Ds/uIRE0zuS +VUPnCy+3KPuJk+xLWtuVD2v2G0PXBrKKcgLfQzTQeGT5R/8rTt2w3ah4dXYRG5Ad +N5fIaTfjJTZGmht3pvHuucoloqMWl6DD7a3XZjWtUBMhPboAZiCmXiBWn3c26ITu +N9j4gSpl3hbWYJXjTWocGs2YyiuMRsO6Minfz5l2/iZjp8xHJ8GajuLGQES7CwGH +uShQ0hknHZmrH0d6xOhD64czgmTI2HraujWz+u31sHM1yEJgQKAtEL2AKWGSadly +/eI2rCQDEn6mIe34I04SPr/XrTpFClmUBbZBBir7KMRhB8B9ERdJElbtb4ubGZ0D +FCYpueJgVv9agvV2ONVb/K0BIevJy9v5+FbSFIQG/spkwf/71olib93iUr9tKTaE +mOMR1xJlCiQvAQYsmqwM9FHDmGJYTQE1WbVZu4gZ +=6vF7 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/anda/system/wineasio/wineasio.spec b/anda/system/wineasio/wineasio.spec index bec7cf4402..8e53957c20 100644 --- a/anda/system/wineasio/wineasio.spec +++ b/anda/system/wineasio/wineasio.spec @@ -1,6 +1,6 @@ Name: wineasio -%global tag v1.2.0 +%global tag v1.3.0 # macro to remove the v from version %global version_tag %(echo %{tag} | sed 's/^v//') %global forgeurl https://github.com/wineasio/%{name} diff --git a/anda/system/wl-kmod/anda.hcl b/anda/system/wl-kmod/anda.hcl index 41761c4b5a..4cf6bbe5f9 100644 --- a/anda/system/wl-kmod/anda.hcl +++ b/anda/system/wl-kmod/anda.hcl @@ -1,5 +1,5 @@ project pkg { - arches = ["x86_64", "i386"] + arches = ["x86_64"] rpm { spec = "wl-kmod.spec" } diff --git a/anda/system/wl-kmod/wl-kmod-029_kernel_6.13_adaptation.patch b/anda/system/wl-kmod/wl-kmod-029_kernel_6.13_adaptation.patch new file mode 100644 index 0000000000..6aa3b46a61 --- /dev/null +++ b/anda/system/wl-kmod/wl-kmod-029_kernel_6.13_adaptation.patch @@ -0,0 +1,30 @@ +From d38877279728c4e5711ae4dd373486bf2148ee48 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= +Date: Tue, 17 Dec 2024 20:19:49 +0100 +Subject: [PATCH] linuxver.h: net/lib80211.h dropped from includes for kernel + >= 6.13.x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Nicolas Viéville +--- + src/include/linuxver.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/include/linuxver.h b/src/include/linuxver.h +index b05bc32..bbe1d3c 100644 +--- a/src/include/linuxver.h ++++ b/src/include/linuxver.h +@@ -147,7 +147,7 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs); + #include + #endif + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) && LINUX_VERSION_CODE < KERNEL_VERSION(6, 13, 0) + #include + #endif + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) +-- +2.47.1 + diff --git a/anda/system/wl-kmod/wl-kmod-030_kernel_6.14_adaptation.patch b/anda/system/wl-kmod/wl-kmod-030_kernel_6.14_adaptation.patch new file mode 100644 index 0000000000..cd032e9b60 --- /dev/null +++ b/anda/system/wl-kmod/wl-kmod-030_kernel_6.14_adaptation.patch @@ -0,0 +1,46 @@ +From 5c323385615ec555d628fd0dd2ae532ec91a0556 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Nicolas=20Vi=C3=A9ville?= +Date: Fri, 7 Feb 2025 20:39:02 +0100 +Subject: [PATCH] wl_cfg80211_hybrid.c: new parameter for get_tx_power + introduced in "wifi: cfg80211: send MLO links tx power info in GET_INTERFACE" + for kernel >= 6.14.x +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Nicolas Viéville +--- + src/wl/sys/wl_cfg80211_hybrid.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c +index 5ffa0b3..5a7f0c4 100644 +--- a/src/wl/sys/wl_cfg80211_hybrid.c ++++ b/src/wl/sys/wl_cfg80211_hybrid.c +@@ -101,7 +101,10 @@ static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, + enum tx_power_setting type, s32 dbm); + #endif + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0) ++static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, ++ unsigned int link_id, s32 *dbm); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm); + #else + static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm); +@@ -1225,7 +1228,10 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, s32 db + return err; + } + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0) ++static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, ++ unsigned int link_id, s32 *dbm) ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0) + static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev, s32 *dbm) + #else + static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm) +-- +2.48.1 + diff --git a/anda/system/wl-kmod/wl-kmod.spec b/anda/system/wl-kmod/wl-kmod.spec index cc977ee813..7221f0d952 100644 --- a/anda/system/wl-kmod/wl-kmod.spec +++ b/anda/system/wl-kmod/wl-kmod.spec @@ -10,7 +10,7 @@ Name: wl-kmod Version: 6.30.223.271 -Release: 1%{?dist} +Release: 3%{?dist} Summary: Kernel module for Broadcom wireless devices Group: System Environment/Kernel License: Redistributable, no modification permitted @@ -45,6 +45,8 @@ Patch23: wl-kmod-025_kernel_6.5_adaptation.patch Patch24: wl-kmod-026_kernel_6.10_fix_empty_body_in_if_warning.patch Patch25: wl-kmod-027_wpa_supplicant-2.11_add_max_scan_ie_len.patch Patch26: wl-kmod-028_kernel_6.12_adaptation.patch +Patch27: wl-kmod-029_kernel_6.13_adaptation.patch +Patch28: wl-kmod-030_kernel_6.14_adaptation.patch ExclusiveArch: i686 x86_64 BuildRequires: kmodtool BuildRequires: elfutils-libelf-devel @@ -97,6 +99,8 @@ pushd %{name}-%{version}-src %patch -P 24 -p1 -b .kernel_6.10_adaptation %patch -P 25 -p1 -b .wpa_supplicant-2.11_adaptation %patch -P 26 -p1 -b .kernel_6.12_adaptation +%patch -P 27 -p1 -b .kernel_6.13_adaptation +%patch -P 28 -p1 -b .kernel_6.14_adaptation ### NOTE: These MUST be added to as new EL versions are released. %if 0%{?rhel} == 9 @@ -120,6 +124,8 @@ pushd %{name}-%{version}-src %endif %if %{kvr} >= 427 %endif + %if %{kvr} >= 503 + %endif %endif %endif popd diff --git a/anda/system/xone/nightly/akmod/anda.hcl b/anda/system/xone/nightly/akmod/anda.hcl new file mode 100644 index 0000000000..517378389d --- /dev/null +++ b/anda/system/xone/nightly/akmod/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "xone-nightly-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xone/nightly/akmod/update.rhai b/anda/system/xone/nightly/akmod/update.rhai new file mode 100644 index 0000000000..54654a25b3 --- /dev/null +++ b/anda/system/xone/nightly/akmod/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/xone/nightly/akmod/xone-nightly-kmod.spec b/anda/system/xone/nightly/akmod/xone-nightly-kmod.spec new file mode 100644 index 0000000000..04be4f8b0b --- /dev/null +++ b/anda/system/xone/nightly/akmod/xone-nightly-kmod.spec @@ -0,0 +1,66 @@ +%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250718 +%global ver 0.3.4 +%define buildforkernels akmod +%global debug_package %{nil} +%global modulename xone + +Name: %{modulename}-nightly-kmod +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +BuildRequires: kmodtool +BuildRequires: systemd-rpm-macros +Requires: %{modulename}-nightly = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-nightly-akmod-modules = %{?epoch:%{epoch}:}%{version} +Requires: akmods +Conflicts: dkms-%{modulename}-nightly +Conflicts: %{modulename}-kmod +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: %{name} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c +%endif +Packager: Gilver E. + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories. + +%prep +%{?kmodtool_check} +kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -p1 -n %{modulename}-%{commit} + +find . -type f -name '*.c' -exec sed -i "s/#VERSION#/%{version}/" {} \; + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr auth bus driver transport Kbuild _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + %make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules + popd +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/nightly/dkms/anda.hcl b/anda/system/xone/nightly/dkms/anda.hcl new file mode 100644 index 0000000000..a3dd636172 --- /dev/null +++ b/anda/system/xone/nightly/dkms/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches=["x86_64"] + rpm { + spec = "dkms-xone-nightly.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xone/nightly/dkms/dkms-xone-nightly.spec b/anda/system/xone/nightly/dkms/dkms-xone-nightly.spec new file mode 100644 index 0000000000..504d073fb8 --- /dev/null +++ b/anda/system/xone/nightly/dkms/dkms-xone-nightly.spec @@ -0,0 +1,73 @@ +%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250718 +%global ver 0.3.4 +%global debug_package %{nil} +%global modulename xone + +Name: dkms-%{modulename}-nightly +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +Source1: no-weak-modules.conf +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: %{modulename}-nightly = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Conflicts: akmod-%{modulename}-nightly +Conflicts: %{modulename}-kmod +Provides: %{modulename}-nightly-kmod = %{?epoch:%{epoch}:}%{version} +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: dkms-%{modulename} < %{?epoch:%{epoch}:}3.0^20250419git.c682b0c +%endif +BuildArch: noarch +Packager: Gilver E. + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories. + +%prep +%autosetup -p1 -n %{modulename}-%{commit} + +sed -i \ + -e 's|#VERSION#|%{version}|g' \ + -e 's|kernel/drivers/input/joystick|extra|g' \ + dkms.conf + +find . -type f -name '*.c' -exec sed -i "s/#VERSION#/%{version}/" {} \; + +%install +# Create empty tree: +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr auth bus driver transport Kbuild dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%if 0%{?fedora} +# Do not enable weak modules support in Fedora (no kABI): +install -Dpm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : + +%files +%{_usrsrc}/%{modulename}-%{version} +%if 0%{?fedora} +%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%changelog +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/nightly/dkms/no-weak-modules.conf b/anda/system/xone/nightly/dkms/no-weak-modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/xone/nightly/dkms/no-weak-modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/xone/nightly/dkms/update.rhai b/anda/system/xone/nightly/dkms/update.rhai new file mode 100644 index 0000000000..54654a25b3 --- /dev/null +++ b/anda/system/xone/nightly/dkms/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xone/nightly/kmod-common/xone-nightly.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/xone/nightly/kmod-common/anda.hcl b/anda/system/xone/nightly/kmod-common/anda.hcl new file mode 100644 index 0000000000..1e901fb5d0 --- /dev/null +++ b/anda/system/xone/nightly/kmod-common/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "xone-nightly.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/xone/nightly/kmod-common/modules.conf b/anda/system/xone/nightly/kmod-common/modules.conf new file mode 100644 index 0000000000..776e9eff4f --- /dev/null +++ b/anda/system/xone/nightly/kmod-common/modules.conf @@ -0,0 +1 @@ +add_drivers+=" snd-pcm snd-seq " diff --git a/anda/system/xone/nightly/kmod-common/update.rhai b/anda/system/xone/nightly/kmod-common/update.rhai new file mode 100644 index 0000000000..bf0ec4fdfe --- /dev/null +++ b/anda/system/xone/nightly/kmod-common/update.rhai @@ -0,0 +1,9 @@ +rpm.global("commit", gh_commit("dlundqvist/xone")); +if rpm.changed() { + import "andax/bump_extras.rhai" as bump; + rpm.release(); + rpm.global("commitdate", date()); + let ver = bump::madoguchi("xone", labels.branch); + ver.crop(1); + rpm.global("ver", ver); +} diff --git a/anda/system/xone/nightly/kmod-common/xone-nightly.spec b/anda/system/xone/nightly/kmod-common/xone-nightly.spec new file mode 100644 index 0000000000..545865cc88 --- /dev/null +++ b/anda/system/xone/nightly/kmod-common/xone-nightly.spec @@ -0,0 +1,122 @@ +%global commit 778dbc953b1987d259ea6d802fd6967b6a0d2097 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250718 +%global ver 0.3.4 +%global modulename xone +%global _dracutconfdir %{_prefix}/lib/dracut/dracut.conf.d +%global firmware_hash0 48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66 +%global firmware_hash1 080ce4091e53a4ef3e5fe29939f51fd91f46d6a88be6d67eb6e99a5723b3a223 + +Name: xone-nightly +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 1 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories common files +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/%{commit}.tar.gz#/xone-%{shortcommit}.tar.gz +Source1: modules.conf +### Windows drivers and firmware files: +Source2: http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab +Source3: https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2015/12/20810869_8ce2975a7fbaa06bcfb0d8762a6275a1cf7c1dd3.cab +### Microsoft TOU copy: +Source4: https://www.microsoft.com/en-us/legal/terms-of-use +BuildRequires: cabextract +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: wireless-regdb +Requires: %{name}-firmware = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-kmod = %{?epoch:%{epoch}:}%{version} +Requires(post): dracut +Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version} +Conflicts: %{modulename} +Conflicts: xow <= 0.5 +Obsoletes: xow <= 0.5 +BuildArch: noarch +Packager: Gilver E. + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories common files. + +%package akmod-modules +Summary: Modules for Akmods +Requires: akmod-%{name} +BuildArch: noarch + +%description akmod-modules +Akmods modules for the akmod-%{name} package. + +%package firmware +Summary: Firmware for the XBox One controller dongle +License: Proprietary +Requires: wireless-regdb +BuildArch: noarch + +%description firmware +Proprietary firmware for XBox controller dongles. + +%prep +%autosetup -p1 -n %{modulename}-%{commit} +/usr/bin/cp %{SOURCE4} . +/usr/bin/sed -nE '/^BUILT_MODULE_NAME/{s@^.+"(.+)"@\1@; s|-|_|g; p}' dkms.conf > %{modulename}.conf + +### Firmware: +# The .bin files have the same name so put them in subdirs +mkdir firm{0..1} + +pushd firm0 +cabextract -F FW_ACC_00U.bin %{SOURCE2} +echo %{firmware_hash0} FW_ACC_00U.bin | sha256sum -c +popd + +pushd firm1 +cabextract -F FW_ACC_00U.bin %{SOURCE3} +echo %{firmware_hash1} FW_ACC_00U.bin | sha256sum -c +popd + +%install +# xone-gip-headset module should have the snd-pcm and snd-seq modules be preloaded or it will give errors on boot due to injecting late. +# It still loads afterwards, but this error is easily fixable by just loading the modules in the initramfs. +install -Dpm644 %{SOURCE1} %{buildroot}%{_dracutconfdir}/60-%{modulename}-snd.conf + +# Blacklist: +install -Dpm644 install/modprobe.conf %{buildroot}%{_modprobedir}/60-%{modulename}.conf + +# Firmware: +install -Dpm644 firm0/FW_ACC_00U.bin %{buildroot}%{_prefix}/lib/firmware/xow_dongle.bin +install -Dpm644 firm1/FW_ACC_00U.bin %{buildroot}%{_prefix}/lib/firmware/xow_dongle_045e_02e6.bin + +# Akmods modules +install -Dm644 %{modulename}.conf -t %{buildroot}%{_modulesloaddir} + +%files +%license LICENSE +%doc README.md +%{_modprobedir}/60-%{modulename}.conf +%{_dracutconfdir}/60-%{modulename}-snd.conf + +%files akmod-modules +%{_modulesloaddir}/%{modulename}.conf + +%files firmware +%license terms-of-use +%{_prefix}/lib/firmware/xow_dongle.bin +%{_prefix}/lib/firmware/xow_dongle_045e_02e6.bin + +%post +/usr/bin/dracut -f + +%postun +/usr/bin/dracut -f + +%post firmware +echo "The firmware for the wireless dongle is subject to Microsoft's Terms of Use:" +echo 'https://www.microsoft.com/en-us/legal/terms-of-use' + +%changelog +* Thu Apr 17 2025 Gilver E. - 0.3^20250418git.ecdd59e-2%{?dist} +- Added additional firmware needed for dongle pairing on some controllers +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/stable/akmod/anda.hcl b/anda/system/xone/stable/akmod/anda.hcl new file mode 100644 index 0000000000..3f2d068de2 --- /dev/null +++ b/anda/system/xone/stable/akmod/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "xone-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xone/stable/akmod/update.rhai b/anda/system/xone/stable/akmod/update.rhai new file mode 100644 index 0000000000..a6404f6cf3 --- /dev/null +++ b/anda/system/xone/stable/akmod/update.rhai @@ -0,0 +1,4 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("xone", labels.branch)); + diff --git a/anda/system/xone/stable/akmod/xone-kmod.spec b/anda/system/xone/stable/akmod/xone-kmod.spec new file mode 100644 index 0000000000..3b1a9509f9 --- /dev/null +++ b/anda/system/xone/stable/akmod/xone-kmod.spec @@ -0,0 +1,62 @@ +%define buildforkernels akmod +%global debug_package %{nil} +%global modulename xone + +Name: %{modulename}-kmod +Version: 0.4.3 +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 2 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +BuildRequires: kmodtool +BuildRequires: systemd-rpm-macros +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-akmod-modules = %{?epoch:%{epoch}:}%{version} +Requires: akmods +Conflicts: dkms-%{modulename} +Conflicts: %{modulename}-nightly-kmod +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: %{name} < %{?epoch:%{epoch}:}0.3.4 +%endif +Packager: Gilver E. + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories. + +%prep +%{?kmodtool_check} +kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -p1 -n %{modulename}-%{version} + +find . -type f -name '*.c' -exec sed -i "s/#VERSION#/%{version}/" {} \; + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr auth bus driver transport Kbuild _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + %make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules + popd +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/stable/dkms/anda.hcl b/anda/system/xone/stable/dkms/anda.hcl new file mode 100644 index 0000000000..86f43ddf89 --- /dev/null +++ b/anda/system/xone/stable/dkms/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches=["x86_64"] + rpm { + spec = "dkms-xone.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xone/stable/dkms/dkms-xone.spec b/anda/system/xone/stable/dkms/dkms-xone.spec new file mode 100644 index 0000000000..11ebbb4316 --- /dev/null +++ b/anda/system/xone/stable/dkms/dkms-xone.spec @@ -0,0 +1,69 @@ +%global debug_package %{nil} +%global modulename xone + +Name: dkms-%{modulename} +Version: 0.4.3 +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 2 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +Source1: no-weak-modules.conf +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Conflicts: akmod-%{modulename} +Conflicts: %{modulename}-nightly-kmod +Provides: %{modulename}-kmod +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: %{name} < %{?epoch:%{epoch}:}0.3.4 +%endif +BuildArch: noarch +Packager: Gilver E. + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories. + +%prep +%autosetup -p1 -n %{modulename}-%{version} + +sed -i \ + -e 's|#VERSION#|%{version}|g' \ + -e 's|kernel/drivers/input/joystick|extra|g' \ + dkms.conf + +find . -type f -name '*.c' -exec sed -i "s/#VERSION#/%{version}/" {} \; + +%install +# Create empty tree: +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr auth bus driver transport Kbuild dkms.conf %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%if 0%{?fedora} +# Do not enable weak modules support in Fedora (no kABI): +install -Dpm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : + +%files +%{_usrsrc}/%{modulename}-%{version} +%if 0%{?fedora} +%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%changelog +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xone/stable/dkms/no-weak-modules.conf b/anda/system/xone/stable/dkms/no-weak-modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/xone/stable/dkms/no-weak-modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/xone/stable/dkms/update.rhai b/anda/system/xone/stable/dkms/update.rhai new file mode 100644 index 0000000000..a6404f6cf3 --- /dev/null +++ b/anda/system/xone/stable/dkms/update.rhai @@ -0,0 +1,4 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("xone", labels.branch)); + diff --git a/anda/system/xone/stable/kmod-common/anda.hcl b/anda/system/xone/stable/kmod-common/anda.hcl new file mode 100644 index 0000000000..522c9daf57 --- /dev/null +++ b/anda/system/xone/stable/kmod-common/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "xone.spec" + } +} diff --git a/anda/system/xone/stable/kmod-common/modules.conf b/anda/system/xone/stable/kmod-common/modules.conf new file mode 100644 index 0000000000..776e9eff4f --- /dev/null +++ b/anda/system/xone/stable/kmod-common/modules.conf @@ -0,0 +1 @@ +add_drivers+=" snd-pcm snd-seq " diff --git a/anda/system/xone/stable/kmod-common/update.rhai b/anda/system/xone/stable/kmod-common/update.rhai new file mode 100644 index 0000000000..2866b2646c --- /dev/null +++ b/anda/system/xone/stable/kmod-common/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("dlundqvist/xone")); diff --git a/anda/system/xone/stable/kmod-common/xone.spec b/anda/system/xone/stable/kmod-common/xone.spec new file mode 100644 index 0000000000..ae291c72e0 --- /dev/null +++ b/anda/system/xone/stable/kmod-common/xone.spec @@ -0,0 +1,123 @@ +%global _dracutconfdir %{_prefix}/lib/dracut/dracut.conf.d +%global firmware_hash0 48084d9fa53b9bb04358f3bb127b7495dc8f7bb0b3ca1437bd24ef2b6eabdf66 +%global firmware_hash1 080ce4091e53a4ef3e5fe29939f51fd91f46d6a88be6d67eb6e99a5723b3a223 + +Name: xone +Version: 0.4.3 +Release: 1%?dist +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Epoch: 2 +%endif +Summary: Linux kernel driver for Xbox One and Xbox Series X|S accessories common files +License: GPL-2.0-or-later +URL: https://github.com/dlundqvist/xone +Source0: %{url}/archive/refs/tags/v%{version}.tar.gz +Source1: modules.conf +### Windows drivers and firmware files: +Source2: http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab +Source3: https://catalog.s.download.windowsupdate.com/d/msdownload/update/driver/drvs/2015/12/20810869_8ce2975a7fbaa06bcfb0d8762a6275a1cf7c1dd3.cab +### Microsoft TOU copy: +Source4: https://www.microsoft.com/en-us/legal/terms-of-use +BuildRequires: cabextract +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: wireless-regdb +Requires: %{name}-firmware = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: %{name}-kmod = %{?epoch:%{epoch}:}%{version} +Requires(post): dracut +Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version} +Conflicts: %{name}-nightly +Conflicts: xow <= 0.5 +Obsoletes: xow <= 0.5 +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: %{name} < %{?epoch:%{epoch}:}0.3.4 +%endif +BuildArch: noarch +Packager: Gilver E. + +%description +Linux kernel driver for Xbox One and Xbox Series X|S accessories common files. + +%package akmod-modules +Summary: Modules for Akmods +Requires: akmod-%{name} +BuildArch: noarch + +%description akmod-modules +Akmods modules for the akmod-%{name} package. + +%package firmware +Summary: Firmware for the XBox One controller dongle +License: Proprietary +Requires: wireless-regdb +%if 0%{?fedora} <= 43 || 0%{?rhel} <= 10 +Obsoletes: %{name}-firmware < %{?epoch:%{epoch}:}0.3^20250419git.c682b0c +%endif +BuildArch: noarch + +%description firmware +Proprietary firmware for XBox controller dongles. + +%prep +%autosetup -p1 -n %{name}-%{version} +/usr/bin/cp %{SOURCE4} . +/usr/bin/sed -nE '/^BUILT_MODULE_NAME/{s@^.+"(.+)"@\1@; s|-|_|g; p}' dkms.conf > %{name}.conf + +### Firmware: +# The .bin files have the same name so put them in subdirs +mkdir firm{0..1} + +pushd firm0 +cabextract -F FW_ACC_00U.bin %{SOURCE2} +echo %{firmware_hash0} FW_ACC_00U.bin | sha256sum -c +popd + +pushd firm1 +cabextract -F FW_ACC_00U.bin %{SOURCE3} +echo %{firmware_hash1} FW_ACC_00U.bin | sha256sum -c +popd + +%install +# xone-gip-headset module should have the snd-pcm and snd-seq modules be preloaded or it will give errors on boot due to injecting late. +# It still loads afterwards, but this error is easily fixable by just loading the modules in the initramfs. +install -Dpm644 %{SOURCE1} %{buildroot}%{_dracutconfdir}/60-%{name}-snd.conf + +# Blacklist: +install -Dpm644 install/modprobe.conf %{buildroot}%{_modprobedir}/60-%{name}.conf + +# Firmware: +install -Dpm644 firm0/FW_ACC_00U.bin %{buildroot}%{_prefix}/lib/firmware/xow_dongle.bin +install -Dpm644 firm1/FW_ACC_00U.bin %{buildroot}%{_prefix}/lib/firmware/xow_dongle_045e_02e6.bin + +# Akmods modules +install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir} + +%files +%license LICENSE +%doc README.md +%{_modprobedir}/60-%{name}.conf +%{_dracutconfdir}/60-%{name}-snd.conf + +%files akmod-modules +%{_modulesloaddir}/%{name}.conf + +%files firmware +%license terms-of-use +%{_prefix}/lib/firmware/xow_dongle.bin +%{_prefix}/lib/firmware/xow_dongle_045e_02e6.bin + +%post +/usr/bin/dracut -f + +%postun +/usr/bin/dracut -f + +%post firmware +echo "The firmware for the wireless dongle is subject to Microsoft's Terms of Use:" +echo 'https://www.microsoft.com/en-us/legal/terms-of-use' + +%changelog +* Thu Apr 17 2025 Gilver E. - 0.3^20250418git.ecdd59e-2%{?dist} +- Added additional firmware needed for dongle pairing on some controllers +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xpad-noone/akmod/0000.patch b/anda/system/xpad-noone/akmod/0000.patch new file mode 100644 index 0000000000..59826a8f7f --- /dev/null +++ b/anda/system/xpad-noone/akmod/0000.patch @@ -0,0 +1,43 @@ +--- a/xpad.c ++++ b/xpad.c +@@ -117,6 +117,7 @@ static const struct xpad_device { + u8 xtype; + } xpad_device[] = { + { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 }, ++ { 0x16d0, 0x10bc, "Cyborg Compact Gamingkeypad", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 }, + { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, +@@ -303,6 +304,7 @@ static const struct xpad_device { + { 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, + { 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 }, + { 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 }, ++ { 0x2dc8, 0x3109, "8BitDo Ultimate Wireless Bluetooth", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 }, +@@ -311,7 +313,8 @@ static const struct xpad_device { + { 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 }, + { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 }, + { 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 }, ++ { 0x413d, 0x2104, "Black Shark Green Ghost Gamepad", 0, XTYPE_XBOX360 }, + { 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX }, + { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, + { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN } + }; +@@ -384,6 +387,7 @@ static const signed short xpad_abs_triggers[] = { + + static const struct usb_device_id xpad_table[] = { + { USB_INTERFACE_INFO('X', 'B', 0) }, /* Xbox USB-IF not-approved class */ ++ XPAD_XBOX360_VENDOR(0x16d0), /* Azeron Custom Gamingkeypad Vendor */ + XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 controller */ + XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */ + XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster Xbox 360 controllers */ +@@ -420,6 +424,7 @@ + XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */ + XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */ + XPAD_XBOX360_VENDOR(0x3537), /* GameSir Controllers */ ++ XPAD_XBOX360_VENDOR(0x413d), /* Black Shark Green Ghost Controller */ + { } + }; + diff --git a/anda/system/xpad-noone/akmod/anda.hcl b/anda/system/xpad-noone/akmod/anda.hcl new file mode 100644 index 0000000000..eeaf7f0c82 --- /dev/null +++ b/anda/system/xpad-noone/akmod/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "xpad-noone-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xpad-noone/akmod/update.rhai b/anda/system/xpad-noone/akmod/update.rhai new file mode 100644 index 0000000000..26a5eb17b4 --- /dev/null +++ b/anda/system/xpad-noone/akmod/update.rhai @@ -0,0 +1,12 @@ +let c = sh("cat anda/system/xpad-noone/kmod-common/xpad-noone.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xpad-noone/kmod-common/xpad-noone.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xpad-noone/kmod-common/xpad-noone.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} diff --git a/anda/system/xpad-noone/akmod/xpad-noone-kmod.spec b/anda/system/xpad-noone/akmod/xpad-noone-kmod.spec new file mode 100644 index 0000000000..7ae74e4dcd --- /dev/null +++ b/anda/system/xpad-noone/akmod/xpad-noone-kmod.spec @@ -0,0 +1,60 @@ +%global commit 6970c40930bedd8b58d0764894e0d5f04813b7c5 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20240109 +%global ver 1.0 +%global modulename xpad-noone +%global debug_package %{nil} +%global buildforkernels akmod +%global _description %{expand: +This is the original upstream xpad driver from the Linux kernel with support for XBox One controllers removed. If you are running the xone driver you may have to replace the xpad kernel module with this one to retain the functionality of XBox and XBox 360 controllers.} + +Name: %{modulename}-kmod +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +License: GPL-2.0-or-later +Summary: xpad driver with support for XBox One controllers removed +URL: https://github.com/medusalix/xpad-noone +Source0: %{url}/archive/%{commit}/%{modulename}-%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +# Extra support for controllers that register as XBox 360 controllers +Patch0: 0000.patch +BuildRequires: gcc +BuildRequires: kmodtool +BuildRequires: make +BuildRequires: systemd-rpm-macros +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-akmod-modules +Requires: akmods +Conflicts: dkms-%{modulename} +Packager: Gilver E. + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{modulename} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description %_description + +%prep +%{?kmodtool_check} + +kmodtool --target %{_target_cpu} --repo terra --kmodname %{modulename} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -n %{modulename}-%{commit} -p1 + +for kernel_version in %{?kernel_versions} ; do + cp -a %{modulename}-%{commit} _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions} ; do + make V=1 %{?_smp_mflags} -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} VERSION=v%{version} modules +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -D -m 755 _kmod_build_${kernel_version%%___*}/%{modulename}.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/%{modulename}.ko +done +%{?akmod_install} + +%changelog +* Fri Mar 07 2025 Gilver E. +- Initial package diff --git a/anda/system/xpad-noone/dkms/0000.patch b/anda/system/xpad-noone/dkms/0000.patch new file mode 100644 index 0000000000..59826a8f7f --- /dev/null +++ b/anda/system/xpad-noone/dkms/0000.patch @@ -0,0 +1,43 @@ +--- a/xpad.c ++++ b/xpad.c +@@ -117,6 +117,7 @@ static const struct xpad_device { + u8 xtype; + } xpad_device[] = { + { 0x0079, 0x18d4, "GPD Win 2 X-Box Controller", 0, XTYPE_XBOX360 }, ++ { 0x16d0, 0x10bc, "Cyborg Compact Gamingkeypad", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff01, "Wooting One (Legacy)", 0, XTYPE_XBOX360 }, + { 0x03eb, 0xff02, "Wooting Two (Legacy)", 0, XTYPE_XBOX360 }, + { 0x044f, 0x0f00, "Thrustmaster Wheel", 0, XTYPE_XBOX }, +@@ -303,6 +304,7 @@ static const struct xpad_device { + { 0x24c6, 0xfafe, "Rock Candy Gamepad for Xbox 360", 0, XTYPE_XBOX360 }, + { 0x2563, 0x058d, "OneXPlayer Gamepad", 0, XTYPE_XBOX360 }, + { 0x2dc8, 0x3106, "8BitDo Pro 2 Wired Controller", 0, XTYPE_XBOX360 }, ++ { 0x2dc8, 0x3109, "8BitDo Ultimate Wireless Bluetooth", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1100, "Wooting One", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1200, "Wooting Two", 0, XTYPE_XBOX360 }, + { 0x31e3, 0x1210, "Wooting Lekker", 0, XTYPE_XBOX360 }, +@@ -311,7 +313,8 @@ static const struct xpad_device { + { 0x31e3, 0x1310, "Wooting 60HE (ARM)", 0, XTYPE_XBOX360 }, + { 0x3285, 0x0607, "Nacon GC-100", 0, XTYPE_XBOX360 }, + { 0x3537, 0x1004, "GameSir T4 Kaleid", 0, XTYPE_XBOX360 }, ++ { 0x413d, 0x2104, "Black Shark Green Ghost Gamepad", 0, XTYPE_XBOX360 }, + { 0x3767, 0x0101, "Fanatec Speedster 3 Forceshock Wheel", 0, XTYPE_XBOX }, + { 0xffff, 0xffff, "Chinese-made Xbox Controller", 0, XTYPE_XBOX }, + { 0x0000, 0x0000, "Generic X-Box pad", 0, XTYPE_UNKNOWN } + }; +@@ -384,6 +387,7 @@ static const signed short xpad_abs_triggers[] = { + + static const struct usb_device_id xpad_table[] = { + { USB_INTERFACE_INFO('X', 'B', 0) }, /* Xbox USB-IF not-approved class */ ++ XPAD_XBOX360_VENDOR(0x16d0), /* Azeron Custom Gamingkeypad Vendor */ + XPAD_XBOX360_VENDOR(0x0079), /* GPD Win 2 controller */ + XPAD_XBOX360_VENDOR(0x03eb), /* Wooting Keyboards (Legacy) */ + XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster Xbox 360 controllers */ +@@ -420,6 +424,7 @@ + XPAD_XBOX360_VENDOR(0x31e3), /* Wooting Keyboards */ + XPAD_XBOX360_VENDOR(0x3285), /* Nacon GC-100 */ + XPAD_XBOX360_VENDOR(0x3537), /* GameSir Controllers */ ++ XPAD_XBOX360_VENDOR(0x413d), /* Black Shark Green Ghost Controller */ + { } + }; + diff --git a/anda/system/xpad-noone/dkms/anda.hcl b/anda/system/xpad-noone/dkms/anda.hcl new file mode 100644 index 0000000000..8d386a715f --- /dev/null +++ b/anda/system/xpad-noone/dkms/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "dkms-xpad-noone.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xpad-noone/dkms/dkms-xpad-noone.spec b/anda/system/xpad-noone/dkms/dkms-xpad-noone.spec new file mode 100644 index 0000000000..f7831a347e --- /dev/null +++ b/anda/system/xpad-noone/dkms/dkms-xpad-noone.spec @@ -0,0 +1,57 @@ +%global commit 6970c40930bedd8b58d0764894e0d5f04813b7c5 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20240109 +%global ver 1.0 +%global modulename xpad-noone +%global _description %{expand: +This is the original upstream xpad driver from the Linux kernel with support for XBox One controllers removed. If you are running the xone driver you may have to replace the xpad kernel module with this one to retain the functionality of XBox and XBox 360 controllers.} + +Name: dkms-%{modulename} +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +License: GPL-2.0-or-later +Summary: xpad driver with support for XBox One controllers removed +URL: https://github.com/medusalix/xpad-noone +Source0: %{url}/archive/%{commit}/%{modulename}-%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +Source1: no-weak-modules.conf +# Extra support for controllers that register as XBox 360 controllers +Patch0: 0000.patch +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Conflicts: akmod-%{modulename} +BuildArch: noarch +Packager: Gilver E. + +%description %_description + +%prep +%autosetup -n %{modulename}-%{commit} + +%build + +%install +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +rm -rf LICENSE README.md +cp -fr ./* %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%if 0%{?fedora} +install -Dpm644 %{SOURCE1} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : + +%files +%{_usrsrc}/%{modulename}-%{version} +%if 0%{?fedora} +%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%changelog +* Fri Mar 07 2025 Gilver E. +- Initial package diff --git a/anda/system/xpad-noone/dkms/no-weak-modules.conf b/anda/system/xpad-noone/dkms/no-weak-modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/xpad-noone/dkms/no-weak-modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/xpad-noone/dkms/update.rhai b/anda/system/xpad-noone/dkms/update.rhai new file mode 100644 index 0000000000..26a5eb17b4 --- /dev/null +++ b/anda/system/xpad-noone/dkms/update.rhai @@ -0,0 +1,12 @@ +let c = sh("cat anda/system/xpad-noone/kmod-common/xpad-noone.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xpad-noone/kmod-common/xpad-noone.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xpad-noone/kmod-common/xpad-noone.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} diff --git a/anda/system/xpad-noone/kmod-common/anda.hcl b/anda/system/xpad-noone/kmod-common/anda.hcl new file mode 100644 index 0000000000..87bd38dc9a --- /dev/null +++ b/anda/system/xpad-noone/kmod-common/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "xpad-noone.spec" + } + labels { + nightly = 1 + } +} diff --git a/anda/system/xpad-noone/kmod-common/update.rhai b/anda/system/xpad-noone/kmod-common/update.rhai new file mode 100644 index 0000000000..0c4d57f83f --- /dev/null +++ b/anda/system/xpad-noone/kmod-common/update.rhai @@ -0,0 +1,8 @@ +rpm.global("commit", gh_commit("medusalix/xpad-noone")); +if rpm.changed() { + rpm.release(); + rpm.global("commitdate", date()); + let html = get(`https://raw.githubusercontent.com/medusalix/xpad-noone/refs/heads/master/dkms.conf`); + let v = find("PACKAGE_VERSION=\"([\\d.]+)\"", html, 1); + rpm.global("ver", v); +} diff --git a/anda/system/xpad-noone/kmod-common/xpad-noone.spec b/anda/system/xpad-noone/kmod-common/xpad-noone.spec new file mode 100644 index 0000000000..767764d890 --- /dev/null +++ b/anda/system/xpad-noone/kmod-common/xpad-noone.spec @@ -0,0 +1,52 @@ +%global commit 6970c40930bedd8b58d0764894e0d5f04813b7c5 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20240109 +%global ver 1.0 +%global _description %{expand: +This is the original upstream xpad driver from the Linux kernel with support for XBox One controllers removed. If you are running the xone driver you may have to replace the xpad kernel module with this one to retain the functionality of XBox and XBox 360 controllers.} + +Name: xpad-noone +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%{?dist} +License: GPL-2.0-or-later +Summary: xpad driver with support for XBox One controllers removed +URL: https://github.com/medusalix/xpad-noone +Source0: %{url}/archive/%{commit}/%{name}-%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: (akmod-%{name} = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version}) +Conflicts: xow <= 0.5 +Obsoletes: xow <= 0.5 +BuildArch: noarch +Packager: Gilver E. + +%description %_description + +%package akmod-modules +Summary: Modules for Akmods +Requires: akmod-%{name} +BuildArch: noarch + +%description akmod-modules +Akmods modules for the akmod-%{name} package. + +%prep +%autosetup -n %{name}-%{commit} +/usr/bin/sed -nE '/^BUILT_MODULE_NAME/{s@^.+"(.+)"@\1@; s|-|_|g; p}' dkms.conf > %{name}.conf + +%build + +%install +install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir} + +%files +%doc README.md +%license LICENSE + +%files akmod-modules +%{_modulesloaddir}/%{name}.conf + +%changelog +* Fri Mar 07 2025 Gilver E. +- Initial package diff --git a/anda/system/xpadneo/akmod/anda.hcl b/anda/system/xpadneo/akmod/anda.hcl new file mode 100644 index 0000000000..23ac0b839c --- /dev/null +++ b/anda/system/xpadneo/akmod/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + rpm { + spec = "xpadneo-kmod.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xpadneo/akmod/update.rhai b/anda/system/xpadneo/akmod/update.rhai new file mode 100644 index 0000000000..b7de501f56 --- /dev/null +++ b/anda/system/xpadneo/akmod/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/xpadneo/kmod-common/xpadneo.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xpadneo/kmod-common/xpadneo.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xpadneo/kmod-common/xpadneo.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/xpadneo/akmod/xpadneo-kmod.spec b/anda/system/xpadneo/akmod/xpadneo-kmod.spec new file mode 100644 index 0000000000..cc2ef1d9a1 --- /dev/null +++ b/anda/system/xpadneo/akmod/xpadneo-kmod.spec @@ -0,0 +1,59 @@ +%global commit a16acb03e7be191d47ebfbc8ca1d5223422dac3e +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250705 +%global ver 0.9.7 +%define buildforkernels akmod +%global debug_package %{nil} +%global modulename xpadneo + +Name: %{modulename}-kmod +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +Summary: Advanced Linux Driver for Xbox One Wireless Gamepad +License: GPL-3.0 +URL: https://atar-axis.github.io/xpadneo +Source0: https://github.com/atar-axis/xpadneo/archive/%{commit}.tar.gz#/xpadneo-%{shortcommit}.tar.gz +BuildRequires: kmodtool +BuildRequires: systemd-rpm-macros +Requires: akmods +Requires: bluez +Requires: bluez-tools +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-akmod-modules = %{?epoch:%{epoch}:}%{version} +Conflicts: dkms-%{modulename} +Packager: Gilver E. + +%{expand:%(kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } + +%description +Advanced Linux Driver for Xbox One Wireless Gamepad. + +%prep +%{?kmodtool_check} +kmodtool --target %{_target_cpu} --repo terra --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null + +%autosetup -p1 -n %{modulename}-%{commit} + +for kernel_version in %{?kernel_versions}; do + mkdir _kmod_build_${kernel_version%%___*} + cp -fr hid-xpadneo/src/* _kmod_build_${kernel_version%%___*} +done + +%build +for kernel_version in %{?kernel_versions}; do + pushd _kmod_build_${kernel_version%%___*}/ + %make_build -C "${kernel_version##*___}" M=$(pwd) VERSION="v%{version}" modules + popd +done + +%install +for kernel_version in %{?kernel_versions}; do + mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \ + %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ +done +%{?akmod_install} + +%changelog +* Thu Feb 27 2025 Gilver E. +- Package refactoring for alternative DKMS package compatibility diff --git a/anda/system/xpadneo/dkms/anda.hcl b/anda/system/xpadneo/dkms/anda.hcl new file mode 100644 index 0000000000..99098cb318 --- /dev/null +++ b/anda/system/xpadneo/dkms/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "dkms-xpadneo.spec" + } + labels { + mock = 1 + updbranch = 1 + } +} diff --git a/anda/system/xpadneo/dkms/dkms-xpadneo.conf b/anda/system/xpadneo/dkms/dkms-xpadneo.conf new file mode 100644 index 0000000000..ecde0d0673 --- /dev/null +++ b/anda/system/xpadneo/dkms/dkms-xpadneo.conf @@ -0,0 +1,6 @@ +PACKAGE_NAME="xpadneo" +PACKAGE_VERSION="__VERSION_STRING" +AUTOINSTALL="yes" + +BUILT_MODULE_NAME[0]="hid-xpadneo" +DEST_MODULE_LOCATION[0]="/extra" diff --git a/anda/system/xpadneo/dkms/dkms-xpadneo.spec b/anda/system/xpadneo/dkms/dkms-xpadneo.spec new file mode 100644 index 0000000000..a3e46f68b9 --- /dev/null +++ b/anda/system/xpadneo/dkms/dkms-xpadneo.spec @@ -0,0 +1,68 @@ +%global commit a16acb03e7be191d47ebfbc8ca1d5223422dac3e +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250705 +%global ver 0.9.7 +%global debug_package %{nil} +%global modulename xpadneo + +Name: dkms-%{modulename} +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +Summary: Advanced Linux Driver for Xbox One Wireless Gamepad +License: GPL-3.0 +URL: https://atar-axis.github.io/%{modulename} +Source0: https://github.com/atar-axis/%{modulename}/archive/%{commit}.tar.gz#/%{modulename}-%{shortcommit}.tar.gz +Source1: %{name}.conf +Source2: no-weak-modules.conf +BuildRequires: sed +Requires: bluez +Requires: bluez-tools +Requires: %{modulename} = %{?epoch:%{epoch}:}%{version} +Requires: dkms +Conflicts: akmod-%{modulename} +BuildArch: noarch +Packager: Gilver E. + +%description +Advanced Linux Driver for Xbox One Wireless Gamepad. + +%prep +%autosetup -p1 -n %{modulename}-%{commit} + + +cp -f %{SOURCE1} hid-xpadneo/src/dkms.conf + +sed -i -e 's/__VERSION_STRING/%{version}/g' hid-xpadneo/src/dkms.conf +sed -i -e 's/$(VERSION)/v%{version}/g' hid-xpadneo/src/Makefile + +%build + +%install +# Create empty tree: +mkdir -p %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ +cp -fr hid-xpadneo/src/* %{buildroot}%{_usrsrc}/%{modulename}-%{version}/ + +%if 0%{?fedora} +# Do not enable weak modules support in Fedora (no kABI): +install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%post +dkms add -m %{modulename} -v %{version} -q --rpm_safe_upgrade || : +# Rebuild and make available for the currently running kernel: +dkms build -m %{modulename} -v %{version} -q || : +dkms install -m %{modulename} -v %{version} -q --force || : + +%preun +# Remove all versions from DKMS registry: +dkms remove -m %{modulename} -v %{version} -q --all --rpm_safe_upgrade || : + +%files +%{_usrsrc}/%{modulename}-%{version} +%if 0%{?fedora} +%{_sysconfdir}/dkms/%{modulename}.conf +%endif + +%changelog +* Thu Feb 27 2025 Gilver E. +- Initial package diff --git a/anda/system/xpadneo/dkms/no-weak-modules.conf b/anda/system/xpadneo/dkms/no-weak-modules.conf new file mode 100644 index 0000000000..24f6f95c96 --- /dev/null +++ b/anda/system/xpadneo/dkms/no-weak-modules.conf @@ -0,0 +1 @@ +NO_WEAK_MODULES="yes" diff --git a/anda/system/xpadneo/dkms/update.rhai b/anda/system/xpadneo/dkms/update.rhai new file mode 100644 index 0000000000..b7de501f56 --- /dev/null +++ b/anda/system/xpadneo/dkms/update.rhai @@ -0,0 +1,13 @@ +let c = sh("cat anda/system/xpadneo/kmod-common/xpadneo.spec | grep '%global commit ' | sed -E 's/.+commit //'", #{"stdout": "piped"}).ctx.stdout; +c.pop(); +rpm.global("commit", c); +if rpm.changed() { + rpm.release(); + let d = sh("cat anda/system/xpadneo/kmod-common/xpadneo.spec | grep '%global commitdate' | sed -E 's/.+commitdate //'", #{"stdout": "piped"}).ctx.stdout; + d.pop(); + rpm.global("commitdate", d); + let v = sh("cat anda/system/xpadneo/kmod-common/xpadneo.spec | grep '%global ver' | sed -E 's/.+ver //'", #{"stdout": "piped"}).ctx.stdout; + v.pop(); + rpm.global("ver", v); +} + diff --git a/anda/system/xpadneo/anda.hcl b/anda/system/xpadneo/kmod-common/anda.hcl similarity index 60% rename from anda/system/xpadneo/anda.hcl rename to anda/system/xpadneo/kmod-common/anda.hcl index 522f0b2ff8..9b58032693 100644 --- a/anda/system/xpadneo/anda.hcl +++ b/anda/system/xpadneo/kmod-common/anda.hcl @@ -1,8 +1,9 @@ project pkg { + arches = ["x86_64"] rpm { spec = "xpadneo.spec" } labels { - mock = 1 + nightly = 1 } } diff --git a/anda/system/xpadneo/io.github.xpadneo.metainfo.xml b/anda/system/xpadneo/kmod-common/io.github.xpadneo.metainfo.xml similarity index 100% rename from anda/system/xpadneo/io.github.xpadneo.metainfo.xml rename to anda/system/xpadneo/kmod-common/io.github.xpadneo.metainfo.xml diff --git a/anda/system/xpadneo/kmod-common/update.rhai b/anda/system/xpadneo/kmod-common/update.rhai new file mode 100644 index 0000000000..82cafc1ad1 --- /dev/null +++ b/anda/system/xpadneo/kmod-common/update.rhai @@ -0,0 +1,8 @@ +rpm.global("commit", gh_commit("atar-axis/xpadneo")); +if rpm.changed() { + rpm.release(); + rpm.global("commitdate", date()); + let ver = gh("atar-axis/xpadneo"); + ver.crop(1); + rpm.global("ver", ver); +} diff --git a/anda/system/xpadneo/kmod-common/xpadneo.spec b/anda/system/xpadneo/kmod-common/xpadneo.spec new file mode 100644 index 0000000000..d5da4a7961 --- /dev/null +++ b/anda/system/xpadneo/kmod-common/xpadneo.spec @@ -0,0 +1,63 @@ +%global commit a16acb03e7be191d47ebfbc8ca1d5223422dac3e +%global shortcommit %(c=%{commit}; echo ${c:0:7}) +%global commitdate 20250705 +%global ver 0.9.7 + +Name: xpadneo +Version: %{ver}^%{commitdate}git.%{shortcommit} +Release: 1%?dist +Summary: Advanced Linux Driver for Xbox One Wireless Gamepad common files +License: GPL-3.0 +URL: https://atar-axis.github.io/%{name} +Source0: https://github.com/atar-axis/%{name}/archive/%{commit}.tar.gz#/%{name}-%{shortcommit}.tar.gz +Source1: io.github.%{name}.metainfo.xml +BuildRequires: sed +BuildRequires: systemd-rpm-macros +Requires: (akmod-%{name} = %{?epoch:%{epoch}:}%{version} or dkms-%{name} = %{?epoch:%{epoch}:}%{version}) +Provides: %{name}-kmod-common = %{?epoch:%{epoch}:}%{version} +Obsoletes: %{name}-kmod-common < %{?epoch:%{epoch}:}0.9.7^20241224git.8d20a23-4%{?dist} +BuildArch: noarch +Packager: Gilver E. + +%description +Advanced Linux Driver for Xbox One Wireless Gamepad common files. + +%package akmod-modules +Summary: Modules for Akmods +Requires: akmod-%{name} +BuildArch: noarch + +%description akmod-modules +Akmods modules for the akmod-%{name} package. + +%prep +%autosetup -p1 -n %{name}-%{commit} +/usr/bin/sed -nE '/^BUILT_MODULE_NAME/{s@^.+"(.+)"@\1@; s|-|_|g; p}' hid-%{name}/dkms.conf.in > %{name}.conf + +%install +# Aliases: +install -Dpm644 hid-%{name}/etc-modprobe.d/%{name}.conf -t %{buildroot}%{_modprobedir} + +# UDev rules: +install -Dpm644 hid-%{name}/etc-udev-rules.d/*.rules -t %{buildroot}%{_udevrulesdir}/ + +# Metadata +install -Dm644 %{SOURCE1} %{buildroot}%{_datadir}/metainfo/io.github.%{name}.metainfo.xml + +# Akmods modules +install -Dm644 %{name}.conf -t %{buildroot}%{_modulesloaddir} + +%files +%license LICENSE +%doc docs/*.md +%{_modprobedir}/%{name}.conf +%{_udevrulesdir}/60-%{name}.rules +%{_udevrulesdir}/70-%{name}-disable-hidraw.rules +%{_datadir}/metainfo/io.github.%{name}.metainfo.xml + +%files akmod-modules +%{_modulesloaddir}/%{name}.conf + +%changelog +* Fri Mar 07 2025 Gilver E. +- Package refactoring diff --git a/anda/system/xpadneo/modules-load-d-xpadneo.conf b/anda/system/xpadneo/modules-load-d-xpadneo.conf deleted file mode 100644 index 9a5fd2d346..0000000000 --- a/anda/system/xpadneo/modules-load-d-xpadneo.conf +++ /dev/null @@ -1 +0,0 @@ -hid_xpadneo diff --git a/anda/system/xpadneo/update.rhai b/anda/system/xpadneo/update.rhai deleted file mode 100644 index 0a63919e92..0000000000 --- a/anda/system/xpadneo/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(gh("atar-axis/xpadneo")); diff --git a/anda/system/xpadneo/xpadneo.spec b/anda/system/xpadneo/xpadneo.spec deleted file mode 100644 index cb50fdef4b..0000000000 --- a/anda/system/xpadneo/xpadneo.spec +++ /dev/null @@ -1,103 +0,0 @@ -%if 0%{?fedora} -%global buildforkernels akmod -%global debug_package %{nil} -%endif - -Name: xpadneo -Version: 0.9.7 -Release: 1%?dist -Summary: Advanced Linux Driver for Xbox One Wireless Gamepad -Group: System Environment/Kernel -License: GPL-3.0 -URL: https://github.com/atar-axis/xpadneo -Source0: %url/archive/v%version/%name-%version.tar.gz -Source1: modules-load-d-xpadneo.conf -Source2: io.github.xpadneo.metainfo.xml - -%global srcname hid-%name - -BuildRequires: gcc -BuildRequires: make -BuildRequires: kmodtool -BuildRequires: systemd-rpm-macros - -Requires: bash -Requires: bluez bluez-tools - -Provides: %{name}-kmod-common = %{version}-%{release} -Requires: %{name}-kmod >= %{version} -Obsoletes: %{name} < 0.9.1-2 - -# kmodtool does its magic here -%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } - -%description -Advanced Linux Driver for Xbox One Wireless Controller - -%package kmod -Summary: Kernel module (kmod) for %{name} -Requires: kernel-devel - -%description kmod -This is the first driver for the Xbox One Wireless Gamepad (which is shipped with the Xbox One S). - -%prep -# error out if there was something wrong with kmodtool -%{?kmodtool_check} - -# print kmodtool output for debugging purposes: -kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null - -%setup -q - -for kernel_version in %{?kernel_versions} ; do - cp -a hid-xpadneo/src _kmod_build_${kernel_version%%___*} -done - -%build -for kernel_version in %{?kernel_versions} ; do - make V=1 %{?_smp_mflags} -C ${kernel_version##*___} M=${PWD}/_kmod_build_${kernel_version%%___*} VERSION=v%{version} modules -done - -%install -for kernel_version in %{?kernel_versions}; do - mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - install -D -m 755 _kmod_build_${kernel_version%%___*}/hid-xpadneo.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/*.ko -done -%{?akmod_install} - -install -Dm644 hid-xpadneo/etc-modprobe.d/xpadneo.conf %{buildroot}%{_modprobedir}/60-xpadneo.conf -install -Dm644 %{SOURCE1} %{buildroot}%{_modulesloaddir}/xpadneo.conf -install -Dm644 hid-xpadneo/etc-udev-rules.d/60-xpadneo.rules %{buildroot}%{_udevrulesdir}/60-xpadneo.rules -install -Dm644 %{SOURCE2} %{buildroot}%{_datadir}/metainfo/io.github.xpadneo.metainfo.xml - -%files -%doc NEWS.md docs/README.md docs/CONFIGURATION.md -%license LICENSE -%{_modprobedir}/60-xpadneo.conf -%{_modulesloaddir}/xpadneo.conf -%{_udevrulesdir}/60-xpadneo.rules -%{_datadir}/metainfo/io.github.xpadneo.metainfo.xml - -%changelog -* Wed Oct 12 2022 Jan Drögehoff - 0.9.5-1 -- Update to 0.9.5 - -* Mon Jul 04 2022 Jan Drögehoff - 0.9.4-1 -- Update to 0.9.4 - -* Sun May 29 2022 Jan Drögehoff - 0.9.2-1 -- Update to 0.9.2 - -* Thu Jun 17 2021 Jan Drögehoff - 0.9.1-2 -- Move from DKMS to Akmods - -* Fri May 21 2021 Jan Drögehoff - 0.9.1-1 -- Update to 0.9.1 - -* Mon Dec 28 21:58:05 CET 2020 Jan Drögehoff - 0.9-2 -- remove configure script - -* Mon Dec 28 21:01:47 CET 2020 Jan Drögehoff - 0.9-1 -- Initial Spec diff --git a/anda/system/zenpower3/zenpower3.spec b/anda/system/zenpower3/zenpower3.spec index de65ea7976..b0c25eb753 100644 --- a/anda/system/zenpower3/zenpower3.spec +++ b/anda/system/zenpower3/zenpower3.spec @@ -4,7 +4,7 @@ # There will probably not be an update script for this package, since this kernel module # is kind of dead, I will update them manually when needed. -%global commit c176fdb0d5bcba6ba2aba99ea36812e40f47751f +%global commit 138fa0637b46a0b0a087f2ba4e9146d2f9ba2475 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: %{prjname} diff --git a/anda/terra/mock-configs/terra-mock-configs.spec b/anda/terra/mock-configs/terra-mock-configs.spec index c96477a9e0..5c12f8daaf 100644 --- a/anda/terra/mock-configs/terra-mock-configs.spec +++ b/anda/terra/mock-configs/terra-mock-configs.spec @@ -1,6 +1,6 @@ Name: terra-mock-configs -Version: 1.4.1 -Release: 2%?dist +Version: 2.1.0 +Release: 1%?dist Epoch: 1 Summary: Mock configs for Terra repos @@ -27,13 +27,13 @@ Obsoletes: anda-mock-configs < 3-2%{?dist} mkdir -p %{buildroot}%{_sysusersdir} mkdir -p %{buildroot}%{_sysconfdir}/mock/templates -# not copying terra-el.tpl as that might be a duplicate -cp -v -t %{buildroot}%{_sysconfdir}/mock/templates/ terra.tpl terra-el-dev.tpl +# not copying terra-el-dev.tpl as we aren't using dev +cp -v -t %{buildroot}%{_sysconfdir}/mock/templates/ terra.tpl terra-el.tpl cp -v *.cfg %{buildroot}%{_sysconfdir}/mock/ %files %config %{_sysconfdir}/mock/templates/terra.tpl -%config %{_sysconfdir}/mock/templates/terra-el-dev.tpl +%config %{_sysconfdir}/mock/templates/terra-el.tpl %config %{_sysconfdir}/mock/terra-*-x86_64.cfg %config %{_sysconfdir}/mock/terra-*-aarch64.cfg %config %{_sysconfdir}/mock/terra-*-i386.cfg diff --git a/anda/terra/srpm-macros/anda-srpm-macros.spec b/anda/terra/srpm-macros/anda-srpm-macros.spec index c3c7168965..4894ab7091 100644 --- a/anda/terra/srpm-macros/anda-srpm-macros.spec +++ b/anda/terra/srpm-macros/anda-srpm-macros.spec @@ -1,5 +1,5 @@ Name: anda-srpm-macros -Version: 0.2.6 +Version: 0.2.20 Release: 1%?dist Summary: SRPM macros for extra Fedora packages @@ -25,13 +25,19 @@ BuildArch: noarch for file in ./macros.*; do install -Dpm644 -t %buildroot%_rpmmacrodir $file done +install -Dpm755 *.sh -t %buildroot%_libexecdir/%name/ %files +%attr(0755, root, root) %_libexecdir/%name/*.sh %{_rpmmacrodir}/macros.anda %{_rpmmacrodir}/macros.caching %{_rpmmacrodir}/macros.cargo_extra +%{_rpmmacrodir}/macros.electron %{_rpmmacrodir}/macros.go_extra %{_rpmmacrodir}/macros.nim_extra +%{_rpmmacrodir}/macros.nodejs_extra +%{_rpmmacrodir}/macros.web-assets_extra +%{_rpmmacrodir}/macros.zig_extra %changelog diff --git a/anda/themes/fluent-icon-theme/fluent-icon-theme.spec b/anda/themes/fluent-icon-theme/fluent-icon-theme.spec index 881cdb1e27..3bdb54e79d 100644 --- a/anda/themes/fluent-icon-theme/fluent-icon-theme.spec +++ b/anda/themes/fluent-icon-theme/fluent-icon-theme.spec @@ -1,7 +1,7 @@ -%global tag 2025-02-10 +%global tag 2025-08-21 Name: fluent-icon-theme -Version: 20250210 +Version: 20250821 Release: 1%?dist Summary: Fluent icon theme for linux desktops @@ -11,6 +11,7 @@ Source0: %{url}/archive/refs/tags/%{tag}.tar.gz BuildArch: noarch BuildRequires: gtk-update-icon-cache fdupes +Conflicts: %name %description Fluent icon theme for linux desktops. diff --git a/anda/themes/fluent-kde-theme/fluent-kde-theme.spec b/anda/themes/fluent-kde-theme/fluent-kde-theme.spec index 673f0ef570..b35d46a3f0 100644 --- a/anda/themes/fluent-kde-theme/fluent-kde-theme.spec +++ b/anda/themes/fluent-kde-theme/fluent-kde-theme.spec @@ -1,5 +1,5 @@ -%global commit 9d6b7d4733707c38f72e8a614528f1df591419f3 -%global commit_date 20240827 +%global commit 315251f3e0099fc7afa7ab183880141a478f584e +%global commit_date 20250428 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: fluent-kde-theme diff --git a/anda/themes/fluent-theme/fluent-theme.spec b/anda/themes/fluent-theme/fluent-theme.spec index 8f0d302773..e42cd8bf72 100644 --- a/anda/themes/fluent-theme/fluent-theme.spec +++ b/anda/themes/fluent-theme/fluent-theme.spec @@ -1,7 +1,7 @@ -%global tag 2024-06-12 +%global tag 2025-04-17 Name: fluent-theme -Version: 20240612 +Version: 20250417 Release: 1%?dist Summary: Fluent design theme for GNOME/GTK based desktop environments diff --git a/anda/themes/helium-gtk-theme/helium-gtk-theme.spec b/anda/themes/helium-gtk-theme/helium-gtk-theme.spec index 7b0a7e09d7..3c9031e68a 100644 --- a/anda/themes/helium-gtk-theme/helium-gtk-theme.spec +++ b/anda/themes/helium-gtk-theme/helium-gtk-theme.spec @@ -1,4 +1,4 @@ -%global ver 1.8.24 +%global ver 1.8.59 Summary: tauOS GTK/GNOME Shell Themes Name: helium-gtk-theme diff --git a/anda/themes/kde-material-you-colors/anda.hcl b/anda/themes/kde-material-you-colors/anda.hcl new file mode 100644 index 0000000000..d5adf4955b --- /dev/null +++ b/anda/themes/kde-material-you-colors/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "kde-material-you-colors.spec" + } +} diff --git a/anda/themes/kde-material-you-colors/kde-material-you-colors.spec b/anda/themes/kde-material-you-colors/kde-material-you-colors.spec new file mode 100644 index 0000000000..5de39bcb08 --- /dev/null +++ b/anda/themes/kde-material-you-colors/kde-material-you-colors.spec @@ -0,0 +1,79 @@ +Name: kde-material-you-colors +Version: 1.10.1 +Release: 1%?dist +Summary: Automatic Material You Colors Generator from your wallpaper for the Plasma Desktop +License: GPL-3.0-only +URL: https://github.com/luisbocanegra/%{name} +# The PyPi source is a more generic install and lacks the Plasmoid config +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: cmake >= 3.16 +BuildRequires: extra-cmake-modules >= 6.0.0 +BuildRequires: fdupes +BuildRequires: generic-logos +BuildRequires: libplasma-devel +BuildRequires: plasma5support-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-devel +BuildRequires: python-rpm-macros +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) >= 61.0 +BuildRequires: python3dist(wheel) >= 0.37.1 +BuildRequires: qt5-qtbase-devel +Requires: qt5-qtbase +Requires: kf6-filesystem >= 6.0.0 +Requires: python3-%{name} = %{version}-%{release} +Packager: Gilver E. + +%description +Automatic Material You Colors Generator from your wallpaper for the Plasma Desktop + +%package -n python3-%{name} +Summary: Python files for %{name} +Requires: %{name} = %{version}-%{release} +Requires: python3-dbus +Requires: python3dist(numpy) >= 1.20 +Requires: python3dist(materialyoucolor) >= 2.0.9 +Requires: python3dist(pywal16) +Requires: python3dist(pillow) +BuildArch: noarch + +%description -n python3-%{name} +Python files for KDE Material You Colors. + +%prep +%autosetup -p1 -n %{name}-%{version} + +%build +%pyproject_wheel +%cmake \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DINSTALL_PLASMOID=ON +%cmake_build + +%install +%pyproject_install +DESTDIR="%{buildroot}" %cmake_install + +sed -i "1{/^#!\/usr\/bin\/env python3/d}" %{buildroot}%{python3_sitelib}/kde_material_you_colors/main.py +%fdupes %{buildroot}%{python3_sitelib}/%{name}/ + + +%files +%doc CHANGELOG.md +%doc README.md +%license LICENSE +%{_bindir}/%{name}-screenshot-helper +%{_datadir}/applications/%{name}-screenshot-helper.desktop +%{_datadir}/metainfo/luisbocanegra.kdematerialyou.colors.appdata.xml +%{_datadir}/plasma/plasmoids/luisbocanegra.kdematerialyou.colors/ + +%files -n python3-%{name} +%{_bindir}/%{name} +%{python3_sitelib}/kde_material_you_colors/ +%{python3_sitelib}/kde_material_you_colors-%{version}.dist-info/ + +%changelog +* Wed May 28 2025 Gilver E. +- Initial package diff --git a/anda/themes/kde-material-you-colors/update.rhai b/anda/themes/kde-material-you-colors/update.rhai new file mode 100644 index 0000000000..7d94a6b1d0 --- /dev/null +++ b/anda/themes/kde-material-you-colors/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("kde-material-you-colors")); diff --git a/anda/themes/klassy/klassy.spec b/anda/themes/klassy/klassy.spec index ef58ebe8be..79663ec613 100644 --- a/anda/themes/klassy/klassy.spec +++ b/anda/themes/klassy/klassy.spec @@ -1,8 +1,8 @@ Name: klassy %global forgeurl https://github.com/paulmcauley/%{name} -%global tag 6.2.breeze6.2.1 -%global date 20241018 +%global tag 6.4.breeze6.4.0 +%global date 20250617 %forgemeta Version: %{tag} @@ -12,6 +12,7 @@ License: GPL-2.0-or-later Group: System/GUI/KDE URL: %{forgeurl} Source: %{forgesource} +Patch0: https://github.com/paulmcauley/klassy/pull/178.patch Obsoletes: classikstyles <= %{version} Obsoletes: classik <= %{version} @@ -65,7 +66,7 @@ BuildRequires: cmake(KF6KirigamiPlatform) BuildRequires: cmake(KF6Package) BuildRequires: cmake(KF6WindowSystem) -BuildRequires: cmake(KDecoration2) +BuildRequires: cmake(KDecoration3) BuildRequires: cmake(Plasma) BuildRequires: cmake(Plasma5Support) @@ -99,8 +100,8 @@ Klassy (formerly ClassiK/ClassikStyles) is a highly customizable binary Window D %{_kf6_qtplugindir}/styles/klassy6.so %{_kf6_qtplugindir}/kstyle_config/klassystyleconfig.so -%{_kf6_qtplugindir}/org.kde.kdecoration2/org.kde.klassy.so -%{_kf6_qtplugindir}/org.kde.kdecoration2.kcm/kcm_klassydecoration.so +%{_kf6_qtplugindir}/org.kde.kdecoration3/org.kde.klassy.so +%{_kf6_qtplugindir}/org.kde.kdecoration3.kcm/kcm_klassydecoration.so %{_kf6_qtplugindir}/org.kde.kdecoration2.kcm/klassydecoration/presets/* %{_kf6_datadir}/applications/kcm_klassydecoration.desktop diff --git a/anda/themes/lightly-qt5/update.rhai b/anda/themes/lightly-qt5/update.rhai index aa9465c548..cb64dfe576 100644 --- a/anda/themes/lightly-qt5/update.rhai +++ b/anda/themes/lightly-qt5/update.rhai @@ -1,4 +1,6 @@ -fn main() { +import "andax/bump_extras.rhai" as bump; + +fn main(labels) { let branch = bump::as_bodhi_ver(labels.branch); let url = `https://bodhi.fedoraproject.org/updates/?search=qt5-5.&status=stable&releases=${branch}&rows_per_page=1&page=1`; for entry in get(url).json().updates[0].title.split(' ') { @@ -9,4 +11,4 @@ fn main() { } } -open_file("anda/themes/lightly-qt5/VER5.txt").write(`${main()}`); // will trig rebuild when changed +open_file("anda/themes/lightly-qt5/VER5.txt").write(`${main(labels)}`); // will trig rebuild when changed diff --git a/anda/themes/lightly-qt6/VER6.txt b/anda/themes/lightly-qt6/VER6.txt index 45a4fb75db..ec635144f6 100644 --- a/anda/themes/lightly-qt6/VER6.txt +++ b/anda/themes/lightly-qt6/VER6.txt @@ -1 +1 @@ -8 +9 diff --git a/anda/themes/lightly-qt6/lightly-qt6.spec b/anda/themes/lightly-qt6/lightly-qt6.spec index ae5a5462fb..1540ed38e2 100644 --- a/anda/themes/lightly-qt6/lightly-qt6.spec +++ b/anda/themes/lightly-qt6/lightly-qt6.spec @@ -2,6 +2,7 @@ %global _style lightly %global dev boehs %global _qt_major_version 6 +%global _qt_old_major 5 %global forgeurl https://github.com/%{dev}/%{style} %global commit 00ca23447844114d41bfc0d37cf8823202c082e8 @@ -49,7 +50,10 @@ BuildRequires: cmake(KF%{_qt_major_version}Kirigami2) BuildRequires: cmake(KF%{_qt_major_version}Notifications) BuildRequires: cmake(KF%{_qt_major_version}Package) BuildRequires: cmake(KF%{_qt_major_version}WindowSystem) - + +BuildRequires: cmake(Qt%{_qt_old_major}Core) +BuildRequires: cmake(Qt%{_qt_old_major}Gui) + BuildRequires: cmake(KDecoration2) BuildRequires: cmake(KWayland) BuildRequires: cmake(Plasma) @@ -71,7 +75,12 @@ Lightly is a fork of breeze theme style that aims to be visually modern and mini %forgeautosetup -p1 %build -%cmake_kf6 -DQT_MAJOR_VERSION=%{_qt_major_version} +%cmake_kf6 \ + -DQT_MAJOR_VERSION=%{_qt_major_version} \ + -DCMAKE_INSTALL_PREFIX=%{_prefix} \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTING=OFF \ + -DKDE_INSTALL_USE_QT_SYS_PATHS=ON %cmake_build %install diff --git a/anda/themes/lightly-qt6/update.rhai b/anda/themes/lightly-qt6/update.rhai index f969fd9229..7bb777b29d 100644 --- a/anda/themes/lightly-qt6/update.rhai +++ b/anda/themes/lightly-qt6/update.rhai @@ -1,4 +1,6 @@ -fn main() { +import "andax/bump_extras.rhai" as bump; + +fn main(labels) { let branch = bump::as_bodhi_ver(labels.branch); let url = `https://bodhi.fedoraproject.org/updates/?search=qt6-6.&status=stable&releases=${branch}&rows_per_page=1&page=1`; for entry in get(url).json().updates[0].title.split(' ') { @@ -9,4 +11,4 @@ fn main() { } } -open_file("anda/themes/lightly-qt6/VER6.txt").write(`${main()}`); // will trig rebuild when changed +open_file("anda/themes/lightly-qt6/VER6.txt").write(`${main(labels)}`); // will trig rebuild when changed diff --git a/anda/themes/tela-icon-theme/tela-icon-theme.spec b/anda/themes/tela-icon-theme/tela-icon-theme.spec index df2202b402..209e03ed0a 100644 --- a/anda/themes/tela-icon-theme/tela-icon-theme.spec +++ b/anda/themes/tela-icon-theme/tela-icon-theme.spec @@ -1,5 +1,5 @@ -%global commit fea810d948a663f336060b97db556274af3fc7c7 -%global commit_date 20250210 +%global commit 5c8027a79e9761f9daf8285874bdd210625c76f5 +%global commit_date 20250819 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: tela-icon-theme diff --git a/anda/tools/abuild/abuild.spec b/anda/tools/abuild/abuild.spec deleted file mode 100644 index 28d368421f..0000000000 --- a/anda/tools/abuild/abuild.spec +++ /dev/null @@ -1,25 +0,0 @@ -Name: abuild -Version: 24.12 -Release: 1%?dist -Summary: coreboot autobuild script builds coreboot images for all available targets. -URL: https://doc.coreboot.org/util/abuild/index.html -License: GPLv2 -BuildRequires: git -BuildArch: noarch -Packager: Owen Zimmerman - -%description -%summary - -%prep -git clone https://review.coreboot.org/coreboot.git -b %version - -%install -install -Dm 777 coreboot/util/abuild/abuild %buildroot%_bindir/abuild - -%files -/usr/bin/abuild - -%changelog -* Sat Feb 01 2025 Owen Zimmerman -- Initial Package \ No newline at end of file diff --git a/anda/tools/abuild/anda.hcl b/anda/tools/abuild/anda.hcl deleted file mode 100644 index c03ce6e01d..0000000000 --- a/anda/tools/abuild/anda.hcl +++ /dev/null @@ -1,6 +0,0 @@ -project pkg { - arches = ["x86_64"] - rpm { - spec = "abuild.spec" - } -} \ No newline at end of file diff --git a/anda/tools/abuild/update.rhai b/anda/tools/abuild/update.rhai deleted file mode 100644 index 24c1901edd..0000000000 --- a/anda/tools/abuild/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(gh_tag("coreboot/coreboot")); \ No newline at end of file diff --git a/anda/tools/arduino-cli/arduino-cli.spec b/anda/tools/arduino-cli/arduino-cli.spec index 58efdb8b9b..cb7b0d61c8 100644 --- a/anda/tools/arduino-cli/arduino-cli.spec +++ b/anda/tools/arduino-cli/arduino-cli.spec @@ -1,35 +1,47 @@ -%define _build_shell /bin/bash -%define debug_package %nil +# https://github.com/arduino/arduino-cli +%global goipath github.com/arduino/arduino-cli +Version: 1.3.0 -Name: arduino-cli -Version: 1.1.1 -Release: 1%?dist -Summary: Arduino command line tool. -License: GPLv3 -Packager: Owen Zimmerman -Url: https://github.com/arduino/arduino-cli -Source0: %url/archive/refs/tags/v%version.tar.gz -BuildRequires: golang git go-rpm-macros anda-srpm-macros +%gometa -f -%description -%summary + +%global common_description %{expand: +Arduino CLI is an all-in-one solution that provides Boards/Library Managers, sketch builder, board detection, uploader, and many other tools needed to use any Arduino compatible board and platform from command line or machine interfaces.} + +%global golicenses LICENSE.txt +%global godocs README.md + +Name: arduino-cli +Release: 1%?dist +Summary: Arduino command line tool +License: GPL-3.0 +Packager: Owen Zimmerman + +URL: %{gourl} +Source: %{gosource} +BuildRequires: anda-srpm-macros + +%description %{common_description} + +%gopkg %prep -%autosetup -n arduino-cli-%version +%goprep +%go_prep_online %build -mkdir -p bin -%go_build_online +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/arduino-cli %{goipath} %install -mkdir -p %{buildroot}%{_bindir} -install -Dm 755 build/bin/arduino-cli %buildroot%{_bindir}/arduino-cli +install -Dm755 %{gobuilddir}/bin/arduino-cli -t %buildroot%{_bindir} %files %license LICENSE.txt -%doc README.md +%doc README.md %{_bindir}/arduino-cli %changelog * Thu Dec 5 2024 Owen Zimmerman -- Package arduino-cli \ No newline at end of file +- Package arduino-cli + diff --git a/anda/tools/arduino-create-agent/arduino-create-agent.spec b/anda/tools/arduino-create-agent/arduino-create-agent.spec index e3a1683154..45d90793de 100644 --- a/anda/tools/arduino-create-agent/arduino-create-agent.spec +++ b/anda/tools/arduino-create-agent/arduino-create-agent.spec @@ -1,29 +1,43 @@ -%define debug_package %nil +# https://github.com/arduino/arduino-create-agent +%global goipath github.com/arduino/arduino-create-agent +Version: 1.7.0 -Name: arduino-create-agent -Version: 1.6.1 -Release: 1%?dist -Summary: Arduino Cloud Agent. -License: AGPLv3 -Packager: Owen Zimmerman -Url: https://github.com/arduino/arduino-create-agent -Source0: %url/archive/refs/tags/%version.tar.gz -Patch0: update.patch -BuildRequires: golang git go-rpm-macros anda-srpm-macros +%gometa -f -%description + +%global common_description %{expand: The Arduino Cloud Agent is a single binary that will sit on the traybar and work in the background. -It allows you to use the Arduino Cloud to seamlessly upload code to any USB connected Arduino board (or Yún in LAN) directly from the browser. +It allows you to use the Arduino Cloud to seamlessly upload code to any USB connected Arduino board (or Yún in LAN) directly from the browser.} + +%global golicenses LICENSE.txt +%global godocs README.md + +Name: arduino-create-agent +Release: 1%?dist +Summary: Arduino Cloud Agent +License: AGPL-3.0 +Packager: Owen Zimmerman + +URL: %{gourl} +Source: %{url}/archive/%{version}.tar.gz +BuildRequires: anda-srpm-macros + +%description %{common_description} + +%gopkg %prep -%autosetup -n arduino-create-agent-%version -p1 +%goprep +%go_prep_online %build -%go_build_online +sed -E '/^func Start\(/,/^\}$/s@return start\(src\)@return ""@' -i updater/updater.go +sed -E '\?r.POST\("/update", updateHandler\)?d' -i main.go +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/arduino-create-agent %{goipath} %install -mkdir -p %{buildroot}%{_bindir} -install -Dm 755 build/bin/arduino-create-agent %buildroot%{_bindir}/arduino-create-agent +install -Dm755 %{gobuilddir}/bin/arduino-create-agent -t %buildroot%{_bindir} %files %license LICENSE.txt @@ -33,3 +47,4 @@ install -Dm 755 build/bin/arduino-create-agent %buildroot%{_bindir}/arduino-crea %changelog * Sat Jan 25 2025 Owen Zimmerman - Package arduino-create-agent + diff --git a/anda/tools/arduino-create-agent/update.patch b/anda/tools/arduino-create-agent/update.patch deleted file mode 100644 index f6a59cc201..0000000000 --- a/anda/tools/arduino-create-agent/update.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/main.go b/main.go -index 1ca857b..c945487 100755 ---- a/main.go -+++ b/main.go -@@ -461,7 +461,6 @@ func loop() { - r.Handle("WSS", "/socket.io/", socketHandler) - r.GET("/info", infoHandler) - r.POST("/pause", pauseHandler) -- r.POST("/update", updateHandler) - - // Mount goa handlers - goa := v2.Server(config.GetDataDir().String(), Index) -diff --git a/updater/updater.go b/updater/updater.go -index db4e545..693431a 100644 ---- a/updater/updater.go -+++ b/updater/updater.go -@@ -34,7 +34,7 @@ import ( - // binary to be executed to perform the update. If no update has been downloaded - // it returns an empty string. - func Start(src string) string { -- return start(src) -+ return "" - } - - // CheckForUpdates checks if there is a new version of the binary available and diff --git a/anda/tools/arduino-fwuploader/arduino-fwuploader.spec b/anda/tools/arduino-fwuploader/arduino-fwuploader.spec index 397dcb0e0b..b2c156bfde 100644 --- a/anda/tools/arduino-fwuploader/arduino-fwuploader.spec +++ b/anda/tools/arduino-fwuploader/arduino-fwuploader.spec @@ -1,28 +1,41 @@ -%define debug_package %nil +# https://github.com/arduino/arduino-fwuploader +%global goipath github.com/arduino/arduino-fwuploader +Version: 2.4.1 -Name: arduino-fwuploader -Version: 2.4.1 -Release: 1%?dist -Summary: A Command Line Tool made to update the firmware and/or add SSL certificates for any Arduino board equipped with WINC or NINA Wi-Fi module. -License: AGPLv3 -Packager: Owen Zimmerman -Url: https://github.com/arduino/arduino-fwuploader -Source0: %url/archive/refs/tags/%version.tar.gz -BuildRequires: golang git go-rpm-macros anda-srpm-macros python3 go-task +%gometa -f + + +%global common_description %{expand: +The Arduino Firmware Uploader is a tool made to update the firmware and/or add SSL certificates for any Arduino board equipped with ESP32-S3 or NINA Wi-Fi module.} + +%global golicenses LICENSE.txt +%global godocs README.md + +Name: arduino-fwuploader +Release: 2%?dist +Summary: Update the firmware and/or add SSL certificates for any Arduino board equipped with WINC or NINA Wi-Fi module +License: AGPL-3.0 +Packager: Owen Zimmerman + +URL: %{gourl} +Source: %{url}/archive/%{version}.tar.gz +BuildRequires: anda-srpm-macros python3-devel go-task %description -%summary +%{common_description} + +%gopkg %prep -%autosetup -n arduino-fwuploader-%version +%goprep +%go_prep_online %build -mkdir -p bin -%go_build_online +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/arduino-fwuploader %{goipath} %install -mkdir -p %{buildroot}%{_bindir} -install -Dm 755 build/bin/arduino-fwuploader %buildroot%{_bindir}/arduino-fwuploader +install -Dm755 %{gobuilddir}/bin/arduino-fwuploader -t %buildroot%{_bindir} %files %license LICENSE.txt @@ -31,4 +44,4 @@ install -Dm 755 build/bin/arduino-fwuploader %buildroot%{_bindir}/arduino-fwuplo %changelog * Sat Dec 28 2024 Owen Zimmerman -- Package arduino-fwuploader \ No newline at end of file +- Package arduino-fwuploader diff --git a/anda/tools/arduino-language-server/arduino-language-server.spec b/anda/tools/arduino-language-server/arduino-language-server.spec index 382edf2333..97934e1247 100644 --- a/anda/tools/arduino-language-server/arduino-language-server.spec +++ b/anda/tools/arduino-language-server/arduino-language-server.spec @@ -1,28 +1,41 @@ -%define debug_package %nil +# https://github.com/arduino/arduino-language-server +%global goipath github.com/arduino/arduino-language-server +Version: 0.7.7 -Name: arduino-language-server -Version: 0.7.6 -Release: 1%?dist -Summary: Arduino command line tool. -License: AGPLv3 -Packager: Owen Zimmerman -Url: https://github.com/arduino/arduino-language-server -Source0: %url/archive/refs/tags/%version.tar.gz -BuildRequires: golang git go-rpm-macros anda-srpm-macros clang arduino-cli +%gometa -f + + +%global common_description %{expand: +The Arduino Language Server is the tool that powers the autocompletion of the new Arduino IDE 2. It implements the standard Language Server Protocol so it can be used with other IDEs as well.} + +%global golicenses LICENSE.txt +%global godocs README.md + +Name: arduino-language-server +Release: 1%?dist +Summary: An Arduino Language Server based on Clangd for Arduino code autocompletion +License: AGPL-3.0 +Packager: Owen Zimmerman + +URL: %{gourl} +Source: %{url}/archive/%{version}.tar.gz +BuildRequires: anda-srpm-macros clang %description -%summary +%{common_description} + +%gopkg %prep -%autosetup -n arduino-language-server-%version +%goprep +%go_prep_online %build -mkdir -p bin -%go_build_online +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/arduino-language-server %{goipath} %install -mkdir -p %{buildroot}%{_bindir} -install -Dm 755 build/bin/arduino-language-server %buildroot%{_bindir}/arduino-language-server +install -Dm755 %{gobuilddir}/bin/arduino-language-server -t %buildroot%{_bindir} %files %license LICENSE.txt @@ -32,3 +45,4 @@ install -Dm 755 build/bin/arduino-language-server %buildroot%{_bindir}/arduino-l %changelog * Fri Dec 27 2024 Owen Zimmerman - Package arduino-language-server + diff --git a/anda/tools/arduino-lint/arduino-lint.spec b/anda/tools/arduino-lint/arduino-lint.spec index a4329920cf..46bdd1e7c0 100644 --- a/anda/tools/arduino-lint/arduino-lint.spec +++ b/anda/tools/arduino-lint/arduino-lint.spec @@ -1,27 +1,44 @@ -%define debug_package %nil +# https://github.com/arduino/arduino-lint +%global goipath github.com/arduino/arduino-lint +Version: 1.3.0 -Name: arduino-lint -Version: 1.3.0 -Release: 1%?dist -Summary: Tool to check for problems with Arduino projects. -License: GPLv3 -Packager: Owen Zimmerman -Url: https://github.com/arduino/arduino-lint -Source0: %url/archive/refs/tags/%version.tar.gz -BuildRequires: golang git go-rpm-macros anda-srpm-macros +%gometa -f + + +%global common_description %{expand: +Arduino Lint is a command line tool that checks for common problems in Arduino projects: + Sketches + Libraries + Boards platforms} + +%global golicenses LICENSE.txt +%global godocs README.md + +Name: arduino-lint +Release: 2%?dist +Summary: Tool to check for problems with Arduino projects +License: GPL-3.0 +Packager: Owen Zimmerman + +URL: %{gourl} +Source: %{url}/archive/%{version}.tar.gz +BuildRequires: anda-srpm-macros %description -%summary +%{common_description} + +%gopkg %prep -%autosetup -n arduino-lint-%version +%goprep +%go_prep_online %build -go build +%define gomodulesmode GO111MODULE=on +%gobuild -o %{gobuilddir}/bin/arduino-lint %{goipath} %install -mkdir -p %{buildroot}%{_bindir} -install -Dm 755 arduino-lint %buildroot%{_bindir}/arduino-lint +install -Dm755 %{gobuilddir}/bin/arduino-lint -t %buildroot%{_bindir} %files %license LICENSE.txt @@ -30,4 +47,5 @@ install -Dm 755 arduino-lint %buildroot%{_bindir}/arduino-lint %changelog * Thu Dec 5 2024 Owen Zimmerman -- Package arduino-lint \ No newline at end of file +- Package arduino-lint + diff --git a/anda/tools/bdf2sfd/anda.hcl b/anda/tools/bdf2sfd/anda.hcl new file mode 100644 index 0000000000..69579731c5 --- /dev/null +++ b/anda/tools/bdf2sfd/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "bdf2sfd.spec" + } +} diff --git a/anda/tools/bdf2sfd/bdf2sfd.spec b/anda/tools/bdf2sfd/bdf2sfd.spec new file mode 100644 index 0000000000..40b48b09a2 --- /dev/null +++ b/anda/tools/bdf2sfd/bdf2sfd.spec @@ -0,0 +1,30 @@ +Name: bdf2sfd +Version: 1.1.9 +Release: 1%?dist +Summary: BDF to SFD converter, allowing to vectorize bitmap fonts +License: BSD-2-Clause +URL: https://github.com/fcambus/bdf2sfd +Source0: %url/archive/refs/tags/1.1.9.tar.gz +BuildRequires: cmake gcc + +%description +bdf2sfd is a BDF to SFD converter, allowing to vectorize bitmap fonts. + +It works by converting each pixel of a glyph to a polygon, which produces +large and unoptimized SFD files that should be post-processed using FontForge. + +%prep +%autosetup + +%build +%cmake +%cmake_build + +%install +%cmake_install + +%files +%doc README.md ChangeLog AUTHORS THANKS +%license LICENSE +%_bindir/%name +%_mandir/man1/%name.* diff --git a/anda/tools/bdf2sfd/update.rhai b/anda/tools/bdf2sfd/update.rhai new file mode 100644 index 0000000000..e69de29bb2 diff --git a/anda/tools/bmpblk_utility/anda.hcl b/anda/tools/bmpblk_utility/anda.hcl new file mode 100644 index 0000000000..490732d808 --- /dev/null +++ b/anda/tools/bmpblk_utility/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "bmpblk_utility.spec" + } +} diff --git a/anda/tools/bmpblk_utility/bmpblk_utility.spec b/anda/tools/bmpblk_utility/bmpblk_utility.spec new file mode 100644 index 0000000000..d9793c05db --- /dev/null +++ b/anda/tools/bmpblk_utility/bmpblk_utility.spec @@ -0,0 +1,50 @@ +%define _debugsource_template %{nil} + +%define commit cd7d8fac1be33c2bdf06494f174b2ecb0e2f4f8e +%global shortcommit %{sub %{commit} 1 12} +%global commit_date 250419 + +Name: bmpblk_utility +Version: 0~%{commit_date}git.%{shortcommit} +Release: 1%{?dist} +Summary: A utility to create/modify the bmpfv in the GBB of chromebooks running old stock firmware + +License: BSD-3-Clause +URL: https://git.tree123.org/WeirdTreeThing/bmpblk_utility +Source0: https://git.tree123.org/WeirdTreeThing/bmpblk_utility/archive/main.tar.gz +Source1: https://chromium.googlesource.com/chromium/src/+/HEAD/LICENSE + +BuildRequires: make +BuildRequires: gcc +BuildRequires: gcc-g++ +BuildRequires: xz-libs +BuildRequires: xz-devel +BuildRequires: libyaml +BuildRequires: libyaml-devel + +packager: Owen Zimmerman + +%description +%summary. + +%prep +%autosetup -n bmpblk_utility + +%build +./build.sh + +%install +install -Dm 644 %{SOURCE1} %{buildroot}%{_licensedir}/%{name}/LICENSE + +install -Dm 755 build/bmpblk_utility %{buildroot}%{_bindir}/bmpblk_utility +install -Dm 755 build/bmpblk_font %{buildroot}%{_bindir}/bmpblk_font + +%files +%license %{_licensedir}/%{name}/LICENSE +%doc README.md +%{_bindir}/bmpblk_utility +%{_bindir}/bmpblk_font + +%changelog +* Tue Jul 01 2025 Owen Zimmerman +- initial package diff --git a/anda/tools/buildsys/anda/rust-anda.spec b/anda/tools/buildsys/anda/rust-anda.spec index 8db2cc50b1..ded06bd27a 100644 --- a/anda/tools/buildsys/anda/rust-anda.spec +++ b/anda/tools/buildsys/anda/rust-anda.spec @@ -5,7 +5,7 @@ %global crate anda Name: rust-anda -Version: 0.4.8 +Version: 0.4.13 Release: 1%?dist Summary: Andaman Build toolchain @@ -17,19 +17,15 @@ ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging >= 21 BuildRequires: anda-srpm-macros +BuildRequires: openssl-devel +%if 0%{?fedora} BuildRequires: openssl-devel-engine +%endif BuildRequires: git-core BuildRequires: libgit2-devel BuildRequires: libssh2-devel BuildRequires: mold -Requires: mock-scm -Requires: rpm-build -Requires: createrepo_c -Requires: git-core -Requires: libgit2 -Requires: script - %global _description %{expand: Andaman Build toolchain.} @@ -37,6 +33,15 @@ Andaman Build toolchain.} %package -n %{crate} Summary: %{summary} +Requires: mock +Requires: rpm-build +Requires: createrepo_c +Requires: git-core +Requires: libgit2 +%if 0%{?fedora} >= 42 +Requires: mock-filesystem +Requires: util-linux-script +%endif %description -n %{crate} %{_description} diff --git a/anda/tools/buildsys/gradle/gradle.spec b/anda/tools/buildsys/gradle/gradle.spec index 272ee03f0f..d5ec147afb 100644 --- a/anda/tools/buildsys/gradle/gradle.spec +++ b/anda/tools/buildsys/gradle/gradle.spec @@ -1,5 +1,5 @@ Name: gradle -Version: 8.12.1 +Version: 9.0.0 Release: 1%?dist Summary: Powerful build system for the JVM URL: https://gradle.org/ diff --git a/anda/tools/buildsys/katsu/katsu.spec b/anda/tools/buildsys/katsu/katsu.spec index 6a86e30fd5..e5a910b1f5 100644 --- a/anda/tools/buildsys/katsu/katsu.spec +++ b/anda/tools/buildsys/katsu/katsu.spec @@ -6,7 +6,7 @@ %global cargo_install_lib 0 Name: katsu -Version: 0.9.0 +Version: 0.9.2 Release: 1%?dist Summary: Vicious image builder Packager: madonuko diff --git a/anda/tools/buildsys/mise/mise-fix-metadata-auto.diff b/anda/tools/buildsys/mise/mise-fix-metadata-auto.diff index 700f6e640d..7145ccb2e3 100644 --- a/anda/tools/buildsys/mise/mise-fix-metadata-auto.diff +++ b/anda/tools/buildsys/mise/mise-fix-metadata-auto.diff @@ -1,6 +1,6 @@ ---- mise-2025.2.3/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ mise-2025.2.3/Cargo.toml 2025-02-09T16:23:06.178985+00:00 -@@ -476,18 +476,6 @@ +--- mise-2025.6.6/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ mise-2025.6.6/Cargo.toml 2025-06-23T09:18:21.561501+00:00 +@@ -475,26 +475,6 @@ optional = true default-features = false @@ -8,6 +8,7 @@ -version = "0.42" -features = [ - "archive-zip", +- "compression-zip-deflate", - "signatures", -] -optional = true @@ -15,12 +16,19 @@ - -[target."cfg(windows)".dependencies.sevenz-rust] -version = "0.6" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.9" +-features = [ +- "consoleapi", +- "minwindef", +-] - [lints.clippy] borrowed_box = "allow" -@@ -495,3 +483,4 @@ - level = "warn" - priority = 0 - check-cfg = ["cfg(coverage,coverage_nightly)"] +@@ -509,3 +489,4 @@ + [profile.serious] + lto = true + inherits = "release" + diff --git a/anda/tools/buildsys/mise/rust-mise.spec b/anda/tools/buildsys/mise/rust-mise.spec index 63eef919cb..60bbf918e5 100644 --- a/anda/tools/buildsys/mise/rust-mise.spec +++ b/anda/tools/buildsys/mise/rust-mise.spec @@ -5,7 +5,7 @@ %global crate mise Name: rust-mise -Version: 2025.2.7 +Version: 2025.8.18 Release: 1%?dist Summary: Front-end to your dev env @@ -30,7 +30,7 @@ The front-end to your dev env.} %package -n %{crate} Summary: %{summary} -License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND BSL-1.0 AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND MIT AND (MIT AND (MIT OR Apache-2.0)) AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) +License: ((Apache-2.0 OR MIT) AND BSD-3-Clause) AND (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 AND ISC) AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR ISC OR MIT) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (BSD-3-Clause) AND (CC0-1.0 OR MIT-0 OR Apache-2.0) AND CDLA-Permissive-2.0 AND ISC AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception) AND (MIT OR Apache-2.0 OR BSD-1-Clause) AND (MIT OR Apache-2.0 OR LGPL-2.1-or-later) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND Unicode-3.0 AND (Unlicense OR MIT) AND Zlib AND (Zlib OR Apache-2.0 OR MIT) URL: https://mise.jdx.dev/ %description -n %{crate} %{_description} @@ -44,42 +44,7 @@ URL: https://mise.jdx.dev/ %_mandir/man1/mise.1.gz -%package -n %crate-bash-completion -Summary: Bash completion for %crate -Requires: %{crate} = %{version}-%{release} -Requires: bash-completion -Supplements: (%{crate} and bash-completion) - -%description -n %crate-bash-completion -Bash command line completion support for %{crate}. - -%package -n %crate-fish-completion -Summary: Fish completion for %{crate} -Requires: %{crate} = %{version}-%{release} -Requires: fish -Supplements: (%{crate} and fish) - -%description -n %crate-fish-completion -Fish command line completion support for %{crate}. - -%package -n %crate-zsh-completion -Summary: Zsh completion for %{crate} -Requires: %{crate} = %{version}-%{release} -Requires: zsh -Supplements: (%{crate} and zsh) - -%description -n %crate-zsh-completion -Zsh command line completion support for %{crate}. - - -%files -n %crate-bash-completion -%bash_completions_dir/mise.bash - -%files -n %crate-fish-completion -%fish_completions_dir/mise.fish - -%files -n %crate-zsh-completion -%zsh_completions_dir/_mise +%pkg_completion -bfzn %crate %prep diff --git a/anda/tools/buildsys/muon/muon.spec b/anda/tools/buildsys/muon/muon.spec index 5d2bd15270..383d29ca4f 100644 --- a/anda/tools/buildsys/muon/muon.spec +++ b/anda/tools/buildsys/muon/muon.spec @@ -1,5 +1,5 @@ Name: muon -Version: 0.4.0 +Version: 0.5.0 Release: 1%?dist Summary: A meson-compatible build system diff --git a/anda/tools/buildsys/ops2deb/ops2deb.spec b/anda/tools/buildsys/ops2deb/ops2deb.spec index 6e89648ae4..8cd46dabe8 100644 --- a/anda/tools/buildsys/ops2deb/ops2deb.spec +++ b/anda/tools/buildsys/ops2deb/ops2deb.spec @@ -2,8 +2,8 @@ %define _python_dist_allow_version_zero # upstream issue? Name: python3-ops2deb -Version: 2.5.0 -Release: 1%{?dist} +Version: 2.7.0 +Release: 1%?dist Summary: Generate Debian packages for common devops tools License: MIT URL: https://github.com/upciti/ops2deb diff --git a/anda/tools/buildsys/sccache/rust-sccache.spec b/anda/tools/buildsys/sccache/rust-sccache.spec index dbe756c5a2..9702154dbf 100644 --- a/anda/tools/buildsys/sccache/rust-sccache.spec +++ b/anda/tools/buildsys/sccache/rust-sccache.spec @@ -13,7 +13,7 @@ %global crate sccache Name: rust-sccache -Version: 0.9.1 +Version: 0.10.0 Release: 1%?dist Summary: Ccache-like tool diff --git a/anda/tools/buildsys/subatomic/subatomic.spec b/anda/tools/buildsys/subatomic/subatomic.spec index b039e8f548..4a0e139d2a 100644 --- a/anda/tools/buildsys/subatomic/subatomic.spec +++ b/anda/tools/buildsys/subatomic/subatomic.spec @@ -1,7 +1,7 @@ %define debug_package %{nil} Name: subatomic -Version: 0.9.5 +Version: 0.10.0 Release: 1%?dist Summary: A modern package delivery system diff --git a/anda/tools/cbfstool/anda.hcl b/anda/tools/cbfstool/anda.hcl deleted file mode 100644 index 027d66d8b8..0000000000 --- a/anda/tools/cbfstool/anda.hcl +++ /dev/null @@ -1,5 +0,0 @@ -project pkg { - rpm { - spec = "cbfstool.spec" - } -} \ No newline at end of file diff --git a/anda/tools/cbfstool/cbfstool.spec b/anda/tools/cbfstool/cbfstool.spec deleted file mode 100644 index c778075293..0000000000 --- a/anda/tools/cbfstool/cbfstool.spec +++ /dev/null @@ -1,28 +0,0 @@ -Name: cbfstool -Version: 24.12 -Release: 1%?dist -Summary: Management utility for CBFS formatted ROM images -URL: https://doc.coreboot.org/lib/fw_config.html#cbfs -License: GPLv2 -BuildRequires: gcc g++ gcc-gnat make cmake ncurses-devel iasl git -Requires: glibc -Packager: Owen Zimmerman - -%description -Management utility for CBFS formatted ROM images. - -%prep -git clone https://review.coreboot.org/coreboot.git -b %version - -%build -make -C coreboot/util/cbfstool - -%install -install -Dm 777 coreboot/util/cbfstool/cbfstool %buildroot%_bindir/cbfstool - -%files -/usr/bin/cbfstool - -%changelog -* Sun Aug 25 2024 Owen Zimmerman -- Initial Package \ No newline at end of file diff --git a/anda/tools/cbfstool/update.rhai b/anda/tools/cbfstool/update.rhai deleted file mode 100644 index 7e27695ddc..0000000000 --- a/anda/tools/cbfstool/update.rhai +++ /dev/null @@ -1 +0,0 @@ -rpm.version(gh_tag("coreboot/coreboot")); diff --git a/anda/tools/chromium-ectool/chromium-ectool.spec b/anda/tools/chromium-ectool/chromium-ectool.spec index 49bb056500..9664e89c3d 100644 --- a/anda/tools/chromium-ectool/chromium-ectool.spec +++ b/anda/tools/chromium-ectool/chromium-ectool.spec @@ -7,9 +7,9 @@ License: BSD-3-Clause URL: https://chromium.googlesource.com/chromiumos/platform/ec/ Version: %shortcommit -Release: 14526.B%{?dist} +Release: 2%{?dist} Source0: https://github.com/coreboot/chrome-ec/archive/refs/heads/release-R100-14526.B-main.tar.gz -Provides: ectool +Conflicts: ectool BuildRequires: make gcc libftdi-devel libusb1-devel hostname @@ -31,5 +31,7 @@ install -Dm755 build/host/util/ectool %{buildroot}%{_bindir}/ectool %{_bindir}/ectool %changelog +* Sat Aug 09 2025 Owen Zimmerman +- Conflict with coreboot ectool. * Tue Jan 2 2024 infinitebash - Initial package. diff --git a/anda/tools/copyparty/anda.hcl b/anda/tools/copyparty/anda.hcl new file mode 100644 index 0000000000..6c096b101b --- /dev/null +++ b/anda/tools/copyparty/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "copyparty.spec" + } +} diff --git a/anda/tools/copyparty/copyparty.spec b/anda/tools/copyparty/copyparty.spec new file mode 100644 index 0000000000..2b1e4174a2 --- /dev/null +++ b/anda/tools/copyparty/copyparty.spec @@ -0,0 +1,60 @@ +%global pypi_name copyparty + +Name: %{pypi_name} +Version: 1.19.5 +Release: 1%?dist +Summary: Portable, featureful, and fast file server +URL: https://github.com/9001/copyparty +Source0: %{pypi_source} +License: MIT +# For EVR macro +BuildRequires: anda-srpm-macros +BuildRequires: python3-devel python3-pip pyproject-rpm-macros +BuildRequires: python3dist(wheel) python3dist(build) python3dist(jinja2) +BuildRequires: python3dist(setuptools) python3dist(installer) +Requires: python3 +Requires: python3-%{name} = %{evr} +Suggests: ffmpeg python3dist(fuse) +BuildArch: noarch +Packager: Riley Loo + +%description +Portable file server with accelerated resumable uploads, dedup, WebDAV, +FTP, TFTP, zeroconf, media indexer, thumbnails++ all in one file, no +(runtime) deps (other than Python itself) + +%package -n python3-%{pypi_name} +Requires: python3 +Summary: %{summary} +Requires: %{name} = %{evr} + +%description -n python3-%{pypi_name} + +Portable file server with accelerated resumable uploads, dedup, WebDAV, +FTP, TFTP, zeroconf, media indexer, thumbnails++ all in one file, no +(runtime) deps (other than Python itself) + +%prep +%autosetup -n copyparty-%version + +%build +%pyproject_wheel + +%install +%pyproject_install + +%files +%license LICENSE +%doc README.md +%{_bindir}/copyparty +%{_bindir}/partyfuse +%{_bindir}/u2c + +%files -n python3-%{pypi_name} +%{python3_sitelib}/%{pypi_name}* + + +%changelog + +* Mon Jul 28 2025 Riley Loo +- Initial package diff --git a/anda/tools/copyparty/update.rhai b/anda/tools/copyparty/update.rhai new file mode 100644 index 0000000000..8e57de2d8d --- /dev/null +++ b/anda/tools/copyparty/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("copyparty")); diff --git a/anda/tools/coreboot-utils/anda.hcl b/anda/tools/coreboot-utils/anda.hcl new file mode 100644 index 0000000000..5b2f428a82 --- /dev/null +++ b/anda/tools/coreboot-utils/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "coreboot-utils.spec" + } +} diff --git a/anda/tools/coreboot-utils/coreboot-utils.spec b/anda/tools/coreboot-utils/coreboot-utils.spec new file mode 100644 index 0000000000..b69f92b16f --- /dev/null +++ b/anda/tools/coreboot-utils/coreboot-utils.spec @@ -0,0 +1,1030 @@ +%define debug_package %nil + +Name: coreboot-utils +Version: 25.06 +Release: 3%?dist +Summary: Various coreboot utilities +URL: https://doc.coreboot.org +License: BSD-3-Clause AND Apache-2.0 AND CC-BY-SA-3.0 AND GPL-2.0-only AND GPL-3.0-or-later AND ISC AND BSD-2-Clause-Patent AND BSD-4-Clause-UC AND CC-PDDC AND GPL-2.0-or-later AND HPND-sell-varient AND LGPL-2.1-or-later AND BSD-2-Clause AND CC-BY-4.0 AND GPL-3.0-only AND HPND AND X11 AND MIT +Packager: Owen Zimmerman + +Patch0: spdtool-python3.patch +Patch1: elf_segment_extractor-python3.patch + +BuildRequires: anda-srpm-macros +BuildRequires: go-rpm-macros +BuildRequires: pkg-config + +BuildRequires: gcc +BuildRequires: g++ +BuildRequires: gcc-gnat +BuildRequires: bison +BuildRequires: meson +BuildRequires: make +BuildRequires: cmake +BuildRequires: ninja-build +BuildRequires: golang + +BuildRequires: libstdc++ +BuildRequires: libgcc +BuildRequires: libbpf-devel +BuildRequires: glibc-devel +BuildRequires: ncurses-devel +BuildRequires: libfl-devel +BuildRequires: pciutils-devel +BuildRequires: libxcrypt-devel +BuildRequires: yaml-cpp-devel +BuildRequires: openssl-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: qt6-qtbase-devel +BuildRequires: qt5-qtsvg-devel + +BuildRequires: inkscape +BuildRequires: flex +BuildRequires: acpica-tools +BuildRequires: binutils +BuildRequires: python3 + +%if 0%{?fedora} >= 42 +BuildRequires: gcc14 gcc14-c++ +%endif + +%description +%summary. + +%package all +Summary: Installs all coreboot-utils packages + +Requires: %{name}-abuild +Requires: %{name}-amdfwtool +Requires: %{name}-amdtools +Requires: %{name}-apcb +%dnl Requires: %{name}-archive +Requires: %{name}-autoport +Requires: %{name}-bincfg +Requires: %{name}-board_status +%ifarch x86_64 +Requires: %{name}-bucts +%endif +Requires: %{name}-cbfstool +Requires: %{name}-cbfstool-tests +Requires: %{name}-cbmem +Requires: %{name}-chromeos-coreboot-utilities +Requires: %{name}-coreboot-configurator +%ifarch x86_64 +Requires: %{name}-ectool +%endif +Requires: %{name}-exynos +Requires: %{name}-find_usbdebug +Requires: %{name}-futility +Requires: %{name}-genbuild_h +Requires: %{name}-hda-decoder +Requires: %{name}-ifdtool +%ifarch x86_64 +Requires: %{name}-intelmetool +%endif +%ifarch x86_64 +Requires: %{name}-intelp2m +%endif +%ifarch x86_64 +Requires: %{name}-inteltool +%endif +Requires: %{name}-intelvbttool +Requires: %{name}-kbc1126 +Requires: %{name}-mediatek-coreboot-utilities +Requires: %{name}-mma +Requires: %{name}-msrtool +%ifarch x86_64 +Requires: %{name}-nvramtool +%endif +%ifarch x86_64 +Requires: %{name}-pmh7tool +%endif +%ifarch x86_64 +Requires: %{name}-post +%endif +Requires: %{name}-qualcomm-coreboot-utilities +Requires: %{name}-riscv-coreboot-utilities +Requires: %{name}-rockchip-coreboot-utilities +Requires: %{name}-scripts +%ifarch x86_64 +Requires: %{name}-smmstoretool +%endif +Requires: %{name}-spd_tools +Requires: %{name}-spdtool +Requires: %{name}-spkmodem_recv +%ifarch x86_64 +Requires: %{name}-superiotool +%endif +Requires: %{name}-xcompile + +%description all +%summary. + +%package abuild +Summary: coreboot autobuild script builds coreboot images for all available targets +Requires: coreboot-utils = %{version} +Conflicts: abuild <= 25.06 +Obsoletes: abuild <= 25.06 +%description abuild +%summary. + +%package amdfwtool +Summary: Create AMD Firmware combination +Requires: coreboot-utils = %{version} +Requires: glibc +%description amdfwtool +%summary. + +%package amdtools +Summary: Various tools for AMD processors +Requires: coreboot-utils = %{version} +Requires: perl +Requires: bash +%description amdtools +%summary. + +%package apcb +Summary: AMD PSP Control Block tools +Requires: coreboot-utils = %{version} +Requires: python3 +%description apcb +The necessary tools for building APCBs are not available for use by coreboot. +This tool allows patching an existing APCB binary with specific SPDs +and GPIO selection pins. + +apcb_edit - This tool allows patching an existing APCB binary with specific SPDs and GPIO selection pins. +apcb_v3_edit - This tool allows patching an existing APCB v3 binary with up to 16 specific SPDs. + +%dnl %package archive - ### Currently bugged and does not compile ### +%dnl Requires: coreboot-utils = %{version} +%dnl Summary: Concatenate files and create an archive +%dnl %description archive +%dnl %summary. + +%package autoport +Summary: Porting coreboot using autoport + +Requires: coreboot-utils = %{version} +Requires: acpica-tools +Requires: dmidecode +Requires: %{name}-ectool +Requires: glibc +Requires: pciutils +Requires: %{name}-inteltool +Requires: %{name}-superiotool + +%description autoport +Automated porting coreboot to Sandy Bridge/Ivy Bridge/Haswell platforms. + +%package bincfg +Summary: Compiler/Decompiler for data blobs with specs +Requires: coreboot-utils = %{version} +%description bincfg +%summary. + +%package board_status +Summary: Tools to collect logs and upload them to the board status repository +Requires: coreboot-utils = %{version} +Requires: bash +%description board_status +%summary. + +%ifarch x86_64 +%package bucts +Summary: A tool to manipulate the BUC.TS bit on Intel targets +Requires: coreboot-utils = %{version} +%description bucts +%summary. +%endif + +%package cbfstool +Summary: Management utility for CBFS formatted ROM images +Requires: coreboot-utils = %{version} +Conflicts: cbfstool <= 25.06 +Obsoletes: cbfstool <= 25.06 +%description cbfstool +%summary. + +%package cbfstool-tests +Summary: CBFSTool tests +Requires: coreboot-utils = %{version} +Requires: %{name}-cbfstool +Requires: python3 +Requires: python3-pytest +%description cbfstool-tests +%summary. + +%package cbmem +Summary: Prints out coreboot mem table information +Requires: coreboot-utils = %{version} +Requires: glibc +Conflicts: cbmem <= 25.06 +Obsoletes: cbmem <= 25.06 +%description cbmem +Prints out coreboot mem table information in JSON by default, and also implements the basic cbmem -list and -console commands. + +%package chromeos-coreboot-utilities +Requires: coreboot-utils = %{version} +Requires: bash +Summary: access or generate ChromeOS resources +%description chromeos-coreboot-utilities +These scripts can be used to access or generate ChromeOS resources, for example +to extract System Agent reference code and other blobs (e.g. `mrc.bin`, refcode, +VGA option roms) from a ChromeOS recovery image. + +%package coreboot-configurator +Summary: A simple GUI to change settings in coreboot's CBFS, via the nvramtool utility + +Requires: coreboot-utils = %{version} +Requires: %{name}-nvramtool +Requires: qt5-qtbase +Requires: qt5-qtsvg +Requires: yaml-cpp + +%description coreboot-configurator +%summary. + +%package doc +Summary: Coreboot utility documentation +Requires: coreboot-utils = %{version} +%description doc +%summary. + +%ifarch x86_64 +%package ectool +Summary: Dumps the RAM of a laptop's Embedded/Environmental Controller (EC) +Requires: coreboot-utils = %{version} +Requires: glibc +Conflicts: chromium-ectool +%description ectool +%summary. +%endif + +%package exynos +Summary: Computes and fills Exynos ROM checksum (for BL1 or BL2) +Requires: coreboot-utils = %{version} +Requires: python3 +%description exynos +%summary. + +%package find_usbdebug +Summary: Help find USB debug ports +Requires: coreboot-utils = %{version} +Requires: bash +%description find_usbdebug +%summary. + +%package futility +Summary: Firmware utility for signing ChromeOS images +Requires: coreboot-utils = %{version} +%description futility +%summary. + +%package genbuild_h +Summary: Generate build system definitions +Requires: coreboot-utils = %{version} +Requires: bash +%description genbuild_h +%summary. + +%package hda-decoder +Summary: Dumps decoded HDA default configuration registers into a format which can be used in coreboot's verb table +Requires: coreboot-utils = %{version} +%description hda-decoder +%summary. + +%package ifdtool +Summary: Extract and dump Intel Firmware Descriptor information + +Requires: coreboot-utils = %{version} +Requires: glibc +Requires: pciutils +Requires: zlib-ng + +%description ifdtool +%summary. + +%ifarch x86_64 +%package intelmetool +Summary: Dump interesting things about Management Engine even if hidden + +Requires: coreboot-utils = %{version} +Requires: glibc +Requires: pciutils +Requires: zlib-ng + +%description intelmetool +%summary. +%endif + +%ifarch x86_64 +%package intelp2m +Summary: convert the configuration DW0/1 registers value from an inteltool dump to coreboot macros +Requires: coreboot-utils = %{version} +%description intelp2m +%summary. +%endif + +%ifarch x86_64 +%package inteltool +Summary: Provides information about the Intel CPU/chipset hardware configuration + +Requires: coreboot-utils = %{version} +Requires: glibc +Requires: pciutils +Requires: zlib-ng + +%description inteltool +%summary. +%endif + +%package intelvbttool +Summary: Parse VBT from VGA BIOS +Requires: coreboot-utils = %{version} +Requires: glibc +%description intelvbttool +%summary. + +%package kbc1126 +Summary: dump the two blobs from the factory firmware of some HP laptops +Requires: coreboot-utils = %{version} +%description kbc1126 +Tools used to dump the two blobs from the factory firmware of many HP +laptops with 8051-based SMSC KBC1098/KBC1126 embedded controller and +insert them to the firmware image. + +%package mediatek-coreboot-utilities +Summary: Generate MediaTek bootload header +Requires: coreboot-utils = %{version} +Requires: python3 +%description mediatek-coreboot-utilities +check-pi-img.py - Check `PI_IMG` firmware. +gen-bl-img.py - Generate MediaTek bootloader header. + +%package mma +Summary: Memory Margin Analysis automation tests +Requires: coreboot-utils = %{version} +Requires: bash +%description mma +%summary. + +%package msrtool +Summary: Dumps chipset-specific MSR registers +Requires: coreboot-utils = %{version} +%description msrtool +%summary. + +%ifarch x86_64 +%package nvramtool +Summary: Reads and writes coreboot parameters and displaying information from the coreboot table in CMOS/NVRAM +Requires: coreboot-utils = %{version} +%description nvramtool +%summary. +%endif + +%ifarch x86_64 +%package pmh7tool +Summary: Dumps, reads and writes PMH7 registers on Lenovo ThinkPads. PMH7 is used for switching on and off the power of some devices on the board such as dGPU +Requires: coreboot-utils = %{version} +%description pmh7tool +%summary. +%endif + +%ifarch x86_64 +%package post +Summary: Userspace utility that can be used to test POST cards +Requires: coreboot-utils = %{version} +%description post +%summary. +%endif + +%package qualcomm-coreboot-utilities +Summary: CMM script to debug Qualcomm coreboot environments +Requires: coreboot-utils = %{version} +Requires: python3 +%description qualcomm-coreboot-utilities +CMM script to debug Qualcomm coreboot environments. + +createxbl - Concatenates XBL segments into one ELF image +ipqheader - Returns a packed MBN header image with the specified base and size +mbncat - Generate ipq8064 uber SBL +mbn_tools - Contains all MBN Utilities for image generation + +%package riscv-coreboot-utilities +Summary: riscv coreboot utilities +Requires: coreboot-utils = %{version} +Requires: bash +Requires: python3 +%description riscv-coreboot-utilities +%summary. + +%package rockchip-coreboot-utilities +Summary: Generate Rockchip idblock bootloader +Requires: coreboot-utils = %{version} +Requires: python3 +%description rockchip-coreboot-utilities +%summary. + +%package scripts +Summary: Various coreboot utility scripts + +Requires: coreboot-utils = %{version} +Requires: perl +Requires: bash + +%description scripts +- capture_commands.sh - Write all commands from the build to a file. +- config - Manipulate options in a .config file from the command line. +- cross-repo-cherrypick - Pull in patches from another tree from a gerrit repository. +- decode_spd.sh - Decodes Serial Presence Detect (SPD) files into various human readable formats. +- dts-to-fmd.sh -Converts a depthcharge fmap.dts into an fmaptool compatible .fmd format. +- find_new_user_commits.sh - Finds new gerrit committers. +- find-unused-kconfig-symbols.sh - Points out Kconfig variables that may be unused. There are some false positives, but it serves as a starting point. +- gerrit-rebase - Applies all commits that from-branch has over to-branch, based on a common ancestor and gerrit meta-data. +- get_maintainer.pl - Print selected MAINTAINERS information for the files modified in a patch or for a file. +- maintainers.go - Build subsystem Maintainers. +- no-fsf-addresses.sh - Removes various FSF addresses from license headers. +- parse-maintainers.pl - Script to alphabetize MAINTAINERS file. +- rm_unused_code - Remove all code not used for a platform from the local git repository for auditing or release. +- show_platforms.sh - Makes a list of platforms in the tree. Does not show variants. +- ucode_h_to_bin.sh - Microcode conversion tool. +- update_submodules - Check all submodules for updates. + +%ifarch x86_64 +%package smmstoretool +Summary: Offline SMMSTORE variable modification tool +Requires: coreboot-utils = %{version} +%description smmstoretool +%summary. +%endif + +%package spdtool +Summary: Dumps SPD ROMs from a given blob to separate files using known patterns and reserved bits +Requires: coreboot-utils = %{version} +Requires: python3 +%description spdtool +Dumps SPD ROMs from a given blob to separate files using known patterns +and reserved bits. Useful for analysing firmware that holds SPDs on boards +that have soldered down DRAM. + +%package spd_tools +Summary: A set of tools to generate SPD files for platforms with memory down configurations +Requires: coreboot-utils = %{version} +%description spd_tools +%summary. + +%package spkmodem_recv +Summary: Decode spkmodem signals +Requires: coreboot-utils = %{version} +%description spkmodem_recv +%summary. + +%ifarch x86_64 +%package superiotool +Summary: A user-space utility to detect Super I/O of a mainboard and provide detailed information about the register contents of the Super I/O +Requires: coreboot-utils = %{version} +%description superiotool +%summary. +%endif + +%package xcompile +Summary: Cross compile setup +Requires: coreboot-utils = %{version} +%description xcompile +%summary. + +%prep +%git_clone https://review.coreboot.org/coreboot.git %{version} +%patch -P0 -p1 +%patch -P1 -p1 + +%build +%if 0%{?fedora} >= 42 +export CC=gcc-14 +export CXX=g++-14 +%endif + +pushd util +%make_build -C amdfwtool LDFLAGS="-fPIE -lcrypto" +%dnl %make_build -C archive # bugged upstream, does not build +%make_build -C bincfg +%ifarch x86_64 +%make_build -C bucts LDFLAGS="-fPIE" +%endif +%make_build -C cbmem CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" +%make_build -C cbfstool +%ifarch x86_64 +%make_build -C ectool LDFLAGS="-fPIE" +%endif +%make_build -C futility +%make_build -C hda-decoder +%make_build -C ifdtool +%ifarch x86_64 +%make_build -C intelmetool CFLAGS="%{optflags} -I %{_builddir}/coreboot/src/commonlib/bsd/include" +%endif +%ifarch x86_64 +%make_build -C intelp2m +%endif +%ifarch x86_64 +%make_build -C inteltool +%endif +%ifarch x86_64 +%make_build -C intelvbttool +%endif +%make_build -C kbc1126 +%ifarch x86_64 +%make_build -C nvramtool LDFLAGS="-fPIE" +%endif +%ifarch x86_64 +%make_build -C pmh7tool LDFLAGS="-fPIE" +%endif +%ifarch x86_64 +%make_build -C post +%endif +%make_build -C riscv/starfive-jh7110-spl-tool LDFLAGS="-fPIE" +%ifarch x86_64 +%make_build -C smmstoretool CFLAGS="$CFLAGS -U_FORTIFY_SOURCE" +%endif +%make_build -C spd_tools +%make_build -C spkmodem_recv +%ifarch x86_64 +%make_build -C superiotool +%endif + +pushd autoport +export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" +%gobuild -o %{_builddir}/autoport +popd + +%ifarch x86_64 +pushd msrtool +./configure +%make_build +popd +%endif + +pushd coreboot-configurator +%meson +%meson_build +popd +popd + +%install +install -Dm 777 util/abuild/abuild %{buildroot}%{_bindir}/abuild + +install -Dm 755 util/amdfwtool/amdfwtool %{buildroot}%{_bindir}/amdfwtool +install -Dm 755 util/amdfwtool/amdfwread %{buildroot}%{_bindir}/amdfwread + +install -Dm 755 util/amdtools/k8-compare-pci-space.pl %{buildroot}%{_bindir}/k8-compare-pci-space +install -Dm 755 util/amdtools/k8-interpret-extended-memory-settings.pl %{buildroot}%{_bindir}/k8-interpret-extended-memory-settings +install -Dm 755 util/amdtools/k8-read-mem-settings.sh %{buildroot}%{_bindir}/k8-read-mem-settings +install -Dm 755 util/amdtools/parse-bkdg.pl %{buildroot}%{_bindir}/parse-bkdg +install -Dm 755 util/amdtools/update_efs_spi_speed %{buildroot}%{_bindir}/update_efs_spi_speed + +install -Dm 755 util/apcb/apcb_edit.py %{buildroot}%{_bindir}/apcb_edit +install -Dm 755 util/apcb/apcb_v3a_edit.py %{buildroot}%{_bindir}/apcb_v3a_edit +install -Dm 755 util/apcb/apcb_v3_edit.py %{buildroot}%{_bindir}/apcb_v3_edit + +%dnl install -Dm 777 util/archive/archive %{buildroot}%{_bindir}/archive + +install -Dm 755 %{_builddir}/autoport %{buildroot}%{_bindir}/autoport + +install -Dm 755 util/bincfg/bincfg %{buildroot}%{_bindir}/bincfg + +install -Dm 755 util/board_status/board_status.sh %{buildroot}%{_bindir}/board_status +install -Dm 755 util/board_status/getrevision.sh %{buildroot}%{_bindir}/getrevision +install -Dm 755 util/board_status/set_up_live_image.sh %{buildroot}%{_bindir}/set_up_live_image + +%ifarch x86_64 +install -Dm 755 util/bucts/bucts %{buildroot}%{_bindir}/bucts +%endif + +install -Dm 755 util/cbfstool/cbfstool %{buildroot}%{_bindir}/cbfstool + +install -Dm 755 util/cbfstool/tests/conftest.py %{buildroot}%{_bindir}/conftest +install -Dm 755 util/cbfstool/tests/elogtool_test.py %{buildroot}%{_bindir}/elogtool_test + +install -Dm 755 util/cbmem/cbmem %{buildroot}%{_bindir}/cbmem + +install -Dm 755 util/chromeos/crosfirmware.sh %{buildroot}%{_bindir}/crosfirmware +install -Dm 755 util/chromeos/extract_blobs.sh %{buildroot}%{_bindir}/extract_blobs +install -Dm 755 util/chromeos/gen_test_hwid.sh %{buildroot}%{_bindir}/gen_test_hwid +install -Dm 755 util/chromeos/update_ec_headers.sh %{buildroot}%{_bindir}/update_ec_headers + +install -Dm 755 util/coreboot-configurator/redhat-linux-build/src/application/coreboot-configurator %{buildroot}%{_bindir}/coreboot-configurator +install -Dm 644 util/coreboot-configurator/src/resources/org.coreboot.nvramtool.policy %{buildroot}%{_datadir}/polkit-1/actions/org.coreboot.nvramtool.policy +install -Dm 644 util/coreboot-configurator/src/resources/org.coreboot.reboot.policy %{buildroot}%{_datadir}/polkit-1/actions/org.coreboot.reboot.policy +install -Dm 644 util/coreboot-configurator/src/resources/coreboot-configurator.desktop %{buildroot}%{_datadir}/applications/coreboot-configurator.desktop +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/24.png %{buildroot}%{_datadir}/icons/hicolor/24x24/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/48.png %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/96.png %{buildroot}%{_datadir}/icons/hicolor/96x96/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/16.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/32.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/64.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/128.png %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/256.png %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/coreboot-configurator.png +install -Dm 644 util/coreboot-configurator/redhat-linux-build/src/resources/512.png %{buildroot}%{_datadir}/icons/hicolor/512x512/apps/coreboot-configurator.png + +%ifarch x86_64 +install -Dm 755 util/ectool/ectool %{buildroot}%{_bindir}/ectool +%endif + +install -Dm 755 util/exynos/fixed_cksum.py %{buildroot}%{_bindir}/fixed_cksum +install -Dm 755 util/exynos/variable_cksum.py %{buildroot}%{_bindir}/variable_cksum + +install -Dm 755 util/find_usbdebug/find_usbdebug.sh %{buildroot}%{_bindir}/find_usbdebug + +install -Dm 755 util/futility/futility %{buildroot}%{_bindir}/coreboot-futility + +install -Dm 755 util/genbuild_h/genbuild_h.sh %{buildroot}%{_bindir}/genbuild_h + +install -Dm 755 util/hda-decoder/hda-decoder %{buildroot}%{_bindir}/hda-decoder + +install -Dm 755 util/ifdtool/ifdtool %{buildroot}%{_bindir}/ifdtool + +%ifarch x86_64 +install -Dm 755 util/intelmetool/intelmetool %{buildroot}%{_bindir}/intelmetool +%endif + +%ifarch x86_64 +install -Dm 755 util/intelp2m/intelp2m %{buildroot}%{_bindir}/intelp2m +%endif + +%ifarch x86_64 +install -Dm 755 util/inteltool/inteltool %{buildroot}%{_bindir}/inteltool +%endif + +%ifarch x86_64 +install -Dm 755 util/intelvbttool/intelvbttool %{buildroot}%{_bindir}/intelvbttool +%endif + +install -Dm 755 util/kbc1126/kbc1126_ec_dump %{buildroot}%{_bindir}/kbc1126_ec_dump +install -Dm 755 util/kbc1126/kbc1126_ec_insert %{buildroot}%{_bindir}/kbc1126_ec_insert + +install -Dm 755 util/mediatek/check-pi-img.py %{buildroot}%{_bindir}/check-pi-img +install -Dm 755 util/mediatek/gen-bl-img.py %{buildroot}%{_bindir}/gen-bl-img + +install -Dm 755 util/mma/mma_automated_test.sh %{buildroot}%{_bindir}/mma_automated_test +install -Dm 755 util/mma/mma_get_result.sh %{buildroot}%{_bindir}/mma_get_result +install -Dm 755 util/mma/mma_setup_test.sh %{buildroot}%{_bindir}/mma_setup_test + +%ifarch x86_64 +install -Dm 755 util/msrtool/msrtool %{buildroot}%{_bindir}/msrtool +%endif + +%ifarch x86_64 +install -Dm 755 util/nvramtool/nvramtool %{buildroot}%{_bindir}/nvramtool +%endif + +%ifarch x86_64 +install -Dm 755 util/pmh7tool/pmh7tool %{buildroot}%{_bindir}/pmh7tool +%endif + +%ifarch x86_64 +install -Dm 755 util/post/post %{buildroot}%{_bindir}/post +%endif + +install -Dm 755 util/qualcomm/createxbl.py %{buildroot}%{_bindir}/createxbl +install -Dm 755 util/qualcomm/create_multielf.py %{buildroot}%{_bindir}/create_multielf +install -Dm 755 util/qualcomm/ipqheader.py %{buildroot}%{_bindir}/ipqheader +install -Dm 755 util/qualcomm/mbncat.py %{buildroot}%{_bindir}/mbncat +install -Dm 755 util/qualcomm/mbn_tools.py %{buildroot}%{_bindir}/mbn_tools +install -Dm 755 util/qualcomm/qgpt.py %{buildroot}%{_bindir}/qgpt +install -Dm 755 util/qualcomm/elf_segment_extractor.py %{buildroot}%{_bindir}/elf_segment_extractor + +install -Dm 755 util/riscv/make-spike-elf.sh %{buildroot}%{_bindir}/make-spike-elf +install -Dm 755 util/riscv/sifive-gpt.py %{buildroot}%{_bindir}/sifive-gpt +install -Dm 755 util/riscv/starfive-jh7110-spl-tool/spl_tool %{buildroot}%{_bindir}/spl_tool + +install -Dm 755 util/rockchip/make_idb.py %{buildroot}%{_bindir}/make_idb + +install -Dm 755 util/scripts/capture_commands.sh %{buildroot}%{_bindir}/capture_commands +install -Dm 755 util/scripts/config %{buildroot}%{_bindir}/config +install -Dm 755 util/scripts/cross-repo-cherrypick %{buildroot}%{_bindir}/cross-repo-cherrypick +install -Dm 755 util/scripts/decode_spd.sh %{buildroot}%{_bindir}/decode_spd +install -Dm 755 util/scripts/dts-to-fmd.sh %{buildroot}%{_bindir}/dts-to-fmd +install -Dm 755 util/scripts/find_new_user_commits.sh %{buildroot}%{_bindir}/find_new_user_commits +install -Dm 755 util/scripts/find-unused-kconfig-symbols.sh %{buildroot}%{_bindir}/find-unused-kconfig-symbols +install -Dm 755 util/scripts/gerrit-rebase %{buildroot}%{_bindir}/gerrit-rebase +install -Dm 755 util/scripts/get_maintainer.pl %{buildroot}%{_bindir}/get_maintainer +install -Dm 755 util/scripts/no-fsf-addresses.sh %{buildroot}%{_bindir}/no-fsf-addresses +install -Dm 755 util/scripts/parse-maintainers.pl %{buildroot}%{_bindir}/parse-maintainers +install -Dm 755 util/scripts/prepare-commit-msg.clang-format %{buildroot}%{_bindir}/prepare-commit-msg.clang-format +install -Dm 755 util/scripts/rm_unused_code %{buildroot}%{_bindir}/rm_unused_code +install -Dm 755 util/scripts/show_platforms.sh %{buildroot}%{_bindir}/show_platforms +install -Dm 755 util/scripts/testsoc %{buildroot}%{_bindir}/testsoc +install -Dm 755 util/scripts/ucode_h_to_bin.sh %{buildroot}%{_bindir}/ucode_h_to_bin +install -Dm 755 util/scripts/update_submodules %{buildroot}%{_bindir}/update_submodules + +%ifarch x86_64 +install -Dm 755 util/smmstoretool/smmstoretool %{buildroot}%{_bindir}/smmstoretool +%endif + +install -Dm 755 util/spdtool/spdtool.py %{buildroot}%{_bindir}/spdtool + +install -Dm 755 util/spd_tools/bin/part_id_gen %{buildroot}%{_bindir}/part_id_gen +install -Dm 755 util/spd_tools/bin/spd_gen %{buildroot}%{_bindir}/spd_gen + +install -Dm 755 util/spkmodem_recv/spkmodem-recv %{buildroot}%{_bindir}/spkmodem-recv + +%ifarch x86_64 +install -Dm 755 util/superiotool/superiotool %{buildroot}%{_bindir}/superiotool +%endif + +install -Dm 755 util/xcompile/xcompile %{buildroot}%{_libdir}/xcompile + +# Install documentation files to appropriate subdirectries within docdir to prevent multiple files of the same name +mkdir -p %{buildroot}%{_docdir}/coreboot-utils/abuild +mkdir -p %{buildroot}%{_docdir}/coreboot-utils/cbfstool +mkdir -p %{buildroot}%{_docdir}/coreboot-utils/ifdtool +mkdir -p %{buildroot}%{_docdir}/coreboot-utils/intelp2m +mkdir -p %{buildroot}%{_docdir}/coreboot-utils/smmstoretool + +cp Documentation/util.md %{buildroot}%{_docdir}/coreboot-utils/util.md +cp Documentation/cbfs.txt %{buildroot}%{_docdir}/coreboot-utils/cbfs.txt +cp Documentation/util/abuild/index.md %{buildroot}%{_docdir}/coreboot-utils/abuild/index.md +cp Documentation/util/cbfstool/index.md %{buildroot}%{_docdir}/coreboot-utils/cbfstool/index.md +cp Documentation/util/cbfstool/mmap_windows.md %{buildroot}%{_docdir}/coreboot-utils/cbfstool/mmap_windows.md +cp Documentation/util/ifdtool/binary_extraction.md %{buildroot}%{_docdir}/coreboot-utils/ifdtool/binary_extraction.md +cp Documentation/util/ifdtool/index.md %{buildroot}%{_docdir}/coreboot-utils/ifdtool/index.md +cp Documentation/util/ifdtool/layout.md %{buildroot}%{_docdir}/coreboot-utils/ifdtool/layout.md +cp Documentation/util/intelp2m/index.md %{buildroot}%{_docdir}/coreboot-utils/intelp2m/index.md +cp Documentation/util/smmstoretool/index.md %{buildroot}%{_docdir}/coreboot-utils/smmstoretool/index.md + +%files +%doc util/README.md AUTHORS MAINTAINERS +%license COPYING +%license LICENSES/* + +%files abuild +%{_bindir}/abuild + +%files all + +%files amdfwtool +%{_bindir}/amdfwtool +%{_bindir}/amdfwread + +%files amdtools +%{_bindir}/k8-compare-pci-space +%{_bindir}/k8-interpret-extended-memory-settings +%{_bindir}/k8-read-mem-settings +%{_bindir}/parse-bkdg +%{_bindir}/update_efs_spi_speed +%doc util/amdtools/*.md + +%files apcb +%{_bindir}/apcb_edit +%{_bindir}/apcb_v3a_edit +%{_bindir}/apcb_v3_edit +%doc util/apcb/README +%doc util/apcb/description.md + +%dnl %files archive +%dnl %{_bindir}/archive +%dnl %doc util/archive/description.md + +%files autoport +%{_bindir}/autoport +%doc util/autoport/*.md + +%files bincfg +%{_bindir}/bincfg +%doc util/bincfg/description.md + +%files board_status +%{_bindir}/board_status +%{_bindir}/getrevision +%{_bindir}/set_up_live_image +%doc util/board_status/*.md + +%ifarch x86_64 +%files bucts +%{_bindir}/bucts +%doc util/bucts/*.md +%endif + +%files cbfstool +%{_bindir}/cbfstool +%doc util/cbfstool/description.md + +%files cbfstool-tests +%{_bindir}/conftest +%{_bindir}/elogtool_test +%doc util/cbfstool/tests/README.md + +%files cbmem +%{_bindir}/cbmem +%doc util/cbmem/description.md + +%files chromeos-coreboot-utilities +%{_bindir}/crosfirmware +%{_bindir}/extract_blobs +%{_bindir}/gen_test_hwid +%{_bindir}/update_ec_headers +%doc util/chromeos/*.md + +%files coreboot-configurator +%{_bindir}/coreboot-configurator +%{_datadir}/polkit-1/actions/org.coreboot.nvramtool.policy +%{_datadir}/polkit-1/actions/org.coreboot.reboot.policy +%{_datadir}/applications/coreboot-configurator.desktop +%{_datadir}/icons/hicolor/24x24/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/48x48/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/96x96/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/16x16/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/32x32/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/64x64/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/128x128/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/256x256/apps/coreboot-configurator.png +%{_datadir}/icons/hicolor/512x512/apps/coreboot-configurator.png +%doc util/coreboot-configurator/README.md + +%files doc +%{_docdir}/coreboot-utils/util.md +%{_docdir}/coreboot-utils/cbfs.txt +%{_docdir}/coreboot-utils/abuild/index.md +%{_docdir}/coreboot-utils/cbfstool/index.md +%{_docdir}/coreboot-utils/cbfstool/mmap_windows.md +%{_docdir}/coreboot-utils/ifdtool/binary_extraction.md +%{_docdir}/coreboot-utils/ifdtool/index.md +%{_docdir}/coreboot-utils/ifdtool/layout.md +%{_docdir}/coreboot-utils/intelp2m/index.md +%{_docdir}/coreboot-utils/smmstoretool/index.md +%license Documentation/COPYING + +%ifarch x86_64 +%files ectool +%{_bindir}/ectool +%doc util/ectool/description.md +%endif + +%files exynos +%{_bindir}/fixed_cksum +%{_bindir}/variable_cksum +%doc util/exynos/description.md + +%files find_usbdebug +%{_bindir}/find_usbdebug +%doc util/find_usbdebug/description.md + +%files futility +%{_bindir}/coreboot-futility +%doc util/futility/description.md + +%files genbuild_h +%{_bindir}/genbuild_h +%doc util/genbuild_h/description.md + +%files hda-decoder +%{_bindir}/hda-decoder +%doc util/hda-decoder/description.md + +%files ifdtool +%{_bindir}/ifdtool +%doc util/ifdtool/description.md + +%ifarch x86_64 +%files intelmetool +%{_bindir}/intelmetool +%doc util/intelmetool/description.md +%endif + +%ifarch x86_64 +%files intelp2m +%{_bindir}/intelp2m +%doc util/intelp2m/description.md +%endif + +%ifarch x86_64 +%files inteltool +%{_bindir}/inteltool +%doc util/inteltool/description.md +%endif + +%ifarch x86_64 +%files intelvbttool +%{_bindir}/intelvbttool +%doc util/intelvbttool/description.md +%endif + +%files kbc1126 +%{_bindir}/kbc1126_ec_dump +%{_bindir}/kbc1126_ec_insert +%doc util/kbc1126/*.md + +%files mediatek-coreboot-utilities +%{_bindir}/gen-bl-img +%{_bindir}/check-pi-img +%doc util/mediatek/description.md + +%files mma +%{_bindir}/mma_automated_test +%{_bindir}/mma_get_result +%{_bindir}/mma_setup_test +%doc util/mma/description.md + +%ifarch x86_64 +%files msrtool +%{_bindir}/msrtool +%doc util/msrtool/README +%doc util/msrtool/description.md +%endif + +%ifarch x86_64 +%files nvramtool +%{_bindir}/nvramtool +%doc util/nvramtool/README +%doc util/nvramtool/DISCLAIMER +%doc util/nvramtool/description.md +%endif + +%ifarch x86_64 +%files pmh7tool +%{_bindir}/pmh7tool +%doc util/pmh7tool/description.md +%endif + +%ifarch x86_64 +%files post +%{_bindir}/post +%doc util/post/README +%doc util/post/description.md +%endif + +%files qualcomm-coreboot-utilities +%{_bindir}/createxbl +%{_bindir}/create_multielf +%{_bindir}/ipqheader +%{_bindir}/mbncat +%{_bindir}/mbn_tools +%{_bindir}/qgpt +%{_bindir}/elf_segment_extractor +%doc util/qualcomm/description.md + +%files riscv-coreboot-utilities +%{_bindir}/make-spike-elf +%{_bindir}/sifive-gpt +%{_bindir}/spl_tool +%doc util/riscv/description.md +%doc util/riscv/starfive-jh7110-spl-tool/README.md + +%files rockchip-coreboot-utilities +%{_bindir}/make_idb +%license util/rockchip/LICENSE +%doc util/rockchip/description.md + +%files scripts +%{_bindir}/capture_commands +%{_bindir}/config +%{_bindir}/cross-repo-cherrypick +%{_bindir}/decode_spd +%{_bindir}/dts-to-fmd +%{_bindir}/find_new_user_commits +%{_bindir}/find-unused-kconfig-symbols +%{_bindir}/gerrit-rebase +%{_bindir}/get_maintainer +%{_bindir}/no-fsf-addresses +%{_bindir}/parse-maintainers +%{_bindir}/prepare-commit-msg.clang-format +%{_bindir}/rm_unused_code +%{_bindir}/show_platforms +%{_bindir}/testsoc +%{_bindir}/ucode_h_to_bin +%{_bindir}/update_submodules +%doc util/scripts/description.md + +%ifarch x86_64 +%files smmstoretool +%{_bindir}/smmstoretool +%doc util/smmstoretool/description.md +%endif + +%files spdtool +%{_bindir}/spdtool +%doc util/spdtool/description.md + +%files spd_tools +%{_bindir}/part_id_gen +%{_bindir}/spd_gen +%doc util/spd_tools/README.md + +%files spkmodem_recv +%{_bindir}/spkmodem-recv +%doc util/spkmodem_recv/description.md + +%ifarch x86_64 +%files superiotool +%{_bindir}/superiotool +%doc util/superiotool/README +%doc util/superiotool/description.md +%endif + +%files xcompile +%{_libdir}/xcompile +%doc util/xcompile/description.md + +%changelog +* Wed Jul 30 2025 Owen Zimmerman +- Initial Package diff --git a/anda/tools/coreboot-utils/elf_segment_extractor-python3.patch b/anda/tools/coreboot-utils/elf_segment_extractor-python3.patch new file mode 100644 index 0000000000..f4344a98cb --- /dev/null +++ b/anda/tools/coreboot-utils/elf_segment_extractor-python3.patch @@ -0,0 +1,10 @@ +diff --git a/util/qualcomm/elf_segment_extractor.py b/util/qualcomm/elf_segment_extractor.py +index 7ba6e8aa..ae477373 100755 +--- a/util/qualcomm/elf_segment_extractor.py ++++ b/util/qualcomm/elf_segment_extractor.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + import sys + import os + import struct diff --git a/anda/tools/coreboot-utils/spdtool-python3.patch b/anda/tools/coreboot-utils/spdtool-python3.patch new file mode 100644 index 0000000000..c677b7e380 --- /dev/null +++ b/anda/tools/coreboot-utils/spdtool-python3.patch @@ -0,0 +1,10 @@ +diff --git a/util/spdtool/spdtool.py b/util/spdtool/spdtool.py +index 89976eac..2cd70273 100644 +--- a/util/spdtool/spdtool.py ++++ b/util/spdtool/spdtool.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + # spdtool - Tool for partial deblobbing of UEFI firmware images + # SPDX-License-Identifier: GPL-3.0-or-later + # diff --git a/anda/tools/coreboot-utils/update.rhai b/anda/tools/coreboot-utils/update.rhai new file mode 100644 index 0000000000..95fe2d2cf6 --- /dev/null +++ b/anda/tools/coreboot-utils/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("coreboot/coreboot")); diff --git a/anda/lib/nvidia/cuda-gcc/anda.hcl b/anda/tools/cuda-gcc/anda.hcl similarity index 100% rename from anda/lib/nvidia/cuda-gcc/anda.hcl rename to anda/tools/cuda-gcc/anda.hcl diff --git a/anda/lib/nvidia/cuda-gcc/cuda-gcc.spec b/anda/tools/cuda-gcc/cuda-gcc.spec similarity index 83% rename from anda/lib/nvidia/cuda-gcc/cuda-gcc.spec rename to anda/tools/cuda-gcc/cuda-gcc.spec index 57ddf951f6..3579143f30 100644 --- a/anda/lib/nvidia/cuda-gcc/cuda-gcc.spec +++ b/anda/tools/cuda-gcc/cuda-gcc.spec @@ -1,8 +1,12 @@ +%if 0%{?fedora} < 042 %global gcc_major 13 +%else +%global gcc_major 14 +%endif Name: cuda-gcc -Version: 13.3.1 -Release: 2%{?dist} +Version: 14.3.1 +Release: 1%?dist Summary: GNU Compiler Collection CUDA compatibility package License: BSD URL: http://gcc.gnu.org @@ -29,14 +33,14 @@ cat > %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh < %{buildroot}%{_sysconfdir}/profile.d/%{name}.csh <= "F42" { + rpm.version(bump::bodhi("gcc14", bump::as_bodhi_ver(labels.branch))); +} else { + rpm.version(bump::bodhi("gcc13", bump::as_bodhi_ver(labels.branch))); +} diff --git a/anda/tools/cuda-nvcc/anda.hcl b/anda/tools/cuda-nvcc/anda.hcl index e82073db16..0003b49cf7 100644 --- a/anda/tools/cuda-nvcc/anda.hcl +++ b/anda/tools/cuda-nvcc/anda.hcl @@ -2,4 +2,8 @@ project "pkg" { rpm { spec = "cuda-nvcc.spec" } + labels { + updbranch = 1 + subrepo = "nvidia" + } } diff --git a/anda/tools/cuda-nvcc/cuda-nvcc.spec b/anda/tools/cuda-nvcc/cuda-nvcc.spec index e85dab437c..3c862a3f32 100644 --- a/anda/tools/cuda-nvcc/cuda-nvcc.spec +++ b/anda/tools/cuda-nvcc/cuda-nvcc.spec @@ -4,12 +4,12 @@ %global __strip /bin/true %global _missing_build_ids_terminate_build 0 %global _build_id_links none -%global major_package_version 12-6 +%global major_package_version 12-8 Name: %(echo %real_name | tr '_' '-') Epoch: 1 -Version: 12.6.85 -Release: 1%{?dist} +Version: 13.0.48 +Release: 1%?dist Summary: CUDA Compiler (NVCC) License: CUDA Toolkit URL: https://developer.nvidia.com/cuda-toolkit @@ -19,12 +19,15 @@ Source0: https://developer.download.nvidia.com/compute/cuda/redist/%{real Source1: https://developer.download.nvidia.com/compute/cuda/redist/%{real_name}/linux-sbsa/%{real_name}-linux-sbsa-%{version}-archive.tar.xz Source3: nvcc.profile -Requires(post): ldconfig Conflicts: %{name}-%{major_package_version} < %{?epoch:%{epoch}:}%{version}-%{release} -# CUDA 12.4 does not support GCC 14+: -%if 0%{?fedora} >= 40 +# CUDA 12.8 does not support GCC 15+: +%if 0%{?fedora} >= 42 Requires: cuda-gcc +%else +# CUDA 12.8 supports GCC 14: +Obsoletes: cuda-gcc +Provides: cuda-gcc %endif %description @@ -72,8 +75,6 @@ sed -i \ -e 's|INCLUDE_DIR|%{_includedir}/cuda|g' \ %{buildroot}/%{_bindir}/nvcc.profile -%{?ldconfig_scriptlets} - %files %license LICENSE %{_bindir}/bin2c @@ -95,6 +96,7 @@ sed -i \ %{_includedir}/crt/cudacc_ext.h %{_includedir}/crt/device_double_functions.h %{_includedir}/crt/device_double_functions.hpp +%{_includedir}/crt/device_fp128_functions.h %{_includedir}/crt/device_functions.h %{_includedir}/crt/device_functions.hpp %{_includedir}/crt/func_macro.h @@ -112,78 +114,17 @@ sed -i \ %{_includedir}/crt/sm_80_rt.hpp %{_includedir}/crt/sm_90_rt.h %{_includedir}/crt/sm_90_rt.hpp +%{_includedir}/crt/sm_100_rt.h +%{_includedir}/crt/sm_100_rt.hpp %{_includedir}/crt/storage_class.h %{_includedir}/fatbinary_section.h %{_includedir}/nvPTXCompiler.h %{_includedir}/nvvm.h + %{_libdir}/libnvptxcompiler_static.a %{_libdir}/libnvvm.so %{_libdir}/libnvvm.so.4 %{_libdir}/libnvvm.so.4.0.0 %changelog -* Fri Dec 13 2024 Simone Caronni - 1:12.6.85-1 -- Update to 12.6.85. -- Require new cuda-gcc profile package. - -* Thu Sep 19 2024 Simone Caronni - 1:12.6.68-1 -- Update to 12.6.68. - -* Thu Jul 11 2024 Simone Caronni - 1:12.5.82-1 -- Update to 12.5.82. - -* Thu Jul 11 2024 Simone Caronni - 1:12.4.99-1 -- Update to 12.4.99. - -* Fri Mar 22 2024 Simone Caronni - 1:12.4.99-2 -- Correct GCC requirements. - -* Tue Mar 12 2024 Simone Caronni - 1:12.4.99-1 -- Update to 12.4.99. -- Drop ppc64le. - -* Sat Jan 06 2024 Simone Caronni - 1:12.3.107-1 -- Update to 12.3.107. - -* Tue Nov 28 2023 Simone Caronni - 1:12.3.103-1 -- Update to 12.3.103. - -* Thu Sep 28 2023 Simone Caronni - 1:12.2.140-1 -- Update to 12.2.140. - -* Tue Jul 11 2023 Simone Caronni - 1:12.2.91-1 -- Update to 12.2.91. - -* Thu Jun 08 2023 Simone Caronni - 1:12.1.105-1 -- Update to 12.1.105. - -* Tue Apr 11 2023 Simone Caronni - 1:12.1.66-1 -- Update to 12.1.66. - -* Mon Mar 13 2023 Simone Caronni - 1:12.0.140-2 -- Add requirement on cuda-gcc for Fedora 38+. - -* Sat Feb 25 2023 Simone Caronni - 1:12.0.140-1 -- Update to 12.0.140. - -* Tue Dec 13 2022 Simone Caronni - 1:12.0.76-1 -- Update to 12.0.76. - -* Fri Nov 11 2022 Simone Caronni - 1:11.8.89-1 -- Update to 11.8.89. -- Use aarch64 archive in place of sbsa. - -* Sun Sep 04 2022 Simone Caronni - 1:11.7.99-1 -- Update to 11.7.99. - -* Thu Jun 23 2022 Simone Caronni - 1:11.7.64-1 -- Update to 11.7.64. - -* Thu Mar 31 2022 Simone Caronni - 1:11.6.124-1 -- Update to 11.6.124 (CUDA 11.6.2). - -* Tue Mar 08 2022 Simone Caronni - 1:11.6.112-1 -- Update to 11.6.112 (CUDA 11.6.1). - -* Fri Jan 28 2022 Simone Caronni - 1:11.6.55-1 -- First build with the new tarball components. +%autochangelog diff --git a/anda/tools/curl-impersonate/anda.hcl b/anda/tools/curl-impersonate/anda.hcl new file mode 100644 index 0000000000..4d333371fb --- /dev/null +++ b/anda/tools/curl-impersonate/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "curl-impersonate-chrome.spec" + } +} diff --git a/anda/tools/curl-impersonate/curl-impersonate-chrome.spec b/anda/tools/curl-impersonate/curl-impersonate-chrome.spec new file mode 100644 index 0000000000..981d34621b --- /dev/null +++ b/anda/tools/curl-impersonate/curl-impersonate-chrome.spec @@ -0,0 +1,81 @@ +%global build_cxxflags %(echo "%{__build_flags_lang_cxx} %{?_distro_extra_cxxflags}" | sed 's@-Werror=format-security@@') + +Name: curl-impersonate-chrome +Version: 0.7.0 +Release: 1%{?dist} +Summary: A series of patches that make curl requests look like Chrome + +License: MIT +URL: https://github.com/lexiforest/curl-impersonate +Source0: %{url}/archive/v%{version}.tar.gz +Patch0: remove-werror-in-boringssl-build.patch +Patch1: install-sh-scripts-to-buildroot.patch + +Packager: sadlerm + +BuildRequires: autoconf automake make cmake ninja-build +BuildRequires: gcc gcc-c++ libtool +BuildRequires: golang +BuildRequires: unzip +BuildRequires: zlib-ng-compat-devel +BuildRequires: zstd libzstd-devel + +%global _description %{expand: +A special build of curl that can impersonate Chrome, Edge and Safari. curl-impersonate is able to perform TLS and HTTP handshakes that are identical to that of a real browser. + +curl-impersonate can be used either as a command line tool, similar to the regular curl, or as a library that can be integrated instead of the regular libcurl.} + +%description %_description + + +%package libs +Summary: Shared libraries for %{name} +Provides: libcurl-impersonate-chrome = %{version}-%{release} + +%description libs +%_description + +This package provides the libcurl-impersonate-chrome shared object file, which is libcurl compiled with the same changes as the curl-impersonate binary. + +%package devel +Summary: Development files for %{name} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} + +%description devel +%_description + +This package contains the object files necessary to develop %{name}. + + +%prep +%autosetup -n curl-impersonate-%{version} -p1 + +%build +%configure +%{__make} chrome-build + +%check +%{__make} chrome-checkbuild + +%install +%{__make} DESTDIR=%{buildroot} chrome-install + +%files +%license LICENSE +%doc README.md docs/ +%{_bindir}/%{name} +%{_bindir}/%{name}-config +%{_bindir}/curl_* + +%files libs +%license LICENSE +%{_prefix}/lib/libcurl-impersonate-chrome.so.4 +%{_prefix}/lib/libcurl-impersonate-chrome.so.4.[0-9].[0-9] + +%files devel +%{_prefix}/lib/libcurl-impersonate-chrome.a +%{_prefix}/lib/libcurl-impersonate-chrome.so + +%changelog +* Sun Feb 23 2025 sadlerm +- Initial package diff --git a/anda/tools/curl-impersonate/install-sh-scripts-to-buildroot.patch b/anda/tools/curl-impersonate/install-sh-scripts-to-buildroot.patch new file mode 100644 index 0000000000..c8caf6151e --- /dev/null +++ b/anda/tools/curl-impersonate/install-sh-scripts-to-buildroot.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index 41d7324..56a029e 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -83,7 +83,7 @@ chrome-install: ## Install the Chrome version of curl-impersonate after build + cd $(CURL_VERSION) + $(MAKE) install-exec MAKEFLAGS= + # Wrapper scripts for the Chrome version (e.g. 'curl_chrome99') +- install $(srcdir)/chrome/curl_* @bindir@ ++ install $(srcdir)/chrome/curl_* $(DESTDIR)@bindir@ + .PHONY: chrome-install + + chrome-install-strip: ## Like 'chrome-install', but strip binaries for smaller size diff --git a/anda/tools/curl-impersonate/remove-werror-in-boringssl-build.patch b/anda/tools/curl-impersonate/remove-werror-in-boringssl-build.patch new file mode 100644 index 0000000000..094143afe0 --- /dev/null +++ b/anda/tools/curl-impersonate/remove-werror-in-boringssl-build.patch @@ -0,0 +1,18 @@ +diff --git a/chrome/patches/boringssl.patch b/chrome/patches/boringssl.patch +index d3adf2d..a7cf3a6 100644 +--- a/chrome/patches/boringssl.patch ++++ b/chrome/patches/boringssl.patch +@@ -8,6 +8,13 @@ index 000000000..678d1ca41 + + + +git diff d24a382 > boringssl.patch + +mv boringssl.patch ../curl-impersonate/chrome/patches/boringssl.patch ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index ee5cc0466..32d1c8cca 100644 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -143 +143 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CLANG) ++- set(C_CXX_FLAGS "-Werror -Wformat=2 -Wsign-compare -Wwrite-strings -Wvla -Wshadow -Wtype-limits") +++ set(C_CXX_FLAGS "-Wformat=2 -Wsign-compare -Wwrite-strings -Wvla -Wshadow -Wtype-limits") + diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h + index e500dd76e..e75bca26b 100644 + --- a/include/openssl/ssl.h diff --git a/anda/tools/electron/electron.spec b/anda/tools/electron/electron.spec index 28673a59e2..a7f0a565df 100644 --- a/anda/tools/electron/electron.spec +++ b/anda/tools/electron/electron.spec @@ -12,7 +12,7 @@ %global __provides_exclude_from %{_libdir}/%{name}/.*\\.so Name: electron -Version: 34.2.0 +Version: 37.3.1 Release: 1%?dist Summary: Build cross platform desktop apps with web technologies License: MIT diff --git a/anda/tools/espanso-wayland/espanso-wayland.spec b/anda/tools/espanso-wayland/espanso-wayland.spec index 0b35355a70..59657ea215 100644 --- a/anda/tools/espanso-wayland/espanso-wayland.spec +++ b/anda/tools/espanso-wayland/espanso-wayland.spec @@ -1,6 +1,6 @@ Name: espanso-wayland -Version: 2.2.2 -Release: 2%?dist +Version: 2.2.4 +Release: 1%?dist Summary: Cross-platform Text Expander written in Rust for Wayland License: GPL-3.0 URL: https://espanso.org @@ -31,7 +31,7 @@ cd espanso %build cd espanso -%cargo_build -n -f vendored-tls,"wayland",modulo -- --package={espanso,espanso-clipboard,espanso-config,espanso-detect,espanso-engine,espanso-info,espanso-inject,espanso-ipc,espanso-kvs,espanso-mac-utils,espanso-match,espanso-modulo,espanso-package,espanso-path,espanso-render,espanso-ui} +%cargo_build -n -f vendored-tls,"wayland",modulo -- --package={espanso,espanso-clipboard,espanso-config,espanso-detect,espanso-engine,espanso-info,espanso-inject,espanso-ipc,espanso-kvs,espanso-mac-utils,espanso-match,espanso-modulo,espanso-package,espanso-render,espanso-ui} %install mkdir -p %buildroot%_bindir diff --git a/anda/tools/espanso-x11/espanso-x11.spec b/anda/tools/espanso-x11/espanso-x11.spec index 99ab16fc59..0e46222c7e 100644 --- a/anda/tools/espanso-x11/espanso-x11.spec +++ b/anda/tools/espanso-x11/espanso-x11.spec @@ -1,6 +1,6 @@ Name: espanso-x11 -Version: 2.2.2 -Release: 2%?dist +Version: 2.2.4 +Release: 1%?dist Summary: Cross-platform Text Expander written in Rust for X11 License: GPL-3.0 URL: https://espanso.org @@ -31,7 +31,7 @@ cd espanso %build cd espanso -%cargo_build -n -f vendored-tls,"default" -- --package={espanso,espanso-clipboard,espanso-config,espanso-detect,espanso-engine,espanso-info,espanso-inject,espanso-ipc,espanso-kvs,espanso-mac-utils,espanso-match,espanso-modulo,espanso-package,espanso-path,espanso-render,espanso-ui} +%cargo_build -n -f vendored-tls,"default" -- --package={espanso,espanso-clipboard,espanso-config,espanso-detect,espanso-engine,espanso-info,espanso-inject,espanso-ipc,espanso-kvs,espanso-mac-utils,espanso-match,espanso-modulo,espanso-package,espanso-render,espanso-ui} %install mkdir -p %buildroot%_bindir diff --git a/anda/tools/flashprog/anda.hcl b/anda/tools/flashprog/anda.hcl new file mode 100644 index 0000000000..71eb48d79e --- /dev/null +++ b/anda/tools/flashprog/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "flashprog.spec" + } +} diff --git a/anda/tools/flashprog/flashprog.spec b/anda/tools/flashprog/flashprog.spec new file mode 100644 index 0000000000..0de4d43398 --- /dev/null +++ b/anda/tools/flashprog/flashprog.spec @@ -0,0 +1,71 @@ +%global common_description %{expand: +flashprog is a utility for detecting, reading, writing, verifying and erasing flash chips. It is often used to flash BIOS/EFI/coreboot/firmware images in-system using a supported mainboard, but it also supports flashing of network cards (NICs), SATA controller cards, and other external devices which can program flash chips. + +It supports a wide range of flash chips (most commonly found in SOIC8, DIP8, SOIC16, WSON8, PLCC32, DIP32, TSOP32, and TSOP40 packages), which use various protocols such as LPC, FWH, parallel flash, or SPI.} + +Name: flashprog +Version: 1.4 +Release: 2%{?dist} +Summary: Utility for detecting, reading, writing, verifying and erasing flash chips + +License: GPL-2.0-only +URL: https://flashprog.org + +Packager: sadlerm + +BuildRequires: anda-srpm-macros +BuildRequires: make +BuildRequires: gcc +BuildRequires: doxygen +BuildRequires: pciutils-devel +BuildRequires: libusb1-devel +BuildRequires: libftdi-devel +BuildRequires: libjaylink-devel +BuildRequires: libgpiod-devel +BuildRequires: systemd-devel + +%description +%{common_description} + + +%package libs-static +Summary: Shared static library for flashprog + +%description libs-static +%{common_description} + +%package devel +Summary: Development headers for flashprog + +%description devel +%{common_description} + + +%prep +%git_clone https://review.sourcearcade.org/flashprog v%{version} + +%build +%make_build PREFIX=%{_prefix} + +%install +%__make DESTDIR=%{buildroot} PREFIX=%{_prefix} install libinstall + +%files +%license COPYING +%doc README.md +%{_bindir}/flashprog +%{_mandir}/man8/flashprog.8.gz +%{_mandir}/man8/flashprog-config.8.gz +%{_mandir}/man8/flashprog-write-protect.8.gz + +%files libs-static +%license COPYING +%{_prefix}/lib/libflashprog.a + +%files devel +%{_includedir}/libflashprog.h + +%changelog +* Thu Feb 27 2025 sadlerm +- Initial package + diff --git a/anda/tools/flashrom-cros/flashrom-cros.spec b/anda/tools/flashrom-cros/flashrom-cros.spec index 4d2030d3e1..485de48893 100644 --- a/anda/tools/flashrom-cros/flashrom-cros.spec +++ b/anda/tools/flashrom-cros/flashrom-cros.spec @@ -1,5 +1,5 @@ %global commit_date 20240911 -%global commit c1ab7468d28d164a30d598eb3e42a5febaf73bbc +%global commit c1ab7468d28d164a30d598eb3e42a5febaf73bbc %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: flashrom-cros @@ -11,15 +11,23 @@ URL: https://chromium.googlesource.com/chromiumos/third_party/flashro Source0: %url/+archive/refs/heads/release-R130-16033.B.tar.gz BuildRequires: gcc gnupg2 libusb1-devel meson pciutils-devel python3-sphinx systemd zlib-devel dmidecode Requires: dmidecode udev +Conflicts: flashrom Packager: WeirdTreeThing - %description flashrom is a utility for identifying, reading, writing, verifying and erasing flash chips. It is designed to flash BIOS/EFI/coreboot/firmware/optionROM images on mainboards, network/graphics/storage controller cards, and various other programmer devices. +%package devel +Summary: Development package for %{name} +Requires: %{name} = %{version}-%{release} +Conflicts: flashrom-devel + +%description devel +Files for development with %{name}. + %prep %setup -c @@ -30,9 +38,27 @@ other programmer devices. %install install -Dm755 %{_vpath_builddir}/flashrom %{buildroot}%{_bindir}/%{name} +install -Dm755 include/libflashrom.h %{buildroot}%{_includedir}/libflashrom.h +install -Dm755 %{_vpath_builddir}/meson-private/flashrom.pc %{buildroot}%{_libdir}/pkgconfig/flashrom.pc +install -Dm755 %{_vpath_builddir}/libflashrom.so %{buildroot}%{_libdir}/libflashrom.so +install -Dm755 %{_vpath_builddir}/libflashrom.so.1 %{buildroot}%{_libdir}/libflashrom.so.1 +install -Dm755 %{_vpath_builddir}/libflashrom.so.1.0.0 %{buildroot}%{_libdir}/libflashrom.so.1.0.0 + %files %{_bindir}/%{name} +%license COPYING +%doc README.rst README.chromiumos doc/ + +%files devel +%{_includedir}/libflashrom.h +%{_libdir}/libflashrom.so +%{_libdir}/libflashrom.so.1 +%{_libdir}/libflashrom.so.1.0.0 +%{_libdir}/pkgconfig/flashrom.pc %changelog +* Fri Jul 04 2025 Owen Zimmerman +- Add back to terra, conflict with flashrom, add devel package, include other needed files + * Fri Oct 25 2024 WeirdTreeThing - initial release diff --git a/anda/tools/fuc/fuc.spec b/anda/tools/fuc/fuc.spec index 09b4a29ae7..4188f7770a 100644 --- a/anda/tools/fuc/fuc.spec +++ b/anda/tools/fuc/fuc.spec @@ -1,7 +1,7 @@ %global debug_package %{nil} Name: fuc -Version: 3.0.0 +Version: 3.1.1 Release: 1%?dist Summary: Modern, performance focused unix commands URL: https://github.com/SUPERCILEX/fuc diff --git a/anda/tools/gcm-core/gcm-core.spec b/anda/tools/gcm-core/gcm-core.spec index f3d14992ed..0f6863423a 100644 --- a/anda/tools/gcm-core/gcm-core.spec +++ b/anda/tools/gcm-core/gcm-core.spec @@ -3,14 +3,16 @@ %global long_name git-credential-manager -%global forgeurl https://github.com/GitCredentialManager/git-credential-manager +%global forgeurl https://github.com/git-ecosystem/git-credential-manager Name: gcm-core Version: 2.6.1 -%forgemeta + Release: 1%?dist Summary: Secure, cross-platform Git credential storage +%forgemeta + License: MIT URL: %{forgeurl} Source0: %{forgesource} diff --git a/anda/tools/gcm-core/update.rhai b/anda/tools/gcm-core/update.rhai index 10dbb7fdf2..37231d1203 100644 --- a/anda/tools/gcm-core/update.rhai +++ b/anda/tools/gcm-core/update.rhai @@ -1 +1 @@ -rpm.version(gh("GitCredentialManager/git-credential-manager")); +rpm.version(gh("git-ecosystem/git-credential-manager")); diff --git a/anda/tools/gsctool/gsctool.spec b/anda/tools/gsctool/gsctool.spec index 8aeddd4282..11ddd09c38 100644 --- a/anda/tools/gsctool/gsctool.spec +++ b/anda/tools/gsctool/gsctool.spec @@ -2,12 +2,13 @@ %define shortcommit %(c=%{commit}; echo ${c:0:12}) Name: gsctool Version: git+%{shortcommit} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Chromium OS EC utilities License: BSD-3-Clause URL: https://chromium.googlesource.com/chromiumos/platform/ec Source0: https://chromium.googlesource.com/chromiumos/platform/ec/+archive/%{commit}.tar.gz#/%{name}-git+%{commit}.tar.gz +Source1: https://chromium.googlesource.com/chromium/src/+/HEAD/LICENSE BuildRequires: pkgconfig BuildRequires: pkgconfig(libusb-1.0) @@ -29,11 +30,11 @@ pushd extra/usb_updater %install pushd extra/usb_updater install -D -m 755 gsctool %{buildroot}%{_bindir}/gsctool - +install -Dm 644 %{SOURCE1} %{buildroot}%{_licensedir}/%{name}/LICENSE %files %{_bindir}/gsctool - +%license %{_licensedir}/%{name}/LICENSE %changelog * Wed Mar 27 2024 Cappy Ishihara diff --git a/anda/tools/java-binfmt/java-binfmt.spec b/anda/tools/java-binfmt/java-binfmt.spec index 2f27561804..0ae12959e1 100644 --- a/anda/tools/java-binfmt/java-binfmt.spec +++ b/anda/tools/java-binfmt/java-binfmt.spec @@ -18,7 +18,7 @@ Source5: https://raw.githubusercontent.com/terrapkg/pkg-java-binfmt/%{com Source6: https://raw.githubusercontent.com/terrapkg/pkg-java-binfmt/%{commit}/Applet-lib64.conf BuildRequires: gcc BuildRequires: systemd-rpm-macros -Packager: ShinyGil +Packager: Gilver E. %description This package installs binfmt files for use with Java wrappers. @@ -109,5 +109,5 @@ install -Dpm644 %{SOURCE6} %{buildroot}%{_binfmtdir}/Applet-lib64.conf /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : %changelog -* Thu Jan 30 2025 ShinyGil +* Thu Jan 30 2025 Gilver E. - Initial package diff --git a/anda/tools/kanata/anda.hcl b/anda/tools/kanata/anda.hcl new file mode 100644 index 0000000000..7bcdfdbbaa --- /dev/null +++ b/anda/tools/kanata/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "rust-kanata.spec" + } +} diff --git a/anda/tools/kanata/kanata-fix-metadata-auto.diff b/anda/tools/kanata/kanata-fix-metadata-auto.diff new file mode 100644 index 0000000000..acb539232a --- /dev/null +++ b/anda/tools/kanata/kanata-fix-metadata-auto.diff @@ -0,0 +1,135 @@ +--- kanata-1.9.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ kanata-1.9.0/Cargo.toml 2025-06-23T09:19:38.121344+00:00 +@@ -45,23 +45,9 @@ + "kanata-parser/gui", + "win_sendinput_send_scancodes", + "win_llhook_read_scancodes", +- "muldiv", +- "strip-ansi-escapes", + "open", +- "dep:windows-sys", +- "winapi/processthreadsapi", +- "native-windows-gui/tray-notification", +- "native-windows-gui/message-window", +- "native-windows-gui/menu", +- "native-windows-gui/cursor", +- "native-windows-gui/high-dpi", +- "native-windows-gui/embed-resource", +- "native-windows-gui/image-decoder", +- "native-windows-gui/notice", +- "native-windows-gui/animation-timer", + ] + interception_driver = [ +- "kanata-interception", + "kanata-parser/interception_driver", + ] + passthru_ahk = [ +@@ -75,9 +61,7 @@ + wasm = ["instant/wasm-bindgen"] + win_llhook_read_scancodes = ["kanata-parser/win_llhook_read_scancodes"] + win_manifest = [ +- "embed-resource", + "indoc", +- "regex", + ] + win_sendinput_send_scancodes = ["kanata-parser/win_sendinput_send_scancodes"] + zippychord = ["kanata-parser/zippychord"] +@@ -186,97 +170,9 @@ + [target.'cfg(target_os = "linux")'.dependencies.signal-hook] + version = "0.3.14" + +-[target.'cfg(target_os = "macos")'.dependencies.core-graphics] +-version = "0.24.0" +- +-[target.'cfg(target_os = "macos")'.dependencies.karabiner-driverkit] +-version = "0.1.5" +- +-[target.'cfg(target_os = "macos")'.dependencies.libc] +-version = "0.2" +- +-[target.'cfg(target_os = "macos")'.dependencies.objc] +-version = "0.2.7" +- +-[target.'cfg(target_os = "macos")'.dependencies.open] +-version = "5" +-optional = true +- +-[target.'cfg(target_os = "macos")'.dependencies.os_pipe] +-version = "1.2.1" +- +-[target.'cfg(target_os = "windows")'.dependencies.encode_unicode] +-version = "0.3.6" +- +-[target.'cfg(target_os = "windows")'.dependencies.kanata-interception] +-version = "0.3.0" +-optional = true +- +-[target.'cfg(target_os = "windows")'.dependencies.muldiv] +-version = "1.0.1" +-optional = true +- +-[target.'cfg(target_os = "windows")'.dependencies.native-windows-gui] +-version = "1.0.13" +-default-features = false +- +-[target.'cfg(target_os = "windows")'.dependencies.open] +-version = "5" +-features = ["shellexecute-on-windows"] +-optional = true +- +-[target.'cfg(target_os = "windows")'.dependencies.regex] +-version = "1.10.4" +-optional = true +- +-[target.'cfg(target_os = "windows")'.dependencies.strip-ansi-escapes] +-version = "0.2.0" +-optional = true +- +-[target.'cfg(target_os = "windows")'.dependencies.winapi] +-version = "0.3.9" +-features = [ +- "wincon", +- "timeapi", +- "mmsystem", +-] +- +-[target.'cfg(target_os = "windows")'.dependencies.windows-sys] +-version = "0.52.0" +-features = [ +- "Win32_Devices_DeviceAndDriverInstallation", +- "Win32_Devices_Usb", +- "Win32_Foundation", +- "Win32_Graphics_Gdi", +- "Win32_Security", +- "Win32_System_Diagnostics_Debug", +- "Win32_System_Registry", +- "Win32_System_Threading", +- "Win32_UI_Controls", +- "Win32_UI_Shell", +- "Win32_UI_HiDpi", +- "Win32_UI_WindowsAndMessaging", +- "Win32_System_SystemInformation", +- "Wdk", +- "Wdk_System", +- "Wdk_System_SystemServices", +-] +-optional = true +- +-[target.'cfg(target_os = "windows")'.build-dependencies.embed-resource] +-version = "2.4.2" +-optional = true +- +-[target.'cfg(target_os = "windows")'.build-dependencies.indoc] +-version = "2.0.4" +-optional = true +- +-[target.'cfg(target_os = "windows")'.build-dependencies.regex] +-version = "1.10.4" +-optional = true +- + [profile.release] + opt-level = "z" + lto = "fat" + codegen-units = 1 + panic = "abort" ++ diff --git a/anda/tools/kanata/rust-kanata.spec b/anda/tools/kanata/rust-kanata.spec new file mode 100644 index 0000000000..f840461334 --- /dev/null +++ b/anda/tools/kanata/rust-kanata.spec @@ -0,0 +1,276 @@ +# Generated by rust2rpm 27 +%bcond check 1 + +%global crate kanata + +Name: rust-kanata +Version: 1.9.0 +Release: 1%?dist +Summary: Multi-layer keyboard customization + +License: LGPL-3.0-only +URL: https://crates.io/crates/kanata +Source: %{crates_source} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: kanata-fix-metadata-auto.diff +Packager: madonuko + +BuildRequires: anda-srpm-macros cargo-rpm-macros >= 24 + +%global _description %{expand: +Multi-layer keyboard customization.} + +%description %{_description} + +%package -n %{crate} +Summary: %{summary} +License: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND BSD-3-Clause AND BSL-1.0 AND ISC AND LGPL-3.0-only AND MIT AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MPL-2.0 AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) +# LICENSE.dependencies contains a full license breakdown + +%description -n %{crate} %{_description} + +%files -n %{crate} +%license LICENSE +%license cfg_samples/tray-icon/license_icons.txt +%license src/gui/win_nwg_ext/license-MIT +%license src/gui/win_nwg_ext/license-nwg-MIT +%license LICENSE.dependencies +%doc README.md +%{_bindir}/kanata + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE +%license %{crate_instdir}/cfg_samples/tray-icon/license_icons.txt +%license %{crate_instdir}/src/gui/win_nwg_ext/license-MIT +%license %{crate_instdir}/src/gui/win_nwg_ext/license-nwg-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+cmd-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+cmd-devel %{_description} + +This package contains library source intended for building other packages which +use the "cmd" feature of the "%{crate}" crate. + +%files -n %{name}+cmd-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+gui-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+gui-devel %{_description} + +This package contains library source intended for building other packages which +use the "gui" feature of the "%{crate}" crate. + +%files -n %{name}+gui-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+indoc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+indoc-devel %{_description} + +This package contains library source intended for building other packages which +use the "indoc" feature of the "%{crate}" crate. + +%files -n %{name}+indoc-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+interception_driver-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+interception_driver-devel %{_description} + +This package contains library source intended for building other packages which +use the "interception_driver" feature of the "%{crate}" crate. + +%files -n %{name}+interception_driver-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+open-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+open-devel %{_description} + +This package contains library source intended for building other packages which +use the "open" feature of the "%{crate}" crate. + +%files -n %{name}+open-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+passthru_ahk-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+passthru_ahk-devel %{_description} + +This package contains library source intended for building other packages which +use the "passthru_ahk" feature of the "%{crate}" crate. + +%files -n %{name}+passthru_ahk-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+perf_logging-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+perf_logging-devel %{_description} + +This package contains library source intended for building other packages which +use the "perf_logging" feature of the "%{crate}" crate. + +%files -n %{name}+perf_logging-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+serde_json-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde_json-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde_json" feature of the "%{crate}" crate. + +%files -n %{name}+serde_json-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+simulated_input-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+simulated_input-devel %{_description} + +This package contains library source intended for building other packages which +use the "simulated_input" feature of the "%{crate}" crate. + +%files -n %{name}+simulated_input-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+simulated_output-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+simulated_output-devel %{_description} + +This package contains library source intended for building other packages which +use the "simulated_output" feature of the "%{crate}" crate. + +%files -n %{name}+simulated_output-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+tcp_server-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+tcp_server-devel %{_description} + +This package contains library source intended for building other packages which +use the "tcp_server" feature of the "%{crate}" crate. + +%files -n %{name}+tcp_server-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+wasm-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+wasm-devel %{_description} + +This package contains library source intended for building other packages which +use the "wasm" feature of the "%{crate}" crate. + +%files -n %{name}+wasm-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+win_llhook_read_scancodes-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+win_llhook_read_scancodes-devel %{_description} + +This package contains library source intended for building other packages which +use the "win_llhook_read_scancodes" feature of the "%{crate}" crate. + +%files -n %{name}+win_llhook_read_scancodes-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+win_manifest-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+win_manifest-devel %{_description} + +This package contains library source intended for building other packages which +use the "win_manifest" feature of the "%{crate}" crate. + +%files -n %{name}+win_manifest-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+win_sendinput_send_scancodes-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+win_sendinput_send_scancodes-devel %{_description} + +This package contains library source intended for building other packages which +use the "win_sendinput_send_scancodes" feature of the "%{crate}" crate. + +%files -n %{name}+win_sendinput_send_scancodes-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+zippychord-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+zippychord-devel %{_description} + +This package contains library source intended for building other packages which +use the "zippychord" feature of the "%{crate}" crate. + +%files -n %{name}+zippychord-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version} -p1 +%cargo_prep_online + +%build +%{cargo_license_summary_online} +%{cargo_license_online} > LICENSE.dependencies + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif diff --git a/anda/tools/kanata/update.rhai b/anda/tools/kanata/update.rhai new file mode 100644 index 0000000000..610de31c42 --- /dev/null +++ b/anda/tools/kanata/update.rhai @@ -0,0 +1 @@ +rpm.version(crates("kanata")); diff --git a/anda/tools/keyd/keyd.spec b/anda/tools/keyd/keyd.spec index dac5e79f8a..fce4b28ea3 100644 --- a/anda/tools/keyd/keyd.spec +++ b/anda/tools/keyd/keyd.spec @@ -1,6 +1,6 @@ Name: keyd Version: 2.5.0 -Release: 2%?dist +Release: 3%?dist Summary: Key remapping daemon for linux URL: https://github.com/rvaiya/keyd License: MIT @@ -15,7 +15,7 @@ level input primitives (evdev, uinput). %prep %autosetup cat< keyd.conf -g keyd +g keyd - EOF %build diff --git a/anda/tools/kmonad/kmonad.spec b/anda/tools/kmonad/kmonad.spec index e4bee0bd80..d0e313bd63 100644 --- a/anda/tools/kmonad/kmonad.spec +++ b/anda/tools/kmonad/kmonad.spec @@ -1,8 +1,8 @@ %global pkg_name kmonad Name: %{pkg_name} -Version: 0.4.3 -Release: 1%{?dist} +Version: 0.4.4 +Release: 1%?dist Summary: An advanced keyboard manager License: MIT diff --git a/anda/tools/melody/melody.spec b/anda/tools/melody/melody.spec index 5126a9bd07..891c175aa1 100644 --- a/anda/tools/melody/melody.spec +++ b/anda/tools/melody/melody.spec @@ -15,6 +15,12 @@ BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros +BuildRequires: python3dist(anytree) +BuildRequires: python3dist(click) +BuildRequires: python3dist(pip) +BuildRequires: python3dist(pyyaml) +BuildRequires: python3dist(poetry-core) +BuildRequires: python3dist(rich) Requires: python3-dnf Requires: python3-melody = %{version}-%{release} @@ -30,9 +36,6 @@ Summary: %{summary} %prep %autosetup -p1 -n melody-main -%generate_buildrequires -%pyproject_buildrequires -r - %build %pyproject_wheel diff --git a/anda/tools/micro-default-editor/anda.hcl b/anda/tools/micro-default-editor/anda.hcl new file mode 100644 index 0000000000..fe49077ad5 --- /dev/null +++ b/anda/tools/micro-default-editor/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "micro-default-editor.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/tools/micro-default-editor/micro-default-editor.spec b/anda/tools/micro-default-editor/micro-default-editor.spec new file mode 100644 index 0000000000..9056d94f8c --- /dev/null +++ b/anda/tools/micro-default-editor/micro-default-editor.spec @@ -0,0 +1,44 @@ +%global commit 31218294b0df40211e8573d08c178fb4d9c4bce5 + +Name: micro-default-editor +# Version, release, and epoch are inherited from the editor package just like other default editors +Version: 2.0.11 +Release: 10%?dist +Epoch: 0 +# Inherited from Micro itself +License: MIT and ASL 2.0 +Summary: Sets Micro as the default editor +URL: https://github.com/zyedidia/micro +Source0: https://raw.githubusercontent.com/terrapkg/pkg-micro-default-editor/%{commit}/micro-default-editor.csh +Source1: https://raw.githubusercontent.com/terrapkg/pkg-micro-default-editor/%{commit}/micro-default-editor.sh +Source2: https://raw.githubusercontent.com/terrapkg/pkg-micro-default-editor/%{commit}/micro-default-editor.fish +# For EVR macro +BuildRequires: anda-srpm-macros +Requires: default-editor +Requires: micro +# All default editor packages MUST provide this +Provides: system-default-editor +BuildArch: noarch +Packager: Gilver E. + +%description +This package ensures the EDITOR shell variable +is set in common shells to Micro. + +%build +# Nothing + +%install +install -Dpm644 %{SOURCE0} -t %{buildroot}%{_sysconfdir}/profile.d/ +install -Dpm644 %{SOURCE1} -t %{buildroot}%{_sysconfdir}/profile.d/ +install -Dpm644 %{SOURCE2} -t %{buildroot}%{_datadir}/fish/vendor_conf.d/ + +%files +%dir %{_sysconfdir}/profile.d +%config(noreplace) %{_sysconfdir}/profile.d/micro-default-editor.* +%dir %{_datadir}/fish/vendor_conf.d +%{_datadir}/fish/vendor_conf.d/micro-default-editor.fish + +%changelog +* Sat Jun 28 2025 Gilver E. - 2.0.11-10 +- Initial package diff --git a/anda/tools/micro-default-editor/update.rhai b/anda/tools/micro-default-editor/update.rhai new file mode 100644 index 0000000000..e98b37444f --- /dev/null +++ b/anda/tools/micro-default-editor/update.rhai @@ -0,0 +1,5 @@ +let v = sh("dnf rq --qf='%{version}|%{release}|%{epoch}' micro --repo=fedora,updates", #{"stdout": "piped"}).ctx.stdout; +let vre = v.split("|"); +rpm.version(vre[0]); +rpm.release(vre[1].split(".")[0].parse_int()); +rpm.f = sub(`^Epoch: (.+?)$`, "Epoch: " + vre[2], rpm.f); diff --git a/anda/tools/modern-colorthief/anda.hcl b/anda/tools/modern-colorthief/anda.hcl new file mode 100644 index 0000000000..d061183831 --- /dev/null +++ b/anda/tools/modern-colorthief/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "modern-colorthief.spec" + } +} diff --git a/anda/tools/modern-colorthief/modern-colorthief.spec b/anda/tools/modern-colorthief/modern-colorthief.spec new file mode 100644 index 0000000000..109387ad99 --- /dev/null +++ b/anda/tools/modern-colorthief/modern-colorthief.spec @@ -0,0 +1,109 @@ +%global pypi_name modern_colorthief +%bcond docs 1 +%bcond test 1 + +# The srcrpm is not prefixed with Python because the source is mostly Rust +Name: modern-colorthief +Version: 0.1.7 +Release: 1%{?dist} +Summary: ColorThief reimagined +SourceLicense: MIT +License: (0BSD OR MIT OR Apache-2.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception) AND BSD-2-Clause AND (CC0-1.0 OR Apache-2.0) AND (MIT OR Apache-2.0 OR NCSA) AND (MIT OR Apache-2.0 OR Zlib) AND (MIT OR Apache-2.0) AND (MIT OR Zlib OR Apache-2.0) AND MIT AND (Unlicense OR MIT) AND (Zlib OR Apache-2.0 OR MIT) +URL: https://modern-colorthief.readthedocs.io +Source0: %{pypi_source} +BuildRequires: anda-srpm-macros +BuildRequires: cargo +BuildRequires: cargo-rpm-macros +BuildRequires: maturin +BuildRequires: mold +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +BuildRequires: python3dist(pip) +BuildRequires: python3dist(setuptools) +%if %{with docs} +BuildRequires: python3dist(modern-colorthief) +BuildRequires: python3dist(myst-parser) +BuildRequires: python3dist(shibuya) +BuildRequires: python3dist(sphinx) +%endif +%if %{with test} +%if 0%{?fedora} > 40 +BuildRequires: poetry +BuildRequires: python3dist(poetry) +%endif +BuildRequires: python3dist(colorthief) +BuildRequires: python3dist(fast-colorthief) +BuildRequires: python3dist(pytest) +%endif + +%description +Colorthief but with modern code. + +%package -n python3-%{name} +Summary: %{summary} +License: MIT + +%description -n python3-%{name} +Colorthief but with modern code. + +%if %{with docs} +%package -n python3-%{name}-doc +Summary: Doc files for Modern Colorthief +License: MIT +BuildArch: noarch + +%description -n python3-%{name}-doc +Documentation for Modern Colorthief. +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} +%cargo_prep_online + +%build +%pyproject_wheel + +%if %{with docs} +# Generates the docs in all languages Sphinx can translate most or all of the docs for this project in +for l in ca cs cy da de el en es et eu fa fr he hi hi_IN hr hu id it ja ko lt lv nb_NO nl pl pt pt_BR pt_PT ro ru sk sq sv tr zh_CN zh_TW; do +sphinx-build docs html/$l -D language=$l +# Remove the sphinx-build leftovers +rm -rf html/$l/.{doctrees,buildinfo} +done +%endif + +%install +%pyproject_install + +%{cargo_license_online} > LICENSE.dependencies + +%if %{with test} +%check +# Poetry doesn't exist on EL and is too old on 40 +%if 0%{?fedora} <= 40 || 0%{?rhel} +%pytest tests/*.py +%else +# This is in the wrong spot in pyproject.toml and Poetry hates it +# May seem like defeating the purpose of testing but the other tests can be useful +sed -iE 's/python = ">=3.9,<3.14"//' pyproject.toml +poetry run pytest +%endif +%endif + +%files -n python3-%{name} +%doc DIFFERENCES.md +%doc PKG-INFO +%doc README.md +%license LICENSE +%license LICENSE.dependencies +%{python3_sitearch}/%{pypi_name} +%{python3_sitearch}/%{pypi_name}-%{version}.dist-info/ + +%if %{with docs} +%files -n python3-%{name}-doc +%doc html/* +%endif + +%changelog +* Tue May 13 2025 Gilver E. - 0.1.7-1 +- Initial package diff --git a/anda/tools/modern-colorthief/update.rhai b/anda/tools/modern-colorthief/update.rhai new file mode 100644 index 0000000000..ee3328258f --- /dev/null +++ b/anda/tools/modern-colorthief/update.rhai @@ -0,0 +1 @@ +rpm.version(pypi("modern-colorthief")); diff --git a/anda/tools/neovim-default-editor/anda.hcl b/anda/tools/neovim-default-editor/anda.hcl new file mode 100644 index 0000000000..005dd8abb5 --- /dev/null +++ b/anda/tools/neovim-default-editor/anda.hcl @@ -0,0 +1,9 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "neovim-default-editor.spec" + } + labels { + updbranch = 1 + } +} diff --git a/anda/tools/neovim-default-editor/neovim-default-editor.spec b/anda/tools/neovim-default-editor/neovim-default-editor.spec new file mode 100644 index 0000000000..59b3e84b93 --- /dev/null +++ b/anda/tools/neovim-default-editor/neovim-default-editor.spec @@ -0,0 +1,44 @@ +%global commit abde842fa612fccf0f665462b4bd0b721f6b8f0e + +Name: neovim-default-editor +# Version, release, and epoch are inherited from the editor package just like other default editors +Version: 0.5.2 +Release: 7%?dist +Epoch: 0 +# Inherited from Neovim itself +License: Apache-2.0 AND Vim AND MIT +Summary: Sets Neovim as the default editor +URL: https://neovim.io +Source0: https://raw.githubusercontent.com/terrapkg/pkg-neovim-default-editor/%{commit}/neovim-default-editor.csh +Source1: https://raw.githubusercontent.com/terrapkg/pkg-neovim-default-editor/%{commit}/neovim-default-editor.sh +Source2: https://raw.githubusercontent.com/terrapkg/pkg-neovim-default-editor/%{commit}/neovim-default-editor.fish +# For EVR macro +BuildRequires: anda-srpm-macros +Requires: default-editor +Requires: neovim +# All default editor packages MUST provide this +Provides: system-default-editor +BuildArch: noarch +Packager: Gilver E. + +%description +This package ensures the EDITOR shell variable +is set in common shells to Neovim. + +%build +# Nothing + +%install +install -Dpm644 %{SOURCE0} -t %{buildroot}%{_sysconfdir}/profile.d/ +install -Dpm644 %{SOURCE1} -t %{buildroot}%{_sysconfdir}/profile.d/ +install -Dpm644 %{SOURCE2} -t %{buildroot}%{_datadir}/fish/vendor_conf.d/ + +%files +%dir %{_sysconfdir}/profile.d +%config(noreplace) %{_sysconfdir}/profile.d/neovim-default-editor.* +%dir %{_datadir}/fish/vendor_conf.d +%{_datadir}/fish/vendor_conf.d/neovim-default-editor.fish + +%changelog +* Fri Jul 18 2025 Gilver E. - 0.11.3-1 +- Initial package diff --git a/anda/tools/neovim-default-editor/update.rhai b/anda/tools/neovim-default-editor/update.rhai new file mode 100644 index 0000000000..3619e2656c --- /dev/null +++ b/anda/tools/neovim-default-editor/update.rhai @@ -0,0 +1,8 @@ +import "andax/bump_extras.rhai" as bump; + +let v = bump::bodhi_vr("neovim", bump::as_bodhi_ver(labels.branch)); +let e = sh("dnf rq --qf='%{epoch}' neovim --repo=fedora,updates", #{"stdout": "piped"}).ctx.stdout; + +rpm.version(v[1]); +rpm.release(v[2]); +rpm.f = sub(`^Epoch: (.+?)$`, "Epoch: " + e, rpm.f); diff --git a/anda/tools/nerdfetch/anda.hcl b/anda/tools/nerdfetch/anda.hcl new file mode 100644 index 0000000000..5da9413784 --- /dev/null +++ b/anda/tools/nerdfetch/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "nerdfetch-tools.spec" + } +} diff --git a/anda/tools/nerdfetch/nerdfetch-tools.spec b/anda/tools/nerdfetch/nerdfetch-tools.spec new file mode 100644 index 0000000000..c96ddd8fa1 --- /dev/null +++ b/anda/tools/nerdfetch/nerdfetch-tools.spec @@ -0,0 +1,33 @@ +Name: nerdfetch +Version: 8.4.0 +Release: 1%?dist +Summary: A POSIX *nix fetch script using Nerdfonts + +License: MIT +URL: https://github.com/ThatOneCalculator/NerdFetch +Source0: %url/archive/refs/tags/v%version.tar.gz + +BuildArch: noarch +Requires: /usr/bin/sh +Requires: nerdfontssymbolsonly-nerd-fonts + +%description +A POSIX *nix (Linux, macOS, Android, BSD, etc) fetch script using Nerdfonts (and others) + +%prep +%autosetup -n NerdFetch-%version + +%build + + +%install +install -Dpm755 nerdfetch %buildroot%_bindir/nerdfetch + +%files +%license LICENSE +%doc README.md +%_bindir/nerdfetch + +%changelog +* Tue Jul 16 2025 dotdot0 - 8.4.0-1 +- Initial Package diff --git a/anda/tools/nerdfetch/update.rhai b/anda/tools/nerdfetch/update.rhai new file mode 100644 index 0000000000..23611178e3 --- /dev/null +++ b/anda/tools/nerdfetch/update.rhai @@ -0,0 +1 @@ +rpm.version(gh("ThatOneCalculator/NerdFetch")); diff --git a/anda/tools/piclone/anda.hcl b/anda/tools/piclone/anda.hcl new file mode 100644 index 0000000000..d44a7bd214 --- /dev/null +++ b/anda/tools/piclone/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "piclone.spec" + } +} diff --git a/anda/tools/piclone/piclone.spec b/anda/tools/piclone/piclone.spec new file mode 100644 index 0000000000..d94b54ef74 --- /dev/null +++ b/anda/tools/piclone/piclone.spec @@ -0,0 +1,60 @@ +%global commit 2d0d97cd76d9e570c14cf18ef3d6369d2513d13a +%global commit_date 20250327 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: piclone +Version: %commit_date.git~%shortcommit +Release: 1%?dist +Summary: Utility to back up Pi to an SD card reader +License: BSD-3-Clause +URL: https://github.com/raspberrypi-ui/piclone +Source0: %url/archive/%commit.tar.gz + +BuildRequires: meson +BuildRequires: ninja-build +BuildRequires: gtk3-devel +BuildRequires: glib2-devel +BuildRequires: intltool +BuildRequires: vala +BuildRequires: pkgconfig +BuildRequires: gcc + +Requires: parted dosfstools e2fsprogs coreutils util-linux-core uuid dbus-x11 gtk3 + +%description +SD Card backup program for Raspberry Pi. +This is a GTK application to copy the contents of SD cards and other USB +drives. It mirrors the partition layout of the source device onto the +target device, with the exception of the last partition, which is created +to be the largest which will fit onto the target device. +Files are then copied between all partitions - the result should be a +bootable card with an image of the source device. + +%prep +%autosetup -n piclone-%commit + +%build +%meson +%meson_build + +%install +%meson_install + +%files +%doc README +%license debian/copyright +%{_bindir}/piclone +%{_datadir}/applications/piclone.desktop +%{_datadir}/locale/de/LC_MESSAGES/piclone.mo +%{_datadir}/locale/en_GB/LC_MESSAGES/piclone.mo +%{_datadir}/locale/hy/LC_MESSAGES/piclone.mo +%{_datadir}/locale/it/LC_MESSAGES/piclone.mo +%{_datadir}/locale/ko/LC_MESSAGES/piclone.mo +%{_datadir}/locale/nb/LC_MESSAGES/piclone.mo +%{_datadir}/locale/sk/LC_MESSAGES/piclone.mo +%{_datadir}/locale/zh_CN/LC_MESSAGES/piclone.mo +%{_datadir}/piclone/piclone.ui + +%changelog +* Thu Aug 07 2025 Owen Zimmerman +- Package piclone diff --git a/anda/tools/piclone/update.rhai b/anda/tools/piclone/update.rhai new file mode 100644 index 0000000000..0a5f3408c4 --- /dev/null +++ b/anda/tools/piclone/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("raspberrypi-ui/piclone")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/tools/picotool/picotool.spec b/anda/tools/picotool/picotool.spec index 4df2c8c172..f7ed572ff2 100644 --- a/anda/tools/picotool/picotool.spec +++ b/anda/tools/picotool/picotool.spec @@ -1,6 +1,6 @@ -%define sdk_version 2.1.1 +%define sdk_version 2.2.0 Name: picotool -Version: 2.1.1 +Version: 2.2.0.a4 Release: 1%?dist Summary: Tool to inspect RP2040 binaries License: BSD-3-Clause diff --git a/anda/tools/raindrop/anda.hcl b/anda/tools/raindrop/anda.hcl new file mode 100644 index 0000000000..8371ca9704 --- /dev/null +++ b/anda/tools/raindrop/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "raindrop.spec" + } +} diff --git a/anda/tools/raindrop/desktop-file-call-pkexec.patch b/anda/tools/raindrop/desktop-file-call-pkexec.patch new file mode 100644 index 0000000000..041f51802c --- /dev/null +++ b/anda/tools/raindrop/desktop-file-call-pkexec.patch @@ -0,0 +1,13 @@ +diff --git a/data/raindrop.desktop.in b/data/raindrop.desktop.in +index 69e66f7..a042659 100644 +--- data/raindrop.desktop.in ++++ data/raindrop.desktop.in +@@ -3,7 +3,7 @@ Type=Application + Name=Screen Configuration + Comment=Configure monitor arrangement, scaling and orientation + Icon=computer +-Exec=raindrop ++Exec=sh -c 'pkexec /usr/bin/raindrop' + Terminal=false + Categories=Settings; + StartupNotify=true diff --git a/anda/tools/raindrop/org.raspberrypi.raindrop.configure-display.policy b/anda/tools/raindrop/org.raspberrypi.raindrop.configure-display.policy new file mode 100644 index 0000000000..6549a42a75 --- /dev/null +++ b/anda/tools/raindrop/org.raspberrypi.raindrop.configure-display.policy @@ -0,0 +1,19 @@ + + + + + + + auth_admin + auth_admin + auth_admin + + GTK screen configuration tool for labwc and openbox environments. + Authentication is required to configure the system's display settings. + computer + /usr/bin/raindrop + true + + diff --git a/anda/tools/raindrop/raindrop.spec b/anda/tools/raindrop/raindrop.spec new file mode 100644 index 0000000000..f86fe7dc1c --- /dev/null +++ b/anda/tools/raindrop/raindrop.spec @@ -0,0 +1,53 @@ +%global commit 66271d1eea4740131bae3aaec499a7ce06441ace +%global commit_date 20250530 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +Name: raindrop +Version: 0~%commit_date.git~%shortcommit +Release: 1%?dist +Summary: Desktop front-end for arandr and wlrandr +License: BSD-3-Clause +URL: https://github.com/raspberrypi-ui/raindrop +Packager: Owen Zimmerman +Source0: %url/archive/%commit.tar.gz +Source1: org.raspberrypi.raindrop.configure-display.policy +Patch0: desktop-file-call-pkexec.patch + +BuildRequires: meson +BuildRequires: ninja-build +BuildRequires: gtk3-devel +BuildRequires: libxml2-devel +BuildRequires: intltool +BuildRequires: pkgconfig +BuildRequires: gcc +BuildRequires: gtk-layer-shell-devel +BuildRequires: polkit + +Requires: libxml2 libinput wlr-randr gtk3 polkit + +%description +Screen configuration tool for Raspberry Pi Desktop, +GTK screen configuration tool for labwc and openbox environments. + +%prep +%autosetup -n raindrop-%commit -p0 + +%build +%meson +%meson_build + +%install +%meson_install +install -Dm644 %{SOURCE1} %{buildroot}/%{_datadir}/polkit-1/actions/org.raspberrypi.raindrop.configure-display.policy +%find_lang %{name} + +%files -f %{name}.lang +%license debian/copyright +%{_bindir}/raindrop +%{_datadir}/polkit-1/actions/org.raspberrypi.raindrop.configure-display.policy +%{_datadir}/applications/raindrop.desktop +%{_datadir}/raindrop/ui/raindrop.ui + +%changelog +* Thu Aug 07 2025 Owen Zimmerman +- Package raindrop diff --git a/anda/tools/raindrop/update.rhai b/anda/tools/raindrop/update.rhai new file mode 100644 index 0000000000..89567aae14 --- /dev/null +++ b/anda/tools/raindrop/update.rhai @@ -0,0 +1,5 @@ +rpm.global("commit", gh_commit("raspberrypi-ui/raindrop")); +if rpm.changed() { + rpm.release(); + rpm.global("commit_date", date()); +} diff --git a/anda/tools/rpi-update/rpi-update.spec b/anda/tools/rpi-update/rpi-update.spec index c7a59ca958..0a7eceaa60 100644 --- a/anda/tools/rpi-update/rpi-update.spec +++ b/anda/tools/rpi-update/rpi-update.spec @@ -1,7 +1,7 @@ %define debug_package %nil -%global commit 7ce981c2125b2dd780f4e88dc320e1570dc4c51e -%global commit_date 20240910 +%global commit 0407f61fc32ca84598b2ed23cec32f07fce6ab08 +%global commit_date 20250805 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: rpi-update diff --git a/anda/tools/rpi-utils/rpi-utils.spec b/anda/tools/rpi-utils/rpi-utils.spec index 6148f0cc6d..0ccc07ac05 100644 --- a/anda/tools/rpi-utils/rpi-utils.spec +++ b/anda/tools/rpi-utils/rpi-utils.spec @@ -1,5 +1,5 @@ -%global commit 6c3ace77f2299f9a2e442c2eb10d67ae73c949ba -%global commit_date 20250213 +%global commit efe8351b61d116f7fedfcaf8ccfac8edb6a9f312 +%global commit_date 20250822 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %define _unpackaged_files_terminate_build 0 @@ -69,6 +69,8 @@ Summary: A more powerful replacement for raspi-gpio, a tool for displayin %description pinctrl %{summary}. +%pkg_completion -Bn %name-pinctrl pinctrl + %package piolib Summary: A library for accessing the Pi 5's PIO hardware %description piolib @@ -80,6 +82,8 @@ Summary: Query the VideoCore for information A command line utility that can get various pieces of information from the VideoCore GPU on the Raspberry Pi. +%pkg_completion -Bn %name-vcgencmd vcgencmd + %package vcmailbox Summary: Send messages to the VideoCore via the mailbox %description vcmailbox @@ -94,7 +98,7 @@ Summary: A tool to get VideoCore 'assert' or 'msg' logs with optional -f %autosetup -p1 -n utils-%commit %build -%cmake +%cmake -DBUILD_SHARED_LIBS=1 %cmake_build %install @@ -106,11 +110,14 @@ Summary: A tool to get VideoCore 'assert' or 'msg' logs with optional -f %files dtmerge %license LICENCE +%doc dtmerge/README.md %{_bindir}/dt* %{_mandir}/man1/dtmerge.1.gz %{_mandir}/man1/dtoverlay.1.gz %{_mandir}/man1/dtparam.1.gz %{_mandir}/man2/dtoverlay.2.gz +%{_exec_prefix}/%{_lib}/libdtovl.so +%{_exec_prefix}/%{_lib}/libdtovl.so.0 %files eeptools %doc eeptools/README.md @@ -141,7 +148,8 @@ Summary: A tool to get VideoCore 'assert' or 'msg' logs with optional -f %doc pinctrl/README.md %license LICENCE %{_bindir}/pinctrl -%{_datadir}/bash-completion/completions/pinctrl +%{_exec_prefix}/%{_lib}/libgpiolib.so.0 +%{_exec_prefix}/%{_lib}/libgpiolib.so %files piolib %doc piolib/README.md @@ -154,12 +162,13 @@ Summary: A tool to get VideoCore 'assert' or 'msg' logs with optional -f %{_bindir}/piows2812 %{_bindir}/quadenc %{_bindir}/rp1sm +%{_exec_prefix}/%{_lib}/libpio.so.0 +%{_exec_prefix}/%{_lib}/libpio.so %files vcgencmd %license LICENCE %{_bindir}/vcgencmd %{_mandir}/man1/vcgencmd.1.gz -%{_datadir}/bash-completion/completions/vcgencmd %files vclog %doc vclog/README.md @@ -175,6 +184,9 @@ Summary: A tool to get VideoCore 'assert' or 'msg' logs with optional -f %{_mandir}/man7/raspirev.7.gz %changelog +* Mon May 19 2025 Owen-sz +- Build shared libraries + * Tue Dec 17 2024 sadlerm - Split into individual subpackages and no longer package raspinfo diff --git a/anda/tools/sbctl/sbctl-batch-sign b/anda/tools/sbctl/sbctl-batch-sign new file mode 100644 index 0000000000..c0557b1cdc --- /dev/null +++ b/anda/tools/sbctl/sbctl-batch-sign @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# sbctl-batch-sign is a helper script designed to make it easier for users to sign files needed for Secure Boot support. +# The obvious case in which this script helps a lot is when dual booting Windows as there are a lot of files by Windows that need to be signed in EFI. +set -e + +if [ -f /boot/limine.conf ]; then + echo "Limine detected, please do not use this script." + exit 0 +fi + +if [ "$(id -u)" -ne 0 ]; then + echo "Error: This script must be run with root privileges." + exit 1 +fi + +export ESP_PATH=/boot +sbctl verify 2>/dev/null | awk '/✗/ {print $2}' | while IFS= read -r entry; do + if [[ "$entry" =~ ^.*/EFI/(Microsoft|Windows) || "$entry" == *.mui || "$entry" == *.dll + || "$entry" =~ ^/boot/grub ]]; then + continue + fi + sbctl sign -s "$entry" +done diff --git a/anda/tools/sbctl/sbctl.spec b/anda/tools/sbctl/sbctl.spec index 13c3f15f6a..2de66554d7 100644 --- a/anda/tools/sbctl/sbctl.spec +++ b/anda/tools/sbctl/sbctl.spec @@ -1,16 +1,20 @@ Name: sbctl -Version: 0.16 -Release: 1%?dist +Version: 0.17 +Release: 3%?dist Summary: Secure Boot key manager License: MIT URL: https://github.com/Foxboron/sbctl Source0: https://github.com/Foxboron/sbctl/releases/download/%{version}/sbctl-%{version}.tar.gz +## Based on CachyOS's batch sign script +# https://github.com/CachyOS/CachyOS-Settings/blob/master/usr/bin/sbctl-batch-sign +Source1: %{name}-batch-sign ExclusiveArch: %{golang_arches} Requires: binutils Requires: util-linux +Requires(post): bash Recommends: systemd-udev @@ -39,12 +43,12 @@ export GOPATH=%{_builddir}/go %install %make_install PREFIX=%{_prefix} - +install -Dm755 %{SOURCE1} -t %{buildroot}%{_bindir} %transfiletriggerin -P 1 -- /boot /efi /usr/lib /usr/libexec -if grep -q -m 1 -e '\.efi$' -e '/vmlinuz$'; then +if [[ ! -f /run/ostree-booted ]] && grep -q -m 1 -e '\.efi$' -e '/vmlinuz$'; then exec - 0.17-2 +- Do not run file triggers on atomic systems + * Sat Mar 30 2024 Cappy Ishihara - 0.13-1 - Push to Terra diff --git a/anda/tools/sheldon/sheldon.spec b/anda/tools/sheldon/sheldon.spec index 5a6e75cc9e..08f88b83c0 100644 --- a/anda/tools/sheldon/sheldon.spec +++ b/anda/tools/sheldon/sheldon.spec @@ -4,7 +4,7 @@ %global crate sheldon Name: rust-sheldon -Version: 0.8.1 +Version: 0.8.5 Release: 1%?dist Summary: Fast, configurable, shell plugin manager diff --git a/anda/tools/sops/sops.spec b/anda/tools/sops/sops.spec index dc19ea0be3..57363ed205 100644 --- a/anda/tools/sops/sops.spec +++ b/anda/tools/sops/sops.spec @@ -1,6 +1,6 @@ %define debug_package %nil Name: sops -Version: 3.9.4 +Version: 3.10.2 Release: 1%?dist Summary: Simple and flexible tool for managing secrets License: MPL-2.0 diff --git a/anda/tools/spotx-bash/spotx-bash.spec b/anda/tools/spotx-bash/spotx-bash.spec index afd2beb673..9be7271378 100644 --- a/anda/tools/spotx-bash/spotx-bash.spec +++ b/anda/tools/spotx-bash/spotx-bash.spec @@ -1,5 +1,5 @@ -%global commit d38a66e98dfa1289b4c0752ef40488aac07c9484 -%global commit_date 20250210 +%global commit 3b1f1ef6dc215dc12d88b0848c264dfe890411a7 +%global commit_date 20250817 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: spotx-bash diff --git a/anda/tools/topgrade/topgrade.spec b/anda/tools/topgrade/topgrade.spec index 5c186e69f7..28a1ae044c 100644 --- a/anda/tools/topgrade/topgrade.spec +++ b/anda/tools/topgrade/topgrade.spec @@ -3,8 +3,8 @@ Name: topgrade # renovate: datasource=github-releases depName=topgrade-rs/topgrade -Version: 16.0.2 -Release: 1%{?dist} +Version: 16.0.4 +Release: 1%?dist Summary: Upgrade all the things SourceLicense: GPL-3.0-or-later diff --git a/anda/tools/umstellar/anda.hcl b/anda/tools/umstellar/anda.hcl index aa51dee858..7a7389b78b 100644 --- a/anda/tools/umstellar/anda.hcl +++ b/anda/tools/umstellar/anda.hcl @@ -1,5 +1,6 @@ project "pkg" { + arches = ["x86_64"] rpm { spec = "umstellar.spec" } -} \ No newline at end of file +} diff --git a/anda/tools/umstellar/umstellar.spec b/anda/tools/umstellar/umstellar.spec index 60a5ef3145..3f8e280a6c 100644 --- a/anda/tools/umstellar/umstellar.spec +++ b/anda/tools/umstellar/umstellar.spec @@ -2,13 +2,13 @@ %global pypi_name umstellar %global pypi_version 0.2.0 -Name: python-%{pypi_name} +Name: %{pypi_name} Version: %{pypi_version} -Release: 1%{?dist} +Release: 2%{?dist} Summary: Ultramarine Quickstart Tool -Provides: python3-%{pypi_name} = %{version}-%{release} -Provides: %{pypi_name} = %{version}-%{release} +Obsoletes: python3-%{pypi_name} < 0.2.0-2 +Requires: python3-%{pypi_name} = %{version}-%{release} License: GPL-3.0 URL: https://github.com/Ultramarine-Linux/stellar @@ -16,6 +16,7 @@ Source0: %{url}/archive/v%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel +BuildRequires: python3dist(pip) BuildRequires: python3dist(setuptools) %description @@ -33,31 +34,46 @@ Summary: %{summary} Requires: python3dist(requests) Requires: python3dist(pygobject) Requires: anaconda-core -%description -n python3-%{pypi_name} +Requires: %{pypi_name} = %{version}-%{release} +BuildArch: noarch +%description -n python3-%{pypi_name} Stellar is a quick-and-dirty GUI post-install menu for Ultramarine Linux - %prep %autosetup -n stellar-%{pypi_version} %build +%if 0%{?fedora} <= 41 %py3_build +%else +%pyproject_wheel +%endif %install +%if 0%{?fedora} <= 41 %py3_install +%else +%pyproject_install +%endif # install kickstart file install -D -m 644 example.ks %{buildroot}%{_datadir}/anaconda/post-scripts/stellar.ks -%files -n python3-%{pypi_name} +%files %license LICENSE %doc README.md -%{python3_sitelib}/%{pypi_name} -%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info %{_datadir}/anaconda/post-scripts/stellar.ks +%files -n python3-%{pypi_name} +%{python3_sitelib}/%{pypi_name} +%if 0%{?fedora} <= 41 +%{python3_sitelib}/%{pypi_name}-%{pypi_version}-py%{python3_version}.egg-info/ +%else +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ +%endif + %changelog * Mon Apr 1 2024 Lleyton Gray - 0.2.0-1 - Bump version with various fixes diff --git a/anda/tools/virtualsmartcard/anda.hcl b/anda/tools/virtualsmartcard/anda.hcl new file mode 100644 index 0000000000..23d088ef48 --- /dev/null +++ b/anda/tools/virtualsmartcard/anda.hcl @@ -0,0 +1,5 @@ +project pkg { + rpm { + spec = "virtualsmartcard.spec" + } +} diff --git a/anda/tools/virtualsmartcard/update.rhai b/anda/tools/virtualsmartcard/update.rhai new file mode 100644 index 0000000000..e78960ff12 --- /dev/null +++ b/anda/tools/virtualsmartcard/update.rhai @@ -0,0 +1,3 @@ +let v = gh_tag("frankmorgner/vsmartcard"); +v.crop(17); +rpm.version(v); diff --git a/anda/tools/virtualsmartcard/virtualsmartcard.spec b/anda/tools/virtualsmartcard/virtualsmartcard.spec new file mode 100644 index 0000000000..284cf992ac --- /dev/null +++ b/anda/tools/virtualsmartcard/virtualsmartcard.spec @@ -0,0 +1,41 @@ +Name: virtualsmartcard +Version: 0.10 +Release: 2%?dist +Summary: Smart card emulator and driver for networked smart card reader/emulator +URL: https://frankmorgner.github.io/vsmartcard/index.html +Source0: https://github.com/frankmorgner/vsmartcard/releases/download/%name-%version/%name-%version.tar.gz +License: GPL-3.0-only +BuildRequires: pcsc-lite-devel gcc libtool pkg-config qrencode-devel python3-devel help2man + +Requires: qrencode-libs python3 +Packager: june-fish + +%description +Virtual Smart Card emulates a smart card and makes it accessible through PC/SC. The vpcd is a smart card reader driver for PCSC-Lite and the windows smart card service. It allows smart card applications to access the vpicc through the PC/SC API. + +%prep +%autosetup +autoreconf --verbose --install +%configure prefix=NONE pythondir=%{python3_sitelib} bindir=%{_bindir} + +%build +%make_build + +%install +%make_install prefix=NONE pythondir=%{python3_sitelib} bindir=%{_bindir} + +%files +%{_bindir}/vicc +%{_mandir}/man1/vicc.1.gz +%{python3_sitelib}/virtualsmartcard/ +%{python3_sitelib}/virtualsmartcard/cards/ +%{_libdir}/pcsc/drivers/serial/libifdvpcd.so.%version +%{_libdir}/pcsc/drivers/serial/libifdvpcd.so +%{_sysconfdir}/reader.conf.d/vpcd +%{_bindir}/vpcd-config +%doc docs +%license COPYING + +%changelog +* Wed Jun 25 2025 june-fish +- Initial Package diff --git a/anda/tools/yt-dlp/yt-dlp-git.spec b/anda/tools/yt-dlp/yt-dlp-git.spec index 419ea2055e..a0b7384280 100644 --- a/anda/tools/yt-dlp/yt-dlp-git.spec +++ b/anda/tools/yt-dlp/yt-dlp-git.spec @@ -2,8 +2,8 @@ %global oldpkgname yt-dlp-nightly Name: yt-dlp-git -Version: 2025.02.20.193351 -Release: 2%?dist +Version: 2025.08.22.031546 +Release: 1%?dist Summary: A command-line program to download videos from online video platforms License: Unlicense diff --git a/andax/bump_extras.rhai b/andax/bump_extras.rhai index 03c5dc388d..184bbacec5 100644 --- a/andax/bump_extras.rhai +++ b/andax/bump_extras.rhai @@ -1,3 +1,7 @@ +fn codeberg_commit(repo) { + return get(`https://codeberg.org/api/v1/repos/${repo}/commits?stat=false&verification=false&files=false&limit=1`).json_arr()[0].sha; +} + fn as_bodhi_ver(branch) { if branch.starts_with("el") { branch.crop(2); @@ -6,7 +10,7 @@ fn as_bodhi_ver(branch) { } return `EPEL-${release}`; } else if branch == "frawhide" { - return "F42"; + return "F43"; } else if branch.starts_with("f") { branch.crop(1); return `F${branch}`; @@ -44,3 +48,15 @@ fn follow_bodhi_vr(rpm, pkg, branch) { rpm.version(vr[1]); rpm.release(vr[2]); } + + +fn madoguchi_json(pkg, branch) { + if branch.starts_with("f") { + branch.crop(1); + } + return get(`https://madoguchi.fyralabs.com/v4/terra${branch}/packages/${pkg}`).json(); +} + +fn madoguchi(pkg, branch) { + return madoguchi_json(pkg, branch).ver; +} diff --git a/andax/ci/update_commit_message.rhai b/andax/ci/update_commit_message.rhai new file mode 100644 index 0000000000..889800652c --- /dev/null +++ b/andax/ci/update_commit_message.rhai @@ -0,0 +1,13 @@ +import "anda::cfg" as cfg; + +let cmd = `git status | sed -nE '/^\tmodified:/{s@^\tmodified:\s+@@;s@[^/]+$@@;p}' | sort -u`; +let filelist = sh(cmd, #{ "stdout": "piped" }).ctx.stdout.split('\n'); + +let modified_list = ""; +for file in filelist { + if file.is_empty() { continue; } + let spec = cfg::load_file(`${file}/anda.hcl`).project.pkg.rpm.spec; + spec.pop(5); // remove `.spec` suffix + modified_list += `${spec} `; +} +print(modified_list[..modified_list.len()-1]); diff --git a/andax/nvidia.rhai b/andax/nvidia.rhai index 9dcb4d0b6b..03d82bea6a 100644 --- a/andax/nvidia.rhai +++ b/andax/nvidia.rhai @@ -2,9 +2,10 @@ // This module is used to parse the NVIDIA website for the latest driver version fn nvidia_component_list() { - let series = "12.6.3"; - let url = `https://developer.download.nvidia.com/compute/cuda/redist/redistrib_${series}.json`; - return get(url).json(); + let url = "https://developer.download.nvidia.com/compute/cuda/redist/"; + let matches = find_all("redistrib_[\\d.]+.json", get(url)); + let series = `${url}${matches[matches.len - 1][0]}`; + return get(series).json(); } fn nvidia_component_version(component) { let components = nvidia_component_list(); @@ -12,6 +13,6 @@ fn nvidia_component_version(component) { } fn nvidia_driver_version() { - let matches = find_all(`(?m)^\s+[\d.]+/`, get("https://download.nvidia.com/XFree86/Linux-x86_64/")); - return(matches[matches.len() - 1][1]); + let driver = get("https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&osID=12&languageCode=1033&numberOfResults=1&beta=0").json().IDS[0].downloadInfo.DisplayVersion; + return(driver); } diff --git a/andax/spec.rhai b/andax/spec.rhai new file mode 100644 index 0000000000..d2adf1652d --- /dev/null +++ b/andax/spec.rhai @@ -0,0 +1,25 @@ +fn get_version() { + return `(?m)^Version:\s*(.+)$`.find(this.f, 1); +} + +fn get_release() { + let r = `(?m)^Release:\s*(.+)$`.find(this.f, 1); + r = sub(`(?m)(%\??dist|%\{\??dist\})\s*$`, "", r); + r.replace("%autorelease", "1"); + return r; +} + +/// Only supports one-liner `%global`s! +fn get_global(macro) { + return `(?m)^%global\s+${macro}\s+(.+)$`.find(this.f, 1); +} + +/// Only supports one-liner `%define`s! +fn get_define(macro) { + return `(?m)^%define\s+${macro}\s+(.+)$`.find(this.f, 1); +} + +fn get_version(rpm) { rpm.get_version() } +fn get_release(rpm) { rpm.get_release() } +fn get_global(rpm, macro) { rpm.get_global(macro) } +fn get_define(rpm, macro) { rpm.get_define(macro) }