Date   

[meta-oe][PATCH] crucible: Add recipe

Fabio Estevam
 

From: Fabio Estevam <festevam@...>

crucible is an utility that provides userspace support for
reading and writing to the i.MX fuses.

Signed-off-by: Fabio Estevam <festevam@...>
---
.../crucible/crucible_2022.05.25.bb | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 meta-oe/recipes-support/crucible/crucible_2022.05.25.bb

diff --git a/meta-oe/recipes-support/crucible/crucible_2022.05.25.bb b/meta-oe/recipes-support/crucible/crucible_2022.05.25.bb
new file mode 100644
index 000000000000..73856d5704b0
--- /dev/null
+++ b/meta-oe/recipes-support/crucible/crucible_2022.05.25.bb
@@ -0,0 +1,19 @@
+SUMMARY = "Utility that provides userspace support for reading and writing to the i.MX fuses"
+LICENSE = "GPL-3.0-only"
+LIC_FILES_CHKSUM = "file://src/${GO_IMPORT}/LICENSE;md5=a64ced9463b8c81d08335d41966e0592"
+
+GO_IMPORT = "github.com/usbarmory/crucible"
+SRC_URI = "git://${GO_IMPORT}.git;protocol=https;branch=master"
+
+GO_INSTALL = "\
+ ${GO_IMPORT}/cmd/crucible \
+ ${GO_IMPORT}/cmd/habtool \
+"
+SRCREV = "837bdb65a20de240f92ea57727385352e06b977e"
+
+# Workaround for network access issue during compile step.
+# This needs to be fixed in the recipes buildsystem so that
+# it can be accomplished during do_fetch task.
+do_compile[network] = "1"
+
+inherit go-mod
--
2.25.1


[meta-multimedia][PATCH 1/2] pipewire: upgrade 0.3.57 -> 0.3.59

Markus Volk
 

Signed-off-by: Markus Volk <f_l_k@...>
---
.../pipewire/{pipewire_0.3.57.bb =3D> pipewire_0.3.59.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-multimedia/recipes-multimedia/pipewire/{pipewire_0.3.57.bb =3D=
pipewire_0.3.59.bb} (99%)
diff --git a/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.57.=
bb b/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.59.bb
similarity index 99%
rename from meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.57.b=
b
rename to meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.59.bb
index 0ca8fd0dc..757c88c95 100644
--- a/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.57.bb
+++ b/meta-multimedia/recipes-multimedia/pipewire/pipewire_0.3.59.bb
@@ -13,7 +13,7 @@ LIC_FILES_CHKSUM =3D " \
=20
DEPENDS =3D "dbus ncurses"
=20
-SRCREV =3D "49f1c2038fb7b5249affa56709b117a2a8603b52"
+SRCREV =3D "f54a72fd9a67eeb8d1502d6d75979dbddb00fdf2"
SRC_URI =3D "git://gitlab.freedesktop.org/pipewire/pipewire.git;branch=3D=
master;protocol=3Dhttps"
=20
S =3D "${WORKDIR}/git"
--=20
2.34.1


[meta-multimedia][PATCH 2/2] wireplumber: upgrade 0.4.11 -> 0.4.12

Markus Volk
 

Signed-off-by: Markus Volk <f_l_k@...>
---
.../{wireplumber_0.4.11.bb =3D> wireplumber_0.4.12.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-multimedia/recipes-multimedia/wireplumber/{wireplumber_0.4.1=
1.bb =3D> wireplumber_0.4.12.bb} (99%)

diff --git a/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0=
.4.11.bb b/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.4=
.12.bb
similarity index 99%
rename from meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.=
4.11.bb
rename to meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.4.=
12.bb
index e093734ed..d80d9348a 100644
--- a/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.4.11.b=
b
+++ b/meta-multimedia/recipes-multimedia/wireplumber/wireplumber_0.4.12.b=
b
@@ -11,7 +11,7 @@ DEPENDS =3D "glib-2.0 glib-2.0-native lua pipewire \
${@bb.utils.contains("DISTRO_FEATURES", "gobject-introspection-data"=
, "python3-native python3-lxml-native doxygen-native", "", d)} \
"
=20
-SRCREV =3D "80b3559963f0ad40a7bfa6c23b0098275c0b5ebe"
+SRCREV =3D "6f6e5df9c1b223907efa8dcbfcd538821d0dabc4"
SRC_URI =3D "git://gitlab.freedesktop.org/pipewire/wireplumber.git;branc=
h=3Dmaster;protocol=3Dhttps \
file://90-OE-disable-session-dbus-dependent-features.lua \
"
--=20
2.34.1


[PATCH] onboard: remove

Andreas Müller
 

* it has not seen notable activity for 5 years
* it broke here 8 month ago: image folder is empty

Signed-off-by: Andreas Müller <schnitzeltony@...>
---
...ine-error-API-if-platform-does-not-h.patch | 67 -------------------
.../recipes-support/onboard/onboard_1.4.1.bb | 29 --------
2 files changed, 96 deletions(-)
delete mode 100644 meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
delete mode 100644 meta-gnome/recipes-support/onboard/onboard_1.4.1.bb

diff --git a/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch b/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
deleted file mode 100644
index fda37895c..000000000
--- a/meta-gnome/recipes-support/onboard/onboard/0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 1c95f64aa342147387ce4b1b7269a5c8b34bd898 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@...>
-Date: Thu, 13 Jul 2017 09:01:04 -0700
-Subject: [PATCH] pypredict/lm: Define error API if platform does not have it
-
-error() API is not implemented across all libcs on linux
-e.g. musl does not provide it.
-
-Signed-off-by: Khem Raj <raj.khem@...>
----
- Onboard/pypredict/lm/lm.cpp | 1 -
- Onboard/pypredict/lm/lm.h | 13 +++++++++++++
- Onboard/pypredict/lm/lm_dynamic.cpp | 2 --
- 3 files changed, 13 insertions(+), 3 deletions(-)
-
-diff --git a/Onboard/pypredict/lm/lm.cpp b/Onboard/pypredict/lm/lm.cpp
-index 2e64296..37ae241 100644
---- a/Onboard/pypredict/lm/lm.cpp
-+++ b/Onboard/pypredict/lm/lm.cpp
-@@ -19,7 +19,6 @@
-
- #include <stdlib.h>
- #include <stdio.h>
--#include <error.h>
- #include <algorithm>
- #include <cmath>
- #include <string>
-diff --git a/Onboard/pypredict/lm/lm.h b/Onboard/pypredict/lm/lm.h
-index ed4164a..b8b63ee 100644
---- a/Onboard/pypredict/lm/lm.h
-+++ b/Onboard/pypredict/lm/lm.h
-@@ -32,6 +32,19 @@
- #include <algorithm>
- #include <string>
-
-+#if defined(HAVE_ERROR_H)
-+#include <error.h>
-+#else
-+#include <err.h>
-+#define _onboard_error(S, E, F, ...) do { \
-+ if (E) \
-+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \
-+ else \
-+ err(S, F, ##__VA_ARGS__); \
-+} while(0)
-+
-+#define error _onboard_error
-+#endif
-
- // break into debugger
- // step twice to come back out of the raise() call into known code
-diff --git a/Onboard/pypredict/lm/lm_dynamic.cpp b/Onboard/pypredict/lm/lm_dynamic.cpp
-index 7c62824..e7c7f40 100644
---- a/Onboard/pypredict/lm/lm_dynamic.cpp
-+++ b/Onboard/pypredict/lm/lm_dynamic.cpp
-@@ -17,8 +17,6 @@
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
--#include <error.h>
--
- #include "lm_dynamic.h"
-
- using namespace std;
---
-2.13.2
-
diff --git a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
deleted file mode 100644
index 9325ef9c2..000000000
--- a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SUMMARY = "An onscreen keyboard"
-LICENSE = "GPL-3.0-only"
-LIC_FILES_CHKSUM = "file://COPYING.GPL3;md5=8521fa4dd51909b407c5150498d34f4e"
-
-DEPENDS += "gtk+3 hunspell libcanberra libxkbfile dconf python3-distutils-extra-native intltool-native"
-
-SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz \
- file://0001-pypredict-lm-Define-error-API-if-platform-does-not-h.patch \
- "
-SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
-SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"
-
-inherit features_check setuptools3-base pkgconfig gtk-icon-cache gsettings mime-xdg
-
-REQUIRED_DISTRO_FEATURES = "x11"
-
-FILES:${PN} += " \
- ${datadir}/dbus-1 \
- ${datadir}/icons \
- ${datadir}/gnome-shell \
- ${datadir}/help \
-"
-
-RDEPENDS:${PN} += " \
- ncurses \
- python3-dbus \
- python3-pycairo \
- python3-pygobject \
-"
--
2.35.3


