Skip to content

Commit

Permalink
Merge pull request #8 from enix/zfs-20240105
Browse files Browse the repository at this point in the history
feat(zfs): build zfs against FC 3602.2.3
  • Loading branch information
donch authored Jan 5, 2024
2 parents 81bd488 + db92e96 commit 3bf6524
Show file tree
Hide file tree
Showing 50 changed files with 5,648 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
max-parallel: 6
matrix:
flatcarversion: ["3602.2.0", "3602.2.1", "3602.2.2"]
flatcarversion: ["3602.2.0", "3602.2.1", "3602.2.2", "3602.2.3"]
permissions:
# allow the action to create a release
contents: write
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DIST pip-23.2.1-py3-none-any.whl 2086091 BLAKE2B 0a35bf4ba589f07e3c800d8f835e4bcdcd433976db83f91c86e12a2316b0b1c7de7120b248d70fe8b5587c28bb3c6e7bc633c64cdfb65a1f18f87a9e7a423181 SHA512 016a8cbd09384f1a9a44cb0e8274df75a8bcb2f3966bb5d708c62145289efaa5db98f75256c97e4f8046735ce2e529fbb076f284a46cdb716e89a75660200ad9
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

inherit pypi

DESCRIPTION="Shared pip wheel for ensurepip Python module"
HOMEPAGE="https://pypi.org/project/pip/"
SRC_URI="$(pypi_wheel_url "${PN#ensurepip-}")"
S=${DISTDIR}

LICENSE="Apache-2.0 BSD BSD-2 ISC LGPL-2.1+ MIT MPL-2.0 PSF-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"

RDEPEND="
!<dev-python/ensurepip-wheels-100
"

src_install() {
insinto /usr/lib/python/ensurepip
doins "${A}"
}
11 changes: 11 additions & 0 deletions files/zfs/3602.2.3/overlay/dev-python/ensurepip-pip/metadata.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>[email protected]</email>
</maintainer>
<stabilize-allarches/>
<upstream>
<remote-id type="pypi">pip</remote-id>
</upstream>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2022-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Shared wheels for ensurepip Python module"
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"

LICENSE="metapackage"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"

RDEPEND="
dev-python/ensurepip-pip
dev-python/ensurepip-setuptools
"
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="project">
<email>[email protected]</email>
</maintainer>
<stabilize-allarches/>
</pkgmetadata>
201 changes: 201 additions & 0 deletions files/zfs/3602.2.3/overlay/eclass/dist-kernel-utils.eclass
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
# Copyright 2020-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: dist-kernel-utils.eclass
# @MAINTAINER:
# Distribution Kernel Project <[email protected]>
# @AUTHOR:
# Michał Górny <[email protected]>
# @SUPPORTED_EAPIS: 7 8
# @BLURB: Utility functions related to Distribution Kernels
# @DESCRIPTION:
# This eclass provides various utility functions related to Distribution
# Kernels.

# @ECLASS_VARIABLE: KERNEL_IUSE_SECUREBOOT
# @PRE_INHERIT
# @DEFAULT_UNSET
# @DESCRIPTION:
# If set to a non-null value, inherits secureboot.eclass
# and allows signing of generated kernel images.

if [[ ! ${_DIST_KERNEL_UTILS} ]]; then

case ${EAPI} in
7|8) ;;
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
esac

if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
inherit secureboot
fi

# @FUNCTION: dist-kernel_build_initramfs
# @USAGE: <output> <version>
# @DESCRIPTION:
# Build an initramfs for the kernel. <output> specifies the absolute
# path where initramfs will be created, while <version> specifies
# the kernel version, used to find modules.
#
# Note: while this function uses dracut at the moment, other initramfs
# variants may be supported in the future.
dist-kernel_build_initramfs() {
debug-print-function ${FUNCNAME} "${@}"

[[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments"
local output=${1}
local version=${2}

local rel_image_path=$(dist-kernel_get_image_path)
local image=${output%/*}/${rel_image_path##*/}

local args=(
--force
# if uefi=yes is used, dracut needs to locate the kernel image
--kernel-image "${image}"

# positional arguments
"${output}" "${version}"
)

ebegin "Building initramfs via dracut"
dracut "${args[@]}"
eend ${?} || die -n "Building initramfs failed"
}

# @FUNCTION: dist-kernel_get_image_path
# @DESCRIPTION:
# Get relative kernel image path specific to the current ${ARCH}.
dist-kernel_get_image_path() {
case ${ARCH} in
amd64|x86)
echo arch/x86/boot/bzImage
;;
arm64)
echo arch/arm64/boot/Image.gz
;;
arm)
echo arch/arm/boot/zImage
;;
hppa|ppc|ppc64|sparc)
# https://www.kernel.org/doc/html/latest/powerpc/bootwrapper.html
# ./ is required because of ${image_path%/*}
# substitutions in the code
echo ./vmlinux
;;
riscv)
echo arch/riscv/boot/Image.gz
;;
*)
die "${FUNCNAME}: unsupported ARCH=${ARCH}"
;;
esac
}

