macOS img and pkg installers
cover macOS img and pkg installers
This patch adds support for building the SDK as .img and .pkg installers.
The .img can be mounted and used without having to install all the files for the SDK - this is similar to how Xcode deals with the var
ious macOS, iOS, tvOS, visionOS SDKs with versioning. The main downside is that we don't have a way to automatically run the post install script; so that is left to the user after opening the .img file.
The .pkg is the older way for macOS to install applications and data. It does allow running of the post install script at install time, so in this sense it's more automated. The downside is that it does put the files in the filesystem individually. We have to pick the location at build time - currently though the local.conf file.
In either case, there is a new mac-specific post install script (finalize-img and finalize-pkg) that will run the sed path changing commands and codesign the executables.
Eric L. Hernes (2):
Add IMG and PKG SDK installers
convert libdispatch to native-only recipe
README | 19 ++
conf/files/darwin-toolchain-shar-extract.sh | 316 ++++++++++++++++++
conf/files/finalize-sdk.sh | 48 +++
conf/files/mk-macos-img.sh | 49 +++
conf/files/mk-macos-pkg.sh | 161 +++++++++
conf/files/post-install.in | 9 +
conf/files/pre-install.in | 84 +++++
conf/layer.conf | 3 +
conf/machine-sdk/darwin-common.inc | 55 ++-
...patch_git.bb => libdispatch-native_git.bb} | 5 +-
10 files changed, 744 insertions(+), 5 deletions(-)
create mode 100644 conf/files/darwin-toolchain-shar-extract.sh
create mode 100644 conf/files/finalize-sdk.sh
create mode 100755 conf/files/mk-macos-img.sh
create mode 100755 conf/files/mk-macos-pkg.sh
create mode 100644 conf/files/post-install.in
create mode 100644 conf/files/pre-install.in
rename recipes-devtools/libdispatch/{libdispatch_git.bb => libdispatch-native_git.bb} (94%)Signature · 1 line
2.50.1 (Apple Git-155)
PATCH 1/2 Add IMG and PKG SDK installers
This adds support for generating both .img and .pkg installers for macOS SDK distribution.
The .img (HFS+ filesystem image, bzip2 compressed) requires running finalize-img after mounting to relocate and sign the executables.
The .pkg automates the process and integrates the relocation and signing into the installer.
--- README | 19 ++ conf/files/darwin-toolchain-shar-extract.sh | 316 ++++++++++++++++++++ conf/files/finalize-sdk.sh | 48 +++ conf/files/mk-macos-img.sh | 49 +++ conf/files/mk-macos-pkg.sh | 161 ++++++++++ conf/files/post-install.in | 9 + conf/files/pre-install.in | 84 ++++++ conf/layer.conf | 3 + conf/machine-sdk/darwin-common.inc | 55 +++- 9 files changed, 742 insertions(+), 2 deletions(-) create mode 100644 conf/files/darwin-toolchain-shar-extract.sh create mode 100644 conf/files/finalize-sdk.sh create mode 100755 conf/files/mk-macos-img.sh create mode 100755 conf/files/mk-macos-pkg.sh create mode 100644 conf/files/post-install.in create mode 100644 conf/files/pre-install.in
README +19 -0
@@ -30,3 +30,22 @@ https://lists.yoctoproject.org/g/yocto-patches before being able to post. When sending single patches, please use something like: 'git send-email -M -1 --to [email protected] --subject-prefix="meta-darwin][PATCH"' +The following variables can be set in the local.conf or elsewhere: + +To enable building the .pkg installer, set: +DARWIN_INSTALLER_PKG = "1" + +To enable building a .img installer, set: +DARWIN_INSTALLER_IMG = "1" + +To save some time during builds, you can disable the shell script installer with: +DARWIN_INSTALLER_SH = "0" + +To specify the path in the .img and path that the .pkg will install to, set +DARWIN_INSTALLER_PATH = "/Library/Developer/org.openembedded.sdk" + +The .img will require running the `finalize-img` to relocate and sign +the executables. + +The .pkg automates the process and integrates the relocation and +signage into the installer.
conf/files/darwin-toolchain-shar-extract.sh new file +316 -0
316 lines not on this page · raw message
conf/files/finalize-sdk.sh new file +48 -0
48 lines not on this page · raw message
conf/files/mk-macos-img.sh new file +49 -0
49 lines not on this page · raw message
conf/files/mk-macos-pkg.sh new file +161 -0
161 lines not on this page · raw message
conf/files/post-install.in new file +9 -0
@@ -0,0 +1,9 @@ +#!/bin/bash +######################################### +# file: meta-darwin/conf/files/post-install.in +# +# @file post-install +# @version V1.0 +# +# post install script for meta-darwin SDK +#
conf/files/pre-install.in new file +84 -0
84 lines not on this page · raw message
conf/layer.conf +3 -0
@@ -9,3 +9,6 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" BBFILE_COLLECTIONS += "meta-darwin" BBFILE_PATTERN_meta-darwin := "^${LAYERDIR}/" BBFILE_PRIORITY_meta-darwin = "8" + +DARWINBASE = '${@os.path.normpath("${LAYERDIR}")}' +BB_BASEHASH_IGNORE_VARS:append = " DARWINBASE"
conf/machine-sdk/darwin-common.inc +53 -2
73 lines not on this page · raw message
Signature · 1 line
2.50.1 (Apple Git-155)
PATCH 2/2 convert libdispatch to native-only recipe
In reply to Eric L. Hernes---
.../{libdispatch_git.bb => libdispatch-native_git.bb} | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
rename recipes-devtools/libdispatch/{libdispatch_git.bb => libdispatch-native_git.bb} (94%)recipes-devtools/libdispatch/libdispatch-native_git.bb renamed from recipes-devtools/libdispatch/libdispatch_git.bb +2 -3
@@ -11,13 +11,12 @@ SECTION = "devel" SRCREV = "e85f6a0d5c9ea1f32f5013c3fa34e4fc146cd0eb" SRC_URI = "git://github.com/swiftlang/swift-corelibs-libdispatch.git;nobranch=1;protocol=https" -inherit cmake - -BBCLASSEXTEND = "native" +inherit cmake native S = "${WORKDIR}/git" B = "${WORKDIR}/build" + DEPENDS += " \ clang-native \ libcxx-native \
Signature · 1 line
2.50.1 (Apple Git-155)
Re: [yocto-patches] [PATCH 2/2] convert libdispatch to native-only recipe
Hi Eric,
thanks for the patches. I have merged them as
https://git.yoctoproject.org/meta-darwin/commit/?id=c07b59a59fb3d27ecc6ac1e22db16c667b424cdd
and
https://git.yoctoproject.org/meta-darwin/commit/?id=cb5e3675542e4c4aa088ab5a5acf20d00bb8334e
Étienne
Quoted 52 lines · Eric L. Hernes via lists.yoctoproject.org
Signed-off-by Eric L. Hernes <[email protected]>--- .../{libdispatch_git.bb => libdispatch-native_git.bb} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename recipes-devtools/libdispatch/{libdispatch_git.bb =>libdispatch-native_git.bb} (94%)
recipes-devtools/libdispatch/libdispatch-native_git.bb renamed from recipes-devtools/libdispatch/libdispatch_git.bb +0
-0@@ -11,13 +11,12 @@ SECTION = "devel" SRCREV = "e85f6a0d5c9ea1f32f5013c3fa34e4fc146cd0eb" SRC_URI = "git://github.com/swiftlang/swift-corelibs-libdispatch.git;nobranch=1;protocol=https "
recipes-devtools/libdispatch/libdispatch-native_git.bb renamed from recipes-devtools/libdispatch/libdispatch_git.bb +2
-4-inherit cmake - -BBCLASSEXTEND = "native" +inherit cmake native S = "${WORKDIR}/git" B = "${WORKDIR}/build" + DEPENDS += " \ clang-native \ libcxx-native \ --2.50.1 (Apple Git-155)
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#3390):
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_g_yocto-2Dpatches_message_3390&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=gh6HSMbmx0OD3n83Jfv6c6ABbwso7uhJMEOr01XIgLCAJ_3ssel-EtV6FUT6pw2a&s=rpcpUxM1_bvQGz8T16lIrASFqhDdS1jIoYmjxX4Ys6g&e=
Mute This Topic:
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.yoctoproject.org_mt_118232149_7048771&d=DwIFAg&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=gh6HSMbmx0OD3n83Jfv6c6ABbwso7uhJMEOr01XIgLCAJ_3ssel-EtV6FUT6pw2a&s=7Lv7J9_Py0HjRnoMuou4qYryqnKTTO2eTl3dZ0l_gcQ&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=gh6HSMbmx0OD3n83Jfv6c6ABbwso7uhJMEOr01XIgLCAJ_3ssel-EtV6FUT6pw2a&s=tzyFN712dDuPoNUmp9p_EN2zT5ZutsBE1KzYrH6Z_8E&e=
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-