summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/CODEOWNERS9
-rw-r--r--.github/ISSUE_TEMPLATE/bug_report.md26
-rw-r--r--.github/ISSUE_TEMPLATE/documentation.md8
-rw-r--r--.github/ISSUE_TEMPLATE/feature_request.md8
-rw-r--r--.github/dependabot.yml14
-rw-r--r--.github/labeler.yml292
-rw-r--r--.github/pull_request_template.md10
-rw-r--r--.github/stale.yml23
-rw-r--r--.github/workflows/codeql.yml53
-rw-r--r--.github/workflows/container.yml56
-rw-r--r--.github/workflows/integration.yml92
-rw-r--r--.github/workflows/labels.yml11
-rw-r--r--.github/workflows/lint.yml38
-rw-r--r--.github/workflows/manualtest.yml38
-rw-r--r--.github/workflows/pr.yml19
-rw-r--r--.github/workflows/release.yml34
16 files changed, 731 insertions, 0 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
new file mode 100644
index 0000000..e4362b2
--- /dev/null
+++ b/.github/CODEOWNERS
@@ -0,0 +1,9 @@
+# This is a comment.
+# Each line is a file pattern followed by one or more owners.
+
+# These owners will be the default owners for everything in
+# the repo. Unless a later match takes precedence,
+# @global-owner1 and @global-owner2 will be requested for
+# review when someone opens a pull request.
+* @haraldh @danimo @johannbg
+
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..d57b92a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,26 @@
+---
+name: "\U0001F41B Bug report"
+about: A report of an error in a recent Dracut version
+labels: 'bug'
+---
+
+**Describe the bug**
+A clear and concise description of what the error is.
+
+**Distribution used**
+Which distribution was this behaviour seen in?
+
+**Dracut version**
+Which dracut version was this behaviour seen in?
+
+**Init system**
+Which init system is being used?
+
+**To Reproduce**
+Steps or code to reproduce the behavior.
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Additional context**
+Add any other context you like about the problem here.
diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md
new file mode 100644
index 0000000..e3501cc
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/documentation.md
@@ -0,0 +1,8 @@
+---
+name: "\U0001F4D6 Documentation"
+about: Suggest an improvement for documentation in Dracut
+labels: 'documents'
+---
+
+**Describe the documentation**
+A clear and concise description of what should be better documented.
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..1772c23
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,8 @@
+---
+name: "\U00002728 Feature Request"
+about: A request for enhancement in Dracut
+labels: 'enhancement'
+---
+
+**Describe the enhancement**
+A clear and concise description of what the enhancement is that you would like to see.
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..3bdd491
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,14 @@
+version: 2
+
+# Maintain dependencies for GitHub Actions
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "weekly"
+ day: "tuesday"
+ commit-message:
+ prefix: "chore"
+ include: "scope"
+ ignore:
+ - dependency-name: "Manual test"
diff --git a/.github/labeler.yml b/.github/labeler.yml
new file mode 100644
index 0000000..ba47d04
--- /dev/null
+++ b/.github/labeler.yml
@@ -0,0 +1,292 @@
+repository:
+ - ./*
+
+github:
+ - .github/*
+ - .github/**/*
+
+dracut-install:
+ - install/*
+ - install/**/*
+
+example:
+ - examples/*
+ - examples/**/*
+ - examples/**/**/*
+
+modules:
+ - modules.d/*
+ - modules.d/**/*
+
+bash:
+ - modules.d/00bash/*
+
+dash:
+ - modules.d/00dash/*
+
+mksh:
+ - modules.d/00mksh/*
+
+systemd:
+ - modules.d/00systemd/*
+
+warpclock:
+ - modules.d/00warpclock/*
+
+fips:
+ - modules.d/01fips/*
+
+systemd-initrd:
+ - modules.d/01systemd-initrd/*
+
+caps:
+ - modules.d/02caps/*
+
+systemd-networkd:
+ - modules.d/02systemd-networkd/*
+
+modsign:
+ - modules.d/03modsign/*
+
+rescue:
+ - modules.d/03rescue/*
+
+watchdog:
+ - modules.d/04watchdog/*
+
+busybox:
+ - modules.d/05busybox/*
+
+rngd:
+ - modules.d/06rngd/*
+
+i18n:
+ - modules.d/10i18n/*
+
+convertfs:
+ - modules.d/30convertfs/*
+
+network-legacy:
+ - modules.d/35network-legacy/*
+
+network-manager:
+ - modules.d/35network-manager/*
+
+network:
+ - modules.d/40network/*
+
+ifcfg:
+ - modules.d/45ifcfg/*
+
+url-lib:
+ - modules.d/45url-lib/*
+
+drm:
+ - modules.d/50drm/*
+
+plymouth:
+ - modules.d/50plymouth/*
+
+cms:
+ - modules.d/80cms/*
+
+lvmmerge:
+ - modules.d/80lvmmerge/*
+
+cio_ignore:
+ - modules.d/81cio_ignore/*
+
+btrfs:
+ - modules.d/90btrfs/*
+
+crypt:
+ - modules.d/90crypt/*
+
+dm:
+ - modules.d/90dm/*
+
+dmraid:
+ - modules.d/90dmraid/*
+
+dmsquash-live:
+ - modules.d/90dmsquash-live/*
+
+dmsquash-live-ntfs:
+ - modules.d/90dmsquash-live-ntfs/*
+
+kernel-modules:
+ - modules.d/90kernel-modules/*
+
+kernel-modules-extra:
+ - modules.d/90kernel-modules-extra/*
+
+kernel-network-modules:
+ - modules.d/90kernel-network-modules/*
+
+livenet:
+ - modules.d/90livenet/*
+
+lvm:
+ - modules.d/90lvm/*
+
+mdraid:
+ - modules.d/90mdraid/*
+
+multipath:
+ - modules.d/90multipath/*
+
+nvdimm:
+ - modules.d/90nvdimm/*
+
+overlayfs:
+ - modules.d/90overlayfs/*
+
+ppcmac:
+ - modules.d/90ppcmac/*
+
+qemu:
+ - modules.d/90qemu/*
+
+qemu-net:
+ - modules.d/90qemu-net/*
+
+crypt-gpg:
+ - modules.d/91crypt-gpg/*
+
+crypt-loop:
+ - modules.d/91crypt-loop/*
+
+zipl:
+ - modules.d/91zipl/*
+
+cifs:
+ - modules.d/95cifs/*
+
+dasd:
+ - modules.d/95dasd/*
+
+dasd_mod:
+ - modules.d/95dasd_mod/*
+
+dasd_rules:
+ - modules.d/95dasd_rules/*
+
+dcssblk:
+ - modules.d/95dcssblk/*
+
+debug:
+ - modules.d/95debug/*
+
+fcoe:
+ - modules.d/95fcoe/*
+
+fcoe-uefi:
+ - modules.d/95fcoe-uefi/*
+
+fstab-sys:
+ - modules.d/95fstab-sys/*
+
+iscsi:
+ - modules.d/95iscsi/*
+
+lunmask:
+ - modules.d/95lunmask/*
+
+nbd:
+ - modules.d/95nbd/*
+
+nfs:
+ - modules.d/95nfs/*
+
+nvmf:
+ - modules.d/95nvmf/*
+
+qeth_rules:
+ - modules.d/95qeth_rules/*
+
+resume:
+ - modules.d/95resume/*
+
+rootfs-block:
+ - modules.d/95rootfs-block/*
+
+ssh-client:
+ - modules.d/95ssh-client/*
+
+terminfo:
+ - modules.d/95terminfo/*
+
+udev-rules:
+ - modules.d/95udev-rules/*
+
+virtfs:
+ - modules.d/95virtfs/*
+
+virtiofs:
+ - modules.d/95virtiofs/*
+
+zfcp:
+ - modules.d/95zfcp/*
+
+zfcp_rules:
+ - modules.d/95zfcp_rules/*
+
+znet:
+ - modules.d/95znet/*
+
+securityfs:
+ - modules.d/96securityfs/*
+
+biosdevname:
+ - modules.d/97biosdevname/*
+
+masterkey:
+- modules.d/97masterkey/*
+
+dracut-systemd:
+ - modules.d/98dracut-systemd/*
+
+ecryptfs:
+ - modules.d/98ecryptfs/*
+
+integrity:
+ - modules.d/98integrity/*
+
+pollcdrom:
+ - modules.d/98pollcdrom/*
+
+selinux:
+ - modules.d/98selinux/*
+
+syslog:
+ - modules.d/98syslog/*
+
+usrmount:
+ - modules.d/98usrmount/*
+
+base:
+ - modules.d/99base/*
+
+fs-lib:
+ - modules.d/99fs-lib/*
+
+img-lib:
+ - modules.d/99img-lib/*
+
+memstrack:
+ - modules.d/99memstrack/*
+
+shutdown:
+ - modules.d/99shutdown/*
+
+squash:
+ - modules.d/99squash/*
+
+uefi-lib:
+ - modules.d/99uefi-lib/*
+
+test:
+ - test/*
+ - test/**/*
+ - modules.d/80test*
+ - modules.d/80test*/*
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644
index 0000000..ef281c3
--- /dev/null
+++ b/.github/pull_request_template.md
@@ -0,0 +1,10 @@
+This pull request changes...
+
+## Changes
+
+## Checklist
+- [ ] I have tested it locally
+- [ ] I have reviewed and updated any documentation if relevant
+- [ ] I am providing new code and test(s) for it
+
+Fixes #
diff --git a/.github/stale.yml b/.github/stale.yml
new file mode 100644
index 0000000..83343ab
--- /dev/null
+++ b/.github/stale.yml
@@ -0,0 +1,23 @@
+# Number of days of inactivity before an issue becomes stale
+daysUntilStale: 30
+# Number of days of inactivity before a stale issue is closed
+daysUntilClose: 7
+# Ignore if in a milestone
+exemptMilestones: true
+# Issues with these labels will never be considered stale
+exemptLabels:
+ - documents
+ - enhancement
+ - regression
+ - wiki
+ - bug
+# Label to use when marking an issue as stale
+staleLabel: stale
+# Comment to post when marking an issue as stale. Set to `false` to disable
+markComment: >
+ This issue is being marked as stale because it has not had any recent activity.
+ It will be closed if no further activity occurs.
+ If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days.
+ Thank you for your contributions.
+# Comment to post when closing a stale issue. Set to `false` to disable
+closeComment: false
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000..e6f8e42
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,53 @@
+---
+# vi: ts=2 sw=2 et:
+# SPDX-License-Identifier: LGPL-2.1-or-later
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+permissions:
+ contents: read
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-22.04
+ concurrency:
+ group: ${{ github.workflow }}-${{ matrix.language }}-${{ github.ref }}
+ cancel-in-progress: true
+ permissions:
+ actions: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: ['cpp', 'python']
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ queries: +security-extended,security-and-quality
+
+ - name: Install dependencies
+ run: |
+ sudo apt -y update
+ sudo apt -y install asciidoc gcc libkmod-dev libsystemd-dev pkg-config
+
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml
new file mode 100644
index 0000000..d8c8808
--- /dev/null
+++ b/.github/workflows/container.yml
@@ -0,0 +1,56 @@
+name: Container
+on:
+ schedule:
+ - cron: '30 11 * * *' # every day at 11:30 UTC
+ push:
+ branches: [ master ]
+ paths:
+ - 'test/container/**'
+ - '.github/workflows/container.yml'
+ pull_request:
+ branches: [ master ]
+ paths:
+ - 'test/container/**'
+ - '.github/workflows/container.yml'
+
+permissions:
+ packages: write
+ contents: read
+
+jobs:
+ push_to_registry:
+ if: github.repository == 'dracutdevs/dracut' || vars.CONTAINER == 'enabled'
+ name: Build and push containers image to GitHub Packages
+ runs-on: ubuntu-latest
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.config.dockerfile }}
+ cancel-in-progress: true
+ strategy:
+ fail-fast: false
+ matrix:
+ config:
+ - { dockerfile: 'Dockerfile-Fedora-latest', tag: 'fedora:latest' }
+ - { dockerfile: 'Dockerfile-OpenSuse-latest', tag: 'opensuse:latest' }
+ - { dockerfile: 'Dockerfile-Arch', tag: 'arch:latest' }
+ - { dockerfile: 'Dockerfile-Debian', tag: 'debian:latest' }
+ - { dockerfile: 'Dockerfile-Gentoo', tag: 'gentoo:latest' }
+ - { dockerfile: 'Dockerfile-Ubuntu', tag: 'ubuntu:latest' }
+ steps:
+ - name: Check out the repo
+ uses: actions/checkout@v3
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+ - name: Login to GitHub Container Registry
+ uses: docker/login-action@v2
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+ - name: Set up env
+ run: echo "repository_owner=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}
+ - name: Build and Push Container
+ uses: docker/build-push-action@v4
+ with:
+ file: test/container/${{ matrix.config.dockerfile }}
+ tags: ghcr.io/${{env.repository_owner}}/${{ matrix.config.tag }}
+ push: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
new file mode 100644
index 0000000..ab075b0
--- /dev/null
+++ b/.github/workflows/integration.yml
@@ -0,0 +1,92 @@
+name: Integration Test
+
+on:
+ pull_request:
+ branches: [ master ]
+
+env:
+ DEBUGFAIL: "${{ secrets.ACTIONS_STEP_DEBUG && 'rd.debug' }}"
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ timeout-minutes: 30
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}
+ cancel-in-progress: true
+ strategy:
+ matrix:
+ container: [
+ "arch:latest",
+ "debian:latest",
+ "fedora:latest",
+ "gentoo:latest",
+ "opensuse:latest",
+ "ubuntu:latest",
+ ]
+ test: [
+ "01",
+ "02",
+ "03",
+ "04",
+ "10",
+ "11",
+ "12",
+ "13",
+ "14",
+ "15",
+ "16",
+ "17",
+ "18",
+ "62",
+ "98",
+ ]
+ fail-fast: false
+ container:
+ image: ghcr.io/dracutdevs/${{ matrix.container }}
+ options: "--privileged -v /dev:/dev"
+ steps:
+ - name: "Checkout Repository"
+ uses: actions/checkout@v1
+ with:
+ fetch-depth: 0
+
+ - name: "${{ matrix.container }} TEST-${{ matrix.test }}"
+ run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
+ network:
+ runs-on: ubuntu-latest
+ timeout-minutes: 45
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.container }}-${{ matrix.test }}-${{ matrix.network }}
+ cancel-in-progress: true
+ strategy:
+ matrix:
+ container: [
+ "fedora:latest",
+ ]
+ network: [
+ "network-manager",
+ "network-legacy",
+ #"systemd-networkd",
+ #"connman",
+ ]
+ test: [
+ "20",
+ "30",
+ "35",
+ "40",
+ "60",
+ # "50", # times out
+ ]
+ fail-fast: false
+ container:
+ image: ghcr.io/dracutdevs/${{ matrix.container }}
+ options: "--privileged -v /dev:/dev"
+ steps:
+ - name: "Checkout Repository"
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: "${{ matrix.container }} TEST-${{ matrix.test }}"
+ run: USE_NETWORK=${{ matrix.network }} ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml
new file mode 100644
index 0000000..9fa7a92
--- /dev/null
+++ b/.github/workflows/labels.yml
@@ -0,0 +1,11 @@
+name: "Pull Request Labeler"
+
+on: pull_request_target
+
+jobs:
+ triage:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/labeler@main
+ with:
+ repo-token: "${{ secrets.GITHUB_TOKEN }}"
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
new file mode 100644
index 0000000..d02b332
--- /dev/null
+++ b/.github/workflows/lint.yml
@@ -0,0 +1,38 @@
+name: Lint
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ lint-shell:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: shfmt
+ uses: luizm/action-sh-checker@v0.6.0
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ SHFMT_OPTS: -s # arguments to shfmt.
+ with:
+ sh_checker_shellcheck_disable: false
+ sh_checker_comment: true
+
+ lint-c:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: install tools
+ run: sudo apt-get install astyle
+
+ - name: indent
+ run: make indent-c
+
+ - name: check formatting
+ run: git diff --exit-code
diff --git a/.github/workflows/manualtest.yml b/.github/workflows/manualtest.yml
new file mode 100644
index 0000000..b790dcf
--- /dev/null
+++ b/.github/workflows/manualtest.yml
@@ -0,0 +1,38 @@
+name: Manual test
+
+on:
+ workflow_dispatch:
+ inputs:
+ test:
+ description: "Array of tests to run, such as [11,12]"
+ default: "['04']"
+ required: true
+ container:
+ type: choice
+ description: 'distro'
+ default: 'fedora'
+ options:
+ - "fedora"
+ - "arch"
+ - "debian"
+ - "ubuntu"
+ - "opensuse"
+ - "gentoo"
+
+jobs:
+ test:
+ runs-on: ubuntu-latest
+ timeout-minutes: 45
+ strategy:
+ matrix:
+ test: ${{ fromJSON(inputs.test) }}
+ container:
+ image: ghcr.io/dracutdevs/${{ inputs.container }}
+ options: "--privileged -v /dev:/dev"
+ steps:
+ - name: "Checkout Repository"
+ uses: actions/checkout@v1
+ with:
+ fetch-depth: 0
+ - name: "${{ inputs.container }} ${{ matrix.test }}"
+ run: ./tools/test-github.sh "TEST-${{ matrix.test }}" ${{ matrix.test }}
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
new file mode 100644
index 0000000..60ca1db
--- /dev/null
+++ b/.github/workflows/pr.yml
@@ -0,0 +1,19 @@
+name: Commisery
+on:
+ pull_request:
+ types: [edited, opened, synchronize, reopened]
+
+jobs:
+ commit-message:
+ name: Conventional Commit Message Checker (Commisery)
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check-out the repo under $GITHUB_WORKSPACE
+ uses: actions/checkout@v3
+
+ - name: Run Commisery
+ uses: dracutdevs/commisery-action@master
+ with:
+ token: ${{ secrets.GITHUB_TOKEN }}
+ pull_request: ${{ github.event.number }}
+
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..7497d6e
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,34 @@
+name: Release
+
+on:
+ schedule:
+ ## Schedule the job to run on Apr-1, Aug-1, Dec-1
+ - cron: '0 0 1 APR,AUG,DEC *'
+ workflow_dispatch:
+ inputs:
+ tag:
+ description: "release version number (3 digits)"
+ required: true
+
+permissions:
+ contents: write
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Build
+ run: bash ${GITHUB_WORKSPACE}/tools/release.sh ${{ inputs.tag }}
+
+ - name: Release
+ if: ${{ env.new_version }}
+ uses: softprops/action-gh-release@v0.1.15
+ with:
+ tag_name: ${{ env.new_version }}
+ name: dracut-${{ env.new_version }}
+ body_path: ${{ github.workspace }}/release.md