Skip to contentSkip to conversation

add hfsprogs recipe

PATCH In review Eric L. Hernes 2 participants 6 messages Jan 28 – Jan 31

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 add hfsprogs recipe

hfsprogs is used to create the dmg image file for macOS

---
 recipes-support/hfsprogs/hfsprogs_git.bb | 35 ++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 recipes-support/hfsprogs/hfsprogs_git.bb
recipes-support/hfsprogs/hfsprogs_git.bb new file +35 -0
new file mode 100644
index 0000000..17ac0d7
@@ -0,0 +1,35 @@
+SUMMARY = "HFS+ filesystem utilities for Linux"
+DESCRIPTION = "Apple's HFS+ filesystem utilities (mkfs.hfsplus, fsck.hfsplus) \
+adapted to work on Linux systems. Based on Apple's diskdev-cmds source code."
+HOMEPAGE = "https://github.com/Artoria2e5/hfsprogs"
+
+LICENSE = "APSL-2.0"
+LIC_FILES_CHKSUM = "file://README.md;md5=ea27fd14a7e575753270cc5527d29023"
+
+SRCREV = "47e4944b2abc57f5d8456ab399671a06031bbfb5"
+SRC_URI = "git://github.com/elhernes/hfsprogs.git;branch=master;protocol=https"
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "openssl libbsd"
+
+EXTRA_OEMAKE = "-f Makefile.lnx"
+
+CFLAGS += "-DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -DLINUX=1 -DBSD=1 -I${S}/include"
+
+do_compile() {
+    oe_runmake ${EXTRA_OEMAKE}
+}
+
+do_install() {
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man8
+
+    install -m 0755 ${S}/newfs_hfs.tproj/newfs_hfs ${D}${sbindir}/mkfs.hfsplus
+    install -m 0755 ${S}/fsck_hfs.tproj/fsck_hfs ${D}${sbindir}/fsck.hfsplus
+
+    install -m 0644 ${S}/newfs_hfs.tproj/newfs_hfs.8 ${D}${mandir}/man8/mkfs.hfsplus.8
+    install -m 0644 ${S}/fsck_hfs.tproj/fsck_hfs.8 ${D}${mandir}/man8/fsck.hfsplus.8
+}
+
+BBCLASSEXTEND = "native"
Signature · 1 line
2.50.1 (Apple Git-155)
#1 lore raw

PATCH 2/3 add recipe for libdmg-hfsplus

libdmg-hfsplus contains the hfsplus program which copies files from the filesystem to the .dmg image

---
 .../libdmg-hfsplus/libdmg-hfsplus_git.bb         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 recipes-support/libdmg-hfsplus/libdmg-hfsplus_git.bb
recipes-support/libdmg-hfsplus/libdmg-hfsplus_git.bb new file +16 -0
new file mode 100644
index 0000000..77ac88e
@@ -0,0 +1,16 @@
+SUMMARY = "Utilities for manipulating macOS dmg files"
+DESCRIPTION = "This is a set of utilities for manipulating macOS dmg and hfs files"
+HOMEPAGE = "https://github.com/elhernes/libdmg-hfsplus"
+
+LICENSE = "GPL-3.0-only"
+
+SRC_URI = "git://github.com/elhernes/libdmg-hfsplus.git;branch=master;protocol=https"
+SRCREV = "3c3ce87a7e2f036f771f81147f9e125a2bb207f1"
+
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=d32239bcb673463ab874e80d47fae504"
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+BBCLASSEXTEND = "native"
Signature · 1 line
2.50.1 (Apple Git-155)
#2 lore raw

Re: [yocto-patches] [meta-darwin][PATCH 2/3] add recipe for libdmg-hfsplus

Hi Eric,
thanks for the patch! Applied as
https://git.yoctoproject.org/meta-darwin/commit/?id=bc61b22dba483ddd43c9a012efd581e743ddc4db

Étienne

Quoted 54 lines · Eric L. Hernes via lists.yoctoproject.org

libdmg-hfsplus contains the hfsplus program which copies files from the filesystem to the .dmg image

---
 .../libdmg-hfsplus/libdmg-hfsplus_git.bb         | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
 create mode 100644 recipes-support/libdmg-hfsplus/libdmg-hfsplus_git.bb
