-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hypervisor: add ability to unpack hypervisor specialization package
This allows automatic download and unpacking of a debin package with the hypervisor specialization without any external tooling
- Loading branch information
Showing
16 changed files
with
292 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Origin: Test Repo | ||
Label: TestRepo | ||
Architectures: amd64 arm64 | ||
Description: Test repo | ||
Date: Wed Dec 11 12:00:00 2024 | ||
SHA256: | ||
3f77a280600be6e2cfb825741278847cc440f156c9012525a3006028b33f4f93 1209 Packages | ||
1b34a7b9d81aa35bb27f6898530988e563c0b064b97b35f069d84742819f8e33 628 Packages.xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
names := test-empty test-simple test-multiple test-ebclfsa | ||
|
||
files_test-empty := files-empty | ||
arch_test-empty := arm64 | ||
|
||
files_test-simple := files-ok | ||
arch_test-simple := arm64 | ||
|
||
files_test-multiple := files-ok files-ok2 | ||
arch_test-multiple := arm64 | ||
|
||
# Reuse files from the example and include too much (expected and config) on purpose! | ||
files_test-ebclfsa := ../examples/qemu_ebclfsa | ||
arch_test-ebclfsa := arm64 | ||
|
||
debs := $(addsuffix .deb,$(names)) | ||
all: $(debs) Packages.xz InRelease | ||
|
||
|
||
define gen_targets | ||
deb := $(1) | ||
tmp/$$(deb)/DEBIAN: | ||
mkdir -p $$@ | ||
tmp/$$(deb)/DEBIAN/%: %.in | tmp/$$(deb)/DEBIAN | ||
sed 's/@@NAME@@/$(1)/; s/@@VERSION@@/$$(VERSION)/; s/@@ARCH@@/$$(ARCH)/;' $$< > $$@ | ||
$$(deb).deb: tmp/$$(deb)/DEBIAN/control | ||
$$(foreach f,$(files_$(1)),cp -r $$(f)/* tmp/$$(DEB);) | ||
dpkg-deb -b tmp/$$(DEB) $$@ | ||
rm -rf tmp/$$(DEB) | ||
$$(deb).deb: VERSION=1.0 | ||
$$(deb).deb: ARCH=$(arch_$(1)) | ||
$$(deb).deb: DEB=$(1) | ||
endef | ||
|
||
#$(foreach name,$(names),$(info $(call gen_targets,$(name)))) | ||
$(foreach name,$(names),$(eval $(call gen_targets,$(name)))) | ||
|
||
|
||
|
||
define IN_RELEASE_HEAD | ||
Origin: Test Repo | ||
Label: TestRepo | ||
Architectures: amd64 arm64 | ||
Description: Test repo | ||
Date: Wed Dec 11 12:00:00 2024 | ||
SHA256: | ||
endef | ||
export IN_RELEASE_HEAD | ||
|
||
Packages: $(debs) | ||
dpkg-scanpackages -m . /dev/null > Packages | ||
sed -i 's~./~~g' Packages | ||
|
||
Packages.xz: Packages | ||
xz -c $^ > $@ | ||
|
||
InRelease: | ||
echo "$$IN_RELEASE_HEAD" > InRelease | ||
echo " $$(sha256sum Packages | cut -d' ' -f1) $$(wc -c Packages)" >> InRelease | ||
echo " $$(sha256sum Packages.xz | cut -d' ' -f1) $$(wc -c Packages.xz)" >> InRelease | ||
|
||
clean: | ||
rm -rf tmp | ||
rm -rf *.deb | ||
rm -f Packages* InRelease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
Package: test-ebclfsa | ||
Version: 1.0 | ||
Architecture: arm64 | ||
Maintainer: nobody | ||
Filename: test-ebclfsa.deb | ||
Size: 3404 | ||
MD5sum: f3d0fe80d4f93893cacb89b9ff7f4127 | ||
SHA1: d455184b02b14bcd7d6674cc2b3d00a82c1cc759 | ||
SHA256: 2848affa33fe5a1b56fb59b24da5e1172be10d577b06ff02521e5fa7d97f7685 | ||
Description: | ||
Example package | ||
|
||
Package: test-empty | ||
Version: 1.0 | ||
Architecture: arm64 | ||
Maintainer: nobody | ||
Filename: test-empty.deb | ||
Size: 488 | ||
MD5sum: 2bee39e8c94278abbfafd5fe0a7d1653 | ||
SHA1: 6b029df5dea0bbe02dbe5c7aa27155dc9fb66113 | ||
SHA256: f3902ffe162954ab3ae3483efda97fadd6b9f48c9e67b2b77e208008c1eefbaf | ||
Description: | ||
Example package | ||
|
||
Package: test-multiple | ||
Version: 1.0 | ||
Architecture: arm64 | ||
Maintainer: nobody | ||
Filename: test-multiple.deb | ||
Size: 546 | ||
MD5sum: a2a503e734bb180d8e2fe0b7d6a5109a | ||
SHA1: 65b01ecd9ded1525ac0b0ce9b101f709a8591a2e | ||
SHA256: 1d6b9a3a0c6f2f6db5b44c7bc7033621a59d70270765e5386cb0a553733b0688 | ||
Description: | ||
Example package | ||
|
||
Package: test-simple | ||
Version: 1.0 | ||
Architecture: arm64 | ||
Maintainer: nobody | ||
Filename: test-simple.deb | ||
Size: 518 | ||
MD5sum: 061515d128a6513c2302cd34dfa440a3 | ||
SHA1: a9f1b0360f61994698c04e660fbe150df3c906d6 | ||
SHA256: 3595fc09a69b84d8c4a7dcee5a0a3476bc7aab66178c64e2c3089f2b66ca9fca | ||
Description: | ||
Example package | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@@NAME@@ (@@VERSION@@) UNRELEASED; urgency=medium | ||
nothing | ||
-- nobody <nobody@example.com> Mon, 06 Mar 2017 06:52:08 +0100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Package: @@NAME@@ | ||
Architecture: @@ARCH@@ | ||
Maintainer: nobody | ||
Version: @@VERSION@@ | ||
Description: | ||
Example package |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version: 1 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters