summaryrefslogtreecommitdiffstats
path: root/recipes-extended
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended')
-rw-r--r--recipes-extended/ceph/ceph/0001-cepth-node-proxy-specify-entrypoint-executable.patch27
-rw-r--r--recipes-extended/ceph/ceph/0001-common-dout-fix-FTBFS-on-GCC-14.patch146
-rw-r--r--recipes-extended/ceph/ceph/0001-rados-setup.py-allow-incompatible-pointer-types.patch28
-rw-r--r--recipes-extended/ceph/ceph/0001-rgw-setup.py-allow-incompatible-pointer-types.patch28
-rw-r--r--recipes-extended/ceph/ceph_git.bb (renamed from recipes-extended/ceph/ceph_18.2.2.bb)37
-rw-r--r--recipes-extended/cloud-init/cloud-init_git.bb6
-rw-r--r--recipes-extended/dev86/dev86_git.bb26
-rw-r--r--recipes-extended/diod/diod_1.0.24.bb12
-rw-r--r--recipes-extended/diod/files/0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch100
-rw-r--r--recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch36
-rw-r--r--recipes-extended/fuse-overlayfs/fuse-overlayfs_1.14.bb15
-rw-r--r--recipes-extended/fuse-overlayfs/fuse-overlayfs_1.9.bb18
-rw-r--r--recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch230
-rw-r--r--recipes-extended/hyperstart/hyperstart_git.bb26
-rw-r--r--recipes-extended/images/README-xen.md173
-rw-r--r--recipes-extended/images/README.md311
-rw-r--r--recipes-extended/images/cloud-image-controller.bb2
-rw-r--r--recipes-extended/images/container-app-base.bb17
-rw-r--r--recipes-extended/images/container-base.bb14
-rw-r--r--recipes-extended/images/container-devtools-base.bb51
-rw-r--r--recipes-extended/images/container-image-host.bb129
-rw-r--r--recipes-extended/images/container-systemd-base.bb17
-rw-r--r--recipes-extended/images/container-systemd-base.inc72
-rw-r--r--recipes-extended/images/xen-guest-image-minimal.bb28
-rw-r--r--recipes-extended/images/xen-image-minimal.bb182
-rw-r--r--recipes-extended/images/xtf-image.bb2
-rw-r--r--recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch25
-rw-r--r--recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch25
-rw-r--r--recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch103
-rw-r--r--recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch294
-rw-r--r--recipes-extended/ipxe/ipxe_git.bb4
-rw-r--r--recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch298
-rw-r--r--recipes-extended/irqbalance/irqbalance_git.bb1
-rw-r--r--recipes-extended/kvmtool/kvmtool_git.bb4
-rw-r--r--recipes-extended/libvirt/libvirt-python.inc12
-rw-r--r--recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch31
-rw-r--r--recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch14
-rw-r--r--recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch76
-rw-r--r--recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch38
-rw-r--r--recipes-extended/libvirt/libvirt/libvirt-qemu.conf0
-rw-r--r--recipes-extended/libvirt/libvirt_git.bb (renamed from recipes-extended/libvirt/libvirt_10.0.0.bb)61
-rw-r--r--recipes-extended/libvmi/libvmi_git.bb19
-rw-r--r--recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch63
-rw-r--r--recipes-extended/nagios/nagios-core_git.bb (renamed from recipes-extended/nagios/nagios-core_4.4.6.bb)30
-rw-r--r--recipes-extended/nagios/nagios-nrpe_4.0.2.bb4
-rw-r--r--recipes-extended/nagios/nagios-nsca_2.9.2.bb4
-rw-r--r--recipes-extended/nagios/nagios-plugins_git.bb (renamed from recipes-extended/nagios/nagios-plugins_2.2.1.bb)25
-rw-r--r--recipes-extended/oath/oath_2.6.2.bb4
-rw-r--r--recipes-extended/rootlesskit/relocation.inc37
-rw-r--r--recipes-extended/rootlesskit/rootlesskit/modules.txt83
-rw-r--r--recipes-extended/rootlesskit/rootlesskit_git.bb81
-rw-r--r--recipes-extended/rootlesskit/src_uri.inc100
-rw-r--r--recipes-extended/upx/upx_git.bb30
-rw-r--r--recipes-extended/uxen/uxen-guest-tools_4.1.8.bb2
-rw-r--r--recipes-extended/virt-manager/virt-manager/0001-build-drop-man-directory.patch31
-rw-r--r--recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch78
-rw-r--r--recipes-extended/virt-manager/virt-manager_git.bb (renamed from recipes-extended/virt-manager/virt-manager_4.1.0.bb)33
-rw-r--r--recipes-extended/virt-viewer/virt-viewer_git.bb (renamed from recipes-extended/virt-viewer/virt-viewer_11.0.bb)2
-rw-r--r--recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch65
-rw-r--r--recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch73
-rw-r--r--recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch (renamed from recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch)24
-rw-r--r--recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.20.patch43
-rw-r--r--recipes-extended/xen/files/0001-xen-fix-header-guard-inconsistencies-gcc15.patch54
-rw-r--r--recipes-extended/xen/files/10-ether.network5
-rw-r--r--recipes-extended/xen/files/10-xenbr0.netdev3
-rw-r--r--recipes-extended/xen/files/10-xenbr0.network5
-rw-r--r--recipes-extended/xen/xen-hypervisor.inc2
-rw-r--r--recipes-extended/xen/xen-tools.inc35
-rw-r--r--recipes-extended/xen/xen-tools_4.17.bb19
-rw-r--r--recipes-extended/xen/xen-tools_4.19.bb (renamed from recipes-extended/xen/xen-tools_4.18.bb)10
-rw-r--r--recipes-extended/xen/xen-tools_4.20.bb20
-rw-r--r--recipes-extended/xen/xen-tools_git.bb8
-rw-r--r--recipes-extended/xen/xen.inc22
-rw-r--r--recipes-extended/xen/xen_4.19.bb (renamed from recipes-extended/xen/xen_4.18.bb)8
-rw-r--r--recipes-extended/xen/xen_4.20.bb (renamed from recipes-extended/xen/xen_4.17.bb)13
-rw-r--r--recipes-extended/xen/xen_git.bb5
76 files changed, 2952 insertions, 807 deletions
diff --git a/recipes-extended/ceph/ceph/0001-cepth-node-proxy-specify-entrypoint-executable.patch b/recipes-extended/ceph/ceph/0001-cepth-node-proxy-specify-entrypoint-executable.patch
new file mode 100644
index 00000000..a4135fd1
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-cepth-node-proxy-specify-entrypoint-executable.patch
@@ -0,0 +1,27 @@
1From cd7b184bad23a3a80f2ccf8acc7662d0079282d3 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Mon, 22 Jul 2024 20:02:12 +0000
4Subject: [PATCH] cepth-node-proxy: specify entrypoint executable
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
9---
10 src/ceph-node-proxy/setup.py | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/src/ceph-node-proxy/setup.py b/src/ceph-node-proxy/setup.py
14index 7dcc7cdf5bf..f137c2e4307 100644
15--- a/src/ceph-node-proxy/setup.py
16+++ b/src/ceph-node-proxy/setup.py
17@@ -25,6 +25,7 @@ setup(
18 entry_points=dict(
19 console_scripts=[
20 'ceph-node-proxy = ceph_node_proxy.main:main',
21+ 'executable': 'python3',
22 ],
23 ),
24 classifiers=[
25--
262.39.2
27
diff --git a/recipes-extended/ceph/ceph/0001-common-dout-fix-FTBFS-on-GCC-14.patch b/recipes-extended/ceph/ceph/0001-common-dout-fix-FTBFS-on-GCC-14.patch
new file mode 100644
index 00000000..263bcf70
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-common-dout-fix-FTBFS-on-GCC-14.patch
@@ -0,0 +1,146 @@
1From 0eace4ea9ea42412d4d6a16d24a8660642e41173 Mon Sep 17 00:00:00 2001
2From: Radoslaw Zarzynski <rzarzyns@redhat.com>
3Date: Wed, 24 Jan 2024 17:22:44 +0000
4Subject: [PATCH] common/dout: fix FTBFS on GCC 14
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The following problem has been reported by Kaleb Keithley:
10
11```
12/builddir/build/BUILD/ceph-18.2.1/src/osd/osd_types.h: In lambda function:
13/builddir/build/BUILD/ceph-18.2.1/src/common/dout.h:184:73: error: call to non-‘constexpr’ function ‘virtual unsigned int DoutPrefixProvider::get_subsys() const’
14 184 | dout_impl(pdpp->get_cct(), ceph::dout::need_dynamic(pdpp->get_subsys()), v) \
15 | ~~~~~~~~~~~~~~~~^~
16/builddir/build/BUILD/ceph-18.2.1/src/common/dout.h:155:58: note: in definition of macro ‘dout_impl’
17 155 | return (cctX->_conf->subsys.template should_gather<sub, v>()); \
18 | ^~~
19/builddir/build/BUILD/ceph-18.2.1/src/osd/osd_types.h:3617:3: note: in expansion of macro ‘ldpp_dout’
20 3617 | ldpp_dout(dpp, 10) << "build_prior all_probe " << all_probe << dendl;
21 | ^~~~~~~~~
22```
23
24For details of the problem and the idea behind the fix,
25please refer to the comment this commit brings to `dout.h`.
26
27The minimized replicator that the facilitated Goldbot-based
28investigation:
29
30```cpp
31namespace ceph::dout {
32
33template<typename T>
34struct dynamic_marker_t {
35 T value;
36 // constexpr ctor isn't needed as it's an aggregate type
37 constexpr operator T() const { return value; }
38};
39
40template<typename T>
41constexpr dynamic_marker_t<T> need_dynamic(T&& t) {
42 return dynamic_marker_t<T>{ std::forward<T>(t) };
43}
44
45template<typename T>
46struct is_dynamic : public std::false_type {};
47
48template<typename T>
49struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {};
50
51} // ceph::dout
52
53struct subsys_t {
54 template <unsigned SubV, int LvlV>
55 bool should_gather() const {
56 return true;
57 }
58 bool should_gather(const unsigned sub, int level) const {
59 return false;
60 }
61};
62
63static subsys_t subsys;
64
65 do { \
66 const bool should_gather = [&](const auto cctX) { \
67 if constexpr (ceph::dout::is_dynamic<decltype(sub)>::value || \
68 ceph::dout::is_dynamic<decltype(v)>::value) { \
69 std::cout << "the dynamic path" << std::endl; \
70 return subsys.should_gather(sub, v); \
71 } else { \
72 /* The parentheses are **essential** because commas in angle \
73 * brackets are NOT ignored on macro expansion! A language's \
74 * limitation, sorry. */ \
75 std::cout << "the static path" << std::endl; \
76 /*return subsys.should_gather(sub, v);*/ \
77 return (subsys.template should_gather<sub, v>()); \
78 } \
79 }(cct); \
80 } while (0)
81
82 if (decltype(auto) pdpp = (dpp); pdpp) /* workaround -Wnonnull-compare for 'this' */ \
83 dout_impl(42, sub, v)
84
85 if (decltype(auto) pdpp = (dpp); pdpp) /* workaround -Wnonnull-compare for 'this' */ \
86 dout_impl(42, ceph::dout::need_dynamic(42), v)
87
88int main() {
89 std::random_device dev;
90 std::mt19937 rng(dev());
91 std::uniform_int_distribution<std::mt19937::result_type> dist6(1,6); // distribution in range [1, 6]
92
93 int sub = dist6(rng);
94 ldpp_dout("mocked out", sub);
95 //ldpp_subdout("mocked out", 4, 3);
96}
97```
98
99Upstream-Status: Backport [commit 0eace4ea9ea42412d4d6a16d24a8660642e41173]
100
101Fixes: https://tracker.ceph.com/issues/64050
102Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
103---
104 src/common/dout.h | 20 +++++++++++++++-----
105 1 file changed, 15 insertions(+), 5 deletions(-)
106
107diff --git a/src/common/dout.h b/src/common/dout.h
108index 4cd60efff8f..6516060c543 100644
109--- a/src/common/dout.h
110+++ b/src/common/dout.h
111@@ -144,17 +144,27 @@ struct is_dynamic<dynamic_marker_t<T>> : public std::true_type {};
112 #else
113 #define dout_impl(cct, sub, v) \
114 do { \
115- const bool should_gather = [&](const auto cctX) { \
116- if constexpr (ceph::dout::is_dynamic<decltype(sub)>::value || \
117- ceph::dout::is_dynamic<decltype(v)>::value) { \
118+ const bool should_gather = [&](const auto cctX, auto sub_, auto v_) { \
119+ /* The check is performed on `sub_` and `v_` to leverage the C++'s \
120+ * guarantee on _discarding_ one of blocks of `if constexpr`, which \
121+ * includes also the checks for ill-formed code (`should_gather<>` \
122+ * must not be feed with non-const expresions), BUT ONLY within \
123+ * a template (thus the generic lambda) and under the restriction \
124+ * it's dependant on a parameter of this template). \
125+ * GCC prior to v14 was not enforcing these restrictions. */ \
126+ if constexpr (ceph::dout::is_dynamic<decltype(sub_)>::value || \
127+ ceph::dout::is_dynamic<decltype(v_)>::value) { \
128 return cctX->_conf->subsys.should_gather(sub, v); \
129 } else { \
130+ constexpr auto sub_helper = static_cast<decltype(sub_)>(sub); \
131+ constexpr auto v_helper = static_cast<decltype(v_)>(v); \
132 /* The parentheses are **essential** because commas in angle \
133 * brackets are NOT ignored on macro expansion! A language's \
134 * limitation, sorry. */ \
135- return (cctX->_conf->subsys.template should_gather<sub, v>()); \
136+ return (cctX->_conf->subsys.template should_gather<sub_helper, \
137+ v_helper>()); \
138 } \
139- }(cct); \
140+ }(cct, sub, v); \
141 \
142 if (should_gather) { \
143 ceph::logging::MutableEntry _dout_e(v, sub); \
144--
1452.39.2
146
diff --git a/recipes-extended/ceph/ceph/0001-rados-setup.py-allow-incompatible-pointer-types.patch b/recipes-extended/ceph/ceph/0001-rados-setup.py-allow-incompatible-pointer-types.patch
new file mode 100644
index 00000000..a67e45b5
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-rados-setup.py-allow-incompatible-pointer-types.patch
@@ -0,0 +1,28 @@
1From 1b64bc536a3ea47c39e631409c833e99820ae7c2 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Mon, 22 Jul 2024 21:01:17 +0000
4Subject: [PATCH] rados: setup.py allow incompatible pointer types
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
9---
10 src/pybind/rados/setup.py | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py
14index 74bf75b6ddc..87126ca8338 100755
15--- a/src/pybind/rados/setup.py
16+++ b/src/pybind/rados/setup.py
17@@ -30,7 +30,7 @@ def filter_unsupported_flags(compiler, flags):
18 f.startswith('-fcf-protection'),
19 flags))
20 else:
21- return flags
22+ return flags + [ "-Wno-error=incompatible-pointer-types" ]
23
24
25 def monkey_with_compiler(customize):
26--
272.39.2
28
diff --git a/recipes-extended/ceph/ceph/0001-rgw-setup.py-allow-incompatible-pointer-types.patch b/recipes-extended/ceph/ceph/0001-rgw-setup.py-allow-incompatible-pointer-types.patch
new file mode 100644
index 00000000..b21678a9
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-rgw-setup.py-allow-incompatible-pointer-types.patch
@@ -0,0 +1,28 @@
1From 84097fe398ee69172d4d9ae978ff0380fd6362cf Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Mon, 22 Jul 2024 20:43:50 +0000
4Subject: [PATCH] rgw: setup.py allow incompatible pointer types
5
6Upstream-Status: Inappropriate [oe specific]
7
8Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
9---
10 src/pybind/rgw/setup.py | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py
14index 74bf75b6ddc..87126ca8338 100755
15--- a/src/pybind/rgw/setup.py
16+++ b/src/pybind/rgw/setup.py
17@@ -30,7 +30,7 @@ def filter_unsupported_flags(compiler, flags):
18 f.startswith('-fcf-protection'),
19 flags))
20 else:
21- return flags
22+ return flags + [ "-Wno-error=incompatible-pointer-types" ]
23
24
25 def monkey_with_compiler(customize):
26--
272.39.2
28
diff --git a/recipes-extended/ceph/ceph_18.2.2.bb b/recipes-extended/ceph/ceph_git.bb
index e6c44188..2eaa335a 100644
--- a/recipes-extended/ceph/ceph_18.2.2.bb
+++ b/recipes-extended/ceph/ceph_git.bb
@@ -2,29 +2,35 @@ SUMMARY = "User space components of the Ceph file system"
2LICENSE = "LGPL-2.1-only & GPL-2.0-only & Apache-2.0 & MIT" 2LICENSE = "LGPL-2.1-only & GPL-2.0-only & Apache-2.0 & MIT"
3LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \ 3LIC_FILES_CHKSUM = "file://COPYING-LGPL2.1;md5=fbc093901857fcd118f065f900982c24 \
4 file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ 4 file://COPYING-GPL2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
5 file://COPYING;md5=5351120989d78252e65dc1a2a92e3617 \ 5 file://COPYING;md5=bf502a28c9b8d6430c8952a583a2c896 \
6" 6"
7inherit cmake pkgconfig python3native python3-dir systemd useradd 7inherit cmake pkgconfig python3native python3-dir systemd useradd
8# Disable python pybind support for ceph temporary, when corss compiling pybind, 8# Disable python pybind support for ceph temporary, when corss compiling pybind,
9# pybind mix cmake and python setup environment, would case a lot of errors. 9# pybind mix cmake and python setup environment, would case a lot of errors.
10 10
11SRC_URI = "http://download.ceph.com/tarballs/ceph-${PV}.tar.gz \ 11SRC_URI = "gitsm://github.com/ceph/ceph.git;protocol=https;branch=main \
12 file://0001-fix-host-library-paths-were-used.patch \ 12 file://0001-fix-host-library-paths-were-used.patch \
13 file://ceph.conf \ 13 file://ceph.conf \
14 file://0001-avoid-to_string-error.patch \
15 file://0001-delete-install-layout-deb.patch \ 14 file://0001-delete-install-layout-deb.patch \
16 file://0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch \ 15 file://0001-cephadm-build.py-avoid-using-python3-from-sysroot-wh.patch \
17" 16 file://0001-cepth-node-proxy-specify-entrypoint-executable.patch \
17 file://0001-rados-setup.py-allow-incompatible-pointer-types.patch \
18 file://0001-rgw-setup.py-allow-incompatible-pointer-types.patch \
19 "
20
21SRCREV = "a53e858fd7cc6fd8c04f37d503ce9ed7080f2da6"
22PV = "20.0.0+git"
18 23
19SRC_URI[sha256sum] = "e70bb5246b4a5d7aa78eb548677a05cc21d0d47945ba2937fddc7511134ffb57" 24S = "${WORKDIR}/git"
20 25
21DEPENDS = "boost bzip2 curl cryptsetup expat gperf-native \ 26DEPENDS = "boost bzip2 curl cryptsetup expat gperf-native \
22 keyutils libaio libibverbs lua lz4 \ 27 keyutils libaio libibverbs lua lz4 \
23 nspr nss ninja-native \ 28 nspr nss ninja-native \
24 oath openldap openssl \ 29 oath openldap openssl \
25 python3 python3-native python3-cython-native python3-pyyaml-native \ 30 python3 python3-native python3-cython-native python3-pyyaml-native \
26 rabbitmq-c rocksdb snappy thrift udev \ 31 rabbitmq-c snappy thrift udev \
27 valgrind xfsprogs zlib libgcc zstd re2 \ 32 valgrind xfsprogs zlib libgcc zstd re2 \
33 lmdb autoconf-native automake-native \
28" 34"
29 35
30 36
@@ -52,6 +58,7 @@ SYSTEMD_SERVICE:${PN} = " \
52 ceph-mgr@.service \ 58 ceph-mgr@.service \
53 ceph-mgr.target \ 59 ceph-mgr.target \
54 ceph-crash.service \ 60 ceph-crash.service \
61 ceph-exporter.service \
55 rbdmap.service \ 62 rbdmap.service \
56 ceph-immutable-object-cache@.service \ 63 ceph-immutable-object-cache@.service \
57 ceph-immutable-object-cache.target \ 64 ceph-immutable-object-cache.target \
@@ -71,16 +78,20 @@ EXTRA_OECMAKE += "-DWITH_MANPAGE=OFF \
71 -DWITH_MGR=OFF \ 78 -DWITH_MGR=OFF \
72 -DWITH_MGR_DASHBOARD_FRONTEND=OFF \ 79 -DWITH_MGR_DASHBOARD_FRONTEND=OFF \
73 -DWITH_SYSTEM_BOOST=ON \ 80 -DWITH_SYSTEM_BOOST=ON \
74 -DWITH_SYSTEM_ROCKSDB=ON \
75 -DWITH_RDMA=OFF \ 81 -DWITH_RDMA=OFF \
82 -DWITH_RBD=OFF \
83 -DWITH_KRBD=OFF \
76 -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \ 84 -DWITH_RADOSGW_AMQP_ENDPOINT=OFF \
77 -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \ 85 -DWITH_RADOSGW_KAFKA_ENDPOINT=OFF \
78 -DWITH_REENTRANT_STRSIGNAL=ON \ 86 -DWITH_REENTRANT_STRSIGNAL=ON \
79 -DWITH_PYTHON3=3.12 \ 87 -DWITH_PYTHON3=3.13 \
80 -DPYTHON_DESIRED=3 \ 88 -DPYTHON_DESIRED=3 \
81 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain.cmake \ 89 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=${WORKDIR}/toolchain.cmake \
90 -DCEPHADM_BUNDLED_DEPENDENCIES=none \
82 " 91 "
83 92
93# -DWITH_SYSTEM_ROCKSDB=ON
94
84do_configure:prepend () { 95do_configure:prepend () {
85 echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake 96 echo "set( CMAKE_SYSROOT \"${RECIPE_SYSROOT}\" )" >> ${WORKDIR}/toolchain.cmake
86 echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake 97 echo "set( CMAKE_DESTDIR \"${D}\" )" >> ${WORKDIR}/toolchain.cmake
@@ -88,6 +99,12 @@ do_configure:prepend () {
88 # echo "set( CMAKE_C_COMPILER_WORKS TRUE)" >> ${WORKDIR}/toolchain.cmake 99 # echo "set( CMAKE_C_COMPILER_WORKS TRUE)" >> ${WORKDIR}/toolchain.cmake
89 # echo "set( CMAKE_CXX_COMPILER_FORCED TRUE)" >> ${WORKDIR}/toolchain.cmake 100 # echo "set( CMAKE_CXX_COMPILER_FORCED TRUE)" >> ${WORKDIR}/toolchain.cmake
90 echo "set( CMAKE_C_COMPILER_FORCED TRUE )" >> ${WORKDIR}/toolchain.cmake 101 echo "set( CMAKE_C_COMPILER_FORCED TRUE )" >> ${WORKDIR}/toolchain.cmake
102
103 echo "set( WITH_QATDRV OFF )" >> ${WORKDIR}/toolchain.cmake
104 echo "set( WITH_QATZIP OFF )" >> ${WORKDIR}/toolchain.cmake
105 echo "set( WITH_LIBURING OFF )" >> ${WORKDIR}/toolchain.cmake
106 echo "set( WITH_QATLIB OFF )" >> ${WORKDIR}/toolchain.cmake
107 # echo "set( WITH_SYSTEM_ROCKSDB TRUE )" >> ${WORKDIR}/toolchain.cmake
91} 108}
92 109
93do_compile:prepend() { 110do_compile:prepend() {
@@ -106,7 +123,7 @@ do_install:append () {
106 ${D}${sbindir}/ceph-volume ${D}${sbindir}/ceph-volume-systemd 123 ${D}${sbindir}/ceph-volume ${D}${sbindir}/ceph-volume-systemd
107 find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::' 124 find ${D} -name SOURCES.txt | xargs sed -i -e 's:${WORKDIR}::'
108 install -d ${D}${sysconfdir}/ceph 125 install -d ${D}${sysconfdir}/ceph
109 install -m 644 ${WORKDIR}/ceph.conf ${D}${sysconfdir}/ceph/ 126 install -m 644 ${UNPACKDIR}/ceph.conf ${D}${sysconfdir}/ceph/
110 install -d ${D}${systemd_unitdir} 127 install -d ${D}${systemd_unitdir}
111 mv ${D}${libexecdir}/ceph/ceph-osd-prestart.sh ${D}${libdir}/ceph 128 mv ${D}${libexecdir}/ceph/ceph-osd-prestart.sh ${D}${libdir}/ceph
112 mv ${D}${libexecdir}/ceph/ceph_common.sh ${D}${libdir}/ceph 129 mv ${D}${libexecdir}/ceph/ceph_common.sh ${D}${libdir}/ceph
@@ -137,6 +154,7 @@ FILES:${PN} += "\
137 ${libdir}/ceph/compressor/*.so \ 154 ${libdir}/ceph/compressor/*.so \
138 ${libdir}/rados-classes/*.so \ 155 ${libdir}/rados-classes/*.so \
139 ${libdir}/ceph/*.so \ 156 ${libdir}/ceph/*.so \
157 ${libdir}/*.so \
140 ${libdir}/libcephsqlite.so \ 158 ${libdir}/libcephsqlite.so \
141" 159"
142 160
@@ -151,6 +169,7 @@ FILES:${PN}-dev = " \
151 ${libdir}/librados*.so \ 169 ${libdir}/librados*.so \
152 ${libdir}/librbd.so \ 170 ${libdir}/librbd.so \
153 ${libdir}/librgw.so \ 171 ${libdir}/librgw.so \
172 ${libdir}/pkgconfig/cephfs.pc \
154" 173"
155 174
156FILES:${PN}-python = "\ 175FILES:${PN}-python = "\
diff --git a/recipes-extended/cloud-init/cloud-init_git.bb b/recipes-extended/cloud-init/cloud-init_git.bb
index 6cb3d3b5..d40035c4 100644
--- a/recipes-extended/cloud-init/cloud-init_git.bb
+++ b/recipes-extended/cloud-init/cloud-init_git.bb
@@ -7,13 +7,13 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c6dd79b6ec2130a3364f6fa9d6380408 \
7 file://LICENSE-Apache2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \ 7 file://LICENSE-Apache2.0;md5=3b83ef96387f14655fc854ddc3c6bd57 \
8" 8"
9 9
10SRCREV = "e982c20875db3750c8dfc1915e7a4cee37376924" 10SRCREV = "8a1d73498c505049cd281a1661c2750b93fb4a6f"
11SRC_URI = "git://github.com/canonical/cloud-init;branch=24.1.x;protocol=https \ 11SRC_URI = "git://github.com/canonical/cloud-init;branch=25.1.x;protocol=https \
12 file://cloud-init-source-local-lsb-functions.patch \ 12 file://cloud-init-source-local-lsb-functions.patch \
13 file://0001-setup.py-check-for-install-anywhere-in-args.patch \ 13 file://0001-setup.py-check-for-install-anywhere-in-args.patch \
14" 14"
15 15
16PV = "v23.4.1+git" 16PV = "v25.1.1+git"
17 17
18S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
19 19
diff --git a/recipes-extended/dev86/dev86_git.bb b/recipes-extended/dev86/dev86_git.bb
index a3d0fded..d43d1200 100644
--- a/recipes-extended/dev86/dev86_git.bb
+++ b/recipes-extended/dev86/dev86_git.bb
@@ -4,7 +4,7 @@ LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" 4LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
5SECTION = "console/tools" 5SECTION = "console/tools"
6 6
7BASE_PV="0.16.21" 7BASE_PV = "0.16.21"
8PV = "${BASE_PV}+git" 8PV = "${BASE_PV}+git"
9SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4" 9SRCREV = "e254e0b19651d3b8a20225b40281c9974a95dec4"
10SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https;branch=master \ 10SRC_URI = "git://github.com/jbruchon/${BPN}.git;protocol=https;branch=master \
@@ -41,3 +41,27 @@ do_install() {
41} 41}
42 42
43FILES:${PN} += "${libdir}/bcc" 43FILES:${PN} += "${libdir}/bcc"
44
45# http://gecko.lge.com:8000/Errors/Details/832862
46# http://errors.yoctoproject.org/Errors/Details/766930/
47# cpp.c:548:1: error: type of 'ch' defaults to 'int' [-Wimplicit-int]
48# strsave.c:47:42: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
49# strsave.c:55:26: error: implicit declaration of function 'hash' [-Wimplicit-function-declaration]
50# strsave.c:66:32: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
51# symbol.c:60:42: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
52# symbol.c:72:30: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
53# symbol.c:77:13: error: implicit declaration of function 'hash' [-Wimplicit-function-declaration]
54# tok_class.c:305:43: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
55# tok_io.c:219:20: error: implicit declaration of function 'atoi' [-Wimplicit-function-declaration]
56# tok_io.c:488:20: error: implicit declaration of function 'strlen' [-Wimplicit-function-declaration]
57# unproto.c:188:51: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
58CFLAGS += "-Wno-error=implicit-int -Wno-error=implicit-function-declaration"
59
60# http://errors.yoctoproject.org/Errors/Details/853302/
61CFLAGS += "-std=gnu17"
62
63# http://errors.yoctoproject.org/Errors/Details/853303/
64# ar.c:615:23: error: passing argument 1 of 'ctime' from incompatible pointer type [-Wincompatible-pointer-types]
65CFLAGS += "-Wno-error=incompatible-pointer-types"
66
67EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'"
diff --git a/recipes-extended/diod/diod_1.0.24.bb b/recipes-extended/diod/diod_1.0.24.bb
index 6019fbfb..72a31a68 100644
--- a/recipes-extended/diod/diod_1.0.24.bb
+++ b/recipes-extended/diod/diod_1.0.24.bb
@@ -9,16 +9,16 @@ LICENSE = "GPL-2.0-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" 9LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
10 10
11PV = "1.0.24+git" 11PV = "1.0.24+git"
12SRCREV = "b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6" 12SRCREV = "54d1325fc435d14a6f5c161c88dac79b016b0061"
13SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \ 13SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \
14 file://diod \ 14 file://diod \
15 file://diod.conf \ 15 file://diod.conf \
16 file://0001-build-Find-lua-with-pkg-config.patch \ 16 file://0001-build-Find-lua-with-pkg-config.patch \
17 file://0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch \
18 " 17 "
19DEPENDS = "libcap ncurses tcp-wrappers lua" 18DEPENDS = "libcap ncurses lua"
20 19
21EXTRA_OEMAKE += "systemddir=${systemd_unitdir}/system" 20EXTRA_OECONF = "--disable-auth \
21 --with-systemdsystemunitdir=${systemd_unitdir}/system"
22 22
23S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
24 24
@@ -26,9 +26,9 @@ inherit autotools pkgconfig systemd
26 26
27do_install:append () { 27do_install:append () {
28 # install our init based on start-stop-daemon 28 # install our init based on start-stop-daemon
29 install -D -m 0755 ${WORKDIR}/diod ${D}${sysconfdir}/init.d/diod 29 install -D -m 0755 ${UNPACKDIR}/diod ${D}${sysconfdir}/init.d/diod
30 # install a real(not commented) configuration file for diod 30 # install a real(not commented) configuration file for diod
31 install -m 0644 ${WORKDIR}/diod.conf ${D}${sysconfdir}/diod.conf 31 install -m 0644 ${UNPACKDIR}/diod.conf ${D}${sysconfdir}/diod.conf
32} 32}
33 33
34FILES:${PN} += "${systemd_unitdir}" 34FILES:${PN} += "${systemd_unitdir}"
diff --git a/recipes-extended/diod/files/0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch b/recipes-extended/diod/files/0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch
deleted file mode 100644
index 3c13c101..00000000
--- a/recipes-extended/diod/files/0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch
+++ /dev/null
@@ -1,100 +0,0 @@
1From 04b0c5a5cb9e32090b177ff7327ad3260783abe0 Mon Sep 17 00:00:00 2001
2From: Ola x Nilsson <olani@axis.com>
3Date: Mon, 15 Apr 2024 17:31:44 +0200
4Subject: [PATCH] Handle various time_t sizes in printf and scanf
5
6The members of the timeval struct are both signed (defined by POSIX)
7and typically both 64 bits on a system where time_t is 64 bits. This
8is possible also on 32 bit systems where time_t is larger to handle
9the 2038 problem.
10
11It's practically impossible to find a type and printf format that
12works even on all glibc systems. Play it safe and always use printf
13with intmax_t and explict int64_t variables for scanf.
14
15Upstream-Status: Submitted [https://github.com/chaos/diod/pull/100]
16Signed-off-by: Ola x Nilsson <olani@axis.com>
17---
18 libnpfs/conn.c | 5 +++--
19 libnpfs/ctl.c | 7 ++++---
20 utils/dioddate.c | 8 +++++++-
21 3 files changed, 14 insertions(+), 6 deletions(-)
22
23diff --git a/libnpfs/conn.c b/libnpfs/conn.c
24index 6e85fff..c34c840 100644
25--- a/libnpfs/conn.c
26+++ b/libnpfs/conn.c
27@@ -16,6 +16,7 @@
28 #include <stdio.h>
29 #include <string.h>
30 #include <stdint.h>
31+#include <inttypes.h>
32 #include <stdarg.h>
33 #include <errno.h>
34 #include <pthread.h>
35@@ -133,8 +134,8 @@ _debug_trace (Npsrv *srv, Npfcall *fc)
36 (void)gettimeofday(&b, NULL);
37 (void)gettimeofday(&a, NULL);
38 timersub(&a, &b, &c);
39- np_logmsg(srv, "[%lu.%-3lu] %s",
40- c.tv_sec, c.tv_usec/1000, s);
41+ np_logmsg(srv, "[%"PRIdMAX".%-3"PRIdMAX"] %s",
42+ (intmax_t)c.tv_sec, (intmax_t)c.tv_usec/1000, s);
43 } else
44 np_logmsg(srv, "%s", s);
45 }
46diff --git a/libnpfs/ctl.c b/libnpfs/ctl.c
47index f40cde4..317a22e 100644
48--- a/libnpfs/ctl.c
49+++ b/libnpfs/ctl.c
50@@ -16,6 +16,7 @@
51 #include <stdio.h>
52 #include <string.h>
53 #include <stdint.h>
54+#include <inttypes.h>
55 #include <stdarg.h>
56 #include <pthread.h>
57 #include <errno.h>
58@@ -291,9 +292,9 @@ _ctl_get_date (char *name, void *a)
59 np_uerror (errno);
60 goto error;
61 }
62- if (aspf (&s, &len, "%lu.%lu %d.%d\n",
63- tv.tv_sec, tv.tv_usec,
64- tz.tz_minuteswest, tz.tz_dsttime) < 0) {
65+ if (aspf (&s, &len, "%"PRIdMAX".%"PRIdMAX" %d.%d\n",
66+ (uintmax_t)tv.tv_sec, (uintmax_t)tv.tv_usec,
67+ tz.tz_minuteswest, tz.tz_dsttime) < 0) {
68 np_uerror (ENOMEM);
69 goto error;
70 }
71diff --git a/utils/dioddate.c b/utils/dioddate.c
72index bde002f..f392792 100644
73--- a/utils/dioddate.c
74+++ b/utils/dioddate.c
75@@ -21,6 +21,7 @@
76 #include <unistd.h>
77 #include <stdlib.h>
78 #include <stdint.h>
79+#include <inttypes.h>
80 #include <stdarg.h>
81 #include <stdio.h>
82 #if HAVE_GETOPT_H
83@@ -142,11 +143,16 @@ main (int argc, char *argv[])
84 errn (np_rerror (), "error reading date");
85 goto done;
86 }
87- if (sscanf (buf, "%lu.%lu %d.%d", &tv.tv_sec, &tv.tv_usec,
88+
89+ int64_t sec = 0, usec = 0;
90+ if (sscanf (buf, "%"SCNd64".%"SCNd64" %d.%d", &sec, &usec,
91 &tz.tz_minuteswest, &tz.tz_dsttime) != 4) {
92 msg ("error scanning returned date: %s", buf);
93 goto done;
94 }
95+ tv.tv_sec = sec;
96+ tv.tv_usec = usec;
97+
98 if (Sopt) {
99 if (settimeofday (&tv, &tz) < 0)
100 err_exit ("settimeofday");
diff --git a/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch b/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch
deleted file mode 100644
index cd504ce5..00000000
--- a/recipes-extended/fuse-overlayfs/fuse-overlayfs/0001-utils-Add-missing-include-on-limits.h.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From b48e958aaecfdfc3bb48db082a548a09d6487181 Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei.gherzan@huawei.com>
3Date: Wed, 13 Jul 2022 12:05:07 +0200
4Subject: [PATCH] utils: Add missing include on limits.h
5
6This happens to not be an issue with glibc because it gets indirectly
7included via dirent.h:
8
9.. /usr/include/dirent.h
10[...]
11..... /usr/include/linux/limits.h
12
13When using the musl libc implementation, that is not the case anymore
14and the build fails.
15
16Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
17Upstream-Status: Submitted [https://github.com/containers/fuse-overlayfs/pull/362]
18---
19 utils.h | 1 +
20 1 file changed, 1 insertion(+)
21
22diff --git a/utils.h b/utils.h
23index 13a177e..6fbc328 100644
24--- a/utils.h
25+++ b/utils.h
26@@ -32,6 +32,7 @@
27 # include <sys/types.h>
28 # include <fcntl.h>
29 # include "fuse-overlayfs.h"
30+# include <limits.h>
31
32 # define XATTR_OVERRIDE_STAT "user.fuseoverlayfs.override_stat"
33 # define XATTR_PRIVILEGED_OVERRIDE_STAT "security.fuseoverlayfs.override_stat"
34--
352.25.1
36
diff --git a/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.14.bb b/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.14.bb
new file mode 100644
index 00000000..0f6d0fb6
--- /dev/null
+++ b/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.14.bb
@@ -0,0 +1,15 @@
1SUMMARY = "FUSE implementation of overlayfs."
2DESCRIPTION = "An implementation of overlay+shiftfs in FUSE for rootless \
3containers."
4
5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8SRCREV = "33cb788edc05f5e3cbb8a7a241f5a04bee264730"
9SRC_URI = "git://github.com/containers/fuse-overlayfs.git;nobranch=1;protocol=https"
10
11DEPENDS = "fuse3"
12
13S = "${WORKDIR}/git"
14
15inherit autotools pkgconfig
diff --git a/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.9.bb b/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.9.bb
deleted file mode 100644
index 31199928..00000000
--- a/recipes-extended/fuse-overlayfs/fuse-overlayfs_1.9.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1SUMMARY = "FUSE implementation of overlayfs."
2DESCRIPTION = "An implementation of overlay+shiftfs in FUSE for rootless \
3containers."
4
5LICENSE = "GPL-3.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
7
8SRCREV = "51592ea406f48faeccab288f65dcba6c4a67cd90"
9SRC_URI = " \
10 git://github.com/containers/fuse-overlayfs.git;nobranch=1;protocol=https \
11 file://0001-utils-Add-missing-include-on-limits.h.patch \
12"
13
14DEPENDS = "fuse3"
15
16S = "${WORKDIR}/git"
17
18inherit autotools pkgconfig
diff --git a/recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch b/recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch
deleted file mode 100644
index d48e2647..00000000
--- a/recipes-extended/hyperstart/hyperstart/0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch
+++ /dev/null
@@ -1,230 +0,0 @@
1From 085dd65bba063e391350487f2a5e4a7bf69ee6c8 Mon Sep 17 00:00:00 2001
2From: Jason Wessel <jason.wessel@windriver.com>
3Date: Fri, 15 Jun 2018 08:04:35 -0700
4Subject: [PATCH] container.c: Fix compiler errors that gcc 8.1.0 reports
5
6gcc 8.1.0 reports the following compiler errors/warnings. They can be
7fixed by using snprintf and checking the result for truncation. This
8patch also uses a named constant instead of inserting the value 512 in
9many locations.
10
11container.c: In function 'hyper_setup_container_rootfs':
12container.c:630:24: error: '/' directive writing 1 byte into a region of size between 0 and 511 [-Werror=format-overflow=]
13 sprintf(rootfs, "%s/%s/", root, container->rootfs);
14 ^
15container.c:630:2: note: 'sprintf' output 3 or more bytes (assuming 514) into a destination of size 512
16 sprintf(rootfs, "%s/%s/", root, container->rootfs);
17 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18container.c:262:18: error: '%s' directive writing up to 511 bytes into a region of size 510 [-Werror=format-overflow=]
19 sprintf(dst, "./%s", src);
20 ^~ ~~~
21container.c:262:2: note: 'sprintf' output between 3 and 514 bytes into a destination of size 512
22 sprintf(dst, "./%s", src);
23 ^~~~~~~~~~~~~~~~~~~~~~~~~
24container.c:218:24: error: '/_data' directive writing 6 bytes into a region of size between 1 and 512 [-Werror=format-overflow=]
25 sprintf(volume, "%s/_data", path);
26 ^~~~~~
27container.c:218:5: note: 'sprintf' output between 7 and 518 bytes into a destination of size 512
28 sprintf(volume, "%s/_data", path);
29 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30container.c:149:24: error: '/_data' directive writing 6 bytes into a region of size between 0 and 511 [-Werror=format-overflow=]
31 sprintf(volume, "/%s/_data", path);
32 ^~~~~~
33container.c:149:4: note: 'sprintf' output between 8 and 519 bytes into a destination of size 512
34 sprintf(volume, "/%s/_data", path);
35 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36container.c:131:24: error: '/' directive writing 1 byte into a region of size between 0 and 511 [-Werror=format-overflow=]
37 sprintf(volume, "/%s/", path);
38 ^
39container.c:131:4: note: 'sprintf' output between 3 and 514 bytes into a destination of size 512
40 sprintf(volume, "/%s/", path);
41 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42container.c:176:24: error: '/_data/' directive writing 7 bytes into a region of size between 0 and 511 [-Werror=format-overflow=]
43 sprintf(volume, "/%s/_data/%s", path, filevolume);
44 ^~~~~~~
45container.c:176:4: note: 'sprintf' output 9 or more bytes (assuming 520) into a destination of size 512
46 sprintf(volume, "/%s/_data/%s", path, filevolume);
47 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
49Upstream-Status: Inappropriate [embedded specific]
50
51Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
52
53---
54 src/container.c | 47 ++++++++++++++++++++++++++++-------------------
55 1 file changed, 28 insertions(+), 19 deletions(-)
56
57diff --git a/src/container.c b/src/container.c
58index fee67ff..94d49d8 100644
59--- a/src/container.c
60+++ b/src/container.c
61@@ -22,6 +22,8 @@
62 #include "syscall.h"
63 #include "netlink.h"
64
65+#define MAX_PBUF 512
66+
67 static int container_populate_volume(char *src, char *dest)
68 {
69 struct stat st;
70@@ -116,12 +118,12 @@ static int container_setup_volume(struct hyper_pod *pod,
71 struct hyper_container *container)
72 {
73 int i;
74- char dev[512], path[512];
75+ char dev[MAX_PBUF], path[MAX_PBUF];
76 struct volume *vol;
77
78 for (i = 0; i < container->vols_num; i++) {
79- char volume[512];
80- char mountpoint[512];
81+ char volume[MAX_PBUF];
82+ char mountpoint[MAX_PBUF];
83 char *options = NULL;
84 const char *filevolume = NULL;
85 bool newvolume = false;
86@@ -146,7 +148,8 @@ static int container_setup_volume(struct hyper_pod *pod,
87 if (hyper_mount_nfs(vol->device, path) < 0)
88 return -1;
89 /* nfs export has implicitly included _data part of the volume */
90- sprintf(volume, "/%s/", path);
91+ if (snprintf(volume, MAX_PBUF, "/%s/", path) >= MAX_PBUF)
92+ return -1;
93 } else {
94 fprintf(stdout, "mount %s to %s, tmp path %s\n",
95 dev, vol->mountpoint, path);
96@@ -155,7 +158,7 @@ static int container_setup_volume(struct hyper_pod *pod,
97 options = "nouuid";
98
99 if (access(dev, R_OK) < 0) {
100- char device[512];
101+ char device[MAX_PBUF];
102 sprintf(device, "/block/%s", vol->device);
103 hyper_netlink_wait_dev(pod->ueventfd, device);
104 }
105@@ -164,7 +167,8 @@ static int container_setup_volume(struct hyper_pod *pod,
106 perror("mount volume device failed");
107 return -1;
108 }
109- sprintf(volume, "/%s/_data", path);
110+ if (snprintf(volume, MAX_PBUF, "/%s/_data", path) >= MAX_PBUF)
111+ return -1;
112 }
113
114 if (container_check_volume(volume, &filevolume, &newvolume) < 0)
115@@ -193,7 +197,8 @@ static int container_setup_volume(struct hyper_pod *pod,
116 perror("create volume file failed");
117 return -1;
118 }
119- sprintf(volume, "/%s/_data/%s", path, filevolume);
120+ if (snprintf(volume, MAX_PBUF, "/%s/_data/%s", path, filevolume) >= MAX_PBUF)
121+ return -1;
122 /* 0777 so that any user can read/write the new file volume */
123 if (chmod(volume, 0777) < 0) {
124 fprintf(stderr, "fail to chmod directory %s\n", volume);
125@@ -217,9 +222,9 @@ static int container_setup_volume(struct hyper_pod *pod,
126
127 for (i = 0; i < container->maps_num; i++) {
128 struct stat st;
129- char *src, path[512], volume[512];
130+ char *src, path[MAX_PBUF], volume[MAX_PBUF];
131 struct fsmap *map = &container->maps[i];
132- char mountpoint[512];
133+ char mountpoint[MAX_PBUF];
134
135 sprintf(path, "%s/%s", SHARED_DIR, map->source);
136 sprintf(mountpoint, "./%s", map->path);
137@@ -235,7 +240,8 @@ static int container_setup_volume(struct hyper_pod *pod,
138 }
139 if (map->docker) {
140 /* converted from volume */
141- sprintf(volume, "%s/_data", path);
142+ if (snprintf(volume, MAX_PBUF, "%s/_data", path) >= MAX_PBUF)
143+ return -1;
144 src = volume;
145 if (container->initialize &&
146 (container_populate_volume(mountpoint, volume) < 0)) {
147@@ -271,7 +277,7 @@ static int container_setup_modules(struct hyper_container *container)
148 {
149 struct stat st;
150 struct utsname uts;
151- char src[512], dst[512];
152+ char src[MAX_PBUF], dst[MAX_PBUF];
153
154 if (uname(&uts) < 0) {
155 perror("fail to call uname");
156@@ -279,7 +285,8 @@ static int container_setup_modules(struct hyper_container *container)
157 }
158
159 sprintf(src, "/lib/modules/%s", uts.release);
160- sprintf(dst, "./%s", src);
161+ if (snprintf(dst, MAX_PBUF, "./%s", src) >= MAX_PBUF)
162+ return -1;
163
164 if (stat(dst, &st) == 0) {
165 struct dirent **list;
166@@ -318,7 +325,7 @@ static int container_setup_modules(struct hyper_container *container)
167
168 static int container_setup_mount(struct hyper_container *container)
169 {
170- char src[512];
171+ char src[MAX_PBUF];
172
173 // current dir is container rootfs, the operations on "./PATH" are the operations on container's "/PATH"
174 if (!container->readonly) {
175@@ -576,7 +583,7 @@ static int hyper_setup_container_rootfs(void *data)
176 {
177 struct hyper_container_arg *arg = data;
178 struct hyper_container *container = arg->c;
179- char root[512], rootfs[512];
180+ char root[MAX_PBUF], rootfs[MAX_PBUF];
181 int setup_dns;
182
183 /* wait for ns-opened ready message */
184@@ -639,7 +646,7 @@ static int hyper_setup_container_rootfs(void *data)
185 goto fail;
186 }
187 } else {
188- char path[512];
189+ char path[MAX_PBUF];
190
191 sprintf(path, "%s/%s/", SHARED_DIR, container->image);
192 fprintf(stdout, "src directory %s\n", path);
193@@ -657,7 +664,9 @@ static int hyper_setup_container_rootfs(void *data)
194 fprintf(stdout, "root directory for container is %s/%s, init task %s\n",
195 root, container->rootfs, container->exec.argv[0]);
196
197- sprintf(rootfs, "%s/%s/", root, container->rootfs);
198+ if (snprintf(rootfs, MAX_PBUF, "%s/%s/", root, container->rootfs) >= MAX_PBUF)
199+ goto fail;
200+
201 if (mount(rootfs, rootfs, NULL, MS_BIND|MS_REC, NULL) < 0) {
202 perror("failed to bind rootfs");
203 goto fail;
204@@ -740,7 +749,7 @@ fail:
205
206 static int hyper_setup_pty(struct hyper_container *c)
207 {
208- char root[512];
209+ char root[MAX_PBUF];
210
211 sprintf(root, "/tmp/hyper/%s/devpts/", c->id);
212
213@@ -760,7 +769,7 @@ static int hyper_setup_pty(struct hyper_container *c)
214
215 static void hyper_cleanup_pty(struct hyper_container *c)
216 {
217- char path[512];
218+ char path[MAX_PBUF];
219
220 sprintf(path, "/tmp/hyper/%s/devpts/", c->id);
221 if (umount(path) < 0)
222@@ -769,7 +778,7 @@ static void hyper_cleanup_pty(struct hyper_container *c)
223
224 int container_prepare_rootfs_dev(struct hyper_container *container, struct hyper_pod *pod)
225 {
226- char dev[512];
227+ char dev[MAX_PBUF];
228
229 if (container->fstype == NULL)
230 return 0;
diff --git a/recipes-extended/hyperstart/hyperstart_git.bb b/recipes-extended/hyperstart/hyperstart_git.bb
deleted file mode 100644
index e156cdae..00000000
--- a/recipes-extended/hyperstart/hyperstart_git.bb
+++ /dev/null
@@ -1,26 +0,0 @@
1SUMMARY = "The tiny Init service for HyperContainer"
2DESCRIPTION = "The init Task for HyperContainer"
3
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=fa818a259cbed7ce8bc2a22d35a464fc"
6
7inherit autotools-brokensep
8
9SRC_URI = "git://github.com/hyperhq/hyperstart.git;branch=master;protocol=https"
10SRC_URI += "file://0001-container.c-Fix-compiler-errors-that-gcc-8.1.0-repor.patch"
11
12SRCREV = "c0c07d218b482dd07f9068b52a6e7468ae4172ac"
13PV = "v0.2+git"
14
15S = "${WORKDIR}/git"
16
17CACHED_CONFIGUREVARS = "ac_cv_file__usr_include_linux_vm_sockets_h=true"
18
19do_install() {
20 install -d ${D}/var/lib/hyper/
21
22 install -m644 ${S}/build/hyper-initrd.img ${D}/var/lib/hyper/
23 install -m644 ${S}/build/arch/x86_64/kernel ${D}/var/lib/hyper/
24}
25
26FILES:${PN} += "/var/lib/hyper"
diff --git a/recipes-extended/images/README-xen.md b/recipes-extended/images/README-xen.md
new file mode 100644
index 00000000..82d72364
--- /dev/null
+++ b/recipes-extended/images/README-xen.md
@@ -0,0 +1,173 @@
1This README contains information on the xen reference images
2and testing / usability information
3
4Images
5------
6
7xen-image-minimal:
8
9This is the reference xen host image. It currently requires systemd
10and xen as DISTRO_FEATURES.
11
12All required dependencies are included for typical execution (and
13debug) of guests.
14
15xen-guest-image-minimal:
16
17This is the reference guest / domU image. Note that it boots the
18same kernel as the xen host image (unless multiconfig is used
19to differentiate).
20
21It creates tarballs, ext4 and qcow images for testing purposes.
22
23bundling
24--------
25
26Guests can be bundled automatically through the following mechanisms:
27
28 - via the variable XEN_BUNDLED_GUESTS
29 - via a xen configuration file in the deploy directory of the format
30 xen-guest-bundle-*.cfg
31
32The guests can be built via OE, or be 3rd party guests. They just
33must be in the deploy directory so they can be copied into the rootfs
34of the xen host image
35
36Type 1) XEN_BUNDLED_GUESTS
37
38If XEN_BUNDLED_GUESTS is used, it is simply a colon separated list of
39rootfs:kernels. Normal variable rules apply, so it can be set in a
40local.conf, or in a bbappend to the image recipe.
41
42An example would be:
43
44 XEN_BUNDLED_GUESTS = "xen-guest-image-minimal-qemuarm64.rootfs.ext4:Image"
45
46These point at symlinks created in the image deploy directory, or they
47can be specific images/kernels without the symlink.
48
49Type 2) A Xen guest configuration file
50
51If xen guest configuration files are found in the deploy directories
52the kernel and disk information contained within them will be processed
53and modified for the xen host. The kernel and guest image will be
54copied to the appropriate location, and the config made to match.
55
56These files following the naming convention: xen-guest-bundle*.cfg
57
58Guests of type #1 generate a configuration file that is picked up as
59type #2.
60
61An example config file follows:
62
63 name = "xen-guest"
64 memory = 512
65 vcpus = 1
66 disk = ['file:xen-guest-image-minimal-qemuarm64.rootfs.ext4,xvda,rw']
67 vif = ['bridge=xenbr0']
68 kernel = "Image"
69 extra = "root=/dev/xvda ro console=hvc0 ip=dhcp"
70
71It should also be noted that when a xen-guest-image-minimal is built
72with the XEN_GUEST_AUTO_BUNDLE varaible set to True, a configuration
73file for type #2 will be generated and the guest bundled automatically
74when the host image is built.
75
76kernel and rootfs are copied to the target in /var/lib/xen/images/
77
78configuration files are copied to: /etc/xen
79
80Guests can be launched after boot with: xl create -c /etc/xen/<config file>
81
82Build and boot
83--------------
84
85Using a reference qmeuarm64 MACHINE, the following are the commands
86to build and boot a guest.
87
88local.conf contains:
89
90 XEN_BUNDLED_GUESTS = "xen-guest-image-minimal-qemuarm64.rootfs.ext4:Image"
91
92 % bitbake xen-guest-image-minimal
93 % bitbake xen-image-minimal
94
95 % runqemu qemuarm64 nographic slirp qemuparams="-m 4096" tmp/deploy/images/qemuarm64/xen-image-minimal-qemuarm64.rootfs.ext4
96
97Poky (Yocto Project Reference Distro) 5.1 qemuarm64 hvc0
98
99qemuarm64 login: root
100
101WARNING: Poky is a reference Yocto Project distribution that should be used for
102testing and development purposes only. It is recommended that you create your
103own distribution for production use.
104
105 root@qemuarm64:~# uname -a
106Linux qemuarm64 6.10.11-yocto-standard #1 SMP PREEMPT Fri Sep 20 22:32:26 UTC 2024 aarch64 GNU/Linux
107root@qemuarm64:~# ls /etc/xen/
108auto
109cpupool
110scripts
111xen-guest-bundle-xen-guest-image-minimal-qemuarm64--20241112174803.cfg
112xl.conf
113root@qemuarm64:~# ls /var/lib/xen/images/
114Image--6.10.11+git0+4bf82718cf_6c956b2ea6-r0-qemuarm64-20241018190311.bin
115xen-guest-image-minimal-qemuarm64.rootfs-20241111222814.ext4
116
117 root@qemuarm64:~# ip a s
1181: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue qlen 1000
119 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
120 inet 127.0.0.1/8 scope host lo
121 valid_lft forever preferred_lft forever
122 inet6 ::1/128 scope host noprefixroute
123 valid_lft forever preferred_lft forever
1242: enp0s1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master xenbr0 qlen 1000
125 link/ether 52:54:00:12:35:02 brd ff:ff:ff:ff:ff:ff
1263: sit0@NONE: <NOARP> mtu 1480 qdisc noop qlen 1000
127 link/sit 0.0.0.0 brd 0.0.0.0
1284: xenbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue qlen 1000
129 link/ether ee:e4:a8:24:24:e7 brd ff:ff:ff:ff:ff:ff
130 inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic xenbr0
131 valid_lft 86354sec preferred_lft 86354sec
132 inet6 fec0::ece4:a8ff:fe24:24e7/64 scope site dynamic noprefixroute flags 100
133 valid_lft 86356sec preferred_lft 14356sec
134 inet6 fe80::ece4:a8ff:fe24:24e7/64 scope link
135 valid_lft forever preferred_lft forever
136
137 root@qemuarm64:~# xl create -c /etc/xen/xen-guest-bundle-xen-guest-image-minimal-qemuarm64--20241112174803.cfg
138
139qemuarm64 login: root
140
141WARNING: Poky is a reference Yocto Project distribution that should be used for
142testing and development purposes only. It is recommended that you create your
143own distribution for production use.
144
145root@qemuarm64:~# uname -a
146Linux qemuarm64 6.10.11-yocto-standard #1 SMP PREEMPT Fri Sep 20 22:32:26 UTC 2024 aarch64 GNU/Linux
147
148root@qemuarm64:~# wget example.com
149Connecting to example.com (93.184.215.14:80)
150wget: can't open 'index.html': File exists
151root@qemuarm64:~# rm index.html
152root@qemuarm64:~# wget example.com
153Connecting to example.com (93.184.215.14:80)
154saving to 'index.html'
155index.html 100% |********************************| 1256 0:00:00 ETA
156'index.html' saved
157
158From the host:
159
160Connection to 127.0.0.1 closed.
161build4 [/home/bruc.../qemuarm64]> ssh -p 2222 root@127.0.0.1
162Last login: Tue Nov 12 20:42:57 2024 from 10.0.2.2
163
164WARNING: Poky is a reference Yocto Project distribution that should be used for
165testing and development purposes only. It is recommended that you create your
166own distribution for production use.
167
168root@qemuarm64:~# xl list
169Name ID Mem VCPUs State Time(s)
170Domain-0 0 192 4 r----- 696.2
171xen-guest 1 512 1 -b---- 153.0
172root@qemuarm64:~# xl destroy xen-guest
173
diff --git a/recipes-extended/images/README.md b/recipes-extended/images/README.md
new file mode 100644
index 00000000..1a25f724
--- /dev/null
+++ b/recipes-extended/images/README.md
@@ -0,0 +1,311 @@
1This README describes the contents of the reference images in
2this directory, as well as some testing and usability tips.
3
4container-image-host
5--------------------
6
7As described in the recipe, this is a flexible image definition that
8is suitable for building a container host image for a target.
9
10The configuration options for the image are best found in the recipe
11itself, so the information will not be duplicated here. The type of
12container host that will be created is controlled by the CONTAINER_PROFILE
13variable:
14
15i.e. in your local.conf: CONTAINER_PROFILE="docker"
16
17The valid settings for this variable can be found in the image recipe.
18
19The recipe checks for mandatory distro features, recommends others
20and provides a list of optional distro features for some workloads.
21
22This image also builds using virt-unique-hostname, which ensures that
23there is some randomization as hostname is often used to identify
24hosts when clustered (i.e. k3s).
25
26To have enough disk space for container images, it is configured
27with extra space. Depending on your use case, you can add (or remove)
28space as appropriate.
29
30Also note that more memory than the default is often required.
31
32An example execution of the image is:
33
34 % runqemu qemuarm64 nographic slirp qemuparams="-m 2048" tmp/deploy/images/qemuarm64/container-image-host-qemuarm64.rootfs.ext4
35
36ssh is enabled in this image by default, so the image can be accessed
37via:
38
39 % ssh -p 2222 root@127.0.0.1
40
41After a container image has been built, it can be copied fro the
42deploy directory to the registry of your choice, for example:
43
44 % cd build/tmp/deploy/images/qemuarm64
45 % skopeo copy --dest-creds <username>:<creds> oci:c3-systemd-container-latest-oci:latest docker://zeddii/c3-systemd-container
46
47Examples of pulling images to the container host for the various
48runtimes follow:
49
50 % podman pull --creds <username>:<password> zeddii/container-devtools
51 % podman run -it docker.io/zeddii/container-devtools bash
52
53 % root@qemuarm64-54:~# docker login
54 # Login Succeeded
55 % root@qemuarm64-54:~# docker pull zeddii/container-devtools
56
57 % root@qemuarm64-54:~# docker run -it --entrypoint /bin/sh zeddii/container-base
58 # [ 804.133881] docker0: port 1(veth2801d6a) entered blocking state
59 # [ 804.134425] docker0: port 1(veth2801d6a) entered disabled state
60 # [ 804.135018] veth2801d6a: entered allmulticast mode
61 # [ 804.136101] veth2801d6a: entered promiscuous mode
62 # [ 806.227282] eth0: renamed from veth384b37d
63 # [ 806.235331] docker0: port 1(veth2801d6a) entered blocking state
64 # [ 806.236010] docker0: port 1(veth2801d6a) entered forwarding state
65 # / # ls
66 # bin boot dev etc home lib media mnt proc run sbin sys tmp usr var
67
68container-base:
69---------------
70
71Provides a minimal container image (but not absolutely smallest) that is
72inherited / included by the other container images.
73
74By default container base does not execute anything (it doesn't define
75and OCI_IMAGE_ENTRYPOINT), but does provide a shell that can be used
76to inspect the image.
77
78 % root@qemuarm64-54:~# docker run -it zeddii/container-base sh
79 [51393.764879] docker0: port 1(veth06cb397) entered blocking state
80 [51393.765340] docker0: port 1(veth06cb397) entered disabled state
81 [51393.765854] veth06cb397: entered allmulticast mode
82 [51393.766753] veth06cb397: entered promiscuous mode
83 [51396.060958] eth0: renamed from veth7e5a654
84 [51396.074281] docker0: port 1(veth06cb397) entered blocking state
85 [51396.074786] docker0: port 1(veth06cb397) entered forwarding state
86 / # ls
87 bin boot dev etc home lib media mnt proc run sbin sys tmp usr var
88 / # df -kh .
89 Filesystem Size Used Available Use% Mounted on
90 overlay 37.8G 1.9G 33.8G 5% /
91 / # du -sh .
92 2.6M .
93 / #
94
95 % root@qemuarm64-54:~# ctr images pull --user <user>:<password> docker.io/zeddii/container-base:latest
96 docker.io/zeddii/container base:latest saved
97 └──manifest (45395e734a93) complete |++++++++++++++++++++++++++++++++++++++|
98 ├──layer (1fd5069cdbad) waiting |--------------------------------------|
99 └──config (24b67db5b19e) waiting |--------------------------------------|
100 application/vnd.oci.image.manifest.v1+json sha256:45395e734a931468f5329d20d20babf13fbabbcd993e27b0e5c4198d09130966
101 Pulling from OCI Registry (docker.io/zeddii/container-base:latest) elapsed: 3.7 s total: 463.0 (123.0 B/s)
102
103 % root@qemuarm64-54:~# ctr run --rm -t docker.io/zeddii/container-base:latest zedd_shell sh
104 / # date
105 Tue Oct 29 00:09:19 UTC 2024
106 / #
107
108 % root@qemuarm64-54:~# nerdctl pull docker.io/zeddii/container-base:latest
109 docker.io/zeddii/container-base:latest: resolved |++++++++++++++++++++++++++++++++++++++|
110 docker.io/zeddii/container-base:latest: resolved |++++++++++++++++++++++++++++++++++++++|
111 manifest-sha256:45395e734a931468f5329d20d20babf13fbabbcd993e27b0e5c4198d09130966: exists |++++++++++++++++++++++++++++++++++++++|
112 config-sha256:24b67db5b19e0bb90291f1d5619362c7eaade7a8c65da9a32c2016394a5b57bf: exists |++++++++++++++++++++++++++++++++++++++|
113 elapsed: 1.2 s total: 0.0 B (0.0 B/s)
114
115 # FIXME: At the time of creating this README, bridge networking and CNI is not working.
116 % root@qemuarm64-54:~# nerdctl run -it --net=host docker.io/zeddii/container-base:latest sh
117 / #
118
119container-devtools-base:
120-------------------------
121
122includes container-base, and adds image features to make development
123tools/headers available.
124
125Anything added to CORE_DEV_IMAGE_EXTRA_INSTALL will be installed into
126the image in it's development variant.
127
128The container shell is changed to bash from busybox.
129
130package-management is added to this image type, but by default there
131is no package feed configured (since it must be pointed at a build)
132
133 % root@qemuarm64-54:~# docker run -it zeddii/container-devtools bash
134 bash-5.2# du -sh .
135 399M .
136 bash-5.2# rpm -qa | wc -l
137 308
138 bash-5.2# gcc --version
139 gcc (GCC) 14.2.0
140 Copyright (C) 2024 Free Software Foundation, Inc.
141 This is free software; see the source for copying conditions. There is NO
142 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
143
144By default this container has (for rpm) package management configured
145to point to a feed being run against the local build on the host machine
146
147To create a package feed:
148
149 % bitbake package-index
150
151To add a package to the package-index (example: vim-tiny)
152
153 % bitbake vim-tiny
154 % bitbake vim-tiny --runall package_write_rpm
155 % bitbake package-index
156
157To run a local http server for the package feed:
158
159 % cd build/tmp/deploy
160 % sudo python3 -m http.server 80
161
162Run the dev container:
163
164 % docker run -it zeddii/container-devtools bash
165 % dnf makecache
166 % dnf --nogpgcheck install vim-tiny
167
168container-app-base:
169--------------------
170
171Includes container-base.
172
173Provides an application container that installs a package (or packages) to
174the container and make the specified command the OCI_IMAGE_ENTRYPOINT.
175
176 CONTAINER_APP_CMD : the binary to run via the OCI_IMAGE_ENTRYPOINT
177 CONATINER_APP: packages to install to the container
178
179The default entry point is the "date" command.
180
181 % root@qemuarm64-54:~# docker run zeddii/container-app-base
182 Mon Oct 28 18:41:23 UTC 2024
183
184 % root@qemuarm64-54:~# docker run --entrypoint "du" zeddii/container-app-base -sh
185 2.6M .
186
187 % podman run docker.io/zeddii/container-app-base
188 Mon Oct 28 18:41:23 UTC 2024
189
190container-systemd-base:
191------------------------
192
193Extends container-base to create a systemd enabled container that is
194an appropriate starting point if a systemd applciation is being run
195or a mulit-user style environment is required.
196
197The application specified in SYSTEMD_CONTAINER_APP will be installed
198and be available to be executed.
199
200The rootfs of this container type is post processed to enable and
201disable services as specified by the containeer definition. This allows
202service that are not appropriate in a containerized environemnt to
203be disabled (i.e. getty login)
204
205The list of services can be found in the recipes themselves.
206
207This container enables ssh by default, so that it can be executed
208in the background and then accessed as a full environment.
209
210Note: this is currently a priviledged container if run under docker.
211
212There are multiple ways to add/remove permissions from the container,
213and most are configurable during launch:
214
215 % root@qemuarm64-54:~# docker run -d --rm --name systemd_test --privileged --cap-add SYS_ADMIN \
216 --security-opt seccomp=unconfined --cgroup-parent=docker.slice --cgroupns private \
217 --tmpfs /tmp --tmpfs /run --tmpfs /run/lock zeddii/systemd-container-base
218
219or
220
221 % docker run -d --rm --name systemd_test --privileged --cgroup-parent=docker.slice \
222 --cgroupns private zeddii/c3-systemd-container
223
224 % root@qemuarm64-54:~# docker ps
225 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
226 4b07cc907e26 zeddii/c3-systemd-container "/sbin/init" 5 minutes ago Up 5 minutes systemd_test
227
228 % podman run -d --name systemd_test --privileged --cgroupns=host --tmpfs /tmp --tmpfs /run --tmpfs /run/lock \
229 -v /sys/fs/cgroup:/sys/fs/cgroup:ro zeddii/systemd-container-base
230
231 % ctr container create --privileged --runtime="io.containerd.runc.v2" \
232 --mount type=bind,src=/sys/fs/cgroup,dst=/sys/fs/cgroup,options=rbind:rw \
233 docker.io/zeddii/systemd-container-base:latest my_systemd_container /sbin/init
234
235 % ctr task start --detach my_systemd_container
236
237 % ctr task ls
238 TASK PID STATUS
239 my_systemd_container 690 RUNNING
240
241Then add a user to the container so you can login:
242
243 % root@qemuarm64-54:~# docker exec systemd_test useradd testuser
244 % root@qemuarm64-54:~# docker exec systemd_test sh -c "echo 'testuser:password' | chpasswd"
245
246 % podman exec systemd_test useradd testuser
247 % podman exec systemd_test sh -c "echo 'testuser:password' | chpasswd"
248
249 % ctr task exec --exec-id test_exec my_systemd_container useradd testuser
250 % ctr task exec --exec-id test_exec my_systemd_container sh -c "echo 'testuser:password' | chpasswd"
251 % ctr task exec -t --exec-id test_exec my_systemd_container bash
252
253Get the IP address:
254
255 % root@qemuarm64-54:~# docker inspect systemd_test | grep \"IPAddress\":
256 "IPAddress": "172.17.0.2",
257 "IPAddress": "172.17.0.2",
258
259 % root@qemuarm64-54:~# podman inspect 2f9e00c53c13 | grep IPAdd
260 "IPAddress": "10.88.0.5",
261 "IPAddress": "10.88.0.5",
262
263ssh into the container:
264
265 % root@qemuarm64-54:~# ssh testuser@172.17.0.2
266 % testuser@172.17.0.2's password:
267
268 WARNING: Poky is a reference Yocto Project distribution that should be used for
269 testing and development purposes only. It is recommended that you create your
270 own distribution for production use.
271
272 4b07cc907e26:~$ systemctl | grep running
273 init.scope loaded active running System and Service Manager
274 session-c1.scope loaded active running Session c1 of User testuser
275 dbus.service loaded active running D-Bus System Message Bus
276 dhcpcd.service loaded active running A minimalistic network configuration daemon with DHCPv4, rdisc and DHCPv6 support
277 getty@tty1.service loaded active running Getty on tty1
278 sshd@2-172.17.0.2:22-172.17.0.1:39264.service loaded active running OpenSSH Per-Connection Daemon (172.17.0.1:39264)
279 systemd-journald.service loaded active running Journal Service
280 systemd-logind.service loaded active running User Login Management
281 systemd-networkd.service loaded active running Network Configuration
282 systemd-nsresourced.service loaded active running Namespace Resource Manager
283 systemd-resolved.service loaded active running Network Name Resolution
284 systemd-userdbd.service loaded active running User Database Manager
285 user@1000.service loaded active running User Manager for UID 1000
286 xinetd.service loaded active running Xinetd A Powerful Replacement For Inetd
287 dbus.socket loaded active running D-Bus System Message Bus Socket
288 systemd-journald-dev-log.socket loaded active running Journal Socket (/dev/log)
289 systemd-journald.socket loaded active running Journal Sockets
290 systemd-networkd.socket loaded active running Network Service Netlink Socket
291 systemd-nsresourced.socket loaded active running Namespace Resource Manager Socket
292 systemd-userdbd.socket loaded active running User Database Manager Socket
293
294
295 % root@qemuarm64-54:~# ssh testuser@10.88.0.5
296 The authenticity of host '10.88.0.5 (10.88.0.5)' can't be established.
297 ECDSA key fingerprint is SHA256:ydCJGSVNLdWiAcC5PUkDsiFZZ6sDTeQ9Nt13a6HQCc4.
298 This key is not known by any other names.
299 Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
300 Warning: Permanently added '10.88.0.5' (ECDSA) to the list of known hosts.
301 testuser@10.88.0.5's password:
302
303 WARNING: Poky is a reference Yocto Project distribution that should be used for
304 testing and development purposes only. It is recommended that you create your
305 own distribution for production use.
306
307 2f9e00c53c13:~$
308
309Enjoy!
310
311
diff --git a/recipes-extended/images/cloud-image-controller.bb b/recipes-extended/images/cloud-image-controller.bb
index c816545f..b192db90 100644
--- a/recipes-extended/images/cloud-image-controller.bb
+++ b/recipes-extended/images/cloud-image-controller.bb
@@ -29,4 +29,4 @@ inherit core-image
29IMAGE_FSTYPES = "wic.vmdk tar.gz" 29IMAGE_FSTYPES = "wic.vmdk tar.gz"
30 30
31# Ensure extra space for guest images 31# Ensure extra space for guest images
32#IMAGE_ROOTFS_EXTRA_SPACE = "41943040" 32#IMAGE_ROOTFS_EXTRA_SPACE = "2000000"
diff --git a/recipes-extended/images/container-app-base.bb b/recipes-extended/images/container-app-base.bb
new file mode 100644
index 00000000..34381ed2
--- /dev/null
+++ b/recipes-extended/images/container-app-base.bb
@@ -0,0 +1,17 @@
1SUMMARY = "Basic Application container image"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5include container-base.bb
6
7# CONTAINER_APP_CMD is the executable to run as the entrypoint of the
8# container. What we have below is a placholder. if you run this
9# container, you'll get the date echo'd
10CONTAINER_APP_CMD ?= "date"
11
12# The container app is the package(s) to install into the container.
13# They must provide the command specified in CONTAINER_APP_CMD
14CONTAINER_APP ?= ""
15
16OCI_IMAGE_ENTRYPOINT = "${CONTAINER_APP_CMD}"
17IMAGE_INSTALL:append = " ${CONTAINER_APP}"
diff --git a/recipes-extended/images/container-base.bb b/recipes-extended/images/container-base.bb
index c9dd32d1..64655e0b 100644
--- a/recipes-extended/images/container-base.bb
+++ b/recipes-extended/images/container-base.bb
@@ -7,6 +7,7 @@ LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 7LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
8 8
9IMAGE_FSTYPES = "container oci" 9IMAGE_FSTYPES = "container oci"
10
10inherit image 11inherit image
11inherit image-oci 12inherit image-oci
12 13
@@ -21,6 +22,10 @@ IMAGE_INSTALL = " \
21 ${CONTAINER_SHELL} \ 22 ${CONTAINER_SHELL} \
22" 23"
23 24
25# Keep the entrypoint empty so that this image can be easily be
26# inherted and re-used for interactive or non interactive images
27OCI_IMAGE_ENTRYPOINT ?= ""
28
24# If the following is configured in local.conf (or the distro): 29# If the following is configured in local.conf (or the distro):
25# PACKAGE_EXTRA_ARCHS:append = " container-dummy-provides" 30# PACKAGE_EXTRA_ARCHS:append = " container-dummy-provides"
26# 31#
@@ -36,7 +41,16 @@ CONTAINER_SHELL ?= "${@bb.utils.contains('PACKAGE_EXTRA_ARCHS', 'container-dummy
36IMAGE_CONTAINER_NO_DUMMY = "1" 41IMAGE_CONTAINER_NO_DUMMY = "1"
37 42
38# Workaround /var/volatile for now 43# Workaround /var/volatile for now
44# This is required because the lack of post-install scripts means volatile
45# directories (/var/volatile/*, etc.) are not created, so we do that ourselves
46# in a minimal way below. We could bootstrap and run some of the more standard
47# scripts that do it at boot, but we avoid that until needed.
39ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; " 48ROOTFS_POSTPROCESS_COMMAND += "rootfs_fixup_var_volatile ; "
49
50# This :remove is required, because it comes along and deletes our /var/volatile/
51# fixups!
52ROOTFS_POSTPROCESS_COMMAND:remove = "empty_var_volatile"
53
40rootfs_fixup_var_volatile () { 54rootfs_fixup_var_volatile () {
41 install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp 55 install -m 1777 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/tmp
42 install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log 56 install -m 755 -d ${IMAGE_ROOTFS}/${localstatedir}/volatile/log
diff --git a/recipes-extended/images/container-devtools-base.bb b/recipes-extended/images/container-devtools-base.bb
new file mode 100644
index 00000000..63d40ab7
--- /dev/null
+++ b/recipes-extended/images/container-devtools-base.bb
@@ -0,0 +1,51 @@
1SUMMARY = "Basic container image with development tools"
2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5CONTAINER_SHELL = "bash"
6
7CORE_DEV_IMAGE_EXTRA_INSTALL ?= ""
8
9include container-base.bb
10inherit core-image
11
12CORE_DEV_IMAGE_EDITOR ?= "vim-tiny"
13# base-utils is required for post-install scriptlets in most packages,
14# coreutils or busybox can do the job
15CORE_DEV_IMAGE_CORE_UTILS ?= "${VIRTUAL-RUNTIME_base-utils}"
16
17IMAGE_INSTALL += " \
18 ${CORE_DEV_IMAGE_EXTRA_INSTALL} \
19 ${CORE_DEV_IMAGE_CORE_UTILS} \
20 ${CORE_DEV_IMAGE_EDITOR} \
21 "
22
23OCI_IMAGE_ENTRYPOINT = ""
24
25# development headers, tools and package management to update
26# the container.
27IMAGE_FEATURES += "dev-pkgs"
28IMAGE_FEATURES += "tools-sdk"
29IMAGE_FEATURES += "package-management"
30
31# This default configuration of 10.0.2.2 is configured
32# to contact a web server running against a bitbaked
33# package-index
34#
35# % cd build/tmp/deploy
36# % sudo python3 -m http.server 80
37#
38DEVTOOLS_BASE_PKG_FEED_URL ?= "http://10.0.2.2/rpm"
39
40
41# TODO: support more than rpm
42ROOTFS_POSTPROCESS_COMMAND += "rootfs_pkg_feed_config ; "
43rootfs_pkg_feed_config () {
44 if [ "${IMAGE_PKGTYPE}" = "rpm" ]; then
45 install -m 755 -d ${IMAGE_ROOTFS}/${sysconfdir}/yum.repos.d
46cat <<EOF >>${IMAGE_ROOTFS}/${sysconfdir}/yum.repos.d/oe-packages.repo
47[oe-packages]
48baseurl="${DEVTOOLS_BASE_PKG_FEED_URL}"
49EOF
50 fi
51}
diff --git a/recipes-extended/images/container-image-host.bb b/recipes-extended/images/container-image-host.bb
new file mode 100644
index 00000000..d63ef51e
--- /dev/null
+++ b/recipes-extended/images/container-image-host.bb
@@ -0,0 +1,129 @@
1DESCRIPTION = "A configurable container host image"
2LICENSE = "MIT"
3
4# This image is a reference implementation to create a target platform
5# capable of running containers. This includes kernel configuration,
6# container runtimes, tools and other support applications.
7#
8# The wpackages to install are largely described in the packagegroups
9# that are part of this layer. packagegroups are preferred as they can
10# easily be used to create similar images of different composition.
11# The recipes for the packages have their list of build and runtime
12# dependencies, as such, those dependencies are not part of the image
13# install or listed explicitly in the packgroups.
14#
15# CNCF areas that have choices are described by VIRTUAL-RUNTIME
16# variables. These variables can be set individually (in a distro,
17# layer or local configuration file), or can be set by the setting of
18# a "CONTAINER_PROFILE". It is possible to select incompatible
19# packages if setting the VIRTUAL-RUNTIME variables individually.
20# container profiles have been created as valid / tested stacks of the
21# components in meta-virtualization.
22#
23# The contents of the image are selected by testing the VIRTUAL-RUNTIME
24# values and mapping them to packagegroups.
25#
26# The possible VIRTUAL-RUNTIME variables (and their values) are
27# currently:
28#
29## engines: docker/docker-moby, virtual-containerd, cri-o, podman, lxc
30## VIRTUAL-RUNTIME_container_engine ??= "podman"
31## runtime: runc, crun, runv, runx
32## VIRTUAL-RUNTIME_container_runtime ??= "virtual-runc"
33## networking: cni, netavark
34## VIRTUAL-RUNTIME_container_networking ??= "cni"
35## dns: cni, aardvark-dns
36## VIRTUAL-RUNTIME_container_dns ??= "cni"
37## orchestration: k8s, k3s
38## VIRTUAL-RUNTIME_container_orchestration ??= "k3s"
39## Kubernetes terminology "components"
40## VIRTUAL-RUNTIME_cri ??= "virtual-containerd"
41## VIRTUAL-RUNTIME_cni ??= "cni"
42#
43# To select a CONTAINER_PROFILE, set the variable in your local,
44# distro or layer configuration:
45#
46# CONTAINER_PROFILE="<your value>"
47#
48# The possible values for CONTAINER_PROFILE can be found in
49# conf/distro/include in the format of: meta-virt-container-<profile>.inc
50#
51## default (docker)
52## containerd
53## podman
54## docker
55## k3s-host
56## k3s-node
57
58inherit features_check
59
60# minimum features tested to have a working container host
61# image. These will be enforced by the features_check inherit
62REQUIRED_DISTRO_FEATURES ?= " virtualization \
63 systemd \
64 seccomp \
65 "
66
67# features that are typically enabled. Note, these are not
68# enforced, but maybe added to the required distro feature
69# definition in the future.
70RECOMMENDED_DISTRO_FEATURES ?= " pam \
71 usrmerge \
72 "
73# features that are enabled for specific wworkloads. These
74# are not enforced, except for specific configurations.
75OPTIONAL_DISTRO_FEATURES ?= " vmsep \
76 k3s \
77 k8s \
78 "
79
80REQUIRED_DISTRO_FEATURES:append = " ${@bb.utils.contains('VIRTUAL-RUNTIME_container_orchestration','k3s-node','k3s','',d)}"
81REQUIRED_DISTRO_FEATURES:append = " ${@bb.utils.contains('VIRTUAL-RUNTIME_container_orchestration','k3s-host','k3s','',d)}"
82
83# If the image is going to be placed into a cluster, we need some randomization
84# of the host name to make it unique
85IMAGE_FEATURES[validitems] += "virt-unique-hostname"
86IMAGE_FEATURES[validitems] += "container-tools"
87
88IMAGE_FEATURES += "ssh-server-openssh"
89IMAGE_FEATURES += "package-management"
90IMAGE_FEATURES += "virt-unique-hostname"
91# This may be automatically enabled in the future via a toold or debug flag
92# IMAGE_FEATURES += "container-tools"
93
94IMAGE_LINGUAS = " "
95
96# additional packages to install
97CONTAINER_IMAGE_HOST_EXTRA_INSTALL ?= ""
98
99# values can be: "all", "split" or ""
100CONTAINER_IMAGE_KERNEL_MODULES ?= "all"
101
102# These could be done via a mapping to allow a single selection line
103# per type of virtul runtime, but right now the format of the
104# virtual-runtime to packagegroup name is not mandated, so we keep
105# them separate to allow the mapping in the individual items.
106IMAGE_INSTALL = " \
107 packagegroup-core-boot \
108 packagegroup-oci \
109 container-host-config \
110 ${@bb.utils.contains('CONTAINER_IMAGE_KERNEL_MODULES','split','','kernel-modules',d)} \
111 ${@bb.utils.contains_any('VIRTUAL-RUNTIME_container_engine','docker docker-moby','packagegroup-docker','',d)} \
112 ${@bb.utils.contains_any('VIRTUAL-RUNTIME_container_engine','podman','packagegroup-podman','',d)} \
113 ${@bb.utils.contains_any('VIRTUAL-RUNTIME_container_engine','containerd','packagegroup-containerd','',d)} \
114 ${@bb.utils.contains('VIRTUAL-RUNTIME_container_networking','cni','packagegroup-cni','',d)} \
115 ${@bb.utils.contains('VIRTUAL-RUNTIME_container_networking','netavark','packagegroup-netavark','',d)} \
116 ${@bb.utils.contains('IMAGE_FEATURES','container-tools','packagegroup-container-tools','',d)} \
117 ${@bb.utils.contains('VIRTUAL-RUNTIME_container_orchestration','k3s-host','packagegroup-k3s-host','',d)} \
118 ${@bb.utils.contains('VIRTUAL-RUNTIME_container_orchestration','k3s-node','packagegroup-k3s-node','',d)} \
119 ${CONTAINER_IMAGE_HOST_EXTRA_INSTALL} \
120 "
121
122# inherit the basics of a booting image
123inherit core-image
124
125IMAGE_ROOTFS_SIZE = "8192"
126
127# we always need extra space to install container images
128# 2GB
129IMAGE_ROOTFS_EXTRA_SPACE = "2000000"
diff --git a/recipes-extended/images/container-systemd-base.bb b/recipes-extended/images/container-systemd-base.bb
new file mode 100644
index 00000000..96ef4667
--- /dev/null
+++ b/recipes-extended/images/container-systemd-base.bb
@@ -0,0 +1,17 @@
1SUMMARY = "Systemd system container for ${SYSTEMD_CONTAINER_APP}"
2DESCRIPTION = "A small systemd system container which will run \
3 ${SYSTEMD_CONTAINER_APP}."
4
5SYSTEMD_CONTAINER_APP ?= ""
6
7# Use local.conf to specify the application(s) to install
8IMAGE_INSTALL += "${SYSTEMD_CONTAINER_APP}"
9
10# Use local.conf to specify additional systemd services to disable. To overwrite
11# the default list use SERVICES_TO_DISABLE:pn-systemd-container in local.conf
12SERVICES_TO_DISABLE:append = " ${SYSTEMD_CONTAINER_DISABLE_SERVICES}"
13
14# Use local.conf to enable systemd services
15SERVICES_TO_ENABLE += "${SYSTEMD_CONTAINER_ENABLE_SERVICES}"
16
17require container-systemd-base.inc
diff --git a/recipes-extended/images/container-systemd-base.inc b/recipes-extended/images/container-systemd-base.inc
new file mode 100644
index 00000000..0b856e83
--- /dev/null
+++ b/recipes-extended/images/container-systemd-base.inc
@@ -0,0 +1,72 @@
1SUMMARY ?= "Sample systemd system container"
2DESCRIPTION ?= "A small systemd system container which will run \
3 the application defined in IMAGE_INSTALL."
4
5LICENSE ?= "MIT"
6LIC_FILES_CHKSUM ?= "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
7
8# Some commands of interest:
9# % docker run -d --rm --name systemd_test --privileged \
10# --cap-add SYS_ADMIN --security-opt seccomp=unconfined --cgroup-parent=docker.slice \
11# --cgroupns private --tmpfs /tmp --tmpfs /run --tmpfs /run/lock zeddii/systemd-container-base
12#
13# % docker run -d --rm --name systemd_test --privileged \
14# --cgroup-parent=docker.slice --cgroupns private zeddii/c3-systemd-container
15#
16# % docker inspect systemd_test
17# % docker inspect systemd_test | grep \"IPAddress\":
18# % docker exec systemd_test bash -c "echo 'testuser:password' | chpasswd"
19# % ssh testuser@172.17.0.2
20
21require container-base.bb
22
23OCI_IMAGE_ENTRYPOINT = "/sbin/init"
24
25IMAGE_INSTALL:append = " systemd"
26IMAGE_INSTALL:append = " packagegroup-core-base-utils"
27IMAGE_INSTALL:append = " packagegroup-core-ssh-openssh"
28IMAGE_INSTALL:append = " busybox"
29
30IMAGE_FEATURES ?= ""
31
32NO_RECOMMENDATIONS = "1"
33
34SERVICES_TO_DISABLE ?= " \
35 systemd-udevd.service \
36 systemd-udevd-control.socket \
37 systemd-udevd-kernel.socket \
38 proc-sys-fs-binfmt_misc.automount \
39 sys-fs-fuse-connections.mount \
40 sys-kernel-debug.mount \
41 systemd-hwdb-update.service \
42 serial-getty@ttyS0.service \
43 dev-ttyS0.device \
44 console-getty.service \
45 serial-getty@.service \
46"
47
48SERVICES_TO_ENABLE ?= ""
49
50disable_systemd_services () {
51 SERVICES_TO_DISABLE="${SERVICES_TO_DISABLE}"
52 if [ -n "$SERVICES_TO_DISABLE" ]; then
53 echo "Disabling systemd services:"
54 for service in $SERVICES_TO_DISABLE; do
55 echo " $service"
56 systemctl --root="${IMAGE_ROOTFS}" mask $service > /dev/null >1
57 done
58 fi
59}
60
61enable_systemd_services () {
62 SERVICES_TO_ENABLE="${SERVICES_TO_ENABLE}"
63 if [ -n "$SERVICES_TO_ENABLE" ]; then
64 echo "Enabling additional systemd services:"
65 for service in $SERVICES_TO_ENABLE; do
66 echo " $service"
67 systemctl --root="${IMAGE_ROOTFS}" enable $service > /dev/null >1
68 done
69 fi
70}
71
72ROOTFS_POSTPROCESS_COMMAND += "disable_systemd_services; enable_systemd_services;"
diff --git a/recipes-extended/images/xen-guest-image-minimal.bb b/recipes-extended/images/xen-guest-image-minimal.bb
index fced7639..76f320e4 100644
--- a/recipes-extended/images/xen-guest-image-minimal.bb
+++ b/recipes-extended/images/xen-guest-image-minimal.bb
@@ -1,6 +1,7 @@
1DESCRIPTION = "A Xen guest image." 1DESCRIPTION = "A Xen guest image."
2 2
3inherit core-image features_check 3inherit core-image features_check deploy
4inherit kernel-artifact-names
4 5
5IMAGE_INSTALL += " \ 6IMAGE_INSTALL += " \
6 packagegroup-core-boot \ 7 packagegroup-core-boot \
@@ -23,3 +24,28 @@ LICENSE = "MIT"
23 24
24# Send console messages to xen console 25# Send console messages to xen console
25APPEND += "console=hvc0" 26APPEND += "console=hvc0"
27
28IMAGE_FSTYPES = "tar.bz2 ext4 ext4.qcow2"
29
30XEN_GUEST_AUTO_BUNDLE ?= ""
31
32# When a xen-guest-image-minimal is built with the
33# XEN_GUEST_AUTO_BUNDLE varaible set to True, a configuration file for
34# automatic guest bundling will be generated and the guest bundled
35# automatically when a xen host image is built.
36do_deploy() {
37 if [ -n "${XEN_GUEST_AUTO_BUNDLE}" ]; then
38 outname="xen-guest-bundle-${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}-${IMAGE_VERSION_SUFFIX}.cfg"
39cat <<EOF >>${DEPLOYDIR}/$outname
40name = "xen-guest"
41memory = 512
42vcpus = 1
43disk = ['file:${IMAGE_LINK_NAME}.ext4,xvda,rw']
44vif = ['bridge=xenbr0']
45kernel = "${KERNEL_IMAGETYPE}"
46extra = "root=/dev/xvda ro ip=dhcp"
47EOF
48 fi
49}
50
51addtask deploy after do_compile
diff --git a/recipes-extended/images/xen-image-minimal.bb b/recipes-extended/images/xen-image-minimal.bb
index fe79a485..6da797d7 100644
--- a/recipes-extended/images/xen-image-minimal.bb
+++ b/recipes-extended/images/xen-image-minimal.bb
@@ -1,9 +1,14 @@
1DESCRIPTION = "A minimal xen image" 1DESCRIPTION = "A minimal xen image"
2 2
3inherit features_check
4
5REQUIRED_DISTRO_FEATURES ?= "xen systemd"
6
3INITRD_IMAGE = "core-image-minimal-initramfs" 7INITRD_IMAGE = "core-image-minimal-initramfs"
4 8
5XEN_KERNEL_MODULES ?= "kernel-module-xen-blkback kernel-module-xen-gntalloc \ 9XEN_KERNEL_MODULES ?= "kernel-module-xen-blkback kernel-module-xen-gntalloc \
6 kernel-module-xen-gntdev kernel-module-xen-netback kernel-module-xen-wdt \ 10 kernel-module-xen-gntdev kernel-module-xen-netback kernel-module-xen-wdt \
11 kernel-module-xt-comment kernel-module-xt-masquerade \
7 ${@bb.utils.contains('MACHINE_FEATURES', 'pci', "${XEN_PCIBACK_MODULE}", '', d)} \ 12 ${@bb.utils.contains('MACHINE_FEATURES', 'pci', "${XEN_PCIBACK_MODULE}", '', d)} \
8 ${@bb.utils.contains('MACHINE_FEATURES', 'acpi', '${XEN_ACPI_PROCESSOR_MODULE}', '', d)} \ 13 ${@bb.utils.contains('MACHINE_FEATURES', 'acpi', '${XEN_ACPI_PROCESSOR_MODULE}', '', d)} \
9 " 14 "
@@ -16,6 +21,7 @@ IMAGE_INSTALL += " \
16 qemu \ 21 qemu \
17 kernel-image \ 22 kernel-image \
18 kernel-vmlinux \ 23 kernel-vmlinux \
24 rsync \
19 " 25 "
20 26
21# The hypervisor may not be within the dom0 filesystem image but at least 27# The hypervisor may not be within the dom0 filesystem image but at least
@@ -44,14 +50,6 @@ QB_QEMU_CLASSES = ""
44QB_QEMU_CLASSES:qemuall = "qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-testimage-network" 50QB_QEMU_CLASSES:qemuall = "qemuboot-xen-defaults qemuboot-xen-dtb qemuboot-testimage-network"
45inherit ${QB_QEMU_CLASSES} 51inherit ${QB_QEMU_CLASSES}
46 52
47do_check_xen_state() {
48 if [ "${@bb.utils.contains('DISTRO_FEATURES', 'xen', ' yes', 'no', d)}" = "no" ]; then
49 die "DISTRO_FEATURES does not contain 'xen'"
50 fi
51}
52
53addtask check_xen_state before do_rootfs
54
55# note: this may be unused, see the wic plugin 53# note: this may be unused, see the wic plugin
56syslinux_iso_populate:append() { 54syslinux_iso_populate:append() {
57 install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${ISODIR}${ISOLINUXDIR} 55 install -m 0444 ${STAGING_DATADIR}/syslinux/libcom32.c32 ${ISODIR}${ISOLINUXDIR}
@@ -88,6 +86,168 @@ build_syslinux_cfg () {
88 echo " APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUX_CFG} 86 echo " APPEND /xen.gz ${SYSLINUX_XEN_ARGS} --- /vmlinuz ${SYSLINUX_KERNEL_ARGS} --- /initrd" >> ${SYSLINUX_CFG}
89} 87}
90 88
89# Function to parse the config file and get values for specific keys
90get_config_value() {
91 config_file="$1"
92 key="$2"
93 line=$(grep -w "$key" $config_file)
94 value=$(echo "$line" | cut -d '=' -f 2-)
95 # Remove quotes, leading/trailing whitespace, and content after the first comma
96 echo "${value#*=}" | sed "s/'//g; s/^\s*|\s*$//g; s/\[//g;s/\"//g;s/^ *//g;" | cut -d ',' -f 1
97}
98
99generate_guest_config() {
100 name=$1
101 kernel=$2
102 disk=$3
103 outname=$name.cfg
104
105 cat <<EOF >${DEPLOY_DIR_IMAGE}/$outname
106name = "$name"
107memory = 512
108vcpus = 1
109disk = ['file:$disk,xvda,rw']
110vif = ['bridge=xenbr0']
111kernel = "$kernel"
112extra = "root=/dev/xvda ro ip=dhcp"
113EOF
114}
115
116# Guests can be bundled automatically through the following mechanisms:
117#
118# - via the variable XEN_BUNDLED_GUESTS
119# - via a xen configuration file in the deploy directory of the format
120# xen-guest-bundle-*.cfg
121#
122# The guests can be built via OE, or be 3rd party guests. They just
123# must be in the deploy directory so they can be copied into the rootfs
124# of the xen host image
125#
126# Type 1) XEN_BUNDLED_GUESTS
127#
128# If XEN_BUNDLED_GUESTS is used, it is simply a colon separated list of
129# rootfs:kernels. Normal variable rules apply, so it can be set in a
130# local.conf, or in a bbappend to the image recipe.
131#
132# An example would be:
133#
134# XEN_BUNDLED_GUESTS = "xen-guest-image-minimal-qemuarm64.rootfs.ext4:Image"
135#
136# These point at symlinks created in the image deploy directory, or they
137# can be specific images/kernels without the symlink.
138#
139# Type 2) A Xen guest configuration file
140#
141# If xen guest configuration files are found in the deploy directories
142# the kernel and disk information contained within them will be processed
143# and modified for the xen host. The kernel and guest image will be
144# copied to the appropriate location, and the config made to match.
145#
146# These files following the naming convention: xen-guest-bundle*.cfg
147#
148# Guests of type #1 generate a configuration file that is picked up as
149# type #2.
150#
151# An example config file follows:
152#
153## name = "xen-guest"
154## memory = 512
155## vcpus = 1
156## disk = ['file:xen-guest-image-minimal-qemuarm64.rootfs.ext4,xvda,rw']
157## vif = ['bridge=xenbr0']
158## kernel = "Image"
159## extra = "root=/dev/xvda ro console=hvc0 ip=dhcp"
160#
161# It should also be noted that when a xen-guest-image-minimal is built
162# with the XEN_GUEST_AUTO_BUNDLE varaible set to True, a configuration
163# file for type #2 will be generated and the guest bundled automatically
164# when the host image is built.
165#
166# kernel and rootfs are copied to the target in /var/lib/xen/images/
167#
168# configuration files are copied to: /etc/xen
169#
170# Guests can be launched after boot with: xl create -c /etc/xen/<config file>
171#
172bundle_xen_guests() {
173 set +e
174
175 if [ -n "${XEN_BUNDLED_GUESTS}" ]; then
176 echo "Processing Xen bundled guests variable: ${XEN_BUNDLED_GUESTS}"
177 # these are a colon separated list of rootfs:kernel
178 count=1
179 for g in ${XEN_BUNDLED_GUESTS}; do
180 echo "Guest line: $g"
181 rootfs=$(echo "$g" | cut -d":" -f1)
182 kernel=$(echo "$g" | cut -d":" -f2)
183 name="xen-guest-bundle-$count"
184
185 if ! [ -e ${DEPLOY_DIR_IMAGE}/$rootfs ]; then
186 echo "rootfs '${DEPLOY_DIR_IMAGE}/$rootfs' not found, skipping ...."
187 continue
188 fi
189 if ! [ -e ${DEPLOY_DIR_IMAGE}/$kernel ]; then
190 echo "kernel '${DEPLOY_DIR_IMAGE}/$kernel' not found, skipping ...."
191 continue
192 fi
193
194 generate_guest_config $name $kernel $rootfs
195
196 count=$(expr $count + 1)
197 done
198 fi
199
200 echo ls ${DEPLOY_DIR_IMAGE}/xen-guest-bundle*.cfg
201 ls ${DEPLOY_DIR_IMAGE}/xen-guest-bundle*.cfg >/dev/null 2>/dev/null
202 if [ $? -eq 0 ]; then
203 for guest_cfg in $(ls ${DEPLOY_DIR_IMAGE}/xen-guest-bundle*.cfg); do
204 echo "Bundling guest: $guest_cfg"
205
206 CONFIG_FILE_BASE=$(basename $guest_cfg .cfg)
207 CONFIG_FILE="${DEPLOY_DIR_IMAGE}/$CONFIG_FILE_BASE.cfg"
208 DEST_DIR="${IMAGE_ROOTFS}/var/lib/xen/images"
209 MODIFIED_CONFIG_FILE="${DEPLOY_DIR_IMAGE}/$CONFIG_FILE_BASE-modified.cfg"
210
211 # Extract values from the configuration file
212 DISK_ORIG=$(get_config_value $CONFIG_FILE "disk" | sed 's/file://g')
213 DISK=$(readlink -f ${DEPLOY_DIR_IMAGE}/$DISK_ORIG)
214 DISK_NAME=$(basename $DISK)
215 KERNEL_ORIG=$(get_config_value $CONFIG_FILE "kernel")
216 KERNEL=$(readlink -f ${DEPLOY_DIR_IMAGE}/$KERNEL_ORIG)
217 KERNEL_NAME=$(basename $KERNEL)
218
219 if [ -z "$DISK" ]; then
220 echo "rootfs '$DISK' not found, skipping ...."
221 continue
222 fi
223 if [ -z "$KERNEL" ]; then
224 echo "kernel '$KERNEL' not found, skipping ...."
225 continue
226 fi
227
228 mkdir -p "$DEST_DIR"
229 # Copy the disk and kernel to the destination directory
230 echo "Copying disk and kernel files..."
231 echo cp "$DISK" "$DEST_DIR"
232 echo cp "$KERNEL" "$DEST_DIR"
233 cp "$DISK" "$DEST_DIR"
234 cp "$KERNEL" "$DEST_DIR"
235
236 # Create a modified config file with updated paths
237 sed -E \
238 -e "s#^(disk = \[)[^,]+#\1'file:/var/lib/xen/images/$DISK_NAME#" \
239 -e "s#^(kernel = )\"[^\"]+\"#\1\"/var/lib/xen/images/$KERNEL_NAME\"#" \
240 "$CONFIG_FILE" > "$MODIFIED_CONFIG_FILE"
241
242 mkdir -p ${IMAGE_ROOTFS}/etc/xen
243 cp $MODIFIED_CONFIG_FILE ${IMAGE_ROOTFS}/etc/xen/$CONFIG_FILE_BASE.cfg
244 rm -f $MODIFIED_CONFIG_FILE
245 done
246 fi
247 # exit 1
248}
249ROOTFS_POSTPROCESS_COMMAND += "bundle_xen_guests;"
250
91# Enable runqemu. eg: runqemu xen-image-minimal nographic slirp 251# Enable runqemu. eg: runqemu xen-image-minimal nographic slirp
92WKS_FILE:x86-64 = "directdisk-xen.wks" 252WKS_FILE:x86-64 = "directdisk-xen.wks"
93WKS_FILE_DEPENDS_DEFAULT:x86-64 = "syslinux-native" 253WKS_FILE_DEPENDS_DEFAULT:x86-64 = "syslinux-native"
@@ -102,7 +262,13 @@ QB_SERIAL_OPT = "-serial mon:stdio"
102# qemux86-64 machine does not include 'wic' in IMAGE_FSTYPES, which is needed 262# qemux86-64 machine does not include 'wic' in IMAGE_FSTYPES, which is needed
103# to boot this image, so add it here: 263# to boot this image, so add it here:
104IMAGE_FSTYPES:qemux86-64 += "wic" 264IMAGE_FSTYPES:qemux86-64 += "wic"
265do_image_wic[depends] += "xen:do_deploy"
105# Networking: the qemuboot.bbclass default virtio network device works ok 266# Networking: the qemuboot.bbclass default virtio network device works ok
106# and so does the emulated e1000 -- choose according to the network device 267# and so does the emulated e1000 -- choose according to the network device
107# drivers that are present in your dom0 Linux kernel. To switch to e1000: 268# drivers that are present in your dom0 Linux kernel. To switch to e1000:
108# QB_NETWORK_DEVICE = "-device e1000,netdev=net0,mac=@MAC@" 269# QB_NETWORK_DEVICE = "-device e1000,netdev=net0,mac=@MAC@"
270
271
272IMAGE_ROOTFS_SIZE = "8192"
273# we always need extra space to install VMs, so add 2GB
274IMAGE_ROOTFS_EXTRA_SPACE = "2000000"
diff --git a/recipes-extended/images/xtf-image.bb b/recipes-extended/images/xtf-image.bb
index f9ecea91..7b6eadfd 100644
--- a/recipes-extended/images/xtf-image.bb
+++ b/recipes-extended/images/xtf-image.bb
@@ -25,7 +25,7 @@ DESCRIPTION = "A minimal Xen Test Framework (XTF) image for testing the Xen hype
25# For testimage, see the qemu boot log: ${WORKDIR}/testimage/qemu_boot_log.* 25# For testimage, see the qemu boot log: ${WORKDIR}/testimage/qemu_boot_log.*
26# and the test log: ${WORKDIR}/temp/log.do_testimage 26# and the test log: ${WORKDIR}/temp/log.do_testimage
27 27
28IMAGE_NAME="xtf" 28IMAGE_NAME = "xtf"
29 29
30IMAGE_INSTALL:append = " xtf" 30IMAGE_INSTALL:append = " xtf"
31 31
diff --git a/recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch b/recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch
new file mode 100644
index 00000000..089a8143
--- /dev/null
+++ b/recipes-extended/ipxe/files/0001-build-Fix-typo-in-xenver.h-header-guard.patch
@@ -0,0 +1,25 @@
1From e4795a590e3b708008a7bbd944370aef5337c561 Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sun, 27 Apr 2025 17:33:28 +0100
4Subject: [PATCH] [build] Fix typo in xenver.h header guard
5
6GCC 15 helpfully reports mismatched #ifdef and #define lines in header
7guards.
8
9Signed-off-by: Michael Brown <mcb30@ipxe.org>
10Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
11---
12 src/include/ipxe/xenver.h | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --git a/src/include/ipxe/xenver.h b/src/include/ipxe/xenver.h
16index b29dfb321..5d820a6e7 100644
17--- a/src/include/ipxe/xenver.h
18+++ b/src/include/ipxe/xenver.h
19@@ -1,5 +1,5 @@
20 #ifndef _IPXE_XENVER_H
21-#define _IPXE_VENVER_H
22+#define _IPXE_XENVER_H
23
24 /** @file
25 *
diff --git a/recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch b/recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch
new file mode 100644
index 00000000..7edafd0d
--- /dev/null
+++ b/recipes-extended/ipxe/files/0002-build-Fix-old-style-function-definition.patch
@@ -0,0 +1,25 @@
1From 0b5e26f82d3bb5dc49557b8c29d802911c050aaf Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sun, 27 Apr 2025 17:36:52 +0100
4Subject: [PATCH] [build] Fix old-style function definition
5
6Signed-off-by: Michael Brown <mcb30@ipxe.org>
7Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
8---
9 src/drivers/net/3c595.c | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-)
11
12diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c
13index 92d38cfc5..c3442946e 100644
14--- a/src/drivers/net/3c595.c
15+++ b/src/drivers/net/3c595.c
16@@ -342,8 +342,7 @@ eeprom_rdy()
17 * before
18 */
19 static int
20-get_e(offset)
21-int offset;
22+get_e(int offset)
23 {
24 if (!eeprom_rdy())
25 return (0xffff);
diff --git a/recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch b/recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch
new file mode 100644
index 00000000..fb93d96f
--- /dev/null
+++ b/recipes-extended/ipxe/files/0003-build-Prevent-the-use-of-reserved-words-in-C23.patch
@@ -0,0 +1,103 @@
1From 2f39451dbab215763c09465848b89dcf41eb71be Mon Sep 17 00:00:00 2001
2From: Miao Wang <shankerwangmiao@gmail.com>
3Date: Sun, 27 Apr 2025 17:30:49 +0100
4Subject: [PATCH] [build] Prevent the use of reserved words in C23
5
6GCC 15 defaults to C23, which reserves bool, true, and false as
7keywords. Avoid using these as parameter or variable names.
8
9Modified-by: Michael Brown <mcb30@ipxe.org>
10Signed-off-by: Michael Brown <mcb30@ipxe.org>
11Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
12---
13 .../infiniband/mlx_utils/src/public/mlx_pci_gw.c | 4 ++--
14 src/drivers/net/igbvf/igbvf_osdep.h | 7 ++-----
15 src/interface/efi/efi_hii.c | 12 ++++++------
16 3 files changed, 10 insertions(+), 13 deletions(-)
17
18diff --git a/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c b/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c
19index 30c1e644e..0b257ed22 100644
20--- a/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c
21+++ b/src/drivers/infiniband/mlx_utils/src/public/mlx_pci_gw.c
22@@ -32,7 +32,7 @@ mlx_status
23 mlx_pci_gw_check_capability_id(
24 IN mlx_utils *utils,
25 IN mlx_uint8 cap_pointer,
26- OUT mlx_boolean *bool
27+ OUT mlx_boolean *result
28 )
29 {
30 mlx_status status = MLX_SUCCESS;
31@@ -41,7 +41,7 @@ mlx_pci_gw_check_capability_id(
32 status = mlx_pci_read(utils, MlxPciWidthUint8, offset,
33 1, &id);
34 MLX_CHECK_STATUS(utils, status, read_err,"failed to read capability id");
35- *bool = ( id == PCI_GW_CAPABILITY_ID );
36+ *result = ( id == PCI_GW_CAPABILITY_ID );
37 read_err:
38 return status;
39 }
40diff --git a/src/drivers/net/igbvf/igbvf_osdep.h b/src/drivers/net/igbvf/igbvf_osdep.h
41index 8ac179de0..dc65da6c1 100644
42--- a/src/drivers/net/igbvf/igbvf_osdep.h
43+++ b/src/drivers/net/igbvf/igbvf_osdep.h
44@@ -35,8 +35,9 @@ FILE_LICENCE ( GPL2_ONLY );
45 #ifndef _IGBVF_OSDEP_H_
46 #define _IGBVF_OSDEP_H_
47
48+#include <stdbool.h>
49+
50 #define u8 unsigned char
51-#define bool boolean_t
52 #define dma_addr_t unsigned long
53 #define __le16 uint16_t
54 #define __le32 uint32_t
55@@ -51,10 +52,6 @@ FILE_LICENCE ( GPL2_ONLY );
56 #define ETH_FCS_LEN 4
57
58 typedef int spinlock_t;
59-typedef enum {
60- false = 0,
61- true = 1
62-} boolean_t;
63
64 #define usec_delay(x) udelay(x)
65 #define msec_delay(x) mdelay(x)
66diff --git a/src/interface/efi/efi_hii.c b/src/interface/efi/efi_hii.c
67index 506fc8869..66f58affe 100644
68--- a/src/interface/efi/efi_hii.c
69+++ b/src/interface/efi/efi_hii.c
70@@ -147,13 +147,13 @@ void efi_ifr_end_op ( struct efi_ifr_builder *ifr ) {
71 */
72 void efi_ifr_false_op ( struct efi_ifr_builder *ifr ) {
73 size_t dispaddr = ifr->ops_len;
74- EFI_IFR_FALSE *false;
75+ EFI_IFR_FALSE *op;
76
77 /* Add opcode */
78- false = efi_ifr_op ( ifr, EFI_IFR_FALSE_OP, sizeof ( *false ) );
79+ op = efi_ifr_op ( ifr, EFI_IFR_FALSE_OP, sizeof ( *op ) );
80
81 DBGC ( ifr, "IFR %p false\n", ifr );
82- DBGC2_HDA ( ifr, dispaddr, false, sizeof ( *false ) );
83+ DBGC2_HDA ( ifr, dispaddr, op, sizeof ( *op ) );
84 }
85
86 /**
87@@ -462,13 +462,13 @@ void efi_ifr_text_op ( struct efi_ifr_builder *ifr, unsigned int prompt_id,
88 */
89 void efi_ifr_true_op ( struct efi_ifr_builder *ifr ) {
90 size_t dispaddr = ifr->ops_len;
91- EFI_IFR_TRUE *true;
92+ EFI_IFR_TRUE *op;
93
94 /* Add opcode */
95- true = efi_ifr_op ( ifr, EFI_IFR_TRUE_OP, sizeof ( *true ) );
96+ op = efi_ifr_op ( ifr, EFI_IFR_TRUE_OP, sizeof ( *op ) );
97
98 DBGC ( ifr, "IFR %p true\n", ifr );
99- DBGC2_HDA ( ifr, dispaddr, true, sizeof ( *true ) );
100+ DBGC2_HDA ( ifr, dispaddr, op, sizeof ( *op ) );
101 }
102
103 /**
diff --git a/recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch b/recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch
new file mode 100644
index 00000000..6598882d
--- /dev/null
+++ b/recipes-extended/ipxe/files/0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch
@@ -0,0 +1,294 @@
1From 1de32c9e11e727fe8c4eab68b331d862cb2f03e7 Mon Sep 17 00:00:00 2001
2From: Michael Brown <mcb30@ipxe.org>
3Date: Sun, 27 Apr 2025 17:37:44 +0100
4Subject: [PATCH] [build] Remove unsafe disable function wrapper from legacy
5 NIC drivers
6
7The legacy NIC drivers do not consistently take a second parameter in
8their disable function. We currently use an unsafe function wrapper
9that declares no parameters, and rely on the ABI allowing a second
10parameter to be silently ignored if not expected by the caller. As of
11GCC 15, this hack results in an incompatible pointer type warning.
12
13Fix by removing the hack, and instead updating all relevant legacy NIC
14drivers to take an unused second parameter in their disable function.
15
16Signed-off-by: Michael Brown <mcb30@ipxe.org>
17Upstream-Status: Backport [https://github.com/ipxe/ipxe/pull/1457]
18---
19 src/drivers/net/3c595.c | 2 +-
20 src/drivers/net/amd8111e.c | 2 +-
21 src/drivers/net/bnx2.c | 8 +++++++-
22 src/drivers/net/davicom.c | 4 ++--
23 src/drivers/net/depca.c | 2 +-
24 src/drivers/net/dmfe.c | 2 +-
25 src/drivers/net/epic100.c | 4 ++--
26 src/drivers/net/ns8390.c | 2 +-
27 src/drivers/net/prism2_pci.c | 2 +-
28 src/drivers/net/prism2_plx.c | 2 +-
29 src/drivers/net/sis900.c | 4 ++--
30 src/drivers/net/sundance.c | 2 +-
31 src/drivers/net/tlan.c | 2 +-
32 src/drivers/net/tulip.c | 4 ++--
33 src/drivers/net/w89c840.c | 2 +-
34 src/include/nic.h | 3 +--
35 16 files changed, 26 insertions(+), 21 deletions(-)
36
37diff --git a/src/drivers/net/3c595.c b/src/drivers/net/3c595.c
38index c3442946e..fbee739a2 100644
39--- a/src/drivers/net/3c595.c
40+++ b/src/drivers/net/3c595.c
41@@ -443,7 +443,7 @@ vxsetlink(void)
42 GO_WINDOW(1);
43 }
44
45-static void t595_disable ( struct nic *nic ) {
46+static void t595_disable ( struct nic *nic, void *hwdev __unused ) {
47
48 t595_reset(nic);
49
50diff --git a/src/drivers/net/amd8111e.c b/src/drivers/net/amd8111e.c
51index 693d77d1d..5ad55eea1 100644
52--- a/src/drivers/net/amd8111e.c
53+++ b/src/drivers/net/amd8111e.c
54@@ -609,7 +609,7 @@ static int amd8111e_poll(struct nic *nic, int retrieve)
55 return pkt_ok;
56 }
57
58-static void amd8111e_disable(struct nic *nic)
59+static void amd8111e_disable(struct nic *nic, void *hwdev __unused)
60 {
61 struct amd8111e_priv *lp = nic->priv_data;
62
63diff --git a/src/drivers/net/bnx2.c b/src/drivers/net/bnx2.c
64index 4ebcc52a9..60bef7711 100644
65--- a/src/drivers/net/bnx2.c
66+++ b/src/drivers/net/bnx2.c
67@@ -2671,6 +2671,12 @@ err_out_disable:
68 return 0;
69 }
70
71+static void
72+bnx2_remove(struct nic *nic, void *hwdev __unused)
73+{
74+ bnx2_disable(nic);
75+}
76+
77 static struct pci_device_id bnx2_nics[] = {
78 PCI_ROM(0x14e4, 0x164a, "bnx2-5706", "Broadcom NetXtreme II BCM5706", 0),
79 PCI_ROM(0x14e4, 0x164c, "bnx2-5708", "Broadcom NetXtreme II BCM5708", 0),
80@@ -2680,7 +2686,7 @@ static struct pci_device_id bnx2_nics[] = {
81
82 PCI_DRIVER ( bnx2_driver, bnx2_nics, PCI_NO_CLASS );
83
84-DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_disable );
85+DRIVER ( "BNX2", nic_driver, pci_driver, bnx2_driver, bnx2_probe, bnx2_remove );
86
87 /*
88 static struct pci_driver bnx2_driver __pci_driver = {
89diff --git a/src/drivers/net/davicom.c b/src/drivers/net/davicom.c
90index 9d3d8b915..07c994573 100644
91--- a/src/drivers/net/davicom.c
92+++ b/src/drivers/net/davicom.c
93@@ -159,7 +159,7 @@ static void davicom_reset(struct nic *nic);
94 static void davicom_transmit(struct nic *nic, const char *d, unsigned int t,
95 unsigned int s, const char *p);
96 static int davicom_poll(struct nic *nic, int retrieve);
97-static void davicom_disable(struct nic *nic);
98+static void davicom_disable(struct nic *nic, void *hwdev);
99 static void davicom_wait(unsigned int nticks);
100 static int phy_read(int);
101 static void phy_write(int, u16);
102@@ -601,7 +601,7 @@ static int davicom_poll(struct nic *nic, int retrieve)
103 /*********************************************************************/
104 /* eth_disable - Disable the interface */
105 /*********************************************************************/
106-static void davicom_disable ( struct nic *nic ) {
107+static void davicom_disable ( struct nic *nic, void *hwdev __unused ) {
108
109 whereami("davicom_disable\n");
110
111diff --git a/src/drivers/net/depca.c b/src/drivers/net/depca.c
112index 016f28bb2..30e2fcb0a 100644
113--- a/src/drivers/net/depca.c
114+++ b/src/drivers/net/depca.c
115@@ -644,7 +644,7 @@ static void depca_transmit(
116 /**************************************************************************
117 DISABLE - Turn off ethernet interface
118 ***************************************************************************/
119-static void depca_disable ( struct nic *nic ) {
120+static void depca_disable ( struct nic *nic, void *hwdev __unused ) {
121 depca_reset(nic);
122
123 STOP_DEPCA(nic->ioaddr);
124diff --git a/src/drivers/net/dmfe.c b/src/drivers/net/dmfe.c
125index 2ea0d2b2b..ea14c462f 100644
126--- a/src/drivers/net/dmfe.c
127+++ b/src/drivers/net/dmfe.c
128@@ -435,7 +435,7 @@ static void dmfe_transmit(struct nic *nic,
129 /**************************************************************************
130 DISABLE - Turn off ethernet interface
131 ***************************************************************************/
132-static void dmfe_disable ( struct nic *nic __unused ) {
133+static void dmfe_disable ( struct nic *nic __unused, void *hwdev __unused ) {
134 /* Reset & stop DM910X board */
135 outl(DM910X_RESET, BASE + DCR0);
136 udelay(5);
137diff --git a/src/drivers/net/epic100.c b/src/drivers/net/epic100.c
138index 8e31a3bfa..01c0c43c9 100644
139--- a/src/drivers/net/epic100.c
140+++ b/src/drivers/net/epic100.c
141@@ -51,7 +51,7 @@ struct epic_tx_desc {
142
143 static void epic100_open(void);
144 static void epic100_init_ring(void);
145-static void epic100_disable(struct nic *nic);
146+static void epic100_disable(struct nic *nic, void *hwdev);
147 static int epic100_poll(struct nic *nic, int retrieve);
148 static void epic100_transmit(struct nic *nic, const char *destaddr,
149 unsigned int type, unsigned int len, const char *data);
150@@ -419,7 +419,7 @@ epic100_poll(struct nic *nic, int retrieve)
151 }
152
153
154-static void epic100_disable ( struct nic *nic __unused ) {
155+static void epic100_disable ( struct nic *nic __unused, void *hwdev __unused ) {
156 /* Soft reset the chip. */
157 outl(GC_SOFT_RESET, genctl);
158 }
159diff --git a/src/drivers/net/ns8390.c b/src/drivers/net/ns8390.c
160index 0ffc6216b..ffd05afdb 100644
161--- a/src/drivers/net/ns8390.c
162+++ b/src/drivers/net/ns8390.c
163@@ -597,7 +597,7 @@ static int ns8390_poll(struct nic *nic, int retrieve)
164 /**************************************************************************
165 NS8390_DISABLE - Turn off adapter
166 **************************************************************************/
167-static void ns8390_disable ( struct nic *nic ) {
168+static void ns8390_disable ( struct nic *nic, void *hwdev __unused ) {
169 ns8390_reset(nic);
170 }
171
172diff --git a/src/drivers/net/prism2_pci.c b/src/drivers/net/prism2_pci.c
173index 69ddf0fb0..b4ed0a728 100644
174--- a/src/drivers/net/prism2_pci.c
175+++ b/src/drivers/net/prism2_pci.c
176@@ -44,7 +44,7 @@ static int prism2_pci_probe ( struct nic *nic, struct pci_device *pci ) {
177 return prism2_probe ( nic, hw );
178 }
179
180-static void prism2_pci_disable ( struct nic *nic ) {
181+static void prism2_pci_disable ( struct nic *nic, void *hwdev __unused ) {
182 prism2_disable ( nic );
183 }
184
185diff --git a/src/drivers/net/prism2_plx.c b/src/drivers/net/prism2_plx.c
186index a73b0e087..b1c466de9 100644
187--- a/src/drivers/net/prism2_plx.c
188+++ b/src/drivers/net/prism2_plx.c
189@@ -99,7 +99,7 @@ static int prism2_plx_probe ( struct nic *nic, struct pci_device *pci ) {
190 return prism2_probe ( nic, hw );
191 }
192
193-static void prism2_plx_disable ( struct nic *nic ) {
194+static void prism2_plx_disable ( struct nic *nic, void *hwdev __unused ) {
195 prism2_disable ( nic );
196 }
197
198diff --git a/src/drivers/net/sis900.c b/src/drivers/net/sis900.c
199index 8a3ac01bc..c8fd3e9b5 100644
200--- a/src/drivers/net/sis900.c
201+++ b/src/drivers/net/sis900.c
202@@ -164,7 +164,7 @@ static void sis900_transmit(struct nic *nic, const char *d,
203 unsigned int t, unsigned int s, const char *p);
204 static int sis900_poll(struct nic *nic, int retrieve);
205
206-static void sis900_disable(struct nic *nic);
207+static void sis900_disable(struct nic *nic, void *hwdev);
208
209 static void sis900_irq(struct nic *nic, irq_action_t action);
210
211@@ -1238,7 +1238,7 @@ sis900_poll(struct nic *nic, int retrieve)
212 */
213
214 static void
215-sis900_disable ( struct nic *nic ) {
216+sis900_disable ( struct nic *nic, void *hwdev __unused ) {
217
218 sis900_init(nic);
219
220diff --git a/src/drivers/net/sundance.c b/src/drivers/net/sundance.c
221index 9127fa2cd..77567a5e8 100644
222--- a/src/drivers/net/sundance.c
223+++ b/src/drivers/net/sundance.c
224@@ -536,7 +536,7 @@ static void sundance_transmit(struct nic *nic, const char *d, /* Destination */
225 /**************************************************************************
226 DISABLE - Turn off ethernet interface
227 ***************************************************************************/
228-static void sundance_disable ( struct nic *nic __unused ) {
229+static void sundance_disable ( struct nic *nic __unused, void *hwdev __unused) {
230 /* put the card in its initial state */
231 /* This function serves 3 purposes.
232 * This disables DMA and interrupts so we don't receive
233diff --git a/src/drivers/net/tlan.c b/src/drivers/net/tlan.c
234index 0e85b35b6..7127c7373 100644
235--- a/src/drivers/net/tlan.c
236+++ b/src/drivers/net/tlan.c
237@@ -717,7 +717,7 @@ static void tlan_transmit(struct nic *nic, const char *d, /* Destination */
238 /**************************************************************************
239 DISABLE - Turn off ethernet interface
240 ***************************************************************************/
241-static void tlan_disable ( struct nic *nic __unused ) {
242+static void tlan_disable ( struct nic *nic __unused, void *hwdev __unused ) {
243 /* put the card in its initial state */
244 /* This function serves 3 purposes.
245 * This disables DMA and interrupts so we don't receive
246diff --git a/src/drivers/net/tulip.c b/src/drivers/net/tulip.c
247index e4e6ffa87..55e9747b4 100644
248--- a/src/drivers/net/tulip.c
249+++ b/src/drivers/net/tulip.c
250@@ -494,7 +494,7 @@ static void tulip_reset(struct nic *nic);
251 static void tulip_transmit(struct nic *nic, const char *d, unsigned int t,
252 unsigned int s, const char *p);
253 static int tulip_poll(struct nic *nic, int retrieve);
254-static void tulip_disable(struct nic *nic);
255+static void tulip_disable(struct nic *nic, void *hwdev);
256 static void nway_start(struct nic *nic);
257 static void pnic_do_nway(struct nic *nic);
258 static void select_media(struct nic *nic, int startup);
259@@ -1128,7 +1128,7 @@ static int tulip_poll(struct nic *nic, int retrieve)
260 /*********************************************************************/
261 /* eth_disable - Disable the interface */
262 /*********************************************************************/
263-static void tulip_disable ( struct nic *nic ) {
264+static void tulip_disable ( struct nic *nic, void *hwdev __unused ) {
265
266 whereami("tulip_disable\n");
267
268diff --git a/src/drivers/net/w89c840.c b/src/drivers/net/w89c840.c
269index 72ccf3a28..0c222214e 100644
270--- a/src/drivers/net/w89c840.c
271+++ b/src/drivers/net/w89c840.c
272@@ -579,7 +579,7 @@ static void w89c840_transmit(
273 /**************************************************************************
274 w89c840_disable - Turn off ethernet interface
275 ***************************************************************************/
276-static void w89c840_disable ( struct nic *nic ) {
277+static void w89c840_disable ( struct nic *nic, void *hwdev __unused ) {
278
279 w89c840_reset(nic);
280
281diff --git a/src/include/nic.h b/src/include/nic.h
282index 8b06e88f4..8e928beb4 100644
283--- a/src/include/nic.h
284+++ b/src/include/nic.h
285@@ -217,8 +217,7 @@ static inline void * legacy_isa_get_drvdata ( void *hwdev ) {
286 } \
287 static inline void \
288 _name ## _disable ( struct nic *nic, void *hwdev ) { \
289- void ( * _unsafe_disable ) () = _disable; \
290- _unsafe_disable ( nic, hwdev ); \
291+ _disable ( nic, hwdev ); \
292 } \
293 static inline int \
294 _name ## _pci_legacy_probe ( struct pci_device *pci ) { \
diff --git a/recipes-extended/ipxe/ipxe_git.bb b/recipes-extended/ipxe/ipxe_git.bb
index 08ed519a..8625919d 100644
--- a/recipes-extended/ipxe/ipxe_git.bb
+++ b/recipes-extended/ipxe/ipxe_git.bb
@@ -19,6 +19,10 @@ SRC_URI = " \
19 file://ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch \ 19 file://ipxe-intel-Avoid-spurious-compiler-warning-on-GCC-10.patch \
20 file://ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch \ 20 file://ipxe-golan-Add-explicit-type-casts-for-nodnic_queue_pair_.patch \
21 file://build-be-explicit-about-fcommon-compiler-directive.patch \ 21 file://build-be-explicit-about-fcommon-compiler-directive.patch \
22 file://0001-build-Fix-typo-in-xenver.h-header-guard.patch;patchdir=.. \
23 file://0002-build-Fix-old-style-function-definition.patch;patchdir=.. \
24 file://0003-build-Prevent-the-use-of-reserved-words-in-C23.patch;patchdir=.. \
25 file://0004-build-Remove-unsafe-disable-function-wrapper-from-le.patch;patchdir=.. \
22 " 26 "
23 27
24FILES:${PN} = "/usr/share/firmware/*.rom" 28FILES:${PN} = "/usr/share/firmware/*.rom"
diff --git a/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch b/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch
new file mode 100644
index 00000000..f40d6897
--- /dev/null
+++ b/recipes-extended/irqbalance/irqbalance/0001-add-void-to-fix-strict-prototypes.patch
@@ -0,0 +1,298 @@
1From c25dfc295df789ceb1ed890ab7e5a9694503d829 Mon Sep 17 00:00:00 2001
2From: Rosen Penev <rosenp@gmail.com>
3Date: Sun, 31 Mar 2024 14:31:22 -0700
4Subject: [PATCH] add void to fix strict-prototypes
5
6This becomes a hard error with C23
7
8Signed-off-by: Rosen Penev <rosenp@gmail.com>
9Upstream-Status: Backport [https://github.com/Irqbalance/irqbalance/commit/b6a831d692ed7e12db7748db49b3b39516d151d2]
10---
11 irqbalance.c | 2 +-
12 irqbalance.h | 2 +-
13 procinterrupts.c | 2 +-
14 ui/helpers.c | 2 +-
15 ui/helpers.h | 2 +-
16 ui/irqbalance-ui.c | 4 ++--
17 ui/irqbalance-ui.h | 5 ++---
18 ui/ui.c | 24 ++++++++++++------------
19 ui/ui.h | 26 +++++++++++++-------------
20 9 files changed, 34 insertions(+), 35 deletions(-)
21
22diff --git a/irqbalance.c b/irqbalance.c
23index e8d9ba9..d7b4184 100644
24--- a/irqbalance.c
25+++ b/irqbalance.c
26@@ -554,7 +554,7 @@ out:
27 return TRUE;
28 }
29
30-int init_socket()
31+int init_socket(void)
32 {
33 struct sockaddr_un addr;
34 memset(&addr, 0, sizeof(struct sockaddr_un));
35diff --git a/irqbalance.h b/irqbalance.h
36index e7f6b94..96ee07a 100644
37--- a/irqbalance.h
38+++ b/irqbalance.h
39@@ -36,7 +36,7 @@ extern char *classes[];
40 extern void parse_cpu_tree(void);
41 extern void clear_work_stats(void);
42 extern void parse_proc_interrupts(void);
43-extern GList* collect_full_irq_list();
44+extern GList* collect_full_irq_list(void);
45 extern void parse_proc_stat(void);
46 extern void set_interrupt_count(int number, uint64_t count);
47 extern void set_msi_interrupt_numa(int number);
48diff --git a/procinterrupts.c b/procinterrupts.c
49index 9015177..938cfad 100644
50--- a/procinterrupts.c
51+++ b/procinterrupts.c
52@@ -204,7 +204,7 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq)
53 info->name = strdup(irq_fullname);
54 }
55
56-GList* collect_full_irq_list()
57+GList* collect_full_irq_list(void)
58 {
59 GList *tmp_list = NULL;
60 FILE *file;
61diff --git a/ui/helpers.c b/ui/helpers.c
62index 5d71275..14861cb 100644
63--- a/ui/helpers.c
64+++ b/ui/helpers.c
65@@ -163,7 +163,7 @@ void dump_node(cpu_node_t *node, void *data __attribute__((unused)))
66 }
67 }
68
69-void dump_tree()
70+void dump_tree(void)
71 {
72 for_each_node(tree, dump_node, NULL);
73 }
74diff --git a/ui/helpers.h b/ui/helpers.h
75index b8d9fcc..922914b 100644
76--- a/ui/helpers.h
77+++ b/ui/helpers.h
78@@ -25,7 +25,7 @@ void for_each_node(GList *list, void (*fp)(cpu_node_t *node, void *data), void *
79
80 void dump_irq(irq_t *irq, void *data __attribute__((unused)));
81 void dump_node(cpu_node_t *node, void *data __attribute__((unused)));
82-void dump_tree();
83+void dump_tree(void);
84
85
86 #endif /* HELPERS_H */
87diff --git a/ui/irqbalance-ui.c b/ui/irqbalance-ui.c
88index 3ad3553..132bb45 100644
89--- a/ui/irqbalance-ui.c
90+++ b/ui/irqbalance-ui.c
91@@ -23,7 +23,7 @@ GMainLoop *main_loop;
92 int is_tree = 1;
93 static int default_bufsz = 8192;
94
95-struct msghdr * create_credentials_msg()
96+struct msghdr * create_credentials_msg(void)
97 {
98 struct ucred *credentials = malloc(sizeof(struct ucred));
99 credentials->pid = getpid();
100@@ -46,7 +46,7 @@ struct msghdr * create_credentials_msg()
101 return msg;
102 }
103
104-int init_connection()
105+int init_connection(void)
106 {
107 struct sockaddr_un addr;
108 memset(&addr, 0, sizeof(struct sockaddr_un));
109diff --git a/ui/irqbalance-ui.h b/ui/irqbalance-ui.h
110index fba7e7c..e9f6114 100644
111--- a/ui/irqbalance-ui.h
112+++ b/ui/irqbalance-ui.h
113@@ -70,8 +70,8 @@ typedef struct setup {
114
115 /* Function prototypes */
116
117-struct msghdr * create_credentials_msg();
118-int init_connection();
119+struct msghdr * create_credentials_msg(void);
120+int init_connection(void);
121 void send_settings(char *data);
122 char * get_data(char *string);
123 void parse_setup(char *setup_data);
124@@ -81,7 +81,6 @@ void assign_cpu_lists(cpu_node_t *node, void *data);
125 void assign_cpu_mask(cpu_node_t *node, void *data);
126 void parse_into_tree(char *data);
127 gboolean rescan_tree(gpointer data);
128-int main();
129
130
131 #endif /* IRQBALANCE_UI_H */
132diff --git a/ui/ui.c b/ui/ui.c
133index 6ff3305..bc1d743 100644
134--- a/ui/ui.c
135+++ b/ui/ui.c
136@@ -17,7 +17,7 @@ char *IRQ_CLASS_TO_STR[] = {
137 "10-Gigabit Ethernet",
138 "Virt Event"};
139
140-void show_frame()
141+void show_frame(void)
142 {
143 int i;
144 attrset(COLOR_PAIR(4));
145@@ -33,7 +33,7 @@ void show_frame()
146 }
147 }
148
149-void show_footer()
150+void show_footer(void)
151 {
152 char footer[COLS];
153 snprintf(footer, COLS - 1,
154@@ -149,7 +149,7 @@ void print_cpu_line(cpu_ban_t *cpu, void *data)
155 (*line_offset)++;
156 }
157
158-void print_all_cpus()
159+void print_all_cpus(void)
160 {
161 if(all_cpus == NULL) {
162 for_each_node(tree, get_cpu, NULL);
163@@ -168,7 +168,7 @@ void add_banned_cpu(int *banned_cpu, void *data)
164 snprintf(data + strlen(data), 1024 - strlen(data), "%d, ", *banned_cpu);
165 }
166
167-void display_banned_cpus()
168+void display_banned_cpus(void)
169 {
170 char banned_cpus[1024] = "Banned CPU numbers: \0";
171 if(g_list_length(setup.banned_cpus) > 0) {
172@@ -221,7 +221,7 @@ void get_cpu(cpu_node_t *node, void *data __attribute__((unused)))
173 }
174 }
175
176-void handle_cpu_banning()
177+void handle_cpu_banning(void)
178 {
179 GList *tmp = g_list_copy_deep(all_cpus, copy_cpu_ban, NULL);
180 attrset(COLOR_PAIR(5));
181@@ -371,7 +371,7 @@ void print_irq_line(irq_t *irq, void *data)
182
183 }
184
185-void print_all_irqs()
186+void print_all_irqs(void)
187 {
188 int *line = malloc(sizeof(int));
189 *line = 4;
190@@ -418,13 +418,13 @@ void copy_irqs_from_nodes(cpu_node_t *node, void *data __attribute__((unused)))
191 }
192 }
193
194-void get_all_irqs()
195+void get_all_irqs(void)
196 {
197 all_irqs = g_list_copy_deep(setup.banned_irqs, copy_irq, NULL);
198 for_each_node(tree, copy_irqs_from_nodes, NULL);
199 }
200
201-void handle_irq_banning()
202+void handle_irq_banning(void)
203 {
204 GList *tmp = g_list_copy_deep(all_irqs, copy_irq, NULL);
205 attrset(COLOR_PAIR(5));
206@@ -520,7 +520,7 @@ void handle_irq_banning()
207 }
208 }
209
210-void init()
211+void init(void)
212 {
213 signal(SIGINT, close_window);
214 initscr();
215@@ -556,7 +556,7 @@ void close_window(int sig __attribute__((unused)))
216 exit(EXIT_SUCCESS);
217 }
218
219-void settings()
220+void settings(void)
221 {
222 clear();
223 char *setup_data = get_data(SETUP);
224@@ -620,7 +620,7 @@ void settings()
225 free(setup_data);
226 }
227
228-void setup_irqs()
229+void setup_irqs(void)
230 {
231 clear();
232 get_all_irqs();
233@@ -720,7 +720,7 @@ void display_tree_node(cpu_node_t *node, void *data)
234 }
235 }
236
237-void display_tree()
238+void display_tree(void)
239 {
240 clear();
241 char *setup_data = get_data(SETUP);
242diff --git a/ui/ui.h b/ui/ui.h
243index 0aa8280..bb017e9 100644
244--- a/ui/ui.h
245+++ b/ui/ui.h
246@@ -15,39 +15,39 @@ extern GList *tree;
247 extern setup_t setup;
248 extern int is_tree;
249
250-void show_frame();
251-void show_footer();
252+void show_frame(void);
253+void show_footer(void);
254
255 char * check_control_in_sleep_input(int max_len, int column_offest, int line_offset);
256 int get_valid_sleep_input(int column_offest);
257
258 void get_banned_cpu(int *cpu, void *data);
259 void print_cpu_line(cpu_ban_t *cpu, void *data);
260-void print_all_cpus();
261+void print_all_cpus(void);
262 void add_banned_cpu(int *banned_cpu, void *data);
263-void display_banned_cpus();
264+void display_banned_cpus(void);
265 int toggle_cpu(GList *cpu_list, int cpu_number);
266 void get_new_cpu_ban_values(cpu_ban_t *cpu, void *data);
267-void get_cpu();
268-void handle_cpu_banning();
269+void get_cpu(cpu_node_t *node, void *data);
270+void handle_cpu_banning(void);
271
272 void copy_assigned_obj(int *number, void *data);
273 void print_assigned_objects_string(irq_t *irq, int *line_offset);
274 void print_irq_line(irq_t *irq, void *data);
275-void print_all_irqs();
276+void print_all_irqs(void);
277 int toggle_irq(GList *irq_list, int position);
278 void get_new_irq_ban_values(irq_t *irq, void *data);
279 void copy_irqs_from_nodes(cpu_node_t *node, void *data);
280-void get_all_irqs();
281-void handle_irq_banning();
282+void get_all_irqs(void);
283+void handle_irq_banning(void);
284
285-void init();
286+void init(void);
287 void close_window(int sig);
288-void settings();
289-void setup_irqs();
290+void settings(void);
291+void setup_irqs(void);
292 void display_tree_node_irqs(irq_t *irq, void *data);
293 void display_tree_node(cpu_node_t *node, void *data);
294-void display_tree();
295+void display_tree(void);
296
297
298 #endif /* UI_H */
diff --git a/recipes-extended/irqbalance/irqbalance_git.bb b/recipes-extended/irqbalance/irqbalance_git.bb
index aa7f0de9..068cf12e 100644
--- a/recipes-extended/irqbalance/irqbalance_git.bb
+++ b/recipes-extended/irqbalance/irqbalance_git.bb
@@ -10,6 +10,7 @@ PV = "1.8.0+git"
10SRC_URI = "git://github.com/Irqbalance/irqbalance;branch=master;protocol=https \ 10SRC_URI = "git://github.com/Irqbalance/irqbalance;branch=master;protocol=https \
11 file://add-initscript.patch \ 11 file://add-initscript.patch \
12 file://irqbalance-Add-status-and-reload-commands.patch \ 12 file://irqbalance-Add-status-and-reload-commands.patch \
13 file://0001-add-void-to-fix-strict-prototypes.patch \
13 " 14 "
14 15
15S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
diff --git a/recipes-extended/kvmtool/kvmtool_git.bb b/recipes-extended/kvmtool/kvmtool_git.bb
index 141fb02d..6597873d 100644
--- a/recipes-extended/kvmtool/kvmtool_git.bb
+++ b/recipes-extended/kvmtool/kvmtool_git.bb
@@ -16,12 +16,12 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git;branch
16 file://0003-kvmtool-Werror-disabled.patch \ 16 file://0003-kvmtool-Werror-disabled.patch \
17 " 17 "
18 18
19SRCREV = "4d2c017f41533b0e51e00f689050c26190a15318" 19SRCREV = "e48563f5c4a48fe6a6bc2a98a9a7c84a10f043be"
20PV = "5.10.0+git" 20PV = "5.10.0+git"
21 21
22S = "${WORKDIR}/git" 22S = "${WORKDIR}/git"
23 23
24EXTRA_OEMAKE='V=1 EXTRA_CFLAGS="-I${STAGING_KERNEL_BUILDDIR}/include/generated -I${STAGING_KERNEL_BUILDDIR}/arch/${ARCH}/include/generated"' 24EXTRA_OEMAKE = 'V=1 EXTRA_CFLAGS="-I${STAGING_KERNEL_BUILDDIR}/include/generated -I${STAGING_KERNEL_BUILDDIR}/arch/${ARCH}/include/generated"'
25 25
26do_install() { 26do_install() {
27 install -d ${D}${bindir} 27 install -d ${D}${bindir}
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
index 6fb2b68c..20c9f69b 100644
--- a/recipes-extended/libvirt/libvirt-python.inc
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -18,14 +18,14 @@ FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
18# Currently the libvirt-python debug libraries contain buildpaths 18# Currently the libvirt-python debug libraries contain buildpaths
19INSANE_SKIP:${PN}-dbg += "buildpaths" 19INSANE_SKIP:${PN}-dbg += "buildpaths"
20 20
21SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" 21SRC_URI += "http://libvirt.org/sources/python/${BPN}-python-${LIBVIRT_VERSION}.tar.gz;name=libvirt_python;subdir=${BP}"
22 22
23SRC_URI[libvirt_python.sha256sum] = "a82588f0e7db53eda7b7dbcbc448b0ec43e00a8c77cac69644495299b410c20d" 23SRC_URI[libvirt_python.sha256sum] = "00efb9a781087668512d6a002eb9cd136e44ff8701ac6793cc13b6fdc6d9ef8f"
24 24
25export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" 25export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
26export LIBVIRT_CFLAGS = "-I${S}/include" 26export LIBVIRT_CFLAGS = "-I${S}/include"
27export LIBVIRT_LIBS = "-L${B}/src/.libs -lvirt -ldl" 27export LIBVIRT_LIBS = "-L${B}/src/.libs -lvirt -ldl"
28export LDFLAGS="-L${B}/src/.libs" 28export LDFLAGS = "-L${B}/src/.libs"
29 29
30LIBVIRT_INSTALL_ARGS = "--root=${D} \ 30LIBVIRT_INSTALL_ARGS = "--root=${D} \
31 --prefix=${prefix} \ 31 --prefix=${prefix} \
@@ -46,8 +46,9 @@ do_compile:append() {
46 # the syroot staged pkgconfig entries. So we clear the sysroot 46 # the syroot staged pkgconfig entries. So we clear the sysroot
47 # for just this portion. 47 # for just this portion.
48 export PKG_CONFIG_SYSROOT_DIR= 48 export PKG_CONFIG_SYSROOT_DIR=
49 cd ${WORKDIR}/${BPN}-python-${PV} && \ 49 cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \
50 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build 50 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build
51 cd -
51 fi 52 fi
52} 53}
53 54
@@ -57,8 +58,9 @@ do_install:append() {
57 # the syroot staged pkgconfig entries. So we clear the sysroot 58 # the syroot staged pkgconfig entries. So we clear the sysroot
58 # for just this portion. 59 # for just this portion.
59 export PKG_CONFIG_SYSROOT_DIR= 60 export PKG_CONFIG_SYSROOT_DIR=
60 cd ${WORKDIR}/${BPN}-python-${PV} && \ 61 cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \
61 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \ 62 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \
62 --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS} 63 --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
64 cd -
63 fi 65 fi
64} 66}
diff --git a/recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch b/recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch
new file mode 100644
index 00000000..04db24d0
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch
@@ -0,0 +1,31 @@
1From d06f0795cfd097c373c7b9824ce59f17c9194520 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Tue, 9 Jul 2024 21:23:47 +0000
4Subject: [PATCH] meson.build: clear abs_top_builddir to avoid QA warnings
5
6If we don't clear the absolute directories from the build,
7we'll get QA warnings on packaging.
8
9Upstream-Status: Inappropriate [oe specific]
10
11Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
12---
13 src/meson.build | 2 --
14 1 file changed, 2 deletions(-)
15
16diff --git a/src/meson.build b/src/meson.build
17index 8cce42c7ad..dc7a81c980 100644
18--- a/src/meson.build
19+++ b/src/meson.build
20@@ -3,8 +3,6 @@ src_inc_dir = include_directories('.')
21 src_dep = declare_dependency(
22 compile_args: [
23 '-DIN_LIBVIRT',
24- '-Dabs_top_builddir="@0@"'.format(meson.project_build_root()),
25- '-Dabs_top_srcdir="@0@"'.format(meson.project_source_root()),
26 ] + coverage_flags + win32_flags,
27 dependencies: [
28 glib_dep,
29--
302.39.2
31
diff --git a/recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch b/recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch
index d9bcef0b..c68e05b9 100644
--- a/recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch
+++ b/recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch
@@ -25,11 +25,11 @@ Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
25 meson.build | 10 +++++----- 25 meson.build | 10 +++++-----
26 1 file changed, 5 insertions(+), 5 deletions(-) 26 1 file changed, 5 insertions(+), 5 deletions(-)
27 27
28Index: libvirt-9.2.0/meson.build 28Index: git/meson.build
29=================================================================== 29===================================================================
30--- libvirt-9.2.0.orig/meson.build 30--- git.orig/meson.build
31+++ libvirt-9.2.0/meson.build 31+++ git/meson.build
32@@ -26,8 +26,8 @@ 32@@ -38,8 +38,8 @@
33 conf = configuration_data() 33 conf = configuration_data()
34 34
35 conf.set('_GNU_SOURCE', 1) 35 conf.set('_GNU_SOURCE', 1)
@@ -40,7 +40,7 @@ Index: libvirt-9.2.0/meson.build
40 conf.set_quoted('PACKAGE', meson.project_name()) 40 conf.set_quoted('PACKAGE', meson.project_name())
41 conf.set_quoted('PACKAGE_NAME', meson.project_name()) 41 conf.set_quoted('PACKAGE_NAME', meson.project_name())
42 conf.set_quoted('PACKAGE_VERSION', meson.project_version()) 42 conf.set_quoted('PACKAGE_VERSION', meson.project_version())
43@@ -1770,9 +1770,9 @@ 43@@ -1830,9 +1830,9 @@
44 use_storage = true 44 use_storage = true
45 45
46 conf.set('WITH_STORAGE_FS', 1) 46 conf.set('WITH_STORAGE_FS', 1)
@@ -50,6 +50,6 @@ Index: libvirt-9.2.0/meson.build
50+ conf.set_quoted('MOUNT', '/usr/bin/mount') 50+ conf.set_quoted('MOUNT', '/usr/bin/mount')
51+ conf.set_quoted('UMOUNT', '/usr/bin/umount') 51+ conf.set_quoted('UMOUNT', '/usr/bin/umount')
52+ conf.set_quoted('MKFS', '/usr/sbin/mkfs') 52+ conf.set_quoted('MKFS', '/usr/sbin/mkfs')
53 endif
54 endif
53 55
54 showmount_prog = find_program('showmount', required: false, dirs: libvirt_sbin_path)
55 showmount_path = ''
diff --git a/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch b/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch
new file mode 100644
index 00000000..7263666a
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch
@@ -0,0 +1,76 @@
1From c4636402c06ab5ae436176daf0ef17005346e27d Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 2 Sep 2024 22:15:51 -0700
4Subject: [PATCH] qemu_nbdkit.c: use %llu to print time_t
5
6Use %lu to print time_t will give use the following error:
7
8 error: format '%lu' expects argument of type 'long unsigned int',
9 but argument 10 has type 'time_t' {aka 'long long int'} [-Werror=format=]
10
11So use %llu to print time_t.
12
13Upstream-Status: Submitted [https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/FQSQMML6VWMHNWBYP67OLCUTJY5LJQST/]
14
15Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
16---
17 src/qemu/qemu_nbdkit.c | 24 ++++++++++++------------
18 1 file changed, 12 insertions(+), 12 deletions(-)
19
20diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c
21index f099f35e1e..fe660c78e5 100644
22--- a/src/qemu/qemu_nbdkit.c
23+++ b/src/qemu/qemu_nbdkit.c
24@@ -544,18 +544,18 @@ qemuNbdkitCapsFormatCache(qemuNbdkitCaps *nbdkitCaps)
25
26 virBufferEscapeString(&buf, "<path>%s</path>\n",
27 nbdkitCaps->path);
28- virBufferAsprintf(&buf, "<nbdkitctime>%lu</nbdkitctime>\n",
29- nbdkitCaps->ctime);
30+ virBufferAsprintf(&buf, "<nbdkitctime>%llu</nbdkitctime>\n",
31+ (long long)nbdkitCaps->ctime);
32 virBufferEscapeString(&buf, "<plugindir>%s</plugindir>\n",
33 nbdkitCaps->pluginDir);
34- virBufferAsprintf(&buf, "<plugindirmtime>%lu</plugindirmtime>\n",
35- nbdkitCaps->pluginDirMtime);
36+ virBufferAsprintf(&buf, "<plugindirmtime>%llu</plugindirmtime>\n",
37+ (long long)nbdkitCaps->pluginDirMtime);
38 virBufferEscapeString(&buf, "<filterdir>%s</filterdir>\n",
39 nbdkitCaps->filterDir);
40- virBufferAsprintf(&buf, "<filterdirmtime>%lu</filterdirmtime>\n",
41- nbdkitCaps->filterDirMtime);
42- virBufferAsprintf(&buf, "<selfctime>%lu</selfctime>\n",
43- nbdkitCaps->libvirtCtime);
44+ virBufferAsprintf(&buf, "<filterdirmtime>%llu</filterdirmtime>\n",
45+ (long long)nbdkitCaps->filterDirMtime);
46+ virBufferAsprintf(&buf, "<selfctime>%llu</selfctime>\n",
47+ (long long)nbdkitCaps->libvirtCtime);
48 virBufferAsprintf(&buf, "<selfvers>%u</selfvers>\n",
49 nbdkitCaps->libvirtVersion);
50
51@@ -593,10 +593,10 @@ virNbdkitCapsSaveFile(void *data,
52 return -1;
53 }
54
55- VIR_DEBUG("Saved caps '%s' for '%s' with (%lu, %lu)",
56+ VIR_DEBUG("Saved caps '%s' for '%s' with (%llu, %llu)",
57 filename, nbdkitCaps->path,
58- nbdkitCaps->ctime,
59- nbdkitCaps->libvirtCtime);
60+ (long long)nbdkitCaps->ctime,
61+ (long long)nbdkitCaps->libvirtCtime);
62
63 return 0;
64 }
65@@ -1054,7 +1054,7 @@ qemuNbdkitProcessBuildCommandCurl(qemuNbdkitProcess *proc,
66 }
67
68 if (proc->source->timeout > 0) {
69- g_autofree char *timeout = g_strdup_printf("%llu", proc->source->timeout);
70+ g_autofree char *timeout = g_strdup_printf("%llu", (long long)proc->source->timeout);
71 virCommandAddArgPair(cmd, "timeout", timeout);
72 }
73
74--
752.25.1
76
diff --git a/recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch b/recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch
new file mode 100644
index 00000000..4cbe4913
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch
@@ -0,0 +1,38 @@
1From 05ef0d41895a355601333b5caa413754272fce03 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Tue, 9 Jul 2024 23:06:39 +0000
4Subject: [PATCH] tests/meson: clear absolute directory paths
5
6Ensure that the abs_* directory definitions are cleared, so
7they'll be consistent with the top level definitions and so
8we won't hav QA warnings due to tmpdir references in the
9resulting binaries.
10
11Upstream-Status: Inappropriate [oe specific]
12
13Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
14---
15 tests/meson.build | 8 ++++----
16 1 file changed, 4 insertions(+), 4 deletions(-)
17
18diff --git a/tests/meson.build b/tests/meson.build
19index 2f1eda1f95..6fa8308385 100644
20--- a/tests/meson.build
21+++ b/tests/meson.build
22@@ -1,9 +1,9 @@
23 tests_dep = declare_dependency(
24 compile_args: [
25- '-Dabs_builddir="@0@"'.format(meson.current_build_dir()),
26- '-Dabs_top_builddir="@0@"'.format(meson.project_build_root()),
27- '-Dabs_srcdir="@0@"'.format(meson.current_source_dir()),
28- '-Dabs_top_srcdir="@0@"'.format(meson.project_source_root()),
29+ '-Dabs_builddir="@0@"'.format(' '),
30+ '-Dabs_top_builddir="@0@"'.format(' '),
31+ '-Dabs_srcdir="@0@"'.format(' '),
32+ '-Dabs_top_srcdir="@0@"'.format(' '),
33 ] + coverage_flags + cc_flags_relaxed_frame_limit,
34 dependencies: [
35 apparmor_dep,
36--
372.39.2
38
diff --git a/recipes-extended/libvirt/libvirt/libvirt-qemu.conf b/recipes-extended/libvirt/libvirt/libvirt-qemu.conf
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/libvirt-qemu.conf
diff --git a/recipes-extended/libvirt/libvirt_10.0.0.bb b/recipes-extended/libvirt/libvirt_git.bb
index 6b19b700..7ed708f5 100644
--- a/recipes-extended/libvirt/libvirt_10.0.0.bb
+++ b/recipes-extended/libvirt/libvirt_git.bb
@@ -24,23 +24,33 @@ RDEPENDS:libvirt-libvirtd:append:aarch64 = " dmidecode"
24#connman blocks the 53 port and libvirtd can't start its DNS service 24#connman blocks the 53 port and libvirtd can't start its DNS service
25RCONFLICTS:${PN}_libvirtd = "connman" 25RCONFLICTS:${PN}_libvirtd = "connman"
26 26
27SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.xz;name=libvirt \ 27SRCREV_libvirt = "9cd06737487c8ee311f71b7288c46a5cc70a700a"
28
29LIBVIRT_VERSION = "11.1.0"
30PV = "v${LIBVIRT_VERSION}+git"
31
32SRC_URI = "gitsm://github.com/libvirt/libvirt.git;name=libvirt;protocol=https;branch=master \
28 file://libvirtd.sh \ 33 file://libvirtd.sh \
29 file://libvirtd.conf \ 34 file://libvirtd.conf \
30 file://dnsmasq.conf \ 35 file://dnsmasq.conf \
31 file://hook_support.py \ 36 file://hook_support.py \
32 file://gnutls-helper.py \ 37 file://gnutls-helper.py;subdir=${BP} \
38 file://libvirt-qemu.conf \
33 file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \ 39 file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \
34 file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ 40 file://0001-messon.build-remove-build-path-information-to-avoid-.patch \
41 file://0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch \
42 file://0001-tests-meson-clear-absolute-directory-paths.patch \
43 file://0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch \
35 " 44 "
36 45
37SRC_URI[libvirt.sha256sum] = "8ba2e72ec8bdd2418554a1474c42c35704c30174b7611eaf9a16544b71bcf00a" 46S = "${WORKDIR}/git"
38 47
39inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative 48inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative
40USERADD_PACKAGES = "${PN}" 49USERADD_PACKAGES = "${PN}"
41GROUPADD_PARAM:${PN} = "-r qemu; -r kvm" 50GROUPADD_PARAM:${PN} = "-r qemu; -r kvm; -r libvirt; -r virtlogin"
42USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu" 51USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu"
43 52
53CFLAGS += "${@oe.utils.vartrue('DEBUG_BUILD', '-Wno-error=inline', '', d)}"
44 54
45EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" 55EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross"
46do_write_config:append() { 56do_write_config:append() {
@@ -78,6 +88,7 @@ FILES:${PN}-virsh = " \
78 ${bindir}/virsh \ 88 ${bindir}/virsh \
79 ${datadir}/bash-completion/completions/virsh \ 89 ${datadir}/bash-completion/completions/virsh \
80" 90"
91RDEPENDS:${PN}-virsh = "${PN}-libvirtd"
81 92
82FILES:${PN} += "${libdir}/libvirt/connection-driver \ 93FILES:${PN} += "${libdir}/libvirt/connection-driver \
83 ${datadir}/augeas \ 94 ${datadir}/augeas \
@@ -85,6 +96,7 @@ FILES:${PN} += "${libdir}/libvirt/connection-driver \
85 ${datadir}/bash-completion/completions/vsh \ 96 ${datadir}/bash-completion/completions/vsh \
86 ${datadir}/bash-completion/completions/virt-admin \ 97 ${datadir}/bash-completion/completions/virt-admin \
87 /usr/lib/firewalld/ \ 98 /usr/lib/firewalld/ \
99 ${nonarch_libdir}/sysusers.d/ \
88 " 100 "
89 101
90FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" 102FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug"
@@ -118,7 +130,7 @@ SYSTEMD_SERVICE:${PN}-libvirtd = " \
118#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" 130#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd"
119 131
120# full config 132# full config
121PACKAGECONFIG ??= "gnutls qemu yajl openvz vmware vbox esx lxc test remote \ 133PACKAGECONFIG ??= "gnutls qemu openvz vmware vbox esx lxc test remote \
122 libvirtd netcf udev python fuse firewalld libpcap \ 134 libvirtd netcf udev python fuse firewalld libpcap \
123 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ 135 ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \
124 ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \ 136 ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \
@@ -138,8 +150,7 @@ PACKAGECONFIG:remove:armeb = "numactl"
138# enable,disable,depends,rdepends 150# enable,disable,depends,rdepends
139# 151#
140PACKAGECONFIG[gnutls] = ",,,gnutls-bin" 152PACKAGECONFIG[gnutls] = ",,,gnutls-bin"
141PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu," 153PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu json-c,"
142PACKAGECONFIG[yajl] = "-Dyajl=enabled,-Dyajl=disabled,yajl,yajl"
143PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen," 154PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen,"
144PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,," 155PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,,"
145PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,," 156PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,,"
@@ -194,9 +205,11 @@ do_install:append() {
194 install -d ${D}/etc/init.d 205 install -d ${D}/etc/init.d
195 install -d ${D}/etc/libvirt 206 install -d ${D}/etc/libvirt
196 install -d ${D}/etc/dnsmasq.d 207 install -d ${D}/etc/dnsmasq.d
208 install -d ${D}${nonarch_libdir}/sysusers.d/
197 209
198 install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd 210 install -m 0755 ${UNPACKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd
199 install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf 211 install -m 0644 ${UNPACKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf
212 install -m 0644 ${UNPACKDIR}/libvirt-qemu.conf ${D}${nonarch_libdir}/sysusers.d/libvirt-qemu.conf
200 213
201 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then 214 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
202 # This will wind up in the libvirtd package, but will NOT be invoked by default. 215 # This will wind up in the libvirtd package, but will NOT be invoked by default.
@@ -236,15 +249,6 @@ do_install:append() {
236 echo "d root root 0755 /run/libvirt/qemu none" \ 249 echo "d root root 0755 /run/libvirt/qemu none" \
237 >> ${D}${sysconfdir}/default/volatiles/99_libvirt 250 >> ${D}${sysconfdir}/default/volatiles/99_libvirt
238 251
239 # Manually set permissions and ownership to match polkit recipe
240 if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then
241 install -d -m 0700 ${D}/${datadir}/polkit-1/rules.d
242 chown polkitd ${D}/${datadir}/polkit-1/rules.d
243 chgrp root ${D}/${datadir}/polkit-1/rules.d
244 else
245 rm -rf ${D}/${datadir}/polkit-1
246 fi
247
248 # disable seccomp_sandbox 252 # disable seccomp_sandbox
249 if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then 253 if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then
250 sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \ 254 sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \
@@ -255,12 +259,12 @@ do_install:append() {
255 mkdir -p ${D}/etc/libvirt/hooks 259 mkdir -p ${D}/etc/libvirt/hooks
256 for hook in "daemon" "lxc" "network" "qemu" 260 for hook in "daemon" "lxc" "network" "qemu"
257 do 261 do
258 install -m 0755 ${WORKDIR}/hook_support.py ${D}/etc/libvirt/hooks/${hook} 262 install -m 0755 ${UNPACKDIR}/hook_support.py ${D}/etc/libvirt/hooks/${hook}
259 done 263 done
260 264
261 # Force the main dnsmasq instance to bind only to specified interfaces and 265 # Force the main dnsmasq instance to bind only to specified interfaces and
262 # to not bind to virbr0. Libvirt will run its own instance on this interface. 266 # to not bind to virbr0. Libvirt will run its own instance on this interface.
263 install -m 644 ${WORKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon 267 install -m 644 ${UNPACKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon
264 268
265 # remove .la references to our working diretory 269 # remove .la references to our working diretory
266 for i in `find ${D}${libdir} -type f -name *.la`; do 270 for i in `find ${D}${libdir} -type f -name *.la`; do
@@ -286,21 +290,20 @@ do_install:append() {
286 290
287 if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then 291 if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then
288 # Generate sample keys and certificates. 292 # Generate sample keys and certificates.
289 cd ${WORKDIR} 293 ${UNPACKDIR}/${BP}/gnutls-helper.py -y
290 ${WORKDIR}/gnutls-helper.py -y
291 294
292 # Deploy all sample keys and certificates of CA, server and client 295 # Deploy all sample keys and certificates of CA, server and client
293 # to target so that libvirtd is able to boot successfully and local 296 # to target so that libvirtd is able to boot successfully and local
294 # connection via 127.0.0.1 is available out of box. 297 # connection via 127.0.0.1 is available out of box.
295 install -d ${D}/etc/pki/CA 298 install -d ${D}/etc/pki/CA
296 install -d ${D}/etc/pki/libvirt/private 299 install -d ${D}/etc/pki/libvirt/private
297 install -m 0755 ${WORKDIR}/gnutls-helper.py ${D}/${bindir} 300 install -m 0755 ${UNPACKDIR}/${BP}/gnutls-helper.py ${D}/${bindir}
298 install -m 0644 ${WORKDIR}/cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem 301 install -m 0644 cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem
299 install -m 0644 ${WORKDIR}/cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem 302 install -m 0644 cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem
300 install -m 0644 ${WORKDIR}/serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem 303 install -m 0644 serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem
301 install -m 0644 ${WORKDIR}/servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem 304 install -m 0644 servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem
302 install -m 0644 ${WORKDIR}/clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem 305 install -m 0644 clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem
303 install -m 0644 ${WORKDIR}/clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem 306 install -m 0644 clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem
304 307
305 # Force the connection to be tls. 308 # Force the connection to be tls.
306 sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf 309 sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf
diff --git a/recipes-extended/libvmi/libvmi_git.bb b/recipes-extended/libvmi/libvmi_git.bb
index c812cf17..cd2eba7f 100644
--- a/recipes-extended/libvmi/libvmi_git.bb
+++ b/recipes-extended/libvmi/libvmi_git.bb
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/libvmi/libvmi.git;branch=master;protocol=https \
12 file://0001-Build-vbd-only-when-xen-is-enabled.patch \ 12 file://0001-Build-vbd-only-when-xen-is-enabled.patch \
13" 13"
14 14
15SRCREV = "df8547ff075d4352db2eb802775b7fa7a92756db" 15SRCREV = "f02aeb751fd27bd4ae753dcd5904a4ef3232821e"
16 16
17S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
18 18
@@ -41,3 +41,20 @@ do_install:append () {
41 41
42# Construction of grammar.h is not parallel safe. 42# Construction of grammar.h is not parallel safe.
43PARALLEL_MAKE = "-j1" 43PARALLEL_MAKE = "-j1"
44
45# http://errors.yoctoproject.org/Errors/Details/853259/
46# tools/vmifs/vmifs.c:129:18: error: initialization of 'void (*)(void *)' from incompatible pointer type 'void (*)(void)' [-Wincompatible-pointer-types]
47# examples/process-list.c:120:64: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
48# examples/process-list.c:122:63: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
49# examples/process-list.c:124:62: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
50# examples/process-list.c:127:62: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
51# examples/process-list.c:129:62: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
52# examples/process-list.c:131:60: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
53# examples/process-list.c:135:65: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
54# examples/process-list.c:137:64: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
55# examples/process-list.c:141:60: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
56# examples/process-list.c:143:59: error: passing argument 3 of 'vmi_get_offset' from incompatible pointer type [-Wincompatible-pointer-types]
57# examples/dump-memory.c:185:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
58# examples/win-offsets.c:287:20: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]
59# examples/dmesg.c:146:80: error: passing argument 4 of 'vmi_get_struct_size_from_json' from incompatible pointer type [-Wincompatible-pointer-types]
60CFLAGS += "-Wno-error=incompatible-pointer-types"
diff --git a/recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch b/recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch
deleted file mode 100644
index 014ed1d8..00000000
--- a/recipes-extended/nagios/nagios-core/0001-fix-autoheader-error.patch
+++ /dev/null
@@ -1,63 +0,0 @@
1From 3c51d942f6da08045351ce61cc7f426fa0855489 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Fri, 31 Aug 2018 10:51:36 +0800
4Subject: [PATCH] fix autoheader error
5
6Upstream-Status: Pending
7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 configure.ac | 12 ++++++------
11 1 file changed, 6 insertions(+), 6 deletions(-)
12
13diff --git a/configure.ac b/configure.ac
14index 17e436d..16b3e71 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -388,7 +388,7 @@ AC_ARG_WITH(iobroker,
18 case $IOBROKER_METHOD in
19 epoll*)
20 if test "$GLIBC_NEWER_2_4" -eq 1 -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then
21- AC_DEFINE([IOBROKER_USES_EPOLL])
22+ AC_DEFINE([IOBROKER_USES_EPOLL], [1], [iobroker uses epoll])
23 else
24 echo "\"epoll\" is not available as an iobroker method."
25 echo "Please use one of the other options."
26@@ -397,7 +397,7 @@ epoll*)
27 ;;
28 poll*)
29 if test "x$ac_cv_header_sys_poll_h" = "xyes" -o "x$ac_cv_header_poll_h" = "xyes"; then
30- AC_DEFINE([IOBROKER_USES_POLL])
31+ AC_DEFINE([IOBROKER_USES_POLL], [1], [iobroker uses poll])
32 else
33 echo "\"poll\" is not available as an iobroker method."
34 echo "Please use one of the other options."
35@@ -406,7 +406,7 @@ poll*)
36 ;;
37 select*)
38 if test "x$ac_cv_header_sys_select_h" = "xyes"; then
39- AC_DEFINE([IOBROKER_USES_SELECT])
40+ AC_DEFINE([IOBROKER_USES_SELECT], [1], [iobroker uses select])
41 else
42 echo "\"select\" is not available as an iobroker method."
43 echo "Please use one of the other options."
44@@ -415,13 +415,13 @@ select*)
45 ;;
46 none*)
47 if test "$GLIBC_NEWER_2_4" -eq 1 -a "x$ac_cv_header_sys_epoll_h" = "xyes"; then
48- AC_DEFINE([IOBROKER_USES_EPOLL])
49+ AC_DEFINE([IOBROKER_USES_EPOLL], [1], [iobroker uses epoll])
50 IOBROKER_METHOD="epoll"
51 elif test "x$ac_cv_header_sys_poll_h" = "xyes" -o "x$ac_cv_header_poll_h" = "xyes"; then
52- AC_DEFINE([IOBROKER_USES_POLL])
53+ AC_DEFINE([IOBROKER_USES_POLL], [1], [iobroker uses poll])
54 IOBROKER_METHOD="poll"
55 elif test "x$ac_cv_header_sys_select_h" = "xyes"; then
56- AC_DEFINE([IOBROKER_USES_SELECT])
57+ AC_DEFINE([IOBROKER_USES_SELECT], [1], [iobroker uses select])
58 IOBROKER_METHOD="select"
59 else
60 echo "There are no available options for iobroker polling"
61--
622.7.4
63
diff --git a/recipes-extended/nagios/nagios-core_4.4.6.bb b/recipes-extended/nagios/nagios-core_git.bb
index 59b70895..5ffb4e17 100644
--- a/recipes-extended/nagios/nagios-core_4.4.6.bb
+++ b/recipes-extended/nagios/nagios-core_git.bb
@@ -10,9 +10,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=4c4203caac58013115c9ca4b85f296ae"
10 10
11SRCNAME = "nagios" 11SRCNAME = "nagios"
12 12
13SRC_URI = "http://prdownloads.sourceforge.net/sourceforge/${SRCNAME}/${SRCNAME}-${PV}.tar.gz \ 13SRCREV = "2706fa7a451afe48bd4dc240d72d23fdcec0d9ef"
14
15SRC_URI = "git://github.com/NagiosEnterprises/nagioscore.git;protocol=https;branch=master \
14 file://eventhandlers_nagioscmd_path.patch \ 16 file://eventhandlers_nagioscmd_path.patch \
15 file://0001-fix-autoheader-error.patch \
16 file://0001-fix-compile-error-of-missing-headers.patch \ 17 file://0001-fix-compile-error-of-missing-headers.patch \
17 file://0001-fix-segment-fault.patch \ 18 file://0001-fix-segment-fault.patch \
18 file://volatiles \ 19 file://volatiles \
@@ -20,14 +21,13 @@ SRC_URI = "http://prdownloads.sourceforge.net/sourceforge/${SRCNAME}/${SRCNAME}-
20 file://nagios-core-systemd-volatile.conf \ 21 file://nagios-core-systemd-volatile.conf \
21 " 22 "
22 23
23SRC_URI[md5sum] = "ba849e9487e13859381eb117127bfee2" 24PV = "4.5.9+git"
24SRC_URI[sha256sum] = "ab0d5a52caf01e6f4dcd84252c4eb5df5a24f90bb7f951f03875eef54f5ab0f4"
25 25
26S = "${WORKDIR}/${SRCNAME}-${PV}" 26S = "${WORKDIR}/git"
27 27
28inherit autotools-brokensep update-rc.d systemd update-alternatives 28inherit autotools-brokensep update-rc.d systemd update-alternatives pkgconfig
29 29
30DEPENDS = "gd unzip-native" 30DEPENDS = "gd unzip-native openssl"
31 31
32RDEPENDS:${PN} += "\ 32RDEPENDS:${PN} += "\
33 gd \ 33 gd \
@@ -41,6 +41,7 @@ RDEPENDS:${PN} += "\
41SKIP_RECIPE[nagios-core] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'webserver', '', 'Depends on apache2 from meta-webserver which is not included', d)}" 41SKIP_RECIPE[nagios-core] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'webserver', '', 'Depends on apache2 from meta-webserver which is not included', d)}"
42 42
43acpaths = "-I ${S}/autoconf-macros" 43acpaths = "-I ${S}/autoconf-macros"
44EXTRA_AUTORECONF += "-I ${S}/m4 -I ${S}/autoconf-macros"
44 45
45# Set default password for the hardcoded Nagios admin user "nagiosadmin". 46# Set default password for the hardcoded Nagios admin user "nagiosadmin".
46# If this variable is empty then will prompt user for password. 47# If this variable is empty then will prompt user for password.
@@ -52,7 +53,9 @@ EXTRA_OECONF += "--sbindir=${NAGIOS_CGIBIN_DIR} \
52 --with-command-group=nagcmd \ 53 --with-command-group=nagcmd \
53 --with-httpd-conf=${sysconfdir}/apache2/conf.d \ 54 --with-httpd-conf=${sysconfdir}/apache2/conf.d \
54 --with-lockfile=${localstatedir}/run/nagios/nagios.pid \ 55 --with-lockfile=${localstatedir}/run/nagios/nagios.pid \
55 --with-init-dir=${sysconfdir}/init.d \ 56 --with-initdir=${sysconfdir}/init.d \
57 --with-init-type=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'sysv', d)} \
58 --with-inetd-type=${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 'inetd', d)} \
56" 59"
57 60
58# Prevent nagios from stripping binaries, bitbake will take care of that 61# Prevent nagios from stripping binaries, bitbake will take care of that
@@ -106,14 +109,17 @@ do_install() {
106 109
107 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 110 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
108 install -d ${D}${systemd_unitdir}/system 111 install -d ${D}${systemd_unitdir}/system
109 install -m 644 ${WORKDIR}/nagios-core.service ${D}${systemd_unitdir}/system/ 112 install -m 644 ${UNPACKDIR}/nagios-core.service ${D}${systemd_unitdir}/system/
110 # use our own service file 113 # use our own service file
111 rm -f ${D}${systemd_unitdir}/system/nagios.service 114 nagios_default_service=$(find ${D} -name 'nagios.service')
115 if [ -n "$nagios_default_service" ]; then
116 rm -f $nagios_default_service
117 fi
112 install -d ${D}${sysconfdir}/tmpfiles.d 118 install -d ${D}${sysconfdir}/tmpfiles.d
113 install -m 755 ${WORKDIR}/nagios-core-systemd-volatile.conf ${D}${sysconfdir}/tmpfiles.d/nagios-core-volatile.conf 119 install -m 755 ${UNPACKDIR}/nagios-core-systemd-volatile.conf ${D}${sysconfdir}/tmpfiles.d/nagios-core-volatile.conf
114 else 120 else
115 install -d ${D}${sysconfdir}/default/volatiles 121 install -d ${D}${sysconfdir}/default/volatiles
116 install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/99_nagios 122 install -m 0644 ${UNPACKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/99_nagios
117 fi 123 fi
118} 124}
119 125
diff --git a/recipes-extended/nagios/nagios-nrpe_4.0.2.bb b/recipes-extended/nagios/nagios-nrpe_4.0.2.bb
index ac54469b..503ef547 100644
--- a/recipes-extended/nagios/nagios-nrpe_4.0.2.bb
+++ b/recipes-extended/nagios/nagios-nrpe_4.0.2.bb
@@ -73,11 +73,11 @@ do_install:append() {
73 -i ${D}${NAGIOS_CONF_DIR}/nrpe.cfg 73 -i ${D}${NAGIOS_CONF_DIR}/nrpe.cfg
74 74
75 install -d ${D}${NAGIOS_PLUGIN_CONF_DIR} 75 install -d ${D}${NAGIOS_PLUGIN_CONF_DIR}
76 install -m 664 ${WORKDIR}/check_nrpe.cfg ${D}${NAGIOS_PLUGIN_CONF_DIR} 76 install -m 664 ${UNPACKDIR}/check_nrpe.cfg ${D}${NAGIOS_PLUGIN_CONF_DIR}
77 77
78 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 78 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
79 install -d ${D}${systemd_unitdir}/system 79 install -d ${D}${systemd_unitdir}/system
80 install -m 644 ${WORKDIR}/nagios-nrpe.service ${D}${systemd_unitdir}/system/ 80 install -m 644 ${UNPACKDIR}/nagios-nrpe.service ${D}${systemd_unitdir}/system/
81 fi 81 fi
82} 82}
83 83
diff --git a/recipes-extended/nagios/nagios-nsca_2.9.2.bb b/recipes-extended/nagios/nagios-nsca_2.9.2.bb
index 2db51238..a400b68f 100644
--- a/recipes-extended/nagios/nagios-nsca_2.9.2.bb
+++ b/recipes-extended/nagios/nagios-nsca_2.9.2.bb
@@ -35,7 +35,7 @@ EXTRA_OECONF += "--with-nsca-user=${NAGIOS_USER} \
35" 35"
36 36
37do_configure() { 37do_configure() {
38 cp ${WORKDIR}/init-script.in ${S}/init-script.in 38 cp ${UNPACKDIR}/init-script.in ${S}/init-script.in
39 oe_runconf || die "make failed" 39 oe_runconf || die "make failed"
40} 40}
41 41
@@ -55,7 +55,7 @@ do_install() {
55 55
56 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then 56 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
57 install -d ${D}${systemd_unitdir}/system 57 install -d ${D}${systemd_unitdir}/system
58 install -m 644 ${WORKDIR}/nagios-nsca.service ${D}${systemd_unitdir}/system/ 58 install -m 644 ${UNPACKDIR}/nagios-nsca.service ${D}${systemd_unitdir}/system/
59 fi 59 fi
60} 60}
61 61
diff --git a/recipes-extended/nagios/nagios-plugins_2.2.1.bb b/recipes-extended/nagios/nagios-plugins_git.bb
index 471d4b42..82263def 100644
--- a/recipes-extended/nagios/nagios-plugins_2.2.1.bb
+++ b/recipes-extended/nagios/nagios-plugins_git.bb
@@ -8,15 +8,13 @@ LICENSE = "GPL-3.0-only"
8 8
9LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 9LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
10 10
11SRC_URI = "https://www.nagios-plugins.org/download/${BPN}-${PV}.tar.gz \ 11SRCREV = "7c74420158c3e228b3d66d4c781a6abc7a93075a"
12" 12SRC_URI = "git://github.com/nagios-plugins/nagios-plugins.git;protocol=https;branch=master"
13
14SRC_URI[md5sum] = "fb521d5c05897f165b0b1862c1e5cb27"
15SRC_URI[sha256sum] = "647c0ba4583d891c965fc29b77c4ccfeccc21f409fdf259cb8af52cb39c21e18"
16 13
17S = "${WORKDIR}/${BPN}-${PV}" 14PV = "2.4.12+git"
15S = "${WORKDIR}/git"
18 16
19inherit autotools gettext 17inherit autotools gettext pkgconfig autotools-brokensep
20 18
21SKIP_RECIPE[nagios-plugins] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'webserver', '', 'Depends on nagios-core which depends on apache2 from meta-webserver which is not included', d)}" 19SKIP_RECIPE[nagios-plugins] ?= "${@bb.utils.contains('BBFILE_COLLECTIONS', 'webserver', '', 'Depends on nagios-core which depends on apache2 from meta-webserver which is not included', d)}"
22 20
@@ -25,6 +23,12 @@ EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_HOST} \
25 --with-nagios-group=${NAGIOS_GROUP} \ 23 --with-nagios-group=${NAGIOS_GROUP} \
26 --without-apt-get-command \ 24 --without-apt-get-command \
27 --with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin \ 25 --with-trusted-path=/bin:/sbin:/usr/bin:/usr/sbin \
26 --with-sudo-command=${bindir}/sudo \
27 --with-ssh-command=${bindir}/ssh \
28 --with-ps-command=${bindir}/ps \
29 --with-ps-format='%*s %s %d %d %d %*s %*s %*s %*s %*s %*s %*s %*s %n%s' \
30 --with-ps-varlist='procstat,&procuid,&procpid,&procppid,&pos,procprog' \
31 --with-ps-cols=6 \
28 ac_cv_path_PERL=${bindir}/perl \ 32 ac_cv_path_PERL=${bindir}/perl \
29" 33"
30 34
@@ -55,8 +59,11 @@ PACKAGECONFIG[snmp] = "\
55 59
56PACKAGECONFIG ??= "ssl gnutls" 60PACKAGECONFIG ??= "ssl gnutls"
57 61
58do_configure() { 62do_configure:prepend() {
59 oe_runconf || die "make failed" 63 # rename these macros to have .m4 suffix so that autoreconf could recognize them
64 for macro in `ls ${S}/autoconf-macros/ax_nagios_get_*`; do
65 mv $macro $macro.m4
66 done
60} 67}
61 68
62do_install:append() { 69do_install:append() {
diff --git a/recipes-extended/oath/oath_2.6.2.bb b/recipes-extended/oath/oath_2.6.2.bb
index 84d42dff..3d962869 100644
--- a/recipes-extended/oath/oath_2.6.2.bb
+++ b/recipes-extended/oath/oath_2.6.2.bb
@@ -14,6 +14,10 @@ SRC_URI[sha256sum] = "b03446fa4b549af5ebe4d35d7aba51163442d255660558cd861ebce536
14 14
15inherit autotools pkgconfig 15inherit autotools pkgconfig
16 16
17# http://errors.yoctoproject.org/Errors/Details/848019/
18# uses AM_PATH_XML2 from oath-toolkit-2.6.2/m4/libxml2.m4:AC_DEFUN([AM_PATH_XML2],[...
19EXTRA_AUTORECONF += "-I ${S}/m4"
20
17# Specify any options you want to pass to the configure script using EXTRA_OECONF: 21# Specify any options you want to pass to the configure script using EXTRA_OECONF:
18EXTRA_OECONF = "" 22EXTRA_OECONF = ""
19DEPENDS = "gtk-doc-native" 23DEPENDS = "gtk-doc-native"
diff --git a/recipes-extended/rootlesskit/relocation.inc b/recipes-extended/rootlesskit/relocation.inc
new file mode 100644
index 00000000..6c64233d
--- /dev/null
+++ b/recipes-extended/rootlesskit/relocation.inc
@@ -0,0 +1,37 @@
1export sites = "gotest.tools/v3:gotest.tools/v3:force \
2 golang.org/x/sys:golang.org/x/sys:force \
3 golang.org/x/net:golang.org/x/net:force \
4 github.com/gofrs/flock:github.com/gofrs/flock:force \
5 github.com/google/uuid:github.com/google/uuid:force \
6 github.com/gorilla/mux:github.com/gorilla/mux:force \
7 github.com/moby/vpnkit:github.com/moby/vpnkit:force \
8 github.com/u-root/uio:github.com/u-root/uio:force \
9 github.com/songgao/water:github.com/songgao/water:force \
10 github.com/urfave/cli/v2:github.com/urfave/cli/v2:force \
11 github.com/google/go-cmp:github.com/google/go-cmp:force \
12 github.com/pierrec/lz4/v4:github.com/pierrec/lz4/v4:force \
13 github.com/xrash/smetrics:github.com/xrash/smetrics:force \
14 github.com/sirupsen/logrus:github.com/sirupsen/logrus:force \
15 github.com/insomniacslk/dhcp:github.com/insomniacslk/dhcp:force \
16 github.com/Masterminds/semver/v3:github.com/Masterminds/semver/v3:force \
17 github.com/cpuguy83/go-md2man/v2:github.com/cpuguy83/go-md2man/v2:force \
18 github.com/moby/sys/mountinfo:github.com/moby/sys/mountinfo/mountinfo:force \
19 github.com/russross/blackfriday/v2:github.com/russross/blackfriday/v2:force \
20 github.com/containernetworking/plugins:github.com/containernetworking/plugins:force"
21
22do_compile:prepend() {
23 cd ${S}/src/import
24 for s in $sites; do
25 site_dest=$(echo $s | cut -d: -f1)
26 site_source=$(echo $s | cut -d: -f2)
27 force_flag=$(echo $s | cut -d: -f3)
28 mkdir -p vendor.copy/$site_dest
29 if [ -n "$force_flag" ]; then
30 echo "[INFO] $site_dest: force copying .go files"
31 rm -rf vendor.copy/$site_dest
32 rsync -a --exclude='vendor/' --exclude='.git/' vendor.fetch/$site_source/ vendor.copy/$site_dest
33 else
34 [ -n "$(ls -A vendor.copy/$site_dest/*.go 2> /dev/null)" ] && { echo "[INFO] vendor.fetch/$site_source -> $site_dest: go copy skipped (files present)" ; true ; } || { echo "[INFO] $site_dest: copying .go files" ; rsync -a --exclude='vendor/' --exclude='.git/' vendor.fetch/$site_source/ vendor.copy/$site_dest ; }
35 fi
36 done
37}
diff --git a/recipes-extended/rootlesskit/rootlesskit/modules.txt b/recipes-extended/rootlesskit/rootlesskit/modules.txt
new file mode 100644
index 00000000..29954c7c
--- /dev/null
+++ b/recipes-extended/rootlesskit/rootlesskit/modules.txt
@@ -0,0 +1,83 @@
1# github.com/Masterminds/semver/v3 v3.3.1
2## explicit; go 1.21
3github.com/Masterminds/semver/v3
4# github.com/containernetworking/plugins v1.6.2
5## explicit; go 1.23
6github.com/containernetworking/plugins/pkg/ns
7# github.com/cpuguy83/go-md2man/v2 v2.0.5
8## explicit; go 1.11
9github.com/cpuguy83/go-md2man/v2/md2man
10# github.com/gofrs/flock v0.12.1
11## explicit; go 1.21.0
12github.com/gofrs/flock
13# github.com/google/go-cmp v0.6.0
14## explicit; go 1.13
15github.com/google/go-cmp/cmp
16github.com/google/go-cmp/cmp/internal/diff
17github.com/google/go-cmp/cmp/internal/flags
18github.com/google/go-cmp/cmp/internal/function
19github.com/google/go-cmp/cmp/internal/value
20# github.com/google/uuid v1.6.0
21## explicit
22github.com/google/uuid
23# github.com/gorilla/mux v1.8.1
24## explicit; go 1.20
25github.com/gorilla/mux
26# github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905
27## explicit; go 1.20
28github.com/insomniacslk/dhcp/dhcpv4
29github.com/insomniacslk/dhcp/dhcpv4/client4
30github.com/insomniacslk/dhcp/iana
31github.com/insomniacslk/dhcp/interfaces
32github.com/insomniacslk/dhcp/rfc1035label
33# github.com/moby/sys/mountinfo v0.7.2
34## explicit; go 1.17
35github.com/moby/sys/mountinfo
36# github.com/moby/vpnkit v0.5.0
37## explicit
38github.com/moby/vpnkit/go/pkg/vmnet
39# github.com/pierrec/lz4/v4 v4.1.21
40## explicit; go 1.14
41github.com/pierrec/lz4/v4
42github.com/pierrec/lz4/v4/internal/lz4block
43github.com/pierrec/lz4/v4/internal/lz4errors
44github.com/pierrec/lz4/v4/internal/lz4stream
45github.com/pierrec/lz4/v4/internal/xxh32
46# github.com/russross/blackfriday/v2 v2.1.0
47## explicit
48github.com/russross/blackfriday/v2
49# github.com/sirupsen/logrus v1.9.3
50## explicit; go 1.13
51github.com/sirupsen/logrus
52# github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8
53## explicit
54github.com/songgao/water
55# github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701
56## explicit; go 1.21
57github.com/u-root/uio/rand
58github.com/u-root/uio/uio
59# github.com/urfave/cli/v2 v2.27.6
60## explicit; go 1.18
61github.com/urfave/cli/v2
62# github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1
63## explicit; go 1.15
64github.com/xrash/smetrics
65# golang.org/x/net v0.36.0
66## explicit; go 1.23.0
67golang.org/x/net/bpf
68golang.org/x/net/internal/iana
69golang.org/x/net/internal/socket
70golang.org/x/net/ipv4
71# golang.org/x/sys v0.31.0
72## explicit; go 1.23.0
73golang.org/x/sys/unix
74golang.org/x/sys/windows
75golang.org/x/sys/windows/registry
76# gotest.tools/v3 v3.5.2
77## explicit; go 1.17
78gotest.tools/v3/assert
79gotest.tools/v3/assert/cmp
80gotest.tools/v3/internal/assert
81gotest.tools/v3/internal/difflib
82gotest.tools/v3/internal/format
83gotest.tools/v3/internal/source
diff --git a/recipes-extended/rootlesskit/rootlesskit_git.bb b/recipes-extended/rootlesskit/rootlesskit_git.bb
new file mode 100644
index 00000000..f8dd55af
--- /dev/null
+++ b/recipes-extended/rootlesskit/rootlesskit_git.bb
@@ -0,0 +1,81 @@
1HOMEPAGE = "https://github.com/rootless-containers/rootlesskit"
2SUMMARY = "RootlessKit: Linux-native fakeroot using user namespaces"
3DESCRIPTION = "RootlessKit is a Linux-native implementation of 'fake root' using user_namespaces(7). \
4The purpose of RootlessKit is to run Docker and Kubernetes as an unprivileged user (known as 'Rootless mode'),\
5so as to protect the real root on the host from potential container-breakout attacks. \
6"
7
8# generated with:
9# scripts/oe-go-mod-autogen.py --repo https://github.com/rootless-containers/rootlesskit --rev c784875ba4ba4c5aaa256f98675fd543b087c900
10
11DEPENDS = " \
12 go-md2man \
13 rsync-native \
14"
15# Specify the first two important SRCREVs as the format
16SRCREV_FORMAT = "rootless"
17SRCREV_rootless = "530859a92629689c0c17c96d9ab145f4d04b5b5a"
18
19SRC_URI = "git://github.com/rootless-containers/rootlesskit;name=rootless;branch=master;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX}"
20
21include src_uri.inc
22
23# patches and config
24SRC_URI += "file://modules.txt \
25 "
26
27LICENSE = "Apache-2.0"
28LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
29
30GO_IMPORT = "import"
31
32S = "${WORKDIR}/git"
33
34PV = "v2.3.4+git"
35
36ROOTLESS_PKG = "github.com/rootless-containers/rootlesskit"
37
38inherit go goarch
39inherit systemd pkgconfig
40
41do_configure[noexec] = "1"
42
43EXTRA_OEMAKE = " \
44 PREFIX=${prefix} BINDIR=${bindir} LIBEXECDIR=${libexecdir} \
45 ETCDIR=${sysconfdir} TMPFILESDIR=${nonarch_libdir}/tmpfiles.d \
46 SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \
47"
48
49PACKAGECONFIG ?= ""
50
51include relocation.inc
52
53do_compile() {
54
55 cd ${S}/src/import
56
57 export GOPATH="$GOPATH:${S}/src/import/.gopath"
58
59 # Pass the needed cflags/ldflags so that cgo
60 # can find the needed headers files and libraries
61 export GOARCH=${TARGET_GOARCH}
62 export CGO_ENABLED="1"
63 export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}"
64 export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}"
65
66 export GOFLAGS="-mod=vendor -trimpath ${PIEFLAG}"
67
68 # our copied .go files are to be used for the build
69 ln -sf vendor.copy vendor
70 # inform go that we know what we are doing
71 cp ${UNPACKDIR}/modules.txt vendor/
72
73 oe_runmake GO=${GO} BUILDTAGS="${BUILDTAGS}" all
74}
75
76do_install() {
77 install -d "${D}${BIN_PREFIX}${base_bindir}"
78 for b in rootlessctl rootlesskit rootlesskit-docker-proxy; do
79 install -m 755 "${S}/src/import/bin/$b" "${D}${BIN_PREFIX}${base_bindir}"
80 done
81}
diff --git a/recipes-extended/rootlesskit/src_uri.inc b/recipes-extended/rootlesskit/src_uri.inc
new file mode 100644
index 00000000..c7a8b693
--- /dev/null
+++ b/recipes-extended/rootlesskit/src_uri.inc
@@ -0,0 +1,100 @@
1# gotest.tools/v3 v3.5.2
2# [1] git ls-remote https://github.com/gotestyourself/gotest.tools 0b81523ff268a1f1b0baf4a5da67e42fbb86880b
3SRCREV_gotest.tools-v3 = "0b81523ff268a1f1b0baf4a5da67e42fbb86880b"
4SRC_URI += "git://github.com/gotestyourself/gotest.tools;name=gotest.tools-v3;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/gotest.tools/v3"
5
6# golang.org/x/sys v0.31.0
7# [1] git ls-remote https://github.com/golang/sys 74cfc93a99be6ca6f193856132e6799065b071af
8SRCREV_sys = "74cfc93a99be6ca6f193856132e6799065b071af"
9SRC_URI += "git://github.com/golang/sys;name=sys;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/golang.org/x/sys"
10
11# golang.org/x/net v0.36.0
12# [1] git ls-remote https://go.googlesource.com/net 85d1d54551b68719346cb9fec24b911da4e452a1
13SRCREV_net = "85d1d54551b68719346cb9fec24b911da4e452a1"
14SRC_URI += "git://go.googlesource.com/net;name=net;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/golang.org/x/net"
15
16# github.com/u-root/uio v0.0.0-20240224005618-d2acac8f3701
17# [1] git ls-remote https://github.com/u-root/uio d2acac8f37018c514adec45c51f58eace3795df4
18SRCREV_uio = "d2acac8f37018c514adec45c51f58eace3795df4"
19SRC_URI += "git://github.com/u-root/uio;name=uio;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/u-root/uio"
20
21# github.com/gofrs/flock v0.12.1
22# [1] git ls-remote https://github.com/gofrs/flock 9de625d921bf362f81e0760056fdff11c8542435
23SRCREV_flock = "9de625d921bf362f81e0760056fdff11c8542435"
24SRC_URI += "git://github.com/gofrs/flock;name=flock;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/gofrs/flock"
25
26# github.com/google/uuid v1.6.0
27# [1] git ls-remote https://github.com/google/uuid 0f11ee6918f41a04c201eceeadf612a377bc7fbc
28SRCREV_uuid = "0f11ee6918f41a04c201eceeadf612a377bc7fbc"
29SRC_URI += "git://github.com/google/uuid;name=uuid;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/google/uuid"
30
31# github.com/gorilla/mux v1.8.1
32# [1] git ls-remote https://github.com/gorilla/mux b4617d0b9670ad14039b2739167fd35a60f557c5
33SRCREV_mux = "b4617d0b9670ad14039b2739167fd35a60f557c5"
34SRC_URI += "git://github.com/gorilla/mux;name=mux;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/gorilla/mux"
35
36# github.com/moby/vpnkit v0.5.0
37# [1] git ls-remote https://github.com/moby/vpnkit 7f0eff0dd99b576c5474de53b4454a157c642834
38SRCREV_vpnkit = "7f0eff0dd99b576c5474de53b4454a157c642834"
39SRC_URI += "git://github.com/moby/vpnkit;name=vpnkit;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/moby/vpnkit"
40
41# github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8
42# [1] git ls-remote https://github.com/songgao/water 2b4b6d7c09d80835e5f13f6b040d69f00a158b24
43SRCREV_water = "2b4b6d7c09d80835e5f13f6b040d69f00a158b24"
44SRC_URI += "git://github.com/songgao/water;name=water;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/songgao/water"
45
46# github.com/urfave/cli/v2 v2.27.6
47# [1] git ls-remote https://github.com/urfave/cli 9d76d15e478af5e952fffc872597c47b69ec7ee7
48SRCREV_v2 = "9d76d15e478af5e952fffc872597c47b69ec7ee7"
49SRC_URI += "git://github.com/urfave/cli;name=v2;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/urfave/cli/v2"
50
51# github.com/google/go-cmp v0.6.0
52# [1] git ls-remote https://github.com/google/go-cmp c3ad8435e7bef96af35732bc0789e5a2278c6d5f
53SRCREV_go-cmp = "c3ad8435e7bef96af35732bc0789e5a2278c6d5f"
54SRC_URI += "git://github.com/google/go-cmp;name=go-cmp;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/google/go-cmp"
55
56# github.com/pierrec/lz4/v4 v4.1.21
57# [1] git ls-remote https://github.com/pierrec/lz4 294e7659e17723306ebf3a44cd7ad2c11f456c37
58SRCREV_v4 = "294e7659e17723306ebf3a44cd7ad2c11f456c37"
59SRC_URI += "git://github.com/pierrec/lz4;name=v4;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/pierrec/lz4/v4"
60
61# github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1
62# [1] git ls-remote https://github.com/xrash/smetrics 686a1a2994c11fac124829fadcb683a24ab8d25f
63SRCREV_smetrics = "686a1a2994c11fac124829fadcb683a24ab8d25f"
64SRC_URI += "git://github.com/xrash/smetrics;name=smetrics;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/xrash/smetrics"
65
66# github.com/sirupsen/logrus v1.9.3
67# [1] git ls-remote https://github.com/sirupsen/logrus d40e25cd45ed9c6b2b66e6b97573a0413e4c23bd
68SRCREV_logrus = "d40e25cd45ed9c6b2b66e6b97573a0413e4c23bd"
69SRC_URI += "git://github.com/sirupsen/logrus;name=logrus;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/sirupsen/logrus"
70
71# github.com/insomniacslk/dhcp v0.0.0-20250109001534-8abf58130905
72# [1] git ls-remote https://github.com/insomniacslk/dhcp 8abf58130905b866076c8002e77aac6cb2e26d0e
73SRCREV_dhcp = "8abf58130905b866076c8002e77aac6cb2e26d0e"
74SRC_URI += "git://github.com/insomniacslk/dhcp;name=dhcp;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/insomniacslk/dhcp"
75
76# github.com/moby/sys/mountinfo v0.7.2
77# [1] git ls-remote https://github.com/moby/sys cafbe42351600ca9b363e220722f66d96f6e71f4
78SRCREV_mountinfo = "cafbe42351600ca9b363e220722f66d96f6e71f4"
79SRC_URI += "git://github.com/moby/sys;name=mountinfo;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/moby/sys/mountinfo"
80
81# github.com/Masterminds/semver/v3 v3.3.1
82# [1] git ls-remote https://github.com/Masterminds/semver 1558ca3488226e3490894a145e831ad58a5ff958
83SRCREV_v3 = "1558ca3488226e3490894a145e831ad58a5ff958"
84SRC_URI += "git://github.com/Masterminds/semver;name=v3;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/Masterminds/semver/v3"
85
86# github.com/cpuguy83/go-md2man/v2 v2.0.5
87# [1] git ls-remote https://github.com/cpuguy83/go-md2man b14773d4db11046c50d0d1c05955839604aae991
88SRCREV_go-md2man-v2 = "b14773d4db11046c50d0d1c05955839604aae991"
89SRC_URI += "git://github.com/cpuguy83/go-md2man;name=go-md2man-v2;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/cpuguy83/go-md2man/v2"
90
91# github.com/russross/blackfriday/v2 v2.1.0
92# [1] git ls-remote https://github.com/russross/blackfriday 4c9bf9512682b995722660a4196c0013228e2049
93SRCREV_blackfriday-v2 = "4c9bf9512682b995722660a4196c0013228e2049"
94SRC_URI += "git://github.com/russross/blackfriday;name=blackfriday-v2;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/russross/blackfriday/v2"
95
96# github.com/containernetworking/plugins v1.6.2
97# [1] git ls-remote https://github.com/containernetworking/plugins 7f756b411efc3d3730c707e2cc1f2baf1a66e28c
98SRCREV_plugins = "7f756b411efc3d3730c707e2cc1f2baf1a66e28c"
99SRC_URI += "git://github.com/containernetworking/plugins;name=plugins;protocol=https;nobranch=1;destsuffix=${GO_SRCURI_DESTSUFFIX}/vendor.fetch/github.com/containernetworking/plugins"
100
diff --git a/recipes-extended/upx/upx_git.bb b/recipes-extended/upx/upx_git.bb
index 02e70ffe..dde1bf9f 100644
--- a/recipes-extended/upx/upx_git.bb
+++ b/recipes-extended/upx/upx_git.bb
@@ -2,12 +2,36 @@ SUMMARY = "Ultimate executable compressor."
2HOMEPAGE = "https://upx.github.io/" 2HOMEPAGE = "https://upx.github.io/"
3LICENSE = "GPL-2.0-only" 3LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=353753597aa110e0ded3508408c6374a" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=353753597aa110e0ded3508408c6374a"
5SRCREV_upx = "099c3d829e80488af7395a4242b318877e980da4"
6PV = "4.2.2+git${SRCPV}"
7 5
8# Note: DO NOT use released tarball in favor of the git repository with submodules. 6# Note: DO NOT use released tarball in favor of the git repository with submodules.
9# it makes maintenance easier for CVEs or other issues. 7# it makes maintenance easier for CVEs or other issues.
10SRC_URI = "gitsm://github.com/upx/upx;protocol=https;;name=upx;branch=devel" 8
9SRCREV_upx = "44e4bd0b5454ff8aee1ff3376974dfe6014300d9"
10PV = "4.2.4+git${SRCPV}"
11
12# SRCREVs are from:
13# git submodule status | awk '{ commit_hash = $1; sub(/vendor\//, "", $2); gsub("-", "_", $2); printf "SRCREV_vendor_%s = \"%s\"\n", $2, commit_hash }'
14#
15# with two substitions for invalid SRCREVs (hence why the gitsm fetcher
16# has issues)
17SRCREV_vendor_doctest = "835aaee34666173532e98437b057f37b385076c9"
18SRCREV_vendor_lzma_sdk = "f9637f9f563d17b6ecf33ae2212dcd44866bfb25"
19SRCREV_vendor_ucl = "a60611d342b0b7d2924c495ebaa1910e4c3c3fe6"
20SRCREV_vendor_valgrind = "b054e44ea1b6d630853ed74d33e0934ef4642efc"
21SRCREV_vendor_zlib = "0a41a7d0a974d0b43afe4afe4b8025c8f144474e"
22
23# This is broken for commits newer than 4.2.4 with invalid SRCREVs being reported
24# by the git submodules. We switch back to individual fetches while this is
25# investigated.
26# SRC_URI = "gitsm://github.com/upx/upx;protocol=https;;name=upx;branch=devel"
27SRCREV_FORMAT = "upx"
28SRC_URI = "git://github.com/upx/upx;name=upx;branch=devel;protocol=https \
29 git://github.com/upx/upx-vendor-doctest;name=vendor_doctest;subdir=git/vendor/doctest;branch=upx-vendor;protocol=https \
30 git://github.com/upx/upx-vendor-lzma-sdk;name=vendor_lzma_sdk;subdir=git/vendor/lzma-sdk;branch=upx-vendor;protocol=https \
31 git://github.com/upx/upx-vendor-ucl;name=vendor_ucl;subdir=git/vendor/ucl;branch=upx-vendor;protocol=https \
32 git://github.com/upx/upx-vendor-zlib;name=vendor_zlib;subdir=git/vendor/zlib;branch=upx-vendor;protocol=https \
33 git://github.com/upx/upx-vendor-valgrind;name=vendor_valgrind;subdir=git/vendor/valgrind;branch=upx-vendor;protocol=https \
34 "
11 35
12S = "${WORKDIR}/git" 36S = "${WORKDIR}/git"
13 37
diff --git a/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb b/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb
index c2f3464c..c2e8be93 100644
--- a/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb
+++ b/recipes-extended/uxen/uxen-guest-tools_4.1.8.bb
@@ -19,7 +19,7 @@ SRC_URI[uxen.sha384sum] = "be2233bc6506a23350d76c03ac28ea7ea381e1dc6ed5ce996e8ac
19SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c" 19SRC_URI[license.sha384sum] = "92e48c614df3094cb52321d4c4e01f6df5526d46aee5c6fa36c43ee23d4c33f03baa1fc5f6f29efafff636b6d13bc92c"
20 20
21# The software license is GPLv2: please see page 199 of the pdf document 21# The software license is GPLv2: please see page 199 of the pdf document
22LIC_FILES_CHKSUM = "file://${WORKDIR}/Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049" 22LIC_FILES_CHKSUM = "file://${UNPACKDIR}/Bromium-4.1.8-Open-Source-Software.pdf;md5=cf120df6ffa417b36f870a9997650049"
23 23
24S = "${WORKDIR}/uxen-${PV}-72a4af9/vm-support/linux" 24S = "${WORKDIR}/uxen-${PV}-72a4af9/vm-support/linux"
25 25
diff --git a/recipes-extended/virt-manager/virt-manager/0001-build-drop-man-directory.patch b/recipes-extended/virt-manager/virt-manager/0001-build-drop-man-directory.patch
new file mode 100644
index 00000000..043428b9
--- /dev/null
+++ b/recipes-extended/virt-manager/virt-manager/0001-build-drop-man-directory.patch
@@ -0,0 +1,31 @@
1From f86dfffa8d443ec640b1c76d2eeccd6a4913305d Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Fri, 17 Jan 2025 15:32:51 +0000
4Subject: [PATCH] build: drop man directory
5
6The man pages require rst2man, which isn't available (or at least
7not trivial to provide), so we drop the man directory to avoid
8building the pages.
9
10Upstream-Status: Inappropriate [oe specific]
11
12Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
13---
14 meson.build | 1 -
15 1 file changed, 1 deletion(-)
16
17diff --git a/meson.build b/meson.build
18index 8862ada8f..22a14d53f 100644
19--- a/meson.build
20+++ b/meson.build
21@@ -15,7 +15,6 @@ pkgdir = datadir / 'virt-manager'
22 git = run_command('test', '-e', '.git', check: false).returncode() == 0
23
24 subdir('scripts')
25-subdir('man')
26 subdir('data')
27 subdir('ui')
28 subdir('virtinst')
29--
302.39.2
31
diff --git a/recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch b/recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
deleted file mode 100644
index f0bbf73b..00000000
--- a/recipes-extended/virt-manager/virt-manager/0001-setup.py-move-global-args-to-install-args.patch
+++ /dev/null
@@ -1,78 +0,0 @@
1From bcdb3555b924573e85039b54d63d6173ad99b846 Mon Sep 17 00:00:00 2001
2From: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
3Date: Wed, 28 Feb 2024 10:24:00 +0100
4Subject: [PATCH] setup.py: move global args to install args
5
6Presently, during the installation process, global arguments such as
7`no-update-icon-cache` and `no-compile-schemas` are utilized to
8prevent the installation of specific graphical components. These
9arguments are essential, for instance, when installing virt-manager
10without any GUI dependencies on the target system. However, these
11global arguments must be set before the install command, yet they only
12take effect during the execution of the command.
13
14Since the Yocto `setuptools3_legacy` class parses arguments after the
15command, this commit aims to make these arguments applicable locally to
16the install command.
17
18Upstream-Status: Inappropriate [oe specific]
19
20Signed-off-by: Paul Le Guen de Kerneizon <paul.leguendekerneizon@savoirfairelinux.com>
21---
22 setup.py | 20 ++++++++++++--------
23 1 file changed, 12 insertions(+), 8 deletions(-)
24
25diff --git a/setup.py b/setup.py
26index cd6cd83e..faca546a 100755
27--- a/setup.py
28+++ b/setup.py
29@@ -242,6 +242,16 @@ class my_egg_info(setuptools.command.install_egg_info.install_egg_info):
30
31
32 class my_install(setuptools.command.install.install):
33+ setuptools.command.install.install.user_options += [
34+ ("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
35+ ("no-compile-schemas", None, "Don't compile gsettings schemas"),
36+ ]
37+
38+ def initialize_options(self):
39+ setuptools.command.install.install.initialize_options(self)
40+ self.no_update_icon_cache = None
41+ self.no_compile_schemas = None
42+
43 """
44 Error if we weren't 'configure'd with the correct install prefix
45 """
46@@ -266,12 +276,12 @@ class my_install(setuptools.command.install.install):
47 def run(self):
48 setuptools.command.install.install.run(self)
49
50- if not self.distribution.no_update_icon_cache:
51+ if not self.no_update_icon_cache:
52 print("running gtk-update-icon-cache")
53 icon_path = os.path.join(self.install_data, "share/icons/hicolor")
54 self.spawn(["gtk-update-icon-cache", "-q", "-t", icon_path])
55
56- if not self.distribution.no_compile_schemas:
57+ if not self.no_compile_schemas:
58 print("compiling gsettings schemas")
59 gschema_install = os.path.join(self.install_data,
60 "share/glib-2.0/schemas")
61@@ -421,14 +431,8 @@ class CheckPylint(setuptools.Command):
62
63
64 class VMMDistribution(setuptools.dist.Distribution):
65- global_options = setuptools.dist.Distribution.global_options + [
66- ("no-update-icon-cache", None, "Don't run gtk-update-icon-cache"),
67- ("no-compile-schemas", None, "Don't compile gsettings schemas"),
68- ]
69
70 def __init__(self, *args, **kwargs):
71- self.no_update_icon_cache = False
72- self.no_compile_schemas = False
73 setuptools.dist.Distribution.__init__(self, *args, **kwargs)
74
75
76--
772.34.1
78
diff --git a/recipes-extended/virt-manager/virt-manager_4.1.0.bb b/recipes-extended/virt-manager/virt-manager_git.bb
index a2395012..4af8977c 100644
--- a/recipes-extended/virt-manager/virt-manager_4.1.0.bb
+++ b/recipes-extended/virt-manager/virt-manager_git.bb
@@ -2,21 +2,25 @@ DESCRIPTION = "virt-manager is a graphical tool for managing virtual machines vi
2HOMEPAGE = "https://virt-manager.org/" 2HOMEPAGE = "https://virt-manager.org/"
3LICENSE = "GPL-2.0-only" 3LICENSE = "GPL-2.0-only"
4LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 4LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
5DEPENDS += "python3-docutils-native" 5DEPENDS += "python3-docutils-native python3-pylint"
6SRCREV = "6710ca6969b7d9c4e8344acd0fe3d50b24adc8ec" 6SRCREV = "4f9618289f279f86994a5d2f1aada8a6524f5a6f"
7 7
8SRC_URI = " \ 8SRC_URI = " \
9 git://github.com/virt-manager/virt-manager;branch=main;protocol=https \ 9 git://github.com/virt-manager/virt-manager;branch=main;protocol=https \
10 file://0001-setup.py-move-global-args-to-install-args.patch \ 10 file://0001-build-drop-man-directory.patch \
11" 11"
12 12
13PV = "v5.0.0+git"
14
13S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
14 16
15PACKAGECONFIG ??= "gui" 17PACKAGECONFIG ??= "gui"
16PACKAGECONFIG[gui] = ",--no-update-icon-cache --no-compile-schemas,python3-pygobject" 18PACKAGECONFIG[gui] = ",-Dupdate-icon-cache=false -Dcompile-schemas=false,python3-pygobject"
17 19
18inherit ${@bb.utils.contains('PACKAGECONFIG', 'gui', 'gtk-icon-cache', '', d)} 20inherit ${@bb.utils.contains('PACKAGECONFIG', 'gui', 'gtk-icon-cache', '', d)}
19inherit bash-completion gettext pkgconfig setuptools3_legacy 21inherit bash-completion gettext pkgconfig meson
22
23EXTRA_OEMESON += "-Dtests=disabled"
20 24
21PACKAGES += " \ 25PACKAGES += " \
22 ${PN}-common \ 26 ${PN}-common \
@@ -28,8 +32,23 @@ RDEPENDS:${PN}-common += " \
28 libosinfo \ 32 libosinfo \
29" 33"
30 34
31RDEPENDS:${PN} = "${PN}-common" 35RDEPENDS:${PN} = " \
32RDEPENDS:${PN}-install = "${PN}-common" 36 ${PN}-common \
37 libvirt-glib \
38 libxml2-python \
39 gdk-pixbuf \
40 gtk+3 \
41 hicolor-icon-theme \
42 python3-pygobject \
43 python3-requests \
44"
45RDEPENDS:${PN}-install = " \
46 ${PN}-common \
47 libvirt-virsh \
48 libxml2-python \
49 python3-pygobject \
50 python3-requests \
51"
33 52
34SETUPTOOLS_INSTALL_ARGS += "${PACKAGECONFIG_CONFARGS}" 53SETUPTOOLS_INSTALL_ARGS += "${PACKAGECONFIG_CONFARGS}"
35 54
diff --git a/recipes-extended/virt-viewer/virt-viewer_11.0.bb b/recipes-extended/virt-viewer/virt-viewer_git.bb
index 273e1fc5..322d92ff 100644
--- a/recipes-extended/virt-viewer/virt-viewer_11.0.bb
+++ b/recipes-extended/virt-viewer/virt-viewer_git.bb
@@ -12,7 +12,7 @@ DEPENDS = " \
12 12
13SRC_URI = "git://gitlab.com/virt-viewer/virt-viewer.git;protocol=https;branch=master" 13SRC_URI = "git://gitlab.com/virt-viewer/virt-viewer.git;protocol=https;branch=master"
14 14
15SRCREV = "de864c14146c120b46d435949b1d8d0b11e57b85" 15SRCREV = "107f60c168c405cf1782b686a65bf4af16ec8c9d"
16PV = "11.0+git" 16PV = "11.0+git"
17S = "${WORKDIR}/git" 17S = "${WORKDIR}/git"
18 18
diff --git a/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch b/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch
new file mode 100644
index 00000000..637d6fe5
--- /dev/null
+++ b/recipes-extended/xen/files/0001-arm-silence-gcc14-warning-error-on-irq-bounds-check.patch
@@ -0,0 +1,65 @@
1From 2258853a19b2d0b1fafd901cddf69f730c38d450 Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Fri, 31 May 2024 14:50:33 +0000
4Subject: [PATCH] arm: silence gcc14 warning (error) on irq bounds check
5
6While we wait for upstream to update to gcc14, we add a quick
7check to avoid gcc14 not being able to confirm that IRQ is
8greater than 0 and hence throws a warning, which leads to an
9error.
10
11| In function '__irq_to_desc',
12| inlined from 'route_irq_to_guest' at arch/arm/irq.c:467:12:
13| arch/arm/irq.c:65:16: error: array subscript -2 is below array bounds of 'irq_desc_t[32]' {aka 'struct irq_desc[32]'} [-Werror=array-bounds=]
14| 65 | return &this_cpu(local_irq_desc)[irq];
15| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
17Upstream-Status: Pending [the xen folks understand the code and the right fix .. I don't]
18
19Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
20---
21 xen/arch/arm/irq.c | 19 ++++++++++++-------
22 1 file changed, 12 insertions(+), 7 deletions(-)
23
24Index: git/xen/arch/arm/irq.c
25===================================================================
26--- git.orig/xen/arch/arm/irq.c
27+++ git/xen/arch/arm/irq.c
28@@ -48,8 +48,13 @@ void irq_end_none(struct irq_desc *irq)
29 static irq_desc_t irq_desc[NR_IRQS];
30 static DEFINE_PER_CPU(irq_desc_t[NR_LOCAL_IRQS], local_irq_desc);
31
32+
33 struct irq_desc *__irq_to_desc(int irq)
34 {
35+ /* silence gcc14 warning */
36+ if ( irq < 0 )
37+ return &this_cpu(local_irq_desc)[0];
38+
39 if ( irq < NR_LOCAL_IRQS )
40 return &this_cpu(local_irq_desc)[irq];
41
42@@ -722,16 +727,16 @@ int platform_get_irq(const struct dt_dev
43
44 int platform_get_irq_byname(const struct dt_device_node *np, const char *name)
45 {
46- int index;
47+ int index;
48
49- if ( unlikely(!name) )
50- return -EINVAL;
51+ if ( unlikely(!name) )
52+ return -EINVAL;
53
54- index = dt_property_match_string(np, "interrupt-names", name);
55- if ( index < 0 )
56- return index;
57+ index = dt_property_match_string(np, "interrupt-names", name);
58+ if ( index < 0 )
59+ return index;
60
61- return platform_get_irq(np, index);
62+ return platform_get_irq(np, index);
63 }
64
65 /*
diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
deleted file mode 100644
index 476f5ddc..00000000
--- a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch
+++ /dev/null
@@ -1,73 +0,0 @@
1From 6db88791d923167f160afbcadeffad84a4cbdbc5 Mon Sep 17 00:00:00 2001
2Message-Id: <6db88791d923167f160afbcadeffad84a4cbdbc5.1612262706.git.bertrand.marquis@arm.com>
3From: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
4Date: Fri, 19 Oct 2018 11:01:37 +0200
5Subject: [PATCH] python,pygrub: pass DISTUTILS env vars as setup.py args
6
7Upstream-Status: Inappropriate [oe specific, python install issues]
8
9Allow to respect the target install dir (PYTHON_SITEPACKAGES_DIR)
10as well as other parameters set by the OpenEmbedded build system.
11This is especially useful when the target libdir is not the default one
12(/usr/lib), but for example /usr/lib64.
13
14Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
15
16Forward-ported to Xen 4.12.0
17Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
18
19Modified to support pygrub installation with python 3
20Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
21
22Forward-ported to Xen 4.14.0
23Signed-off-by: Christopher Clark <christopher.clark6@baesystems.com>
24
25Forward-ported to Xen 4.15.0
26Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
27
28---
29 tools/pygrub/Makefile | 7 +++++--
30 tools/python/Makefile | 2 +-
31 2 files changed, 6 insertions(+), 3 deletions(-)
32
33diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
34index 37b2146214..ffb9270065 100644
35--- a/tools/pygrub/Makefile
36+++ b/tools/pygrub/Makefile
37@@ -10,7 +10,7 @@ INSTALL_LOG = build/installed_files.txt
38 all: build
39 .PHONY: build
40 build:
41- CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build
42+ CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py build $(DISTUTILS_BUILD_ARGS)
43
44 .PHONY: install
45 install: all
46@@ -18,7 +18,10 @@ install: all
47 CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" \
48 LDFLAGS="$(PY_LDFLAGS)" $(PYTHON) setup.py install \
49 --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
50- --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force
51+ --root="$(DESTDIR)" --install-scripts=$(LIBEXEC_BIN) --force \
52+ $(DISTUTILS_INSTALL_ARGS)
53+ rm -f $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
54+ $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
55 set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
56 "`readlink -f $(DESTDIR)/$(bindir)`" != \
57 "`readlink -f $(LIBEXEC_BIN)`" ]; then \
58diff --git a/tools/python/Makefile b/tools/python/Makefile
59index cc76423647..5cb11ae453 100644
60--- a/tools/python/Makefile
61+++ b/tools/python/Makefile
62@@ -12,7 +12,7 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA
63 SHLIB_libxenctrl="$(SHLIB_libxenctrl)" \
64 SHLIB_libxenguest="$(SHLIB_libxenguest)" \
65 SHLIB_libxenstore="$(SHLIB_libxenstore)" \
66- $(PYTHON) setup.py
67+ $(PYTHON) setup.py $(DISTUTILS_BUILD_ARGS)
68
69 .PHONY: build
70 build:
71--
722.17.1
73
diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch
index 7ac1a399..bfd1acb4 100644
--- a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch
+++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch
@@ -1,10 +1,10 @@
1Upstream-Status: Pending 1Upstream-Status: Pending
2 2
3diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile 3Index: git/tools/pygrub/Makefile
4index 4963bc89c6..c1c05eb421 100644 4===================================================================
5--- a/tools/pygrub/Makefile 5--- git.orig/tools/pygrub/Makefile
6+++ b/tools/pygrub/Makefile 6+++ git/tools/pygrub/Makefile
7@@ -13,14 +13,14 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA 7@@ -13,14 +13,14 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAG
8 all: build 8 all: build
9 .PHONY: build 9 .PHONY: build
10 build: 10 build:
@@ -19,13 +19,13 @@ index 4963bc89c6..c1c05eb421 100644
19- --root="$(DESTDIR)" --force 19- --root="$(DESTDIR)" --force
20+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS) 20+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS)
21 $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub 21 $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
22 set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ 22
23 "`readlink -f $(DESTDIR)/$(bindir)`" != \ 23 .PHONY: uninstall
24diff --git a/tools/python/Makefile b/tools/python/Makefile 24Index: git/tools/python/Makefile
25index 437431c48e..0a99c2067e 100644 25===================================================================
26--- a/tools/python/Makefile 26--- git.orig/tools/python/Makefile
27+++ b/tools/python/Makefile 27+++ git/tools/python/Makefile
28@@ -16,13 +16,13 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLA 28@@ -16,13 +16,13 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAG
29 29
30 .PHONY: build 30 .PHONY: build
31 build: 31 build:
diff --git a/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.20.patch b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.20.patch
new file mode 100644
index 00000000..bfd1acb4
--- /dev/null
+++ b/recipes-extended/xen/files/0001-python-pygrub-pass-DISTUTILS-xen-4.20.patch
@@ -0,0 +1,43 @@
1Upstream-Status: Pending
2
3Index: git/tools/pygrub/Makefile
4===================================================================
5--- git.orig/tools/pygrub/Makefile
6+++ git/tools/pygrub/Makefile
7@@ -13,14 +13,14 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAG
8 all: build
9 .PHONY: build
10 build:
11- $(setup.py) build
12+ $(setup.py) build $(DISTUTILS_BUILD_ARGS)
13
14 .PHONY: install
15 install: all
16 $(INSTALL_DIR) $(DESTDIR)/$(bindir)
17 $(INSTALL_DIR) $(DESTDIR)/$(LIBEXEC_BIN)
18 $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
19- --root="$(DESTDIR)" --force
20+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS)
21 $(INSTALL_PYTHON_PROG) src/pygrub $(DESTDIR)/$(LIBEXEC_BIN)/pygrub
22
23 .PHONY: uninstall
24Index: git/tools/python/Makefile
25===================================================================
26--- git.orig/tools/python/Makefile
27+++ git/tools/python/Makefile
28@@ -16,13 +16,13 @@ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAG
29
30 .PHONY: build
31 build:
32- $(setup.py) build
33+ $(setup.py) build $(DISTUTILS_BUILD_ARGS)
34
35 .PHONY: install
36 install:
37 $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
38 $(setup.py) install --record $(INSTALL_LOG) $(PYTHON_PREFIX_ARG) \
39- --root="$(DESTDIR)" --force
40+ --root="$(DESTDIR)" --force $(DISTUTILS_INSTALL_ARGS)
41 $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN)
42 $(INSTALL_PYTHON_PROG) scripts/verify-stream-v2 $(DESTDIR)$(LIBEXEC_BIN)
43
diff --git a/recipes-extended/xen/files/0001-xen-fix-header-guard-inconsistencies-gcc15.patch b/recipes-extended/xen/files/0001-xen-fix-header-guard-inconsistencies-gcc15.patch
new file mode 100644
index 00000000..4b2c0bdf
--- /dev/null
+++ b/recipes-extended/xen/files/0001-xen-fix-header-guard-inconsistencies-gcc15.patch
@@ -0,0 +1,54 @@
1From 70f96461462a5a0437398022aa71a2033c8c5c3a Mon Sep 17 00:00:00 2001
2From: Bruce Ashfield <bruce.ashfield@gmail.com>
3Date: Thu, 15 May 2025 14:26:47 -0400
4Subject: [PATCH] xen: fix header guard inconsistencies (gcc15)
5
6Fixing the following header inconsistencies
7
8 | In file included from arch/arm/platforms/midway.c:22:
9 | ./arch/arm/include/asm/platforms/midway.h:1: error: header guard '__ASM_ARM_PLATFORMS_MIDWAY_H' followed by '#define' of a different macro [-Werror=header-guard]
10 | 1 | #ifndef __ASM_ARM_PLATFORMS_MIDWAY_H
11 | ./arch/arm/include/asm/platforms/midway.h:2: note: '__ASM_ASM_PLATFORMS_MIDWAY_H' is defined here; did you mean '__ASM_ARM_PLATFORMS_MIDWAY_H'?
12 | 2 | #define __ASM_ASM_PLATFORMS_MIDWAY_H
13 | In file included from arch/arm/platforms/omap5.c:21:
14 | ./arch/arm/include/asm/platforms/omap5.h:1: error: header guard '__ASM_ARM_PLATFORMS_OMAP5_H' followed by '#define' of a different macro [-Werror=header-guard]
15 | 1 | #ifndef __ASM_ARM_PLATFORMS_OMAP5_H
16 | ./arch/arm/include/asm/platforms/omap5.h:2: note: '__ASM_ASM_PLATFORMS_OMAP5_H' is defined here; did you mean '__ASM_ARM_PLATFORMS_OMAP5_H'?
17
18It is unclear whether this is on purpose or not, but for our limited
19set of permuations, we change them to match and no issues have been
20found.
21
22Upstream-Status: Pending [the xen folks understand the code and the right fix .. I don't]
23
24Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
25---
26 xen/arch/arm/include/asm/platforms/midway.h | 2 +-
27 xen/arch/arm/include/asm/platforms/omap5.h | 2 +-
28 2 files changed, 2 insertions(+), 2 deletions(-)
29
30diff --git a/xen/arch/arm/include/asm/platforms/midway.h b/xen/arch/arm/include/asm/platforms/midway.h
31index 099e4350f9..69143931c2 100644
32--- a/xen/arch/arm/include/asm/platforms/midway.h
33+++ b/xen/arch/arm/include/asm/platforms/midway.h
34@@ -1,5 +1,5 @@
35 #ifndef __ASM_ARM_PLATFORMS_MIDWAY_H
36-#define __ASM_ASM_PLATFORMS_MIDWAY_H
37+#define __ASM_ARM_PLATFORMS_MIDWAY_H
38
39 /* addresses of SREG registers for resetting the SoC */
40 #define MW_SREG_PWR_REQ 0xfff3cf00
41diff --git a/xen/arch/arm/include/asm/platforms/omap5.h b/xen/arch/arm/include/asm/platforms/omap5.h
42index c559c84b61..8867b4589a 100644
43--- a/xen/arch/arm/include/asm/platforms/omap5.h
44+++ b/xen/arch/arm/include/asm/platforms/omap5.h
45@@ -1,5 +1,5 @@
46 #ifndef __ASM_ARM_PLATFORMS_OMAP5_H
47-#define __ASM_ASM_PLATFORMS_OMAP5_H
48+#define __ASM_ARM_PLATFORMS_OMAP5_H
49
50 #define REALTIME_COUNTER_BASE 0x48243200
51 #define INCREMENTER_NUMERATOR_OFFSET 0x10
52--
532.39.2
54
diff --git a/recipes-extended/xen/files/10-ether.network b/recipes-extended/xen/files/10-ether.network
new file mode 100644
index 00000000..8d27ca92
--- /dev/null
+++ b/recipes-extended/xen/files/10-ether.network
@@ -0,0 +1,5 @@
1[Match]
2Type=ether
3
4[Network]
5Bridge=xenbr0
diff --git a/recipes-extended/xen/files/10-xenbr0.netdev b/recipes-extended/xen/files/10-xenbr0.netdev
new file mode 100644
index 00000000..ec45879f
--- /dev/null
+++ b/recipes-extended/xen/files/10-xenbr0.netdev
@@ -0,0 +1,3 @@
1[NetDev]
2Name=xenbr0
3Kind=bridge
diff --git a/recipes-extended/xen/files/10-xenbr0.network b/recipes-extended/xen/files/10-xenbr0.network
new file mode 100644
index 00000000..1e10c3eb
--- /dev/null
+++ b/recipes-extended/xen/files/10-xenbr0.network
@@ -0,0 +1,5 @@
1[Match]
2Name=xenbr0
3
4[Network]
5DHCP=yes
diff --git a/recipes-extended/xen/xen-hypervisor.inc b/recipes-extended/xen/xen-hypervisor.inc
index 6f3d24d0..347f98f7 100644
--- a/recipes-extended/xen/xen-hypervisor.inc
+++ b/recipes-extended/xen/xen-hypervisor.inc
@@ -114,4 +114,4 @@ KCONFIG_CONFIG_ROOTDIR = "${S}/xen"
114 114
115# Xen is setting all CC flags on its own. Make sure that they are not modified 115# Xen is setting all CC flags on its own. Make sure that they are not modified
116# for aarch64, e.g. with architecture-specific optimizations. 116# for aarch64, e.g. with architecture-specific optimizations.
117TUNE_CCARGS:aarch64="" 117TUNE_CCARGS:aarch64 = ""
diff --git a/recipes-extended/xen/xen-tools.inc b/recipes-extended/xen/xen-tools.inc
index 5f010a5d..a034bc4c 100644
--- a/recipes-extended/xen/xen-tools.inc
+++ b/recipes-extended/xen/xen-tools.inc
@@ -6,6 +6,20 @@ COMPATIBLE_HOST = 'i686-.*-linux|(x86_64.*).*-linux|aarch64.*-linux|arm-.*-linux
6inherit setuptools3 update-rc.d systemd deploy 6inherit setuptools3 update-rc.d systemd deploy
7require xen-blktap.inc 7require xen-blktap.inc
8 8
9SRC_URI += "file://10-ether.network \
10 file://10-xenbr0.netdev \
11 file://10-xenbr0.network"
12
13VIRT_NETWORKING_FILES = "${UNPACKDIR}/10-ether.network \
14 ${UNPACKDIR}/10-xenbr0.netdev \
15 ${UNPACKDIR}/10-xenbr0.network"
16inherit virt_networking
17
18QEMU_SYSTEM ?= "qemu-system-i386"
19# The qemu-firware package is only available if "vmsep" is in distro features
20QEMU_FIRMWARE ?= "${@bb.utils.contains('DISTRO_FEATURES', 'vmsep', 'qemu-firmware', '', d)}"
21QEMU_SYSTEM_RDEPENDS ?= "${QEMU_SYSTEM} ${QEMU_FIRMWARE}"
22
9RDEPENDS:${PN} = "\ 23RDEPENDS:${PN} = "\
10 bash perl xz \ 24 bash perl xz \
11 ${PN}-console \ 25 ${PN}-console \
@@ -26,6 +40,8 @@ RDEPENDS:${PN} = "\
26 ${PN}-xenstore \ 40 ${PN}-xenstore \
27 virtual-xenstored \ 41 virtual-xenstored \
28 ${PN}-xl \ 42 ${PN}-xl \
43 ${QEMU_SYSTEM_RDEPENDS} \
44 ${PN}-net-conf \
29 " 45 "
30 46
31RDEPENDS:${PN}-dev = "" 47RDEPENDS:${PN}-dev = ""
@@ -213,6 +229,7 @@ PACKAGES = " \
213 ${PN}-test \ 229 ${PN}-test \
214 ${PN}-xen-vmtrace \ 230 ${PN}-xen-vmtrace \
215 ${PN}-xen-mceinj \ 231 ${PN}-xen-mceinj \
232 ${PN}-xen-9pfsd \
216 " 233 "
217 234
218PROVIDES =+ " \ 235PROVIDES =+ " \
@@ -594,6 +611,12 @@ FILES:${PN}-xenstored = "\
594 ${localstatedir}/lib/xenstored \ 611 ${localstatedir}/lib/xenstored \
595 " 612 "
596 613
614FILES:${PN}-xen-9pfsd = "\
615 ${libdir}/xen/bin/xen-9pfsd \
616 "
617# 9pfsd is only on xen-4.19+
618ALLOW_EMPTY:${PN}-xen-9pfsd = "1"
619
597FILES:${PN}-xentrace = "\ 620FILES:${PN}-xentrace = "\
598 ${bindir}/xentrace \ 621 ${bindir}/xentrace \
599 ${bindir}/xentrace_setsize \ 622 ${bindir}/xentrace_setsize \
@@ -698,14 +721,14 @@ FILES:${PN}-test += "\
698# test-cpu-policy and test-tsx only exist in 4.16 for x86 721# test-cpu-policy and test-tsx only exist in 4.16 for x86
699ALLOW_EMPTY:${PN}-test = "1" 722ALLOW_EMPTY:${PN}-test = "1"
700 723
701FILES:${PN}-xen-mceinj +="\ 724FILES:${PN}-xen-mceinj += "\
702 ${sbindir}/xen-mceinj \ 725 ${sbindir}/xen-mceinj \
703 " 726 "
704 727
705# xen-mceinj is only built for x86 4.16, so allow empty package 728# xen-mceinj is only built for x86 4.16, so allow empty package
706ALLOW_EMPTY:${PN}-xen-mceinj = "1" 729ALLOW_EMPTY:${PN}-xen-mceinj = "1"
707 730
708FILES:${PN}-xen-vmtrace +="\ 731FILES:${PN}-xen-vmtrace += "\
709 ${sbindir}/xen-vmtrace \ 732 ${sbindir}/xen-vmtrace \
710 " 733 "
711 734
@@ -745,7 +768,7 @@ EXTRA_OECONF += " \
745 --with-systemd=${systemd_unitdir}/system \ 768 --with-systemd=${systemd_unitdir}/system \
746 --with-initddir=${INIT_D_DIR} \ 769 --with-initddir=${INIT_D_DIR} \
747 --with-sysconfig-leaf-dir=default \ 770 --with-sysconfig-leaf-dir=default \
748 --with-system-qemu=${bindir}/qemu-system-i386 \ 771 --with-system-qemu=${bindir}/${QEMU_SYSTEM} \
749 " 772 "
750 773
751do_configure() { 774do_configure() {
@@ -807,15 +830,15 @@ do_install() {
807 fi 830 fi
808 831
809 if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then 832 if [ -e ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service ]; then
810 sed -i 's#ExecStart=.*qemu-system-i386\(.*\)$#ExecStart=/usr/bin/qemu-system-i386\1#' \ 833 sed -i 's#ExecStart=.*${QEMU_SYSTEM}\(.*\)$#ExecStart=/usr/bin/${QEMU_SYSTEM}\1#' \
811 ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service 834 ${D}${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
812 fi 835 fi
813 836
814 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then 837 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
815 rm -f ${D}/${sysconfdir}/init.d/xencommons 838 rm -f ${D}/${sysconfdir}/init.d/xencommons
816 else 839 else
817 # fixup default path to qemu-system-i386 840 # fixup default path to ${QEMU_SYSTEM}
818 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/qemu-system-i386"#' ${D}/etc/init.d/xencommons 841 sed -i 's#\(test -z "$QEMU_XEN" && QEMU_XEN=\).*$#\1"/usr/bin/${QEMU_SYSTEM}"#' ${D}/etc/init.d/xencommons
819 842
820 # remove the uncondiontally installed systemd service files 843 # remove the uncondiontally installed systemd service files
821 rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service 844 rm -f ${D}/${systemd_unitdir}/system/xen-qemu-dom0-disk-backend.service
diff --git a/recipes-extended/xen/xen-tools_4.17.bb b/recipes-extended/xen/xen-tools_4.17.bb
deleted file mode 100644
index 72deed01..00000000
--- a/recipes-extended/xen/xen-tools_4.17.bb
+++ /dev/null
@@ -1,19 +0,0 @@
1# xen 4.17.2 release sha
2SRCREV ?= "0ebd2e49bcd0f566ba6b9158555942aab8e41332"
3
4XEN_REL ?= "4.17"
5XEN_BRANCH ?= "stable-${XEN_REL}"
6
7SRC_URI = "git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
8 file://0001-python-pygrub-pass-DISTUTILS-xen-4.15.patch \
9 file://0001-tools-xenstore-xenstored_control.c-correctly-print-t.patch \
10 "
11
12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
13
14PV = "${XEN_REL}+stable"
15
16S = "${WORKDIR}/git"
17
18require xen.inc
19require xen-tools.inc
diff --git a/recipes-extended/xen/xen-tools_4.18.bb b/recipes-extended/xen/xen-tools_4.19.bb
index 5dbe180a..3667e044 100644
--- a/recipes-extended/xen/xen-tools_4.18.bb
+++ b/recipes-extended/xen/xen-tools_4.19.bb
@@ -1,12 +1,12 @@
1# tag: RELEASE-4.18.0 1# tag: RELEASE-4.19.0
2SRCREV ?= "4da8ca9cb9cfdb92c9dd09d5270ae16a3b2dbc89" 2SRCREV ?= "8dd897e69119492989aaa034967f3a887f590197"
3 3
4XEN_REL ?= "4.18" 4XEN_REL ?= "4.19"
5XEN_BRANCH ?= "stable-4.18" 5XEN_BRANCH ?= "stable-4.19"
6 6
7SRC_URI = " \ 7SRC_URI = " \
8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ 8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
9 file://0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch \ 9 file://0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch \
10 " 10 "
11 11
12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" 12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
diff --git a/recipes-extended/xen/xen-tools_4.20.bb b/recipes-extended/xen/xen-tools_4.20.bb
new file mode 100644
index 00000000..0f864e63
--- /dev/null
+++ b/recipes-extended/xen/xen-tools_4.20.bb
@@ -0,0 +1,20 @@
1SRCREV ?= "3ad5d648cda5add395f49fc3704b2552aae734f7"
2
3XEN_REL ?= "4.20"
4XEN_BRANCH ?= "stable-4.20"
5
6SRC_URI = " \
7 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
8 file://0001-python-pygrub-pass-DISTUTILS-xen-4.19.patch \
9 "
10
11LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
12
13PV = "${XEN_REL}+stable"
14
15S = "${WORKDIR}/git"
16
17DEFAULT_PREFERENCE ??= "-1"
18
19require xen.inc
20require xen-tools.inc
diff --git a/recipes-extended/xen/xen-tools_git.bb b/recipes-extended/xen/xen-tools_git.bb
index 8397178e..47d1e236 100644
--- a/recipes-extended/xen/xen-tools_git.bb
+++ b/recipes-extended/xen/xen-tools_git.bb
@@ -1,12 +1,12 @@
1# master status on 2023-05-26 1# master status March 2025
2SRCREV ?= "03cf7ca23e0e876075954c558485b267b7d02406" 2SRCREV ?= "de0254b90922a8644bb2c4c1593786d45c80ea22"
3 3
4XEN_REL ?= "4.18" 4XEN_REL ?= "4.21-dev"
5XEN_BRANCH ?= "master" 5XEN_BRANCH ?= "master"
6 6
7SRC_URI = " \ 7SRC_URI = " \
8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ 8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
9 file://0001-python-pygrub-pass-DISTUTILS-xen-4.18.patch \ 9 file://0001-python-pygrub-pass-DISTUTILS-xen-4.20.patch \
10 " 10 "
11 11
12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" 12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
diff --git a/recipes-extended/xen/xen.inc b/recipes-extended/xen/xen.inc
index dcd281b5..f8c1e266 100644
--- a/recipes-extended/xen/xen.inc
+++ b/recipes-extended/xen/xen.inc
@@ -73,20 +73,20 @@ libexecdir = "${libdir}"
73export XEN_OS = "Linux" 73export XEN_OS = "Linux"
74 74
75# this is used for the header (#!${bindir}/python) of the install python scripts 75# this is used for the header (#!${bindir}/python) of the install python scripts
76export PYTHONPATH="${bindir}/env python3" 76export PYTHONPATH = "${bindir}/env python3"
77export ac_cv_path_PYTHONPATH="${bindir}/env python3" 77export ac_cv_path_PYTHONPATH = "${bindir}/env python3"
78export DISTUTILS_BUILD_ARGS 78export DISTUTILS_BUILD_ARGS
79export DISTUTILS_INSTALL_ARGS 79export DISTUTILS_INSTALL_ARGS
80 80
81# xen and seabios require HOSTCC and HOSTCXX set to cross-compile 81# xen and seabios require HOSTCC and HOSTCXX set to cross-compile
82export HOSTCC="${BUILD_CC}" 82export HOSTCC = "${BUILD_CC}"
83export HOSTCXX="${BUILD_CXX}" 83export HOSTCXX = "${BUILD_CXX}"
84 84
85# make xen requires CROSS_COMPILE set by hand as it does not abide by ./configure 85# make xen requires CROSS_COMPILE set by hand as it does not abide by ./configure
86export CROSS_COMPILE="${TARGET_PREFIX}" 86export CROSS_COMPILE = "${TARGET_PREFIX}"
87 87
88# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'" 88# overide LDFLAGS to allow xen to build without: "x86_64-oe-linux-ld: unrecognized option '-Wl,-O1'"
89export LDFLAGS="" 89export LDFLAGS = ""
90 90
91# No additional C flags for the main hypervisor build 91# No additional C flags for the main hypervisor build
92EXTRA_CFLAGS_XEN_CORE ?= "" 92EXTRA_CFLAGS_XEN_CORE ?= ""
@@ -99,7 +99,7 @@ DEBUG_PREFIX_MAP:append = " \
99# - The Xen tools build for x86 systems with HVM-mode enabled includes hvmloader 99# - The Xen tools build for x86 systems with HVM-mode enabled includes hvmloader
100# which fails to build when "-m64" is included in flags set via the 100# which fails to build when "-m64" is included in flags set via the
101# EXTRA_CFLAGS_XEN_TOOLS: so clear TUNE_CCARGS on x86 to prevent that. 101# EXTRA_CFLAGS_XEN_TOOLS: so clear TUNE_CCARGS on x86 to prevent that.
102TUNE_CCARGS:x86-64="" 102TUNE_CCARGS:x86-64 = ""
103 103
104# - Yocto supplies the _FORTIFY_SOURCE flag via CC/CPP/CXX but then passes the 104# - Yocto supplies the _FORTIFY_SOURCE flag via CC/CPP/CXX but then passes the
105# optimization -O via C*FLAGS which is problematic when the CFLAGS are cleared 105# optimization -O via C*FLAGS which is problematic when the CFLAGS are cleared
@@ -110,11 +110,11 @@ TUNE_CCARGS:x86-64=""
110# It must not be compiled with SSE compiler options enabled and the Xen build 110# It must not be compiled with SSE compiler options enabled and the Xen build
111# explicitly clears CFLAGS to ensure that, so such options must not be passed 111# explicitly clears CFLAGS to ensure that, so such options must not be passed
112# in via the tool variable. hvmloader is required to run HVM-mode guest VMs. 112# in via the tool variable. hvmloader is required to run HVM-mode guest VMs.
113CC="${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}" 113CC = "${CCACHE}${HOST_PREFIX}gcc ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}"
114EXTRA_CFLAGS_XEN_TOOLS="${HOST_CC_ARCH} ${CFLAGS}" 114EXTRA_CFLAGS_XEN_TOOLS = "${HOST_CC_ARCH} ${CFLAGS}"
115# 32-bit ARM needs the TUNE_CCARGS component of HOST_CC_ARCH to be passed 115# 32-bit ARM needs the TUNE_CCARGS component of HOST_CC_ARCH to be passed
116# in CC to ensure that configure can compile binaries for the right arch. 116# in CC to ensure that configure can compile binaries for the right arch.
117CC:arm="${CCACHE}${HOST_PREFIX}gcc ${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}" 117CC:arm = "${CCACHE}${HOST_PREFIX}gcc ${TUNE_CCARGS} ${TOOLCHAIN_OPTIONS} ${DEBUG_PREFIX_MAP} ${CC_REPRODUCIBLE_OPTIONS}"
118 118
119# There are no Xen-provided variables for C++, so append to the tool variables: 119# There are no Xen-provided variables for C++, so append to the tool variables:
120CPP:append = " ${CPPFLAGS}" 120CPP:append = " ${CPPFLAGS}"
@@ -151,7 +151,7 @@ def get_build_time_vars(d):
151 source_date_epoch = d.getVar('SOURCE_DATE_EPOCH') 151 source_date_epoch = d.getVar('SOURCE_DATE_EPOCH')
152 if source_date_epoch is not None: 152 if source_date_epoch is not None:
153 import datetime 153 import datetime
154 utc_datetime = datetime.datetime.utcfromtimestamp(float(source_date_epoch)) 154 utc_datetime = datetime.datetime.fromtimestamp(float(source_date_epoch), datetime.timezone.utc)
155 return " XEN_BUILD_DATE=" + utc_datetime.strftime("%Y-%m-%d") + \ 155 return " XEN_BUILD_DATE=" + utc_datetime.strftime("%Y-%m-%d") + \
156 " XEN_BUILD_TIME=" + utc_datetime.strftime("%H:%M:%S") 156 " XEN_BUILD_TIME=" + utc_datetime.strftime("%H:%M:%S")
157 return "" 157 return ""
diff --git a/recipes-extended/xen/xen_4.18.bb b/recipes-extended/xen/xen_4.19.bb
index 2ad7704e..3ee29ae1 100644
--- a/recipes-extended/xen/xen_4.18.bb
+++ b/recipes-extended/xen/xen_4.19.bb
@@ -1,8 +1,8 @@
1# tag: RELEASE-4.18.0 1# tag: RELEASE-4.19.0
2SRCREV ?= "4da8ca9cb9cfdb92c9dd09d5270ae16a3b2dbc89" 2SRCREV ?= "8dd897e69119492989aaa034967f3a887f590197"
3 3
4XEN_REL ?= "4.18" 4XEN_REL ?= "4.19.0"
5XEN_BRANCH ?= "stable-4.18" 5XEN_BRANCH ?= "stable-4.19"
6 6
7SRC_URI = " \ 7SRC_URI = " \
8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ 8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
diff --git a/recipes-extended/xen/xen_4.17.bb b/recipes-extended/xen/xen_4.20.bb
index d83fa97f..85c56296 100644
--- a/recipes-extended/xen/xen_4.17.bb
+++ b/recipes-extended/xen/xen_4.20.bb
@@ -1,12 +1,12 @@
1# xen 4.17.2 release sha 1SRCREV ?= "47d911f69eb976785fd17cae4e39de4d55b94b9e"
2SRCREV ?= "0ebd2e49bcd0f566ba6b9158555942aab8e41332"
3 2
4XEN_REL ?= "4.17" 3XEN_REL ?= "4.20.0"
5XEN_BRANCH ?= "stable-${XEN_REL}" 4XEN_BRANCH ?= "stable-4.20"
6 5
7SRC_URI = " \ 6SRC_URI = " \
8 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \ 7 git://xenbits.xen.org/xen.git;branch=${XEN_BRANCH} \
9 file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \ 8 file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-location.patch \
9 file://0001-xen-fix-header-guard-inconsistencies-gcc15.patch \
10 " 10 "
11 11
12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9" 12LIC_FILES_CHKSUM ?= "file://COPYING;md5=d1a1e216f80b6d8da95fec897d0dbec9"
@@ -15,8 +15,7 @@ PV = "${XEN_REL}+stable"
15 15
16S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
17 17
18DEFAULT_PREFERENCE ??= "-1"
19
18require xen.inc 20require xen.inc
19require xen-hypervisor.inc 21require xen-hypervisor.inc
20
21TOOLCHAIN = "gcc"
22LDFLAGS:remove = "-fuse-ld=lld"
diff --git a/recipes-extended/xen/xen_git.bb b/recipes-extended/xen/xen_git.bb
index 79078878..18b19be7 100644
--- a/recipes-extended/xen/xen_git.bb
+++ b/recipes-extended/xen/xen_git.bb
@@ -1,7 +1,6 @@
1# master status on 2023-11-24 1SRCREV ?= "de0254b90922a8644bb2c4c1593786d45c80ea22"
2SRCREV ?= "03cf7ca23e0e876075954c558485b267b7d02406"
3 2
4XEN_REL ?= "4.19" 3XEN_REL ?= "4.21-dev"
5XEN_BRANCH ?= "master" 4XEN_BRANCH ?= "master"
6 5
7SRC_URI = " \ 6SRC_URI = " \