Skip to contentSkip to conversation

Add zfs recipe

PATCH In review Windel Bouwman 2 participants 4 messages May 2, 2022 – May 3, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add zfs recipe

---
 .../recipes-filesystems/zfs/zfs_2.1.4.bb      | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb
meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +46 -0
new file mode 100644
index 000000000..01a64cc95
@@ -0,0 +1,46 @@
+
+SUMMARY = "OpenZFS on Linux and FreeBSD"
+DESCRIPTION = "OpenZFS on Linux and FreeBSD"
+LICENSE = "CDDL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
+HOMEPAGE ="https://github.com/openzfs/zfs"
+
+SRC_URI = "https://github.com/openzfs/zfs/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz"
+SRC_URI[sha256sum] = "3b52c0d493f806f638dca87dde809f53861cd318c1ebb0e60daeaa061cf1acf6"
+
+# Using both 'module' and 'autotools' classes seems a bit odd, they both
+# define a do_compile function.
+# That's why we opt for module-base, also this prevents module splitting.
+inherit module-base pkgconfig autotools
+
+DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl"
+
+EXTRA_OECONF:append = " \
+    --disable-pyzfs \
+    --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \
+    --enable-systemd \
+    --disable-sysvinit \
+    --without-dracutdir \
+    "
+
+do_install:append() {
+    # /usr/share/zfs contains the zfs-tests folder which we do not need:
+    rm -rf ${D}${datadir}/zfs
+
+    rm -rf ${D}${datadir}/initramfs-tools
+}
+
+FILES:${PN} += "\
+    ${base_sbindir}/* \
+    ${base_libdir}/* \
+    ${sysconfdir}/* \
+    ${sbindir}/* \
+    ${bindir}/* \
+    ${libexecdir}/${BPN}/* \
+    ${libdir}/* \
+    "
+
+FILES:${PN}-dev += "\
+    ${prefix}/src/zfs-${PV}/* \
+    ${prefix}/src/spl-${PV}/* \
+    "
Signature · 1 line
2.25.1
#1 lore raw

looks better this time but fails in packaging

https://errors.yoctoproject.org/Errors/Details/655897/

Quoted 71 lines · Windel Bouwman
---
 .../recipes-filesystems/zfs/zfs_2.1.4.bb      | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb
meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +46 -1
new file mode 100644
index 000000000..01a64cc95
@@ -0,0 +1,46 @@
+
+SUMMARY = "OpenZFS on Linux and FreeBSD"
+DESCRIPTION = "OpenZFS on Linux and FreeBSD"
+LICENSE = "CDDL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
+HOMEPAGE ="https://github.com/openzfs/zfs"
+
+SRC_URI = "https://github.com/openzfs/zfs/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz"
+SRC_URI[sha256sum] = "3b52c0d493f806f638dca87dde809f53861cd318c1ebb0e60daeaa061cf1acf6"
+
+# Using both 'module' and 'autotools' classes seems a bit odd, they both
+# define a do_compile function.
+# That's why we opt for module-base, also this prevents module splitting.
+inherit module-base pkgconfig autotools
+
+DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl"
+
+EXTRA_OECONF:append = " \
+    --disable-pyzfs \
+    --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \
+    --enable-systemd \
+    --disable-sysvinit \
+    --without-dracutdir \
+    "
+
+do_install:append() {
+    # /usr/share/zfs contains the zfs-tests folder which we do not need:
+    rm -rf ${D}${datadir}/zfs
+
+    rm -rf ${D}${datadir}/initramfs-tools
+}
+
+FILES:${PN} += "\
+    ${base_sbindir}/* \
+    ${base_libdir}/* \
+    ${sysconfdir}/* \
+    ${sbindir}/* \
+    ${bindir}/* \
+    ${libexecdir}/${BPN}/* \
+    ${libdir}/* \
+    "
+
+FILES:${PN}-dev += "\
+    ${prefix}/src/zfs-${PV}/* \
+    ${prefix}/src/spl-${PV}/* \
+    "
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#96929): https://lists.openembedded.org/g/openembedded-devel/message/96929
Mute This Topic: https://lists.openembedded.org/mt/90833225/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw

Hi Khem,

I tried to reproduce this build error, but the recipe builds fine at my local setup.

What system did you use to test?

Regards,
Windel

Quoted 87 lines · Khem Raj

looks better this time but fails in packaging

https://errors.yoctoproject.org/Errors/Details/655897/

Quoted 6 lines · Windel Bouwman
---
 .../recipes-filesystems/zfs/zfs_2.1.4.bb      | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 meta-filesystems/recipes-filesystems/zfs/

zfs_2.1.4.bb

Review

Quoted 2 lines
(quoted diff) +0 -0

b/meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb

meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb line 8

Quoted 13 lines

new file mode 100644
index 000000000..01a64cc95

meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +8 -0
@@ -0,0 +1,46 @@
+
+SUMMARY = "OpenZFS on Linux and FreeBSD"
+DESCRIPTION = "OpenZFS on Linux and FreeBSD"
+LICENSE = "CDDL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
+HOMEPAGE ="https://github.com/openzfs/zfs"
+
+SRC_URI = "

https://github.com/openzfs/zfs/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz
"

meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb line 9

Quoted 1 line
meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +1 -0
+SRC_URI[sha256sum] =

"3b52c0d493f806f638dca87dde809f53861cd318c1ebb0e60daeaa061cf1acf6"

meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb

Quoted 4 lines
meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +4 -0
+
+# Using both 'module' and 'autotools' classes seems a bit odd, they both
+# define a do_compile function.
+# That's why we opt for module-base, also this prevents module

splitting.

meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb

Quoted 7 lines
meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +7 -0
+inherit module-base pkgconfig autotools
+
+DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl"
+
+EXTRA_OECONF:append = " \
+    --disable-pyzfs \
+    --with-linux=${STAGING_KERNEL_DIR}

--with-linux-obj=${STAGING_KERNEL_BUILDDIR} \

Quoted 30 lines
meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +26 -1
+    --enable-systemd \
+    --disable-sysvinit \
+    --without-dracutdir \
+    "
+
+do_install:append() {
+    # /usr/share/zfs contains the zfs-tests folder which we do not need:
+    rm -rf ${D}${datadir}/zfs
+
+    rm -rf ${D}${datadir}/initramfs-tools
+}
+
+FILES:${PN} += "\
+    ${base_sbindir}/* \
+    ${base_libdir}/* \
+    ${sysconfdir}/* \
+    ${sbindir}/* \
+    ${bindir}/* \
+    ${libexecdir}/${BPN}/* \
+    ${libdir}/* \
+    "
+
+FILES:${PN}-dev += "\
+    ${prefix}/src/zfs-${PV}/* \
+    ${prefix}/src/spl-${PV}/* \
+    "
--

2.25.1

Quoted 3 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#96929):

https://lists.openembedded.org/g/openembedded-devel/message/96929

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/90833225/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [

[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 6 lines · Windel Bouwman

Hi Khem,

I tried to reproduce this build error, but the recipe builds fine at my local setup.

What system did you use to test?

this is wit usrmerge in DISTRO_FEATURES because modules should get installed into base_libdir
and it seems the build system for this package is hardcoding the install path to /lib which is the problem
its reporting here.

Quoted 82 lines

Regards,
Windel

Quoted 77 lines · Khem Raj

looks better this time but fails in packaging

https://errors.yoctoproject.org/Errors/Details/655897/

Quoted 71 lines · Windel Bouwman
---
 .../recipes-filesystems/zfs/zfs_2.1.4.bb      | 46 +++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb
meta-filesystems/recipes-filesystems/zfs/zfs_2.1.4.bb new file +46 -1
new file mode 100644
index 000000000..01a64cc95
@@ -0,0 +1,46 @@
+
+SUMMARY = "OpenZFS on Linux and FreeBSD"
+DESCRIPTION = "OpenZFS on Linux and FreeBSD"
+LICENSE = "CDDL-1.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=7087caaf1dc8a2856585619f4a787faa"
+HOMEPAGE ="https://github.com/openzfs/zfs"
+
+SRC_URI = "https://github.com/openzfs/zfs/releases/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz"
+SRC_URI[sha256sum] = "3b52c0d493f806f638dca87dde809f53861cd318c1ebb0e60daeaa061cf1acf6"
+
+# Using both 'module' and 'autotools' classes seems a bit odd, they both
+# define a do_compile function.
+# That's why we opt for module-base, also this prevents module splitting.
+inherit module-base pkgconfig autotools
+
+DEPENDS = "virtual/kernel zlib util-linux libtirpc openssl"
+
+EXTRA_OECONF:append = " \
+    --disable-pyzfs \
+    --with-linux=${STAGING_KERNEL_DIR} --with-linux-obj=${STAGING_KERNEL_BUILDDIR} \
+    --enable-systemd \
+    --disable-sysvinit \
+    --without-dracutdir \
+    "
+
+do_install:append() {
+    # /usr/share/zfs contains the zfs-tests folder which we do not need:
+    rm -rf ${D}${datadir}/zfs
+
+    rm -rf ${D}${datadir}/initramfs-tools
+}
+
+FILES:${PN} += "\
+    ${base_sbindir}/* \
+    ${base_libdir}/* \
+    ${sysconfdir}/* \
+    ${sbindir}/* \
+    ${bindir}/* \
+    ${libexecdir}/${BPN}/* \
+    ${libdir}/* \
+    "
+
+FILES:${PN}-dev += "\
+    ${prefix}/src/zfs-${PV}/* \
+    ${prefix}/src/spl-${PV}/* \
+    "
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#96929): https://lists.openembedded.org/g/openembedded-devel/message/96929
Mute This Topic: https://lists.openembedded.org/mt/90833225/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-