[meta-oe][PATCH] v4l-utils: Support building without NLS

Peter Kjellerstedt
 

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@...>
---
...efile.am-Support-building-without-NL.patch | 45 +++++++++++++++++++
.../v4l2apps/v4l-utils_1.23.0.bb | 1 +
2 files changed, 46 insertions(+)
create mode 100644 meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-configure.ac-Makefile.am-Support-building-without-NL.patch

diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-configure.ac-Makefile.am-Support-building-without-NL.patch b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-configure.ac-Makefile.am-Support-building-without-NL.patch
new file mode 100644
index 000000000..0548e4fba
--- /dev/null
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils/0005-configure.ac-Makefile.am-Support-building-without-NL.patch
@@ -0,0 +1,45 @@
+From 4fe9f6071cd24bcab157a9398adcca474f619f8d Mon Sep 17 00:00:00 2001
+From: Peter Kjellerstedt <pkj@...>
+Date: Sat, 15 Oct 2022 02:45:26 +0200
+Subject: [PATCH] configure.ac, Makefile.am: Support building without NLS
+
+Avoid entering the v4l-utils-po and libdvbv5-po directories if NLS
+support is disabled, as the generated Makefiles in those directories are
+empty then.
+
+Upstream-Status: Submitted [https://patchwork.linuxtv.org/project/linux-media/patch/20221015010541.688322-1-pkj@axis.com/]
+Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@...>
+---
+ Makefile.am | 6 +++++-
+ configure.ac | 1 +
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index 7fb443ab..8e924af8 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -2,7 +2,11 @@ AUTOMAKE_OPTIONS = foreign
+ ACLOCAL_AMFLAGS = -I m4
+ AM_MAKEFLAGS = $(word 1, $(subst 1, -w, $(filter 1, $(V))) --no-print-directory)
+
+-SUBDIRS = v4l-utils-po libdvbv5-po lib
++SUBDIRS = lib
++
++if USE_NLS
++SUBDIRS += v4l-utils-po libdvbv5-po
++endif
+
+ if WITH_V4LUTILS
+ SUBDIRS += utils contrib
+diff --git a/configure.ac b/configure.ac
+index 05298981..7c78467f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -99,6 +99,7 @@ DX_INIT_DOXYGEN($PACKAGE_NAME, doxygen_libdvbv5.cfg)
+ ALL_LINGUAS=""
+ m4_ifdef(AM_GNU_GETTEXT_REQUIRE_VERSION,[AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8])],[AM_GNU_GETTEXT_VERSION([0.19.8])])
+ AM_GNU_GETTEXT([external])
++AM_CONDITIONAL([USE_NLS], [test "$USE_NLS" = "yes"])
+
+ LIBDVBV5_DOMAIN="libdvbv5"
+ AC_DEFINE([LIBDVBV5_DOMAIN], "libdvbv5", [libdvbv5 domain])
diff --git a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.23.0.bb b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.23.0.bb
index 2f5ae3586..5bc63058f 100644
--- a/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.23.0.bb
+++ b/meta-oe/recipes-multimedia/v4l2apps/v4l-utils_1.23.0.bb
@@ -27,6 +27,7 @@ SRC_URI = "\
file://0002-original-patch-mediactl-pkgconfig.patch \
file://0003-original-patch-export-mediactl-headers.patch \
file://0004-Do-not-use-getsubopt.patch \
+ file://0005-configure.ac-Makefile.am-Support-building-without-NL.patch \
"

SRCREV = "fd544473800d02e90bc289434cc44e5aa8fadd0f"


[meta-oe][PATCH] abseil-cpp: Upgrade to head on 2022-10-14

Khem Raj
 

From: Ulysse Manceron <UlysseM@...>

Our team wants to use absl/log which was recently added to abseil.

Signed-off-by: Khem Raj <raj.khem@...>
---
meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
index af28da5935..9f8c48cfa4 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_git.bb
@@ -7,9 +7,9 @@ SECTION = "libs"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=df52c6edb7adc22e533b2bacc3bd3915"

-PV = "20220623.1"
-SRCREV = "8c0b94e793a66495e0b1f34a5eb26bd7dc672db0"
-BRANCH = "lts_2022_06_23"
+PV = "20221014.0"
+SRCREV = "5fa65f28e46e86c44966a1ca8a727a329d9c1ff8"
+BRANCH = "master"
SRC_URI = "git://github.com/abseil/abseil-cpp;branch=${BRANCH};protocol=https \
file://0001-absl-always-use-asm-sgidefs.h.patch \
file://0002-Remove-maes-option-from-cross-compilation.patch \
--
2.38.0


Re: [PATCH] Revert "onboard: Inherit setuptools3-base instead of setuptools3"

Khem Raj
 

On Fri, Oct 14, 2022 at 11:47 AM Andreas Müller <schnitzeltony@...> wrote:

Looked into that more: onboard has not seen notable activity since 5
years so it should better go.

Any compaints?

P.S
Think it was me who introduced it here and never thought it is that
useful - so complaints from my side :)
I am all for removing dead recipes. So go for it.


Andreas

On Fri, Oct 14, 2022 at 8:30 PM Andreas Müller <schnitzeltony@...> wrote:

Nothing is build/installed

This reverts commit 9c0cbd1d8f2f4d7370dfd2be747efd5014f539fa.
---
meta-gnome/recipes-support/onboard/onboard_1.4.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
index 9325ef9c2..0388fc69b 100644
--- a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
+++ b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
@@ -10,7 +10,7 @@ SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz
SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"

-inherit features_check setuptools3-base pkgconfig gtk-icon-cache gsettings mime-xdg
+inherit features_check setuptools3 pkgconfig gtk-icon-cache gsettings mime-xdg

REQUIRED_DISTRO_FEATURES = "x11"

--
2.35.3


[meta-oe][PATCH] remmina: Update to 1.4.27

Fabio Estevam
 

From: Fabio Estevam <festevam@...>

Update to the 1.4.27 version and also pass -DWITH_WEBKIT2GTK=OFF
to allow building it without webkit2gtk support.

Signed-off-by: Fabio Estevam <festevam@...>
---
.../remmina/{remmina_1.4.24.bb => remmina_1.4.27.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta-oe/recipes-support/remmina/{remmina_1.4.24.bb => remmina_1.4.27.bb} (90%)

diff --git a/meta-oe/recipes-support/remmina/remmina_1.4.24.bb b/meta-oe/recipes-support/remmina/remmina_1.4.27.bb
similarity index 90%
rename from meta-oe/recipes-support/remmina/remmina_1.4.24.bb
rename to meta-oe/recipes-support/remmina/remmina_1.4.27.bb
index 23cafa7e4..7eb87a005 100644
--- a/meta-oe/recipes-support/remmina/remmina_1.4.24.bb
+++ b/meta-oe/recipes-support/remmina/remmina_1.4.27.bb
@@ -25,14 +25,14 @@ DEPENDS = " \
DEPENDS:append:libc-musl = " libexecinfo"
LDFLAGS:append:libc-musl = " -lexecinfo"

-SRCREV = "ffa6a7ef9c6be7951bac23d14df148098fd2d3fa"
+SRCREV = "9d409a3556c8c2759a376b4f4ac5149db7aacf4f"
SRC_URI = "git://gitlab.com/Remmina/Remmina;protocol=https;branch=master"
S = "${WORKDIR}/git"

inherit cmake features_check mime mime-xdg gtk-icon-cache pkgconfig
REQUIRED_DISTRO_FEATURES = "x11"

-EXTRA_OECMAKE += "-DWITH_APPINDICATOR=OFF -DWITH_GETTEXT=OFF -DWITH_TRANSLATIONS=OFF -DHAVE_LIBAPPINDICATOR=OFF"
+EXTRA_OECMAKE += "-DWITH_APPINDICATOR=OFF -DWITH_GETTEXT=OFF -DWITH_TRANSLATIONS=OFF -DHAVE_LIBAPPINDICATOR=OFF -DWITH_WEBKIT2GTK=OFF"

PACKAGECONFIG[spice] = "-DWITH_SPICE=ON, -DWITH_SPICE=OFF, spice spice-protocol"
# Switch on gtk support in avahi recipe if you want to enable avahi support
--
2.25.1


Re: [PATCH] Revert "onboard: Inherit setuptools3-base instead of setuptools3"

Andreas Müller
 

Looked into that more: onboard has not seen notable activity since 5
years so it should better go.

Any compaints?

P.S
Think it was me who introduced it here and never thought it is that
useful - so complaints from my side :)