recipes-support/libdmg-hfsplus/libdmg-hfsplus_git.bb new file +2 -0
new file mode 100644
index 0000000..77ac88e
@@ -0,0 +1,16 @@
+SUMMARY = "Utilities for manipulating macOS dmg files"
+DESCRIPTION = "This is a set of utilities for manipulating macOS dmg and

hfs files"

recipes-support/libdmg-hfsplus/libdmg-hfsplus_git.bb new file +5 -0
+HOMEPAGE = "https://github.com/elhernes/libdmg-hfsplus "
+
+LICENSE = "GPL-3.0-only"
+
+SRC_URI = "git://

github.com/elhernes/libdmg-hfsplus.git;branch=master;protocol=https"

recipes-support/libdmg-hfsplus/libdmg-hfsplus_git.bb new file +3 -0
+SRCREV = "3c3ce87a7e2f036f771f81147f9e125a2bb207f1"
+
+LIC_FILES_CHKSUM =

"file://${WORKDIR}/git/LICENSE;md5=d32239bcb673463ab874e80d47fae504"

recipes-support/libdmg-hfsplus/libdmg-hfsplus_git.bb new file +6 -1
+
+S = "${WORKDIR}/git"
+
+inherit cmake
+
+BBCLASSEXTEND = "native"
--

2.50.1 (Apple Git-155)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#3126):
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_yocto-2Dpatches_message_3126&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=iKGnzdwRLbZyGpj0w-beuZvVkxOKHPOeFdKM30KyhTYwjjsiGHydEkbK7_OAcAo_&s=oZ8lqaK7k_wEZkmswYmAzAg9nBpTbhGZpBwMQe4wHzQ&e=
Mute This Topic:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_mt_117504011_7048771&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=iKGnzdwRLbZyGpj0w-beuZvVkxOKHPOeFdKM30KyhTYwjjsiGHydEkbK7_OAcAo_&s=oq9vuEEVu17uPtAT2n8u9JOnhjPalMtb1V7wX3d5pnI&e=
Group Owner: [email protected] Unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_yocto-2Dpatches_leave_13184993_7048771_1814342232_xyzzy&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=iKGnzdwRLbZyGpj0w-beuZvVkxOKHPOeFdKM30KyhTYwjjsiGHydEkbK7_OAcAo_&s=L5DQRi-A1fgi00El9sxBWhrfOBY1HMqZJWBhbIgV7q0&e=
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

PATCH 3/3 add bomutils recipe

In reply to Eric L. Hernes

bomutils is used to build the bill of materials files for macOS .pkg installers

---
 recipes-support/bomutils/bomutils_git.bb | 34 ++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 recipes-support/bomutils/bomutils_git.bb
recipes-support/bomutils/bomutils_git.bb new file +34 -0
new file mode 100644
index 0000000..04e6dbd
@@ -0,0 +1,34 @@
+SUMMARY = "Bill Of Materials Utils"
+HOMEPAGE = "https://github.com/hogliux/bomutils"
+LICENSE = "GPL-2.0-only"
+
+SRCREV = "f62b59c659b1e57788661dadf87765e226824f67"
+SRC_URI = " \
+    git://github.com/elhernes/bomutils.git;branch=master;protocol=https \
+"
+
+LIC_FILES_CHKSUM = "file://${WORKDIR}/git/LICENSE;md5=55d923cdeef7e46b4d6415cb173b345a"
+
+BBCLASSEXTEND = "native"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/git/build"
+
+do_compile() {
+    make -C ${S}
+}
+
+do_install() {
+    install -d ${D}${bindir}
+    install -d ${D}${mandir}/man1
+
+    install -m 0755 ${B}/bin/ls4mkbom ${D}${bindir}
+    install -m 0755 ${B}/bin/dumpbom ${D}${bindir}
+    install -m 0755 ${B}/bin/lsbom ${D}${bindir}
+    install -m 0755 ${B}/bin/mkbom ${D}${bindir}
+
+    install -m 0444 ${B}/man/ls4mkbom.1.gz ${D}${mandir}/man1
+    install -m 0444 ${B}/man/dumpbom.1.gz ${D}${mandir}/man1
+    install -m 0444 ${B}/man/lsbom.1.gz ${D}${mandir}/man1
+    install -m 0444 ${B}/man/mkbom.1.gz ${D}${mandir}/man1
+}
Signature · 1 line
2.50.1 (Apple Git-155)
#4 lore raw

