From d073ae5567dd0e4f65f0d69285c6b44b7283f51e Mon Sep 17 00:00:00 2001 From: Prasad Tengse Date: Sat, 5 Jun 2021 13:22:51 +0200 Subject: [PATCH] feat: Initial version `1.9.16-2.el8` --- .github/PULL_REQUEST_TEMPLATE.md | 23 +++++++++++ .github/workflows/build.yml | 69 ++++++++++++++++++++++++++++++++ .gitignore | 1 + .kodiak.toml | 64 +++++++++++++++++++++++++++++ Makefile | 43 ++++++++++++++++++++ README.md | 17 ++++++++ _config.yml | 26 ++++++++++++ docker/.dockerignore | 2 + docker/Dockerfile | 22 ++++++++++ renovate.json | 13 ++++++ 10 files changed, 280 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/build.yml create mode 100644 .kodiak.toml create mode 100644 Makefile create mode 100644 README.md create mode 100644 _config.yml create mode 100644 docker/.dockerignore create mode 100644 docker/Dockerfile create mode 100644 renovate.json diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..eb7cbae --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,23 @@ + + + +## What does this do / why do we need it? + +{Please write here} + + +## How this PR fixes the problem? + +{Please write here} + + +## Additional Comments (if any) + +{Please write here} + + + + + + + diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4ebfb3c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,69 @@ +name: build +on: + push: + branches: + - "*" + tags: + - "*" + pull_request: +jobs: + # ISO + extract: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + + - name: Build + run: make build + + - name: Install git-chglog + run: | + brew tap git-chglog/git-chglog + brew install git-chglog + + - name: Generate Changelog + run: | + make changelog + cat docs/changelog.md + + - name: Upload ISO + uses: actions/upload-artifact@v2 + with: + name: virtio-win.iso + path: docker/build/virtio-win.iso + retention-days: 7 + + verify: + runs-on: windows-latest + defaults: + run: + shell: powershell + needs: + - extract + steps: + - name: Download ISO + uses: actions/download-artifact@v2 + with: + name: virtio-win.iso + + - name: Mount ISO + run: | + Write-Host "Mounting ISO Image" + Mount-DiskImage -StorageType ISO -ImagePath virtio-win.iso + Get-DiskImage virtio-win.iso | Get-Volume + + - name: Verify Ballon Driver + run: + Signtool verify /pa /v /c D:\Balloon\w10\amd64\balloon.cat D:\Balloon\w10\amd64\balloon.sys + continue-on-error: true + + - name: Verify VIOSCSI Driver + run: + Signtool verify /pa /v /c D:\vioscsi\w10\amd64\vioscsi.cat D:\Balloon\w10\amd64\vioscsi.sys + continue-on-error: true diff --git a/.gitignore b/.gitignore index 50fadc9..eb85e17 100644 --- a/.gitignore +++ b/.gitignore @@ -105,3 +105,4 @@ downloads/ config/ build/ dist/ +docs/changelog.md diff --git a/.kodiak.toml b/.kodiak.toml new file mode 100644 index 0000000..c2555f5 --- /dev/null +++ b/.kodiak.toml @@ -0,0 +1,64 @@ +# Enable Kodiak +version = 1 + +[merge] +# Required label +# Forces label requirements +require_automerge_label = true + +# Labels for Automerge +# This Label is shared with Luna. +#----------------------------------- +# Conflicts are avoided by explicitly blacklisting Actor:Luna label +# Luna handles this gracefullym by first adding this label before doing +# any other tasks. If adding Actor:Luna label fails, Luna will not act +# on that PR/Issue. +automerge_label = "Luna:AutoMerge" + +# Methods +method = "squash" + +# Blacklisted Labels +# Actor:Luna - Prevent conflicts with Luna +# Status:WIP, Status:Blocked - Prevent merging WIP or blocked PRs +# Status:Stale, Status:Locked - Prevent merging stale PRs +blocking_labels = ["Status:WIP", "Status:Locked", "Actor:Luna", "Status:Blocked", "Status:Stale"] + +# Priority +priority_merge_label = "Priority:Critical" + +# Cleanup stale branches +delete_branch_on_merge = true + +# On conflicts, remove automerge labels +notify_on_conflict = true + +# Wait to Pass checks +optimistic_updates = false + +[merge.message] +body = "pull_request_body" +strip_html_comments = true +body_type = "markdown" +cut_body_before = "" +cut_body_after = "" + + +[merge.automerge_dependencies] +# only auto merge "minor" and "patch" version upgrades. +# do not automerge "major" version upgrades. +versions = ["patch"] +usernames = ["dependabot"] + + +[update] +require_automerge_label = false + +# Auto update label is sharedwith Luna +autoupdate_label = "Luna:AutoUpdate" + +# Ignore bots or other apps with automerge built in and kodiak should ignore then +ignored_usernames = ["valarie-ci-bot", "dependabot-preview", "luna-bot"] + +# diana:{diana_urn_flavor}:{remote}:{source}:{version}:{remote_path}:{type} +# diana:2:github:tprasadtp/templates::bots/kodiak.toml:static diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..dabea17 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +SHELL := /bin/bash +DOCKER_BUILDKIT := 1 +export REPO_ROOT := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + +# GitHub +GITHUB_OWNER := tprasadtp +GITHUB_REPO := virtio-whql + +# OCI Metadata +PROJECT_TITLE := VirtIO WHQL +PROJECT_DESC := VirtIO WHQL Drivers +PROJECT_URL := https://tprasadtp.github.io/virtio-whql +PROJECT_SOURCE := https://github.com/tprasadtp/virtio-whql +PROJECT_LICENSE := GPLv3 + +# Include makefiles +include $(REPO_ROOT)/makefiles/help.mk + +# Enforce BUILDKIT +ifneq ($(DOCKER_BUILDKIT),1) +$(error ✖ DOCKER_BUILDKIT!=1. Docker Buildkit cannot be disabled on this repo!) +endif + +.PHONY: shellcheck +shellcheck: ## Runs shellcheck + @bash $(REPO_ROOT)/scripts/shellcheck.sh $(shell find $(REPO_ROOT)/root/etc/ -type f -executable) + +.PHONY: build +build: clean ## Build ISO + @mkdir -p $(REPO_ROOT)/docker/build + docker build \ + --tag ghcr.io/tprasadtp/virtio-whql \ + --output type=local,dest=$(REPO_ROOT)/docker/build \ + --file $(REPO_ROOT)/docker/Dockerfile \ + $(REPO_ROOT)/docker + +.PHONY: clean +clean: ## clean + rm -f $(REPO_ROOT)/docker/build/*.iso + +.PHONY: changelog +changelog: ## Generate changelog + git-chglog --repository-url=$(PROJECT_SOURCE) --output $(REPO_ROOT)/docs/changelog.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2c8a0e4 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ + + +# VirtIO WHQL Drivers + +- `virtio` drivers for Windows. +- These are signed by Microsoft and are sourced from CentOS stream repository (Might switch to Rocky 8 in the future) +- Kept updated by repology+renovatebot+GitHub Actions + + + +[![build](https://github.com/tprasadtp/virtio-whql/actions/workflows/build.yml/badge.svg)](https://github.com/tprasadtp/virtio-whql/actions/workflows/build.yml) +[![release](https://github.com/tprasadtp/virtio-whql/actions/workflows/release.yml/badge.svg)](https://github.com/tprasadtp/virtio-whql/actions/workflows/release.yml) +[![releases](https://img.shields.io/github/v/tag/tprasadtp/virtio-whql?label=version&sort=semver&logo=semver&color=7f50a6&labelColor=3a3a3a)](https://github.com/tprasadtp/virtio-whql/releases/latest) +[![license](https://img.shields.io/github/license/tprasadtp/virtio-whql?logo=github&labelColor=3A3A3A)](https://github.com/tprasadtp/virtio-whql/blob/master/LICENSE) +![analytics](https://ga-beacon.prasadt.com/UA-101760811-3/github/virtio-whql) + +[releases]: https://github.com/tprasadtp/virtio-whql/releases/latest diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..55576ee --- /dev/null +++ b/_config.yml @@ -0,0 +1,26 @@ +# domain +baseurl: "/virtio-whql" +url: "https://tprasadtp.github.io" + +# meta +title: VirtIO WHQL Drivers from CentOS +description: WHQL Drivers for virtio devices from CentOS 8 project, Signed by Microsoft/ +show_downloads: false +remote_theme: pmarsceill/just-the-docs +# Logo +logo: "https://static.prasadt.com/logos/projects/artemis/scalable/sysadmin.svg" +# Enable Search +search_enabled: true + +# Misc +permalink: pretty +color_scheme: dark + + +# Aux links for the upper right navigation +aux_links: + "View on GitHub": + - "https://github.com/tprasadtp/virtio-whql/" + +# Makes Aux links open in a new tab +aux_links_new_tab: true diff --git a/docker/.dockerignore b/docker/.dockerignore new file mode 100644 index 0000000..ac116c0 --- /dev/null +++ b/docker/.dockerignore @@ -0,0 +1,2 @@ +build/ +*.iso diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..eae54b9 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,22 @@ +#syntax=docker/dockerfile:1.2 + +FROM centos:8 AS virtio-base-image + +RUN mkdir /build + +# renovate: datasource=repology depName=centos_8/virtio-win versioning=loose +ENV VIRTIO_WIN_VERSION="1.9.16-2.el8" +RUN --mount=type=cache,target=/download/cache \ + --mount=type=cache,target=/var/cache/yum \ + --mount=type=tmpfs,target=/download/extract \ + dnf install -y \ + --downloadonly \ + --downloaddir=/download/cache/ \ + virtio-win-"${VIRTIO_WIN_VERSION}" \ + && cd /download/extract \ + && rpm2cpio "/download/cache/virtio-win-${VIRTIO_WIN_VERSION}.noarch.rpm" | cpio -idmv \ + && cp /download/extract/usr/share/virtio-win/virtio-win.iso /build/virtio-win.iso + +# Copy from build/extract statge +FROM scratch AS export-stage +COPY --from=virtio-base-image /build/virtio-win.iso / diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..ea3ea07 --- /dev/null +++ b/renovate.json @@ -0,0 +1,13 @@ +{ + "regexManagers": [ + { + "fileMatch": [ + "^Dockerfile$" + ], + "matchStrings": [ + "#\\s*renovate:\\s*datasource=(?.*?) depName=(?.*?)( versioning=(?.*?))?\\sENV .*?_VERSION=(?.*)\\s" + ], + "versioningTemplate": "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}" + } + ] +}