Andreas

On Fri, Oct 14, 2022 at 8:30 PM Andreas Müller <schnitzeltony@...> wrote:

Nothing is build/installed

This reverts commit 9c0cbd1d8f2f4d7370dfd2be747efd5014f539fa.
---
meta-gnome/recipes-support/onboard/onboard_1.4.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
index 9325ef9c2..0388fc69b 100644
--- a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
+++ b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
@@ -10,7 +10,7 @@ SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz
SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"

-inherit features_check setuptools3-base pkgconfig gtk-icon-cache gsettings mime-xdg
+inherit features_check setuptools3 pkgconfig gtk-icon-cache gsettings mime-xdg

REQUIRED_DISTRO_FEATURES = "x11"

--
2.35.3


[PATCH] Revert "onboard: Inherit setuptools3-base instead of setuptools3"

Andreas Müller
 

Nothing is build/installed

This reverts commit 9c0cbd1d8f2f4d7370dfd2be747efd5014f539fa.
---
meta-gnome/recipes-support/onboard/onboard_1.4.1.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
index 9325ef9c2..0388fc69b 100644
--- a/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
+++ b/meta-gnome/recipes-support/onboard/onboard_1.4.1.bb
@@ -10,7 +10,7 @@ SRC_URI = "https://launchpad.net/onboard/1.4/${PV}/+download/${BPN}-${PV}.tar.gz
SRC_URI[md5sum] = "1a2fbe82e934f5b37841d17ff51e80e8"
SRC_URI[sha256sum] = "01cae1ac5b1ef1ab985bd2d2d79ded6fc99ee04b1535cc1bb191e43a231a3865"

-inherit features_check setuptools3-base pkgconfig gtk-icon-cache gsettings mime-xdg
+inherit features_check setuptools3 pkgconfig gtk-icon-cache gsettings mime-xdg

REQUIRED_DISTRO_FEATURES = "x11"

--
2.35.3


Re: [meta-oe] Add nativesdk-systemd-systemctl as dependency of dnf-plugin-tui

Khem Raj
 

On Fri, Oct 14, 2022 at 3:31 AM Ross Burton <Ross.Burton@...> wrote:

On 14 Oct 2022, at 01:23, wangmy via lists.openembedded.org <wangmy=fujitsu.com@...> wrote:

Also, why would a nativesdk DNF need to manage systemd units?
When executing postinstall, the system is needed.
So this is a direct clone of the systemctl in systemd-systemctl-native, which solves exactly the same problem.
looks like that. Yes, I agree, I guess replacing oe-core script with
python could be an improvement.

We shouldn’t be duplicating code. If this is a better script then it should replace the one in oe-core. If the one in oe-core is sufficient, then it can be simply be extended to build for nativesdk.

Ross


Re: [meta-oe] Add nativesdk-systemd-systemctl as dependency of dnf-plugin-tui

Ross Burton
 

On 14 Oct 2022, at 01:23, wangmy via lists.openembedded.org <wangmy=fujitsu.com@...> wrote:

Also, why would a nativesdk DNF need to manage systemd units?
When executing postinstall, the system is needed.
So this is a direct clone of the systemctl in systemd-systemctl-native, which solves exactly the same problem.

We shouldn’t be duplicating code. If this is a better script then it should replace the one in oe-core. If the one in oe-core is sufficient, then it can be simply be extended to build for nativesdk.

Ross


[kirkstone][master][meta-oe][PATCH] redis: upgrade 7.0.4 to 7.0.5

Changqing Li
 

From: Changqing Li <changqing.li@...>

Signed-off-by: Changqing Li <changqing.li@...>
---
.../recipes-extended/redis/{redis_7.0.4.bb => redis_7.0.5.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-extended/redis/{redis_7.0.4.bb => redis_7.0.5.bb} (96%)

diff --git a/meta-oe/recipes-extended/redis/redis_7.0.4.bb b/meta-oe/recipes-extended/redis/redis_7.0.5.bb
similarity index 96%
rename from meta-oe/recipes-extended/redis/redis_7.0.4.bb
rename to meta-oe/recipes-extended/redis/redis_7.0.5.bb
index e292237097..3c23deb9ce 100644
--- a/meta-oe/recipes-extended/redis/redis_7.0.4.bb
+++ b/meta-oe/recipes-extended/redis/redis_7.0.5.bb
@@ -19,7 +19,7 @@ SRC_URI = "http://download.redis.io/releases/${BP}.tar.gz \
file://GNU_SOURCE-7.patch \
file://0006-Define-correct-gregs-for-RISCV32.patch \
"
-SRC_URI[sha256sum] = "f0e65fda74c44a3dd4fa9d512d4d4d833dd0939c934e946a5c622a630d057f2f"
+SRC_URI[sha256sum] = "67054cc37b58c125df93bd78000261ec0ef4436a26b40f38262c780e56315cc3"

inherit autotools-brokensep update-rc.d systemd useradd

--
2.25.1


Re: [meta-oe] Add nativesdk-systemd-systemctl as dependency of dnf-plugin-tui

wangmy
 

agreed. Although its perhaps better to soak it a bit, I thought here.
We will review again to see if we can add this script to the dnf-plugin-ui directory.
Do you think it would be better?

  --
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@...
http://www.fujitsu.com/cn/fnst/

-----Original Message-----
From: Khem Raj <raj.khem@...>
Sent: Thursday, October 13, 2022 11:36 PM
To: Ross Burton <Ross.Burton@...>
Cc: Jose Quaresma <quaresma.jose@...>; Wang, Mingyu/王 鸣瑜
<wangmy@...>; openembedded-devel@...
Subject: Re: [oe] [meta-oe] Add nativesdk-systemd-systemctl as dependency of
dnf-plugin-tui

On Thu, Oct 13, 2022 at 3:10 AM Ross Burton <Ross.Burton@...> wrote:

What’s the difference between this python implementation of systemctl, and
the shell implementation that’s already in oe-core in systemd-systemctl-native?

Looks like pointless duplication to me. If the Python implementation here is
better, then it should be in core.

agreed. Although its perhaps better to soak it a bit, I thought here.


Also, why would a nativesdk DNF need to manage systemd units?

Ross

On 12 Oct 2022, at 23:27, Khem Raj via lists.openembedded.org
<raj.khem=gmail.com@...> wrote:

On Wed, Oct 12, 2022 at 10:20 AM Jose Quaresma
<quaresma.jose@...> wrote:

Hi wangmy,

wangmy <wangmy@...> escreveu no dia quarta, 12/10/2022 à(s)
05:04:

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../systemd/nativesdk-systemd-systemctl.bb | 17 +
.../systemd/systemd-systemctl/systemctl | 340
++++++++++++++++++
2 files changed, 357 insertions(+) create mode 100644
meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
create mode 100755
meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl

diff --git
a/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
new file mode 100644
index 0000000000..7ac21aa260
--- /dev/null
+++ b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl
+++ .bb
@@ -0,0 +1,17 @@
+SUMMARY = "Wrapper for enabling systemd services"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM =
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de
20420"
+
+PR = "r6"

Why is this recipe starting with the package release 6 ?
Right, I have fixed it before accepting.

Jose


+
+inherit nativesdk
+
+SRC_URI = "file://systemctl"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/systemctl ${D}${bindir} }
diff --git
a/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
new file mode 100755
index 0000000000..6324319a45
--- /dev/null
+++ b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
@@ -0,0 +1,340 @@
+#!/usr/bin/env python3
+"""systemctl: subset of systemctl used for image construction
+
+Mask/preset systemd units
+"""
+
+import argparse
+import fnmatch
+import os
+import re
+import sys
+
+from collections import namedtuple from pathlib import Path
+
+version = 1.0
+
+ROOT = Path("/")
+SYSCONFDIR = Path("etc")
+BASE_LIBDIR = Path("lib")
+LIBDIR = Path("usr", "lib")
+
+locations = list()
+
+
+class SystemdFile():
+ """Class representing a single systemd configuration file"""
+ def __init__(self, root, path):
+ self.sections = dict()
+ self._parse(root, path)
+ dirname = os.path.basename(path.name) + ".d"
+ for location in locations:
+ for path2 in sorted((root / location / "system" /
dirname).glob("*.conf")):
+ self._parse(root, path2)
+
+ def _parse(self, root, path):
+ """Parse a systemd syntax configuration file
+
+ Args:
+ path: A pathlib.Path object pointing to the file
+
+ """
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ section_re = re.compile(r"^\s*\[(?P<section>.*)\]")
+ kv_re =
re.compile(r"^\s*(?P<key>[^\s]+)\s*=\s*(?P<value>.*)")
+ section = None
+
+ if path.is_symlink():
+ try:
+ path.resolve()
+ except FileNotFoundError:
+ # broken symlink, try relative to root
+ path = root /
+ Path(os.readlink(str(path))).relative_to(ROOT)
+
+ with path.open() as f:
+ for line in f:
+ if skip_re.match(line):
+ continue
+
+ line = line.strip()
+ m = section_re.match(line)
+ if m:
+ if m.group('section') not in self.sections:
+ section = dict()
+ self.sections[m.group('section')] = section
+ else:
+ section = self.sections[m.group('section')]
+ continue
+
+ while line.endswith("\\"):
+ line += f.readline().rstrip("\n")
+
+ m = kv_re.match(line)
+ k = m.group('key')
+ v = m.group('value')
+ if k not in section:
+ section[k] = list()
+ section[k].extend(v.split())
+
+ def get(self, section, prop):
+ """Get a property from section
+
+ Args:
+ section: Section to retrieve property from
+ prop: Property to retrieve
+
+ Returns:
+ List representing all properties of type prop in section.
+
+ Raises:
+ KeyError: if ``section`` or ``prop`` not found
+ """
+ return self.sections[section][prop]
+
+
+class Presets():
+ """Class representing all systemd presets"""
+ def __init__(self, scope, root):
+ self.directives = list()
+ self._collect_presets(scope, root)
+
+ def _parse_presets(self, presets):
+ """Parse presets out of a set of preset files"""
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ directive_re =
+ re.compile(r"^\s*(?P<action>enable|disable)\s+(?P<unit_name>(.+)
+ )")
+
+ Directive = namedtuple("Directive", "action unit_name")
+ for preset in presets:
+ with preset.open() as f:
+ for line in f:
+ m = directive_re.match(line)
+ if m:
+ directive =
Directive(action=m.group('action'),
+
unit_name=m.group('unit_name'))
+ self.directives.append(directive)
+ elif skip_re.match(line):
+ pass
+ else:
+ sys.exit("Unparsed preset line in
+ {}".format(preset))
+
+ def _collect_presets(self, scope, root):
+ """Collect list of preset files"""
+ presets = dict()
+ for location in locations:
+ paths = (root / location / scope).glob("*.preset")
+ for path in paths:
+ # earlier names override later ones
+ if path.name not in presets:
+ presets[path.name] = path
+
+ self._parse_presets([v for k, v in
+ sorted(presets.items())])
+
+ def state(self, unit_name):
+ """Return state of preset for unit_name
+
+ Args:
+ presets: set of presets
+ unit_name: name of the unit
+
+ Returns:
+ None: no matching preset
+ `enable`: unit_name is enabled
+ `disable`: unit_name is disabled
+ """
+ for directive in self.directives:
+ if fnmatch.fnmatch(unit_name, directive.unit_name):
+ return directive.action
+
+ return None
+
+
+def add_link(path, target):
+ try:
+ path.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ if not path.is_symlink():
+ print("ln -s {} {}".format(target, path))
+ path.symlink_to(target)
+
+
+class SystemdUnitNotFoundError(Exception):
+ def __init__(self, path, unit):
+ self.path = path
+ self.unit = unit
+
+
+class SystemdUnit():
+ def __init__(self, root, unit):
+ self.root = root
+ self.unit = unit
+ self.config = None
+
+ def _path_for_unit(self, unit):
+ for location in locations:
+ path = self.root / location / "system" / unit
+ if path.exists() or path.is_symlink():
+ return path
+
+ raise SystemdUnitNotFoundError(self.root, unit)
+
+ def _process_deps(self, config, service, location, prop, dirstem):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+
+ target = ROOT / location.relative_to(self.root)
+ try:
+ for dependent in config.get('Install', prop):
+ wants = systemdir / "{}.{}".format(dependent,
dirstem) / service
+ add_link(wants, target)
+
+ except KeyError:
+ pass
+
+ def enable(self, caller_unit=None):
+ # if we're enabling an instance, first extract the actual instance
+ # then figure out what the template unit is
+ template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.",
self.unit)
+ if template:
+ instance = template.group('instance')
+ unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1)
+ else:
+ instance = None
+ unit = self.unit
+
+ path = self._path_for_unit(unit)
+
+ if path.is_symlink():
+ # ignore aliases
+ return
+
+ config = SystemdFile(self.root, path)
+ if instance == "":
+ try:
+ default_instance = config.get('Install',
'DefaultInstance')[0]
+ except KeyError:
+ # no default instance, so nothing to enable
+ return
+
+ service = self.unit.replace("@.",
+
"@{}.".format(default_instance))
+ else:
+ service = self.unit
+
+ self._process_deps(config, service, path, 'WantedBy', 'wants')
+ self._process_deps(config, service, path, 'RequiredBy',
+ 'requires')
+
+ try:
+ for also in config.get('Install', 'Also'):
+ try:
+ if caller_unit != also:
+ SystemdUnit(self.root, also).enable(unit)
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl also enable issue
+ with %s (%s)" % (service, e.unit))
+
+ except KeyError:
+ pass
+
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ target = ROOT / path.relative_to(self.root)
+ try:
+ for dest in config.get('Install', 'Alias'):
+ alias = systemdir / dest
+ add_link(alias, target)
+
+ except KeyError:
+ pass
+
+ def mask(self):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ add_link(systemdir / self.unit, "/dev/null")
+
+
+def collect_services(root):
+ """Collect list of service files"""
+ services = set()
+ for location in locations:
+ paths = (root / location / "system").glob("*")
+ for path in paths:
+ if path.is_dir():
+ continue
+ services.add(path.name)
+
+ return services
+
+
+def preset_all(root):
+ presets = Presets('system-preset', root)
+ services = collect_services(root)
+
+ for service in services:
+ state = presets.state(service)
+
+ if state == "enable" or state is None:
+ try:
+ SystemdUnit(root, service).enable()
+ except SystemdUnitNotFoundError:
+ sys.exit("Error: Systemctl preset_all issue in
+ %s" % service)
+
+ # If we populate the systemd links we also create /etc/machine-id,
which
+ # allows systemd to boot with the filesystem read-only before
generating
+ # a real value and then committing it back.
+ #
+ # For the stateless configuration, where /etc is generated at
runtime
+ # (for example on a tmpfs), this script shouldn't run at all and we
+ # allow systemd to completely populate /etc.
+ (root / SYSCONFDIR / "machine-id").touch()
+
+
+def main():
+ if sys.version_info < (3, 4, 0):
+ sys.exit("Python 3.4 or greater is required")
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('command', nargs='?', choices=['enable',
'mask',
+
'preset-all'])
+ parser.add_argument('service', nargs=argparse.REMAINDER)
+ parser.add_argument('--root')
+ parser.add_argument('--preset-mode',
+ choices=['full', 'enable-only', 'disable-only'],
+ default='full')
+
+ args = parser.parse_args()
+
+ root = Path(args.root) if args.root else ROOT
+
+ locations.append(SYSCONFDIR / "systemd")
+ # Handle the usrmerge case by ignoring /lib when it's a symlink
+ if not (root / BASE_LIBDIR).is_symlink():
+ locations.append(BASE_LIBDIR / "systemd")
+ locations.append(LIBDIR / "systemd")
+
+ command = args.command
+ if not command:
+ parser.print_help()
+ return 0
+
+ if command == "mask":
+ for service in args.service:
+ try:
+ SystemdUnit(root, service).mask()
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl main mask issue in %s
(%s)" % (service, e.unit))
+ elif command == "enable":
+ for service in args.service:
+ try:
+ SystemdUnit(root, service).enable()
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl main enable issue in %s
(%s)" % (service, e.unit))
+ elif command == "preset-all":
+ if len(args.service) != 0:
+ sys.exit("Too many arguments.")
+ if args.preset_mode != "enable-only":
+ sys.exit("Only enable-only is supported as preset-mode.")
+ preset_all(root)
+ else:
+ raise RuntimeError()
+
+
+if __name__ == '__main__':
+ main()
--
2.25.1




--
Best regards,

José Quaresma



Re: [meta-oe] Add nativesdk-systemd-systemctl as dependency of dnf-plugin-tui

wangmy
 

Also, why would a nativesdk DNF need to manage systemd units?
When executing postinstall, the system is needed.

  --
Best Regards
---------------------------------------------------
Wang Mingyu
Development Dept.I
Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China
TEL: +86+25-86630566-8568
COINS: 79988548
FAX: +86+25-83317685
MAIL: wangmy@...
http://www.fujitsu.com/cn/fnst/

-----Original Message-----
From: Ross Burton <Ross.Burton@...>
Sent: Thursday, October 13, 2022 6:10 PM
To: raj.khem@...
Cc: Jose Quaresma <quaresma.jose@...>; Wang, Mingyu/王 鸣瑜
<wangmy@...>; openembedded-devel@...
Subject: Re: [oe] [meta-oe] Add nativesdk-systemd-systemctl as dependency of
dnf-plugin-tui

What’s the difference between this python implementation of systemctl, and
the shell implementation that’s already in oe-core in systemd-systemctl-native?

Looks like pointless duplication to me. If the Python implementation here is
better, then it should be in core.

Also, why would a nativesdk DNF need to manage systemd units?

Ross

On 12 Oct 2022, at 23:27, Khem Raj via lists.openembedded.org
<raj.khem=gmail.com@...> wrote:

On Wed, Oct 12, 2022 at 10:20 AM Jose Quaresma
<quaresma.jose@...> wrote:

Hi wangmy,

wangmy <wangmy@...> escreveu no dia quarta, 12/10/2022 à(s)
05:04:

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../systemd/nativesdk-systemd-systemctl.bb | 17 +
.../systemd/systemd-systemctl/systemctl | 340
++++++++++++++++++
2 files changed, 357 insertions(+)
create mode 100644
meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
create mode 100755
meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl

diff --git
a/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
new file mode 100644
index 0000000000..7ac21aa260
--- /dev/null
+++ b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.b
+++ b
@@ -0,0 +1,17 @@
+SUMMARY = "Wrapper for enabling systemd services"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM =
"file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de
20420"
+
+PR = "r6"

Why is this recipe starting with the package release 6 ?
Right, I have fixed it before accepting.

Jose


+
+inherit nativesdk
+
+SRC_URI = "file://systemctl"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/systemctl ${D}${bindir} }
diff --git
a/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
new file mode 100755
index 0000000000..6324319a45
--- /dev/null
+++ b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
@@ -0,0 +1,340 @@
+#!/usr/bin/env python3
+"""systemctl: subset of systemctl used for image construction
+
+Mask/preset systemd units
+"""
+
+import argparse
+import fnmatch
+import os
+import re
+import sys
+
+from collections import namedtuple
+from pathlib import Path
+
+version = 1.0
+
+ROOT = Path("/")
+SYSCONFDIR = Path("etc")
+BASE_LIBDIR = Path("lib")
+LIBDIR = Path("usr", "lib")
+
+locations = list()
+
+
+class SystemdFile():
+ """Class representing a single systemd configuration file"""
+ def __init__(self, root, path):
+ self.sections = dict()
+ self._parse(root, path)
+ dirname = os.path.basename(path.name) + ".d"
+ for location in locations:
+ for path2 in sorted((root / location / "system" /
dirname).glob("*.conf")):
+ self._parse(root, path2)
+
+ def _parse(self, root, path):
+ """Parse a systemd syntax configuration file
+
+ Args:
+ path: A pathlib.Path object pointing to the file
+
+ """
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ section_re = re.compile(r"^\s*\[(?P<section>.*)\]")
+ kv_re = re.compile(r"^\s*(?P<key>[^\s]+)\s*=\s*(?P<value>.*)")
+ section = None
+
+ if path.is_symlink():
+ try:
+ path.resolve()
+ except FileNotFoundError:
+ # broken symlink, try relative to root
+ path = root /
+ Path(os.readlink(str(path))).relative_to(ROOT)
+
+ with path.open() as f:
+ for line in f:
+ if skip_re.match(line):
+ continue
+
+ line = line.strip()
+ m = section_re.match(line)
+ if m:
+ if m.group('section') not in self.sections:
+ section = dict()
+ self.sections[m.group('section')] = section
+ else:
+ section = self.sections[m.group('section')]
+ continue
+
+ while line.endswith("\\"):
+ line += f.readline().rstrip("\n")
+
+ m = kv_re.match(line)
+ k = m.group('key')
+ v = m.group('value')
+ if k not in section:
+ section[k] = list()
+ section[k].extend(v.split())
+
+ def get(self, section, prop):
+ """Get a property from section
+
+ Args:
+ section: Section to retrieve property from
+ prop: Property to retrieve
+
+ Returns:
+ List representing all properties of type prop in section.
+
+ Raises:
+ KeyError: if ``section`` or ``prop`` not found
+ """
+ return self.sections[section][prop]
+
+
+class Presets():
+ """Class representing all systemd presets"""
+ def __init__(self, scope, root):
+ self.directives = list()
+ self._collect_presets(scope, root)
+
+ def _parse_presets(self, presets):
+ """Parse presets out of a set of preset files"""
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ directive_re =
+ re.compile(r"^\s*(?P<action>enable|disable)\s+(?P<unit_name>(.+))"
+ )
+
+ Directive = namedtuple("Directive", "action unit_name")
+ for preset in presets:
+ with preset.open() as f:
+ for line in f:
+ m = directive_re.match(line)
+ if m:
+ directive =
Directive(action=m.group('action'),
+
unit_name=m.group('unit_name'))
+ self.directives.append(directive)
+ elif skip_re.match(line):
+ pass
+ else:
+ sys.exit("Unparsed preset line in
+ {}".format(preset))
+
+ def _collect_presets(self, scope, root):
+ """Collect list of preset files"""
+ presets = dict()
+ for location in locations:
+ paths = (root / location / scope).glob("*.preset")
+ for path in paths:
+ # earlier names override later ones
+ if path.name not in presets:
+ presets[path.name] = path
+
+ self._parse_presets([v for k, v in
+ sorted(presets.items())])
+
+ def state(self, unit_name):
+ """Return state of preset for unit_name
+
+ Args:
+ presets: set of presets
+ unit_name: name of the unit
+
+ Returns:
+ None: no matching preset
+ `enable`: unit_name is enabled
+ `disable`: unit_name is disabled
+ """
+ for directive in self.directives:
+ if fnmatch.fnmatch(unit_name, directive.unit_name):
+ return directive.action
+
+ return None
+
+
+def add_link(path, target):
+ try:
+ path.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ if not path.is_symlink():
+ print("ln -s {} {}".format(target, path))
+ path.symlink_to(target)
+
+
+class SystemdUnitNotFoundError(Exception):
+ def __init__(self, path, unit):
+ self.path = path
+ self.unit = unit
+
+
+class SystemdUnit():
+ def __init__(self, root, unit):
+ self.root = root
+ self.unit = unit
+ self.config = None
+
+ def _path_for_unit(self, unit):
+ for location in locations:
+ path = self.root / location / "system" / unit
+ if path.exists() or path.is_symlink():
+ return path
+
+ raise SystemdUnitNotFoundError(self.root, unit)
+
+ def _process_deps(self, config, service, location, prop, dirstem):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+
+ target = ROOT / location.relative_to(self.root)
+ try:
+ for dependent in config.get('Install', prop):
+ wants = systemdir / "{}.{}".format(dependent, dirstem)
/ service
+ add_link(wants, target)
+
+ except KeyError:
+ pass
+
+ def enable(self, caller_unit=None):
+ # if we're enabling an instance, first extract the actual instance
+ # then figure out what the template unit is
+ template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit)
+ if template:
+ instance = template.group('instance')
+ unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1)
+ else:
+ instance = None
+ unit = self.unit
+
+ path = self._path_for_unit(unit)
+
+ if path.is_symlink():
+ # ignore aliases
+ return
+
+ config = SystemdFile(self.root, path)
+ if instance == "":
+ try:
+ default_instance = config.get('Install',
'DefaultInstance')[0]
+ except KeyError:
+ # no default instance, so nothing to enable
+ return
+
+ service = self.unit.replace("@.",
+
"@{}.".format(default_instance))
+ else:
+ service = self.unit
+
+ self._process_deps(config, service, path, 'WantedBy', 'wants')
+ self._process_deps(config, service, path, 'RequiredBy',
+ 'requires')
+
+ try:
+ for also in config.get('Install', 'Also'):
+ try:
+ if caller_unit != also:
+ SystemdUnit(self.root, also).enable(unit)
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl also enable issue
+ with %s (%s)" % (service, e.unit))
+
+ except KeyError:
+ pass
+
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ target = ROOT / path.relative_to(self.root)
+ try:
+ for dest in config.get('Install', 'Alias'):
+ alias = systemdir / dest
+ add_link(alias, target)
+
+ except KeyError:
+ pass
+
+ def mask(self):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ add_link(systemdir / self.unit, "/dev/null")
+
+
+def collect_services(root):
+ """Collect list of service files"""
+ services = set()
+ for location in locations:
+ paths = (root / location / "system").glob("*")
+ for path in paths:
+ if path.is_dir():
+ continue
+ services.add(path.name)
+
+ return services
+
+
+def preset_all(root):
+ presets = Presets('system-preset', root)
+ services = collect_services(root)
+
+ for service in services:
+ state = presets.state(service)
+
+ if state == "enable" or state is None:
+ try:
+ SystemdUnit(root, service).enable()
+ except SystemdUnitNotFoundError:
+ sys.exit("Error: Systemctl preset_all issue in %s"
+ % service)
+
+ # If we populate the systemd links we also create /etc/machine-id,
which
+ # allows systemd to boot with the filesystem read-only before
generating
+ # a real value and then committing it back.
+ #
+ # For the stateless configuration, where /etc is generated at runtime
+ # (for example on a tmpfs), this script shouldn't run at all and we
+ # allow systemd to completely populate /etc.
+ (root / SYSCONFDIR / "machine-id").touch()
+
+
+def main():
+ if sys.version_info < (3, 4, 0):
+ sys.exit("Python 3.4 or greater is required")
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('command', nargs='?', choices=['enable', 'mask',
+
'preset-all'])
+ parser.add_argument('service', nargs=argparse.REMAINDER)
+ parser.add_argument('--root')
+ parser.add_argument('--preset-mode',
+ choices=['full', 'enable-only', 'disable-only'],
+ default='full')
+
+ args = parser.parse_args()
+
+ root = Path(args.root) if args.root else ROOT
+
+ locations.append(SYSCONFDIR / "systemd")
+ # Handle the usrmerge case by ignoring /lib when it's a symlink
+ if not (root / BASE_LIBDIR).is_symlink():
+ locations.append(BASE_LIBDIR / "systemd")
+ locations.append(LIBDIR / "systemd")
+
+ command = args.command
+ if not command:
+ parser.print_help()
+ return 0
+
+ if command == "mask":
+ for service in args.service:
+ try:
+ SystemdUnit(root, service).mask()
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl main mask issue in %s (%s)" %
(service, e.unit))
+ elif command == "enable":
+ for service in args.service:
+ try:
+ SystemdUnit(root, service).enable()
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl main enable issue in %s
(%s)" % (service, e.unit))
+ elif command == "preset-all":
+ if len(args.service) != 0:
+ sys.exit("Too many arguments.")
+ if args.preset_mode != "enable-only":
+ sys.exit("Only enable-only is supported as preset-mode.")
+ preset_all(root)
+ else:
+ raise RuntimeError()
+
+
+if __name__ == '__main__':
+ main()
--
2.25.1