Re: [yocto-patches] [meta-darwin][PATCH 3/3] add bomutils recipe

Hi Eric,
thanks for the patch! Applied as
https://git.yoctoproject.org/meta-darwin/commit/?id=34593df0e9bd4746b02b4e2aed79088f15b3fe88

Quoted 70 lines · Eric L. Hernes via lists.yoctoproject.org

bomutils is used to build the bill of materials files for macOS .pkg installers

---
 recipes-support/bomutils/bomutils_git.bb | 34 ++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 recipes-support/bomutils/bomutils_git.bb
recipes-support/bomutils/bomutils_git.bb new file +10 -0
new file mode 100644
index 0000000..04e6dbd
@@ -0,0 +1,34 @@
+SUMMARY = "Bill Of Materials Utils"
+HOMEPAGE = "https://github.com/hogliux/bomutils "
+LICENSE = "GPL-2.0-only"
+
+SRCREV = "f62b59c659b1e57788661dadf87765e226824f67"
+SRC_URI = " \
+    git://github.com/elhernes/bomutils.git;branch=master;protocol=https \
+"
+
+LIC_FILES_CHKSUM =

"file://${WORKDIR}/git/LICENSE;md5=55d923cdeef7e46b4d6415cb173b345a"

recipes-support/bomutils/bomutils_git.bb new file +24 -1
+
+BBCLASSEXTEND = "native"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/git/build"
+
+do_compile() {
+    make -C ${S}
+}
+
+do_install() {
+    install -d ${D}${bindir}
+    install -d ${D}${mandir}/man1
+
+    install -m 0755 ${B}/bin/ls4mkbom ${D}${bindir}
+    install -m 0755 ${B}/bin/dumpbom ${D}${bindir}
+    install -m 0755 ${B}/bin/lsbom ${D}${bindir}
+    install -m 0755 ${B}/bin/mkbom ${D}${bindir}
+
+    install -m 0444 ${B}/man/ls4mkbom.1.gz ${D}${mandir}/man1
+    install -m 0444 ${B}/man/dumpbom.1.gz ${D}${mandir}/man1
+    install -m 0444 ${B}/man/lsbom.1.gz ${D}${mandir}/man1
+    install -m 0444 ${B}/man/mkbom.1.gz ${D}${mandir}/man1
+}
--

2.50.1 (Apple Git-155)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#3127):
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_yocto-2Dpatches_message_3127&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=LJMeCNzx7PX_6mimmV7tx47v1nKUUHpsO1WPaxzzFUFBJ0otVGRKSliQypZjt6hw&s=XT2YhK68vYAXijX0OuBr26F6m50HAyJ32IfUzQcyoqQ&e=
Mute This Topic:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_mt_117504015_7048771&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=LJMeCNzx7PX_6mimmV7tx47v1nKUUHpsO1WPaxzzFUFBJ0otVGRKSliQypZjt6hw&s=8MJuqwlOtNqUcnEyKA3uXO0Ts4cIXJbRHMZtOxeqcAg&e=
Group Owner: [email protected] Unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_yocto-2Dpatches_leave_13184993_7048771_1814342232_xyzzy&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=LJMeCNzx7PX_6mimmV7tx47v1nKUUHpsO1WPaxzzFUFBJ0otVGRKSliQypZjt6hw&s=tcvWqZxBfxDdYsbTIzHwlAAy1O4G_DnNuDXzP5kOSig&e=
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
In reply to Eric L. Hernes

Hi Eric,
thanks for the patch! There are minor issues which could be improved:
- do_compile is redundant with the default definition of base.bbclass. The file Makefile does exist in the repo, even though it's Makefile.lnx which is compiled, thus this code should work:

```
base_do_compile() {
if [ -e Makefile -o -e makefile -o -e GNUmakefile ]; then
oe_runmake || die "make failed"
else
```

