Skip to content

Commit 768e16c

Browse files
cfergeaupraveenkumar
authored andcommitted
macos: Move vfkit.entitlements download to crc-embedder
This helper already downloads everything that is needed to generate CRC releases, so it makes sense to have vfkit.entitlements there too. This also makes it possible to take advantage of the support crc-embedder has for disconnected environments. This commit also picks the vfkit.entitlements file corresponding to the vfkit release used by CRC instead of always using the latest one. This unlikely to make a difference, but is cleaner.
1 parent 5ad77e4 commit 768e16c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,21 +307,19 @@ ifeq ($(CUSTOM_EMBED),false)
307307
$(HOST_BUILD_DIR)/crc-embedder download $(EMBED_DOWNLOAD_DIR)
308308
endif
309309

310-
packaging/vfkit.entitlements:
311-
curl -sL https://raw.githubusercontent.com/crc-org/vfkit/main/vf.entitlements -o $@
312-
313310
macos-universal-binary: macos-release-binary $(TOOLS_BINDIR)/makefat
314311
mkdir -p out/macos-universal
315312
cd $(BUILD_DIR) && "$(TOOLS_BINDIR)"/makefat macos-universal/crc macos-amd64/crc macos-arm64/crc
316313

317-
packagedir: clean embed-download macos-universal-binary packaging/vfkit.entitlements
314+
packagedir: clean embed-download macos-universal-binary
318315
echo -n $(CRC_VERSION) > packaging/VERSION
319316
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/Distribution.in >packaging/darwin/Distribution
320317
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/welcome.html.in >packaging/darwin/Resources/welcome.html
321318
sed -e 's/__VERSION__/'$(CRC_VERSION)'/g' -e 's@__INSTALL_PATH__@$(MACOS_INSTALL_PATH)@g' packaging/darwin/postinstall.in >packaging/darwin/scripts/postinstall
322319
chmod 755 packaging/darwin/scripts/postinstall
323320
mkdir -p packaging/tmp/
324321
cp $(EMBED_DOWNLOAD_DIR)/* packaging/tmp/
322+
cp $(EMBED_DOWNLOAD_DIR)/vf.entitlements packaging/vfkit.entitlements
325323
mkdir -p packaging/root/Applications
326324
tar -C packaging/root/Applications -xvzf $(TRAY_RELEASE)
327325
rm $(TRAY_RELEASE)

cmd/crc-embedder/cmd/embed.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ var (
9898
dataFileUrls = map[string][]remoteFileInfo{
9999
"darwin": {
100100
{vfkit.VfkitDownloadURL, 0755},
101+
{vfkit.VfkitEntitlementsURL, 0644},
101102
{constants.GetCRCMacTrayDownloadURL(), 0644},
102103
{constants.GetAdminHelperURLForOs("darwin"), 0755},
103104
},

pkg/crc/machine/vfkit/constants.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ const (
1313
)
1414

1515
var (
16-
VfkitDownloadURL = fmt.Sprintf("https://github.com/crc-org/vfkit/releases/download/v%s/%s", VfkitVersion, VfkitCommand)
16+
VfkitDownloadURL = fmt.Sprintf("https://github.com/crc-org/vfkit/releases/download/v%s/%s", VfkitVersion, VfkitCommand)
17+
VfkitEntitlementsURL = fmt.Sprintf("https://raw.githubusercontent.com/crc-org/vfkit/v%s/vf.entitlements", VfkitVersion)
1718
)

0 commit comments

Comments
 (0)