diff --git a/.editorconfig b/.editorconfig old mode 100755 new mode 100644 index a92f7dfd8..5f150f350 --- a/.editorconfig +++ b/.editorconfig @@ -15,6 +15,6 @@ trim_trailing_whitespace = false indent_style = space indent_size = 2 -[{**.sh,root/etc/cont-init.d/**,root/etc/services.d/**}] +[{**.sh,root/etc/s6-overlay/s6-rc.d/**,root/etc/cont-init.d/**,root/etc/services.d/**}] indent_style = space indent_size = 4 diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6209526e6..bded8ac94 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,7 +6,7 @@ * Read, and fill the Pull Request template * If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR * If the PR is addressing an existing issue include, closes #\, in the body of the PR commit message -* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://discord.gg/YWrKVTn) +* If you want to discuss changes, you can also bring it up in [#dev-talk](https://discordapp.com/channels/354974912613449730/757585807061155840) in our [Discord server](https://linuxserver.io/discord) ## Common files @@ -24,10 +24,10 @@ ## Readme If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit. -Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-webtop/edit/master/readme-vars.yml). +Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-webtop/edit/arch-kde/readme-vars.yml). These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play. -Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io/images/docker-webtop) +Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io) ### Fixing typos or clarify the text in the readme @@ -105,17 +105,17 @@ docker build \ -t linuxserver/webtop:latest . ``` -The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static` +The ARM variants can be built on x86_64 hardware and vice versa using `lscr.io/linuxserver/qemu-static` ```bash -docker run --rm --privileged multiarch/qemu-user-static:register --reset +docker run --rm --privileged lscr.io/linuxserver/qemu-static --reset ``` Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`. ## Update the changelog -If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-webtop/tree/master/root), add an entry to the changelog +If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-webtop/tree/arch-kde/root), add an entry to the changelog ```yml changelogs: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index a56c31311..5cfe821c7 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,13 +1,13 @@ blank_issues_enabled: false contact_links: - name: Discord chat support - url: https://discord.gg/YWrKVTn + url: https://linuxserver.io/discord about: Realtime support / chat with the community and the team. - - name: Discourse discussion forum - url: https://discourse.linuxserver.io + - name: Github Discussions + url: https://github.com/orgs/linuxserver/discussions about: Post on our community forum. - name: Documentation - url: https://docs.linuxserver.io/images/docker-webtop + url: https://docs.linuxserver.io about: Documentation - information about all of our containers. diff --git a/.github/ISSUE_TEMPLATE/issue.bug.md b/.github/ISSUE_TEMPLATE/issue.bug.md deleted file mode 100644 index ccb097923..000000000 --- a/.github/ISSUE_TEMPLATE/issue.bug.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- -[linuxserverurl]: https://linuxserver.io -[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] - - - - - ------------------------------- - -## Expected Behavior - - -## Current Behavior - - -## Steps to Reproduce - - -1. -2. -3. -4. - -## Environment -**OS:** -**CPU architecture:** x86_64/arm32/arm64 -**How docker service was installed:** - - - -## Command used to create docker container (run/create/compose/screenshot) - - -## Docker logs - diff --git a/.github/ISSUE_TEMPLATE/issue.bug.yml b/.github/ISSUE_TEMPLATE/issue.bug.yml new file mode 100644 index 000000000..3e63d77b9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue.bug.yml @@ -0,0 +1,68 @@ +# Based on the issue template +name: Bug report +description: Create a report to help us improve +title: "[BUG] " +labels: [Bug] +body: + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + - type: textarea + attributes: + label: Current Behavior + description: Tell us what happens instead of the expected behavior. + validations: + required: true + - type: textarea + attributes: + label: Expected Behavior + description: Tell us what should happen. + validations: + required: false + - type: textarea + attributes: + label: Steps To Reproduce + description: Steps to reproduce the behavior. + placeholder: | + 1. In this environment... + 2. With this config... + 3. Run '...' + 4. See error... + validations: + required: true + - type: textarea + attributes: + label: Environment + description: | + examples: + - **OS**: Ubuntu 20.04 + - **How docker service was installed**: distro's packagemanager + value: | + - OS: + - How docker service was installed: + render: markdown + validations: + required: false + - type: textarea + attributes: + label: Docker creation + description: | + Command used to create docker container + Provide your docker create/run command or compose yaml snippet, or a screenshot of settings if using a gui to create the container + render: bash + validations: + required: true + - type: textarea + attributes: + description: | + Provide a full docker log, output of "docker logs webtop" + label: Container logs + placeholder: | + Output of `docker logs webtop` + render: bash + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/issue.feature.md b/.github/ISSUE_TEMPLATE/issue.feature.md deleted file mode 100644 index 20a91fdb1..000000000 --- a/.github/ISSUE_TEMPLATE/issue.feature.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project - ---- -[linuxserverurl]: https://linuxserver.io -[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] - -<!--- If you are new to Docker or this application our issue tracker is **ONLY** used for reporting bugs or requesting features. Please use [our discord server](https://discord.gg/YWrKVTn) for general support. ---> - -<!--- If this acts as a feature request please ask yourself if this modification is something the whole userbase will benefit from ---> -<!--- If this is a specific change for corner case functionality or plugins please look at making a Docker Mod or local script https://blog.linuxserver.io/2019/09/14/customizing-our-containers/ --> - -<!--- Provide a general summary of the request in the Title above --> - ------------------------------- - -## Desired Behavior -<!--- Tell us what should happen --> - -## Current Behavior -<!--- Tell us what happens instead of the expected behavior --> - -## Alternatives Considered -<!--- Tell us what other options you have tried or considered --> diff --git a/.github/ISSUE_TEMPLATE/issue.feature.yml b/.github/ISSUE_TEMPLATE/issue.feature.yml new file mode 100644 index 000000000..099dcdb5e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue.feature.yml @@ -0,0 +1,31 @@ +# Based on the issue template +name: Feature request +description: Suggest an idea for this project +title: "[FEAT] <title>" +labels: [enhancement] +body: + - type: checkboxes + attributes: + label: Is this a new feature request? + description: Please search to see if a feature request already exists. + options: + - label: I have searched the existing issues + required: true + - type: textarea + attributes: + label: Wanted change + description: Tell us what you want to happen. + validations: + required: true + - type: textarea + attributes: + label: Reason for change + description: Justify your request, why do you want it, what is the benefit. + validations: + required: true + - type: textarea + attributes: + label: Proposed code change + description: Do you have a potential code change in mind? + validations: + required: false diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b80c297e7..753c2be49 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,7 +3,6 @@ [linuxserverurl]: https://linuxserver.io [![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl] - <!--- Before submitting a pull request please check the following --> <!--- If this is a fix for a typo (in code, documentation, or the README) please file an issue and let us sort it out. We do not need a PR --> @@ -12,7 +11,6 @@ <!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message --> <!--- We maintain a changelog of major revisions to the container at the end of readme-vars.yml in the root of this repository, please add your changes there if appropriate --> - <!--- Coding guidelines: --> <!--- 1. Installed packages in the Dockerfiles should be in alphabetical order --> <!--- 2. Changes to Dockerfile should be replicated in Dockerfile.armhf and Dockerfile.aarch64 if applicable --> @@ -21,11 +19,16 @@ ------------------------------ - - [ ] I have read the [contributing](https://github.com/linuxserver/docker-webtop/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications +- [ ] I have read the [contributing](https://github.com/linuxserver/docker-webtop/blob/arch-kde/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications + +<!--- LLM disclosure: --> + +- [ ] An LLM assisted me in writing the code or text for this PR +- [ ] An LLM agent wrote the code or text for this PR ------------------------------ -<!--- We welcome all PR’s though this doesn’t guarantee it will be accepted. --> +<!--- We welcome all PRs though this doesn’t guarantee it will be accepted. --> ## Description: <!--- Describe your changes in detail --> @@ -38,6 +41,5 @@ <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> - ## Source / References: <!--- Please include any forum posts/github links relevant to the PR --> diff --git a/.github/workflows/call_issue_pr_tracker.yml b/.github/workflows/call_issue_pr_tracker.yml new file mode 100644 index 000000000..d07cf1212 --- /dev/null +++ b/.github/workflows/call_issue_pr_tracker.yml @@ -0,0 +1,19 @@ +name: Issue & PR Tracker + +on: + issues: + types: [opened,reopened,labeled,unlabeled,closed] + pull_request_target: + types: [opened,reopened,review_requested,review_request_removed,labeled,unlabeled,closed] + pull_request_review: + types: [submitted,edited,dismissed] + +permissions: + contents: read + +jobs: + manage-project: + permissions: + issues: write + uses: linuxserver/github-workflows/.github/workflows/issue-pr-tracker.yml@v1 + secrets: inherit diff --git a/.github/workflows/call_issues_cron.yml b/.github/workflows/call_issues_cron.yml new file mode 100644 index 000000000..d79774167 --- /dev/null +++ b/.github/workflows/call_issues_cron.yml @@ -0,0 +1,16 @@ +name: Mark stale issues and pull requests +on: + schedule: + - cron: '36 11 * * *' + workflow_dispatch: + +permissions: + contents: read + +jobs: + stale: + permissions: + issues: write + pull-requests: write + uses: linuxserver/github-workflows/.github/workflows/issues-cron.yml@v1 + secrets: inherit diff --git a/.github/workflows/external_trigger.yml b/.github/workflows/external_trigger.yml index b045b4925..07ca41318 100644 --- a/.github/workflows/external_trigger.yml +++ b/.github/workflows/external_trigger.yml @@ -3,91 +3,145 @@ name: External Trigger Main on: workflow_dispatch: +permissions: + contents: read + jobs: - external-trigger-master: + external-trigger-arch-kde: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.3 + - uses: linuxserver/github-workflows/.github/actions/checkout@v1 - name: External Trigger - if: github.ref == 'refs/heads/master' + if: github.ref == 'refs/heads/arch-kde' + env: + SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }} run: | - if [ -n "${{ secrets.PAUSE_EXTERNAL_TRIGGER_WEBTOP_MASTER }}" ]; then - echo "**** Github secret PAUSE_EXTERNAL_TRIGGER_WEBTOP_MASTER is set; skipping trigger. ****" + printf "# External trigger for docker-webtop\n\n" >> $GITHUB_STEP_SUMMARY + if grep -q "^webtop_arch-kde_" <<< "${SKIP_EXTERNAL_TRIGGER}"; then + echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY + echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`webtop_arch-kde_\`; will skip trigger if version matches." >> $GITHUB_STEP_SUMMARY + elif grep -q "^webtop_arch-kde" <<< "${SKIP_EXTERNAL_TRIGGER}"; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`webtop_arch-kde\`; skipping trigger." >> $GITHUB_STEP_SUMMARY + exit 0 + fi + echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY + echo "> External trigger running off of arch-kde branch. To disable this trigger, add \`webtop_arch-kde\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY + printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY + EXT_RELEASE=$(curl -u ${{ secrets.CR_USER }}:${{ secrets.CR_PAT }} -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith("arch-"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||') + echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY + if grep -q "^webtop_arch-kde_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` matches current external release; skipping trigger." >> $GITHUB_STEP_SUMMARY exit 0 fi - echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_WEBTOP_MASTER\". ****" - echo "**** Retrieving external version ****" - EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.13/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ - && awk '/^P:'"xfce4"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then - echo "**** Can't retrieve external version, exiting ****" - FAILURE_REASON="Can't retrieve external version for webtop branch master" + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY + FAILURE_REASON="Can't retrieve external version for webtop branch arch-kde" GHA_TRIGGER_URL="https://github.com/linuxserver/docker-webtop/actions/runs/${{ github.run_id }}" curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}], "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} exit 1 fi - EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g') - echo "**** External version: ${EXT_RELEASE} ****" - echo "**** Retrieving last pushed version ****" + EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g') + echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY + echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY image="linuxserver/webtop" - tag="latest" + tag="arch-kde" token=$(curl -sX GET \ "https://ghcr.io/token?scope=repository%3Alinuxserver%2Fwebtop%3Apull" \ | jq -r '.token') - multidigest=$(curl -s \ - --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ - --header "Authorization: Bearer ${token}" \ - "https://ghcr.io/v2/${image}/manifests/${tag}" \ - | jq -r 'first(.manifests[].digest)') - digest=$(curl -s \ + multidigest=$(curl -s \ + --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + --header "Accept: application/vnd.oci.image.index.v1+json" \ + --header "Authorization: Bearer ${token}" \ + "https://ghcr.io/v2/${image}/manifests/${tag}") + if jq -e '.layers // empty' <<< "${multidigest}" >/dev/null 2>&1; then + # If there's a layer element it's a single-arch manifest so just get that digest + digest=$(jq -r '.config.digest' <<< "${multidigest}") + else + # Otherwise it's multi-arch or has manifest annotations + if jq -e '.manifests[]?.annotations // empty' <<< "${multidigest}" >/dev/null 2>&1; then + # Check for manifest annotations and delete if found + multidigest=$(jq 'del(.manifests[] | select(.annotations))' <<< "${multidigest}") + fi + if [[ $(jq '.manifests | length' <<< "${multidigest}") -gt 1 ]]; then + # If there's still more than one digest, it's multi-arch + multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}") + else + # Otherwise it's single arch + multidigest=$(jq -r ".manifests[].digest?" <<< "${multidigest}") + fi + if digest=$(curl -s \ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \ + --header "Accept: application/vnd.oci.image.manifest.v1+json" \ --header "Authorization: Bearer ${token}" \ - "https://ghcr.io/v2/${image}/manifests/${multidigest}" \ - | jq -r '.config.digest') + "https://ghcr.io/v2/${image}/manifests/${multidigest}"); then + digest=$(jq -r '.config.digest' <<< "${digest}"); + fi + fi image_info=$(curl -sL \ --header "Authorization: Bearer ${token}" \ - "https://ghcr.io/v2/${image}/blobs/${digest}" \ - | jq -r '.container_config') + "https://ghcr.io/v2/${image}/blobs/${digest}") + if [[ $(echo $image_info | jq -r '.container_config') == "null" ]]; then + image_info=$(echo $image_info | jq -r '.config') + else + image_info=$(echo $image_info | jq -r '.container_config') + fi IMAGE_RELEASE=$(echo ${image_info} | jq -r '.Labels.build_version' | awk '{print $3}') IMAGE_VERSION=$(echo ${IMAGE_RELEASE} | awk -F'-ls' '{print $1}') if [ -z "${IMAGE_VERSION}" ]; then - echo "**** Can't retrieve last pushed version, exiting ****" - FAILURE_REASON="Can't retrieve last pushed version for webtop tag latest" + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "Can't retrieve last pushed version, exiting" >> $GITHUB_STEP_SUMMARY + FAILURE_REASON="Can't retrieve last pushed version for webtop tag arch-kde" curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680, "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}], "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} exit 1 fi - echo "**** Last pushed version: ${IMAGE_VERSION} ****" - if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then - echo "**** Version ${EXT_RELEASE} already pushed, exiting ****" + echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY + if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then + echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY exit 0 - elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then - echo "**** New version ${EXT_RELEASE} found; but there already seems to be an active build on Jenkins; exiting ****" + elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/arch-kde/lastBuild/api/json | jq -r '.building') == "true" ]; then + echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY exit 0 else - echo "**** New version ${EXT_RELEASE} found; old version was ${IMAGE_VERSION}. Triggering new build ****" - response=$(curl -iX POST \ - https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/master/buildWithParameters?PACKAGE_CHECK=false \ - --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") - echo "**** Jenkins job queue url: ${response%$'\r'} ****" - echo "**** Sleeping 10 seconds until job starts ****" - sleep 10 - buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url') - buildurl="${buildurl%$'\r'}" - echo "**** Jenkins job build url: ${buildurl} ****" - echo "**** Attempting to change the Jenkins job description ****" - curl -iX POST \ - "${buildurl}submitDescription" \ - --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \ - --data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ - --data-urlencode "Submit=Submit" - echo "**** Notifying Discord ****" - TRIGGER_REASON="A version change was detected for webtop tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}" - curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, - "description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}], - "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} + if [[ "${artifacts_found}" == "false" ]]; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> New version detected, but not all artifacts are published yet; skipping trigger" >> $GITHUB_STEP_SUMMARY + FAILURE_REASON="New version ${EXT_RELEASE} for webtop tag arch-kde is detected, however not all artifacts are uploaded to upstream release yet. Will try again later." + curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, + "description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n"}], + "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} + else + printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY + echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY + if [[ "${artifacts_found}" == "true" ]]; then + echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY + fi + response=$(curl -iX POST \ + https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/arch-kde/buildWithParameters?PACKAGE_CHECK=false \ + --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") + echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY + echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY + sleep 10 + buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url') + buildurl="${buildurl%$'\r'}" + echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY + echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY + curl -iX POST \ + "${buildurl}submitDescription" \ + --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \ + --data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ + --data-urlencode "Submit=Submit" + echo "**** Notifying Discord ****" + TRIGGER_REASON="A version change was detected for webtop tag arch-kde. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}" + curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, + "description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}], + "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} + fi fi diff --git a/.github/workflows/external_trigger_scheduler.yml b/.github/workflows/external_trigger_scheduler.yml index 7e3c77da7..e7b8ffca1 100644 --- a/.github/workflows/external_trigger_scheduler.yml +++ b/.github/workflows/external_trigger_scheduler.yml @@ -2,42 +2,47 @@ name: External Trigger Scheduler on: schedule: - - cron: '15 * * * *' + - cron: '27 * * * *' workflow_dispatch: +permissions: + contents: read + jobs: external-trigger-scheduler: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.3 + - uses: linuxserver/github-workflows/.github/actions/checkout@v1 with: fetch-depth: '0' - name: External Trigger Scheduler run: | - echo "**** Branches found: ****" - git for-each-ref --format='%(refname:short)' refs/remotes - echo "**** Pulling the yq docker image ****" - docker pull ghcr.io/linuxserver/yq - for br in $(git for-each-ref --format='%(refname:short)' refs/remotes) + printf "# External trigger scheduler for docker-webtop\n\n" >> $GITHUB_STEP_SUMMARY + printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY + for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes) do - br=$(echo "$br" | sed 's|origin/||g') - echo "**** Evaluating branch ${br} ****" - ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/jenkins-vars.yml \ - | docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch) - if [ "$br" == "$ls_branch" ]; then - echo "**** Branch ${br} appears to be live; checking workflow. ****" + if [[ "${br}" == "HEAD" ]]; then + printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY + continue + fi + printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY + ls_jenkins_vars=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/jenkins-vars.yml) + ls_branch=$(echo "${ls_jenkins_vars}" | yq -r '.ls_branch') + ls_trigger=$(echo "${ls_jenkins_vars}" | yq -r '.external_type') + if [[ "${br}" == "${ls_branch}" ]] && [[ "${ls_trigger}" != "os" ]]; then + echo "Branch appears to be live and trigger is not os; checking workflow." >> $GITHUB_STEP_SUMMARY if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/.github/workflows/external_trigger.yml > /dev/null 2>&1; then - echo "**** Workflow exists. Triggering external trigger workflow for branch ${br} ****." + echo "Triggering external trigger workflow for branch." >> $GITHUB_STEP_SUMMARY curl -iX POST \ -H "Authorization: token ${{ secrets.CR_PAT }}" \ -H "Accept: application/vnd.github.v3+json" \ -d "{\"ref\":\"refs/heads/${br}\"}" \ https://api.github.com/repos/linuxserver/docker-webtop/actions/workflows/external_trigger.yml/dispatches else - echo "**** Workflow doesn't exist; skipping trigger. ****" + echo "Skipping branch due to no external trigger workflow present." >> $GITHUB_STEP_SUMMARY fi else - echo "**** ${br} appears to be a dev branch; skipping trigger. ****" + echo "Skipping branch due to being detected as dev branch or having no external version." >> $GITHUB_STEP_SUMMARY fi done diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 3149ff41a..c42dfe2aa 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -2,12 +2,18 @@ name: Greetings on: [pull_request_target, issues] +permissions: + contents: read + jobs: greeting: + permissions: + issues: write + pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/first-interaction@v1 + - uses: linuxserver/github-workflows/.github/actions/first-interaction@v1 with: - issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-webtop/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-webtop/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!' - pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-webtop/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!' - repo-token: ${{ secrets.GITHUB_TOKEN }} + issue_message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.' + pr_message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-webtop/blob/arch-kde/.github/PULL_REQUEST_TEMPLATE.md)!' + repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/package_trigger.yml b/.github/workflows/package_trigger.yml deleted file mode 100644 index 3616a510b..000000000 --- a/.github/workflows/package_trigger.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Package Trigger Main - -on: - workflow_dispatch: - -jobs: - package-trigger-master: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.3 - - - name: Package Trigger - if: github.ref == 'refs/heads/master' - run: | - if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_WEBTOP_MASTER }}" ]; then - echo "**** Github secret PAUSE_PACKAGE_TRIGGER_WEBTOP_MASTER is set; skipping trigger. ****" - exit 0 - fi - if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then - echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****" - exit 0 - fi - echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_WEBTOP_MASTER\". ****" - response=$(curl -iX POST \ - https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/master/buildWithParameters?PACKAGE_CHECK=true \ - --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") - echo "**** Jenkins job queue url: ${response%$'\r'} ****" - echo "**** Sleeping 10 seconds until job starts ****" - sleep 10 - buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url') - buildurl="${buildurl%$'\r'}" - echo "**** Jenkins job build url: ${buildurl} ****" - echo "**** Attempting to change the Jenkins job description ****" - curl -iX POST \ - "${buildurl}submitDescription" \ - --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \ - --data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ - --data-urlencode "Submit=Submit" diff --git a/.github/workflows/package_trigger_scheduler.yml b/.github/workflows/package_trigger_scheduler.yml index ae74e6400..707ee3129 100644 --- a/.github/workflows/package_trigger_scheduler.yml +++ b/.github/workflows/package_trigger_scheduler.yml @@ -2,49 +2,102 @@ name: Package Trigger Scheduler on: schedule: - - cron: '04 9 * * 0' + - cron: '19 3 * * 2' workflow_dispatch: +permissions: + contents: read + jobs: package-trigger-scheduler: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.3 + - uses: linuxserver/github-workflows/.github/actions/checkout@v1 with: fetch-depth: '0' - name: Package Trigger Scheduler + env: + SKIP_PACKAGE_TRIGGER: ${{ vars.SKIP_PACKAGE_TRIGGER }} run: | - echo "**** Branches found: ****" - git for-each-ref --format='%(refname:short)' refs/remotes - echo "**** Pulling the yq docker image ****" - docker pull ghcr.io/linuxserver/yq - for br in $(git for-each-ref --format='%(refname:short)' refs/remotes) + printf "# Package trigger scheduler for docker-webtop\n\n" >> $GITHUB_STEP_SUMMARY + printf "Found the branches:\n\n%s\n" "$(git for-each-ref --format='- %(refname:lstrip=3)' refs/remotes)" >> $GITHUB_STEP_SUMMARY + for br in $(git for-each-ref --format='%(refname:lstrip=3)' refs/remotes) do - br=$(echo "$br" | sed 's|origin/||g') - echo "**** Evaluating branch ${br} ****" - ls_branch=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/jenkins-vars.yml \ - | docker run --rm -i --entrypoint yq ghcr.io/linuxserver/yq -r .ls_branch) - if [ "${br}" == "${ls_branch}" ]; then - echo "**** Branch ${br} appears to be live; checking workflow. ****" - if curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/.github/workflows/package_trigger.yml > /dev/null 2>&1; then - echo "**** Workflow exists. Triggering package trigger workflow for branch ${br}. ****" - triggered_branches="${triggered_branches}${br} " - curl -iX POST \ - -H "Authorization: token ${{ secrets.CR_PAT }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -d "{\"ref\":\"refs/heads/${br}\"}" \ - https://api.github.com/repos/linuxserver/docker-webtop/actions/workflows/package_trigger.yml/dispatches - sleep 30 + if [[ "${br}" == "HEAD" ]]; then + printf "\nSkipping %s.\n" ${br} >> $GITHUB_STEP_SUMMARY + continue + fi + printf "\n## Evaluating \`%s\`\n\n" ${br} >> $GITHUB_STEP_SUMMARY + JENKINS_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/jenkins-vars.yml) + if ! curl -sfX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/Jenkinsfile >/dev/null 2>&1; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> No Jenkinsfile found. Branch is either deprecated or is an early dev branch." >> $GITHUB_STEP_SUMMARY + skipped_branches="${skipped_branches}${br} " + elif [[ "${br}" == $(yq -r '.ls_branch' <<< "${JENKINS_VARS}") ]]; then + echo "Branch appears to be live; checking workflow." >> $GITHUB_STEP_SUMMARY + README_VARS=$(curl -sX GET https://raw.githubusercontent.com/linuxserver/docker-webtop/${br}/readme-vars.yml) + if [[ $(yq -r '.project_deprecation_status' <<< "${README_VARS}") == "true" ]]; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Branch appears to be deprecated; skipping trigger." >> $GITHUB_STEP_SUMMARY + skipped_branches="${skipped_branches}${br} " + elif [[ $(yq -r '.skip_package_check' <<< "${JENKINS_VARS}") == "true" ]]; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Skipping branch ${br} due to \`skip_package_check\` being set in \`jenkins-vars.yml\`." >> $GITHUB_STEP_SUMMARY + skipped_branches="${skipped_branches}${br} " + elif grep -q "^webtop_${br}" <<< "${SKIP_PACKAGE_TRIGGER}"; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Github organizational variable \`SKIP_PACKAGE_TRIGGER\` contains \`webtop_${br}\`; skipping trigger." >> $GITHUB_STEP_SUMMARY + skipped_branches="${skipped_branches}${br} " + elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/${br}/lastBuild/api/json | jq -r '.building' 2>/dev/null) == "true" ]; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> There already seems to be an active build on Jenkins; skipping package trigger for ${br}" >> $GITHUB_STEP_SUMMARY + skipped_branches="${skipped_branches}${br} " else - echo "**** Workflow doesn't exist; skipping trigger. ****" + echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY + echo "> Triggering package trigger for branch ${br}" >> $GITHUB_STEP_SUMMARY + printf "> To disable, add \`webtop_%s\` into the Github organizational variable \`SKIP_PACKAGE_TRIGGER\`.\n\n" "${br}" >> $GITHUB_STEP_SUMMARY + triggered_branches="${triggered_branches}${br} " + response=$(curl -iX POST \ + https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/${br}/buildWithParameters?PACKAGE_CHECK=true \ + --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|") + if [[ -z "${response}" ]]; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Jenkins build could not be triggered. Skipping branch." + continue + fi + echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY + echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY + sleep 10 + buildurl=$(curl -s "${response%$'\r'}api/json" | jq -r '.executable.url') + buildurl="${buildurl%$'\r'}" + echo "Jenkins job [build url](${buildurl})" >> $GITHUB_STEP_SUMMARY + echo "Attempting to change the Jenkins job description" >> $GITHUB_STEP_SUMMARY + if ! curl -ifX POST \ + "${buildurl}submitDescription" \ + --user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} \ + --data-urlencode "description=GHA package trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \ + --data-urlencode "Submit=Submit"; then + echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY + echo "> Unable to change the Jenkins job description." + fi + sleep 20 fi else - echo "**** ${br} appears to be a dev branch; skipping trigger. ****" + echo "Skipping branch ${br} due to being detected as dev branch." >> $GITHUB_STEP_SUMMARY fi done - echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****" - echo "**** Notifying Discord ****" - curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, - "description": "**Package Check Build(s) Triggered for webtop** \n**Branch(es):** '"${triggered_branches}"' \n**Build URL:** '"https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-webtop/activity/"' \n"}], - "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} + if [[ -n "${triggered_branches}" ]] || [[ -n "${skipped_branches}" ]]; then + if [[ -n "${triggered_branches}" ]]; then + NOTIFY_BRANCHES="**Triggered:** ${triggered_branches} \n" + NOTIFY_BUILD_URL="**Build URL:** https://ci.linuxserver.io/blue/organizations/jenkins/Docker-Pipeline-Builders%2Fdocker-webtop/activity/ \n" + echo "**** Package check build(s) triggered for branch(es): ${triggered_branches} ****" + fi + if [[ -n "${skipped_branches}" ]]; then + NOTIFY_BRANCHES="${NOTIFY_BRANCHES}**Skipped:** ${skipped_branches} \n" + fi + echo "**** Notifying Discord ****" + curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903, + "description": "**Package Check Build(s) for webtop** \n'"${NOTIFY_BRANCHES}"''"${NOTIFY_BUILD_URL}"'"}], + "username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }} + fi diff --git a/.github/workflows/permissions.yml b/.github/workflows/permissions.yml new file mode 100644 index 000000000..02e1bdb9a --- /dev/null +++ b/.github/workflows/permissions.yml @@ -0,0 +1,12 @@ +name: Permission check +on: + pull_request_target: + paths: + - '**/run' + - '**/finish' + - '**/check' + - 'root/migrations/*' + +jobs: + permission_check: + uses: linuxserver/github-workflows/.github/workflows/init-svc-executable-permissions.yml@v1 diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 3b3846ee8..000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Mark stale issues and pull requests - -on: - schedule: - - cron: "30 1 * * *" - -jobs: - stale: - - runs-on: ubuntu-latest - - steps: - - uses: actions/stale@v3 - with: - stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions." - stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions." - stale-issue-label: 'no-issue-activity' - stale-pr-label: 'no-pr-activity' - days-before-stale: 30 - days-before-close: 365 - exempt-issue-labels: 'awaiting-approval,work-in-progress' - exempt-pr-labels: 'awaiting-approval,work-in-progress' - repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 000000000..e9e5feae9 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,127 @@ +<!-- DO NOT EDIT THIS FILE MANUALLY --> +<!-- This file is globally distributed to all container image projects from https://github.com/linuxserver/docker-jenkins-builder --> +# AGENTS.md - LinuxServer.io container image repository + +This file is for AI coding agents (and the humans driving them) working in a LinuxServer.io `docker-*` image repository. Read it fully before proposing or making any change. + +We welcome contributions, including AI-assisted ones, but this is a volunteer-run project that ships 150+ images to millions of users from one shared template. A change that looks like an improvement in isolation is often wrong for us. When this file and your instincts disagree, this file wins. When this file is silent, copy what the surrounding code already does. + +## 1. Decide where the change belongs before writing any code + +Our images are built for **broad consumption**. Every package, env var and init step we add is something we have to maintain, rebuild weekly and support forever, for every user, whether they use it or not. We do not ship Swiss Army Knife images. Work down this list and stop at the first match: + +1. **It is a bug or feature in the application itself** (not in our packaging): it belongs upstream with the app's developers. Do not patch, fork or work around upstream application behaviour in the image. +2. **It is an unsupported or reasonable-endeavours environment** (Podman, k8s, Portainer, Watchtower, NFS/SMB `/config`, LXC, custom entrypoints, etc. See the [Support Policy](https://docs.linuxserver.io/misc/support-policy/)): we will not add logic to the image to accommodate it. +3. **It only matters to one user or one setup**: use a private [custom script](https://docs.linuxserver.io/general/container-customization/#custom-scripts) in `/custom-cont-init.d` or [custom service](https://docs.linuxserver.io/general/container-customization/#custom-services) in `/custom-services.d`. No PR needed. +4. **It is useful to a subset of users** (an extra package, plugin dependency, alternative UI, hardware driver, third party integration, extra daemon, niche toggle): it is a **[Docker Mod](https://github.com/linuxserver/docker-mods)**, not a change to this repo. Check whether one already exists first (`universal-*` mods work on every image; `<image>-*` mods are image specific). If not, create one from the template in the docker-mods repo; each mod lives on its own branch there. +5. **The large majority of this image's users benefit, or the image is actually broken**: a PR to this repo is appropriate. Examples: the app fails to start, a new upstream release needs a new runtime dependency, a base image rebase, a permissions bug, a wrong default, incorrect docs in `readme-vars.yml`. + +If you are an agent and the requested change lands on 1-4, **stop and tell your operator** where it belongs instead of writing the PR. "It is only a few lines" is not a reason to put it in the image. If in doubt, a human should open an issue or ask in `#contibutor-discussion` on [Discord](https://linuxserver.io/discord) before doing the work. + +### If it is a mod + +Mods are the pressure valve that keeps the images small. Roughly what lives there today, and therefore does **not** belong in an image: extra OS/pip packages and language toolchains, GPU/hardware driver stacks, alternative web UIs and themes, third party plugins and scanners, integrations with external services (Cloudflare, CrowdSec, Apprise, GeoIP, VPN providers), Docker socket automation, sidecar daemons (redis, tunnels), post-processing scripts, and env-var-to-config-file shims. + +- Follow the README and `template` branch in [docker-mods](https://github.com/linuxserver/docker-mods). A mod is a `FROM scratch` single layer of files extracted over `/` at container start, wired into s6 as `init-mod-<image>-<mod>-*` / `svc-mod-<image>-<mod>` units. +- Mods never call `apk`/`apt`/`pip` directly; they append to `/mod-repo-packages-to-install.list` or `/mod-pip-packages-to-install.list` and let the base image do one batched install. Handle Alpine and Ubuntu package names where the mod is universal. +- Most good mods are a 10-40 line script. If yours is not, reconsider the approach. +- A mod is also the proving ground. If a mod becomes something nearly everyone uses, the team may absorb it into the image later and turn the mod into a no-op with a deprecation notice. That is the team's call, not a reason to skip the mod step. + +## 2. Repository layout and what you must not edit + +| Path | Notes | +| --- | --- | +| `Dockerfile`, `Dockerfile.aarch64` (sometimes `Dockerfile.riscv64`) | One per architecture. **Any change must be replicated to all of them.** They normally differ only in base image tag and arch strings. | +| `root/` | Copied to `/` in the image. s6-overlay v3 services live in `root/etc/s6-overlay/s6-rc.d/`, defaults in `root/defaults/`, one-time upgrade steps in `root/migrations/`. | +| `readme-vars.yml` | **Source of truth for the README, docs site, Unraid template and changelog.** Edit this. | +| `jenkins-vars.yml` | Build pipeline variables (version detection, CI test settings). Rarely needs touching. | +| `README.md` | **Generated. Never edit.** | +| `Jenkinsfile` | **Generated. Never edit.** | +| `package_versions.txt` | **Generated by CI. Never edit.** | +| `.github/**`, `.editorconfig`, `LICENSE`, `AGENTS.md` | **Generated / globally distributed. Never edit here.** Changes go to [docker-jenkins-builder](https://github.com/linuxserver/docker-jenkins-builder). | + +Do not add new top level files or tooling: no `docker-compose.yml`, `Makefile`, test suites, linter configs, pre-commit hooks, extra workflows, `CHANGELOG.md`, `SECURITY.md`, devcontainers, or helper scripts. The repo is intentionally small. + +Some repos have multiple live branches that publish different tags (`nightly`, `develop`, `libtorrentv1`, etc.). Each is maintained independently. Target the branch the change applies to, never merge one into another, and do not assume `master` or `main` is the only one that matters. + +## 3. Code style: keep it simple, match what is there + +The goal of every image is the thinnest possible layer between our base image and the upstream app: install it, drop a sane default config into `/config` on first run, fix permissions, start it. Prefer deleting logic to adding it. The base image already handles PUID/PGID, `UMASK`, `TZ`, `FILE__` secrets, mods, custom scripts, cron and device permissions; never reimplement those. + +### Dockerfiles + +- Base is always `ghcr.io/linuxserver/baseimage-*`. Do not change distro, switch to upstream/distroless images, or add multi-stage complexity unless a maintainer asked for it. Base image rebases are done by the team. +- Follow the existing shape exactly: a single `RUN` chain joined with `&& \`, each step announced with `echo "**** doing thing ****"`, two space indentation, a `**** cleanup ****` step at the end removing `/tmp/*` and package caches. +- Packages are listed **one per line in alphabetical order**. Build-only dependencies go in a `build-dependencies` virtual package (Alpine) or are purged (Ubuntu) in the same layer. +- Do not hardcode or pin the application version. Keep the `if [ -z ${APP_VERSION+x} ]; then ...` pattern; CI supplies the version as a build arg and `jenkins-vars.yml` defines how it is detected. +- Do not add `HEALTHCHECK`, `USER`, `ENTRYPOINT` or `CMD`. The base image owns init (`/init`), and the container must start as root unless the image already documents non-root support. +- Do not touch the `LABEL maintainer` or `build_version` lines. + +### Init scripts and services (`root/etc/s6-overlay/s6-rc.d/`) + +- Naming: `init-<app>-config` (oneshot) and `svc-<app>` (longrun). Wire them in using empty files in `dependencies.d/` and `user/contents.d/`, exactly as the existing ones do. Oneshots have `type`, `up` (the path to `run`) and `run`. No legacy `cont-init.d` / `services.d`. +- Every script starts with: + + ```bash + #!/usr/bin/with-contenv bash + # shellcheck shell=bash + ``` + +- Bash, four space indentation, `[[ ]]` tests, `"${VAR}"` quoting, short lowercase `#` comments. Scripts must be shellcheck clean. +- Use `lsiown` instead of `chown`, run the app as `abc` via `s6-setuidgid abc`, and `exec` the final process so s6 supervises it. Keep `s6-notifyoncheck` readiness checks where they exist. +- If `readme-vars.yml` has `nonroot_supported: true` or `readonly_supported: true`, every new privileged operation (chown, writing outside `/config` and `/run`, `s6-setuidgid`) must be guarded the same way the existing code does it (`if [[ -z ${LSIO_NON_ROOT_USER} ]]; then` etc.). Do not break those modes. +- User data and config live in `/config`. Copy defaults only if the file does not already exist; never overwrite user config on startup. If an existing user's config must change, add a numbered script in `root/migrations/`. +- Avoid recursive `lsiown` on large data paths (media, downloads); it makes startup take minutes for real users. +- New environment variables are a last resort. If the app can be configured through its own config file or UI, that is the answer. We do not wrap app settings in env vars. + +## 4. Documentation and changelog + +- All user-facing docs changes go in `readme-vars.yml` (`app_setup_block`, `param_env_vars`, `opt_param_*`, etc.). Reference: [`_container-vars-blank`](https://github.com/linuxserver/docker-jenkins-builder/blob/master/ansible/vars/_container-vars-blank). +- Any change to a Dockerfile or to anything under `root/` needs a new entry at the **top** of `changelogs:` in `readme-vars.yml`, one short factual line: + + ```yaml + - {date: "DD.MM.YY:", desc: "Add libfoo to fix thumbnail generation."} + ``` + +- Optionally regenerate the templated files to check your vars render (see the [jenkins-builder README](https://github.com/linuxserver/docker-jenkins-builder#running-against-local-project)), but do not hand edit the output. + +## 5. Test it for real + +A change that has not been built and run is not ready. At minimum: + +```bash +docker build --no-cache --pull -t lscr.io/linuxserver/<app>:test . +docker run --rm -e PUID=1000 -e PGID=1000 -e TZ=Etc/UTC -v "$(pwd)/testconfig:/config" -p <port>:<port> lscr.io/linuxserver/<app>:test +``` + +Confirm the init completes (`[ls.io-init] done.`), the app comes up, and it survives a restart against an **existing** `/config`, not just a fresh one. If you touched the aarch64 Dockerfile with anything arch specific, build that too (`lscr.io/linuxserver/qemu-static`). If you, the agent, cannot run Docker, say so plainly in your output; do not claim testing that did not happen. + +## 6. Pull requests + +- **Disclose AI use.** If any part of the PR (code, description, or the investigation behind it) was produced with an AI tool, say so in the PR description: which tool, and what it was used for. Agents: add this line yourself, do not leave it to the operator. Undisclosed AI-generated PRs will be closed. Disclosure does not count against a PR; a human who cannot explain their own PR does. +- **A human is accountable.** The person opening the PR must have read and understood every line, built and run the image, and be able to answer review questions in their own words. Do not paste maintainer questions into a chatbot and paste the answers back. Fully autonomous agents must not open PRs or issues on our repos. +- **One focused change per PR.** The smallest diff that fixes the problem. No drive-by refactors, reformatting, comment rewording, "modernisation", dependency shuffling, or fixes for things nobody reported. +- **No typo / wording-only PRs.** Open an issue instead and we will sort it out. +- **Finish before you open.** Do not open drafts and iterate in public with a stream of fixup commits. +- **Fill in the PR template honestly**, keep its structure, and tick the contributing checkbox only if it is true. Description, benefit to the wider userbase, how it was tested (real commands, real output), and links. Write it short and plain: no generated summaries, emoji headers, or bullet lists restating the diff. +- Reference the issue with `closes #<number>` when there is one. For anything non trivial, there should be an human-submitted issue or Discord discussion first. +- Commit messages are short, plain, imperative sentences (`Add libfoo for thumbnail support`). No conventional-commit prefixes, no emoji. +- A PR is a proposal; it may be declined even if it works. The most common reason is section 1 of this file. + +## 7. Issues + +- GitHub issues are for reproducible bugs in **our image** and for feature requests. +- Agents must not file issues on a user's behalf from a guess. An issue needs a real reproduction on the latest image, with mods and custom scripts disabled, the compose/run command and full container logs from startup, using the issue template. +- Do not submit AI-generated root cause analyses or "security audits" of the image as issues. Scanner output about CVEs in upstream or distro packages is not actionable; images are rebuilt regularly to pull in distro fixes. +- Support questions must always be submitted by a human and go to [Discord](https://linuxserver.io/discord) or the [forum](https://github.com/orgs/linuxserver/discussions); see [how to get support](https://docs.linuxserver.io/general/how-to-get-support/). + +## 8. Quick self check before you finish + +- [ ] This change benefits most users of this image, and is not a mod, custom script, or upstream issue. +- [ ] Only hand-maintained files were edited (`Dockerfile*`, `root/**`, `readme-vars.yml`, rarely `jenkins-vars.yml`). +- [ ] Every Dockerfile variant got the same change; packages are alphabetical. +- [ ] Style matches the neighbouring code; shebang and shellcheck directive present; non-root / read-only guards preserved. +- [ ] Changelog entry added at the top of `changelogs:` with today's date as `DD.MM.YY:`. +- [ ] Image was built and run, including against an existing `/config`. +- [ ] The diff contains nothing the task did not require. +- [ ] PR description discloses AI use and a human has reviewed everything. diff --git a/Dockerfile b/Dockerfile index 0515fc062..a344ef2c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,33 +1,67 @@ -FROM lsiobase/rdesktop-web:alpine +# syntax=docker/dockerfile:1 +FROM ghcr.io/linuxserver/baseimage-selkies:arch # set version label ARG BUILD_DATE ARG VERSION -ARG XFCE_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thelamer" +# title +ENV TITLE="Arch KDE" \ + PIXELFLUX_WAYLAND=true RUN \ + echo "**** add icon ****" && \ + curl -o \ + /usr/share/selkies/www/icon.png \ + https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png && \ echo "**** install packages ****" && \ - apk add --no-cache \ - faenza-icon-theme \ - faenza-icon-theme-xfce4-appfinder \ - faenza-icon-theme-xfce4-panel \ - firefox-esr \ - mousepad \ - thunar \ - xfce4 \ - xfce4-terminal && \ - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ - xfce4-pulseaudio-plugin && \ + pacman -Sy --noconfirm --needed \ + aurorae \ + cargo \ + chromium \ + discover \ + dolphin \ + kate \ + konsole \ + kvantum \ + packagekit \ + papirus-icon-theme \ + pipewire \ + plasma-desktop \ + wireplumber \ + xdg-desktop-portal \ + xdg-desktop-portal-kde \ + xdg-user-dirs \ + xorg-xhost && \ + cargo install \ + wl-clipboard-rs-tools && \ + echo "**** replace wl-clipboard with rust ****" && \ + mv \ + /config/.cargo/bin/wl-* \ + /usr/bin/ && \ + echo "**** application tweaks ****" && \ + sed -i \ + 's#^Exec=[^ ]*#Exec=/usr/local/bin/wrapped-chromium#g' \ + /usr/share/applications/chromium.desktop && \ + setcap -r \ + /usr/sbin/kwin_wayland && \ + rm -f \ + /usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service && \ echo "**** cleanup ****" && \ rm -rf \ - /tmp/* + /config/.cache \ + /config/.cargo \ + /tmp/* \ + /var/cache/pacman/pkg/* \ + /var/lib/pacman/sync/* # add local files COPY /root / +COPY --from=ghcr.io/linuxserver/selkies-layers:amd64-arch-kwin / / # ports and volumes -EXPOSE 3000 +EXPOSE 3001 + VOLUME /config diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 439ac8bc8..32286fe39 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -1,33 +1,67 @@ -FROM lsiobase/rdesktop-web:arm64v8-alpine +# syntax=docker/dockerfile:1 +FROM ghcr.io/linuxserver/baseimage-selkies:arm64v8-arch # set version label ARG BUILD_DATE ARG VERSION -ARG XFCE_VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" LABEL maintainer="thelamer" +# title +ENV TITLE="Arch KDE" \ + PIXELFLUX_WAYLAND=true RUN \ + echo "**** add icon ****" && \ + curl -o \ + /usr/share/selkies/www/icon.png \ + https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png && \ echo "**** install packages ****" && \ - apk add --no-cache \ - faenza-icon-theme \ - faenza-icon-theme-xfce4-appfinder \ - faenza-icon-theme-xfce4-panel \ - firefox-esr \ - mousepad \ - thunar \ - xfce4 \ - xfce4-terminal && \ - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ - xfce4-pulseaudio-plugin && \ + pacman -Sy --noconfirm --needed \ + aurorae \ + cargo \ + chromium \ + discover \ + dolphin \ + kate \ + konsole \ + kvantum \ + packagekit \ + papirus-icon-theme \ + pipewire \ + plasma-desktop \ + wireplumber \ + xdg-desktop-portal \ + xdg-desktop-portal-kde \ + xdg-user-dirs \ + xorg-xhost && \ + cargo install \ + wl-clipboard-rs-tools && \ + echo "**** replace wl-clipboard with rust ****" && \ + mv \ + /config/.cargo/bin/wl-* \ + /usr/bin/ && \ + echo "**** application tweaks ****" && \ + sed -i \ + 's#^Exec=[^ ]*#Exec=/usr/local/bin/wrapped-chromium#g' \ + /usr/share/applications/chromium.desktop && \ + setcap -r \ + /usr/sbin/kwin_wayland && \ + rm -f \ + /usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service && \ echo "**** cleanup ****" && \ rm -rf \ - /tmp/* + /config/.cache \ + /config/.cargo \ + /tmp/* \ + /var/cache/pacman/pkg/* \ + /var/lib/pacman/sync/* # add local files COPY /root / +COPY --from=ghcr.io/linuxserver/selkies-layers:arm64v8-arch-kwin / / # ports and volumes -EXPOSE 3000 +EXPOSE 3001 + VOLUME /config diff --git a/Dockerfile.armhf b/Dockerfile.armhf deleted file mode 100644 index 276d8de77..000000000 --- a/Dockerfile.armhf +++ /dev/null @@ -1,33 +0,0 @@ -FROM lsiobase/rdesktop-web:arm32v7-alpine - -# set version label -ARG BUILD_DATE -ARG VERSION -ARG XFCE_VERSION -LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -LABEL maintainer="thelamer" - - -RUN \ - echo "**** install packages ****" && \ - apk add --no-cache \ - faenza-icon-theme \ - faenza-icon-theme-xfce4-appfinder \ - faenza-icon-theme-xfce4-panel \ - firefox-esr \ - mousepad \ - thunar \ - xfce4 \ - xfce4-terminal && \ - apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community \ - xfce4-pulseaudio-plugin && \ - echo "**** cleanup ****" && \ - rm -rf \ - /tmp/* - -# add local files -COPY /root / - -# ports and volumes -EXPOSE 3000 -VOLUME /config diff --git a/Jenkinsfile b/Jenkinsfile index 1fc1ad72c..77d5d1841 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,7 @@ pipeline { } // Input to determine if this is a package check parameters { - string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK') + string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK') } // Configuration for the variables used for this specific repo environment { @@ -16,35 +16,123 @@ pipeline { GITHUB_TOKEN=credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab') GITLAB_TOKEN=credentials('b6f0f1dd-6952-4cf6-95d1-9c06380283f0') GITLAB_NAMESPACE=credentials('gitlab-namespace-id') - BUILD_VERSION_ARG = 'XFCE_VERSION' + DOCKERHUB_TOKEN=credentials('docker-hub-ci-pat') + QUAYIO_API_TOKEN=credentials('quayio-repo-api-token') + GIT_SIGNING_KEY=credentials('484fbca6-9a4f-455e-b9e3-97ac98785f5f') + BUILD_VERSION_ARG = 'KDE_VERSION' LS_USER = 'linuxserver' LS_REPO = 'docker-webtop' CONTAINER_NAME = 'webtop' DOCKERHUB_IMAGE = 'linuxserver/webtop' DEV_DOCKERHUB_IMAGE = 'lsiodev/webtop' PR_DOCKERHUB_IMAGE = 'lspipepr/webtop' - DIST_IMAGE = 'alpine' - DIST_TAG = '3.13' - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.13/community/' - DIST_REPO_PACKAGES = 'xfce4' + DIST_IMAGE = 'arch' MULTIARCH = 'true' CI = 'true' CI_WEB = 'true' - CI_PORT = '3000' - CI_SSL = 'false' + CI_PORT = '3001' + CI_SSL = 'true' CI_DELAY = '120' + CI_WEB_SCREENSHOT_DELAY = '30' CI_DOCKERENV = 'TZ=US/Pacific' CI_AUTH = 'user:password' CI_WEBPATH = '' } stages { + stage("Set git config"){ + steps{ + sh '''#!/bin/bash + cat ${GIT_SIGNING_KEY} > /config/.ssh/id_sign + chmod 600 /config/.ssh/id_sign + ssh-keygen -y -f /config/.ssh/id_sign > /config/.ssh/id_sign.pub + echo "Using $(ssh-keygen -lf /config/.ssh/id_sign) to sign commits" + git config --global gpg.format ssh + git config --global user.signingkey /config/.ssh/id_sign + git config --global commit.gpgsign true + ''' + } + } + /* ############################ + Bash Function For GHCR Retry + ############################ */ + // Create a reusable script for a ghcr retry bash function + stage("Create Bash Function"){ + steps{ + sh '''#! /bin/bash + # create our retry function + retry_ghcr() { + local max_attempts=7 + local base_delay=10 + local max_delay=90 + local attempt=1 + local errfile exit_code delay pause + errfile=$(mktemp) + while true; do + # run inside an if so a caller's set -e cannot abort before we get to retry + if "$@" 2> >(tee "${errfile}" >&2); then + exit_code=0 + else + exit_code=$? + fi + # make sure tee has finished writing before we read the file + wait $! 2>/dev/null || true + if [[ "${exit_code}" == "0" ]]; then + rm -f "${errfile}" + return 0 + elif ! grep -q -i -E "retry-after:|toomanyrequests|too many requests" "${errfile}"; then + rm -f "${errfile}" + return "${exit_code}" + elif (( attempt >= max_attempts )); then + rm -f "${errfile}" + echo "retry: $* failed after ${attempt} attempts (exit ${exit_code})" >&2 + return "${exit_code}" + else + # exponential delay: base * 2^(attempt-1), capped at max_delay + delay=$(( base_delay * 2 ** (attempt - 1) )) + (( delay > max_delay )) && delay="${max_delay}" + # jitter between half and full delay so parallel builds spread out + pause=$(( delay / 2 + RANDOM % (delay / 2 + 1) )) + echo "retry: attempt ${attempt}/${max_attempts} failed (exit ${exit_code}); waiting ${pause}s..." >&2 + sleep "${pause}" + ((attempt++)) + fi + done + } + + declare -f retry_ghcr > ${WORKSPACE}/retry_ghcr.sh + ''' + } + } // Setup all the basic environment variables needed for the build stage("Set ENV Variables base"){ steps{ + echo "Running on node: ${NODE_NAME}" + sh '''#! /bin/bash + echo "Pruning builder" + docker builder prune -f --builder container || : + containers=$(docker ps -q) + if [[ -n "${containers}" ]]; then + BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit') + for container in ${containers}; do + if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then + echo "skipping buildx container in docker stop" + else + echo "Stopping container ${container}" + docker stop ${container} + fi + done + fi + docker system prune -f --volumes || : + docker image prune -af || : + ''' script{ env.EXIT_STATUS = '' + env.CI_TEST_ATTEMPTED = '' + env.PUSH_ATTEMPTED = '' env.LS_RELEASE = sh( - script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':latest 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', + script: '''#! /bin/bash + source ${WORKSPACE}/retry_ghcr.sh + retry_ghcr docker run --rm quay.io/skopeo/stable:v1 inspect docker://ghcr.io/${LS_USER}/${CONTAINER_NAME}:arch-kde | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''', returnStdout: true).trim() env.LS_RELEASE_NOTES = sh( script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''', @@ -55,11 +143,24 @@ pipeline { env.COMMIT_SHA = sh( script: '''git rev-parse HEAD''', returnStdout: true).trim() + env.GH_DEFAULT_BRANCH = sh( + script: '''git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||' ''', + returnStdout: true).trim() env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/' env.PULL_REQUEST = env.CHANGE_ID - env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.md ./.github/ISSUE_TEMPLATE/issue.feature.md ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/stale.yml ./.github/workflows/external_trigger.yml ./.github/workflows/package_trigger.yml' + env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig AGENTS.md ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml' + if ( env.SYFT_IMAGE_TAG == null ) { + env.SYFT_IMAGE_TAG = 'latest' + } + if ( env.GITLAB_TIMEOUT == null ) { + env.GITLAB_TIMEOUT = '600' + } } + echo "Using syft image tag ${SYFT_IMAGE_TAG}" + echo "Using gitlab registry timeout ${GITLAB_TIMEOUT}" + sh '''#! /bin/bash + echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" ''' script{ env.LS_RELEASE_NUMBER = sh( script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''', @@ -68,7 +169,7 @@ pipeline { script{ env.LS_TAG_NUMBER = sh( script: '''#! /bin/bash - tagsha=$(git rev-list -n 1 ${LS_RELEASE} 2>/dev/null) + tagsha=$(git rev-list -n 1 arch-kde-${LS_RELEASE} 2>/dev/null) if [ "${tagsha}" == "${COMMIT_SHA}" ]; then echo ${LS_RELEASE_NUMBER} elif [ -z "${GIT_COMMIT}" ]; then @@ -101,15 +202,14 @@ pipeline { /* ######################## External Release Tagging ######################## */ - // If this is an alpine repo change for external version determine an md5 from the version string - stage("Set tag Alpine Repo"){ + // If this is a custom command to determine version use that command + stage("Set tag custom bash"){ steps{ script{ env.EXT_RELEASE = sh( - script: '''curl -sL "${DIST_REPO}x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \ - && awk '/^P:'"${DIST_REPO_PACKAGES}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ''', + script: ''' curl -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith("arch-"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||' ''', returnStdout: true).trim() - env.RELEASE_LINK = 'alpine_repo' + env.RELEASE_LINK = 'custom_command' } } } @@ -118,15 +218,39 @@ pipeline { steps{ script{ env.EXT_RELEASE_CLEAN = sh( - script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g' ''', + script: '''echo ${EXT_RELEASE} | sed 's/[~,%@+;:/ ]//g' ''', returnStdout: true).trim() + + def semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)\.(\d+)/ + if (semver.find()) { + env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}" + } else { + semver = env.EXT_RELEASE_CLEAN =~ /(\d+)\.(\d+)(?:\.(\d+))?(.*)/ + if (semver.find()) { + if (semver[0][3]) { + env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${semver[0][3]}" + } else if (!semver[0][3] && !semver[0][4]) { + env.SEMVER = "${semver[0][1]}.${semver[0][2]}.${(new Date()).format('YYYYMMdd')}" + } + } + } + + if (env.SEMVER != null) { + if (BRANCH_NAME != "${env.GH_DEFAULT_BRANCH}") { + env.SEMVER = "${env.SEMVER}-${BRANCH_NAME}" + } + println("SEMVER: ${env.SEMVER}") + } else { + println("No SEMVER detected") + } + } } } - // If this is a master build use live docker endpoints + // If this is a arch-kde build use live docker endpoints stage("Set ENV live build"){ when { - branch "master" + branch "arch-kde" environment name: 'CHANGE_ID', value: '' } steps { @@ -134,21 +258,24 @@ pipeline { env.IMAGE = env.DOCKERHUB_IMAGE env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/' + env.CONTAINER_NAME env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME + env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'amd64-arch-kde-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-arch-kde-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } else { - env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.CI_TAGS = 'arch-kde-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER - env.META_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER - env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'arch-kde-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + env.EXT_RELEASE_TAG = 'arch-kde-version-' + env.EXT_RELEASE_CLEAN + env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' + env.CITEST_IMAGETAG = 'latest' } } } // If this is a dev build use dev docker endpoints stage("Set ENV dev build"){ when { - not {branch "master"} + not {branch "arch-kde"} environment name: 'CHANGE_ID', value: '' } steps { @@ -156,15 +283,18 @@ pipeline { env.IMAGE = env.DEV_DOCKERHUB_IMAGE env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lsiodev-' + env.CONTAINER_NAME env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME + env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'amd64-arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } else { - env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.CI_TAGS = 'arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA } env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA - env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA - env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN + env.META_TAG = 'arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + env.EXT_RELEASE_TAG = 'arch-kde-version-' + env.EXT_RELEASE_CLEAN env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/' + env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' + env.CITEST_IMAGETAG = 'develop' } } } @@ -178,16 +308,19 @@ pipeline { env.IMAGE = env.PR_DOCKERHUB_IMAGE env.GITHUBIMAGE = 'ghcr.io/' + env.LS_USER + '/lspipepr-' + env.CONTAINER_NAME env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME + env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME if (env.MULTIARCH == 'true') { - env.CI_TAGS = 'amd64-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'amd64-arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + '|arm64v8-arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST } else { - env.CI_TAGS = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + env.CI_TAGS = 'arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST } - env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST - env.META_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST - env.EXT_RELEASE_TAG = 'version-' + env.EXT_RELEASE_CLEAN + env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + env.META_TAG = 'arch-kde-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '-pr-' + env.PULL_REQUEST + env.EXT_RELEASE_TAG = 'arch-kde-version-' + env.EXT_RELEASE_CLEAN env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/' + env.BUILDCACHE = 'docker.io/lsiodev/buildcache,registry.gitlab.com/linuxserver.io/docker-jenkins-builder/lsiodev-buildcache,ghcr.io/linuxserver/lsiodev-buildcache,quay.io/linuxserver.io/lsiodev-buildcache' + env.CITEST_IMAGETAG = 'develop' } } } @@ -204,26 +337,27 @@ pipeline { script{ env.SHELLCHECK_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/shellcheck-result.xml' } - sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-shellcheck/master/checkrun.sh | /bin/bash''' + sh '''curl -sL https://raw.githubusercontent.com/linuxserver/docker-jenkins-builder/master/checkrun.sh | /bin/bash''' sh '''#! /bin/bash - set -e - docker pull ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest + source ${WORKSPACE}/retry_ghcr.sh + retry_ghcr docker pull ghcr.io/linuxserver/baseimage-alpine:3.23 docker run --rm \ - -e DESTINATION=\"${IMAGE}/${META_TAG}/shellcheck-result.xml\" \ - -e FILE_NAME="shellcheck-result.xml" \ - -e MIMETYPE="text/xml" \ - -v ${WORKSPACE}:/mnt \ - -e SECRET_KEY=\"${S3_SECRET}\" \ - -e ACCESS_KEY=\"${S3_KEY}\" \ - -t ghcr.io/linuxserver/lsiodev-spaces-file-upload:latest \ - python /upload.py''' + -v ${WORKSPACE}:/mnt \ + -e AWS_ACCESS_KEY_ID=\"${S3_KEY}\" \ + -e AWS_SECRET_ACCESS_KEY=\"${S3_SECRET}\" \ + ghcr.io/linuxserver/baseimage-alpine:3.23 s6-envdir -fn -- /var/run/s6/container_environment /bin/bash -c "\ + apk add --no-cache python3 && \ + python3 -m venv /lsiopy && \ + pip install --no-cache-dir -U pip && \ + pip install --no-cache-dir s3cmd && \ + s3cmd put --no-preserve --acl-public -m text/xml /mnt/shellcheck-result.xml s3://ci-tests.linuxserver.io/${IMAGE}/${META_TAG}/shellcheck-result.xml" || :''' } } } // Use helper containers to render templated files stage('Update-Templates') { when { - branch "master" + branch "arch-kde" environment name: 'CHANGE_ID', value: '' expression { env.CONTAINER_NAME != null @@ -233,27 +367,36 @@ pipeline { sh '''#! /bin/bash set -e TEMPDIR=$(mktemp -d) - docker pull ghcr.io/linuxserver/jenkins-builder:latest - docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest - # Stage 1 - Jenkinsfile update + source ${WORKSPACE}/retry_ghcr.sh + retry_ghcr docker pull ghcr.io/linuxserver/jenkins-builder:latest + # Cloned repo paths for templating: + # ${TEMPDIR}/docker-${CONTAINER_NAME}: Cloned branch arch-kde of ${LS_USER}/${LS_REPO} for running the jenkins builder on + # ${TEMPDIR}/repo/${LS_REPO}: Cloned branch arch-kde of ${LS_USER}/${LS_REPO} for commiting various templated file changes and pushing back to Github + # ${TEMPDIR}/docs/docker-documentation: Cloned docs repo for pushing docs updates to Github + # ${TEMPDIR}/unraid/docker-templates: Cloned docker-templates repo to check for logos + # ${TEMPDIR}/unraid/templates: Cloned templates repo for commiting unraid template changes and pushing back to Github + git clone --branch arch-kde --depth 1 https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/docker-${CONTAINER_NAME} + docker run --rm -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/tmp -e LOCAL=true -e PUID=$(id -u) -e PGID=$(id -g) ghcr.io/linuxserver/jenkins-builder:latest + echo "Starting Stage 1 - Jenkinsfile update" if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f master + git checkout -f arch-kde cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/ git add Jenkinsfile git commit -m 'Bot Updating Templated Files' - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} - echo "Updating Jenkinsfile" + echo "Updating Jenkinsfile and exiting build, new one will trigger based on commit" rm -Rf ${TEMPDIR} exit 0 else echo "Jenkinsfile is up to date." fi - # Stage 2 - Delete old templates - OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md" + echo "Starting Stage 2 - Delete old templates" + OLD_TEMPLATES=".github/ISSUE_TEMPLATE.md .github/ISSUE_TEMPLATE/issue.bug.md .github/ISSUE_TEMPLATE/issue.feature.md .github/workflows/call_invalid_helper.yml .github/workflows/stale.yml .github/workflows/package_trigger.yml" for i in ${OLD_TEMPLATES}; do if [[ -f "${i}" ]]; then TEMPLATES_TO_DELETE="${i} ${TEMPLATES_TO_DELETE}" @@ -263,20 +406,21 @@ pipeline { mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f master + git checkout -f arch-kde for i in ${TEMPLATES_TO_DELETE}; do git rm "${i}" done git commit -m 'Bot Updating Templated Files' - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} - echo "Deleting old templates" + echo "Deleting old/deprecated templates and exiting build, new one will trigger based on commit" rm -Rf ${TEMPDIR} exit 0 else echo "No templates to delete" fi - # Stage 3 - Update templates + echo "Starting Stage 3 - Update templates" CURRENTHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8) cd ${TEMPDIR}/docker-${CONTAINER_NAME} NEWHASH=$(grep -hs ^ ${TEMPLATED_FILES} | md5sum | cut -c1-8) @@ -284,50 +428,75 @@ pipeline { mkdir -p ${TEMPDIR}/repo git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO} cd ${TEMPDIR}/repo/${LS_REPO} - git checkout -f master + git checkout -f arch-kde cd ${TEMPDIR}/docker-${CONTAINER_NAME} mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE cp --parents ${TEMPLATED_FILES} ${TEMPDIR}/repo/${LS_REPO}/ || : + cp --parents readme-vars.yml ${TEMPDIR}/repo/${LS_REPO}/ || : cd ${TEMPDIR}/repo/${LS_REPO}/ if ! grep -q '.jenkins-external' .gitignore 2>/dev/null; then echo ".jenkins-external" >> .gitignore git add .gitignore fi - git add ${TEMPLATED_FILES} + git add readme-vars.yml ${TEMPLATED_FILES} git commit -m 'Bot Updating Templated Files' - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} + echo "Updating templates and exiting build, new one will trigger based on commit" + rm -Rf ${TEMPDIR} + exit 0 else echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER} + echo "No templates to update" fi - mkdir -p ${TEMPDIR}/gitbook - git clone https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/gitbook/docker-documentation - if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/gitbook/docker-documentation/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then - cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/gitbook/docker-documentation/images/ - cd ${TEMPDIR}/gitbook/docker-documentation/ - git add images/docker-${CONTAINER_NAME}.md + echo "Starting Stage 4 - External repo updates: Docs, Unraid Template and Readme Sync to Docker Hub" + mkdir -p ${TEMPDIR}/docs + git clone --depth=1 https://github.com/linuxserver/docker-documentation.git ${TEMPDIR}/docs/docker-documentation + if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]] && [[ (! -f ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md) || ("$(md5sum ${TEMPDIR}/docs/docker-documentation/docs/images/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md | awk '{ print $1 }')") ]]; then + cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/docker-${CONTAINER_NAME}.md ${TEMPDIR}/docs/docker-documentation/docs/images/ + cd ${TEMPDIR}/docs/docker-documentation + GH_DOCS_DEFAULT_BRANCH=$(git remote show origin | grep "HEAD branch:" | sed 's|.*HEAD branch: ||') + git add docs/images/docker-${CONTAINER_NAME}.md + echo "Updating docs repo" git commit -m 'Bot Updating Documentation' - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git --all - fi - mkdir -p ${TEMPDIR}/unraid - git clone https://github.com/linuxserver/docker-templates.git ${TEMPDIR}/unraid/docker-templates - git clone https://github.com/linuxserver/templates.git ${TEMPDIR}/unraid/templates - if [[ -f ${TEMPDIR}/unraid/docker-templates/linuxserver.io/img/${CONTAINER_NAME}-logo.png ]]; then - sed -i "s|master/linuxserver.io/img/linuxserver-ls-logo.png|master/linuxserver.io/img/${CONTAINER_NAME}-logo.png|" ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} || \ + (MAXWAIT="10" && echo "Push to docs failed, trying again in ${MAXWAIT} seconds" && \ + sleep $((RANDOM % MAXWAIT)) && \ + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH} --rebase && \ + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/docker-documentation.git ${GH_DOCS_DEFAULT_BRANCH}) + else + echo "Docs update not needed, skipping" fi - if [[ ("${BRANCH_NAME}" == "master") || ("${BRANCH_NAME}" == "main") ]] && [[ (! -f ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml) || ("$(md5sum ${TEMPDIR}/unraid/templates/unraid/${CONTAINER_NAME}.xml | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml | awk '{ print $1 }')") ]]; then - cd ${TEMPDIR}/unraid/templates/ - if grep -wq "${CONTAINER_NAME}" ${TEMPDIR}/unraid/templates/unraid/ignore.list; then - echo "Image is on the ignore list, removing Unraid template" - git rm unraid/${CONTAINER_NAME}.xml || : - git commit -m 'Bot Removing Deprecated Unraid Template' || : + if [[ "${BRANCH_NAME}" == "${GH_DEFAULT_BRANCH}" ]]; then + if [[ $(cat ${TEMPDIR}/docker-${CONTAINER_NAME}/README.md | wc -m) -gt 25000 ]]; then + echo "Readme is longer than 25,000 characters. Syncing the lite version to Docker Hub" + DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/README.lite" else - cp ${TEMPDIR}/docker-${CONTAINER_NAME}/.jenkins-external/${CONTAINER_NAME}.xml ${TEMPDIR}/unraid/templates/unraid/ - git add unraid/${CONTAINER_NAME}.xml - git commit -m 'Bot Updating Unraid Template' + echo "Syncing readme to Docker Hub" + DH_README_SYNC_PATH="${TEMPDIR}/docker-${CONTAINER_NAME}/README.md" fi - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/linuxserver/templates.git --all + if curl -s https://hub.docker.com/v2/namespaces/${DOCKERHUB_IMAGE%%/*}/repositories/${DOCKERHUB_IMAGE##*/}/tags | jq -r '.message' | grep -q 404; then + echo "Docker Hub endpoint doesn't exist. Creating endpoint first." + DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token') + curl -s \ + -H "Authorization: JWT ${DH_TOKEN}" \ + -H "Content-Type: application/json" \ + -X POST \ + -d '{"name":"'${DOCKERHUB_IMAGE##*/}'", "namespace":"'${DOCKERHUB_IMAGE%%/*}'"}' \ + https://hub.docker.com/v2/repositories/ || : + fi + DH_TOKEN=$(curl -d '{"username":"linuxserverci", "password":"'${DOCKERHUB_TOKEN}'"}' -H "Content-Type: application/json" -X POST https://hub.docker.com/v2/users/login | jq -r '.token') + curl -s \ + -H "Authorization: JWT ${DH_TOKEN}" \ + -H "Content-Type: application/json" \ + -X PATCH \ + -d "{\\"full_description\\":$(jq -Rsa . ${DH_README_SYNC_PATH})}" \ + https://hub.docker.com/v2/repositories/${DOCKERHUB_IMAGE} || : + else + echo "Not the default Github branch. Skipping readme sync to Docker Hub." fi rm -Rf ${TEMPDIR}''' script{ @@ -340,7 +509,7 @@ pipeline { // Exit the build if the Templated files were just updated stage('Template-exit') { when { - branch "master" + branch "arch-kde" environment name: 'CHANGE_ID', value: '' environment name: 'FILES_UPDATED', value: 'true' expression { @@ -353,24 +522,48 @@ pipeline { } } } + // If this is a arch-kde build check the S6 service file perms + stage("Check S6 Service file Permissions"){ + when { + branch "arch-kde" + environment name: 'CHANGE_ID', value: '' + environment name: 'EXIT_STATUS', value: '' + } + steps { + script{ + sh '''#! /bin/bash + WRONG_PERM=$(find ./ -path "./.git" -prune -o \\( -name "run" -o -name "finish" -o -name "check" \\) -not -perm -u=x,g=x,o=x -print) + if [[ -n "${WRONG_PERM}" ]]; then + echo "The following S6 service files are missing the executable bit; canceling the faulty build: ${WRONG_PERM}" + exit 1 + else + echo "S6 service file perms look good." + fi ''' + } + } + } /* ####################### - GitLab Mirroring + GitLab Mirroring and Quay.io Repo Visibility ####################### */ - // Ping into Gitlab to mirror this repo and have a registry endpoint - stage("GitLab Mirror"){ + // Ping into Gitlab to mirror this repo and have a registry endpoint & mark this repo on Quay.io as public + stage("GitLab Mirror and Quay.io Visibility"){ when { environment name: 'EXIT_STATUS', value: '' } steps{ sh '''curl -H "Content-Type: application/json" -H "Private-Token: ${GITLAB_TOKEN}" -X POST https://gitlab.com/api/v4/projects \ - -d '{"namespace_id":'${GITLAB_NAMESPACE}',\ - "name":"'${LS_REPO}'", - "mirror":true,\ - "import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\ - "issues_access_level":"disabled",\ - "merge_requests_access_level":"disabled",\ - "repository_access_level":"enabled",\ - "visibility":"public"}' ''' + -d '{"namespace_id":'${GITLAB_NAMESPACE}',\ + "name":"'${LS_REPO}'", + "mirror":true,\ + "import_url":"https://github.com/linuxserver/'${LS_REPO}'.git",\ + "issues_access_level":"disabled",\ + "merge_requests_access_level":"disabled",\ + "repository_access_level":"enabled",\ + "visibility":"public"}' ''' + sh '''curl -H "Private-Token: ${GITLAB_TOKEN}" -X PUT "https://gitlab.com/api/v4/projects/Linuxserver.io%2F${LS_REPO}" \ + -d "mirror=true&import_url=https://github.com/linuxserver/${LS_REPO}.git" ''' + sh '''curl -H "Content-Type: application/json" -H "Authorization: Bearer ${QUAYIO_API_TOKEN}" -X POST "https://quay.io/api/v1/repository${QUAYIMAGE/quay.io/}/changevisibility" \ + -d '{"visibility":"public"}' ||: ''' } } /* ############### @@ -380,27 +573,85 @@ pipeline { stage('Build-Single') { when { expression { - env.MULTIARCH == 'false' || params.PACKAGE_CHECK == 'true' + env.MULTIARCH == 'false' || params.PACKAGE_CHECK == 'true' } environment name: 'EXIT_STATUS', value: '' } steps { echo "Running on node: ${NODE_NAME}" - sh "docker build \ - --label \"org.opencontainers.image.created=${GITHUB_DATE}\" \ - --label \"org.opencontainers.image.authors=linuxserver.io\" \ - --label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-webtop/packages\" \ - --label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-webtop\" \ - --label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-webtop\" \ - --label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \ - --label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.vendor=linuxserver.io\" \ - --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ - --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.title=Webtop\" \ - --label \"org.opencontainers.image.description=[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine and Ubuntu based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. \" \ - --no-cache --pull -t ${IMAGE}:${META_TAG} \ - --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." + sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile" + sh '''#! /bin/bash + source ${WORKSPACE}/retry_ghcr.sh + retry_ghcr docker buildx build \ + --label "org.opencontainers.image.created=${GITHUB_DATE}" \ + --label "org.opencontainers.image.authors=linuxserver.io" \ + --label "org.opencontainers.image.url=https://github.com/linuxserver/docker-webtop/packages" \ + --label "org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-webtop" \ + --label "org.opencontainers.image.source=https://github.com/linuxserver/docker-webtop" \ + --label "org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}" \ + --label "org.opencontainers.image.revision=${COMMIT_SHA}" \ + --label "org.opencontainers.image.vendor=linuxserver.io" \ + --label "org.opencontainers.image.licenses=GPL-3.0-only" \ + --label "org.opencontainers.image.ref.name=${COMMIT_SHA}" \ + --label "org.opencontainers.image.title=Webtop" \ + --label "org.opencontainers.image.description=webtop image by linuxserver.io" \ + --no-cache --pull -t ${IMAGE}:${META_TAG} --platform=linux/amd64 \ + --provenance=true --sbom=false --builder=container --load \ + --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION="${VERSION_TAG}" --build-arg BUILD_DATE=${GITHUB_DATE} . + ''' + sh '''#! /bin/bash + set -e + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + docker tag ${IMAGE}:${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} + done + ''' + withCredentials([ + [ + $class: 'UsernamePasswordMultiBinding', + credentialsId: 'Quay.io-Robot', + usernameVariable: 'QUAYUSER', + passwordVariable: 'QUAYPASS' + ] + ]) { + retry_backoff(5,5) { + sh '''#! /bin/bash + set -e + # run a registry.gitlab.com command under what is left of the gitlab time budget + gitlab_timeout() { + local remaining=$(( GITLAB_DEADLINE - SECONDS )) + if (( remaining <= 0 )); then + echo "gitlab timeout budget of ${GITLAB_TIMEOUT}s used up, skipping: $*" >&2 + return 124 + fi + timeout "${remaining}" "$@" + } + GITLAB_DEADLINE=$(( SECONDS + GITLAB_TIMEOUT )) + + echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin + echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin + echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin + echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin + + if [[ "${PACKAGE_CHECK}" != "true" ]]; then + declare -A pids + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + if [[ "${i}" == *"registry.gitlab.com"* ]]; then + TIMEOUT_CMD="gitlab_timeout" + else + TIMEOUT_CMD="" + fi + ${TIMEOUT_CMD} docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} & + pids[$!]="$i" + done + for p in "${!pids[@]}"; do + wait "$p" || { if [[ "${pids[$p]}" != *"quay.io"* && "${pids[$p]}" != *"registry.gitlab.com"* ]]; then exit 1; fi; } + done + fi + ''' + } + } } } // Build MultiArch Docker containers for push to LS Repo @@ -416,55 +667,79 @@ pipeline { stage('Build X86') { steps { echo "Running on node: ${NODE_NAME}" - sh "docker build \ - --label \"org.opencontainers.image.created=${GITHUB_DATE}\" \ - --label \"org.opencontainers.image.authors=linuxserver.io\" \ - --label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-webtop/packages\" \ - --label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-webtop\" \ - --label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-webtop\" \ - --label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \ - --label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.vendor=linuxserver.io\" \ - --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ - --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.title=Webtop\" \ - --label \"org.opencontainers.image.description=[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine and Ubuntu based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. \" \ - --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} \ - --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." - } - } - stage('Build ARMHF') { - agent { - label 'ARMHF' - } - steps { - echo "Running on node: ${NODE_NAME}" - echo 'Logging into Github' + sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile" sh '''#! /bin/bash - echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin + source ${WORKSPACE}/retry_ghcr.sh + retry_ghcr docker buildx build \ + --label "org.opencontainers.image.created=${GITHUB_DATE}" \ + --label "org.opencontainers.image.authors=linuxserver.io" \ + --label "org.opencontainers.image.url=https://github.com/linuxserver/docker-webtop/packages" \ + --label "org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-webtop" \ + --label "org.opencontainers.image.source=https://github.com/linuxserver/docker-webtop" \ + --label "org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}" \ + --label "org.opencontainers.image.revision=${COMMIT_SHA}" \ + --label "org.opencontainers.image.vendor=linuxserver.io" \ + --label "org.opencontainers.image.licenses=GPL-3.0-only" \ + --label "org.opencontainers.image.ref.name=${COMMIT_SHA}" \ + --label "org.opencontainers.image.title=Webtop" \ + --label "org.opencontainers.image.description=webtop image by linuxserver.io" \ + --no-cache --pull -t ${IMAGE}:amd64-${META_TAG} --platform=linux/amd64 \ + --provenance=true --sbom=false --builder=container --load \ + --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION="${VERSION_TAG}" --build-arg BUILD_DATE=${GITHUB_DATE} . + ''' + sh '''#! /bin/bash + set -e + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + docker tag ${IMAGE}:amd64-${META_TAG} ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} + done ''' - sh "docker build \ - --label \"org.opencontainers.image.created=${GITHUB_DATE}\" \ - --label \"org.opencontainers.image.authors=linuxserver.io\" \ - --label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-webtop/packages\" \ - --label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-webtop\" \ - --label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-webtop\" \ - --label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \ - --label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.vendor=linuxserver.io\" \ - --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ - --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.title=Webtop\" \ - --label \"org.opencontainers.image.description=[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine and Ubuntu based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. \" \ - --no-cache --pull -f Dockerfile.armhf -t ${IMAGE}:arm32v7-${META_TAG} \ - --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." - sh "docker tag ${IMAGE}:arm32v7-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}" - retry(5) { - sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER}" + withCredentials([ + [ + $class: 'UsernamePasswordMultiBinding', + credentialsId: 'Quay.io-Robot', + usernameVariable: 'QUAYUSER', + passwordVariable: 'QUAYPASS' + ] + ]) { + retry_backoff(5,5) { + sh '''#! /bin/bash + set -e + # run a registry.gitlab.com command under what is left of the gitlab time budget + gitlab_timeout() { + local remaining=$(( GITLAB_DEADLINE - SECONDS )) + if (( remaining <= 0 )); then + echo "gitlab timeout budget of ${GITLAB_TIMEOUT}s used up, skipping: $*" >&2 + return 124 + fi + timeout "${remaining}" "$@" + } + GITLAB_DEADLINE=$(( SECONDS + GITLAB_TIMEOUT )) + + echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin + echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin + echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin + echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin + + if [[ "${PACKAGE_CHECK}" != "true" ]]; then + declare -A pids + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + if [[ "${i}" == *"registry.gitlab.com"* ]]; then + TIMEOUT_CMD="gitlab_timeout" + else + TIMEOUT_CMD="" + fi + ${TIMEOUT_CMD} docker push ${i}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} & + pids[$!]="$i" + done + for p in "${!pids[@]}"; do + wait "$p" || { if [[ "${pids[$p]}" != *"quay.io"* && "${pids[$p]}" != *"registry.gitlab.com"* ]]; then exit 1; fi; } + done + fi + ''' + } } - sh '''docker rmi \ - ${IMAGE}:arm32v7-${META_TAG} \ - ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} || :''' } } stage('Build ARM64') { @@ -473,32 +748,125 @@ pipeline { } steps { echo "Running on node: ${NODE_NAME}" - echo 'Logging into Github' + sh "sed -r -i 's|(^FROM .*)|\\1\\n\\nENV LSIO_FIRST_PARTY=true|g' Dockerfile.aarch64" + sh '''#! /bin/bash + # create our retry function + retry_ghcr() { + local max_attempts=7 + local base_delay=10 + local max_delay=90 + local attempt=1 + local errfile exit_code delay pause + errfile=$(mktemp) + while true; do + # run inside an if so a caller's set -e cannot abort before we get to retry + if "$@" 2> >(tee "${errfile}" >&2); then + exit_code=0 + else + exit_code=$? + fi + # make sure tee has finished writing before we read the file + wait $! 2>/dev/null || true + if [[ "${exit_code}" == "0" ]]; then + rm -f "${errfile}" + return 0 + elif ! grep -q -i -E "retry-after:|toomanyrequests|too many requests" "${errfile}"; then + rm -f "${errfile}" + return "${exit_code}" + elif (( attempt >= max_attempts )); then + rm -f "${errfile}" + echo "retry: $* failed after ${attempt} attempts (exit ${exit_code})" >&2 + return "${exit_code}" + else + # exponential delay: base * 2^(attempt-1), capped at max_delay + delay=$(( base_delay * 2 ** (attempt - 1) )) + (( delay > max_delay )) && delay="${max_delay}" + # jitter between half and full delay so parallel builds spread out + pause=$(( delay / 2 + RANDOM % (delay / 2 + 1) )) + echo "retry: attempt ${attempt}/${max_attempts} failed (exit ${exit_code}); waiting ${pause}s..." >&2 + sleep "${pause}" + ((attempt++)) + fi + done + } + + retry_ghcr docker buildx build \ + --label "org.opencontainers.image.created=${GITHUB_DATE}" \ + --label "org.opencontainers.image.authors=linuxserver.io" \ + --label "org.opencontainers.image.url=https://github.com/linuxserver/docker-webtop/packages" \ + --label "org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-webtop" \ + --label "org.opencontainers.image.source=https://github.com/linuxserver/docker-webtop" \ + --label "org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}" \ + --label "org.opencontainers.image.revision=${COMMIT_SHA}" \ + --label "org.opencontainers.image.vendor=linuxserver.io" \ + --label "org.opencontainers.image.licenses=GPL-3.0-only" \ + --label "org.opencontainers.image.ref.name=${COMMIT_SHA}" \ + --label "org.opencontainers.image.title=Webtop" \ + --label "org.opencontainers.image.description=webtop image by linuxserver.io" \ + --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} --platform=linux/arm64 \ + --provenance=true --sbom=false --builder=container --load \ + --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION="${VERSION_TAG}" --build-arg BUILD_DATE=${GITHUB_DATE} . + ''' sh '''#! /bin/bash - echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin + set -e + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + docker tag ${IMAGE}:arm64v8-${META_TAG} ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} + done ''' - sh "docker build \ - --label \"org.opencontainers.image.created=${GITHUB_DATE}\" \ - --label \"org.opencontainers.image.authors=linuxserver.io\" \ - --label \"org.opencontainers.image.url=https://github.com/linuxserver/docker-webtop/packages\" \ - --label \"org.opencontainers.image.documentation=https://docs.linuxserver.io/images/docker-webtop\" \ - --label \"org.opencontainers.image.source=https://github.com/linuxserver/docker-webtop\" \ - --label \"org.opencontainers.image.version=${EXT_RELEASE_CLEAN}-ls${LS_TAG_NUMBER}\" \ - --label \"org.opencontainers.image.revision=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.vendor=linuxserver.io\" \ - --label \"org.opencontainers.image.licenses=GPL-3.0-only\" \ - --label \"org.opencontainers.image.ref.name=${COMMIT_SHA}\" \ - --label \"org.opencontainers.image.title=Webtop\" \ - --label \"org.opencontainers.image.description=[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine and Ubuntu based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. \" \ - --no-cache --pull -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \ - --build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${VERSION_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ." - sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}" - retry(5) { - sh "docker push ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}" + withCredentials([ + [ + $class: 'UsernamePasswordMultiBinding', + credentialsId: 'Quay.io-Robot', + usernameVariable: 'QUAYUSER', + passwordVariable: 'QUAYPASS' + ] + ]) { + retry_backoff(5,5) { + sh '''#! /bin/bash + set -e + # run a registry.gitlab.com command under what is left of the gitlab time budget + gitlab_timeout() { + local remaining=$(( GITLAB_DEADLINE - SECONDS )) + if (( remaining <= 0 )); then + echo "gitlab timeout budget of ${GITLAB_TIMEOUT}s used up, skipping: $*" >&2 + return 124 + fi + timeout "${remaining}" "$@" + } + GITLAB_DEADLINE=$(( SECONDS + GITLAB_TIMEOUT )) + + echo $DOCKERHUB_TOKEN | docker login -u linuxserverci --password-stdin + echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin + echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin + echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin + if [[ "${PACKAGE_CHECK}" != "true" ]]; then + declare -A pids + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + if [[ "${i}" == *"registry.gitlab.com"* ]]; then + TIMEOUT_CMD="gitlab_timeout" + else + TIMEOUT_CMD="" + fi + ${TIMEOUT_CMD} docker push ${i}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} & + pids[$!]="$i" + done + for p in "${!pids[@]}"; do + wait "$p" || { if [[ "${pids[$p]}" != *"quay.io"* && "${pids[$p]}" != *"registry.gitlab.com"* ]]; then exit 1; fi; } + done + fi + ''' + } } - sh '''docker rmi \ - ${IMAGE}:arm64v8-${META_TAG} \ - ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || :''' + sh '''#! /bin/bash + containers=$(docker ps -aq) + if [[ -n "${containers}" ]]; then + docker stop ${containers} + fi + docker system prune -f --volumes || : + docker image prune -af || : + ''' } } } @@ -506,7 +874,7 @@ pipeline { // Take the image we just built and dump package versions for comparison stage('Update-packages') { when { - branch "master" + branch "arch-kde" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } @@ -514,42 +882,31 @@ pipeline { sh '''#! /bin/bash set -e TEMPDIR=$(mktemp -d) - if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then + if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" != "true" ]; then LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG} else LOCAL_CONTAINER=${IMAGE}:${META_TAG} fi - if [ "${DIST_IMAGE}" == "alpine" ]; then - docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - apk info -v > /tmp/package_versions.txt && \ - sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \ - chmod 777 /tmp/package_versions.txt' - elif [ "${DIST_IMAGE}" == "ubuntu" ]; then - docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - apt list -qq --installed | sed "s#/.*now ##g" | cut -d" " -f1 > /tmp/package_versions.txt && \ - sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \ - chmod 777 /tmp/package_versions.txt' - elif [ "${DIST_IMAGE}" == "fedora" ]; then - docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - rpm -qa > /tmp/package_versions.txt && \ - sort -o /tmp/package_versions.txt /tmp/package_versions.txt && \ - chmod 777 /tmp/package_versions.txt' - elif [ "${DIST_IMAGE}" == "arch" ]; then - docker run --rm --entrypoint '/bin/sh' -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} -c '\ - pacman -Q > /tmp/package_versions.txt && \ - chmod 777 /tmp/package_versions.txt' - fi + touch ${TEMPDIR}/package_versions.txt + source ${WORKSPACE}/retry_ghcr.sh + retry_ghcr docker pull ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} + docker run --rm \ + -v /var/run/docker.sock:/var/run/docker.sock:ro \ + -v ${TEMPDIR}:/tmp \ + ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} \ + ${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 ) echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github" if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO} - git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master + git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f arch-kde cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/ cd ${TEMPDIR}/${LS_REPO}/ wait git add package_versions.txt git commit -m 'Bot Updating Package Versions' - git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all + git pull https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde + git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git arch-kde echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER} echo "Package tag updated, stopping build process" else @@ -567,19 +924,12 @@ pipeline { // Exit the build if the package file was just updated stage('PACKAGE-exit') { when { - branch "master" + branch "arch-kde" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'true' environment name: 'EXIT_STATUS', value: '' } steps { - sh '''#! /bin/bash - echo "Packages were updated. Cleaning up the image and exiting." - if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then - docker rmi ${IMAGE}:amd64-${META_TAG} - else - docker rmi ${IMAGE}:${META_TAG} - fi''' script{ env.EXIT_STATUS = 'ABORTED' } @@ -588,7 +938,7 @@ pipeline { // Exit the build if this is just a package check and there are no changes to push stage('PACKAGECHECK-exit') { when { - branch "master" + branch "arch-kde" environment name: 'CHANGE_ID', value: '' environment name: 'PACKAGE_UPDATED', value: 'false' environment name: 'EXIT_STATUS', value: '' @@ -597,13 +947,6 @@ pipeline { } } steps { - sh '''#! /bin/bash - echo "There are no package updates. Cleaning up the image and exiting." - if [ "${MULTIARCH}" == "true" ] && [ "${PACKAGE_CHECK}" == "false" ]; then - docker rmi ${IMAGE}:amd64-${META_TAG} - else - docker rmi ${IMAGE}:${META_TAG} - fi''' script{ env.EXIT_STATUS = 'ABORTED' } @@ -625,23 +968,34 @@ pipeline { ]) { script{ env.CI_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/index.html' + env.CI_JSON_URL = 'https://ci-tests.linuxserver.io/' + env.IMAGE + '/' + env.META_TAG + '/report.json' + env.CI_TEST_ATTEMPTED = 'true' } sh '''#! /bin/bash set -e - docker pull ghcr.io/linuxserver/ci:latest + if grep -q 'docker-baseimage' <<< "${LS_REPO}"; then + echo "Detected baseimage, setting LSIO_FIRST_PARTY=true" + if [ -n "${CI_DOCKERENV}" ]; then + CI_DOCKERENV="LSIO_FIRST_PARTY=true|${CI_DOCKERENV}" + else + CI_DOCKERENV="LSIO_FIRST_PARTY=true" + fi + fi + source ${WORKSPACE}/retry_ghcr.sh + retry_ghcr docker pull ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} if [ "${MULTIARCH}" == "true" ]; then - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} - docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} + retry_ghcr docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} --platform=arm64 docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} fi docker run --rm \ --shm-size=1gb \ -v /var/run/docker.sock:/var/run/docker.sock \ -e IMAGE=\"${IMAGE}\" \ - -e DELAY_START=\"${CI_DELAY}\" \ + -e WEB_SCREENSHOT_DELAY=\"${CI_WEB_SCREENSHOT_DELAY}\" \ + -e DOCKER_LOGS_TIMEOUT=\"${CI_DELAY}\" \ -e TAGS=\"${CI_TAGS}\" \ -e META_TAG=\"${META_TAG}\" \ + -e RELEASE_TAG=\"arch-kde\" \ -e PORT=\"${CI_PORT}\" \ -e SSL=\"${CI_SSL}\" \ -e BASE=\"${DIST_IMAGE}\" \ @@ -651,10 +1005,12 @@ pipeline { -e WEB_SCREENSHOT=\"${CI_WEB}\" \ -e WEB_AUTH=\"${CI_AUTH}\" \ -e WEB_PATH=\"${CI_WEBPATH}\" \ - -e DO_REGION="ams3" \ - -e DO_BUCKET="lsio-ci" \ - -t ghcr.io/linuxserver/ci:latest \ - python /ci/ci.py''' + -e NODE_NAME=\"${NODE_NAME}\" \ + -e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \ + -e COMMIT_SHA=\"${COMMIT_SHA}\" \ + -e BUILD_NUMBER=\"${BUILD_NUMBER}\" \ + -t ghcr.io/linuxserver/ci:${CITEST_IMAGETAG} \ + python3 test_build.py''' } } } @@ -668,38 +1024,44 @@ pipeline { environment name: 'EXIT_STATUS', value: '' } steps { - withCredentials([ - [ - $class: 'UsernamePasswordMultiBinding', - credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207', - usernameVariable: 'DOCKERUSER', - passwordVariable: 'DOCKERPASS' - ] - ]) { - retry(5) { - sh '''#! /bin/bash - set -e - echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin - echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin - echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin - for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do - docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG} - docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:latest - docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG} - docker push ${PUSHIMAGE}:latest - docker push ${PUSHIMAGE}:${META_TAG} - docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG} - done - ''' - } + script{ + env.PUSH_ATTEMPTED = 'true' + } + retry_backoff(5,5) { sh '''#! /bin/bash - for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do - docker rmi \ - ${DELETEIMAGE}:${META_TAG} \ - ${DELETEIMAGE}:${EXT_RELEASE_TAG} \ - ${DELETEIMAGE}:latest || : + set -e + # run a registry.gitlab.com command under what is left of the gitlab time budget + gitlab_timeout() { + local remaining=$(( GITLAB_DEADLINE - SECONDS )) + if (( remaining <= 0 )); then + echo "gitlab timeout budget of ${GITLAB_TIMEOUT}s used up, skipping: $*" >&2 + return 124 + fi + timeout "${remaining}" "$@" + } + GITLAB_DEADLINE=$(( SECONDS + GITLAB_TIMEOUT )) + + for PUSHIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do + if [[ "${PUSHIMAGE}" == "${GITLABIMAGE}" ]]; then + TIMEOUT_CMD="gitlab_timeout" + else + TIMEOUT_CMD="" + fi + [[ ${PUSHIMAGE%%/*} =~ \\. ]] && PUSHIMAGEPLUS="${PUSHIMAGE}" || PUSHIMAGEPLUS="docker.io/${PUSHIMAGE}" + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + if [[ "${PUSHIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then + CACHEIMAGE=${i} + fi + done + ${TIMEOUT_CMD} docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${META_TAG} -t ${PUSHIMAGE}:arch-kde -t ${PUSHIMAGE}:${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" && "${PUSHIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + if [ -n "${SEMVER}" ]; then + ${TIMEOUT_CMD} docker buildx imagetools create --prefer-index=false -t ${PUSHIMAGE}:${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${PUSHIMAGE}" != "${QUAYIMAGE}" && "${PUSHIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + fi done - ''' + ''' } } } @@ -710,87 +1072,76 @@ pipeline { environment name: 'EXIT_STATUS', value: '' } steps { - withCredentials([ - [ - $class: 'UsernamePasswordMultiBinding', - credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207', - usernameVariable: 'DOCKERUSER', - passwordVariable: 'DOCKERPASS' - ] - ]) { - retry(5) { - sh '''#! /bin/bash - set -e - echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin - echo $GITHUB_TOKEN | docker login ghcr.io -u LinuxServer-CI --password-stdin - echo $GITLAB_TOKEN | docker login registry.gitlab.com -u LinuxServer.io --password-stdin - if [ "${CI}" == "false" ]; then - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} - docker pull ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} - docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v7-${META_TAG} - docker tag ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG} + script{ + env.PUSH_ATTEMPTED = 'true' + } + retry_backoff(5,5) { + sh '''#! /bin/bash + set -e + # run a registry.gitlab.com command under what is left of the gitlab time budget + gitlab_timeout() { + local remaining=$(( GITLAB_DEADLINE - SECONDS )) + if (( remaining <= 0 )); then + echo "gitlab timeout budget of ${GITLAB_TIMEOUT}s used up, skipping: $*" >&2 + return 124 + fi + timeout "${remaining}" "$@" + } + GITLAB_DEADLINE=$(( SECONDS + GITLAB_TIMEOUT )) + + for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do + if [[ "${MANIFESTIMAGE}" == "${GITLABIMAGE}" ]]; then + TIMEOUT_CMD="gitlab_timeout" + else + TIMEOUT_CMD="" fi - for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}"; do - docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} - docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-latest - docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-latest - docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-latest - docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} - docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} - docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} - docker push ${MANIFESTIMAGE}:amd64-${META_TAG} - docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG} - docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker push ${MANIFESTIMAGE}:amd64-latest - docker push ${MANIFESTIMAGE}:arm32v7-latest - docker push ${MANIFESTIMAGE}:arm64v8-latest - docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} - docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} - docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} - docker manifest push --purge ${MANIFESTIMAGE}:latest || : - docker manifest create ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:amd64-latest ${MANIFESTIMAGE}:arm32v7-latest ${MANIFESTIMAGE}:arm64v8-latest - docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm32v7-latest --os linux --arch arm - docker manifest annotate ${MANIFESTIMAGE}:latest ${MANIFESTIMAGE}:arm64v8-latest --os linux --arch arm64 --variant v8 - docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || : - docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} - docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm - docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8 - docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} || : - docker manifest create ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} - docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG} --os linux --arch arm - docker manifest annotate ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} --os linux --arch arm64 --variant v8 - docker manifest push --purge ${MANIFESTIMAGE}:latest - docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} - docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} + if [[ "${MANIFESTIMAGE%%/*}" =~ \\. ]]; then + MANIFESTIMAGEPLUS="${MANIFESTIMAGE}" + else + MANIFESTIMAGEPLUS="docker.io/${MANIFESTIMAGE}" + fi + IFS=',' read -ra CACHE <<< "$BUILDCACHE" + for i in "${CACHE[@]}"; do + if [[ "${MANIFESTIMAGEPLUS}" == "$(cut -d "/" -f1 <<< ${i})"* ]]; then + CACHEIMAGE=${i} + fi done - ''' - } - sh '''#! /bin/bash - for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${IMAGE}"; do - docker rmi \ - ${DELETEIMAGE}:amd64-${META_TAG} \ - ${DELETEIMAGE}:amd64-latest \ - ${DELETEIMAGE}:amd64-${EXT_RELEASE_TAG} \ - ${DELETEIMAGE}:arm32v7-${META_TAG} \ - ${DELETEIMAGE}:arm32v7-latest \ - ${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \ - ${DELETEIMAGE}:arm64v8-${META_TAG} \ - ${DELETEIMAGE}:arm64v8-latest \ - ${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || : + ${TIMEOUT_CMD} docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${META_TAG} -t ${MANIFESTIMAGE}:amd64-arch-kde -t ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + ${TIMEOUT_CMD} docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${META_TAG} -t ${MANIFESTIMAGE}:arm64v8-arch-kde -t ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + if [ -n "${SEMVER}" ]; then + ${TIMEOUT_CMD} docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:amd64-${SEMVER} ${CACHEIMAGE}:amd64-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + ${TIMEOUT_CMD} docker buildx imagetools create --prefer-index=false -t ${MANIFESTIMAGE}:arm64v8-${SEMVER} ${CACHEIMAGE}:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + fi done - docker rmi \ - ghcr.io/linuxserver/lsiodev-buildcache:arm32v7-${COMMIT_SHA}-${BUILD_NUMBER} \ - ghcr.io/linuxserver/lsiodev-buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} || : - ''' + for MANIFESTIMAGE in "${IMAGE}" "${GITLABIMAGE}" "${GITHUBIMAGE}" "${QUAYIMAGE}"; do + if [[ "${MANIFESTIMAGE}" == "${GITLABIMAGE}" ]]; then + TIMEOUT_CMD="gitlab_timeout" + else + TIMEOUT_CMD="" + fi + ${TIMEOUT_CMD} docker buildx imagetools create -t ${MANIFESTIMAGE}:arch-kde ${MANIFESTIMAGE}:amd64-arch-kde ${MANIFESTIMAGE}:arm64v8-arch-kde || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + ${TIMEOUT_CMD} docker buildx imagetools create -t ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + ${TIMEOUT_CMD} docker buildx imagetools create -t ${MANIFESTIMAGE}:${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + if [ -n "${SEMVER}" ]; then + ${TIMEOUT_CMD} docker buildx imagetools create -t ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:amd64-${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} || \ + { if [[ "${MANIFESTIMAGE}" != "${QUAYIMAGE}" && "${MANIFESTIMAGE}" != "${GITLABIMAGE}" ]]; then exit 1; fi; } + fi + done + ''' } } } // If this is a public release tag it in the LS Github stage('Github-Tag-Push-Release') { when { - branch "master" + branch "arch-kde" expression { env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER } @@ -798,94 +1149,253 @@ pipeline { environment name: 'EXIT_STATUS', value: '' } steps { - echo "Pushing New tag for current commit ${META_TAG}" - sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ - -d '{"tag":"'${META_TAG}'",\ - "object": "'${COMMIT_SHA}'",\ - "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\ - "type": "commit",\ - "tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' ''' - echo "Pushing New release for Tag" sh '''#! /bin/bash - echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json - echo '{"tag_name":"'${META_TAG}'",\ - "target_commitish": "master",\ - "name": "'${META_TAG}'",\ - "body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start - printf '","draft": false,"prerelease": false}' >> releasebody.json - paste -d'\\0' start releasebody.json > releasebody.json.done - curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done''' + echo "Auto-generating release notes" + if [ "$(git tag --points-at HEAD)" != "" ]; then + echo "Existing tag points to current commit, suggesting no new LS changes" + AUTO_RELEASE_NOTES="No changes" + else + AUTO_RELEASE_NOTES=$(curl -fsL -H "Authorization: token ${GITHUB_TOKEN}" -H "Accept: application/vnd.github+json" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases/generate-notes \ + -d '{"tag_name":"'${META_TAG}'",\ + "target_commitish": "arch-kde"}' \ + | jq -r '.body' | sed 's|## What.s Changed||') + fi + echo "Pushing New tag for current commit ${META_TAG}" + curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \ + -d '{"tag":"'${META_TAG}'",\ + "object": "'${COMMIT_SHA}'",\ + "message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to arch-kde",\ + "type": "commit",\ + "tagger": {"name": "LinuxServer-CI","email": "ci@linuxserver.io","date": "'${GITHUB_DATE}'"}}' + echo "Pushing New release for Tag" + echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json + jq -n \ + --arg tag_name "$META_TAG" \ + --arg target_commitish "arch-kde" \ + --arg ci_url "${CI_URL:-N/A}" \ + --arg ls_notes "$AUTO_RELEASE_NOTES" \ + --arg remote_notes "$(cat releasebody.json)" \ + '{ + "tag_name": $tag_name, + "target_commitish": $target_commitish, + "name": $tag_name, + "body": ("**CI Report:**\\n\\n" + $ci_url + "\\n\\n**LinuxServer Changes:**\\n\\n" + $ls_notes + "\\n\\n**Remote Changes:**\\n\\n" + $remote_notes), + "draft": false, + "prerelease": true }' > releasebody.json.done + curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done + ''' } } - // Use helper container to sync the current README on master to the dockerhub endpoint - stage('Sync-README') { + // Add protection to the release branch + stage('Github-Release-Branch-Protection') { when { + branch "arch-kde" environment name: 'CHANGE_ID', value: '' environment name: 'EXIT_STATUS', value: '' } steps { - withCredentials([ - [ - $class: 'UsernamePasswordMultiBinding', - credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207', - usernameVariable: 'DOCKERUSER', - passwordVariable: 'DOCKERPASS' - ] - ]) { - sh '''#! /bin/bash - set -e - TEMPDIR=$(mktemp -d) - docker pull ghcr.io/linuxserver/jenkins-builder:latest - docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH="${BRANCH_NAME}" -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest - docker pull ghcr.io/linuxserver/readme-sync - docker run --rm=true \ - -e DOCKERHUB_USERNAME=$DOCKERUSER \ - -e DOCKERHUB_PASSWORD=$DOCKERPASS \ - -e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \ - -e DOCKER_REPOSITORY=${IMAGE} \ - -e GIT_BRANCH=master \ - -v ${TEMPDIR}/docker-${CONTAINER_NAME}:/mnt \ - ghcr.io/linuxserver/readme-sync bash -c 'node sync' - rm -Rf ${TEMPDIR} ''' - } - } - } - // If this is a Pull request send the CI link as a comment on it - stage('Pull Request Comment') { - when { - not {environment name: 'CHANGE_ID', value: ''} - environment name: 'CI', value: 'true' - environment name: 'EXIT_STATUS', value: '' - } - steps { - sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/issues/${PULL_REQUEST}/comments \ - -d '{"body": "I am a bot, here are the test results for this PR: \\n'${CI_URL}' \\n'${SHELLCHECK_URL}'"}' ''' + echo "Setting up protection for release branch arch-kde" + sh '''#! /bin/bash + curl -H "Authorization: token ${GITHUB_TOKEN}" -X PUT https://api.github.com/repos/${LS_USER}/${LS_REPO}/branches/arch-kde/protection \ + -d $(jq -c . << EOF + { + "required_status_checks": null, + "enforce_admins": false, + "required_pull_request_reviews": { + "dismiss_stale_reviews": false, + "require_code_owner_reviews": false, + "require_last_push_approval": false, + "required_approving_review_count": 1 + }, + "restrictions": null, + "required_linear_history": false, + "allow_force_pushes": false, + "allow_deletions": false, + "block_creations": false, + "required_conversation_resolution": true, + "lock_branch": false, + "allow_fork_syncing": false, + "required_signatures": false + } +EOF + ) ''' } } } /* ###################### - Send status to Discord + Comment on PR and Send status to Discord ###################### */ post { always { - script{ + script { + env.JOB_DATE = sh( + script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''', + returnStdout: true).trim() if (env.EXIT_STATUS == "ABORTED"){ sh 'echo "build aborted"' - } - else if (currentBuild.currentResult == "SUCCESS"){ - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\ - "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ + }else{ + if (currentBuild.currentResult == "SUCCESS"){ + if (env.GITHUBIMAGE =~ /lspipepr/){ + env.JOB_WEBHOOK_STATUS='Success' + env.JOB_WEBHOOK_COLOUR=3957028 + env.JOB_WEBHOOK_FOOTER='PR Build' + }else if (env.GITHUBIMAGE =~ /lsiodev/){ + env.JOB_WEBHOOK_STATUS='Success' + env.JOB_WEBHOOK_COLOUR=3957028 + env.JOB_WEBHOOK_FOOTER='Dev Build' + }else{ + env.JOB_WEBHOOK_STATUS='Success' + env.JOB_WEBHOOK_COLOUR=1681177 + env.JOB_WEBHOOK_FOOTER='Live Build' + } + }else{ + if (env.GITHUBIMAGE =~ /lspipepr/){ + env.JOB_WEBHOOK_STATUS='Failure' + env.JOB_WEBHOOK_COLOUR=12669523 + env.JOB_WEBHOOK_FOOTER='PR Build' + }else if (env.GITHUBIMAGE =~ /lsiodev/){ + env.JOB_WEBHOOK_STATUS='Failure' + env.JOB_WEBHOOK_COLOUR=12669523 + env.JOB_WEBHOOK_FOOTER='Dev Build' + }else{ + env.JOB_WEBHOOK_STATUS='Failure' + env.JOB_WEBHOOK_COLOUR=16711680 + env.JOB_WEBHOOK_FOOTER='Live Build' + } + } + sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/jenkins-avatar.png","embeds": [{"'color'": '${JOB_WEBHOOK_COLOUR}',\ + "footer": {"text" : "'"${JOB_WEBHOOK_FOOTER}"'"},\ + "timestamp": "'${JOB_DATE}'",\ + "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** '${JOB_WEBHOOK_STATUS}'\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ "username": "Jenkins"}' ${BUILDS_DISCORD} ''' } - else { - sh ''' curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\ - "description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**ShellCheck Results:** '${SHELLCHECK_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\ - "username": "Jenkins"}' ${BUILDS_DISCORD} ''' + } + script { + if (env.GITHUBIMAGE =~ /lspipepr/){ + if (env.CI_TEST_ATTEMPTED == "true" || env.PUSH_ATTEMPTED == "true"){ + sh '''#! /bin/bash + # Function to retrieve JSON data from URL + get_json() { + local url="$1" + local response=$(curl -s "$url") + if [ $? -ne 0 ]; then + echo "Failed to retrieve JSON data from $url" + return 1 + fi + local json=$(echo "$response" | jq .) + if [ $? -ne 0 ]; then + echo "Failed to parse JSON data from $url" + return 1 + fi + echo "$json" + } + + build_table() { + local data="$1" + + # Get the keys in the JSON data + local keys=$(echo "$data" | jq -r 'to_entries | map(.key) | .[]') + + # Check if keys are empty + if [ -z "$keys" ]; then + echo "JSON report data does not contain any keys or the report does not exist." + return 1 + fi + + # Build table header + local header="| Tag | Passed |\\n| --- | --- |\\n" + + # Loop through the JSON data to build the table rows + local rows="" + for build in $keys; do + local status=$(echo "$data" | jq -r ".[\\"$build\\"].test_success") + if [ "$status" = "true" ]; then + status="✅" + else + status="❌" + fi + local row="| "$build" | "$status" |\\n" + rows="${rows}${row}" + done + + local table="${header}${rows}" + local escaped_table=$(echo "$table" | sed 's/\"/\\\\"/g') + echo "$escaped_table" + } + + if [[ "${CI}" = "true" ]]; then + # Retrieve JSON data from URL + data=$(get_json "$CI_JSON_URL") + # Create table from JSON data + table=$(build_table "$data") + echo -e "$table" + + curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \ + -d "{\\"body\\": \\"I am a bot, here are the test results for this PR for commit ${COMMIT_SHA:0:7} : \\n${CI_URL}\\n${SHELLCHECK_URL}\\n${table}\\"}" + else + curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \ + -d "{\\"body\\": \\"I am a bot, here is the pushed image/manifest for this PR for commit ${COMMIT_SHA:0:7} : \\n\\n\\`${GITHUBIMAGE}:${META_TAG}\\`\\"}" + fi + ''' + } else { + sh '''#! /bin/bash + curl -X POST -H "Authorization: token $GITHUB_TOKEN" \ + -H "Accept: application/vnd.github.v3+json" \ + "https://api.github.com/repos/$LS_USER/$LS_REPO/issues/$PULL_REQUEST/comments" \ + -d "{\\"body\\": \\"I am a bot, the build for PR commit ${COMMIT_SHA:0:7} failed and as a result no CI test was attempted and no images were pushed.\\"}" + ''' + } } } + sh '''#!/bin/bash + rm -rf /config/.ssh/id_sign + rm -rf /config/.ssh/id_sign.pub + git config --global --unset gpg.format + git config --global --unset user.signingkey + git config --global --unset commit.gpgsign + ''' } cleanup { + sh '''#! /bin/bash + echo "Pruning builder!!" + docker builder prune -f --builder container || : + containers=$(docker ps -q) + if [[ -n "${containers}" ]]; then + BUILDX_CONTAINER_ID=$(docker ps -qf 'name=buildx_buildkit') + for container in ${containers}; do + if [[ "${container}" == "${BUILDX_CONTAINER_ID}" ]]; then + echo "skipping buildx container in docker stop" + else + echo "Stopping container ${container}" + docker stop ${container} + fi + done + fi + docker system prune -f --volumes || : + docker image prune -af || : + ''' cleanWs() } } } + +def retry_backoff(int max_attempts, int power_base, Closure c) { + int n = 0 + while (n < max_attempts) { + try { + c() + return + } catch (err) { + if ((n + 1) >= max_attempts) { + throw err + } + sleep(power_base ** n) + n++ + } + } + return +} diff --git a/README.md b/README.md index 3af27394d..c68df9fd7 100644 --- a/README.md +++ b/README.md @@ -1,271 +1,3 @@ -<!-- DO NOT EDIT THIS FILE MANUALLY --> -<!-- Please read the https://github.com/linuxserver/docker-webtop/blob/master/.github/CONTRIBUTING.md --> - -[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io) - -[![Blog](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Blog)](https://blog.linuxserver.io "all the things you can do with our containers including How-To guides, opinions and much more!") -[![Discord](https://img.shields.io/discord/354974912613449730.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Discord&logo=discord)](https://discord.gg/YWrKVTn "realtime support / chat with the community and the team.") -[![Discourse](https://img.shields.io/discourse/https/discourse.linuxserver.io/topics.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=discourse)](https://discourse.linuxserver.io "post on our community forum.") -[![Fleet](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=Fleet)](https://fleet.linuxserver.io "an online web interface which displays all of our maintained images.") -[![GitHub](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub&logo=github)](https://github.com/linuxserver "view the source for all of our repositories.") -[![Open Collective](https://img.shields.io/opencollective/all/linuxserver.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=Supporters&logo=open%20collective)](https://opencollective.com/linuxserver "please consider helping us by either donating or contributing to our budget") - -The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring: - -* regular and timely application updates -* easy user mappings (PGID, PUID) -* custom base image with s6 overlay -* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth -* regular security updates - -Find us at: - -* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more! -* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team. -* [Discourse](https://discourse.linuxserver.io) - post on our community forum. -* [Fleet](https://fleet.linuxserver.io) - an online web interface which displays all of our maintained images. -* [GitHub](https://github.com/linuxserver) - view the source for all of our repositories. -* [Open Collective](https://opencollective.com/linuxserver) - please consider helping us by either donating or contributing to our budget - -# [linuxserver/webtop](https://github.com/linuxserver/docker-webtop) - -[![GitHub Stars](https://img.shields.io/github/stars/linuxserver/docker-webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-webtop) -[![GitHub Release](https://img.shields.io/github/release/linuxserver/docker-webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&logo=github)](https://github.com/linuxserver/docker-webtop/releases) -[![GitHub Package Repository](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitHub%20Package&logo=github)](https://github.com/linuxserver/docker-webtop/packages) -[![GitLab Container Registry](https://img.shields.io/static/v1.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=linuxserver.io&message=GitLab%20Registry&logo=gitlab)](https://gitlab.com/linuxserver.io/docker-webtop/container_registry) -[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=pulls&logo=docker)](https://hub.docker.com/r/linuxserver/webtop) -[![Docker Stars](https://img.shields.io/docker/stars/linuxserver/webtop.svg?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=stars&logo=docker)](https://hub.docker.com/r/linuxserver/webtop) -[![Jenkins Build](https://img.shields.io/jenkins/build?labelColor=555555&logoColor=ffffff&style=for-the-badge&jobUrl=https%3A%2F%2Fci.linuxserver.io%2Fjob%2FDocker-Pipeline-Builders%2Fjob%2Fdocker-webtop%2Fjob%2Fmaster%2F&logo=jenkins)](https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-webtop/job/master/) -[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fwebtop%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/webtop/latest/index.html) - -[Webtop](https://github.com/linuxserver/docker-webtop) - Alpine and Ubuntu based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. - -[![webtop](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png)](https://github.com/linuxserver/docker-webtop) - -## Supported Architectures - -Our images support multiple architectures such as `x86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/). - -Simply pulling `ghcr.io/linuxserver/webtop` should retrieve the correct image for your arch, but you can also pull specific arch images via tags. - -The architectures supported by this image are: - -| Architecture | Tag | -| :----: | --- | -| x86-64 | amd64-latest | -| arm64 | arm64v8-latest | -| armhf | arm32v7-latest | - -## Version Tags - -This image provides various versions that are available via tags. `latest` tag usually provides the latest stable version. Others are considered under development and caution must be exercised when using them. - -| Tag | Description | -| :----: | --- | -| latest | XFCE Alpine | -| ubuntu-xfce | XFCE Ubuntu | -| alpine-kde | KDE Alpine | -| ubuntu-kde | KDE Ubuntu | -| alpine-mate | MATE Alpine | -| ubuntu-mate | MATE Ubuntu | -| alpine-i3 | i3 Alpine | -| ubuntu-i3 | i3 Ubuntu | -| alpine-openbox | Openbox Alpine | -| ubuntu-openbox | Openbox Ubuntu | -| alpine-icewm | IceWM Alpine | -| ubuntu-icewm | IceWM Ubuntu | - -## Application Setup - -The Webtop can be accessed at: - -* http://yourhost:3000/ - -By default the user/pass is abc/abc, if you change your password or want to login manually to the GUI session for any reason use the following link: - -* http://yourhost:3000/?login=true - -You can access advanced features of the Guacamole remote desktop using ctrl+alt+shift enabling you to use remote copy/paste or an onscreen keyboard. - -**Unlike our other containers these Desktops are not designed to be upgraded by Docker, you will keep your home directoy but anything you installed system level will be lost if you upgrade an existing container. To keep packages up to date instead use Ubuntu's own apt program or Alpine's apk program** - -**The KDE and i3 flavors for Ubuntu need to be run in privileged mode to function properly** - -If you ever lose your password you can always reset it by execing into the container as root: -``` -docker exec -it webtop passwd abc -``` -By default we perform all logic for the abc user and we reccomend using that user only in the container, but new users can be added as long as there is a `startwm.sh` executable script in their home directory. -All of these containers are configured with passwordless sudo, we make no efforts to secure or harden these containers and we do not reccomend ever publishing their ports to the public Internet. - -## Usage - -Here are some example snippets to help you get started creating a container. - -### docker-compose (recommended, [click here for more info](https://docs.linuxserver.io/general/docker-compose)) - -```yaml ---- -version: "2.1" -services: - webtop: - image: ghcr.io/linuxserver/webtop - container_name: webtop - privileged: true #optional - environment: - - PUID=1000 - - PGID=1000 - - TZ=Europe/London - - SUBFOLDER=/ #optional - volumes: - - /path/to/data:/config - - /var/run/docker.sock:/var/run/docker.sock #optional - ports: - - 3000:3000 - shm_size: "1gb" #optional - restart: unless-stopped -``` - -### docker cli ([click here for more info](https://docs.docker.com/engine/reference/commandline/cli/)) - -```bash -docker run -d \ - --name=webtop \ - --privileged `#optional` \ - -e PUID=1000 \ - -e PGID=1000 \ - -e TZ=Europe/London \ - -e SUBFOLDER=/ `#optional` \ - -p 3000:3000 \ - -v /path/to/data:/config \ - -v /var/run/docker.sock:/var/run/docker.sock `#optional` \ - --shm-size="1gb" `#optional` \ - --restart unless-stopped \ - ghcr.io/linuxserver/webtop -``` - -## Parameters - -Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container. - -| Parameter | Function | -| :----: | --- | -| `-p 3000` | Web Desktop GUI | -| `-e PUID=1000` | for UserID - see below for explanation | -| `-e PGID=1000` | for GroupID - see below for explanation | -| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London | -| `-e SUBFOLDER=/` | Specify a subfolder to use with reverse proxies, IE `/subfolder/` | -| `-v /config` | abc users home directory | -| `-v /var/run/docker.sock` | Docker Socket on the system, if you want to use Docker in the container | -| `--shm-size=` | We set this to 1 gig to prevent modern web browsers from crashing | - -## Environment variables from files (Docker secrets) - -You can set any environment variable from a file by using a special prepend `FILE__`. - -As an example: - -```bash --e FILE__PASSWORD=/run/secrets/mysecretpassword -``` - -Will set the environment variable `PASSWORD` based on the contents of the `/run/secrets/mysecretpassword` file. - -## Umask for running applications - -For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting. -Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support. - -## User / Group Identifiers - -When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`. - -Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic. - -In this instance `PUID=1000` and `PGID=1000`, to find yours use `id user` as below: - -```bash - $ id username - uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup) -``` - -## Docker Mods - -[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=webtop&query=%24.mods%5B%27webtop%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=webtop "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.") - -We publish various [Docker Mods](https://github.com/linuxserver/docker-mods) to enable additional functionality within the containers. The list of Mods available for this image (if any) as well as universal mods that can be applied to any one of our images can be accessed via the dynamic badges above. - -## Support Info - -* Shell access whilst the container is running: `docker exec -it webtop /bin/bash` -* To monitor the logs of the container in realtime: `docker logs -f webtop` -* container version number - * `docker inspect -f '{{ index .Config.Labels "build_version" }}' webtop` -* image version number - * `docker inspect -f '{{ index .Config.Labels "build_version" }}' ghcr.io/linuxserver/webtop` - -## Updating Info - -Most of our images are static, versioned, and require an image update and container recreation to update the app inside. With some exceptions (ie. nextcloud, plex), we do not recommend or support updating apps inside the container. Please consult the [Application Setup](#application-setup) section above to see if it is recommended for the image. - -Below are the instructions for updating containers: - -### Via Docker Compose - -* Update all images: `docker-compose pull` - * or update a single image: `docker-compose pull webtop` -* Let compose update all containers as necessary: `docker-compose up -d` - * or update a single container: `docker-compose up -d webtop` -* You can also remove the old dangling images: `docker image prune` - -### Via Docker Run - -* Update the image: `docker pull ghcr.io/linuxserver/webtop` -* Stop the running container: `docker stop webtop` -* Delete the container: `docker rm webtop` -* Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your `/config` folder and settings will be preserved) -* You can also remove the old dangling images: `docker image prune` - -### Via Watchtower auto-updater (only use if you don't remember the original parameters) - -* Pull the latest image at its tag and replace it with the same env variables in one run: - - ```bash - docker run --rm \ - -v /var/run/docker.sock:/var/run/docker.sock \ - containrrr/watchtower \ - --run-once webtop - ``` - -* You can also remove the old dangling images: `docker image prune` - -**Note:** We do not endorse the use of Watchtower as a solution to automated updates of existing Docker containers. In fact we generally discourage automated updates. However, this is a useful tool for one-time manual updates of containers where you have forgotten the original parameters. In the long term, we highly recommend using [Docker Compose](https://docs.linuxserver.io/general/docker-compose). - -### Image Update Notifications - Diun (Docker Image Update Notifier) - -* We recommend [Diun](https://crazymax.dev/diun/) for update notifications. Other tools that automatically update containers unattended are not recommended or supported. - -## Building locally - -If you want to make local modifications to these images for development purposes or just to customize the logic: - -```bash -git clone https://github.com/linuxserver/docker-webtop.git -cd docker-webtop -docker build \ - --no-cache \ - --pull \ - -t ghcr.io/linuxserver/webtop:latest . -``` - -The ARM variants can be built on x86_64 hardware using `multiarch/qemu-user-static` - -```bash -docker run --rm --privileged multiarch/qemu-user-static:register --reset -``` - -Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64`. - -## Versions - -* **20.04.21:** - Initial release. +<!-- DO NOT EDIT THIS FILE MANUALLY --> +<!-- Please read https://github.com/linuxserver/docker-webtop/blob/arch-kde/.github/CONTRIBUTING.md --> +Up to date documentation is available [here](https://github.com/linuxserver/docker-webtop/blob/master/README.md). diff --git a/jenkins-vars.yml b/jenkins-vars.yml index 146ba0ec9..365727dd9 100644 --- a/jenkins-vars.yml +++ b/jenkins-vars.yml @@ -2,28 +2,29 @@ # jenkins variables project_name: docker-webtop -external_type: alpine_repo -release_type: stable -release_tag: latest -ls_branch: master +external_type: na +custom_version_command: "curl -sX GET https://api.github.com/repos/linuxserver/docker-baseimage-kasmvnc/releases | jq -r 'first(.[] | select(.tag_name | startswith(\"arch-\"))) | .tag_name' | sed 's|arch-||' | sed 's|-ls.*||'" +release_type: prerelease +release_tag: arch-kde +ls_branch: arch-kde +build_armhf: false +image_sbom: false repo_vars: - - BUILD_VERSION_ARG = 'XFCE_VERSION' + - BUILD_VERSION_ARG = 'KDE_VERSION' - LS_USER = 'linuxserver' - LS_REPO = 'docker-webtop' - CONTAINER_NAME = 'webtop' - DOCKERHUB_IMAGE = 'linuxserver/webtop' - DEV_DOCKERHUB_IMAGE = 'lsiodev/webtop' - PR_DOCKERHUB_IMAGE = 'lspipepr/webtop' - - DIST_IMAGE = 'alpine' - - DIST_TAG = '3.13' - - DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.13/community/' - - DIST_REPO_PACKAGES = 'xfce4' + - DIST_IMAGE = 'arch' - MULTIARCH = 'true' - CI = 'true' - CI_WEB = 'true' - - CI_PORT = '3000' - - CI_SSL = 'false' + - CI_PORT = '3001' + - CI_SSL = 'true' - CI_DELAY = '120' + - CI_WEB_SCREENSHOT_DELAY = '30' - CI_DOCKERENV = 'TZ=US/Pacific' - CI_AUTH = 'user:password' - CI_WEBPATH = '' diff --git a/package_versions.txt b/package_versions.txt index 799485642..87a1db550 100755 --- a/package_versions.txt +++ b/package_versions.txt @@ -1,260 +1,1039 @@ -alpine-baselayout-3.2.0-r8 -alpine-keys-2.2-r0 -alsa-lib-1.2.4-r2 -alsa-plugins-pulse-1.2.2-r1 -apk-tools-2.12.7-r0 -at-spi2-atk-2.38.0-r0 -at-spi2-core-2.38.0-r0 -atk-2.36.0-r0 -atkmm-2.28.0-r1 -avahi-libs-0.8-r4 -bash-5.1.0-r0 -brotli-libs-1.0.9-r3 -busybox-1.32.1-r6 -c-ares-1.17.2-r0 -ca-certificates-20191127-r5 -ca-certificates-bundle-20191127-r5 -cairo-1.16.0-r2 -cairo-gobject-1.16.0-r2 -cairomm-1.14.0-r0 -containerd-1.4.8-r0 -coreutils-8.32-r2 -cups-libs-2.3.3-r1 -dbus-1.12.20-r1 -dbus-glib-0.110-r0 -dbus-libs-1.12.20-r1 -dbus-x11-1.12.20-r1 -desktop-file-utils-0.26-r0 -device-mapper-libs-2.02.187-r1 -docker-20.10.3-r1 -docker-cli-20.10.3-r1 -docker-engine-20.10.3-r1 -encodings-1.0.5-r0 -eudev-libs-3.2.9-r3 -exo-4.16.0-r0 -exo-libs-4.16.0-r0 -expat-2.2.10-r1 -faenza-icon-theme-1.3.1-r6 -faenza-icon-theme-bash-1.3.1-r6 -faenza-icon-theme-thunar-1.3.1-r6 -faenza-icon-theme-xfce4-appfinder-1.3.1-r6 -faenza-icon-theme-xfce4-panel-1.3.1-r6 -faenza-icon-theme-xterm-1.3.1-r6 -firefox-esr-78.14.0-r0 -flac-1.3.3-r0 -font-alias-1.0.3-r1 -font-cursor-misc-1.0.3-r1 -font-misc-misc-1.1.2-r1 -font-noto-0_git20190623-r2 -fontconfig-2.13.1-r3 -freerdp-libs-2.2.0-r0 -freetype-2.10.4-r1 -fribidi-1.0.10-r0 -fuse-2.9.9-r1 -fuse-common-3.10.2-r0 -garcon-0.8.0-r0 -gdk-pixbuf-2.42.4-r0 -giflib-5.2.1-r0 -glib-2.66.8-r0 -glibmm-2.64.5-r0 -gmp-6.2.1-r0 -gnutls-3.7.1-r0 -graphite2-1.3.14-r0 -gsm-1.0.19-r0 -gtk+3.0-3.24.23-r2 -gtk-update-icon-cache-2.24.33-r0 -gtkmm3-3.24.3-r0 -gtksourceview-3.24.11-r1 -harfbuzz-2.7.4-r1 -hicolor-icon-theme-0.17-r1 -iceauth-1.0.8-r0 -icu-libs-67.1-r2 -imlib2-1.7.1-r0 -ip6tables-1.8.6-r0 -iptables-1.8.6-r0 -iso-codes-4.5.0-r0 -keybinder3-0.3.2-r2 -lcms2-2.11-r0 -libacl-2.2.53-r0 -libasyncns-0.8-r1 -libattr-2.4.48-r0 -libblkid-2.36.1-r1 -libbsd-0.10.0-r0 -libbz2-1.0.8-r1 -libc-utils-0.7.2-r3 -libcanberra-0.30-r5 -libcanberra-gtk3-0.30-r5 -libcanberra-pulse-0.30-r5 -libcap-2.46-r0 -libcrypto1.1-1.1.1l-r0 -libcurl-7.79.0-r0 -libdrm-2.4.104-r0 -libedit-20191231.3.1-r1 -libepoxy-1.5.5-r0 -libevent-2.1.12-r1 -libexif-0.6.22-r0 -libffi-3.3-r2 -libfontenc-1.1.4-r0 -libgcc-10.2.1_pre1-r3 -libgomp-10.2.1_pre1-r3 -libgtop-2.40.0-r0 -libgudev-234-r0 -libice-1.0.10-r0 -libid3tag-0.15.1b-r8 -libintl-0.20.2-r2 -libjpeg-turbo-2.1.0-r0 -libltdl-2.4.6-r7 -libmnl-1.0.4-r1 -libmount-2.36.1-r1 -libnftnl-libs-1.1.8-r0 -libnotify-0.7.9-r1 -libogg-1.3.4-r0 -libpciaccess-0.16-r0 -libpng-1.6.37-r1 -libproc-3.3.16-r0 -libpulse-14.1-r0 -libpulse-mainloop-glib-14.1-r0 -librsvg-2.50.4-r0 -libseccomp-2.5.1-r1 -libsigc++-2.10.6-r0 -libsm-1.2.3-r0 -libsndfile-1.0.29-r1 -libssl1.1-1.1.1l-r0 -libstdc++-10.2.1_pre1-r3 -libtasn1-4.16.0-r1 -libtls-standalone-2.9.1-r1 -libunistring-0.9.10-r0 -libusb-1.0.24-r1 -libuuid-2.36.1-r1 -libvorbis-1.3.7-r0 -libvpx-1.9.0-r0 -libwebp-1.1.0-r0 -libwnck3-3.36.0-r0 -libx11-1.7.1-r0 -libxau-1.0.9-r0 -libxaw-1.0.13-r3 -libxcb-1.14-r1 -libxcomposite-0.4.5-r0 -libxcursor-1.2.0-r0 -libxdamage-1.1.5-r1 -libxdmcp-1.1.3-r0 -libxext-1.3.4-r0 -libxfce4ui-4.16.0-r1 -libxfce4util-4.16.0-r0 -libxfixes-5.0.3-r2 -libxfont2-2.0.5-r0 -libxft-2.3.3-r0 -libxi-1.7.10-r0 -libxinerama-1.1.4-r1 -libxkbcommon-1.0.3-r0 -libxkbfile-1.1.0-r0 -libxklavier-5.4-r5 -libxml2-2.9.12-r0 -libxmu-1.1.3-r0 -libxpm-3.5.13-r0 -libxpresent-1.0.0-r0 -libxrandr-1.5.2-r1 -libxrender-0.9.10-r3 -libxres-1.2.0-r2 -libxshmfence-1.3-r1 -libxt-1.2.1-r0 -libxtst-1.2.3-r3 -libxxf86vm-1.1.4-r2 -linux-pam-1.5.1-r0 -mcookie-2.36.1-r1 -mesa-20.3.3-r0 -mesa-gbm-20.3.3-r0 -mesa-gl-20.3.3-r0 -mesa-glapi-20.3.3-r0 -mkfontscale-1.2.1-r1 -mousepad-0.5.2-r0 -mozjs78-78.14.0-r0 -musl-1.2.2-r1 -musl-utils-1.2.2-r1 -ncurses-libs-6.2_p20210109-r0 -ncurses-terminfo-base-6.2_p20210109-r0 -nettle-3.7.2-r0 -nghttp2-libs-1.42.0-r1 -nodejs-14.17.6-r0 -nspr-4.31-r0 -nss-3.66-r0 -openbox-3.6.1-r2 -openbox-libs-3.6.1-r2 -openjpeg-2.4.0-r1 -openssh-client-8.4_p1-r3 -openssh-keygen-8.4_p1-r3 -openssl-1.1.1l-r0 -opus-1.3.1-r1 -orc-0.4.32-r0 -ossp-uuid-1.6.2-r1 -p11-kit-0.23.22-r0 -pango-1.48.2-r0 -pangomm-2.42.2-r0 -pavucontrol-4.0-r0 -pcre-8.44-r0 -pcre2-10.36-r0 -pixman-0.40.0-r2 -pkgconf-1.7.3-r0 -polkit-0.118-r0 -poppler-20.12.1-r0 -poppler-glib-20.12.1-r0 -procps-3.3.16-r0 -pulseaudio-14.1-r0 -pulseaudio-alsa-14.1-r0 -readline-8.1.0-r0 -runc-1.0.0_rc95-r0 -s6-ipcserver-2.10.0.0-r0 -scanelf-1.2.8-r0 -shadow-4.8.1-r0 -shared-mime-info-2.0-r0 -skalibs-2.10.0.0-r0 -sound-theme-freedesktop-0.8-r0 -soxr-0.1.3-r2 -speexdsp-1.2.0-r0 -sqlite-libs-3.34.1-r0 -ssl_client-1.32.1-r6 -startup-notification-0.12-r4 -sudo-1.9.5p2-r0 -tdb-libs-1.4.3-r0 -thunar-4.16.2-r0 -thunar-volman-4.16.0-r0 -tiff-4.2.0-r0 -tini-static-0.19.0-r0 -ttf-dejavu-2.37-r1 -tumbler-4.16.0-r0 -tzdata-2021a-r0 -upower-0.99.11-r0 -util-macros-1.19.2-r1 -utmps-0.1.0.0-r0 -vte3-0.62.2-r0 -wayland-libs-client-1.18.0-r5 -wayland-libs-cursor-1.18.0-r5 -wayland-libs-egl-1.18.0-r5 -wayland-libs-server-1.18.0-r5 -websocat-1.8.1-r0 -xauth-1.1-r0 -xcb-util-0.4.0-r3 -xfce4-4.16-r0 -xfce4-appfinder-4.16.0-r0 -xfce4-panel-4.16.0-r0 -xfce4-power-manager-4.16.0-r0 -xfce4-pulseaudio-plugin-0.4.3-r2 -xfce4-session-4.16.0-r0 -xfce4-settings-4.16.0-r0 -xfce4-terminal-0.8.9.2-r0 -xfconf-4.16.0-r0 -xfdesktop-4.16.0-r0 -xfwm4-4.16.1-r0 -xinit-1.4.1-r0 -xkbcomp-1.4.4-r0 -xkeyboard-config-2.31-r0 -xmodmap-1.0.10-r0 -xorg-server-1.20.13-r0 -xorg-server-common-1.20.13-r0 -xorgxrdp-0.2.16-r0 -xrdb-1.2.1-r0 -xrdp-0.9.16-r1 -xterm-367-r0 -xz-5.2.5-r0 -xz-libs-5.2.5-r0 -zlib-1.2.11-r3 +NAME VERSION TYPE +Simple Launcher 1.1.0.14 binary (+5 duplicates) +abseil-cpp 20260817.0-2 alpm +accountsservice 26.27.3-1 alpm +acl 2.4.0-1 alpm +adwaita-cursors 51.0-1 alpm +adwaita-fonts 51.0-2 alpm +adwaita-icon-theme 51.0-1 alpm +adwaita-icon-theme-legacy 46.2-3 alpm +aiofiles 25.1.0 python +aiohappyeyeballs 2.7.1 python +aiohttp 3.14.5 python +aiosignal 1.4.0 python +alsa-lib 1.2.16.1-1 alpm +alsa-topology-conf 1.2.5.1-4 alpm +alsa-ucm-conf 1.2.16.1-1 alpm +annotated-doc 0.0.7 python +annotated-types 0.8.0 python +anyio 4.16.0 python +aom 3.15.3-1 alpm +appstream 1.2.3-1 alpm +appstream-qt 1.2.3-1 alpm +archlinux-appstream-data 20261017-1 alpm +archlinux-keyring 20260909-1 alpm +at-spi2-core 2.62.2-1 alpm +attica 6.32.0-1 alpm +attr 2.6.0-1 alpm +attrs 26.1.0 python +audit 4.2.1-1 alpm +aurorae 6.8.3-1 alpm +autocommand 2.2.2 python +autoconf 2.73-1 alpm +automake 1.20-1 alpm +avahi 1:0.9rc5-2 alpm +baloo 6.32.0-1 alpm +baloo-widgets 26.08.3-1 alpm +base-devel 1-2 alpm +bash 5.3.20-1 alpm +binutils 2.47-4 alpm +bison 3.8.2-8 alpm +boost-libs 1.92.0-2 alpm +breeze 6.8.3-1 alpm +breeze-cursors 6.8.3-1 alpm +breeze-icons 6.32.0-1 alpm +brotli 1.2.1-1 alpm +bubblewrap 0.13.1-1 alpm +busybox 1.36.1-4 alpm +bzip2 1.0.8-6 alpm +ca-certificates 20240618-1 alpm +ca-certificates-mozilla 3.134-1 alpm +ca-certificates-utils 20240618-1 alpm +cairo 1.18.6-1 alpm +catatonit 0.2.1-2 alpm +certifi 2026.11.20 python +cffi 2.1.1 python +cfitsio 1:4.7.0-1 alpm +chromium 158.0.8127.88-2 alpm +cifs-utils 7.9-1 alpm +cjson 1.7.19-1 alpm +click 8.5.1 python +cmake 4.5.1-1 alpm +command-line-arguments UNKNOWN go-module +compiler-rt 23.1.5-1 alpm +containerd 2.4.2-1 alpm +convertlit 1.8-13 alpm +coreutils 9.12-3 alpm +cpio 2.15-3 alpm +cppdap 1.58.0-3 alpm +cryptography 50.0.2 python +cryptsetup 2.8.9-1 alpm +cups 2:2.4.20-2 alpm +cups-filters 2.0.1-3 alpm +curl 8.23.0-2 alpm +cxx-rust-cssparser 1.1.0-1 alpm +cyphar.com/go-pathrs v0.2.6 go-module +dario.cat/mergo v1.0.2 go-module +dav1d 1.5.5-1 alpm +db5.3 5.3.28-7 alpm +dbus 1.16.4-1 alpm +dbus-broker 37-3 alpm +dbus-broker-units 37-3 alpm +dbus-units 37-3 alpm +dconf 51.0-1 alpm +ddcutil 3.0.2-1 alpm +debugedit 5.4-1 alpm +default-cursors 3-1 alpm +desktop-file-utils 0.29-1 alpm +device-mapper 2.03.44-1 alpm +diffutils 3.12-2 alpm +discount 3.0.2.0-1 alpm +discover 6.8.3-1 alpm +dnspython 2.9.2 python +docker 1:29.10.1-1 alpm +docker-compose 5.8.1-1 alpm +dolphin 26.08.3-1 alpm +double-conversion 3.4.0-1 alpm +duktape 2.7.0-7 alpm +dunst 1.13.2-3 alpm +e2fsprogs 1.47.4-1 alpm +ebook-tools 0.2.2-9 alpm +editorconfig-core-c 0.12.11-1 alpm +egl-gbm 1.1.4-1 alpm +egl-wayland 4:1.1.24-1 alpm +egl-x11 1.0.6-1 alpm +eglexternalplatform 1.2.1-1 alpm +elfutils 0.197-1 alpm +exiv2 0.28.9-1 alpm +expat 2.10.0-1 alpm +fakeroot 2:1.37.2-1 alpm +fastapi 0.165.0 python +fcft 3.3.3-1 alpm +ffmpeg 2:9.1-2 alpm +fftw 3.3.11-1 alpm +file 5.48-1 alpm +filesystem 2025.10.12-1 alpm +findutils 4.11.0-1 alpm +flac 1.5.0-1 alpm +flex 2.7.9-1 alpm +fontconfig 2:2.18.4-1 alpm +foot 1.28.0-2 alpm +frameworkintegration 6.32.0-1 alpm +freetype2 2.15.0-1 alpm +fribidi 1.0.18-1 alpm +frozenlist 1.8.0 python +fuse-common 3.18.3-1 alpm +fuse-overlayfs 1.18-1 alpm +fuse3 3.18.3-1 alpm +gawk 5.4.1-1 alpm +gc 8.2.12-1 alpm +gcc 16.2.1+r23+gd564253eb6c8-1 alpm +gcc-libs 16.2.1+r23+gd564253eb6c8-1 alpm +gdb 18.1-2 alpm +gdb-common 18.1-2 alpm +gdbm 1.26-2 alpm +gdk-pixbuf2 2.44.8-1 alpm +gettext 1.0-2 alpm +giflib 6.1.3-2 alpm +github.com/DefangLabs/secret-detector v1.1.0 go-module +github.com/Microsoft/hcsshim v0.15.0-rc.4 go-module (+1 duplicate) +github.com/ProtonMail/go-crypto v1.4.1 go-module +github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d go-module +github.com/aperturerobotics/protobuf-go-lite v0.14.0 go-module +github.com/beorn7/perks v1.0.1 go-module (+1 duplicate) +github.com/buger/goterm v1.0.4 go-module +github.com/cenkalti/backoff/v5 v5.0.3 go-module (+1 duplicate) +github.com/cespare/xxhash/v2 v2.3.0 go-module (+3 duplicates) +github.com/checkpoint-restore/checkpointctl v1.6.0 go-module +github.com/checkpoint-restore/go-criu/v7 v7.2.0 go-module +github.com/checkpoint-restore/go-criu/v8 v8.3.0 go-module +github.com/cilium/ebpf v0.17.3 go-module (+3 duplicates) +github.com/clipperhouse/uax29/v2 v2.2.0 go-module +github.com/cloudflare/circl v1.6.3 go-module +github.com/compose-spec/compose-go/v2 v2.17.0 go-module +github.com/containerd/btrfs/v2 v2.0.0 go-module +github.com/containerd/cgroups/v3 v3.1.3 go-module (+2 duplicates) +github.com/containerd/console v1.0.5 go-module (+4 duplicates) +github.com/containerd/containerd/api v1.12.0 go-module (+4 duplicates) +github.com/containerd/containerd/v2 v2.4.2 go-module +github.com/containerd/containerd/v2 v2.4.2+dirty go-module (+3 duplicates) +github.com/containerd/continuity v0.5.0 go-module (+4 duplicates) +github.com/containerd/errdefs v1.0.0 go-module (+4 duplicates) +github.com/containerd/errdefs/pkg v0.3.0 go-module (+4 duplicates) +github.com/containerd/fifo v1.1.0 go-module (+3 duplicates) +github.com/containerd/go-cni v1.1.14 go-module (+1 duplicate) +github.com/containerd/go-dmverity v0.1.0 go-module (+1 duplicate) +github.com/containerd/go-runc v1.2.1 go-module (+2 duplicates) +github.com/containerd/imgcrypt/v2 v2.0.3 go-module +github.com/containerd/log v0.2.0 go-module (+4 duplicates) +github.com/containerd/log/otel v0.1.0 go-module (+3 duplicates) +github.com/containerd/nri v0.12.3 go-module +github.com/containerd/otelttrpc v0.1.0 go-module +github.com/containerd/platforms v1.0.0-rc.5 go-module (+3 duplicates) +github.com/containerd/plugin v1.1.0 go-module (+3 duplicates) +github.com/containerd/ttrpc v1.2.9 go-module (+4 duplicates) +github.com/containerd/typeurl/v2 v2.3.0 go-module (+4 duplicates) +github.com/containerd/zfs/v2 v2.0.0 go-module +github.com/containernetworking/cni v1.3.1 go-module (+1 duplicate) +github.com/containernetworking/plugins v1.9.1 go-module +github.com/containers/ocicrypt v1.3.2 go-module +github.com/coreos/go-systemd/v22 v22.7.0 go-module (+3 duplicates) +github.com/cyphar/filepath-securejoin v0.7.0 go-module (+1 duplicate) +github.com/distribution/reference v0.6.0 go-module (+3 duplicates) +github.com/docker/cli v29.10.1+incompatible go-module +github.com/docker/cli-docs-tool v0.11.0 go-module +github.com/docker/cli/cmd/docker UNKNOWN go-module +github.com/docker/compose/v5 UNKNOWN go-module +github.com/docker/docker-credential-helpers v0.9.9 go-module +github.com/docker/go-connections v0.8.2 go-module +github.com/docker/go-events v0.1.0 go-module +github.com/docker/go-metrics v0.1.0 go-module (+1 duplicate) +github.com/docker/go-units v0.5.0 go-module (+4 duplicates) +github.com/docker/secrets-engine/client v1.0.0 go-module +github.com/docker/secrets-engine/secrets v1.0.0 go-module +github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203 go-module +github.com/emicklei/go-restful/v3 v3.13.0 go-module +github.com/erofs/go-erofs v0.3.1 go-module (+1 duplicate) +github.com/felixge/httpsnoop v1.1.0 go-module (+3 duplicates) +github.com/fsnotify/fsnotify v1.10.1 go-module (+1 duplicate) +github.com/fvbommel/sortorder v1.2.0 go-module +github.com/fxamacker/cbor/v2 v2.9.4 go-module (+1 duplicate) +github.com/go-jose/go-jose/v4 v4.1.5 go-module +github.com/go-logr/logr v1.4.4 go-module (+3 duplicates) +github.com/go-logr/stdr v1.2.2 go-module (+3 duplicates) +github.com/go-viper/mapstructure/v2 v2.5.0 go-module +github.com/godbus/dbus/v5 v5.1.0 go-module (+2 duplicates) +github.com/godbus/dbus/v5 v5.2.2 go-module +github.com/gofrs/flock v0.13.1 go-module +github.com/golang-jwt/jwt/v5 v5.3.1 go-module +github.com/google/go-cmp v0.7.0 go-module +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 go-module +github.com/google/uuid v1.6.0 go-module (+2 duplicates) +github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.1.0 go-module +github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 go-module +github.com/grpc-ecosystem/grpc-gateway/v2 v2.30.0 go-module (+1 duplicate) +github.com/hashicorp/go-version v1.9.0 go-module +github.com/in-toto/attestation v1.2.0 go-module +github.com/in-toto/in-toto-golang v0.11.0 go-module +github.com/intel/goresctrl v0.13.0 go-module (+1 duplicate) +github.com/klauspost/compress v1.20.0 go-module (+2 duplicates) +github.com/klauspost/compress v1.20.5 go-module +github.com/knqyf263/go-plugin v0.9.0 go-module +github.com/mattn/go-runewidth v0.0.31 go-module +github.com/mattn/go-shellwords v1.0.17 go-module +github.com/mdlayher/socket v0.6.0 go-module (+2 duplicates) +github.com/mdlayher/vsock v1.3.0 go-module (+2 duplicates) +github.com/miekg/pkcs11 v1.1.2 go-module +github.com/mistifyio/go-zfs/v3 v3.0.1 go-module +github.com/moby/buildkit v0.33.1 go-module +github.com/moby/docker-image-spec v1.3.1 go-module +github.com/moby/extensions v0.0.0-20261020100352-d2819d88bcbe go-module +github.com/moby/go-archive v0.3.3 go-module +github.com/moby/locker v1.0.1 go-module (+3 duplicates) +github.com/moby/moby/api v1.57.0 go-module +github.com/moby/moby/client v0.6.3 go-module +github.com/moby/moby/v2/cmd/docker-proxy UNKNOWN go-module +github.com/moby/moby/v2/cmd/dockerd UNKNOWN go-module +github.com/moby/patternmatcher v0.6.1 go-module +github.com/moby/spdystream v0.5.1 go-module +github.com/moby/sys/atomicwriter v0.1.0 go-module +github.com/moby/sys/capability v0.4.0 go-module +github.com/moby/sys/capability v0.5.0 go-module +github.com/moby/sys/mountinfo v0.7.2 go-module (+4 duplicates) +github.com/moby/sys/sequential v0.7.0 go-module +github.com/moby/sys/signal v0.7.1 go-module (+3 duplicates) +github.com/moby/sys/symlink v0.3.0 go-module (+1 duplicate) +github.com/moby/sys/user v0.4.0 go-module +github.com/moby/sys/user v0.4.1 go-module (+3 duplicates) +github.com/moby/sys/userns v0.2.1 go-module (+5 duplicates) +github.com/moby/term v0.5.2 go-module +github.com/morikuni/aec v1.1.0 go-module +github.com/mrunalp/fileutils v0.5.1 go-module +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 go-module (+1 duplicate) +github.com/opencontainers/cgroups v0.1.0 go-module +github.com/opencontainers/go-digest v1.0.0 go-module (+4 duplicates) +github.com/opencontainers/image-spec v1.1.1 go-module (+4 duplicates) +github.com/opencontainers/runc UNKNOWN go-module +github.com/opencontainers/runtime-spec v1.3.0 go-module (+4 duplicates) +github.com/opencontainers/selinux v1.13.1 go-module +github.com/opencontainers/selinux v1.15.1 go-module +github.com/pelletier/go-toml/v2 v2.4.3 go-module (+1 duplicate) +github.com/pkg/errors v0.9.1 go-module +github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 go-module +github.com/prometheus/client_golang v1.24.1 go-module (+1 duplicate) +github.com/prometheus/client_model v0.6.2 go-module (+1 duplicate) +github.com/prometheus/common v0.70.1 go-module (+1 duplicate) +github.com/prometheus/procfs v0.21.1 go-module (+1 duplicate) +github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 go-module +github.com/seccomp/libseccomp-golang v0.12.0 go-module +github.com/secure-systems-lab/go-securesystemslib v0.11.0 go-module +github.com/shibumi/go-pathspec v1.3.0 go-module +github.com/sirupsen/logrus v1.10.2 go-module (+4 duplicates) +github.com/sirupsen/logrus v1.9.4 go-module +github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 go-module +github.com/smallstep/pkcs7 v0.2.1 go-module +github.com/spf13/cobra v1.10.2 go-module +github.com/spf13/pflag v1.0.10 go-module +github.com/stefanberger/go-pkcs11uri v0.0.0-20230803200340-78284954bff6 go-module +github.com/tchap/go-patricia/v2 v2.3.3 go-module +github.com/tetratelabs/wazero v1.11.0 go-module +github.com/tilt-dev/fsnotify v1.4.8-0.20220602155310-fff9c274a375 go-module +github.com/tonistiigi/fsutil v0.0.0-20260819142231-83cac42c1c52 go-module +github.com/tonistiigi/go-csvvalue v0.0.0-20240814133006-030d3b2625d0 go-module +github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea go-module +github.com/tonistiigi/vt100 v0.0.0-20240514184818-90bafcd6abab go-module +github.com/urfave/cli v1.22.17 go-module +github.com/urfave/cli/v3 v3.11.0 go-module (+2 duplicates) +github.com/vishvananda/netlink v1.3.1 go-module (+1 duplicate) +github.com/vishvananda/netns v0.0.5 go-module (+1 duplicate) +github.com/x448/float16 v0.8.4 go-module (+1 duplicate) +github.com/xhit/go-str2duration/v2 v2.1.0 go-module +glib-networking 1:2.90.1-1 alpm +glib2 2.90.2-1 alpm +glibc 2.44+r78+gfcfb867c58ab-1 alpm +glibc-locales 2.44+r78+gfcfb867c58ab-1 alpm +glslang 1:1.4.363.0-1 alpm +glycin 2.2.6-2 alpm +gmp 6.3.0-3 alpm +gnulib-l10n 20241231-1 alpm +gnupg 2.4.9-4 alpm +gnutls 3.8.14-1 alpm +go.etcd.io/bbolt v1.5.0 go-module +go.opentelemetry.io/auto/sdk v1.2.1 go-module (+3 duplicates) +go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.71.0 go-module (+2 duplicates) +go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.71.0 go-module +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.71.0 go-module (+3 duplicates) +go.opentelemetry.io/otel v1.46.0 go-module (+3 duplicates) +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v1.46.0 go-module +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v1.46.0 go-module +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.46.0 go-module (+1 duplicate) +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.46.0 go-module (+1 duplicate) +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.46.0 go-module (+1 duplicate) +go.opentelemetry.io/otel/metric v1.46.0 go-module (+3 duplicates) +go.opentelemetry.io/otel/sdk v1.46.0 go-module (+1 duplicate) +go.opentelemetry.io/otel/sdk/metric v1.46.0 go-module +go.opentelemetry.io/otel/trace v1.46.0 go-module (+3 duplicates) +go.opentelemetry.io/proto/otlp v1.11.0 go-module (+1 duplicate) +go.uber.org/mock v0.6.0 go-module +go.yaml.in/yaml/v2 v2.4.4 go-module (+1 duplicate) +go.yaml.in/yaml/v3 v3.0.5 go-module (+2 duplicates) +go.yaml.in/yaml/v4 v4.0.0 go-module +gobject-introspection 1.86.0-2 alpm +gobject-introspection-runtime 1.86.0-2 alpm +golang.org/x/crypto v0.56.0 go-module +golang.org/x/crypto v0.57.0 go-module +golang.org/x/mod v0.41.0 go-module +golang.org/x/net v0.55.0 go-module +golang.org/x/net v0.58.0 go-module (+3 duplicates) +golang.org/x/net v0.60.0 go-module +golang.org/x/sync v0.23.0 go-module (+3 duplicates) +golang.org/x/sync v0.25.0 go-module +golang.org/x/sys v0.46.0 go-module +golang.org/x/sys v0.48.0 go-module (+3 duplicates) +golang.org/x/sys v0.50.0 go-module +golang.org/x/term v0.45.0 go-module +golang.org/x/text v0.41.0 go-module (+2 duplicates) +golang.org/x/text v0.42.0 go-module +golang.org/x/time v0.16.0 go-module (+1 duplicate) +google-crc32c 1.9.0 python +google.golang.org/genproto/googleapis/api v0.0.0-20260825221802-da73d73af1c5 go-module (+1 duplicate) +google.golang.org/genproto/googleapis/rpc v0.0.0-20260825221802-da73d73af1c5 go-module (+4 duplicates) +google.golang.org/grpc v1.83.2 go-module (+3 duplicates) +google.golang.org/grpc v1.85.0 go-module +google.golang.org/protobuf v1.36.12 go-module (+4 duplicates) +gopkg.in/inf.v0 v0.9.1 go-module (+1 duplicate) +gopkg.in/ini.v1 v1.67.3 go-module +gotest.tools/v3 v3.5.2 go-module +gperftools 2.19.3-1 alpm +gpgme 2.3.1-1 alpm +gpgmepp 2.2.0-1 alpm +graphene 1.10.8-2 alpm +graphite 1:1.3.15-1 alpm +grep 3.12-2 alpm +groff 1.24.2-1 alpm +gsettings-desktop-schemas 51.0-1 alpm +gsettings-system-schemas 51.0-1 alpm +gsm 1.0.24-1 alpm +gst-plugins-base-libs 1.28.9-3 alpm +gstreamer 1.28.9-3 alpm +gtest 1.18.0-1 alpm +gtk-update-icon-cache 1:4.24.2-1 alpm +gtk3 1:3.24.52-2 alpm +guile 3.0.11-1 alpm +gumbo-parser 0.14.1-1 alpm +gzip 1.15-1 alpm +h11 0.16.0 python +harfbuzz 15.2.0-1 alpm +hdf5 2.3.0-1 alpm +hicolor-icon-theme 0.18-1 alpm +hidapi 0.15.0-1 alpm +highway 1.4.0-1 alpm +httpcore 1.0.9 python +httptools 0.9.0 python +httpx 0.29.0 python +hunspell 1.7.6-1 alpm +hwdata 0.412-1 alpm +hwloc 2.16.0-1 alpm +i2c-tools 4.4-4 alpm +iana-etc 20260617-1 alpm +icu 78.3-1 alpm +idna 3.20 python +iio-sensor-proxy 3.9-1 alpm +imath 3.2.3-1 alpm +imlib2 1.13.0-2 alpm +inetutils 2.8-1 alpm +intel-gmmlib 22.10.2-1 alpm +intel-media-driver 26.3.5-1 alpm +iproute2 7.3.0-1 alpm +iptables 1:1.8.13-1 alpm +iso-codes 4.20.1-1 alpm +jack2 1.9.22-2 alpm +jansson 2.15.1-1 alpm +jaraco-collections 5.1.0 python +jaraco-context 6.1.3.dev0+g098f39c91.d20260403 python +jaraco-functools 4.1.0 python +jaraco-text 4.0.0 python +jarhdf5 2.3.0 java-archive +jbigkit 2.2-1 alpm +jpegxl UNKNOWN java-archive +jq 1.8.2-1 alpm +js 1.0.0 npm +json-c 0.19-1 alpm +json-glib 1.10.8-1 alpm +jsoncpp 1.9.8-1 alpm +k8s.io/apimachinery v0.37.0 go-module (+2 duplicates) +k8s.io/client-go v0.37.0 go-module +k8s.io/component-base v0.37.0 go-module +k8s.io/cri-api v0.37.0 go-module (+1 duplicate) +k8s.io/cri-client v0.37.0 go-module +k8s.io/cri-streaming v0.37.0 go-module +k8s.io/klog/v2 v2.140.0 go-module (+1 duplicate) +k8s.io/streaming v0.37.0 go-module +k8s.io/utils v0.0.0-20260626114624-be93311217bd go-module (+1 duplicate) +kaccounts-integration 26.08.3-1 alpm +kactivitymanagerd 6.8.3-1 alpm +karchive 6.32.0-1 alpm +kate 26.08.3-1 alpm +kauth 6.32.0-1 alpm +kbd 2.10.0-1 alpm +kbookmarks 6.32.0-1 alpm +kcmutils 6.32.0-1 alpm +kcodecs 6.32.0-1 alpm +kcolorscheme 6.32.0-1 alpm +kcompletion 6.32.0-1 alpm +kconfig 6.32.0-1 alpm +kconfigwidgets 6.32.0-1 alpm +kcoreaddons 6.32.0-1 alpm +kcrash 6.32.0-1 alpm +kdbusaddons 6.32.0-1 alpm +kde-cli-tools 6.8.3-1 alpm +kdeclarative 6.32.0-1 alpm +kdecoration 6.8.3-1 alpm +kded 6.32.0-1 alpm +kdesu 6.32.0-1 alpm +kdnssd 6.32.0-1 alpm +kdsoap 2.3.0-1 alpm +kdsoap-ws-discovery-client 0.4.0-3 alpm +kernel.org/pub/linux/libs/security/libcap/cap v1.2.78 go-module +kernel.org/pub/linux/libs/security/libcap/psx v1.2.78 go-module +keyutils 1.6.3-4 alpm +kfilemetadata 6.32.0-1 alpm +kglobalaccel 6.32.0-1 alpm +kglobalacceld 6.8.3-1 alpm +kguiaddons 6.32.0-1 alpm +kholidays 1:6.32.0-1 alpm +ki18n 6.32.0-1 alpm +kiconthemes 6.32.0-1 alpm +kidletime 6.32.0-1 alpm +kio 6.32.0-1 alpm +kio-extras 26.08.3-1 alpm +kio-fuse 5.1.1-2 alpm +kirigami 6.32.0-1 alpm +kirigami-addons 1.16.1-1 alpm +kitemmodels 6.32.0-1 alpm +kitemviews 6.32.0-1 alpm +kjobwidgets 6.32.0-1 alpm +kmenuedit 6.8.3-1 alpm +kmod 34.4-1 alpm +knewstuff 6.32.0-1 alpm +knighttime 6.8.3-1 alpm +knotifications 6.32.0-1 alpm +knotifyconfig 6.32.0-1 alpm +konsole 26.08.3-1 alpm +kpackage 6.32.0-1 alpm +kparts 6.32.0-1 alpm +kpipewire 6.8.3-1 alpm +kpty 6.32.0-1 alpm +kquickcharts 6.32.0-1 alpm +krb5 1.22.2-2 alpm +krunner 6.32.0-1 alpm +kscreenlocker 6.8.3-1 alpm +kservice 6.32.0-1 alpm +kstatusnotifieritem 6.32.0-1 alpm +ksvg 6.32.0-1 alpm +ksystemstats 6.8.3-1 alpm +ktexteditor 6.32.0-1 alpm +ktextwidgets 6.32.0-1 alpm +kunitconversion 6.32.0-1 alpm +kuserfeedback 6.32.0-1 alpm +kvantum 1.1.9-1 alpm +kwallet 6.32.0-1 alpm +kwayland 6.8.3-1 alpm +kwidgetsaddons 6.32.0-1 alpm +kwin 6.8.3-3 alpm +kwindowsystem 6.32.0-1 alpm +kxmlgui 6.32.0-1 alpm +l-smash 2.14.5-4 alpm +labwc 0.20.3-2 alpm +lame 4.0-1 alpm +layer-shell-qt 6.8.3-2 alpm +lcms2 2.20-1 alpm +ldb 2:4.25.1-1 alpm +leancrypto 1.9.1-1 alpm +less 1:710-1 alpm +libaccounts-glib 1.27-3 alpm +libaccounts-qt 1.17-2 alpm +libaec 1.1.7-1 alpm +libarchive 3.8.11-2 alpm +libasan 16.2.1+r23+gd564253eb6c8-1 alpm +libass 0.17.5-1 alpm +libassuan 3.0.0-1 alpm +libasyncns 1:0.8+r3+g68cd5af-3 alpm +libatasmart 0.19-8 alpm +libatomic 16.2.1+r23+gd564253eb6c8-1 alpm +libavc1394 0.5.4-7 alpm +libb2 0.98.1-3 alpm +libblake3 1.8.7-1 alpm +libblockdev 3.6.0-1 alpm +libblockdev-crypto 3.6.0-1 alpm +libblockdev-fs 3.6.0-1 alpm +libblockdev-loop 3.6.0-1 alpm +libblockdev-mdraid 3.6.0-1 alpm +libblockdev-nvme 3.6.0-1 alpm +libblockdev-part 3.6.0-1 alpm +libblockdev-smart 3.6.0-1 alpm +libblockdev-swap 3.6.0-1 alpm +libbluray 1.5.1-1 alpm +libbluray-awt-j2se 1.5.1 java-archive +libbluray-j2se 1.5.1 java-archive +libbpf 1.8.0-1 alpm +libbs2b 3.1.0-11 alpm +libbsd 0.12.2-2 alpm +libbytesize 2.12-3 alpm +libcacard 2.8.1-1 alpm +libcanberra 1:0.30+r2+gc0620e4-6 alpm +libcap 2.78-1 alpm +libcap-ng 0.9.6-1 alpm +libcgif 0.5.4-1 alpm +libcloudproviders 0.4.2-1 alpm +libcolord 1.4.8-2 alpm +libcups 2:2.4.20-2 alpm +libcupsfilters 2.2.1.r108.g3bf18925-1 alpm +libdaemon 0.14-6 alpm +libdatrie 0.2.14-1 alpm +libdecor 0.2.5-1 alpm +libdeflate 1.26-1 alpm +libdisplay-info 0.3.0-1 alpm +libdmtx 0.7.8-1 alpm +libdovi 3.4.0-1 alpm +libdrm 2.4.134-1 alpm +libdvdnav 7.0.0-1 alpm +libdvdread 7.1.1-1 alpm +libedit 20260512_3.1-1 alpm +libei 1.6.0-2 alpm +libelf 0.197-1 alpm +libepoxy 1.5.10-3 alpm +libev 4.33-5 alpm +libevdev 1.14.0-1 alpm +libevent 2.1.13-3 alpm +libexif 0.6.26-1 alpm +libffi 3.8.1-1 alpm +libfontenc 1.1.10-1 alpm +libfyaml 0.9.6-3 alpm +libgcc 16.2.1+r23+gd564253eb6c8-1 alpm +libgcrypt 1.12.4-1 alpm +libgfortran 16.2.1+r23+gd564253eb6c8-1 alpm +libgirepository 1.86.0-2 alpm +libgit2 1:1.9.7-2 alpm +libglvnd 1.7.0-3 alpm +libgomp 16.2.1+r23+gd564253eb6c8-1 alpm +libgpg-error 1.61-1 alpm +libgudev 238-4 alpm +libhwasan 16.2.1+r23+gd564253eb6c8-1 alpm +libice 1.1.2-1 alpm +libidn2 2.3.8-1 alpm +libiec61883 1.2.0-9 alpm +libimagequant 4.4.1-2 alpm +libimobiledevice 1.4.0-3 alpm +libimobiledevice-glue 1.3.2-1 alpm +libinih 62-2 alpm +libinput 1.32.0-2 alpm +libisl 0.28-1 alpm +libjpeg-turbo 3.2.1-1 alpm +libjxl 0.13.0-1 alpm +libkexiv2 26.08.3-1 alpm +libksba 1.8.1-1 alpm +libkscreen 6.8.3-1 alpm +libksysguard 6.8.3-1 alpm +libldap 2.7.2-3 alpm +libliftoff 0.5.0-1 alpm +liblsan 16.2.1+r23+gd564253eb6c8-1 alpm +libmakepkg-dropins 20-2 alpm +libmatio 1.5.30-1 alpm +libmbim 1.34.0-2 alpm +libmd 1.3.0-1 alpm +libmicrohttpd 1.0.11-1 alpm +libmnl 1.0.5-2 alpm +libmodplug 0.8.9.2-1 alpm +libmpc 1.4.1-1 alpm +libmtp 1.1.23-1 alpm +libnetfilter_conntrack 1.1.1-1 alpm +libnfnetlink 1.0.2-2 alpm +libnftnl 1.3.2-1 alpm +libnghttp2 1.71.0-1 alpm +libnghttp3 1.19.0-1 alpm +libngtcp2 1.26.0-2 alpm +libnl 3.12.0-1 alpm +libnotify 0.8.9-1 alpm +libnsl 2.0.1-2 alpm +libnvme 1.16.2-3 alpm +libobjc 16.2.1+r23+gd564253eb6c8-1 alpm +libogg 1.3.6-1 alpm +libopenmpt 0.8.10-1 alpm +libp11-kit 0.26.6-1 alpm +libpackagekit-glib 1.4.1-1 alpm +libpaper 2.2.8-1 alpm +libpathrs 0.2.6-1 alpm +libpcap 1.11.0-1 alpm +libpciaccess 0.19-1 alpm +libpgm 5.3.128-4 alpm +libpipewire 1:1.6.12-1 alpm +libplacebo 7.387.0-1 alpm +libplasma 6.8.3-1 alpm +libplist 2.7.0-3 alpm +libpng 1.6.59-1 alpm +libppd 2.1.1-2 alpm +libproxy 0.5.12-1 alpm +libpsl 0.21.5-2 alpm +libpulse 17.0+r134+g77d25a1e6-2 alpm +libqaccessibilityclient-qt6 0.6.0-4 alpm +libqalculate 5.13.2-1 alpm +libqmi 1.38.0-2 alpm +libqrtr-glib 1.4.0-2 alpm +libquadmath 16.2.1+r23+gd564253eb6c8-1 alpm +libraw 0.22.3-1 alpm +libraw1394 2.1.2-4 alpm +librist 0.2.20-1 alpm +librsvg 2:2.63.4-1 alpm +libsamplerate 0.2.2-3 alpm +libsasl 2.1.28-6 alpm +libseccomp 2.6.2-1 alpm +libsecret 0.21.8.2-1 alpm +libsfdo 0.1.4-1 alpm +libsm 1.2.6-1 alpm +libsndfile 1.2.2-4 alpm +libsodium 1.0.22-1 alpm +libsoup3 3.8.1-1 alpm +libsoxr 0.1.3-5 alpm +libssc 0.4.4-1 alpm +libssh 0.12.2-2 alpm +libssh2 1.11.1-8 alpm +libstdc++ 16.2.1+r23+gd564253eb6c8-1 alpm +libstemmer 3.2.0-1 alpm +libsysprof-capture 51.0-1 alpm +libtasn1 4.21.0-1 alpm +libtatsu 1.0.5-1 alpm +libthai 0.1.30-1 alpm +libtheora 1.2.0-1 alpm +libtiff 4.7.2-2 alpm +libtirpc 1.3.8-1 alpm +libtommath 1.3.0-2 alpm +libtool 2.6.2-5 alpm +libtsan 16.2.1+r23+gd564253eb6c8-1 alpm +libubsan 16.2.1+r23+gd564253eb6c8-1 alpm +libunibreak 7.0-1 alpm +libunistring 1.4.2-1 alpm +libunwind 1.8.3-1 alpm +liburing 2.15-1 alpm +libusb 1.0.30-1 alpm +libusbmuxd 2.1.1-2 alpm +libutempter 1.2.3-1 alpm +libutf8proc 2.12.0-1 alpm +libuv 1.53.0-1 alpm +libva 2.24.1-1 alpm +libva-intel-driver 2.4.5-1 alpm +libva-utils 2.24.0-1 alpm +libvdpau 1.5-4 alpm +libverto 0.3.2-6 alpm +libvips 8.18.7-2 alpm +libvorbis 1.3.7-4 alpm +libvpl 2.17.0-1 alpm +libvpx 1.17.0-1 alpm +libwacom 2.20.0-1 alpm +libwbclient 2:4.25.1-1 alpm +libwebp 1.6.0-2 alpm +libwireplumber 0.5.19-1 alpm +libx11 1.8.14-1 alpm +libxau 1.0.12-1 alpm +libxaw 1.0.16-2 alpm +libxcb 1.17.0-1 alpm +libxcomposite 0.4.7-1 alpm +libxcrypt 4.5.2-1 alpm +libxcursor 1.2.3-1 alpm +libxcvt 0.1.3-1 alpm +libxdamage 1.1.7-1 alpm +libxdmcp 1.1.5-2 alpm +libxext 1.3.7-1 alpm +libxfce4util 4.20.1-1 alpm +libxfixes 6.0.2-1 alpm +libxfont2 2.0.10-1 alpm +libxft 2.3.9-1 alpm +libxi 1.8.4-1 alpm +libxinerama 1.1.6-1 alpm +libxkbcommon 1.13.2-1 alpm +libxkbcommon-x11 1.13.2-1 alpm +libxkbfile 1.2.0-1 alpm +libxml2 2.15.4-1 alpm +libxmlb 0.3.30-1 alpm +libxmu 1.3.1-1 alpm +libxpm 3.5.20-1 alpm +libxrandr 1.5.5-1 alpm +libxrender 0.9.13-1 alpm +libxshmfence 1.3.3-1 alpm +libxslt 1.1.45-3 alpm +libxss 1.2.5-1 alpm +libxt 1.3.1-1 alpm +libxtst 1.2.6-1 alpm +libxv 1.0.13-1 alpm +libxvmc 1.0.15-1 alpm +libxxf86vm 1.1.7-1 alpm +libzip 1.11.4-2 alpm +linux-api-headers 7.3-1 alpm +lit 23.1.5.dev0 python +litehtml 0.10-2 alpm +lld 23.1.5-1 alpm +llhttp 9.3.1-1 alpm +llvm 23.1.5-1 alpm +llvm-libs 23.1.5-1 alpm +llvm-lit 23.1.5-1 alpm +lm_sensors 1:3.6.2-1 alpm +lmdb 0.9.35-1 alpm +lua 5.5.1-1 alpm +lz4 1:1.11.1-1 alpm +lzo 2.10-5 alpm +m4 1.4.21-2 alpm +mailcap 2.1.54-3 alpm +make 4.4.1-3 alpm +mako 1.4.3.dev0 python +markdown 3.11.4 python +markupsafe 3.0.4 python +mbedtls3 3.6.8-1 alpm +md4c 0.6.0-2 alpm +mdadm 4.6-2 alpm +media-player-info 26-1 alpm +mesa 1:26.3.1-3 alpm +milou 6.8.3-1 alpm +minizip 1:1.4-1 alpm +more-itertools 11.2.1 python +mpdecimal 4.0.1-3 alpm +mpfr 4.2.2-1 alpm +mpg123 1.33.7-1 alpm +msgpack 1.2.4 python +mtdev 1.1.7-1 alpm +multidict 7.2.1 python +ncurses 6.6-2 alpm +nettle 4.0-1 alpm +nftables 0.1 python +nftables 1:1.1.7-3 alpm +nginx 1.30.8-1 alpm +nginx-mod-fancyindex 0.5.2-1 alpm +nginx-mod-fancyindex-debug 0.5.2-1 alpm +noto-fonts 1:2026.11.01-1 alpm +noto-fonts-cjk 20240730-1 alpm +noto-fonts-emoji 1:20260924-1 alpm +npth 1.8-1 alpm +nspr 4.41-1 alpm +nss 3.134-1 alpm +numactl 2.0.19-1 alpm +nvidia-ml-py 13.615.71 python +ocean-sound-theme 6.8.3-1 alpm +ocl-icd 2.3.5-1 alpm +onetbb 2023.2.0-1 alpm +oniguruma 6.9.10-3 alpm +openbox 3.6.1-14 alpm +openbsd-netcat 1.239_1-1 alpm +opencore-amr 0.1.6-2 alpm +openexr 3.5.5-1 alpm +openh264 2.7.0-1 alpm +openjpeg2 2.5.4-1 alpm +openjph 0.33.0-1 alpm +openssh 10.6p2-1 alpm +openssl 4.1.0-1 alpm +openssl-3 3.5.9-2 alpm +opentelemetry-api 1.45.2 python +opus 1.6.1-1 alpm +orc 0.4.44-1 alpm +p11-kit 0.26.6-1 alpm +packagekit 1.4.1-1 alpm +packaging 26.4 python +pacman 7.1.0.r9.g54d9411-4 alpm +pacman-mirrorlist 20260610-1 alpm +pam 1.7.3-1 alpm +pambase 20260616-1 alpm +pango 1:1.58.2-1 alpm +papirus-icon-theme 20260801-1 alpm +parted 3.8-1 alpm +patch 2.8.1-1 alpm +pciutils 3.15.0-1 alpm +pcmflux 2.2.1 python +pcre2 10.49-1 alpm +pcsclite 2.5.4-1 alpm +pdfio 1.6.7-1 alpm +pelorus 0.2.3 python +perl 5.44.0-1 alpm +pillow 13.0.0 python +pinentry 1.3.3-1 alpm +pip 26.2.2 python +pipewire 1:1.6.12-1 alpm +pixelflux 2.2.3 python +pixman 0.46.4-1 alpm +pkgconf 3.0.11-1 alpm +plasma-activities 6.8.3-1 alpm +plasma-activities-stats 6.8.3-1 alpm +plasma-desktop 6.8.3-1 alpm +plasma-integration 6.8.3-2 alpm +plasma-workspace 6.8.3-1 alpm +plasma5support 6.8.3-2 alpm +platformdirs 4.14.8 python +polkit 128-1 alpm +polkit-kde-agent 6.8.3-1 alpm +polkit-qt6 0.201.1-1 alpm +poppler 26.11.0-1 alpm +poppler-qt6 26.11.0-1 alpm +popt 1.19-2 alpm +portaudio 1:19.7.0-4 alpm +powerdevil 6.8.3-1 alpm +prison 6.32.0-1 alpm +procps-ng 4.0.7-1 alpm +prometheus-client 0.26.0 python +propcache 0.5.4 python +protobuf 36.1-1 alpm +protobuf-c 1.5.2-15 alpm +psmisc 23.7-2 alpm +psutil 7.2.2 python +pulseaudio 17.0+r134+g77d25a1e6-2 alpm +pulsectl 24.12.0 python +pulsectl-asyncio 1.3.2 python +purpose 6.32.0-1 alpm +pycparser 3.12 python +pydantic 2.14.4 python +pydantic-core 2.50.5 python +pyee 16.1.0 python +pygobject 3.58.1 python +pylibsrtp 1.1.0 python +pyopenssl 26.4.0 python +python 3.14.10-1 alpm +python-autocommand 2.2.2-9 alpm +python-dotenv 1.2.4 python +python-gobject 3.58.1-1 alpm +python-jaraco.collections 5.1.0-3 alpm +python-jaraco.context 6.1.2-1 alpm +python-jaraco.functools 4.1.0-3 alpm +python-jaraco.text 4.0.0-4 alpm +python-mako 1.4.3-1 alpm +python-markdown 3.11.4-1 alpm +python-markupsafe 3.0.4-1 alpm +python-more-itertools 11.2.1-1 alpm +python-packaging 26.4-1 alpm +python-platformdirs 4.14.8-1 alpm +python-setuptools 1:84.2.1-1 alpm +python-wheel 0.48.0-1 alpm +pyyaml 6.0.4 python +qca-qt6 2.3.12-3 alpm +qcoro 0.13.0-2 alpm +qqc2-breeze-style 6.8.3-1 alpm +qqc2-desktop-style 6.32.0-1 alpm +qrencode 4.1.1-4 alpm +qt6-5compat 6.12.1-1 alpm +qt6-base 6.12.1-1 alpm +qt6-declarative 6.12.1-1 alpm +qt6-location 6.12.1-1 alpm +qt6-multimedia 6.12.1-1 alpm +qt6-multimedia-ffmpeg 6.12.1-1 alpm +qt6-positioning 6.12.1-1 alpm +qt6-shadertools 6.12.1-1 alpm +qt6-speech 6.12.1-1 alpm +qt6-svg 6.12.1-1 alpm +qt6-tools 6.12.1-1 alpm +qt6-translations 6.12.1-1 alpm +qt6-virtualkeyboard 6.12.1-1 alpm +qt6-webchannel 6.12.1-1 alpm +qt6-webengine 6.140.0-2 alpm +qt6-websockets 6.12.1-1 alpm +qt6-webview 6.12.1-1 alpm +rav1e 0.8.1-3 alpm +re2 2:2025.11.05-6 alpm +readline 8.3.6-1 alpm +rhash 1.4.6-1 alpm +ripgrep 16.0.0-1 alpm +ripgrep-all 0.10.10-3 alpm +rtkit 0.14-2 alpm +rubberband 4.0.0-2 alpm +runc 1.5.3-1 alpm +rust 1:1.100.1-1 alpm +sdl2-compat 2.32.74-1 alpm +sdl3 3.4.22-1 alpm +seatd 0.9.3-1 alpm +sed 4.10-2 alpm +selkies 2.2.1 python +setuptools 84.2.1 python +shaderc 2026.4-1 alpm +shadow 4.20.0.arch1-1 alpm +shared-mime-info 2.5.1-2 alpm +signon-kwallet-extension 26.08.3-1 alpm +signon-plugin-oauth2 0.25-4 alpm +signon-ui 0.17+20231016-4 alpm +signond 8.61-4 alpm +sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 go-module (+1 duplicate) +sigs.k8s.io/yaml v1.6.0 go-module (+1 duplicate) +simdutf 9.3.3-1 alpm +slf4j-api 2.0.16 java-archive +slf4j-nop 2.0.16 java-archive +slf4j-simple 2.0.16 java-archive +smbclient 2:4.25.1-1 alpm +smbus 1.1 python +snappy 1.3.1-1 alpm +sndio 1.11.0-1 alpm +solid 6.32.0-1 alpm +sonnet 6.32.0-1 alpm +sound-theme-freedesktop 0.8-6 alpm +source-highlight 3.1.9-19 alpm +speex 1.2.1-3 alpm +speexdsp 1.2.1-3 alpm +spice 0.16.0-5 alpm +spice-protocol 0.14.5-1 alpm +spirv-tools 1:1.4.363.0-1 alpm +sqlite 3.54.1-1 alpm +srt 1.5.7-3 alpm +st 0.9.3-1 alpm +st-debug 0.9.3-1 alpm +starlette 1.10.0 python +startup-notification 0.12-9 alpm +stdlib go1.26.1-X:nodwarf5 go-module +stdlib go1.27.2-X:nodwarf5 go-module (+3 duplicates) +stdlib go1.27.4-X:nodwarf5 go-module (+4 duplicates) +sudo 1.9.17.p2-7 alpm +svt-av1 4.3.0-1 alpm +syndication 6.32.0-1 alpm +syntax-highlighting 6.32.0-1 alpm +systemd 262.2-1 alpm +systemd-libs 262.2-1 alpm +systemsettings 6.8.3-1 alpm +taglib 2.3.2-1 alpm +tags.cncf.io/container-device-interface v1.1.1 go-module (+1 duplicate) +tags.cncf.io/container-device-interface v1.1.2 go-module +tags.cncf.io/container-device-interface/specs-go v1.1.1 go-module (+1 duplicate) +talloc 2.5.0-2 alpm +tar 1.35-5 alpm +tbb 2023.2.0 python +tdb 1.4.15-2 alpm +tevent 1:0.17.2-2 alpm +texinfo 7.3-3 alpm +tinysparql 3.12.0-1 alpm +tpm2-tss 4.2.2s-2 alpm +tslib 1.24-1 alpm +ttf-hack 3.003-7 alpm +ttf-liberation 2.1.5-2 alpm +typing-extensions 4.16.0 python +typing-inspection 0.4.5 python +tzdata 2026f-1 alpm +udisks2 2.12.0-1 alpm +union 6.8.3-1 alpm +upower 1.91.5-1 alpm +util-linux 2.42.4-1 alpm +util-linux-libs 2.42.4-1 alpm +uvicorn 0.54.0 python +uvloop 0.23.0 python +v4l-utils 1.32.0-2 alpm +vapoursynth 81 python +vapoursynth 81-1 alpm +vid.stab 1.1.2-1 alpm +vmaf 3.2.1-1 alpm +volume_key 0.3.12-12 alpm +vulkan-icd-loader 1.4.363.0-1 alpm +vulkan-intel 1:26.3.1-3 alpm +vulkan-mesa-implicit-layers 1:26.3.1-3 alpm +vulkan-radeon 1:26.3.1-3 alpm +vulkan-tools 1.4.363.0-1 alpm +watchdog 7.1.1 python +watchfiles 1.3.0 python +wayland 1.26.0-1 alpm +wayland-protocols 1.50-1 alpm +webrtc-audio-processing-1 1.3-6 alpm +websockets 17.4 python +wheel 0.48.0 python +which 2.25-1 alpm +wireplumber 0.5.19-1 alpm +wl-clipboard 1:2.3.0-1 alpm +wlr-randr 0.5.0-1 alpm +wlroots0.20 0.20.2-1 alpm +x264 3:0.165.r3222.b35605a-2 alpm +x265 4.3-1 alpm +xcb-proto 1.17.0-4 alpm +xcb-util 0.4.1-2 alpm +xcb-util-cursor 0.1.6-1 alpm +xcb-util-errors 1.0.1-2 alpm +xcb-util-image 0.4.1-3 alpm +xcb-util-keysyms 0.4.1-5 alpm +xcb-util-renderutil 0.3.10-2 alpm +xcb-util-wm 0.4.2-2 alpm +xclip 0.13-6 alpm +xcursor-themes 1.0.7-2 alpm +xdg-desktop-portal 1.22.1-2 alpm +xdg-desktop-portal-kde 6.8.3-1 alpm +xdg-user-dirs 0.20-1 alpm +xdg-utils 1.2.1-2 alpm +xdotool 4.20260303.1-1 alpm +xf86-input-libinput 1.5.0-1 alpm +xf86-video-amdgpu 25.0.0-1 alpm +xf86-video-ati 1:22.0.0-3 alpm +xf86-video-intel 1:2.99.917+939+g4a64400e-1 alpm +xf86-video-nouveau 1.0.18-1 alpm +xf86-video-qxl 0.1.6-3 alpm +xfconf 4.20.0-2 alpm +xkeyboard-config 2.49-1 alpm +xorg-font-util 1.4.2-1 alpm +xorg-fonts-100dpi 1.0.4-3 alpm +xorg-fonts-75dpi 1.0.4-2 alpm +xorg-fonts-alias-100dpi 1.0.6-1 alpm +xorg-fonts-alias-75dpi 1.0.6-1 alpm +xorg-fonts-alias-misc 1.0.6-1 alpm +xorg-fonts-encodings 1.1.0-2 alpm +xorg-fonts-misc 1.0.4-2 alpm +xorg-server 21.1.26-1 alpm +xorg-server-common 21.1.26-1 alpm +xorg-server-xvfb 21.1.26-1 alpm +xorg-setxkbmap 1.3.5-1 alpm +xorg-xauth 1.1.5-1 alpm +xorg-xhost 1.0.10-1 alpm +xorg-xkbcomp 1.5.0-1 alpm +xorg-xmessage 1.0.7-2 alpm +xorg-xprop 1.2.8-1 alpm +xorg-xrandr 1.5.4-1 alpm +xorg-xrdb 1.2.3-1 alpm +xorg-xset 1.2.6-1 alpm +xorg-xwayland 24.1.15-1 alpm +xorgproto 2026.1-1 alpm +xsel 1.2.1-2 alpm +xsettingsd 1.0.4-2 alpm +xterm 411-1 alpm +xvidcore 1.3.7-4 alpm +xxhash 0.8.4-1 alpm +xz 5.8.4-1 alpm +yarl 1.25.1 python +zeromq 4.3.5-3 alpm +zimg 3.0.6-2 alpm +zint 2.16.0-2 alpm +zlib 1:1.4-1 alpm +zstd 1.6.0-1 alpm +zxing-cpp 3.2.0-1 alpm diff --git a/readme-vars.yml b/readme-vars.yml index 28b85b876..1a78df752 100644 --- a/readme-vars.yml +++ b/readme-vars.yml @@ -2,80 +2,7 @@ # project information project_name: webtop -project_url: "https://github.com/linuxserver/docker-webtop" -project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png" -project_blurb: | - [{{ project_name|capitalize }}]({{ project_url }}) - Alpine and Ubuntu based containers containing full desktop environments in officially supported flavors accessible via any modern web browser. -project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}" - -# supported architectures -available_architectures: - - { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"} - - { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"} - - { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"} - -# development version -development_versions: true -development_versions_items: - - { tag: "latest", desc: "XFCE Alpine" } - - { tag: "ubuntu-xfce", desc: "XFCE Ubuntu" } - - { tag: "alpine-kde", desc: "KDE Alpine" } - - { tag: "ubuntu-kde", desc: "KDE Ubuntu" } - - { tag: "alpine-mate", desc: "MATE Alpine" } - - { tag: "ubuntu-mate", desc: "MATE Ubuntu" } - - { tag: "alpine-i3", desc: "i3 Alpine" } - - { tag: "ubuntu-i3", desc: "i3 Ubuntu" } - - { tag: "alpine-openbox", desc: "Openbox Alpine" } - - { tag: "ubuntu-openbox", desc: "Openbox Ubuntu" } - - { tag: "alpine-icewm", desc: "IceWM Alpine" } - - { tag: "ubuntu-icewm", desc: "IceWM Ubuntu" } - -# container parameters -privileged: "optional" -param_container_name: "{{ project_name }}" -param_usage_include_vols: true -param_volumes: - - { vol_path: "/config", vol_host_path: "/path/to/data", desc: "abc users home directory" } -param_usage_include_ports: true -param_ports: - - { external_port: "3000", internal_port: "3000", port_desc: "Web Desktop GUI" } -param_usage_include_env: true -param_env_vars: - - { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"} -# optional variables -opt_param_usage_include_env: true -opt_param_env_vars: - - { env_var: "SUBFOLDER", env_value: "/", desc: "Specify a subfolder to use with reverse proxies, IE `/subfolder/`"} -opt_param_usage_include_vols: true -opt_param_volumes: - - { vol_path: "/var/run/docker.sock", vol_host_path: "/var/run/docker.sock", desc: "Docker Socket on the system, if you want to use Docker in the container" } -opt_custom_params: - - { name: "shm-size", name_compose: "shm_size", value: "1gb",desc: "We set this to 1 gig to prevent modern web browsers from crashing" } - -# application setup block -app_setup_block_enabled: true -app_setup_block: | - The Webtop can be accessed at: - - * http://yourhost:3000/ - - By default the user/pass is abc/abc, if you change your password or want to login manually to the GUI session for any reason use the following link: - - * http://yourhost:3000/?login=true - - You can access advanced features of the Guacamole remote desktop using ctrl+alt+shift enabling you to use remote copy/paste or an onscreen keyboard. - - **Unlike our other containers these Desktops are not designed to be upgraded by Docker, you will keep your home directoy but anything you installed system level will be lost if you upgrade an existing container. To keep packages up to date instead use Ubuntu's own apt program or Alpine's apk program** - - **The KDE and i3 flavors for Ubuntu need to be run in privileged mode to function properly** - - If you ever lose your password you can always reset it by execing into the container as root: - ``` - docker exec -it webtop passwd abc - ``` - By default we perform all logic for the abc user and we reccomend using that user only in the container, but new users can be added as long as there is a `startwm.sh` executable script in their home directory. - All of these containers are configured with passwordless sudo, we make no efforts to secure or harden these containers and we do not reccomend ever publishing their ports to the public Internet. - -# changelog -changelogs: - - { date: "20.04.21:", desc: "Initial release." } +full_custom_readme: | + {% raw -%} + Up to date documentation is available [here](https://github.com/linuxserver/docker-webtop/blob/master/README.md). + {%- endraw %} diff --git a/root/defaults/autostart b/root/defaults/autostart new file mode 100644 index 000000000..ca916d098 --- /dev/null +++ b/root/defaults/autostart @@ -0,0 +1 @@ +exit 0 diff --git a/root/defaults/startwm.sh b/root/defaults/startwm.sh index f60ea511e..58be8a79a 100755 --- a/root/defaults/startwm.sh +++ b/root/defaults/startwm.sh @@ -1,3 +1,3 @@ #!/bin/bash -/usr/bin/pulseaudio --start -/usr/bin/startxfce4 > /dev/null 2>&1 + +xterm -e sh -c 'echo "X11 mode is not supported on Arch KDE, kwin-x11 is no longer packaged for Arch. Set PIXELFLUX_WAYLAND=true to use Wayland mode"; sleep infinity' diff --git a/root/defaults/startwm_wayland.sh b/root/defaults/startwm_wayland.sh new file mode 100755 index 000000000..9540bc98d --- /dev/null +++ b/root/defaults/startwm_wayland.sh @@ -0,0 +1,203 @@ +#!/bin/bash +ulimit -c 0 + +# Disable compositing and screen locking +if [ ! -f $HOME/.config/kwinrc ]; then + kwriteconfig6 --file $HOME/.config/kwinrc --group Compositing --key Enabled false +fi +if [ ! -f $HOME/.config/kscreenlockerrc ]; then + kwriteconfig6 --file $HOME/.config/kscreenlockerrc --group Daemon --key Autolock false +fi + +# Power related +setterm blank 0 +setterm powerdown 0 + +# Setup permissive clipboard rules +KWIN_RULES_FILE="$HOME/.config/kwinrulesrc" +RULE_DESC="wl-clipboard support" +if ! grep -q "$RULE_DESC" "$KWIN_RULES_FILE" 2>/dev/null; then + echo "Applying KWin clipboard rule..." + if command -v uuidgen &> /dev/null; then + RULE_ID=$(uuidgen) + else + RULE_ID=$(cat /proc/sys/kernel/random/uuid) + fi + count=$(kreadconfig6 --file "$KWIN_RULES_FILE" --group General --key count --default 0) + new_count=$((count + 1)) + kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key count "$new_count" + existing_rules=$(kreadconfig6 --file "$KWIN_RULES_FILE" --group General --key rules) + if [ -z "$existing_rules" ]; then + kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key rules "$RULE_ID" + else + kwriteconfig6 --file "$KWIN_RULES_FILE" --group General --key rules "$existing_rules,$RULE_ID" + fi + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key Description "$RULE_DESC" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key wmclass "wl-(copy|paste)" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key wmclassmatch 3 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skiptaskbar --type bool "true" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skiptaskbarrule 2 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skipswitcher --type bool "true" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key skipswitcherrule 2 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key fsplevel 3 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key fsplevelrule 2 + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key noborder --type bool "true" + kwriteconfig6 --file "$KWIN_RULES_FILE" --group "$RULE_ID" --key noborderrule 2 +fi + +# Directories +mkdir -p "${HOME}/.config/autostart" "${HOME}/.XDG" "${HOME}/.local/share/" +chmod 700 "${HOME}/.XDG" +touch "${HOME}/.local/share/user-places.xbel" +if ! mkdir -p /tmp/.X11-unix 2>/dev/null || ! chmod 1777 /tmp/.X11-unix 2>/dev/null; then + sudo mkdir -p /tmp/.X11-unix + sudo chmod 1777 /tmp/.X11-unix +fi + +# Create startup script if it does not exist (keep in sync with openbox) +STARTUP_FILE="${HOME}/.config/autostart/autostart.desktop" +if [ ! -f "${STARTUP_FILE}" ]; then + echo "[Desktop Entry]" > $STARTUP_FILE + echo "Exec=bash /config/.config/openbox/autostart" >> $STARTUP_FILE + echo "Icon=dialog-scripts" >> $STARTUP_FILE + echo "Name=autostart" >> $STARTUP_FILE + echo "Path=" >> $STARTUP_FILE + echo "Type=Application" >> $STARTUP_FILE + echo "X-KDE-AutostartScript=true" >> $STARTUP_FILE + chmod +x $STARTUP_FILE +fi + +# Start user systemd services +if [ -d "$HOME/.config/systemd/user" ]; then + for service_file in "$HOME/.config/systemd/user/"*.service; do + if [ -f "$service_file" ]; then + service_name=$(basename "$service_file") + echo "Initializing $service_name..." + /usr/bin/systemctl start "$service_name" + fi + done +fi + +# Plasma session environment +export XDG_CURRENT_DESKTOP=KDE +export XDG_SESSION_TYPE=wayland +export XDG_MENU_PREFIX=plasma- +export KDE_FULL_SESSION=true +export KDE_SESSION_VERSION=6 +KDE_SESSION_UID="$(id -u)" +export KDE_SESSION_UID +export QT_QPA_PLATFORM=wayland +export DISPLAY=:0 +export MOZ_ENABLE_WAYLAND=0 +export KWIN_WAYLAND_NO_PERMISSION_CHECKS=1 +XCURSOR_THEME=$(kreadconfig6 --file kcminputrc --group Mouse --key cursorTheme --default breeze_cursors) +XCURSOR_SIZE=$(kreadconfig6 --file kcminputrc --group Mouse --key cursorSize --default 24) +export XCURSOR_THEME XCURSOR_SIZE +if [ "${PELORUS,,}" == "true" ]; then + export QT_ACCESSIBILITY=1 + export QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1 + export GTK_MODULES=gail:atk-bridge +fi +if [[ "${LC_ALL:-en_US.UTF-8}" == "en_US.UTF-8" ]]; then + KDE_LANG=$(kreadconfig6 --file plasma-localerc --group Formats --key LANG) + KDE_LANGUAGE=$(kreadconfig6 --file plasma-localerc --group Translations --key LANGUAGE) + if [[ -n "${KDE_LANG}" ]]; then + unset LC_ALL + export LANG="${KDE_LANG}" + fi + if [[ -n "${KDE_LANGUAGE}" ]]; then + export LANGUAGE="${KDE_LANGUAGE}" + fi +fi + +# Plasma environment scripts +for ENV_SCRIPT in /etc/xdg/plasma-workspace/env/*.sh "${HOME}"/.config/plasma-workspace/env/*.sh; do + if [ -r "${ENV_SCRIPT}" ]; then + # shellcheck disable=SC1090 + . "${ENV_SCRIPT}" + fi +done + +# Global theme defaults layer +mkdir -p "${HOME}/.config/kdedefaults" +export XDG_CONFIG_DIRS="${HOME}/.config/kdedefaults:${XDG_CONFIG_DIRS:-/etc/xdg}" + +# CPU rendering: with no render node +if [ -z "$(ls /dev/dri/renderD* /dev/nvidia0 2>/dev/null)" ]; then + CPU_SHARE=$(nproc) + if read -r QUOTA PERIOD < /sys/fs/cgroup/cpu.max 2>/dev/null && [ "${QUOTA}" != "max" ]; then + CPU_SHARE=$(( (QUOTA + PERIOD - 1) / PERIOD )) + elif [ -r /sys/fs/cgroup/cpu/cpu.cfs_quota_us ]; then + QUOTA=$(cat /sys/fs/cgroup/cpu/cpu.cfs_quota_us) + PERIOD=$(cat /sys/fs/cgroup/cpu/cpu.cfs_period_us) + if [ "${QUOTA}" -gt 0 ] && [ "${PERIOD}" -gt 0 ]; then + CPU_SHARE=$(( (QUOTA + PERIOD - 1) / PERIOD )) + fi + fi + [ "${CPU_SHARE}" -lt 1 ] && CPU_SHARE=1 + [ "${CPU_SHARE}" -gt 8 ] && CPU_SHARE=8 + export LP_NUM_THREADS="${LP_NUM_THREADS:-${CPU_SHARE}}" + kwriteconfig6 --file "${HOME}/.config/kdedefaults/kwinrc" --group Plugins --key translucencyEnabled --type bool false + kwriteconfig6 --file "${HOME}/.config/kdedefaults/breezerc" --group Common --key ShadowSize ShadowNone + echo "[startwm] No render node: llvmpipe on ${LP_NUM_THREADS} threads, Qt Quick software backend, shadows and translucency off" +fi + +# Setup application DB +kbuildsycoca6 + +# Plasma session init function +start_session() { + # Compositor, nested in selkies on wayland-1, provides wayland-0 and :0 + WAYLAND_DISPLAY=wayland-1 kwin_wayland --no-lockscreen --xwayland & + KWIN_PID=$! + for _ in $(seq 1 100); do + if [ -S "${XDG_RUNTIME_DIR}/wayland-0" ]; then + break + fi + sleep 0.1 + done + export WAYLAND_DISPLAY=wayland-0 + dbus-update-activation-environment --all + pipewire & + for _ in $(seq 1 100); do + if [ -S "${XDG_RUNTIME_DIR}/pipewire-0" ]; then + break + fi + sleep 0.1 + done + LD_PRELOAD= wireplumber & + kcminit_startup + kded6 & + if [ "${PELORUS,,}" == "true" ]; then + dbus-send --session --dest=org.a11y.Bus --type=method_call \ + --print-reply /org/a11y/bus org.freedesktop.DBus.Properties.Set \ + string:org.a11y.Status string:IsEnabled variant:boolean:true 2>/dev/null || true + pelorus & + fi + xembedsniproxy & + plasmashell & + PLASMA_PID=$! + for _ in $(seq 1 300); do + if dbus-send --session --print-reply --dest=org.freedesktop.DBus \ + /org/freedesktop/DBus org.freedesktop.DBus.NameHasOwner \ + string:org.kde.plasmashell 2>/dev/null | grep -q true; then + break + fi + sleep 0.1 + done + xdg-user-dirs-update + gmenudbusmenuproxy & + xhost +si:localuser:root + for ENTRY in "${HOME}"/.config/autostart/*.desktop; do + if [ ! -f "${ENTRY}" ] || grep -q "^Hidden=true" "${ENTRY}"; then + continue + fi + ENTRY_CMD=$(grep -m1 "^Exec=" "${ENTRY}" | cut -d= -f2- | sed 's/ %[a-zA-Z]//g') + if [ -n "${ENTRY_CMD}" ]; then + bash -c "${ENTRY_CMD}" & + fi + done + wait "${PLASMA_PID}" + kill "${KWIN_PID}" +} +dbus-run-session bash -c "$(declare -f start_session); start_session" > /dev/null 2>&1 diff --git a/root/etc/polkit-1/rules.d/49-lsio-sudo.rules b/root/etc/polkit-1/rules.d/49-lsio-sudo.rules new file mode 100644 index 000000000..79b48be75 --- /dev/null +++ b/root/etc/polkit-1/rules.d/49-lsio-sudo.rules @@ -0,0 +1,13 @@ +// The abc user already has passwordless sudo in this image. +// Grant it polkit actions too so PackageKit, Discover and pkexec work. +// Follows DISABLE_SUDO, which strips the execute bits from the sudo binary. +polkit.addRule(function(action, subject) { + if (subject.user == "abc") { + try { + polkit.spawn(["/usr/bin/test", "-x", "/usr/bin/sudo"]); + return polkit.Result.YES; + } catch (error) { + return polkit.Result.NOT_HANDLED; + } + } +}); diff --git a/root/usr/bin/systemctl b/root/usr/bin/systemctl new file mode 100755 index 000000000..a44666d3c --- /dev/null +++ b/root/usr/bin/systemctl @@ -0,0 +1,68 @@ +#!/bin/bash + +ACTION="" +SERVICE="" + +# 1. Parse arguments +while [[ $# -gt 0 ]]; do + case "$1" in + daemon-reload) ACTION="daemon-reload"; shift ;; + start|restart|stop|enable|disable|status) ACTION="$1"; shift ;; + --user|--system) shift ;; # Ignore scope flags + -*) shift ;; # Ignore other flags like --now + *) SERVICE="$1"; shift ;; + esac +done + +# 2. Handle non-execution commands +if [[ "$ACTION" =~ ^(daemon-reload|enable|disable|stop|status)$ ]]; then + echo "[fake-systemctl] Pretending to execute: $ACTION ${SERVICE:-}" + exit 0 +fi + +# 3. Handle Start/Restart +if [[ "$ACTION" =~ ^(start|restart)$ ]]; then + # Ensure service has the correct extension + [[ "$SERVICE" != *.service ]] && SERVICE="${SERVICE}.service" + + SERVICE_FILE="$HOME/.config/systemd/user/$SERVICE" + + if [[ ! -f "$SERVICE_FILE" ]]; then + echo "[fake-systemctl] Error: Cannot find $SERVICE_FILE" + exit 1 + fi + + echo "[fake-systemctl] Starting $SERVICE..." + + ENV_VARS=$(grep '^[[:space:]]*Environment=' "$SERVICE_FILE" | sed 's/^[[:space:]]*Environment=//') + EXEC_CMD=$(grep '^[[:space:]]*ExecStart=' "$SERVICE_FILE" | sed 's/^[[:space:]]*ExecStart=-*+*//' | head -n 1) + + if [[ -z "$EXEC_CMD" ]]; then + echo "[fake-systemctl] Error: No ExecStart found in $SERVICE_FILE" + exit 1 + fi + + ( + while read -r env_line; do + if [[ -n "$env_line" ]]; then + eval "export $env_line" + fi + done <<< "$ENV_VARS" + + echo "[fake-systemctl] Executing: $EXEC_CMD" + + LOG_FILE="/tmp/${SERVICE}.log" + echo "[fake-systemctl] Logging output to $LOG_FILE" + + eval "$EXEC_CMD" > "$LOG_FILE" 2>&1 & + + # Save the PID + echo $! > "/tmp/${SERVICE}.pid" + ) + + exit 0 +fi + +# Fallback for unhandled commands +echo "[fake-systemctl] Ignored command: $@" +exit 0 diff --git a/root/usr/local/bin/wrapped-chromium b/root/usr/local/bin/wrapped-chromium new file mode 100755 index 000000000..cec51aa94 --- /dev/null +++ b/root/usr/local/bin/wrapped-chromium @@ -0,0 +1,26 @@ +#! /bin/bash + +BIN=/usr/bin/chromium + +# Cleanup +if ! pgrep chromium > /dev/null;then + rm -f $HOME/.config/chromium/Singleton* +fi + +# Wayland check +if [ "${PIXELFLUX_WAYLAND,,}" == "true" ]; then + WAYLAND="--ozone-platform=wayland" +fi + +# Pelorus accessibility +if [ "${PELORUS,,}" == "true" ]; then + ACCESSIBILITY="--force-renderer-accessibility" +fi + +${BIN} \ + --password-store=basic \ + --no-sandbox \ + --test-type \ + ${WAYLAND} \ + ${ACCESSIBILITY} \ + "$@"