From 46038b9f2a9d42a79793081cf165274afeb9636a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= Date: Thu, 24 Aug 2023 11:41:02 -0400 Subject: [PATCH] zabbly: Add GitHub logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber --- {.github => .github.orig}/CONTRIBUTING.md | 0 .../ISSUE_TEMPLATE/bug_report.md | 0 .../ISSUE_TEMPLATE/config.yml | 0 .../ISSUE_TEMPLATE/feature_request.md | 0 .../PULL_REQUEST_TEMPLATE.md | 0 {.github => .github.orig}/codecov.yml | 0 {.github => .github.orig}/no-response.yml | 0 {.github => .github.orig}/stale.yml | 0 {.github => .github.orig}/workflows/README.md | 0 .../workflows/build-dependencies.txt | 0 .../workflows/checkstyle-dependencies.txt | 0 .../workflows/checkstyle.yaml | 0 .../workflows/codeql.yml | 0 .../workflows/scripts/generate-summary.sh | 0 .../workflows/scripts/setup-dependencies.sh | 0 .../workflows/scripts/setup-functional.sh | 0 .../workflows/zfs-linux-tests.yml | 0 .../workflows/zfs-linux.yml | 0 .github/FUNDING.yml | 5 + .github/workflows/builds.yml | 96 +++++++++++++++++++ .github/workflows/commits.yml | 40 ++++++++ README.md | 95 +++++++++++++----- README.md.orig | 35 +++++++ 23 files changed, 247 insertions(+), 24 deletions(-) rename {.github => .github.orig}/CONTRIBUTING.md (100%) rename {.github => .github.orig}/ISSUE_TEMPLATE/bug_report.md (100%) rename {.github => .github.orig}/ISSUE_TEMPLATE/config.yml (100%) rename {.github => .github.orig}/ISSUE_TEMPLATE/feature_request.md (100%) rename {.github => .github.orig}/PULL_REQUEST_TEMPLATE.md (100%) rename {.github => .github.orig}/codecov.yml (100%) rename {.github => .github.orig}/no-response.yml (100%) rename {.github => .github.orig}/stale.yml (100%) rename {.github => .github.orig}/workflows/README.md (100%) rename {.github => .github.orig}/workflows/build-dependencies.txt (100%) rename {.github => .github.orig}/workflows/checkstyle-dependencies.txt (100%) rename {.github => .github.orig}/workflows/checkstyle.yaml (100%) rename {.github => .github.orig}/workflows/codeql.yml (100%) rename {.github => .github.orig}/workflows/scripts/generate-summary.sh (100%) rename {.github => .github.orig}/workflows/scripts/setup-dependencies.sh (100%) rename {.github => .github.orig}/workflows/scripts/setup-functional.sh (100%) rename {.github => .github.orig}/workflows/zfs-linux-tests.yml (100%) rename {.github => .github.orig}/workflows/zfs-linux.yml (100%) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/builds.yml create mode 100644 .github/workflows/commits.yml create mode 100644 README.md.orig diff --git a/.github/CONTRIBUTING.md b/.github.orig/CONTRIBUTING.md similarity index 100% rename from .github/CONTRIBUTING.md rename to .github.orig/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github.orig/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github.orig/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github.orig/ISSUE_TEMPLATE/config.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/config.yml rename to .github.orig/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github.orig/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from .github/ISSUE_TEMPLATE/feature_request.md rename to .github.orig/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github.orig/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from .github/PULL_REQUEST_TEMPLATE.md rename to .github.orig/PULL_REQUEST_TEMPLATE.md diff --git a/.github/codecov.yml b/.github.orig/codecov.yml similarity index 100% rename from .github/codecov.yml rename to .github.orig/codecov.yml diff --git a/.github/no-response.yml b/.github.orig/no-response.yml similarity index 100% rename from .github/no-response.yml rename to .github.orig/no-response.yml diff --git a/.github/stale.yml b/.github.orig/stale.yml similarity index 100% rename from .github/stale.yml rename to .github.orig/stale.yml diff --git a/.github/workflows/README.md b/.github.orig/workflows/README.md similarity index 100% rename from .github/workflows/README.md rename to .github.orig/workflows/README.md diff --git a/.github/workflows/build-dependencies.txt b/.github.orig/workflows/build-dependencies.txt similarity index 100% rename from .github/workflows/build-dependencies.txt rename to .github.orig/workflows/build-dependencies.txt diff --git a/.github/workflows/checkstyle-dependencies.txt b/.github.orig/workflows/checkstyle-dependencies.txt similarity index 100% rename from .github/workflows/checkstyle-dependencies.txt rename to .github.orig/workflows/checkstyle-dependencies.txt diff --git a/.github/workflows/checkstyle.yaml b/.github.orig/workflows/checkstyle.yaml similarity index 100% rename from .github/workflows/checkstyle.yaml rename to .github.orig/workflows/checkstyle.yaml diff --git a/.github/workflows/codeql.yml b/.github.orig/workflows/codeql.yml similarity index 100% rename from .github/workflows/codeql.yml rename to .github.orig/workflows/codeql.yml diff --git a/.github/workflows/scripts/generate-summary.sh b/.github.orig/workflows/scripts/generate-summary.sh similarity index 100% rename from .github/workflows/scripts/generate-summary.sh rename to .github.orig/workflows/scripts/generate-summary.sh diff --git a/.github/workflows/scripts/setup-dependencies.sh b/.github.orig/workflows/scripts/setup-dependencies.sh similarity index 100% rename from .github/workflows/scripts/setup-dependencies.sh rename to .github.orig/workflows/scripts/setup-dependencies.sh diff --git a/.github/workflows/scripts/setup-functional.sh b/.github.orig/workflows/scripts/setup-functional.sh similarity index 100% rename from .github/workflows/scripts/setup-functional.sh rename to .github.orig/workflows/scripts/setup-functional.sh diff --git a/.github/workflows/zfs-linux-tests.yml b/.github.orig/workflows/zfs-linux-tests.yml similarity index 100% rename from .github/workflows/zfs-linux-tests.yml rename to .github.orig/workflows/zfs-linux-tests.yml diff --git a/.github/workflows/zfs-linux.yml b/.github.orig/workflows/zfs-linux.yml similarity index 100% rename from .github/workflows/zfs-linux.yml rename to .github.orig/workflows/zfs-linux.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000000..445aca9b9465 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,5 @@ +# Frequent committers who contribute to Incus on their own time can add +# themselves to the list here so users who feel like sponsoring can find +# them. +github: + - stgraber diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml new file mode 100644 index 000000000000..95822ab83c78 --- /dev/null +++ b/.github/workflows/builds.yml @@ -0,0 +1,96 @@ +name: Builds +on: + - push + +permissions: + contents: read + +concurrency: + group: ${{ github.ref }} + cancel-in-progress: true + +jobs: + build-zfs: + name: Build ZFS + strategy: + fail-fast: false + matrix: + os: + - ubuntu-20.04 + - ubuntu-22.04 + - debian-11 + - debian-12 + arch: + - amd64 + - arm64 + runs-on: + - self-hosted + - cpu-4 + - mem-4G + - arch-${{ matrix.arch }} + - image-${{ matrix.os }} + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install dependencies + run: | + sudo apt-get install --yes \ + debhelper \ + devscripts \ + dh-autoreconf \ + dh-python \ + dkms \ + dpkg-dev \ + libaio-dev \ + libblkid-dev \ + libcurl4-openssl-dev \ + libelf-dev \ + libpam0g-dev \ + libssl-dev \ + libtool \ + libudev-dev \ + lsb-release \ + po-debconf \ + python3-all-dev \ + python3-cffi \ + python3-setuptools \ + python3-sphinx \ + uuid-dev \ + zlib1g-dev + + sudo apt-get install dh-dkms --yes || true + + - name: Build ZFS + env: + PKGOS: ${{ matrix.os }} + PKGARCH: ${{ matrix.arch }} + run: | + [ "${PKGOS}" = "debian-11" ] && CODENAME=bullseye + [ "${PKGOS}" = "debian-12" ] && CODENAME=bookworm + [ "${PKGOS}" = "ubuntu-20.04" ] && CODENAME=focal + [ "${PKGOS}" = "ubuntu-22.04" ] && CODENAME=jammy + + ./autogen.sh + ./configure + + ZFSVERSION=$(cat META | grep ^Version: | awk '{print $2}') + ZFSRELEASE=$(cat META | grep ^Release: | awk '{print $2}') + + cd contrib + dch -D ${CODENAME} -M -b -m "Automated ZFS build" -v ${ZFSVERSION}~${ZFSRELEASE}-${PKGARCH}-$(date -u +%Y%m%d%H%M)-$(echo ${PKGOS} | sed "s/-//g") + cd .. + + make native-deb-utils + + - name: Prepare the artifacts + run: | + mkdir out/ + mv ../openzfs-* out/ + + - name: Upload resulting build + uses: actions/upload-artifact@v3 + continue-on-error: true + with: + name: ${{ matrix.os }}-${{ matrix.arch }} + path: out/* diff --git a/.github/workflows/commits.yml b/.github/workflows/commits.yml new file mode 100644 index 000000000000..5481a4ef0750 --- /dev/null +++ b/.github/workflows/commits.yml @@ -0,0 +1,40 @@ +name: Commits +on: + - pull_request + +permissions: + contents: read + +jobs: + dco-check: + permissions: + pull-requests: read # for tim-actions/get-pr-commits to get list of commits from the PR + name: Signed-off-by (DCO) + runs-on: ubuntu-22.04 + steps: + - name: Get PR Commits + id: 'get-pr-commits' + uses: tim-actions/get-pr-commits@master + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Check that all commits are signed-off + uses: tim-actions/dco@master + with: + commits: ${{ steps.get-pr-commits.outputs.commits }} + + target-branch: + permissions: + contents: none + name: Branch target + runs-on: ubuntu-22.04 + steps: + - name: Check branch target + env: + TARGET: ${{ github.event.pull_request.base.ref }} + run: | + set -x + [ "${TARGET}" = "main" ] && exit 0 + + echo "Invalid branch target: ${TARGET}" + exit 1 diff --git a/README.md b/README.md index 331889560950..7cd2e6c20612 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,82 @@ -![img](https://openzfs.github.io/openzfs-docs/_static/img/logo/480px-Open-ZFS-Secondary-Logo-Colour-halfsize.png) +# ZFS builds +Those are ZFS tools and dkms builds made and supported by Zabbly. -OpenZFS is an advanced file system and volume manager which was originally -developed for Solaris and is now maintained by the OpenZFS community. -This repository contains the code for running OpenZFS on Linux and FreeBSD. +They are designed to work reliably with the matching [kernel build](https://github.com/zabbly/linux). -[![codecov](https://codecov.io/gh/openzfs/zfs/branch/master/graph/badge.svg)](https://codecov.io/gh/openzfs/zfs) -[![coverity](https://scan.coverity.com/projects/1973/badge.svg)](https://scan.coverity.com/projects/openzfs-zfs) +## Availability +Those kernels are built for: -# Official Resources + * Ubuntu 20.04 LTS (`focal`) + * Ubuntu 22.04 LTS (`jammy`) + * Debian 12 (`bookworm`) - * [Documentation](https://openzfs.github.io/openzfs-docs/) - for using and developing this repo - * [ZoL Site](https://zfsonlinux.org) - Linux release info & links - * [Mailing lists](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/Mailing%20Lists.html) - * [OpenZFS site](https://openzfs.org/) - for conference videos and info on other platforms (illumos, OSX, Windows, etc) +## Installation +On any of those, you can add the package repository at `/etc/apt/sources.list.d/zabbly-kernel-stable.sources`: -# Installation +``` +Enabled: yes +Types: deb deb-src +URIs: https://pkgs.zabbly.com/kernel/stable +Suites: DISTRO +Components: zfs +Architectures: ARCH +Signed-By: /etc/apt/keyrings/zabbly.asc +``` -Full documentation for installing OpenZFS on your favorite operating system can -be found at the [Getting Started Page](https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html). +Make sure to replace `DISTRO` with one of `focal`, `jammy` or `bookworm` +and then replace `ARCH` with one of `amd64` or `arm64`. -# Contribute & Develop +If you're already using the kernel builds from the same repository, change the `Components` line to read: +``` +Components: main zfs +``` -We have a separate document with [contribution guidelines](./.github/CONTRIBUTING.md). +After that, add the [GPG keyring](https://pkgs.zabbly.com/key.asc) to `/etc/apt/keyrings/zabbly.asc`: +``` +-----BEGIN PGP PUBLIC KEY BLOCK----- -We have a [Code of Conduct](./CODE_OF_CONDUCT.md). +mQGNBGTlYcIBDACYQoVXVyQ6Y3Of14GwEaiv/RstQ8jWnH441OtvDbD/VVT8yF0P +pUfypWjQS8aq0g32Qgb9H9+b8UAAKojA2W0szjJFlmmSq19YDMMmNC4AnfeZlKYM +61Zonna7fPaXmlsTlSiUeo/PGvmAXrkFURC9S8FbhZdWEcUpf9vcKAoEzV8qGA4J +xbKlj8EOjSkdq3OQ1hHjP8gynbbzMhZQwjbnWqoiPj35ed9EMn+0QcX+GmynGq6T +hBXdRdeQjZC6rmXzNF2opCyxqx3BJ0C7hUtpHegmeoH34wn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run: `apt-get install openzfs-zfsutils openzfs-zfs-dkms openzfs-zfs-initramfs` -OpenZFS is released under a CDDL license. -For more details see the NOTICE, LICENSE and COPYRIGHT files; `UCRL-CODE-235197` - -# Supported Kernels - * The `META` file contains the officially recognized supported Linux kernel versions. - * Supported FreeBSD versions are any supported branches and releases starting from 12.2-RELEASE. +## Repository +This repository gets actively rebased as new releases come out, DO NOT expect a linear git history. diff --git a/README.md.orig b/README.md.orig new file mode 100644 index 000000000000..331889560950 --- /dev/null +++ b/README.md.orig @@ -0,0 +1,35 @@ +![img](https://openzfs.github.io/openzfs-docs/_static/img/logo/480px-Open-ZFS-Secondary-Logo-Colour-halfsize.png) + +OpenZFS is an advanced file system and volume manager which was originally +developed for Solaris and is now maintained by the OpenZFS community. +This repository contains the code for running OpenZFS on Linux and FreeBSD. + +[![codecov](https://codecov.io/gh/openzfs/zfs/branch/master/graph/badge.svg)](https://codecov.io/gh/openzfs/zfs) +[![coverity](https://scan.coverity.com/projects/1973/badge.svg)](https://scan.coverity.com/projects/openzfs-zfs) + +# Official Resources + + * [Documentation](https://openzfs.github.io/openzfs-docs/) - for using and developing this repo + * [ZoL Site](https://zfsonlinux.org) - Linux release info & links + * [Mailing lists](https://openzfs.github.io/openzfs-docs/Project%20and%20Community/Mailing%20Lists.html) + * [OpenZFS site](https://openzfs.org/) - for conference videos and info on other platforms (illumos, OSX, Windows, etc) + +# Installation + +Full documentation for installing OpenZFS on your favorite operating system can +be found at the [Getting Started Page](https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html). + +# Contribute & Develop + +We have a separate document with [contribution guidelines](./.github/CONTRIBUTING.md). + +We have a [Code of Conduct](./CODE_OF_CONDUCT.md). + +# Release + +OpenZFS is released under a CDDL license. +For more details see the NOTICE, LICENSE and COPYRIGHT files; `UCRL-CODE-235197` + +# Supported Kernels + * The `META` file contains the officially recognized supported Linux kernel versions. + * Supported FreeBSD versions are any supported branches and releases starting from 12.2-RELEASE.