From 0e5baec8bf149ba337b02e75ef3fd7fbfdedc210 Mon Sep 17 00:00:00 2001 From: hikaru Date: Sun, 11 Feb 2024 20:47:26 -0600 Subject: [PATCH] chore(orora): orora additions --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yml | 1 - .github/workflows/build_docker.yml | 221 ++++++++++++++++++ .vscode/settings.json | 5 + Dockerfile | 215 +++++++++++++++++ cliff.toml | 97 ++++++++ depot.json | 1 + build.sh => scripts/build.sh | 0 .../fetch-quadlets.sh | 0 image-info.sh => scripts/image-info.sh | 0 scripts/starship.sh | 9 + workarounds.sh => scripts/workarounds.sh | 0 12 files changed, 549 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build_docker.yml create mode 100644 .vscode/settings.json create mode 100644 Dockerfile create mode 100644 cliff.toml create mode 100644 depot.json rename build.sh => scripts/build.sh (100%) rename fetch-quadlets.sh => scripts/fetch-quadlets.sh (100%) rename image-info.sh => scripts/image-info.sh (100%) create mode 100755 scripts/starship.sh rename workarounds.sh => scripts/workarounds.sh (100%) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index a98d8c5e243..039d68eaa6e 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -28,7 +28,7 @@ body: attributes: label: Output of `rpm-ostree status` description: Please run `rpm-ostree status` and paste the output here. - render: shell + render: Shell - type: textarea id: extra-context attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index 05fc5aacd29..c4b02ee4427 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -32,4 +32,3 @@ body: - Vauxite validations: required: true - diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml new file mode 100644 index 00000000000..1b89e248662 --- /dev/null +++ b/.github/workflows/build_docker.yml @@ -0,0 +1,221 @@ +name: Build and Push Image (Using Docker buildx) +on: + merge_group: + workflow_dispatch: + + schedule: + - cron: '30 14 * * *' # 14:30 UTC everyday (2:30 PM UTC everyday) (8:30 AM CST everyday) + + pull_request: + branches: + - bluefin-dev + - testing + paths-ignore: + - '**.md' + + push: + branches: + - bluefin-dev + - testing + tags: + - "v*.*.*" + paths-ignore: + - '**.md' + +concurrency: + cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.ref || github.run_id }} + +env: + IMAGE_NAME: + AKMODS_FLAVOR: + DOCKER_BUILDKIT: 1 + PROJECT_ID: 5rkt16xwr1 + IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} + +jobs: + push-ghcr: + name: Build using Docker Buildx + runs-on: ubuntu-latest + + permissions: + contents: read + packages: write + id-token: write + + strategy: + fail-fast: false + matrix: + image_flavor: [asus] + major_version: [39] + base_name: [bluefin-dx] + include: + - major_version: 39 + is_gts_version: false + is_latest_version: true + is_stable_version: true + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Depot CLI + uses: depot/setup-action@v1 + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + with: + buildkitd-flags: --debug + - name: Check just syntax + uses: ublue-os/just-action@v1 + + - name: Verify base image + uses: EyeCantCU/cosign-action/verify@v0.2.2 + with: + containers: silverblue-${{ matrix.image_flavor }}:${{ matrix.major_version }} + + - name: Verify Chainguard images + if: matrix.base_name != 'bluefin' + uses: EyeCantCU/cosign-action/verify@v0.2.2 + with: + containers: dive, flux, helm, ko, minio, kubectl + cert-identity: https://github.com/chainguard-images/images/.github/workflows/release.yaml@refs/heads/main + oidc-issuer: https://token.actions.githubusercontent.com + registry: cgr.dev/chainguard + + - name: Maximize build space + uses: ublue-os/remove-unwanted-software@v6 + + - name: Matrix Variables + run: | + if [[ "${{ matrix.image_flavor }}" == "main" ]]; then + echo "IMAGE_NAME=${{ matrix.base_name }}" >> $GITHUB_ENV + else + echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.base_name, matrix.image_flavor) }}" >> $GITHUB_ENV + fi + if [[ "${{ matrix.image_flavor }}" =~ "asus" ]]; then + echo "AKMODS_FLAVOR=asus" >> $GITHUB_ENV + elif [[ "${{ matrix.image_flavor }}" =~ "surface" ]]; then + echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV + else + echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV + fi + + - name: Get Current Fedora Version + id: labels + shell: bash + run: | + set -eo pipefail + ver=$(skopeo inspect docker://ghcr.io/ublue-os/silverblue-${{ matrix.image_flavor }}:${{ matrix.major_version }} | jq -r '.Labels["org.opencontainers.image.version"]') + if [ -z "$ver" ] || [ "null" = "$ver" ]; then + echo "inspected image version must not be empty or null" + exit 1 + fi + echo "VERSION=$ver" >> $GITHUB_OUTPUT + + # Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR. + # https://github.com/macbre/push-to-ghcr/issues/12 + - name: Lowercase Registry + id: registry_case + uses: ASzc/change-string-case-action@v6 + with: + string: ${{ env.IMAGE_REGISTRY }} + + - name: Image Metadata + uses: docker/metadata-action@v5 + id: meta + with: + flavor: | + latest=true + images: | + ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }} + labels: | + org.opencontainers.image.title=${{ env.IMAGE_NAME }} + org.opencontainers.image.version=${{ steps.labels.outputs.VERSION }} + io.artifacthub.package.logo-url=https://avatars.githubusercontent.com/u/120078124?s=200&v=4 + org.opencontainers.image.description=An interpretation of the Ubuntu spirit built on Fedora technology + io.artifacthub.package.readme-url=https://raw.githubusercontent.com/ublue-os/bluefin/bluefin/README.md + # generate Docker tags based on the following events/attributes + tags: | + type=sha + type=ref,event=branch + type=schedule,pattern=nightly + type=semver,pattern={{version}} + + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + id: build_push + uses: depot/build-push-action@v1 + with: + push: true + buildx-fallback: true + cache-from: type=gha + cache-to: type=gha,mode=max + project: ${{ env.PROJECT_ID }} + target: ${{ matrix.base_name }} + tags: | + ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + token: ${{ secrets.DEPOT_PROJECT_TOKEN }} + build-args: | + IMAGE_NAME=${{ env.IMAGE_NAME }} + AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} + IMAGE_FLAVOR=${{ matrix.image_flavor }} + IMAGE_VENDOR=${{ github.repository_owner }} + FEDORA_MAJOR_VERSION=${{ matrix.major_version }} + + # - name: Build and push + # id: build_push + # uses: docker/build-push-action@v5 + # with: + # context: . + # push: true + # cache-from: type=gha + # cache-to: type=gha,mode=max + # target: ${{ matrix.base_name }} + # tags: ${{ steps.meta.outputs.tags }} + # labels: ${{ steps.meta.outputs.labels }} + # build-args: | + # IMAGE_NAME=${{ env.IMAGE_NAME }} + # AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} + # IMAGE_FLAVOR=${{ matrix.image_flavor }} + # IMAGE_VENDOR=${{ github.repository_owner }} + # FEDORA_MAJOR_VERSION=${{ matrix.major_version }} + + - uses: sigstore/cosign-installer@v3.4.0 + if: github.event_name != 'pull_request' + + - name: Sign container image + if: github.event_name != 'pull_request' + run: | + cosign sign -y --key env://COSIGN_PRIVATE_KEY ${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}@${TAGS} + env: + COSIGN_EXPERIMENTAL: false + TAGS: ${{ steps.build_push.outputs.digest }} + COSIGN_PRIVATE_KEY: ${{ secrets.SIGNING_SECRET }} + + - name: Echo outputs + if: github.event_name != 'pull_request' + # echo "${{ toJSON(steps.build_push.outputs) }}" + run: | + echo "${{ steps.build_push.outputs }}" + + check: + name: Check all builds successful + if: ${{ !cancelled() }} + runs-on: ubuntu-latest + needs: [push-ghcr] + steps: + - name: Exit on failure + if: ${{ needs.push-ghcr.result == 'failure' }} + shell: bash + run: exit 1 + - name: Exit + shell: bash + run: exit 0 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..b1dbca87038 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "yaml.schemas": { + "https://json.schemastore.org/github-issue-config.json": "file://~/dev/ublue__/personal__/orora/.github/ISSUE_TEMPLATE/config.yml" + } +} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000000..fc3a0244c41 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,215 @@ +ARG BASE_HUB="ghcr.io/ublue-os" +ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}" +ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-main}" +ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-silverblue}" +ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-39}" +ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}" +ARG BASE_IMAGE="${BASE_HUB}/${SOURCE_IMAGE}" + +## bluefin image section +FROM ${BASE_HUB}/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION} AS bluefin-akmods +FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bluefin + +ARG IMAGE_FLAVOR +ARG AKMODS_FLAVOR +ARG BASE_IMAGE_NAME +ARG FEDORA_MAJOR_VERSION +ARG IMAGE_NAME="${IMAGE_NAME}" +ARG IMAGE_VENDOR="${IMAGE_VENDOR}" +ARG PACKAGE_LIST="bluefin" + +COPY usr /usr +COPY etc /etc +COPY just /tmp/just +COPY scripts/ /tmp/scripts +COPY packages.json /tmp/packages.json +# Copy ublue-update.toml to tmp first, to avoid being overwritten. +COPY usr/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml + +# #Download AppimageLauncher RPM. Package is installed via build.sh and packages.json. +# RUN wget https://github.com/TheAssassin/AppImageLauncher/releases/download/v2.2.0/appimagelauncher-2.2.0-travis995.0f91801.x86_64.rpm -qO /tmp/appimagelauncher.rpm && \ +# #RustDesk download. Install is handled by build.sh and is at the top of the packages.json file. +# RUN wget https://github.com/rustdesk/rustdesk/releases/download/1.2.3/rustdesk-1.2.3-0.x86_64.rpm -qO /tmp/rustdesk.rpm + +# Setup Copr repos +RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/prompt/repo/fedora-$(rpm -E %fedora)/kylegospo-prompt-fedora-$(rpm -E %fedora).repo?arch=x86_64 -O /etc/yum.repos.d/_copr_kylegospo-prompt.repo && \ + wget https://copr.fedorainfracloud.org/coprs/kylegospo/gnome-vrr/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-gnome-vrr-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo && \ + wget https://copr.fedorainfracloud.org/coprs/che/nerd-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/che-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_che-nerd-fonts-"${FEDORA_MAJOR_VERSION}".repo && \ + wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo + +# Remove unneeded packages +RUN --mount=type=cache,target=/var/cache/rpm-ostree \ + rpm-ostree override remove \ + power-profiles-daemon \ + || true && \ + rpm-ostree override remove \ + tlp \ + tlp-rdw \ + || true + +# Setup firmware and asusctl for ASUS devices +RUN --mount=type=cache,target=/var/cache/asus-firmware \ + if [[ "${IMAGE_FLAVOR}" =~ "asus" ]]; then \ + wget https://copr.fedorainfracloud.org/coprs/lukenukem/asus-linux/repo/fedora-$(rpm -E %fedora)/lukenukem-asus-linux-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_lukenukem-asus-linux.repo && \ + rpm-ostree install \ + asusctl \ + asusctl-rog-gui && \ + git clone https://gitlab.com/asus-linux/firmware.git --depth 1 /tmp/asus-firmware && \ + cp -rf /tmp/asus-firmware/* /usr/lib/firmware/ && \ + rm -rf /tmp/asus-firmware \ + ; fi + +# Add ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion +COPY --from=bluefin-akmods /rpms /tmp/akmods-rpms +RUN --mount=type=cache,target=/var/cache/akmods \ + sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ + wget https://negativo17.org/repos/fedora-multimedia.repo -O /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ + # Core KMODS + rpm-ostree install \ + /tmp/akmods-rpms/kmods/*openrazer*.rpm \ + /tmp/akmods-rpms/kmods/*ryzen-smu*.rpm \ + /tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \ + /tmp/akmods-rpms/kmods/*xone*.rpm \ + /tmp/akmods-rpms/kmods/*xpadneo*.rpm \ + /tmp/akmods-rpms/kmods/*zenergy*.rpm \ + /tmp/akmods-rpms/kmods/*wl*.rpm && \ + # Asus KMODS + if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then \ + rpm-ostree install \/tmp/akmods-rpms/kmods/*evdi*.rpm \ + ; fi && \ + sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo + +# GNOME VRR & Prompt +RUN --mount=type=cache,target=/var/cache/gnome-prompt \ + rpm-ostree override replace \ + --experimental \ + --from repo=copr:copr.fedorainfracloud.org:kylegospo:gnome-vrr \ + mutter \ + mutter-common \ + gnome-control-center \ + gnome-control-center-filesystem && \ + # Prompt + rpm-ostree override replace \ + --experimental \ + --from repo=copr:copr.fedorainfracloud.org:kylegospo:prompt \ + vte291 \ + vte-profile && \ + rpm-ostree install \ + prompt && \ + rm -f /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo && \ + rm -f /etc/yum.repos.d/_copr_kylegospo-prompt.repo + +RUN --mount=type=cache,target=/var/cache/bluefin \ + /tmp/scripts/starship.sh && \ + /tmp/scripts/build.sh && \ + /tmp/scripts/image-info.sh && \ + /tmp/scripts/fetch-quadlets.sh && \ + pip install --prefix=/usr yafti && \ + pip install --prefix=/usr topgrade && \ + rpm-ostree install ublue-update && \ + mkdir -p /usr/etc/flatpak/remotes.d && \ + wget -q https://dl.flathub.org/repo/flathub.flatpakrepo -P /usr/etc/flatpak/remotes.d && \ + cp /tmp/ublue-update.toml /usr/etc/ublue-update/ublue-update.toml && \ + systemctl enable tuned.service && \ + systemctl enable rpm-ostree-countme.service && \ + systemctl enable tailscaled.service && \ + systemctl enable dconf-update.service && \ + systemctl enable ublue-update.timer && \ + systemctl enable ublue-system-setup.service && \ + systemctl enable ublue-system-flatpak-manager.service && \ + systemctl --global enable ublue-user-flatpak-manager.service && \ + systemctl --global enable ublue-user-setup.service && \ + fc-cache -f /usr/share/fonts/ubuntu && \ + fc-cache -f /usr/share/fonts/inter && \ + find /tmp/just -iname '*.just' -exec printf "\n\n" \; -exec cat {} \; >> /usr/share/ublue-os/just/60-custom.just && \ + rm -f /etc/yum.repos.d/tailscale.repo && \ + rm -f /etc/yum.repos.d/charm.repo && \ + rm -f /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + echo "Hidden=true" >> /usr/share/applications/fish.desktop && \ + echo "Hidden=true" >> /usr/share/applications/htop.desktop && \ + echo "Hidden=true" >> /usr/share/applications/nvtop.desktop && \ + echo "Hidden=true" >> /usr/share/applications/gnome-system-monitor.desktop && \ + rm -f /etc/yum.repos.d/_copr_che-nerd-fonts-"${FEDORA_MAJOR_VERSION}".repo && \ + sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/user.conf && \ + sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \ + sed -i '/^PRETTY_NAME/s/Silverblue/Bluefin/' /usr/lib/os-release + +# Clean up repos +RUN rm -f /etc/yum.repos.d/charm.repo \ + rm -f /etc/yum.repos.d/tailscale.repo \ + rm -f /etc/yum.repos.d/_copr_che-nerd-fonts-"${FEDORA_MAJOR_VERSION}".repo \ + rm -f /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + rm -rf /tmp/* /var/* && \ + ostree container commit && \ + mkdir -p /var/tmp && \ + chmod -R 1777 /var/tmp + +# bluefin-dx developer edition image section +FROM bluefin AS bluefin-dx + +ARG IMAGE_FLAVOR +ARG BASE_IMAGE_NAME +ARG FEDORA_MAJOR_VERSION +ARG IMAGE_NAME="${IMAGE_NAME}" +ARG IMAGE_VENDOR="${IMAGE_VENDOR}" +ARG PACKAGE_LIST="bluefin-dx" + +# dx specific files come from the dx directory in this repo +COPY dx/usr /usr +COPY dx/etc /etc/ +COPY scripts /tmp/scripts +COPY packages.json /tmp/packages.json +COPY --from=cgr.dev/chainguard/ko:latest /usr/bin/ko /usr/bin/ko +COPY --from=cgr.dev/chainguard/dive:latest /usr/bin/dive /usr/bin/dive +COPY --from=cgr.dev/chainguard/flux:latest /usr/bin/flux /usr/bin/flux +COPY --from=cgr.dev/chainguard/helm:latest /usr/bin/helm /usr/bin/helm +COPY --from=cgr.dev/chainguard/minio-client:latest /usr/bin/mc /usr/bin/mc +COPY --from=cgr.dev/chainguard/kubectl:latest /usr/bin/kubectl /usr/bin/kubectl + +# Apply IP Forwarding before installing Docker to prevent messing with LXC networking +RUN sysctl -p + +RUN wget https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -O /tmp/docker-compose && \ + wget https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + wget https://copr.fedorainfracloud.org/coprs/karmab/kcli/repo/fedora-"${FEDORA_MAJOR_VERSION}"/karmab-kcli-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/karmab-kcli-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + wget https://copr.fedorainfracloud.org/coprs/atim/ubuntu-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/atim-ubuntu-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/atim-ubuntu-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo + +RUN --mount=type=cache,target=/var/cache/bluefin-dx \ + # Handle packages via packages.json + /tmp/scripts/build.sh && \ + /tmp/scripts/image-info.sh && \ + + # docker-compose and kind + install -c -m 0755 /tmp/docker-compose /usr/bin && \ + curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-$(uname)-amd64" && \ + chmod +x ./kind && \ + mv ./kind /usr/bin/kind && \ + + # Install kns/kctx and add completions for Bash + wget https://raw.githubusercontent.com/ahmetb/kubectx/master/kubectx -O /usr/bin/kubectx && \ + wget https://raw.githubusercontent.com/ahmetb/kubectx/master/kubens -O /usr/bin/kubens && \ + chmod +x /usr/bin/kubectx /usr/bin/kubens && \ + + # Set up services + systemctl disable pmie.service && \ + systemctl enable podman.socket && \ + systemctl enable docker.socket && \ + systemctl disable pmlogger.service && \ + systemctl enable swtpm-workaround.service && \ + systemctl enable bluefin-dx-groups.service && \ + systemctl enable --global bluefin-dx-user-vscode.service + +RUN /tmp/scripts/workarounds.sh + +# Clean up repos, everything is on the image so we don't need them +RUN rm -f /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + rm -f /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + rm -f /etc/yum.repos.d/karmab-kcli-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + rm -f /etc/yum.repos.d/atim-ubuntu-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + rm -f /etc/yum.repos.d/vscode.repo && \ + rm -f /etc/yum.repos.d/docker-ce.repo && \ + rm -f /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo && \ + rm -f /etc/yum.repos.d/fedora-cisco-openh264.repo && \ + rm -rf /tmp/* /var/* && \ + ostree container commit \ No newline at end of file diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 00000000000..2e6fd77126e --- /dev/null +++ b/cliff.toml @@ -0,0 +1,97 @@ +[changelog] +header = """ +# Changelog\n +All notable changes to this project will be documented in this file.\n +""" + +body = """ +{% if version %}\ + {% if previous.version %}\ + ## [{{ version | trim_start_matches(pat="v") }}](/compare/{{ previous.version }}..{{ version }}) - {{ timestamp | date(format="%Y-%m-%d") }} + {% else %}\ + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} + {% endif %}\ +{% else %}\ + ## [unreleased] +{% endif %}\ + +{% macro commit(commit) -%} + - {% if commit.scope %}*({{ commit.scope }})* {% endif %}{% if commit.breaking %}[**breaking**] {% endif %}\ + {{ commit.message | upper_first }} - ([{{ commit.id | truncate(length=7, end="") }}]({% if commit.author.name == "hikaru" %}{% else %}{% endif %}/commit/{{ commit.id }}))\ +{% endmacro -%} + +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | striptags | trim | upper_first }} + {% for commit in commits + | filter(attribute="scope") + | sort(attribute="scope") %} + {{ self::commit(commit=commit) }} + {%- endfor -%} + {% raw %}\n{% endraw %}\ + {%- for commit in commits %} + {%- if not commit.scope -%} + {{ self::commit(commit=commit) }} + {% endif -%} + {% endfor -%} +{% endfor %}\n +""" + +# template for the changelog footer +footer = """ + +""" + +# remove the leading and trailing whitespace from the templates +trim = true +# postprocessors +postprocessors = [ + { pattern = '', replace = "https://github.com/ublue-os/bluefin" }, + { pattern = '', replace = "https://github.com/bayou-brogrammer/bluefin" }, + # Check typos with https://github.com/crate-ci/typos + # If the spelling is incorrect, it will be automatically fixed. + # { pattern = '.*', replace_command = 'typos --write-changes -' }, +] + +[git] +# parse the commits based on https://www.conventionalcommits.org +conventional_commits = true +# filter out the commits that are not conventional +filter_unconventional = true +# process each line of a commit as an individual commit +split_commits = false +# regex for preprocessing the commit messages +commit_preprocessors = [ + # replace issue numbers + # { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](/issues/${2}))" }, +] +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^feat", group = "โ›ฐ๏ธ Features" }, + { message = "^fix", group = "๐Ÿ› Bug Fixes" }, + { message = "^doc", group = "๐Ÿ“š Documentation" }, + { message = "^perf", group = "โšก Performance" }, + { message = "^refactor", group = "๐Ÿšœ Refactor" }, + { message = "^style", group = "๐ŸŽจ Styling" }, + { message = "^test", group = "๐Ÿงช Testing" }, + { message = "^chore\\(release\\): prepare for", skip = true }, + { message = "^chore\\(deps\\)", skip = true }, + { message = "^chore\\(pr\\)", skip = true }, + { message = "^chore\\(pull\\)", skip = true }, + { message = "^chore|ci", group = "โš™๏ธ Miscellaneous Tasks" }, + { body = ".*security", group = "๐Ÿ›ก๏ธ Security" }, + { message = "^revert", group = "โ—€๏ธ Revert" }, +] +# protect breaking changes from being skipped due to matching a skipping commit_parser +protect_breaking_commits = false +# filter out the commits that are not matched by commit parsers +filter_commits = false +# regex for matching git tags +tag_pattern = "v[0-9].*" +# sort the tags topologically +topo_order = false +# sort the commits inside sections by oldest/newest order +sort_commits = "newest" +# # regex for skipping tags +# skip_tags = "beta|alpha" +# # regex for ignoring tags +# ignore_tags = "rc" diff --git a/depot.json b/depot.json new file mode 100644 index 00000000000..239320b3281 --- /dev/null +++ b/depot.json @@ -0,0 +1 @@ +{"id":"5rkt16xwr1"} diff --git a/build.sh b/scripts/build.sh similarity index 100% rename from build.sh rename to scripts/build.sh diff --git a/fetch-quadlets.sh b/scripts/fetch-quadlets.sh similarity index 100% rename from fetch-quadlets.sh rename to scripts/fetch-quadlets.sh diff --git a/image-info.sh b/scripts/image-info.sh similarity index 100% rename from image-info.sh rename to scripts/image-info.sh diff --git a/scripts/starship.sh b/scripts/starship.sh new file mode 100755 index 00000000000..ec3c974f86e --- /dev/null +++ b/scripts/starship.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -oue pipefail + +# Starship Shell Prompt +curl -Lo /tmp/starship.tar.gz "https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz" +tar -xzf /tmp/starship.tar.gz -C /tmp +install -c -m 0755 /tmp/starship /usr/bin +echo 'eval "$(starship init bash)"' >>/etc/bashrc diff --git a/workarounds.sh b/scripts/workarounds.sh similarity index 100% rename from workarounds.sh rename to scripts/workarounds.sh