Browse Source

doc + gitignore + github action

main
Nicolas Massé 1 month ago
parent
commit
c106a775f7
  1. 12
      .github/workflows/copr-build.yaml
  2. 2
      .gitignore
  3. 39
      README.md

12
.github/workflows/copr-build.yaml

@ -1,10 +1,14 @@
name: Trigger COPR Build name: Trigger COPR Build
on: on:
# Trigger on push to main branch # Trigger on push, but only for SPECS and SOURCES changes
#push: push:
# branches: paths:
# - main - fedora-*/SPECS/*.spec
- fedora-*/SOURCES/**
- centos-*/SPECS/*.spec
- centos-*/SOURCES/**
# Enables manual triggering of the workflow # Enables manual triggering of the workflow
workflow_dispatch: workflow_dispatch:

2
.gitignore

@ -2,3 +2,5 @@ SRPMS
RPMS RPMS
BUILD BUILD
BUILDROOT BUILDROOT
*.orig
*.rej

39
README.md

@ -19,7 +19,14 @@ The packages are built and hosted on COPR. To use them on your aarch64 system:
1. **Enable the COPR repository:** 1. **Enable the COPR repository:**
```bash ```bash
# Enable the COPR repository
sudo dnf copr enable nmasse-itix/zfs-aarch64 sudo dnf copr enable nmasse-itix/zfs-aarch64
# Optionally, limit the packages to only ZFS-related ones
sudo dnf config-manager setopt 'copr:copr.fedorainfracloud.org:nmasse-itix:zfs-aarch64.includepkgs=zfs zfs-dkms libvirt-daemon-driver-storage-zfs'
# Verify the repository is enabled and packages are available
sudo dnf --repo=copr:copr.fedorainfracloud.org:nmasse-itix:zfs-aarch64 search zfs
``` ```
2. **Install ZFS packages:** 2. **Install ZFS packages:**
@ -28,7 +35,7 @@ The packages are built and hosted on COPR. To use them on your aarch64 system:
sudo dnf install zfs zfs-dkms sudo dnf install zfs zfs-dkms
# Install libvirt with ZFS support # Install libvirt with ZFS support
sudo dnf install libvirt sudo dnf install libvirt libvirt-daemon-kvm libvirt-daemon-driver-storage-zfs
``` ```
And then follow the [Getting Started](https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html) documentation. And then follow the [Getting Started](https://openzfs.github.io/openzfs-docs/Getting%20Started/index.html) documentation.
@ -66,6 +73,36 @@ And then send the build to COPR.
./build.sh ./build.sh
``` ```
## Local compilation
```sh
# Install dependencies
dnf install -y git git-lfs mock rpm-build
# Clone the repository
git clone https://github.com/nmasse-itix/zfs-aarch64.git
cd zfs-aarch64
git lfs install
git lfs pull
# Function to compile a spec file
function build_spec() {
mock_chroot="$1"
spec="$2"
spec_name="$(basename $spec .spec)"
rootdir="$(dirname $spec)/../"
rootdir="$(realpath $rootdir)"
outdir="$rootdir/RPMS/$spec_name-$mock_chroot-$(date -Iseconds)/"
mkdir -p "$outdir"
rm -f "$rootdir/$spec_name"-*.src.rpm
rpmbuild --define "_topdir $rootdir" -bs "$spec"
mock -r "$mock_chroot" --resultdir="$outdir" "$rootdir/SRPMS/$spec_name"-*.src.rpm
}
# For example, to build libvirt for Fedora 42 aarch64
build_spec "fedora-42-aarch64" "fedora-42/SPECS/libvirt.spec"
```
## License ## License
The source code of ZFS, Libvirt and the Fedora RPM spec files remain licensed under their original license. The source code of ZFS, Libvirt and the Fedora RPM spec files remain licensed under their original license.

Loading…
Cancel
Save