--
Best regards,

José Quaresma



[meta-oe][kirkstone][PATCH] re2: fix branch name from master to main

Martin Jansa
 

From: Martin Jansa <martin.jansa@...>

re2 $ git branch -a --contains 166dbbeb3b0ab7e733b278e8f42a84f6882b8a25
* main
remotes/origin/HEAD -> origin/main
remotes/origin/main

Signed-off-by: Martin Jansa <Martin.Jansa@...>
Signed-off-by: Khem Raj <raj.khem@...>
---
meta-oe/recipes-support/re2/re2_2020.11.01.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/re2/re2_2020.11.01.bb b/meta-oe/recipes-support/re2/re2_2020.11.01.bb
index 698fe7e497..5ec1c6b5ab 100644
--- a/meta-oe/recipes-support/re2/re2_2020.11.01.bb
+++ b/meta-oe/recipes-support/re2/re2_2020.11.01.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b5c31eb512bdf3cb11ffd5713963760"

SRCREV = "166dbbeb3b0ab7e733b278e8f42a84f6882b8a25"

-SRC_URI = "git://github.com/google/re2.git;branch=master;protocol=https"
+SRC_URI = "git://github.com/google/re2.git;branch=main;protocol=https"

S = "${WORKDIR}/git"

--
2.38.0


