Skip to contentSkip to conversation

Add recipe for fsverity-utils

PATCH Superseded Luca Bocassi 2 participants 4 messages Oct 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add recipe for fsverity-utils

From: Luca Boccassi <[email protected]>

Library and command-line tool to manage the fs-verity feature, introduced in Linux 5.4 and supported in ext4 and f2fs filesystems.

https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

---
 .../fsverity-utils/fsverity-utils_git.bb      | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb
meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb new file +29 -0
new file mode 100644
index 000000000..c0b6fc657
@@ -0,0 +1,29 @@
+SUMMARY = "Userspace utilities for fs-verity"
+DESCRIPTION = "fs-verity is a Linux kernel feature that does transparent \
+on-demand integrity/authenticity verification of the contents of read-only \
+files, using a hidden Merkle tree (hash tree) associated with the file. The \
+mechanism is similar to dm-verity, but implemented at the file level rather \
+than at the block device level."
+HOMEPAGE = "https://www.kernel.org/doc/html/latest/filesystems/fsverity.html"
+SECTION = "console"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bc974d217b525ea216a336adb73e1220"
+
+PV = "1.2"
+SRCREV = "406187bb3a885e083b448b2c2aa42c22957ae629"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/fsverity-utils.git"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "openssl"
+
+EXTRA_OEMAKE += "PREFIX=${prefix} USE_SHARED_LIB=1"
+
+do_install() {
+        oe_runmake install DESTDIR=${D}
+}
+
+PACKAGES =+ "libfsverity"
+FILES_libfsverity = "${libdir}/libfsverity*${SOLIBS}"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.20.1
#1 lore raw
Quoted 23 lines · Luca Bocassi

From: Luca Boccassi <[email protected]>

Library and command-line tool to manage the fs-verity feature, introduced in Linux 5.4 and supported in ext4 and f2fs filesystems.

https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

---
 .../fsverity-utils/fsverity-utils_git.bb      | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb
meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb new file +2 -0
new file mode 100644
index 000000000..c0b6fc657
@@ -0,0 +1,29 @@
+SUMMARY = "Userspace utilities for fs-verity"
+DESCRIPTION = "fs-verity is a Linux kernel feature that does transparent \

meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb line 12

Quoted 10 lines
meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb new file +10 -0
+on-demand integrity/authenticity verification of the contents of read-only \
+files, using a hidden Merkle tree (hash tree) associated with the file. The \
+mechanism is similar to dm-verity, but implemented at the file level rather \
+than at the block device level."
+HOMEPAGE = "https://www.kernel.org/doc/html/latest/filesystems/fsverity.html"
+SECTION = "console"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bc974d217b525ea216a336adb73e1220"
+
+PV = "1.2"

since its at a release lets use the version scheme in recipe name. So call it fsverity-utils_1.2.bb
and remove setting PV above

Secondly, add it to the appropriate packagegroup in packagegroup-meta-oe.bb recipe as well since its a new recipe.

Quoted 23 lines
meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb new file +17 -1
+SRCREV = "406187bb3a885e083b448b2c2aa42c22957ae629"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/fsverity-utils.git"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "openssl"
+
+EXTRA_OEMAKE += "PREFIX=${prefix} USE_SHARED_LIB=1"
+
+do_install() {
+        oe_runmake install DESTDIR=${D}
+}
+
+PACKAGES =+ "libfsverity"
+FILES_libfsverity = "${libdir}/libfsverity*${SOLIBS}"
+
+BBCLASSEXTEND = "native nativesdk"
--

2.20.1

#3 lore raw

PATCH v2 1/1 Add recipe for fsverity-utils

In reply to Luca Bocassi

From: Luca Boccassi <[email protected]>

Library and command-line tool to manage the fs-verity feature, introduced in Linux 5.4 and supported in ext4 and f2fs filesystems.

https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

---
v2: renamed recipe to use version in filename, added to meta-oe-crypto packagegroup

 .../packagegroups/packagegroup-meta-oe.bb     |  1 +
 .../fsverity-utils/fsverity-utils_1.2.bb      | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_1.2.bb
meta-oe/recipes-core/packagegroups/packagegroup-meta-oe.bb +1 -0
index 92190c838..a63c94023 100644
@@ -186,6 +186,7 @@ RDEPENDS_packagegroup-meta-oe-core_remove_riscv32 = "safec"
 RDEPENDS_packagegroup-meta-oe-crypto ="\
     botan \
     cryptsetup \
+    fsverity-utils \
     libkcapi \
     libmcrypt \
     libsodium \
meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_1.2.bb new file +28 -0
new file mode 100644
index 000000000..4d5dbafb3
@@ -0,0 +1,28 @@
+SUMMARY = "Userspace utilities for fs-verity"
+DESCRIPTION = "fs-verity is a Linux kernel feature that does transparent \
+on-demand integrity/authenticity verification of the contents of read-only \
+files, using a hidden Merkle tree (hash tree) associated with the file. The \
+mechanism is similar to dm-verity, but implemented at the file level rather \
+than at the block device level."
+HOMEPAGE = "https://www.kernel.org/doc/html/latest/filesystems/fsverity.html"
+SECTION = "console"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bc974d217b525ea216a336adb73e1220"
+
+SRCREV = "406187bb3a885e083b448b2c2aa42c22957ae629"
+SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/fsverity-utils.git"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "openssl"
+
+EXTRA_OEMAKE += "PREFIX=${prefix} USE_SHARED_LIB=1"
+
+do_install() {
+        oe_runmake install DESTDIR=${D}
+}
+
+PACKAGES =+ "libfsverity"
+FILES_libfsverity = "${libdir}/libfsverity*${SOLIBS}"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.20.1
#2 lore raw
In reply to Khem Raj
Quoted 38 lines · Khem Raj
Quoted 22 lines · Luca Bocassi

From: Luca Boccassi <[email protected]>

Library and command-line tool to manage the fs-verity feature, introduced in Linux 5.4 and supported in ext4 and f2fs filesystems.

https://www.kernel.org/doc/html/latest/filesystems/fsverity.html

---
 .../fsverity-utils/fsverity-utils_git.bb      | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb
meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb new file +2 -0
new file mode 100644
index 000000000..c0b6fc657
@@ -0,0 +1,29 @@
+SUMMARY = "Userspace utilities for fs-verity"
+DESCRIPTION = "fs-verity is a Linux kernel feature that does transparent \

meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb line 12

Quoted 10 lines
meta-oe/recipes-crypto/fsverity-utils/fsverity-utils_git.bb new file +10 -0
+on-demand integrity/authenticity verification of the contents of read-only \
+files, using a hidden Merkle tree (hash tree) associated with the file. The \
+mechanism is similar to dm-verity, but implemented at the file level rather \
+than at the block device level."
+HOMEPAGE = "https://www.kernel.org/doc/html/latest/filesystems/fsverity.html"
+SECTION = "console"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=bc974d217b525ea216a336adb73e1220"
+
+PV = "1.2"

since its at a release lets use the version scheme in recipe name. So call it fsverity-utils_1.2.bb
and remove setting PV above

Quoted 2 lines

Secondly, add it to the appropriate packagegroup in packagegroup-meta-oe.bb recipe as well since its a new recipe.

Ok, done in v2, thanks.
Added to packagegroup-meta-oe-crypto given it implements similar functionality to veritysetup (which is part of cryptsetup). Please let me know if there's a better alternative.

Signature · 2 lines
Kind regards,
Luca Boccassi