From 3b99936c7e5e2844be0ffcdbcd99b27907254645 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 3 Jun 2024 22:40:16 +0200 Subject: [PATCH] reset repo --- .forgejo/workflows/checksum.yaml | 49 ++ .forgejo/workflows/publish.yaml | 134 +++++ .forgejo/workflows/pull-upstream.yaml | 25 + .forgejo/workflows/renovate.yml | 24 + .../workflows/test.yaml | 121 +++-- .github/ISSUE_TEMPLATE/bug-report.yml | 73 --- .github/ISSUE_TEMPLATE/config.yml | 5 - .github/ISSUE_TEMPLATE/pkg-request.yml | 59 -- .github/issue_template.md | 8 - .github/pull_request_template.md | 23 - .github/workflows/container.yaml | 98 ---- .github/workflows/cycles.yml | 48 -- .github/workflows/stale.yml | 25 - .gitignore | 5 +- .renovaterc.json | 6 + README.md | 512 +----------------- srcpkgs/angle-grinder/template | 4 +- srcpkgs/chibi-scheme/template | 4 +- srcpkgs/dmenu-custom/template | 35 ++ srcpkgs/dwm-custom/files/dwm.desktop | 7 + srcpkgs/dwm-custom/template | 28 + srcpkgs/dwmblocks-custom/template | 21 + srcpkgs/font-firacode-nf-ttf/template | 18 + srcpkgs/gleam/template | 4 +- srcpkgs/gnuplot/template | 4 +- srcpkgs/go/template | 4 +- srcpkgs/kdash/template | 19 + srcpkgs/perl-PDF-API2/template | 4 +- srcpkgs/pgn-extract/template | 4 +- srcpkgs/pv-migrate/template | 22 + srcpkgs/rbw/template | 4 +- srcpkgs/sbcl/template | 6 +- srcpkgs/st-custom-terminfo | 1 + srcpkgs/st-custom/template | 40 ++ srcpkgs/tokyonight-theme/template | 18 + srcpkgs/trash-util/template | 11 + srcpkgs/velero/template | 22 + srcpkgs/weechat/template | 6 +- 38 files changed, 587 insertions(+), 914 deletions(-) create mode 100644 .forgejo/workflows/checksum.yaml create mode 100644 .forgejo/workflows/publish.yaml create mode 100644 .forgejo/workflows/pull-upstream.yaml create mode 100644 .forgejo/workflows/renovate.yml rename .github/workflows/build.yaml => .forgejo/workflows/test.yaml (51%) delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/pkg-request.yml delete mode 100644 .github/issue_template.md delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/container.yaml delete mode 100644 .github/workflows/cycles.yml delete mode 100644 .github/workflows/stale.yml create mode 100644 .renovaterc.json create mode 100644 srcpkgs/dmenu-custom/template create mode 100644 srcpkgs/dwm-custom/files/dwm.desktop create mode 100644 srcpkgs/dwm-custom/template create mode 100644 srcpkgs/dwmblocks-custom/template create mode 100644 srcpkgs/font-firacode-nf-ttf/template create mode 100644 srcpkgs/kdash/template create mode 100644 srcpkgs/pv-migrate/template create mode 120000 srcpkgs/st-custom-terminfo create mode 100644 srcpkgs/st-custom/template create mode 100644 srcpkgs/tokyonight-theme/template create mode 100644 srcpkgs/trash-util/template create mode 100644 srcpkgs/velero/template diff --git a/.forgejo/workflows/checksum.yaml b/.forgejo/workflows/checksum.yaml new file mode 100644 index 00000000000..c46bc687dc9 --- /dev/null +++ b/.forgejo/workflows/checksum.yaml @@ -0,0 +1,49 @@ +name: Generate Checksum + +on: + pull_request: + branches: + - "master" + paths: + - "srcpkgs/**" + +jobs: + renovate: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'Johnny5' + permissions: + contents: write + steps: + - name: Checkout + uses: https://code.forgejo.org/actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + + - name: Get changed packages + id: changed + uses: https://github.com/tj-actions/changed-files@a29e8b565651ce417abb5db7164b4a2ad8b6155c # v44 + with: + since_last_remote_commit: true + + - name: Create hostrepo and prepare masterdir + if: ${{ steps.changed.outputs.all_changed_files != '' }} + run: | + ln -s "$(pwd)" /hostrepo && + common/travis/set_mirror.sh && + common/travis/prepare.sh && + common/travis/fetch-xtools.sh + + - name: Update checksums + if: ${{ steps.changed.outputs.all_changed_files != '' }} + run: | + for p in $(echo "${{ steps.changed.outputs.all_changed_files }}" | xargs -r -n 1 cut -d / -f 2); do + xgensum "$p" + done + + - name: Commit + if: ${{ steps.changed.outputs.all_changed_files != '' }} + uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1 + with: + commit_user_name: "Johnny5" + commit_user_email: "bot@snaile.de" + commit_author: "Johnny5 " + commit_message: "Update checksums" + file_pattern: "srcpkgs/*/template" diff --git a/.forgejo/workflows/publish.yaml b/.forgejo/workflows/publish.yaml new file mode 100644 index 00000000000..627487afa95 --- /dev/null +++ b/.forgejo/workflows/publish.yaml @@ -0,0 +1,134 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: Build/Publish XBPS + +on: + push: + branches: + - "master" + paths: + - "srcpkgs/dmenu-custom/**" + - "srcpkgs/dwm-custom/**" + - "srcpkgs/dwmblocks-custom/**" + - "srcpkgs/font-firacode-nf-ttf/**" + - "srcpkgs/kdash/**" + - "srcpkgs/pv-migrate/**" + - "srcpkgs/st-custom/**" + - "srcpkgs/tokyonight-icon-theme/**" + - "srcpkgs/tokyonight-theme/**" + - "srcpkgs/trash-util/**" + - "srcpkgs/velero/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build-and-publish: + name: Build and publish packages + runs-on: ubuntu-latest + if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')" + strategy: + fail-fast: false + matrix: + config: + - arch: x86_64 + host: x86_64 + libc: glibc + platform: linux/amd64 + - arch: x86_64-musl + host: x86_64-musl + libc: musl + platform: linux/amd64 + - arch: aarch64-musl + host: x86_64-musl + libc: musl + platform: linux/amd64 + # - arch: i686 + # host: i686 + # libc: glibc + # platform: linux/386 + # - arch: aarch64 + # host: x86_64 + # libc: glibc + # platform: linux/amd64 + # - arch: armv7l + # host: x86_64 + # libc: glibc + # platform: linux/amd64 + # - arch: armv6l-musl + # host: x86_64-musl + # libc: musl + # platform: linux/amd64 + # - arch: aarch64-musl + # host: x86_64-musl + # libc: musl + # platform: linux/amd64 + env: + MAINTAINER: "Luca Bilke " + PATH: "/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin" + ARCH: "${{ matrix.config.arch }}" + BOOTSTRAP: "${{ matrix.config.host }}" + HOSTREPO: /hostrepo + container: + image: git.snaile.de/snailed/xbps-builder:${{ matrix.config.libc }}-latest + steps: + - name: Clone and checkout + uses: https://github.com/classabbyamp/treeless-checkout-action@bd3615a6e9d5546151e17d72193eea0d6f297398 # v1 + + - name: Prepare container + run: | + mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/ + sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf + xbps-install -Syu || { xbps-install -yu xbps && xbps-install -yu; } + xbps-install -y grep curl git + + - name: Create hostrepo and prepare masterdir + run: | + ln -s "$(pwd)" /hostrepo && + common/travis/set_mirror.sh && + common/travis/prepare.sh && + common/travis/fetch-xtools.sh + mkdir -p "${HOME}/hostdir/binpkgs" + + - name: Get changed packages + run: | + tip="$(git rev-list -1 --parents HEAD)" + case "$tip" in + *" "*" "*) tip="${tip##* }" ;; + *) tip="${tip%% *}" ;; + esac + base="$(git rev-list -1 HEAD^)" + + echo "$base $tip" >/tmp/revisions + + echo -e '\x1b[32mChanged packages:\x1b[0m' + + git diff-tree -r --no-renames --name-only --diff-filter=AM \ + "$base" "$tip" \ + -- 'srcpkgs/*/template' | + cut -d/ -f 2 | + xargs ./xbps-src sort-dependencies | + tee /tmp/templates | + sed "s/^/ /" >&2 + + - name: Build packages + run: | + ( + here="$(pwd)" + cd / + "$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH" 0 + ) + + - name: Sign and upload packages + run: | + echo '${{ secrets.XBPS_SIGNING_KEY }}' >"/tmp/privkey.pem" + + for package in $(echo "$HOME"/hostdir/binpkgs/*.${{ matrix.config.arch }}.xbps); do + XBPS_ARCH="${{ matrix.config.arch }}" XBPS_PASSPHRASE="${{ secrets.XBPS_SIGNING_PASSPHRASE }}" xbps-rindex --privkey "/tmp/privkey.pem" --sign-pkg --signedby "${{ env.MAINTAINER }}" "$package" + for item in "$package" "${package}.sig2"; do + echo -e '\x1b[32mUploading '"${item}"'...\x1b[0m' + curl -s -X PUT --digest -u "${{ vars.XBPS_WEBDAV_USER }}:${{ secrets.XBPS_WEBDAV_KEY }}" -T "${item}" "https://xbps.snaile.de/$(basename $item)" + done + done + + rm /tmp/privkey.pem diff --git a/.forgejo/workflows/pull-upstream.yaml b/.forgejo/workflows/pull-upstream.yaml new file mode 100644 index 00000000000..fae93f8c3e2 --- /dev/null +++ b/.forgejo/workflows/pull-upstream.yaml @@ -0,0 +1,25 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json +name: Pull upstream commits + +on: + schedule: + - cron: "0 0 * * *" + +jobs: + sync_upstream: + runs-on: ubuntu-latest + steps: + - name: Checkout target repo + uses: https://code.forgejo.org/actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + + - name: Pull upstream repo + uses: https://github.com/aormsby/Fork-Sync-With-Upstream-action@1090e365224fc834e7e1de521c417ded2d6fcb53 # v3.4.1 + with: + target_sync_branch: master + target_repo_token: ${{ secrets.GITHUB_TOKEN }} + upstream_sync_branch: master + upstream_sync_repo: void-linux/void-packages + upstream_repo_access_token: ${{ secrets.API_TOKEN_GITHUB }} + + - name: Print status + run: echo ${{ steps.sync.outputs.has_new_commits }} diff --git a/.forgejo/workflows/renovate.yml b/.forgejo/workflows/renovate.yml new file mode 100644 index 00000000000..feb02e4dac5 --- /dev/null +++ b/.forgejo/workflows/renovate.yml @@ -0,0 +1,24 @@ +name: Renovate + +on: + schedule: + - cron: "0 * * * *" + +jobs: + renovate: + runs-on: docker + container: renovate/renovate@sha256:52ab6e316c70f51f198cfce709d3a56bd0c2025a1fe380d642c6d8da224ef012 + env: + LOG_LEVEL: debug + RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }} + GITHUB_COM_TOKEN: ${{ secrets.GH_NOPRIV_TOKEN }} + RENOVATE_GIT_PRIVATE_KEY: ${{ secrets.JOHNNY5_GPG_PRIVKEY }} + RENOVATE_PLATFORM: gitea + RENOVATE_ENDPOINT: ${{ github.server_url }} + RENOVATE_GIT_AUTHOR: "Johnny5 " + + steps: + - uses: https://code.forgejo.org/actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 + + - name: Renovate + run: renovate ${{ github.repository }} diff --git a/.github/workflows/build.yaml b/.forgejo/workflows/test.yaml similarity index 51% rename from .github/workflows/build.yaml rename to .forgejo/workflows/test.yaml index a77d1d4890b..29445023d71 100644 --- a/.github/workflows/build.yaml +++ b/.forgejo/workflows/test.yaml @@ -2,13 +2,15 @@ name: Check build on: pull_request: - paths: - - 'srcpkgs/**' - push: branches: - - 'ci-**' + - "master" paths: - - 'srcpkgs/**' + - "srcpkgs/**" + # push: + # branches: + # - "dev-**" + # paths: + # - "srcpkgs/**" concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -21,9 +23,9 @@ jobs: runs-on: ubuntu-latest container: - image: 'ghcr.io/void-linux/void-buildroot-musl:20240526R1' + image: "ghcr.io/void-linux/void-buildroot-musl:20231230R1@sha256:40ab4dfdf55c3f2988f788780898093f1d6b808f5d3720aa836a7192c71bcad9" env: - PATH: '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' + PATH: "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin" LICENSE_LIST: common/travis/license.lst steps: @@ -39,13 +41,13 @@ jobs: # install tools needed for lints xbps-install -y grep curl git - name: Clone and checkout - uses: classabbyamp/treeless-checkout-action@v1 + uses: https://github.com/classabbyamp/treeless-checkout-action@bd3615a6e9d5546151e17d72193eea0d6f297398 # v1 - name: Create hostrepo and prepare masterdir run: | - ln -s "$(pwd)" /hostrepo && - common/travis/set_mirror.sh && - common/travis/prepare.sh && - common/travis/fetch-xtools.sh + ln -s "$(pwd)" /hostrepo && + common/travis/set_mirror.sh && + common/travis/prepare.sh && + common/travis/fetch-xtools.sh - run: common/travis/changed_templates.sh - name: Run lints run: | @@ -61,26 +63,60 @@ jobs: if: "!contains(github.event.pull_request.title, '[ci skip]') && !contains(github.event.pull_request.body, '[ci skip]')" container: - image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20240526R1 - options: --platform ${{ matrix.config.platform }} + image: ghcr.io/void-linux/void-buildroot-${{ matrix.config.libc }}:20231230R1 + # options: --platform ${{ matrix.config.platform }} env: - PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' - ARCH: '${{ matrix.config.arch }}' - BOOTSTRAP: '${{ matrix.config.host }}' - TEST: '${{ matrix.config.test }}' + PATH: "/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin" + ARCH: "${{ matrix.config.arch }}" + BOOTSTRAP: "${{ matrix.config.host }}" + TEST: "${{ matrix.config.test }}" HOSTREPO: /hostrepo strategy: fail-fast: false matrix: config: - - { arch: x86_64, host: x86_64, libc: glibc, platform: linux/amd64, test: 1 } - - { arch: i686, host: i686, libc: glibc, platform: linux/386, test: 1 } - - { arch: aarch64, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 } - - { arch: armv7l, host: x86_64, libc: glibc, platform: linux/amd64, test: 0 } - - { arch: x86_64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 1 } - - { arch: armv6l-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 0 } - - { arch: aarch64-musl, host: x86_64-musl, libc: musl, platform: linux/amd64, test: 0 } + - arch: x86_64 + host: x86_64 + libc: glibc + platform: linux/amd64 + test: 1 + + - arch: i686 + host: i686 + libc: glibc + platform: linux/386 + test: 1 + + - arch: aarch64 + host: x86_64 + libc: glibc + platform: linux/amd64 + test: 0 + + - arch: armv7l + host: x86_64 + libc: glibc + platform: linux/amd64 + test: 0 + + - arch: x86_64-musl + host: x86_64-musl + libc: musl + platform: linux/amd64 + test: 1 + + - arch: armv6l-musl + host: x86_64-musl + libc: musl + platform: linux/amd64 + test: 0 + + - arch: aarch64-musl + host: x86_64-musl + libc: musl + platform: linux/amd64 + test: 0 steps: - name: Prepare container @@ -94,37 +130,36 @@ jobs: xbps-install -yu - name: Clone and checkout - uses: classabbyamp/treeless-checkout-action@v1 + uses: https://github.com/classabbyamp/treeless-checkout-action@bd3615a6e9d5546151e17d72193eea0d6f297398 # v1 - name: Create hostrepo and prepare masterdir run: | - ln -s "$(pwd)" /hostrepo && - common/travis/set_mirror.sh && - common/travis/prepare.sh && - common/travis/fetch-xtools.sh + ln -s "$(pwd)" /hostrepo && + common/travis/set_mirror.sh && + common/travis/prepare.sh && + common/travis/fetch-xtools.sh - run: common/travis/changed_templates.sh - - name: Build and check packages run: | ( - here="$(pwd)" - cd / - "$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH" "$TEST" + here="$(pwd)" + cd / + "$here/common/travis/build.sh" "$BOOTSTRAP" "$ARCH" "$TEST" ) - name: Show files run: | ( - here="$(pwd)" - cd / - "$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH" + here="$(pwd)" + cd / + "$here/common/travis/show_files.sh" "$BOOTSTRAP" "$ARCH" ) - name: Compare to previous run: | ( - here="$(pwd)" - cd / - "$here/common/travis/xpkgdiff.sh" "$BOOTSTRAP" "$ARCH" + here="$(pwd)" + cd / + "$here/common/travis/xpkgdiff.sh" "$BOOTSTRAP" "$ARCH" ) - name: Check file conflicts @@ -138,7 +173,7 @@ jobs: - name: Verify repository state run: | ( - here="$(pwd)" - cd / - "$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH" + here="$(pwd)" + cd / + "$here/common/travis/check-install.sh" "$BOOTSTRAP" "$ARCH" ) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index 7437bc1d710..00000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: Bug Report -description: File a bug report -labels: ["bug", "needs-testing"] -body: - - type: markdown - attributes: - value: > - #### Don't request an update of a package, - [We have a script for that](https://repo-default.voidlinux.org/void-updates/void-updates.txt). - However, a quality pull request may help. - - id: verified - type: dropdown - attributes: - label: Is this a new report? - description: I verified that there isn't already an open issue for this bug - options: - - "Yes" - - "No" - validations: - required: true - - id: xuname - type: input - attributes: - label: System Info - description: Output of `xuname` (part of [`xtools`](https://man.voidlinux.org/xtools.1)) - placeholder: Void 5.x.y_z x86_64-musl ... - validations: - required: true - - id: packages - type: input - attributes: - label: Package(s) Affected - description: Affected package(s) including version (this can be found with `xbps-query -p pkgver foo`) - placeholder: foo-1.0.2_5, bar-5.6.7_1, baz-0.0.3_5, ... - validations: - required: true - - id: upstream - type: textarea - attributes: - label: Does a report exist for this bug with the project's home (upstream) and/or another distro? - description: If so, link it here (It's fine if there's none) - placeholder: | - For example: - https://bugs.kde.org/show_bug.cgi?id=432975 - https://bugs.gentoo.org/767478 - - id: expected - type: textarea - attributes: - label: Expected behaviour - description: A clear and concise description of what you expected to happen - placeholder: The package is supposed to do this thing. - validations: - required: true - - id: description - type: textarea - attributes: - label: Actual behaviour - description: A clear and concise description of what the bug is - placeholder: There was a crash when... - validations: - required: true - - id: steps - type: textarea - attributes: - label: Steps to reproduce - description: Clear steps to reproduce the bug - placeholder: | - 1. Do the thing - 2. Do the other thing - 3. ??? - 4. Crash :( - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index a5802375179..00000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: true -contact_links: - - name: Other kind of issue - url: https://github.com/void-linux/void-packages/issues/new - about: For RFCs, tracking issues, etc (freeform text) diff --git a/.github/ISSUE_TEMPLATE/pkg-request.yml b/.github/ISSUE_TEMPLATE/pkg-request.yml deleted file mode 100644 index b173d8ffab2..00000000000 --- a/.github/ISSUE_TEMPLATE/pkg-request.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Package Request -title: "Package request: " -description: Request the addition of a package -labels: ["request"] -body: - - type: markdown - attributes: - value: > - #### Don't request an update of a package, - [We have a script for that](https://repo-default.voidlinux.org/void-updates/void-updates.txt). - However, a quality pull request may help. - - id: name - type: input - attributes: - label: Package name - placeholder: foobar9k - validations: - required: true - - id: homepage - type: input - attributes: - label: Package homepage - placeholder: https://example.com/foobar9k - validations: - required: true - - id: description - type: textarea - attributes: - label: Description - description: What does the package do? - placeholder: > - Foobar9k is a music player that turns your music up to 11. - It provides features X, Y, and Z, which other music players in Void don't. - validations: - required: true - - id: quality - type: dropdown - attributes: - label: Does the requested package meet the package requirements? - description: | - See [CONTRIBUTING.md](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements) for details - multiple: true - options: - - System - - Compiled - - Required - validations: - required: true - - id: released - type: dropdown - attributes: - label: Is the requested package released? - description: | - See [CONTRIBUTING.md](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements) for details - options: - - "Yes" - - "No" - validations: - required: true diff --git a/.github/issue_template.md b/.github/issue_template.md deleted file mode 100644 index 9a25a2be802..00000000000 --- a/.github/issue_template.md +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index 57f7cc96d84..00000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,23 +0,0 @@ - - -#### Testing the changes -- I tested the changes in this PR: **YES**|**briefly**|**NO** - - - - - diff --git a/.github/workflows/container.yaml b/.github/workflows/container.yaml deleted file mode 100644 index 957b6e849d5..00000000000 --- a/.github/workflows/container.yaml +++ /dev/null @@ -1,98 +0,0 @@ ---- -name: 'Build buildroot containers' - -on: - workflow_dispatch: - pull_request: - branches: - - master - paths: - - common/container/** - push: - branches: - - master - paths: - - common/container/** - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - - strategy: - matrix: - libc: - - glibc - - musl - - steps: - - name: Checkout - uses: classabbyamp/treeless-checkout-action@v1 - - - name: Get image release - id: release - run: | - # gets the list of all date-shaped tags for the image, finds the most recent one - tag="$(skopeo list-tags "docker://ghcr.io/${{ github.repository_owner }}/void-buildroot-${{ matrix.libc }}" | \ - jq -r '.Tags | sort | reverse | map(select(test("^[0-9]{8}(R[0-9]+)?$")))[0]')" - # tags from a different day or pre-YYYYMMDDRN - if [ "${tag%R*}" != "$(date -u +%Y%m%d)" ] || [ "${tag%R*}" = "${tag}" ]; then - rel=1 - else - rel=$(( ${tag##*R} + 1 )) - fi - echo "rel=${rel}" >> "${GITHUB_OUTPUT}" - - - name: Docker metadata - id: meta - uses: docker/metadata-action@v4 - with: - images: | - ghcr.io/${{ github.repository_owner }}/void-buildroot-${{ matrix.libc }} - tags: | - type=sha,prefix= - type=raw,value=latest,enable={{is_default_branch}} - type=raw,value={{date 'YYYYMMDD'}}R${{ steps.release.outputs.rel }},enable={{is_default_branch}},priority=1000 - flavor: latest=false - labels: | - org.opencontainers.image.authors=Void Linux team and contributors - org.opencontainers.image.url=https://voidlinux.org - org.opencontainers.image.documentation=https://github.com/${{ github.repository }} - org.opencontainers.image.source=https://github.com/${{ github.repository }} - org.opencontainers.image.vendor=Void Linux - org.opencontainers.image.title=Void Linux build root - org.opencontainers.image.description=Image for building packages with xbps-src on Void Linux - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to GCHR - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push images - id: build_and_push - uses: docker/bake-action@v3 - with: - push: ${{ github.event_name != 'pull_request' }} - targets: void-buildroot-${{ matrix.libc }} - files: | - common/container/docker-bake.hcl - ${{ steps.meta.outputs.bake-file }} - set: | - _common.cache-to=type=gha - _common.cache-from=type=gha diff --git a/.github/workflows/cycles.yml b/.github/workflows/cycles.yml deleted file mode 100644 index 00f7eb4709d..00000000000 --- a/.github/workflows/cycles.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: 'Cycle Check' - -on: - schedule: - - cron: '0 18 * * *' - -jobs: - cycles: - runs-on: ubuntu-latest - permissions: - issues: write - container: - image: 'ghcr.io/void-linux/void-buildroot-musl:20240526R1' - env: - PATH: '/usr/libexec/chroot-git:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/tmp/bin' - steps: - - name: Prepare container - run: | - # switch to repo-ci mirror - mkdir -p /etc/xbps.d && cp /usr/share/xbps.d/*-repository-*.conf /etc/xbps.d/ - sed -i 's|repo-default|repo-ci|g' /etc/xbps.d/*-repository-*.conf - # Sync and upgrade once, assume error comes from xbps update - xbps-install -Syu || xbps-install -yu xbps - # Upgrade again (in case there was a xbps update) - xbps-install -yu - # Install script dependencies - xbps-install -y python3-networkx github-cli - - - name: Clone and checkout - uses: classabbyamp/treeless-checkout-action@v1 - - - name: Create hostrepo and prepare masterdir - run: | - ln -s "$(pwd)" /hostrepo && - common/travis/set_mirror.sh && - common/travis/prepare.sh - - name: Find cycles and open issues - run: | - common/scripts/xbps-cycles.py | tee cycles - grep 'Cycle:' cycles | while read -r line; do - if gh issue list -R "$GITHUB_REPOSITORY" -S "$line" | grep .; then - printf "Issue on '%s' already exists.\n" "$line" - else - gh issue create -R "$GITHUB_REPOSITORY" -b '' -t "$line" - fi - done - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index b5b1f7d188d..00000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Stale Cleanup - -on: - workflow_dispatch: - schedule: - - cron: '30 1 * * *' - -jobs: - stale: - runs-on: ubuntu-latest - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/stale@v6 - with: - stale-issue-message: 'Issues become stale 90 days after last activity and are closed 14 days after that. If this issue is still relevant bump it or assign it.' - stale-pr-message: 'Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.' - days-before-stale: 90 - days-before-close: 14 - exempt-all-assignees: true - ascending: true - operations-per-run: 250 - exempt-issue-labels: 'request,bug,tracking' diff --git a/.gitignore b/.gitignore index e91ff787554..4b8deb0703d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,9 +7,10 @@ /* !/.editorconfig !/.gitattributes -!/.github +!/.forgejo !/.gitignore !/.mailmap +!/.renovaterc.json !/CONTRIBUTING.md !/COPYING !/Manual.md @@ -17,6 +18,8 @@ !/common !/etc !/srcpkgs +!/srcpkgsBACKUP +!/srcpkgsCUSTOM !/xbps-src etc/conf etc/conf.* diff --git a/.renovaterc.json b/.renovaterc.json new file mode 100644 index 00000000000..cd44dafc42c --- /dev/null +++ b/.renovaterc.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "local>snailed/renovate-config:void-packages" + ] +} diff --git a/README.md b/README.md index bd7fed87901..5d8c7a35752 100644 --- a/README.md +++ b/README.md @@ -1,511 +1,5 @@ -## The XBPS source packages collection +# Custom Void Packages -This repository contains the XBPS source packages collection to build binary packages -for the Void Linux distribution. +This repo holds my custom package templates for void linux -The included `xbps-src` script will fetch and compile the sources, and install its -files into a `fake destdir` to generate XBPS binary packages that can be installed -or queried through the `xbps-install(1)` and `xbps-query(1)` utilities, respectively. - -See [Contributing](./CONTRIBUTING.md) for a general overview of how to contribute and the -[Manual](./Manual.md) for details of how to create source packages. - -### Table of Contents - -- [Requirements](#requirements) -- [Quick start](#quick-start) -- [chroot methods](#chroot-methods) -- [Install the bootstrap packages](#install-bootstrap) -- [Configuration](#configuration) -- [Directory hierarchy](#directory-hierarchy) -- [Building packages](#building-packages) -- [Package build options](#build-options) -- [Sharing and signing your local repositories](#sharing-and-signing) -- [Rebuilding and overwriting existing local packages](#rebuilding) -- [Enabling distcc for distributed compilation](#distcc) -- [Distfiles mirrors](#distfiles-mirrors) -- [Cross compiling packages for a target architecture](#cross-compiling) -- [Using xbps-src in a foreign Linux distribution](#foreign) -- [Remaking the masterdir](#remaking-masterdir) -- [Keeping your masterdir uptodate](#updating-masterdir) -- [Building 32bit packages on x86_64](#building-32bit) -- [Building packages natively for the musl C library](#building-for-musl) -- [Building void base-system from scratch](#building-base-system) - -### Requirements - -- GNU bash -- xbps >= 0.56 -- git(1) - unless configured to not, see etc/defaults.conf -- common POSIX utilities included by default in almost all UNIX systems -- curl(1) - required by `xbps-src update-check` - -For bootstrapping additionally: -- flock(1) - util-linux -- bsdtar or GNU tar (in that order of preference) -- install(1) - GNU coreutils -- objcopy(1), objdump(1), strip(1): binutils - -`xbps-src` requires [a utility to chroot](#chroot-methods) and bind mount existing directories -into a `masterdir` that is used as its main `chroot` directory. `xbps-src` supports -multiple utilities to accomplish this task. - -> NOTE: `xbps-src` does not allow building as root anymore. Use one of the chroot -methods. - - -### Quick start - -Clone the `void-packages` git repository and install the bootstrap packages: - -``` -$ git clone https://github.com/void-linux/void-packages.git -$ cd void-packages -$ ./xbps-src binary-bootstrap -``` - -Build a package by specifying the `pkg` target and the package name: - -``` -$ ./xbps-src pkg -``` - -Use `./xbps-src -h` to list all available targets and options. - -To build packages marked as 'restricted', modify `etc/conf`: - -``` -$ echo XBPS_ALLOW_RESTRICTED=yes >> etc/conf -``` - -Once built, the package will be available in `hostdir/binpkgs` or an appropriate subdirectory (e.g. `hostdir/binpkgs/nonfree`). To install the package: - -``` -# xbps-install --repository hostdir/binpkgs -``` - -Alternatively, packages can be installed with the `xi` utility, from the `xtools` package. `xi` takes the repository of the current working directory into account. - -``` -$ xi -``` - - -### chroot methods - -#### xbps-uunshare(1) (default) - -XBPS utility that uses `user_namespaces(7)` (part of xbps, default without `-t` flag). - -This utility requires these Linux kernel options: - -- CONFIG\_NAMESPACES -- CONFIG\_IPC\_NS -- CONFIG\_UTS\_NS -- CONFIG\_USER\_NS - -This is the default method, and if your system does not support any of the required kernel -options it will fail with `EINVAL (Invalid argument)`. - -#### xbps-uchroot(1) - -XBPS utility that uses `namespaces` and must be `setgid` (part of xbps). - -> NOTE: This is the only method that implements functionality of `xbps-src -t`, therefore the -flag ignores the choice made in configuration files and enables `xbps-uchroot`. - -This utility requires these Linux kernel options: - -- CONFIG\_NAMESPACES -- CONFIG\_IPC\_NS -- CONFIG\_PID\_NS -- CONFIG\_UTS\_NS - -Your user must be added to a special group to be able to use `xbps-uchroot(1)` and the -executable must be `setgid`: - - # chown root: xbps-uchroot - # chmod 4750 xbps-uchroot - # usermod -a -G - -> NOTE: by default in void you shouldn't do this manually, your user must be a member of -the `xbuilder` group. - -To enable it: - - $ cd void-packages - $ echo XBPS_CHROOT_CMD=uchroot >> etc/conf - -If for some reason it's erroring out as `ERROR clone (Operation not permitted)`, check that -your user is a member of the required `group` and that `xbps-uchroot(1)` utility has the -proper permissions and owner/group as explained above. - -#### bwrap(1) - -bubblewrap, sandboxing tool for unprivileged users that uses -user namespaces or setuid. -See . - -#### ethereal - -Destroys host system it runs on. Only useful for one-shot containers, i.e docker (used with CI). - - -### Install the bootstrap packages - -There is a set of packages that makes up the initial build container, called the `bootstrap`. -These packages are installed into the `masterdir` in order to create the container. - -The primary and recommended way to set up this container is using the `binary-bootstrap` -command. This will use pre-existing binary packages, either from remote `xbps` repositories -or from your local repository. - -There is also the `bootstrap` command, which will build all necessary `bootstrap` packages from -scratch. This is usually not recommended, since those packages are built using your host system's -toolchain and are neither fully featured nor reproducible (your host system may influence the -build) and thus should only be used as a stage 0 for bootstrapping new Void systems. - -If you still choose to use `bootstrap`, use the resulting stage 0 container to rebuild all -`bootstrap` packages again, then use `binary-bootstrap` (stage 1) and rebuild the `bootstrap` -packages once more (to gain stage 2, and then use `binary-bootstrap` again). Once you've done -that, you will have a `bootstrap` set equivalent to using `binary-bootstrap` in the first place. - -Also keep in mind that a full source `bootstrap` is time consuming and will require having an -assortment of utilities installed in your host system, such as `binutils`, `gcc`, `perl`, -`texinfo` and others. - -### Configuration - -The `etc/defaults.conf` file contains the possible settings that can be overridden -through the `etc/conf` configuration file for the `xbps-src` utility; if that file -does not exist, will try to read configuration settings from `$XDG_CONFIG_HOME/xbps-src.conf`, `~/.config/xbps-src.conf`, `~/.xbps-src.conf`. - -If you want to customize default `CFLAGS`, `CXXFLAGS` and `LDFLAGS`, don't override -those defined in `etc/defaults.conf`, set them on `etc/conf` instead i.e: - - $ echo 'XBPS_CFLAGS="your flags here"' >> etc/conf - $ echo 'XBPS_LDFLAGS="your flags here"' >> etc/conf - -Native and cross compiler/linker flags are set per architecture in `common/build-profiles` -and `common/cross-profiles` respectively. Ideally those settings are good enough by default, -and there's no need to set your own unless you know what you are doing. - -#### Virtual packages - -The `etc/defaults.virtual` file contains the default replacements for virtual packages, -used as dependencies in the source packages tree. - -If you want to customize those replacements, copy `etc/defaults.virtual` to `etc/virtual` -and edit it accordingly to your needs. - - -### Directory hierarchy - -The following directory hierarchy is used with a default configuration file: - - /void-packages - |- common - |- etc - |- srcpkgs - | |- xbps - | |- template - | - |- hostdir - | |- binpkgs ... - | |- ccache ... - | |- distcc- ... - | |- repocache ... - | |- sources ... - | - |- masterdir- - | |- builddir -> ... - | |- destdir -> ... - | |- host -> bind mounted from - | |- void-packages -> bind mounted from - - -The description of these directories is as follows: - - - `masterdir-`: master directory to be used as rootfs to build/install packages. - - `builddir`: to unpack package source tarballs and where packages are built. - - `destdir`: to install packages, aka **fake destdir**. - - `hostdir/ccache`: to store ccache data if the `XBPS_CCACHE` option is enabled. - - `hostdir/distcc-`: to store distcc data if the `XBPS_DISTCC` option is enabled. - - `hostdir/repocache`: to store binary packages from remote repositories. - - `hostdir/sources`: to store package sources. - - `hostdir/binpkgs`: local repository to store generated binary packages. - - -### Building packages - -The simplest form of building package is accomplished by running the `pkg` target in `xbps-src`: - -``` -$ cd void-packages -$ ./xbps-src pkg -``` - -When the package and its required dependencies are built, the binary packages will be created -and registered in the default local repository at `hostdir/binpkgs`; the path to this local repository can be added to -any xbps configuration file (see xbps.d(5)) or by explicitly appending them via cmdline, i.e: - - $ xbps-install --repository=hostdir/binpkgs ... - $ xbps-query --repository=hostdir/binpkgs ... - -By default **xbps-src** will try to resolve package dependencies in this order: - - - If a dependency exists in the local repository, use it (`hostdir/binpkgs`). - - If a dependency exists in a remote repository, use it. - - If a dependency exists in a source package, use it. - -It is possible to avoid using remote repositories completely by using the `-N` flag. - -> The default local repository may contain multiple *sub-repositories*: `debug`, `multilib`, etc. - - -### Package build options - -The supported build options for a source package can be shown with `xbps-src show-options`: - - $ ./xbps-src show-options foo - -Build options can be enabled with the `-o` flag of `xbps-src`: - - $ ./xbps-src -o option,option1 pkg foo - -Build options can be disabled by prefixing them with `~`: - - $ ./xbps-src -o ~option,~option1 pkg foo - -Both ways can be used together to enable and/or disable multiple options -at the same time with `xbps-src`: - - $ ./xbps-src -o option,~option1,~option2 pkg foo - -The build options can also be shown for binary packages via `xbps-query(1)`: - - $ xbps-query -R --property=build-options foo - -> NOTE: if you build a package with a custom option, and that package is available -in an official void repository, an update will ignore those options. Put that package -on `hold` mode via `xbps-pkgdb(1)`, i.e `xbps-pkgdb -m hold foo` to ignore updates -with `xbps-install -u`. Once the package is on `hold`, the only way to update it -is by declaring it explicitly: `xbps-install -u foo`. - -Permanent global package build options can be set via `XBPS_PKG_OPTIONS` variable in the -`etc/conf` configuration file. Per package build options can be set via -`XBPS_PKG_OPTIONS_`. - -> NOTE: if `pkgname` contains `dashes`, those should be replaced by `underscores` -i.e `XBPS_PKG_OPTIONS_xorg_server=opt`. - -The list of supported package build options and its description is defined in the -`common/options.description` file or in the `template` file. - - -### Sharing and signing your local repositories - -To share a local repository remotely it's mandatory to sign it and the binary packages -stored on it. This is accomplished with the `xbps-rindex(1)` utility. - -First a RSA key must be created with `openssl(1)` or `ssh-keygen(1)`: - - $ openssl genrsa -des3 -out privkey.pem 4096 - -or - - $ ssh-keygen -t rsa -b 4096 -m PEM -f privkey.pem - -> Only RSA keys in PEM format are currently accepted by xbps. - -Once the RSA private key is ready you can use it to initialize the repository metadata: - - $ xbps-rindex --sign --signedby "I'm Groot" --privkey privkey.pem $PWD/hostdir/binpkgs - -And then make a signature per package: - - $ xbps-rindex --sign-pkg --privkey privkey.pem $PWD/hostdir/binpkgs/*.xbps - -> If --privkey is unset, it defaults to `~/.ssh/id_rsa`. - -If the RSA key was protected with a passphrase you'll have to type it, or alternatively set -it via the `XBPS_PASSPHRASE` environment variable. - -Once the binary packages have been signed, check if the repository contains the appropriate `hex fingerprint`: - - $ xbps-query --repository=hostdir/binpkgs -vL - ... - -Each time a binary package is created, a package signature must be created with `--sign-pkg`. - -> It is not possible to sign a repository with multiple RSA keys. - -If packages in `hostdir/binpkgs` are signed, the key in `.plist` format (as imported by xbps) can be placed -in `etc/repo-keys/` to prevent xbps-src from prompting to import that key. - - -### Rebuilding and overwriting existing local packages - -Packages are overwritten on every build to make getting package with changed build options easy. -To make xbps-src skip build and preserve first package build with given version and revision, -same as in official void repository, set `XBPS_PRESERVE_PKGS=yes` in `etc/conf` file. - -Reinstalling a package in your target `rootdir` can be easily done too: - - $ xbps-install --repository=/path/to/local/repo -yf xbps-0.25_1 - -Using `-f` flag twice will overwrite configuration files. - -> Please note that the `package expression` must be properly defined to explicitly pick up -the package from the desired repository. - - -### Enabling distcc for distributed compilation - -Setup the workers (machines that will compile the code): - - # xbps-install -Sy distcc - -Modify the configuration to allow your local network machines to use distcc (e.g. `192.168.2.0/24`): - - # echo "192.168.2.0/24" >> /etc/distcc/clients.allow - -Enable and start the `distccd` service: - - # ln -s /etc/sv/distccd /var/service - -Install distcc on the host (machine that executes xbps-src) as well. -Unless you want to use the host as worker from other machines, there is no need -to modify the configuration. - -On the host you can now enable distcc in the `void-packages/etc/conf` file: - - XBPS_DISTCC=yes - XBPS_DISTCC_HOSTS="localhost/2 --localslots_cpp=24 192.168.2.101/9 192.168.2.102/2" - XBPS_MAKEJOBS=16 - -The example values assume a localhost CPU with 4 cores of which at most 2 are used for compiler jobs. -The number of slots for preprocessor jobs is set to 24 in order to have enough preprocessed data for other CPUs to compile. -The worker 192.168.2.101 has a CPU with 8 cores and the /9 for the number of jobs is a saturating choice. -The worker 192.168.2.102 is set to run at most 2 compile jobs to keep its load low, even if its CPU has 4 cores. -The XBPS_MAKEJOBS setting is increased to 16 to account for the possible parallelism (2 + 9 + 2 + some slack). - - -### Distfiles mirror(s) - -In etc/conf you may optionally define a mirror or a list of mirrors to search for distfiles. - - $ echo 'XBPS_DISTFILES_MIRROR="ftp://192.168.100.5/gentoo/distfiles"' >> etc/conf - -If more than one mirror is to be searched, you can either specify multiple URLs separated -with blanks, or add to the variable like this - - $ echo 'XBPS_DISTFILES_MIRROR+=" https://sources.voidlinux.org/"' >> etc/conf - -Make sure to put the blank after the first double quote in this case. - -The mirrors are searched in order for the distfiles to build a package until the -checksum of the downloaded file matches the one specified in the template. - -Ultimately, if no mirror carries the distfile, or in case all downloads failed the -checksum verification, the original download location is used. - -If you use `uchroot` for your XBPS_CHROOT_CMD, you may also specify a local path -using the `file://` prefix or simply an absolute path on your build host (e.g. /mnt/distfiles). -Mirror locations specified this way are bind mounted inside the chroot environment -under $XBPS_MASTERDIR and searched for distfiles just the same as remote locations. - - -### Cross compiling packages for a target architecture - -Currently `xbps-src` can cross build packages for some target architectures with a cross compiler. -The supported target is shown with `./xbps-src -h`. - -If a source package has been adapted to be **cross buildable** `xbps-src` will automatically build the binary package(s) with a simple command: - - $ ./xbps-src -a pkg - -If the build for whatever reason fails, might be a new build issue or simply because it hasn't been adapted to be **cross compiled**. - - -### Using xbps-src in a foreign Linux distribution - -xbps-src can be used in any recent Linux distribution matching the CPU architecture. - -To use xbps-src in your Linux distribution use the following instructions. Let's start downloading the xbps static binaries: - - $ wget http://repo-default.voidlinux.org/static/xbps-static-latest.-musl.tar.xz - $ mkdir ~/XBPS - $ tar xvf xbps-static-latest.-musl.tar.xz -C ~/XBPS - $ export PATH=~/XBPS/usr/bin:$PATH - -If `xbps-uunshare` does not work because of lack of `user_namespaces(7)` support, -try other [chroot methods](#chroot-methods). - -Clone the `void-packages` git repository: - - $ git clone https://github.com/void-linux/void-packages.git - -and `xbps-src` should be fully functional; just start the `bootstrap` process, i.e: - - $ ./xbps-src binary-bootstrap - -The default masterdir is created in the current working directory, i.e. `void-packages/masterdir-`, where `` for the default masterdir is is the native xbps architecture. - - -### Remaking the masterdir - -If for some reason you must update xbps-src and the `bootstrap-update` target is not enough, it's possible to recreate a masterdir with two simple commands (please note that `zap` keeps your `ccache/distcc/host` directories intact): - - $ ./xbps-src zap - $ ./xbps-src binary-bootstrap - - -### Keeping your masterdir uptodate - -Sometimes the bootstrap packages must be updated to the latest available version in repositories, this is accomplished with the `bootstrap-update` target: - - $ ./xbps-src bootstrap-update - - -### Building 32bit packages on x86_64 - -Two ways are available to build 32bit packages on x86\_64: - - - native mode with a 32bit masterdir (recommended, used in official repository) - - cross compilation mode to i686 [target](#cross-compiling) - -The canonical mode (native) needs a new x86 `masterdir`: - - $ ./xbps-src -A i686 binary-bootstrap - $ ./xbps-src -A i686 ... - - -### Building packages natively for the musl C library - -The canonical way of building packages for same architecture but different C library is through a dedicated masterdir by using the host architecture flag `-A`. -To build for x86_64-musl on glibc x86_64 system, prepare a new masterdir with the musl packages: - - $ ./xbps-src -A x86_64-musl binary-bootstrap - -This will create and bootstrap a new masterdir called `masterdir-x86_64-musl` that will be used when `-A x86_64-musl` is specified. -Your new masterdir is now ready to build packages natively for the musl C library: - - $ ./xbps-src -A x86_64-musl pkg ... - - -### Building void base-system from scratch - -To rebuild all packages in `base-system` for your native architecture: - - $ ./xbps-src -N pkg base-system - -It's also possible to cross compile everything from scratch: - - $ ./xbps-src -a -N pkg base-system - -Once the build has finished, you can specify the path to the local repository to `void-mklive`, i.e: - - # cd void-mklive - # make - # ./mklive.sh ... -r /path/to/hostdir/binpkgs +Check the [Manual](./Manual.md) for details of how to create source packages. diff --git a/srcpkgs/angle-grinder/template b/srcpkgs/angle-grinder/template index 2e05bef7230..b99d65270d1 100644 --- a/srcpkgs/angle-grinder/template +++ b/srcpkgs/angle-grinder/template @@ -1,6 +1,6 @@ # Template file for 'angle-grinder' pkgname=angle-grinder -version=0.19.4 +version=0.19.2 revision=1 build_style=cargo hostmakedepends="pkg-config" @@ -9,7 +9,7 @@ maintainer="Leah Neukirchen " license="MIT" homepage="https://github.com/rcoh/angle-grinder" distfiles="https://github.com/rcoh/angle-grinder/archive/v${version}.tar.gz" -checksum=13ae3912dcc34c2648d8ef57fe8d976cb978c70e6976ead079ea5d7609532172 +checksum=3a5637bbd3ef3fc2f8164a1af90b8894f79c1b2adb89a874f1f3c5a56006e18b pre_configure() { cargo update -p h2 -p crossbeam-channel diff --git a/srcpkgs/chibi-scheme/template b/srcpkgs/chibi-scheme/template index e0178e85403..7cdf282791e 100644 --- a/srcpkgs/chibi-scheme/template +++ b/srcpkgs/chibi-scheme/template @@ -1,6 +1,6 @@ # Template file for 'chibi-scheme' pkgname=chibi-scheme -version=0.11 +version=0.10 revision=1 build_helper="qemu" build_style=gnu-makefile @@ -9,7 +9,7 @@ maintainer="Leah Neukirchen " license="BSD-3-Clause" homepage="http://synthcode.com/scheme/chibi/" distfiles="https://github.com/ashinn/chibi-scheme/archive/${version}.tar.gz" -checksum=b4404d5304b51b243684702fa7b5f2d82f77cb7ef470bcfca1d94f8ed7660342 +checksum=ae1d2057138b7f438f01bfb1e072799105faeea1de0ab3cc10860adf373993b3 alternatives=" scheme:scheme:/usr/bin/chibi-scheme scheme:scheme.1:/usr/share/man/man1/chibi-scheme.1 diff --git a/srcpkgs/dmenu-custom/template b/srcpkgs/dmenu-custom/template new file mode 100644 index 00000000000..e283c7be2e2 --- /dev/null +++ b/srcpkgs/dmenu-custom/template @@ -0,0 +1,35 @@ +# Template file for 'dmenu-custom' +pkgname=dmenu-custom +version=2024.5.1 +revision=5 +makedepends="libXinerama-devel libXft-devel freetype-devel pango-devel pkg-config" +short_desc="Customized dmenu" +maintainer="Luca Bilke " +license="MIT" +homepage="https://git.snaile.de/snailed/dmenu-custom" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=89748a6fccf37e5655b85dc56366ea05c6c2d9e7865e1c7adb4ffa04a004f773 +replaces="dmenu>=0" +provides="dmenu-5.2_1" + +post_patch() { + sed -i -e '/CFLAGS/{s/-Os//;s/=/+=/}' \ + -e '/LDFLAGS/{s/-s//;s/=/+=/}' config.mk +} + +do_build() { + [ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h + sed -i -e "s|^FREETYPEINC|#FREETYPEINC|g" \ + -e "s|^X11INC|#X11INC|g" \ + -e "s|^X11LIB|#X11LIB|g" config.mk + + x11inc=$XBPS_CROSS_BASE/usr/include/X11 + x11lib=$XBPS_CROSS_BASE/usr/lib + freetypeinc=$XBPS_CROSS_BASE/usr/include/freetype2 + make CC="$CC" ${makejobs} X11INC=$x11inc X11LIB=$x11lib FREETYPEINC=$freetypeinc +} + +do_install() { + make PREFIX=/usr DESTDIR=${DESTDIR} install + vlicense LICENSE +} diff --git a/srcpkgs/dwm-custom/files/dwm.desktop b/srcpkgs/dwm-custom/files/dwm.desktop new file mode 100644 index 00000000000..b0c33541ba3 --- /dev/null +++ b/srcpkgs/dwm-custom/files/dwm.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Dwm +Comment=Dynamic window manager +Exec=dwm +Icon=dwm +Type=XSession diff --git a/srcpkgs/dwm-custom/template b/srcpkgs/dwm-custom/template new file mode 100644 index 00000000000..b2bc5d07b44 --- /dev/null +++ b/srcpkgs/dwm-custom/template @@ -0,0 +1,28 @@ +# Template file for 'dwm-custom' +pkgname=dwm-custom +version=2024.5.2 +revision=1 +makedepends="libXinerama-devel libXft-devel freetype-devel pango-devel pkg-config" +short_desc="Customized DWM" +maintainer="Luca Bilke " +license="MIT" +homepage="https://git.snaile.de/snailed/dwm-custom" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=caef8af0f19a1b1cfb04c7828ee69ceb2390bd141f0b37f0b707f0d741469ac9 +replaces="dwm>=0" +provides='dwm-6.4_1' + +do_build() { + make config.mk + vsed -e "/CFLAGS/s|\${CPPFLAGS}|& $CFLAGS|g" -i config.mk + make CC=$CC \ + INCS="-I. $(pkg-config --cflags xft pango pangoxft freetype2)" \ + LIBS="-lX11 -lXinerama -lpangoxft-1.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lharfbuzz -lfontconfig -lfreetype -lXft" +} + +do_install() { + make PREFIX=/usr DESTDIR=$DESTDIR install + vinstall README 644 usr/share/doc/$pkgname + vinstall ${FILESDIR}/dwm.desktop 644 usr/share/xsessions + vlicense LICENSE +} diff --git a/srcpkgs/dwmblocks-custom/template b/srcpkgs/dwmblocks-custom/template new file mode 100644 index 00000000000..1e05dce39a5 --- /dev/null +++ b/srcpkgs/dwmblocks-custom/template @@ -0,0 +1,21 @@ +# Template file for 'dwmblocks-custom' +pkgname=dwmblocks-custom +version=2024.5.1 +revision=2 +makedepends="xcb-util-devel pkg-config" +short_desc="Customized dwmblocks" +maintainer="Luca Bilke " +license="MIT" +homepage="https://git.snaile.de/snailed/dwmblocks-custom" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=bd8dba3a108c575bbb51d395b65881d5497a6b391402376beb148dfcaffeb0e9 + +do_build() { + [ -e ${FILESDIR}/config.h ] && cp ${FILESDIR}/config.h config.h + make CC=$CC +} + +do_install() { + make PREFIX=/usr DESTDIR=$DESTDIR install + vlicense LICENSE +} diff --git a/srcpkgs/font-firacode-nf-ttf/template b/srcpkgs/font-firacode-nf-ttf/template new file mode 100644 index 00000000000..f4f35a9ff09 --- /dev/null +++ b/srcpkgs/font-firacode-nf-ttf/template @@ -0,0 +1,18 @@ +# Template file for 'font-firacode-nf-ttf' +pkgname=font-firacode-nf-ttf +version=3.2.1 # renovate ryanoasis/nerd-fonts +revision=2 +homepage="https://nerdfonts.com/" +license="MIT" +depends="font-util" +short_desc="NerdFont patched Fira Code font" +maintainer="luca " +distfiles="https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/FiraCode.tar.xz" +conflicts="nerd-fonts-ttf" +font_dirs="/usr/share/fonts/NerdFonts/ttf" +checksum=def4b29f7aa0620a7fa12edb28197a2697680b5e21636fa3dcc602e08ae13bc4 + +do_install() { + vmkdir usr/share/fonts/NerdFonts/ttf/symbols + vcopy "*.ttf" usr/share/fonts/NerdFonts/ttf/symbols +} diff --git a/srcpkgs/gleam/template b/srcpkgs/gleam/template index d372769d787..a1b445fffd5 100644 --- a/srcpkgs/gleam/template +++ b/srcpkgs/gleam/template @@ -1,6 +1,6 @@ # Template file for 'gleam' pkgname=gleam -version=1.2.1 +version=1.2.0 revision=1 build_style=cargo make_install_args="--path=compiler-cli" @@ -12,4 +12,4 @@ license="Apache-2.0" homepage="https://gleam.run/" changelog="https://raw.githubusercontent.com/gleam-lang/gleam/main/CHANGELOG.md" distfiles="https://github.com/gleam-lang/gleam/archive/refs/tags/v${version}.tar.gz" -checksum=7ced040b0289faff08ef2ff8113e9ecf06e2c7e3ac9154a529fa3b9bf1a4ade0 +checksum=381239535ca1a2b95c982f46569847b722d9a308f84910c8ab0d03d8a6d5f6d5 diff --git a/srcpkgs/gnuplot/template b/srcpkgs/gnuplot/template index de03c850a05..f57aa54d5a9 100644 --- a/srcpkgs/gnuplot/template +++ b/srcpkgs/gnuplot/template @@ -1,6 +1,6 @@ # Template file for 'gnuplot' pkgname=gnuplot -version=6.0.1 +version=6.0.0 revision=1 configure_args="--with-readline=builtin --with-gpic --with-metapost --with-metafont" @@ -14,7 +14,7 @@ maintainer="Leah Neukirchen " license="gnuplot" homepage="http://www.gnuplot.info/" distfiles="${SOURCEFORGE_SITE}/gnuplot/gnuplot/${version}/gnuplot-${version}.tar.gz" -checksum=e85a660c1a2a1808ff24f7e69981ffcbac66a45c9dcf711b65610b26ea71379a +checksum=635a28f0993f6ab0d1179e072ad39b8139d07f51237f841d93c6c2ff4b1758ec subpackages="gnuplot-common" if [ -z "$CROSS_BUILD" ]; then diff --git a/srcpkgs/go/template b/srcpkgs/go/template index d043e6ce429..2bf792975d1 100644 --- a/srcpkgs/go/template +++ b/srcpkgs/go/template @@ -1,6 +1,6 @@ # Template file for 'go' pkgname=go -version=1.22.0 +version=1.22.3 revision=1 create_wrksrc=yes build_wrksrc=go @@ -12,7 +12,7 @@ license="BSD-3-Clause" homepage="https://go.dev/" changelog="https://go.dev/doc/devel/release.html" distfiles="https://go.dev/dl/go${version}.src.tar.gz" -checksum=4d196c3d41a0d6c1dfc64d04e3cc1f608b0c436bd87b7060ce3e23234e1f4d5c +checksum=80648ef34f903193d72a59c0dff019f5f98ae0c9aa13ade0b0ecbff991a76f68 nostrip=yes noverifyrdeps=yes # on CI it tries to use `git submodule`, which is not part of chroot-git diff --git a/srcpkgs/kdash/template b/srcpkgs/kdash/template new file mode 100644 index 00000000000..c5c0af811fc --- /dev/null +++ b/srcpkgs/kdash/template @@ -0,0 +1,19 @@ +# Template file for 'kdash' +pkgname=kdash +version=0.6.0 +revision=1 +build_style=cargo +hostmakedepends="pkg-config" +makedepends="oniguruma-devel" +short_desc="Simple and fast dashboard for Kubernetes" +maintainer="Luca Bilke " +license="MIT" +homepage="https://kdash.cli.rs/" +changelog="https://raw.githubusercontent.com/kdash-rs/kdash/main/CHANGELOG.md" +distfiles="https://github.com/kdash-rs/kdash/archive/v${version}.tar.gz" +checksum=55acffd0091673984ae15fd4c869de92abbea598654363394caf057db3434bc0 + +post_install() { + vdoc README.md + vlicense LICENSE +} diff --git a/srcpkgs/perl-PDF-API2/template b/srcpkgs/perl-PDF-API2/template index 25682176012..70415d941b6 100644 --- a/srcpkgs/perl-PDF-API2/template +++ b/srcpkgs/perl-PDF-API2/template @@ -1,6 +1,6 @@ # Template file for 'perl-PDF-API2' pkgname=perl-PDF-API2 -version=2.047 +version=2.045 revision=1 build_style=perl-module hostmakedepends="perl" @@ -12,4 +12,4 @@ maintainer="Leah Neukirchen " license="LGPL-2.1-or-later" homepage="https://metacpan.org/release/PDF-API2" distfiles="${CPAN_SITE}/PDF/PDF-API2-${version}.tar.gz" -checksum=84d6318279d77844923e4de4275fe4345cd08b225edd7f9ed6a16f87a91aca39 +checksum=b6bdb4e0d0cd6526103fdd58c171e0560c36b843b7fe3ca4ddc9bb1e4c832406 diff --git a/srcpkgs/pgn-extract/template b/srcpkgs/pgn-extract/template index 4b423a47300..c4d787eea25 100644 --- a/srcpkgs/pgn-extract/template +++ b/srcpkgs/pgn-extract/template @@ -1,6 +1,6 @@ # Template file for 'pgn-extract' pkgname=pgn-extract -version=24.09 +version=22.11 revision=1 build_style=gnu-makefile make_use_env=yes @@ -10,7 +10,7 @@ license="GPL-3.0-or-later" homepage="https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/" changelog="https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/changes.html" distfiles="https://www.cs.kent.ac.uk/~djb/pgn-extract/pgn-extract-${version/./-}.tgz" -checksum=f3afd594aa40b4abce58e87bb565d3730ac160bb93472ae630bf1a25524c6eca +checksum=331e84d55299987dc27f159292ea3b59b94c47edc972f32e96f4e6c0c8621c0b post_extract() { sed -i '/^CC=/d' Makefile diff --git a/srcpkgs/pv-migrate/template b/srcpkgs/pv-migrate/template new file mode 100644 index 00000000000..09a8ce63764 --- /dev/null +++ b/srcpkgs/pv-migrate/template @@ -0,0 +1,22 @@ +# Template file for 'pv-migrate' +pkgname=pv-migrate +version=2.0.1 # renovate utkuozdemir/pv-migrate +revision=2 +archs="x86_64* i686" +build_style=go +go_import_path="github.com/utkuozdemir/pv-migrate" +go_package="./cmd/pv-migrate" +hostmakedepends="go" +short_desc="CLI tool to easily migrate Kubernetes persistent volumes" +maintainer="Luca Bilke " +license="Apache-2.0" +homepage="https://github.com/utkuozdemir/pv-migrate" +distfiles="https://github.com/utkuozdemir/pv-migrate/archive/v${version}.tar.gz" +checksum=37cfb0b7bfa581b32047fe6dbc9b834b4323629a5c946060dc897fe9bcef8e7c + +post_install() { + for shell in bash zsh fish; do + ${PKGDESTDIR}/usr/bin/${pkgname} completion "$shell" >"${pkgname}.$shell" + vcompletion "${pkgname}.$shell" "$shell" + done +} diff --git a/srcpkgs/rbw/template b/srcpkgs/rbw/template index f0311dd9425..076c2a79eef 100644 --- a/srcpkgs/rbw/template +++ b/srcpkgs/rbw/template @@ -1,6 +1,6 @@ # Template file for 'rbw' pkgname=rbw -version=1.10.2 +version=1.9.0 revision=1 archs="x86_64* i686* aarch64* arm*" # ring build_style="cargo" @@ -12,7 +12,7 @@ license="MIT" homepage="https://git.tozt.net/rbw" changelog="https://git.tozt.net/rbw/plain/CHANGELOG.md" distfiles="https://git.tozt.net/rbw/snapshot/rbw-${version}.tar.gz" -checksum=e0e4da2b95dc6f141e0597340e535c61224716b2a7220dce5418555d18e672c2 +checksum=fdf2942b3b9717e5923ac9b8f2b2cece0c1e47713292ea501af9709398efbacd post_install() { for shell in bash fish zsh; do diff --git a/srcpkgs/sbcl/template b/srcpkgs/sbcl/template index 9d514ffbcbe..acdb5f8c27b 100644 --- a/srcpkgs/sbcl/template +++ b/srcpkgs/sbcl/template @@ -1,6 +1,6 @@ # Template file for 'sbcl' pkgname=sbcl -version=2.4.5 +version=2.4.4 revision=1 # make sure the sbcl option in maxima is enabled for the same archs archs="i686 x86_64* armv7l aarch64 ppc64le*" @@ -15,7 +15,7 @@ license="custom:BSD+public_domain" homepage="http://www.sbcl.org/" changelog="http://www.sbcl.org/news.html" distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}-source.tar.bz2" -checksum=4df68e90c9031807642b4b761988deb5bf6a1bd152c4723482834efa735a7bd1 +checksum=8a932627b3f1d8e9618f1cdc225edcb002456804697e2c87d140683764a106d5 nocross=yes nopie=yes @@ -23,7 +23,7 @@ _bootstrap_lisp="bash ../sbcl-*-linux/run-sbcl.sh --no-sysinit --no-userinit --d case "$XBPS_TARGET_MACHINE" in x86_64) distfiles+=" ${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}-x86-64-linux-binary.tar.bz2" - checksum+=" b8cc3afbfc8d5e6d05c7a3137b682a909a0d7389d5861fb06cca649480c7e619" + checksum+=" cb79b4d8f24f6f9aa28f1458d5b0660e85d29a824e8a62c58f486db3ba015c2d" ;; arm*) distfiles+=" ${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-1.2.14-armhf-linux-binary.tar.bz2" diff --git a/srcpkgs/st-custom-terminfo b/srcpkgs/st-custom-terminfo new file mode 120000 index 00000000000..b371f9b8452 --- /dev/null +++ b/srcpkgs/st-custom-terminfo @@ -0,0 +1 @@ +st-custom \ No newline at end of file diff --git a/srcpkgs/st-custom/template b/srcpkgs/st-custom/template new file mode 100644 index 00000000000..5a68018d5d8 --- /dev/null +++ b/srcpkgs/st-custom/template @@ -0,0 +1,40 @@ +# Template file for 'st-custom' +pkgname=st-custom +version=2024.5.2 +revision=2 +build_style=gnu-makefile +make_use_env=compliant +hostmakedepends="pkg-config" +makedepends="fontconfig-devel libX11-devel libXft-devel imlib2-devel harfbuzz-devel" +depends="ncurses st-custom-terminfo-${version}_${revision}" +short_desc="Customized ST" +maintainer="Luca Bilke " +license="MIT" +homepage="https://git.snaile.de/snailed/st-custom" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=991028ecaead1cce9a71f82bae7fe5c1ed4c0279617a5bdea5d6dd2972a066ef +replaces="st>=0" +provides="st-0.9.1_1" + +pre_build() { + mkdir -p ${DESTDIR}/usr/share/terminfo +} + +pre_install() { + export TERMINFO=${DESTDIR}/usr/share/terminfo +} + +post_install() { + vdoc README + vdoc FAQ + vlicense LICENSE +} + +st-custom-terminfo_package() { + short_desc+=" - terminfo data" + replaces="st-terminfo" + provides="st-terminfo-0.9.1_1" + pkg_install() { + vmove usr/share/terminfo + } +} diff --git a/srcpkgs/tokyonight-theme/template b/srcpkgs/tokyonight-theme/template new file mode 100644 index 00000000000..7d8438b2bf9 --- /dev/null +++ b/srcpkgs/tokyonight-theme/template @@ -0,0 +1,18 @@ +# Template file for 'albatross-themes' +pkgname=tokyonight-theme +version=2024.5.2 +revision=1 +short_desc="Tokyonight Theme" +maintainer="Luca Bilke " +license="GPL-3.0-or-later" +homepage="https://git.snaile.de/snailed/tokyonight-theme" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=295ccdf45b8214708af228faf0629cdb615effe9f44ab6c5f34d0c3bfe1393b8 + +do_install() { + vmkdir usr/share/themes + vcopy dist/themes/tokyonight usr/share/themes/tokyonight + + vmkdir usr/share/icons + vcopy dist/icons/tokyonight usr/share/icons/tokyonight +} diff --git a/srcpkgs/trash-util/template b/srcpkgs/trash-util/template new file mode 100644 index 00000000000..4bed210d56a --- /dev/null +++ b/srcpkgs/trash-util/template @@ -0,0 +1,11 @@ +# Template file for 'trash-util' +pkgname=trash-util +version=0.0.1 +revision=2 +build_style=cargo +short_desc="Extremely minimalistic trash client, meant to be used by a wrapper script." +maintainer="Luca Bilke " +license="MIT" +homepage="https://git.snaile.de/snailed/trash-util" +distfiles="${homepage}/archive/${version}.tar.gz" +checksum=fbfda9f31fcc23a04e4b9fe18f9fb9d6b63abaeb6416da959e67851029f90ae1 diff --git a/srcpkgs/velero/template b/srcpkgs/velero/template new file mode 100644 index 00000000000..7bb8b702cde --- /dev/null +++ b/srcpkgs/velero/template @@ -0,0 +1,22 @@ +# Template file for 'velero' +pkgname=velero +version=1.13.2 # renovate vmware-tanzu/velero +revision=2 +archs="x86_64* i686" +build_style=go +go_import_path="github.com/vmware-tanzu/velero" +go_package="./cmd/velero" +hostmakedepends="go" +short_desc="Tools to back up and restore Kubernetes resources and persistent volumes" +maintainer="Luca Bilke " +license="GPL-3.0-or-later" +homepage="https://velero.io/" +distfiles="https://github.com/vmware-tanzu/velero/archive/v${version}.tar.gz" +checksum=e292c4427d801b426a53e24cff10aed16de5bcbf2a5207edfee30d8c4d363135 + +post_install() { + for shell in bash zsh fish; do + ${PKGDESTDIR}/usr/bin/${pkgname} completion "$shell" >"${pkgname}.$shell" + vcompletion "${pkgname}.$shell" "$shell" + done +} diff --git a/srcpkgs/weechat/template b/srcpkgs/weechat/template index e4b496cf035..03c7518cdf0 100644 --- a/srcpkgs/weechat/template +++ b/srcpkgs/weechat/template @@ -1,6 +1,6 @@ # Template file for 'weechat' pkgname=weechat -version=4.3.1 +version=4.2.2 revision=1 build_style=cmake configure_args="-DENABLE_MAN=ON -DENABLE_PERL=ON @@ -8,7 +8,7 @@ configure_args="-DENABLE_MAN=ON -DENABLE_PERL=ON -DENABLE_GUILE=OFF -DENABLE_PHP=OFF -DENABLE_JAVASCRIPT=OFF" hostmakedepends="gettext libgcrypt-devel pkg-config python3 ruby ruby-asciidoctor tcl-devel" -makedepends="aspell-devel cJSON-devel gnutls-devel libcurl-devel libgcrypt-devel +makedepends="aspell-devel gnutls-devel libcurl-devel libgcrypt-devel libzstd-devel lua53-devel ncurses-devel perl python3-devel ruby-devel tcl-devel" depends="ca-certificates" @@ -18,7 +18,7 @@ license="GPL-3.0-or-later" homepage="https://www.weechat.org" changelog="https://raw.githubusercontent.com/weechat/weechat/master/ChangeLog.adoc" distfiles="https://www.weechat.org/files/src/weechat-${version}.tar.xz" -checksum=157e22a17dcc303c665739631a04470d786474e805febed2ed2d5b6250d18653 +checksum=20968b22c7f0f50df9cf6ff8598dd1bd017c5759b2c94593f5d9ed7b24ebb941 lib32disabled=yes subpackages="weechat-aspell weechat-devel weechat-ruby weechat-python weechat-tcl weechat-lua weechat-perl"