- the recipe resets the value of EXTRA_OEMAKE instead of appending, so it will remove the default value which contains PARALLEL_MAKE
- Makefile.lnx overrides CC and sets it to "gcc", thus this recipe uses the native compiler even when calling "bitbake hfsprogs". I think we don't need the target version anyway, but in this case it's slightly cleaner to use "inherit native" and/or rename the recipe to hfsprogs-native.bb, rather than BBCLASSEXTEND = "native". This way yocto will throw an error if trying to compile the target version.

Quoted 77 lines · Eric L. Hernes via lists.yoctoproject.org

hfsprogs is used to create the dmg image file for macOS

---
 recipes-support/hfsprogs/hfsprogs_git.bb | 35 ++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 recipes-support/hfsprogs/hfsprogs_git.bb
recipes-support/hfsprogs/hfsprogs_git.bb new file +2 -0
new file mode 100644
index 0000000..17ac0d7
@@ -0,0 +1,35 @@
+SUMMARY = "HFS+ filesystem utilities for Linux"
+DESCRIPTION = "Apple's HFS+ filesystem utilities (mkfs.hfsplus,

fsck.hfsplus) \
+adapted to work on Linux systems. Based on Apple's diskdev-cmds source code."

recipes-support/hfsprogs/hfsprogs_git.bb new file +7 -0
+HOMEPAGE = "https://github.com/Artoria2e5/hfsprogs "
+
+LICENSE = "APSL-2.0"
+LIC_FILES_CHKSUM = "file://README.md;md5=ea27fd14a7e575753270cc5527d29023"
+
+SRCREV = "47e4944b2abc57f5d8456ab399671a06031bbfb5"
+SRC_URI = "git://

github.com/elhernes/hfsprogs.git;branch=master;protocol=https"

recipes-support/hfsprogs/hfsprogs_git.bb new file +18 -1
+
+S = "${WORKDIR}/git"
+
+DEPENDS = "openssl libbsd"
+
+EXTRA_OEMAKE = "-f Makefile.lnx"
+
+CFLAGS += "-DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -DLINUX=1 -DBSD=1
-I${S}/include"
+
+do_compile() {
+    oe_runmake ${EXTRA_OEMAKE}
+}
+
+do_install() {
+    install -d ${D}${sbindir}
+    install -d ${D}${mandir}/man8
+
+    install -m 0755 ${S}/newfs_hfs.tproj/newfs_hfs

${D}${sbindir}/mkfs.hfsplus
+ install -m 0755 ${S}/fsck_hfs.tproj/fsck_hfs
${D}${sbindir}/fsck.hfsplus

recipes-support/hfsprogs/hfsprogs_git.bb new file +2 -0
+
+    install -m 0644 ${S}/newfs_hfs.tproj/newfs_hfs.8

${D}${mandir}/man8/mkfs.hfsplus.8
+ install -m 0644 ${S}/fsck_hfs.tproj/fsck_hfs.8
${D}${mandir}/man8/fsck.hfsplus.8

recipes-support/hfsprogs/hfsprogs_git.bb new file +3 -1
+}
+
+BBCLASSEXTEND = "native"
--

2.50.1 (Apple Git-155)

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#3125):
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_yocto-2Dpatches_message_3125&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=0DzCSR8qWxxpgrmRYjdHYOexdcVZ7rR7Pe41uSFJx1JivDrG9-AInrM96jCMA0BK&s=UQDb7SZqwd_C-BJ0ZA50rv28q2vdoWNYRwz9Meb2nMU&e=
Mute This Topic:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_mt_117504010_7048771&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=0DzCSR8qWxxpgrmRYjdHYOexdcVZ7rR7Pe41uSFJx1JivDrG9-AInrM96jCMA0BK&s=MKp4m2KXl4jA-dpaqk2k5p95UuB5lMOcKYpZSwtV40U&e=
Group Owner: [email protected] Unsubscribe:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_yocto-2Dpatches_leave_13184993_7048771_1814342232_xyzzy&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=0DzCSR8qWxxpgrmRYjdHYOexdcVZ7rR7Pe41uSFJx1JivDrG9-AInrM96jCMA0BK&s=cRSleh1mz5Xu5Ftb31h5O98Ql3Qddujv4mYtk7th0IA&e=
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-