# @FUNCTION: dist-kernel_install_kernel
# @USAGE: <version> <image> <system.map>
# @DESCRIPTION:
# Install kernel using installkernel tool. <version> specifies
# the kernel version, <image> full path to the image, <system.map>
# full path to System.map.
dist-kernel_install_kernel() {
debug-print-function ${FUNCNAME} "${@}"

[[ ${#} -eq 3 ]] || die "${FUNCNAME}: invalid arguments"
local version=${1}
local image=${2}
local map=${3}

# if dracut is used in uefi=yes mode, initrd will actually
# be a combined kernel+initramfs UEFI executable. we can easily
# recognize it by PE magic (vs cpio for a regular initramfs)
local initrd=${image%/*}/initrd
local magic
[[ -s ${initrd} ]] && read -n 2 magic < "${initrd}"
if [[ ${magic} == MZ ]]; then
einfo "Combined UEFI kernel+initramfs executable found"
# install the combined executable in place of kernel
image=${initrd%/*}/uki.efi
mv "${initrd}" "${image}" || die
# We moved the generated initrd, prevent dracut from running again
# https://github.com/dracutdevs/dracut/pull/2405
shopt -s nullglob
local plugins=()
for file in "${EROOT}"/etc/kernel/install.d/*.install; do
plugins+=( "${file}" )
done
for file in "${EROOT}"/usr/lib/kernel/install.d/*.install; do
if ! has "${file##*/}" 50-dracut.install 51-dracut-rescue.install "${plugins[@]##*/}"; then
plugins+=( "${file}" )
fi
done
shopt -u nullglob
export KERNEL_INSTALL_PLUGINS="${KERNEL_INSTALL_PLUGINS} ${plugins[@]}"
fi

if [[ ${KERNEL_IUSE_SECUREBOOT} ]]; then
# Kernel-install requires uki's are named uki.efi, sign in-place
secureboot_sign_efi_file "${image}" "${image}"
fi

ebegin "Installing the kernel via installkernel"
# note: .config is taken relatively to System.map;
# initrd relatively to bzImage
installkernel "${version}" "${image}" "${map}"
eend ${?} || die -n "Installing the kernel failed"
}

# @FUNCTION: dist-kernel_reinstall_initramfs
# @USAGE: <kv-dir> <kv-full>
# @DESCRIPTION:
# Rebuild and install initramfs for the specified dist-kernel.
# <kv-dir> is the kernel source directory (${KV_DIR} from linux-info),
# while <kv-full> is the full kernel version (${KV_FULL}).
# The function will determine whether <kernel-dir> is actually
# a dist-kernel, and whether initramfs was used.
#
# This function is to be used in pkg_postinst() of ebuilds installing
# kernel modules that are included in the initramfs.
dist-kernel_reinstall_initramfs() {
debug-print-function ${FUNCNAME} "${@}"

[[ ${#} -eq 2 ]] || die "${FUNCNAME}: invalid arguments"
local kernel_dir=${1}
local ver=${2}

local image_path=${kernel_dir}/$(dist-kernel_get_image_path)
local initramfs_path=${image_path%/*}/initrd
if [[ ! -f ${image_path} ]]; then
eerror "Kernel install missing, image not found:"
eerror " ${image_path}"
eerror "Initramfs will not be updated. Please reinstall your kernel."
return
fi
if [[ ! -f ${initramfs_path} && ! -f ${initramfs_path%/*}/uki.efi ]]; then
einfo "No initramfs or uki found at ${image_path}"
return
fi

dist-kernel_build_initramfs "${initramfs_path}" "${ver}"
dist-kernel_install_kernel "${ver}" "${image_path}" \
"${kernel_dir}/System.map"
}

# @FUNCTION: dist-kernel_PV_to_KV
# @USAGE: <pv>
# @DESCRIPTION:
# Convert a Gentoo-style ebuild version to kernel "x.y.z[-rcN]" version.
dist-kernel_PV_to_KV() {
debug-print-function ${FUNCNAME} "${@}"

[[ ${#} -ne 1 ]] && die "${FUNCNAME}: invalid arguments"
local pv=${1}

local kv=${pv%%_*}
[[ -z $(ver_cut 3- "${kv}") ]] && kv+=".0"
[[ ${pv} == *_* ]] && kv+=-${pv#*_}
echo "${kv}"
}

_DIST_KERNEL_UTILS=1
fi
Loading

0 comments on commit 3bf6524

Please sign in to comment.