[meta-oe][PATCH] gtkmm3: upgrade 3.24.5 -> 3.24.7

Markus Volk
 

Signed-off-by: Markus Volk <f_l_k@...>
---
.../recipes-gnome/gtk+/{gtkmm3_3.24.5.bb =3D> gtkmm3_3.24.7.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta-oe/recipes-gnome/gtk+/{gtkmm3_3.24.5.bb =3D> gtkmm3_3.24.7.b=
b} (86%)

diff --git a/meta-oe/recipes-gnome/gtk+/gtkmm3_3.24.5.bb b/meta-oe/recipe=
s-gnome/gtk+/gtkmm3_3.24.7.bb
similarity index 86%
rename from meta-oe/recipes-gnome/gtk+/gtkmm3_3.24.5.bb
rename to meta-oe/recipes-gnome/gtk+/gtkmm3_3.24.7.bb
index 0546814d8..28d2bb138 100644
--- a/meta-oe/recipes-gnome/gtk+/gtkmm3_3.24.5.bb
+++ b/meta-oe/recipes-gnome/gtk+/gtkmm3_3.24.7.bb
@@ -16,7 +16,7 @@ inherit gnomebase features_check
=20
ANY_OF_DISTRO_FEATURES =3D "${GTK3DISTROFEATURES}"
=20
-SRC_URI[archive.sha256sum] =3D "856333de86689f6a81c123f2db15d85db9addc43=
8bc3574c36f15736aeae22e6"
+SRC_URI[archive.sha256sum] =3D "1d7a35af9c5ceccacb244ee3c2deb9b245720d85=
10ac5c7e6f4b6f9947e6789c"
=20
EXTRA_OEMESON =3D "-Dbuild-demos=3Dfalse"
=20
--=20
2.34.1


[meta-networking][PATCH] blueman: upgrade 2.2.4 -> 2.3.2

Markus Volk
 

Switch from using tarball to git because the 2.3.2 tarball lacks the
meson_options.txt file.

Signed-off-by: Markus Volk <f_l_k@...>
---
...01-meson-add-pythoninstalldir-option.patch | 19 ++++++++++---------
.../{blueman_2.2.4.bb =3D> blueman_2.3.2.bb} | 7 ++++---
2 files changed, 14 insertions(+), 12 deletions(-)
rename meta-networking/recipes-connectivity/blueman/{blueman_2.2.4.bb =3D=
blueman_2.3.2.bb} (86%)
diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0001-me=
son-add-pythoninstalldir-option.patch b/meta-networking/recipes-connectiv=
ity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch
index a52821915..cc448b4ff 100644
--- a/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add=
-pythoninstalldir-option.patch
+++ b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add=
-pythoninstalldir-option.patch
@@ -16,14 +16,14 @@ Signed-off-by: Chen Qi <Qi.Chen@...>
2 files changed, 7 insertions(+), 1 deletion(-)
=20
diff --git a/meson.build b/meson.build
-index bc990cd..a37aacd 100644
+index e12d0ce6..e84457a5 100644
--- a/meson.build
+++ b/meson.build
@@ -26,7 +26,12 @@ pkgdatadir =3D join_paths([prefix, get_option('datadi=
r'), package_name])
bindir =3D join_paths([prefix, get_option('bindir')])
libexecdir =3D join_paths([prefix, get_option('libexecdir')])
- schemadir =3D join_paths([datadir, 'glib-2.0', 'schemas'])
--pythondir =3D join_paths([prefix, python.sysconfig_path('purelib')])
+ schemadir =3D join_paths(['share', 'glib-2.0', 'schemas'])
+-pythondir =3D pyinstall.get_install_dir()
+pythoninstalldir =3D get_option('pythoninstalldir')
+if pythoninstalldir !=3D ''
+ pythondir =3D join_paths([prefix, pythoninstalldir])
@@ -34,16 +34,17 @@ index bc990cd..a37aacd 100644
if get_option('policykit')
have_polkit =3D 'True'
diff --git a/meson_options.txt b/meson_options.txt
-index b3e939f..96acbbc 100644
+index 177d9ab8..3e397d8e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
-@@ -5,5 +5,6 @@ option('pulseaudio', type: 'boolean', value: true, descr=
iption: 'Enable PulseAud
- option('appindicator', type: 'boolean', value: true, description: 'Enab=
le Libappindicator support')
+@@ -2,6 +2,7 @@ option('runtime_deps_check', type: 'boolean', value: tru=
e, description: 'Disable
+ option('dhcp-config-path', type: 'string', value: '/etc/dhcp3/dhcpd.con=
f', description: 'Set dhcp3 server configuration path')
+ option('policykit', type: 'boolean', value: true, description: 'Enable =
policykit support')
+ option('pulseaudio', type: 'boolean', value: true, description: 'Enable=
PulseAudio support')
++option('pythoninstalldir', type: 'string', description: 'Path to python=
site-packages dir relative to ${prefix}')
option('systemdsystemunitdir', type: 'string', description: 'Path to sy=
stemd system unit dir relative to ${prefix}')
option('systemduserunitdir', type: 'string', description: 'Path to syst=
emd user unit dir relative to ${prefix}')
-+option('pythoninstalldir', type: 'string', description: 'Path to python=
site-packages dir relative to ${prefix}')
option('sendto-plugins', type: 'array', choices: ['Caja', 'Nemo', 'Naut=
ilus'], value: ['Caja', 'Nemo', 'Nautilus'], description: 'Install sendto=
plugins for various filemanagers')
- option('thunar-sendto', type: 'boolean', value: true, description: 'Ins=
tall Thunar sendto plugin')
--=20
-2.33.0
+2.34.1
=20
diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.2.4.b=
b b/meta-networking/recipes-connectivity/blueman/blueman_2.3.2.bb
similarity index 86%
rename from meta-networking/recipes-connectivity/blueman/blueman_2.2.4.bb
rename to meta-networking/recipes-connectivity/blueman/blueman_2.3.2.bb
index 119752086..eed00fce0 100644
--- a/meta-networking/recipes-connectivity/blueman/blueman_2.2.4.bb
+++ b/meta-networking/recipes-connectivity/blueman/blueman_2.3.2.bb
@@ -7,14 +7,15 @@ DEPENDS =3D "gtk+3 glib-2.0 bluez5 python3-pygobject py=
thon3-cython-native"
inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon=
-cache
=20
SRC_URI =3D " \
- https://github.com/blueman-project/blueman/releases/download/${PV}/b=
lueman-${PV}.tar.xz \
+ git://github.com/blueman-project/blueman.git;protocol=3Dhttps;branch=
=3D2-3-stable \
file://0001-Search-for-cython3.patch \
file://0002-fix-fail-to-enable-bluetooth.patch \
file://0001-meson-add-pythoninstalldir-option.patch \
"
-SRC_URI[sha256sum] =3D "55d639feeda0b43b18a659e65985213a54b47dcb1348f3b4=
effb5238db242602"
+S =3D "${WORKDIR}/git"
+SRCREV =3D "4275c35ffe372c3b194080726fbe1c99f974360f"
=20
-EXTRA_OEMESON =3D "-Druntime_deps_check=3Dfalse -Dappindicator=3Dfalse -=
Dpythoninstalldir=3D${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}"
+EXTRA_OEMESON =3D "-Druntime_deps_check=3Dfalse -Dpythoninstalldir=3D${@=
noprefix('PYTHON_SITEPACKAGES_DIR', d)}"
=20
SYSTEMD_SERVICE:${PN} =3D "${BPN}-mechanism.service"
SYSTEMD_AUTO_ENABLE:${PN} =3D "disable"
--=20
2.34.1


Re: [meta-oe] Add nativesdk-systemd-systemctl as dependency of dnf-plugin-tui

Khem Raj
 

On Thu, Oct 13, 2022 at 3:10 AM Ross Burton <Ross.Burton@...> wrote:

What’s the difference between this python implementation of systemctl, and the shell implementation that’s already in oe-core in systemd-systemctl-native?

Looks like pointless duplication to me. If the Python implementation here is better, then it should be in core.
agreed. Although its perhaps better to soak it a bit, I thought here.


Also, why would a nativesdk DNF need to manage systemd units?

Ross

On 12 Oct 2022, at 23:27, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@...> wrote:

On Wed, Oct 12, 2022 at 10:20 AM Jose Quaresma <quaresma.jose@...> wrote:

Hi wangmy,

wangmy <wangmy@...> escreveu no dia quarta, 12/10/2022 à(s) 05:04:

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../systemd/nativesdk-systemd-systemctl.bb | 17 +
.../systemd/systemd-systemctl/systemctl | 340 ++++++++++++++++++
2 files changed, 357 insertions(+)
create mode 100644 meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
create mode 100755 meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl

diff --git a/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
new file mode 100644
index 0000000000..7ac21aa260
--- /dev/null
+++ b/meta-oe/recipes-devtools/systemd/nativesdk-systemd-systemctl.bb
@@ -0,0 +1,17 @@
+SUMMARY = "Wrapper for enabling systemd services"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+
+PR = "r6"

Why is this recipe starting with the package release 6 ?
Right, I have fixed it before accepting.

Jose


+
+inherit nativesdk
+
+SRC_URI = "file://systemctl"
+
+S = "${WORKDIR}"
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 0755 ${WORKDIR}/systemctl ${D}${bindir}
+}
diff --git a/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
new file mode 100755
index 0000000000..6324319a45
--- /dev/null
+++ b/meta-oe/recipes-devtools/systemd/systemd-systemctl/systemctl
@@ -0,0 +1,340 @@
+#!/usr/bin/env python3
+"""systemctl: subset of systemctl used for image construction
+
+Mask/preset systemd units
+"""
+
+import argparse
+import fnmatch
+import os
+import re
+import sys
+
+from collections import namedtuple
+from pathlib import Path
+
+version = 1.0
+
+ROOT = Path("/")
+SYSCONFDIR = Path("etc")
+BASE_LIBDIR = Path("lib")
+LIBDIR = Path("usr", "lib")
+
+locations = list()
+
+
+class SystemdFile():
+ """Class representing a single systemd configuration file"""
+ def __init__(self, root, path):
+ self.sections = dict()
+ self._parse(root, path)
+ dirname = os.path.basename(path.name) + ".d"
+ for location in locations:
+ for path2 in sorted((root / location / "system" / dirname).glob("*.conf")):
+ self._parse(root, path2)
+
+ def _parse(self, root, path):
+ """Parse a systemd syntax configuration file
+
+ Args:
+ path: A pathlib.Path object pointing to the file
+
+ """
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ section_re = re.compile(r"^\s*\[(?P<section>.*)\]")
+ kv_re = re.compile(r"^\s*(?P<key>[^\s]+)\s*=\s*(?P<value>.*)")
+ section = None
+
+ if path.is_symlink():
+ try:
+ path.resolve()
+ except FileNotFoundError:
+ # broken symlink, try relative to root
+ path = root / Path(os.readlink(str(path))).relative_to(ROOT)
+
+ with path.open() as f:
+ for line in f:
+ if skip_re.match(line):
+ continue
+
+ line = line.strip()
+ m = section_re.match(line)
+ if m:
+ if m.group('section') not in self.sections:
+ section = dict()
+ self.sections[m.group('section')] = section
+ else:
+ section = self.sections[m.group('section')]
+ continue
+
+ while line.endswith("\\"):
+ line += f.readline().rstrip("\n")
+
+ m = kv_re.match(line)
+ k = m.group('key')
+ v = m.group('value')
+ if k not in section:
+ section[k] = list()
+ section[k].extend(v.split())
+
+ def get(self, section, prop):
+ """Get a property from section
+
+ Args:
+ section: Section to retrieve property from
+ prop: Property to retrieve
+
+ Returns:
+ List representing all properties of type prop in section.
+
+ Raises:
+ KeyError: if ``section`` or ``prop`` not found
+ """
+ return self.sections[section][prop]
+
+
+class Presets():
+ """Class representing all systemd presets"""
+ def __init__(self, scope, root):
+ self.directives = list()
+ self._collect_presets(scope, root)
+
+ def _parse_presets(self, presets):
+ """Parse presets out of a set of preset files"""
+ skip_re = re.compile(r"^\s*([#;]|$)")
+ directive_re = re.compile(r"^\s*(?P<action>enable|disable)\s+(?P<unit_name>(.+))")
+
+ Directive = namedtuple("Directive", "action unit_name")
+ for preset in presets:
+ with preset.open() as f:
+ for line in f:
+ m = directive_re.match(line)
+ if m:
+ directive = Directive(action=m.group('action'),
+ unit_name=m.group('unit_name'))
+ self.directives.append(directive)
+ elif skip_re.match(line):
+ pass
+ else:
+ sys.exit("Unparsed preset line in {}".format(preset))
+
+ def _collect_presets(self, scope, root):
+ """Collect list of preset files"""
+ presets = dict()
+ for location in locations:
+ paths = (root / location / scope).glob("*.preset")
+ for path in paths:
+ # earlier names override later ones
+ if path.name not in presets:
+ presets[path.name] = path
+
+ self._parse_presets([v for k, v in sorted(presets.items())])
+
+ def state(self, unit_name):
+ """Return state of preset for unit_name
+
+ Args:
+ presets: set of presets
+ unit_name: name of the unit
+
+ Returns:
+ None: no matching preset
+ `enable`: unit_name is enabled
+ `disable`: unit_name is disabled
+ """
+ for directive in self.directives:
+ if fnmatch.fnmatch(unit_name, directive.unit_name):
+ return directive.action
+
+ return None
+
+
+def add_link(path, target):
+ try:
+ path.parent.mkdir(parents=True)
+ except FileExistsError:
+ pass
+ if not path.is_symlink():
+ print("ln -s {} {}".format(target, path))
+ path.symlink_to(target)
+
+
+class SystemdUnitNotFoundError(Exception):
+ def __init__(self, path, unit):
+ self.path = path
+ self.unit = unit
+
+
+class SystemdUnit():
+ def __init__(self, root, unit):
+ self.root = root
+ self.unit = unit
+ self.config = None
+
+ def _path_for_unit(self, unit):
+ for location in locations:
+ path = self.root / location / "system" / unit
+ if path.exists() or path.is_symlink():
+ return path
+
+ raise SystemdUnitNotFoundError(self.root, unit)
+
+ def _process_deps(self, config, service, location, prop, dirstem):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+
+ target = ROOT / location.relative_to(self.root)
+ try:
+ for dependent in config.get('Install', prop):
+ wants = systemdir / "{}.{}".format(dependent, dirstem) / service
+ add_link(wants, target)
+
+ except KeyError:
+ pass
+
+ def enable(self, caller_unit=None):
+ # if we're enabling an instance, first extract the actual instance
+ # then figure out what the template unit is
+ template = re.match(r"[^@]+@(?P<instance>[^\.]*)\.", self.unit)
+ if template:
+ instance = template.group('instance')
+ unit = re.sub(r"@[^\.]*\.", "@.", self.unit, 1)
+ else:
+ instance = None
+ unit = self.unit
+
+ path = self._path_for_unit(unit)
+
+ if path.is_symlink():
+ # ignore aliases
+ return
+
+ config = SystemdFile(self.root, path)
+ if instance == "":
+ try:
+ default_instance = config.get('Install', 'DefaultInstance')[0]
+ except KeyError:
+ # no default instance, so nothing to enable
+ return
+
+ service = self.unit.replace("@.",
+ "@{}.".format(default_instance))
+ else:
+ service = self.unit
+
+ self._process_deps(config, service, path, 'WantedBy', 'wants')
+ self._process_deps(config, service, path, 'RequiredBy', 'requires')
+
+ try:
+ for also in config.get('Install', 'Also'):
+ try:
+ if caller_unit != also:
+ SystemdUnit(self.root, also).enable(unit)
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl also enable issue with %s (%s)" % (service, e.unit))
+
+ except KeyError:
+ pass
+
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ target = ROOT / path.relative_to(self.root)
+ try:
+ for dest in config.get('Install', 'Alias'):
+ alias = systemdir / dest
+ add_link(alias, target)
+
+ except KeyError:
+ pass
+
+ def mask(self):
+ systemdir = self.root / SYSCONFDIR / "systemd" / "system"
+ add_link(systemdir / self.unit, "/dev/null")
+
+
+def collect_services(root):
+ """Collect list of service files"""
+ services = set()
+ for location in locations:
+ paths = (root / location / "system").glob("*")
+ for path in paths:
+ if path.is_dir():
+ continue
+ services.add(path.name)
+
+ return services
+
+
+def preset_all(root):
+ presets = Presets('system-preset', root)
+ services = collect_services(root)
+
+ for service in services:
+ state = presets.state(service)
+
+ if state == "enable" or state is None:
+ try:
+ SystemdUnit(root, service).enable()
+ except SystemdUnitNotFoundError:
+ sys.exit("Error: Systemctl preset_all issue in %s" % service)
+
+ # If we populate the systemd links we also create /etc/machine-id, which
+ # allows systemd to boot with the filesystem read-only before generating
+ # a real value and then committing it back.
+ #
+ # For the stateless configuration, where /etc is generated at runtime
+ # (for example on a tmpfs), this script shouldn't run at all and we
+ # allow systemd to completely populate /etc.
+ (root / SYSCONFDIR / "machine-id").touch()
+
+
+def main():
+ if sys.version_info < (3, 4, 0):
+ sys.exit("Python 3.4 or greater is required")
+
+ parser = argparse.ArgumentParser()
+ parser.add_argument('command', nargs='?', choices=['enable', 'mask',
+ 'preset-all'])
+ parser.add_argument('service', nargs=argparse.REMAINDER)
+ parser.add_argument('--root')
+ parser.add_argument('--preset-mode',
+ choices=['full', 'enable-only', 'disable-only'],
+ default='full')
+
+ args = parser.parse_args()
+
+ root = Path(args.root) if args.root else ROOT
+
+ locations.append(SYSCONFDIR / "systemd")
+ # Handle the usrmerge case by ignoring /lib when it's a symlink
+ if not (root / BASE_LIBDIR).is_symlink():
+ locations.append(BASE_LIBDIR / "systemd")
+ locations.append(LIBDIR / "systemd")
+
+ command = args.command
+ if not command:
+ parser.print_help()
+ return 0
+
+ if command == "mask":
+ for service in args.service:
+ try:
+ SystemdUnit(root, service).mask()
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl main mask issue in %s (%s)" % (service, e.unit))
+ elif command == "enable":
+ for service in args.service:
+ try:
+ SystemdUnit(root, service).enable()
+ except SystemdUnitNotFoundError as e:
+ sys.exit("Error: Systemctl main enable issue in %s (%s)" % (service, e.unit))
+ elif command == "preset-all":
+ if len(args.service) != 0:
+ sys.exit("Too many arguments.")
+ if args.preset_mode != "enable-only":
+ sys.exit("Only enable-only is supported as preset-mode.")
+ preset_all(root)
+ else:
+ raise RuntimeError()
+
+
+if __name__ == '__main__':
+ main()
--
2.25.1




--
Best regards,

José Quaresma



Re: kirkstone merge request: Oct 13th

Khem Raj
 

merged thanks Armin.

On Thu, Oct 13, 2022 at 7:43 AM akuster808 <akuster808@...> wrote:

The following changes since commit 05dcac98473402d87e0af73bbc2c5a6a840abe93:

postgresql: make sure pam conf installed when pam enabled (2022-09-15
08:39:48 -0400)

are available in the Git repository at:

https://git.openembedded.org/meta-openembedded kirkstone-next

for you to fetch changes up to bd2d8fba766f912bd1bc5cde7d6f0e72152f1547:

minicoredumper: retry elf parsing as long as needed (2022-09-25
11:03:26 -0400)

----------------------------------------------------------------
Khem Raj (1):
audit: Revert the tweak done in configure step in do_install

Martin Jansa (1):
libcec: fix runtime dependencies for ${PN}-examples

Richard Purdie (1):
lmdb: Don't inherit base

Sakib Sajal (1):
minicoredumper: retry elf parsing as long as needed

Steffen Olsen (1):
postgreql: Fix pg_config not working after buildpaths patch

Wang Mingyu (1):
postgresql: upgrade 14.4 -> 14.5

Yi Zhao (1):
frr: Security fix CVE-2022-37035

wangmy (1):
php: upgrade 8.1.9 -> 8.1.10

meta-networking/recipes-protocols/frr/frr/CVE-2022-37035.patch | 151
++++++++++++++++++++++++++++
meta-networking/recipes-protocols/frr/frr_8.2.2.bb | 1 +
meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb | 2 +-
.../files/0001-config_info.c-not-expose-build-info.patch | 11 +-
.../0001-configure.ac-bypass-autoconf-2.69-version-check.patch | 6 +-
.../postgresql/{postgresql_14.4.bb => postgresql_14.5.bb} | 2 +-
meta-oe/recipes-devtools/php/{php_8.1.9.bb => php_8.1.10.bb} | 2 +-
meta-oe/recipes-extended/libcec/libcec_6.0.2.bb | 3 +
...001-minicoredumper-retry-elf-parsing-as-long-as-needed.patch | 128
+++++++++++++++++++++++
meta-oe/recipes-kernel/minicoredumper/minicoredumper_2.0.1.bb | 1 +
meta-oe/recipes-security/audit/audit_3.0.8.bb | 2 +
11 files changed, 302 insertions(+), 7 deletions(-)
create mode 100644
meta-networking/recipes-protocols/frr/frr/CVE-2022-37035.patch
rename meta-oe/recipes-dbs/postgresql/{postgresql_14.4.bb =>
postgresql_14.5.bb} (83%)
rename meta-oe/recipes-devtools/php/{php_8.1.9.bb => php_8.1.10.bb} (99%)
create mode 100644
meta-oe/recipes-kernel/minicoredumper/files/0001-minicoredumper-retry-elf-parsing-as-long-as-needed.patch