diff --git a/anda/others/kernel-fyra/anda.hcl b/anda/others/kernel-fyra/anda.hcl new file mode 100644 index 0000000000..60ad9fc641 --- /dev/null +++ b/anda/others/kernel-fyra/anda.hcl @@ -0,0 +1,6 @@ +project pkg { + arches = ["x86_64", "aarch64"] + rpm { + spec = "dummy.spec" + } +} \ No newline at end of file diff --git a/anda/others/kernel-fyra/build.sh b/anda/others/kernel-fyra/build.sh new file mode 100644 index 0000000000..c3d7f552ef --- /dev/null +++ b/anda/others/kernel-fyra/build.sh @@ -0,0 +1,58 @@ +#!/bin/sh + +# Set the kernel-ark release build rev number +export KERNEL_ARK_REV='200' + +# Set the Fyra kernel overlay version +export FYRA_KERNELOVERLAY_VER='2' + +# Fetch the patches +git clone https://github.com/FyraLabs/linux-kernel-patches.git patches + +# Move into the patches' directory +pushd patches + +# Acquire the latest supported kernel-ark branch +export BRANCH="$(readlink current)" + +# Move out from the patches' directory +popd + +# Fetch the source +git clone -b ${BRANCH} https://gitlab.com/cki-project/kernel-ark.git source + +# Move into the source directory +pushd source + +# Set proper user name for commits +git config user.name 'Terra' ; git config user.email 'mail@example.com' + +# Apply all patches +for patch in ../patches/${BRANCH}/*.patch + do git am $patch +done + +# Build the SRPM +make \ + IS_FEDORA=1 \ + BUILD=${KERNEL_ARK_REV} \ + SPECPACKAGE_NAME='kernel-fyra' \ + DISTLOCALVERSION=".fyra${FYRA_KERNELOVERLAY_VER}" \ + dist-srpm -j$(nproc) + +# Build the resulting SRPM +rpmbuild -rb \ + --without=debug \ + --without=configchecks \ + redhat/rpm/SRPMS/kernel-fyra-*.src.rpm + +# Move the resulting RPM files into the target directory +for file in redhat/rpm/RPMS/*.rpm + do mv -v $file ../anda-build/rpm/rpms/ +done + +# Also move the SRPM package file +mv -v redhat/rpm/SRPMS/*.src.rpm ../anda-build/rpm/srpms/ + +# We're done here +exit 0 diff --git a/anda/others/kernel-fyra/dummy.spec b/anda/others/kernel-fyra/dummy.spec new file mode 100644 index 0000000000..14a3c554d2 --- /dev/null +++ b/anda/others/kernel-fyra/dummy.spec @@ -0,0 +1,11 @@ +Name: dummy +Summary: Dummy package +License: MIT + +Version: 1.0.0 +Release: 1%{?dist} + +%description +Dummy + +%files diff --git a/anda/others/kernel-fyra/pre.rhai b/anda/others/kernel-fyra/pre.rhai new file mode 100644 index 0000000000..4976a653e6 --- /dev/null +++ b/anda/others/kernel-fyra/pre.rhai @@ -0,0 +1,8 @@ +// Install the kernel dependencies first +sh("sudo dnf5 builddep kernel"); + +// Install git for source and patchset retrieval +sh("sudo dnf5 install git"); + +// Run the actual build script +sh("build.sh"); \ No newline at end of file