Skip to contentSkip to conversation

systemd: enable portabled by default and install utilities in systemd-container

PATCH In review [email protected] 3 participants 11 messages May 9, 2019 – May 21, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: enable portabled by default and install utilities in systemd-container

From: Luca Boccassi <[email protected]>

portable services have been declared production ready with v241, so enable by default and install the files in the container package.

---
 meta/recipes-core/systemd/systemd_242.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)
meta/recipes-core/systemd/systemd_242.bb +10 -0
index 73e03c7a77..83b00ba785 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
     nss \
     nss-mymachines \
     nss-resolve \
+    portabled \
     quotacheck \
     randomseed \
     resolved \
@@ -403,8 +404,10 @@ SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket"
 
 FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
                          ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+                         ${sysconfdir}/dbus-1/system.d/org.freedesktop.portable1.conf \
                          ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
                          ${base_bindir}/machinectl \
+                         ${base_bindir}/portablectl \
                          ${bindir}/systemd-nspawn \
                          ${nonarch_libdir}/systemd/import-pubring.gpg \
                          ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
@@ -418,21 +421,28 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
                          ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
                          ${systemd_system_unitdir}/systemd-importd.service \
                          ${systemd_system_unitdir}/systemd-machined.service \
+                         ${systemd_system_unitdir}/systemd-portabled.service \
                          ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
+                         ${systemd_system_unitdir}/dbus-org.freedesktop.portable1.service \
                          ${systemd_system_unitdir}/var-lib-machines.mount \
                          ${rootlibexecdir}/systemd/systemd-import \
                          ${rootlibexecdir}/systemd/systemd-importd \
                          ${rootlibexecdir}/systemd/systemd-machined \
+                         ${rootlibexecdir}/systemd/systemd-portabled \
                          ${rootlibexecdir}/systemd/systemd-pull \
+                         ${exec_prefix}/lib/tmpfiles.d/portables.conf \
                          ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
                          ${systemd_system_unitdir}/[email protected] \
                          ${libdir}/libnss_mymachines.so.2 \
                          ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
                          ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+                         ${datadir}/dbus-1/system-services/org.freedesktop.portable1.service \
                          ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
                          ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+                         ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
                          ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
                          ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
+                         ${datadir}/polkit-1/actions/org.freedesktop.portable1.policy \
                         "
 
 RRECOMMENDS_${PN}-container += "\
Signature · 1 line
2.20.1
#1 lore raw

Hi Luca,

Quoted 4 lines · On 09/05/2019 23.40, [email protected] wrote:

From: Luca Boccassi <[email protected]>

portable services have been declared production ready with v241, so enable by default and install the files in the container package.

The systemd portables feature is not really related to containers/VM's, so I think it should stay in the primary package; or alternatively in a separate package.

// Martin

Quoted 58 lines
---
  meta/recipes-core/systemd/systemd_242.bb | 10 ++++++++++
  1 file changed, 10 insertions(+)
meta/recipes-core/systemd/systemd_242.bb +10 -0
index 73e03c7a77..83b00ba785 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
      nss \
      nss-mymachines \
      nss-resolve \
+    portabled \
      quotacheck \
      randomseed \
      resolved \
@@ -403,8 +404,10 @@ SYSTEMD_SERVICE_${PN}-remote = "systemd-journal-remote.socket"
 
  FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf \
                           ${sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+                         ${sysconfdir}/dbus-1/system.d/org.freedesktop.portable1.conf \
                           ${sysconfdir}/systemd/system/multi-user.target.wants/machines.target \
                           ${base_bindir}/machinectl \
+                         ${base_bindir}/portablectl \
                           ${bindir}/systemd-nspawn \
                           ${nonarch_libdir}/systemd/import-pubring.gpg \
                           ${systemd_system_unitdir}/busnames.target.wants/org.freedesktop.import1.busname \
@@ -418,21 +421,28 @@ FILES_${PN}-container = "${sysconfdir}/dbus-1/system.d/org.freedesktop.import1.c
                           ${systemd_system_unitdir}/org.freedesktop.machine1.busname \
                           ${systemd_system_unitdir}/systemd-importd.service \
                           ${systemd_system_unitdir}/systemd-machined.service \
+                         ${systemd_system_unitdir}/systemd-portabled.service \
                           ${systemd_system_unitdir}/dbus-org.freedesktop.machine1.service \
+                         ${systemd_system_unitdir}/dbus-org.freedesktop.portable1.service \
                           ${systemd_system_unitdir}/var-lib-machines.mount \
                           ${rootlibexecdir}/systemd/systemd-import \
                           ${rootlibexecdir}/systemd/systemd-importd \
                           ${rootlibexecdir}/systemd/systemd-machined \
+                         ${rootlibexecdir}/systemd/systemd-portabled \
                           ${rootlibexecdir}/systemd/systemd-pull \
+                         ${exec_prefix}/lib/tmpfiles.d/portables.conf \
                           ${exec_prefix}/lib/tmpfiles.d/systemd-nspawn.conf \
                           ${systemd_system_unitdir}/[email protected] \
                           ${libdir}/libnss_mymachines.so.2 \
                           ${datadir}/dbus-1/system-services/org.freedesktop.import1.service \
                           ${datadir}/dbus-1/system-services/org.freedesktop.machine1.service \
+                         ${datadir}/dbus-1/system-services/org.freedesktop.portable1.service \
                           ${datadir}/dbus-1/system.d/org.freedesktop.import1.conf \
                           ${datadir}/dbus-1/system.d/org.freedesktop.machine1.conf \
+                         ${datadir}/dbus-1/system.d/org.freedesktop.portable1.conf \
                           ${datadir}/polkit-1/actions/org.freedesktop.import1.policy \
                           ${datadir}/polkit-1/actions/org.freedesktop.machine1.policy \
+                         ${datadir}/polkit-1/actions/org.freedesktop.portable1.policy \
                          "
 
  RRECOMMENDS_${PN}-container += "\
Signature · 10 lines
Kind regards,
Martin Hundebøll
Embedded Linux Consultant

+45 61 65 54 61
[email protected]

Geanix ApS
https://geanix.com
DK39600706
#2 lore raw
Quoted 13 lines · Martin Hundebøll

Hi Luca,

Quoted 7 lines · On 09/05/2019 23.40, [email protected] wrote:

From: Luca Boccassi <
[email protected]

Quoted 1 line

portable services have been declared production ready with v241, so enable
by default and install the files in the container package.

Quoted 7 lines

The systemd portables feature is not really related to containers/VM's,
so I think it should stay in the primary package; or alternatively in a
separate package.

// Martin

Hello Martin,

IMHO if VM tools and containers tool can go together in this package, then portable services utilities can too - they are at different positions on the same scale after all :-)

But I've got no strong opinion, so I'll send a v2 with them moved to the main package.

Quoted 94 lines
Quoted 92 lines

Signed-off-by: Luca Boccassi <
[email protected]

Quoted 1 line
---
  meta/recipes-core/systemd/systemd_242.bb | 10 ++++++++++
  1 file changed, 10 insertions(+)
meta/recipes-core/systemd/systemd_242.bb +1 -0
index 73e03c7a77..83b00ba785 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
      nss \
      nss-mymachines \
      nss-resolve \
+    portabled \
      quotacheck \
      randomseed \
      resolved \
@@ -403,8 +404,10 @@ SYSTEMD_SERVICE_${PN}-remote = "systemd-

journal-remote.socket"

FILES_${PN}-container = "${sysconfdir}/dbus-

1/system.d/org.freedesktop.import1.conf \
                           ${sysconfdir}/dbus-
1/system.d/org.freedesktop.machine1.conf \
+                         ${sysconfdir}/dbus-
1/system.d/org.freedesktop.portable1.conf \
                           ${sysconfdir}/systemd/system/multi-
user.target.wants/machines.target \
                           ${base_bindir}/machinectl \
+                         ${base_bindir}/portablectl \
                           ${bindir}/systemd-nspawn \
                           ${nonarch_libdir}/systemd/import-
pubring.gpg \
                           ${systemd_system_unitdir}/busnames.targe

t.wants/org.freedesktop.import1.busname \

meta/recipes-core/systemd/systemd_242.bb +0 -0
@@ -418,21 +421,28 @@ FILES_${PN}-container = "${sysconfdir}/dbus-

1/system.d/org.freedesktop.import1.c

                           ${systemd_system_unitdir}/org.freedeskto
p.machine1.busname \
                           ${systemd_system_unitdir}/systemd-
importd.service \
                           ${systemd_system_unitdir}/systemd-
machined.service \
+                         ${systemd_system_unitdir}/systemd-
portabled.service \
                           ${systemd_system_unitdir}/dbus-
org.freedesktop.machine1.service \
+                         ${systemd_system_unitdir}/dbus-
org.freedesktop.portable1.service \
                           ${systemd_system_unitdir}/var-lib-
machines.mount \
                           ${rootlibexecdir}/systemd/systemd-import 
\
                           ${rootlibexecdir}/systemd/systemd-
importd \
                           ${rootlibexecdir}/systemd/systemd-
machined \
+                         ${rootlibexecdir}/systemd/systemd-
portabled \
                           ${rootlibexecdir}/systemd/systemd-pull \
+                         ${exec_prefix}/lib/tmpfiles.d/portables.c
onf \
                           ${exec_prefix}/lib/tmpfiles.d/systemd-
nspawn.conf \
                           ${systemd_system_unitdir}/systemd-
[email protected] \
                           ${libdir}/libnss_mymachines.so.2 \
                           ${datadir}/dbus-1/system-
services/org.freedesktop.import1.service \
                           ${datadir}/dbus-1/system-
services/org.freedesktop.machine1.service \
+                         ${datadir}/dbus-1/system-
services/org.freedesktop.portable1.service \
                           ${datadir}/dbus-
1/system.d/org.freedesktop.import1.conf \
                           ${datadir}/dbus-
1/system.d/org.freedesktop.machine1.conf \
+                         ${datadir}/dbus-
1/system.d/org.freedesktop.portable1.conf \
                           ${datadir}/polkit-
1/actions/org.freedesktop.import1.policy \
                           ${datadir}/polkit-
1/actions/org.freedesktop.machine1.policy \
+                         ${datadir}/polkit-
1/actions/org.freedesktop.portable1.policy \
                          "
  RRECOMMENDS_${PN}-container += "\
Signature · 2 lines
Kind regards,
Luca Boccassi
#3 lore raw

Hi Luca,

Quoted 22 lines · Luca Boccassi
Quoted 13 lines · Martin Hundebøll

Hi Luca,

Quoted 7 lines · On 09/05/2019 23.40, [email protected] wrote:

From: Luca Boccassi <
[email protected]

Quoted 1 line

portable services have been declared production ready with v241, so enable
by default and install the files in the container package.

Quoted 7 lines

The systemd portables feature is not really related to containers/VM's,
so I think it should stay in the primary package; or alternatively in a
separate package.

// Martin

Quoted 8 lines

Hello Martin,

IMHO if VM tools and containers tool can go together in this package, then portable services utilities can too - they are at different positions on the same scale after all :-)

But I've got no strong opinion, so I'll send a v2 with them moved to the main package.

I am planning to use portable services instead of going full container, so I would prefer not having the container/vm utils on target :)

// Martin

Quoted 94 lines
Quoted 94 lines
Quoted 92 lines

Signed-off-by: Luca Boccassi <
[email protected]

Quoted 1 line
---
   meta/recipes-core/systemd/systemd_242.bb | 10 ++++++++++
   1 file changed, 10 insertions(+)
meta/recipes-core/systemd/systemd_242.bb +1 -0
index 73e03c7a77..83b00ba785 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
       nss \
       nss-mymachines \
       nss-resolve \
+    portabled \
       quotacheck \
       randomseed \
       resolved \
@@ -403,8 +404,10 @@ SYSTEMD_SERVICE_${PN}-remote = "systemd-

journal-remote.socket"

   FILES_${PN}-container = "${sysconfdir}/dbus-
1/system.d/org.freedesktop.import1.conf \
                            ${sysconfdir}/dbus-
1/system.d/org.freedesktop.machine1.conf \
+                         ${sysconfdir}/dbus-
1/system.d/org.freedesktop.portable1.conf \
                            ${sysconfdir}/systemd/system/multi-
user.target.wants/machines.target \
                            ${base_bindir}/machinectl \
+                         ${base_bindir}/portablectl \
                            ${bindir}/systemd-nspawn \
                            ${nonarch_libdir}/systemd/import-
pubring.gpg \
                            ${systemd_system_unitdir}/busnames.targe

t.wants/org.freedesktop.import1.busname \

meta/recipes-core/systemd/systemd_242.bb +0 -0
@@ -418,21 +421,28 @@ FILES_${PN}-container = "${sysconfdir}/dbus-

1/system.d/org.freedesktop.import1.c

                            ${systemd_system_unitdir}/org.freedeskto
p.machine1.busname \
                            ${systemd_system_unitdir}/systemd-
importd.service \
                            ${systemd_system_unitdir}/systemd-
machined.service \
+                         ${systemd_system_unitdir}/systemd-
portabled.service \
                            ${systemd_system_unitdir}/dbus-
org.freedesktop.machine1.service \
+                         ${systemd_system_unitdir}/dbus-
org.freedesktop.portable1.service \
                            ${systemd_system_unitdir}/var-lib-
machines.mount \
                            ${rootlibexecdir}/systemd/systemd-import
\
                            ${rootlibexecdir}/systemd/systemd-
importd \
                            ${rootlibexecdir}/systemd/systemd-
machined \
+                         ${rootlibexecdir}/systemd/systemd-
portabled \
                            ${rootlibexecdir}/systemd/systemd-pull \
+                         ${exec_prefix}/lib/tmpfiles.d/portables.c
onf \
                            ${exec_prefix}/lib/tmpfiles.d/systemd-
nspawn.conf \
                            ${systemd_system_unitdir}/systemd-
[email protected] \
                            ${libdir}/libnss_mymachines.so.2 \
                            ${datadir}/dbus-1/system-
services/org.freedesktop.import1.service \
                            ${datadir}/dbus-1/system-
services/org.freedesktop.machine1.service \
+                         ${datadir}/dbus-1/system-
services/org.freedesktop.portable1.service \
                            ${datadir}/dbus-
1/system.d/org.freedesktop.import1.conf \
                            ${datadir}/dbus-
1/system.d/org.freedesktop.machine1.conf \
+                         ${datadir}/dbus-
1/system.d/org.freedesktop.portable1.conf \
                            ${datadir}/polkit-
1/actions/org.freedesktop.import1.policy \
                            ${datadir}/polkit-
1/actions/org.freedesktop.machine1.policy \
+                         ${datadir}/polkit-
1/actions/org.freedesktop.portable1.policy \
                           "
   RRECOMMENDS_${PN}-container += "\
Signature · 10 lines
Kind regards,
Martin Hundebøll
Embedded Linux Consultant

+45 61 65 54 61
[email protected]

Geanix ApS
https://geanix.com
DK39600706
#4 lore raw

PATCH v2 1/1 systemd: enable portabled by default

In reply to [email protected]

From: Luca Boccassi <[email protected]>

portable services have been declared production ready with v241, so enable by default and install the files in the main package.

---
v2: Just enable by default, and let the files be installed in the main package
as requested by reviewers.

 meta/recipes-core/systemd/systemd_242.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_242.bb +1 -0
index 73e03c7a77..f15d125bf8 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
     nss \
     nss-mymachines \
     nss-resolve \
+    portabled \
     quotacheck \
     randomseed \
     resolved \
Signature · 1 line
2.20.1
#5 lore raw

Re: [PATCH v2] systemd: enable portabled by default

Quoted 6 lines · On Fri, May 10, 2019 at 5:10 AM <[email protected]> wrote:

From: Luca Boccassi <[email protected]>

portable services have been declared production ready with v241, so enable by default and install the files in the main package.

what is the rationale to enable it by default ?

Quoted 28 lines

---
v2: Just enable by default, and let the files be installed in the main package
as requested by reviewers.

 meta/recipes-core/systemd/systemd_242.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_242.bb +1 -1
index 73e03c7a77..f15d125bf8 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
     nss \
     nss-mymachines \
     nss-resolve \
+    portabled \
     quotacheck \
     randomseed \
     resolved \
--

2.20.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#6 lore raw

Re: [PATCH v2] systemd: enable portabled by default

Quoted 7 lines · Khem Raj

On Fri, May 10, 2019 at 5:10 AM <
[email protected]

Quoted 5 lines

wrote:
From: Luca Boccassi <
[email protected]

Quoted 1 line
Quoted 6 lines
Quoted 4 lines

portable services have been declared production ready with v241, so enable
by default and install the files in the main package.

what is the rationale to enable it by default ?

Hi,

commit ada8a5d9175b disabled it by default because it was experimental:
"Add a new PACKAGECONFIG item 'portabled'. Default to disable it because it's still experimental, according to the announcement letter."

Now it's been declared as stable by upstream, and also given machined and nspawn are enabled by default I don't see a reason why this shouldn't be as well, as they all provide the same "kind" of feature/functionality, albeit on a different level.

Quoted 34 lines
Quoted 34 lines

Signed-off-by: Luca Boccassi <
[email protected]

Quoted 1 line

---
v2: Just enable by default, and let the files be installed in the main package
as requested by reviewers.

 meta/recipes-core/systemd/systemd_242.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_242.bb +1 -1
index 73e03c7a77..f15d125bf8 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
     nss \
     nss-mymachines \
     nss-resolve \
+    portabled \
     quotacheck \
     randomseed \
     resolved \
--

2.20.1

--
_______________________________________________
Openembedded-core mailing list
[email protected]

http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 2 lines
Kind regards,
Luca Boccassi
#7 lore raw

Re: [PATCH v2] systemd: enable portabled by default

Quoted 17 lines · Luca Boccassi
Quoted 7 lines · Khem Raj

On Fri, May 10, 2019 at 5:10 AM <
[email protected]

Quoted 5 lines

wrote:
From: Luca Boccassi <
[email protected]

Quoted 1 line
Quoted 6 lines
Quoted 4 lines

portable services have been declared production ready with v241, so enable
by default and install the files in the main package.

what is the rationale to enable it by default ?

Hi,

Quoted 9 lines

commit ada8a5d9175b disabled it by default because it was experimental:
"Add a new PACKAGECONFIG item 'portabled'. Default to disable it because it's still experimental, according to the announcement letter."

Now it's been declared as stable by upstream, and also given machined and nspawn are enabled by default I don't see a reason why this shouldn't be as well, as they all provide the same "kind" of feature/functionality, albeit on a different level.

Ok being stable is a good thing I agree but I still fail to understand why make it default I am for disabling nspawn and machined as well

Quoted 40 lines
Quoted 28 lines
Quoted 28 lines

Signed-off-by: Luca Boccassi <
[email protected]

Quoted 1 line

---
v2: Just enable by default, and let the files be installed in the main package
as requested by reviewers.

 meta/recipes-core/systemd/systemd_242.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_242.bb +1 -1
index 73e03c7a77..f15d125bf8 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
     nss \
     nss-mymachines \
     nss-resolve \
+    portabled \
     quotacheck \
     randomseed \
     resolved \
--

2.20.1

Quoted 7 lines
Quoted 7 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]

http://lists.openembedded.org/mailman/listinfo/openembedded-core

--
Kind regards,
Luca Boccassi

#8 lore raw

Re: [PATCH v2] systemd: enable portabled by default

Quoted 35 lines · Khem Raj
Quoted 24 lines · Luca Boccassi
Quoted 8 lines · Khem Raj

On Fri, May 10, 2019 at 5:10 AM <
[email protected]

Quoted 6 lines

wrote:
From: Luca Boccassi <
[email protected]

Quoted 1 line

portable services have been declared production ready with

v241, so

Quoted 5 lines
Quoted 3 lines

enable
by default and install the files in the main package.

what is the rationale to enable it by default ?

Hi,

commit ada8a5d9175b disabled it by default because it was experimental:
"Add a new PACKAGECONFIG item 'portabled'. Default to disable it because it's still experimental, according to the announcement letter."

Quoted 6 lines

Now it's been declared as stable by upstream, and also given machined
and nspawn are enabled by default I don't see a reason why this shouldn't be as well, as they all provide the same "kind" of feature/functionality, albeit on a different level.

Quoted 3 lines

Ok being stable is a good thing I agree but I still fail to understand why make it default I am for disabling nspawn and machined as well

Simply that as long as nspawn and machined are enabled by default, there's no reason to do something different for portable services, in my opinion. At the moment they are enabled, hence this patch.

Quoted 38 lines
Quoted 36 lines
Quoted 5 lines
Quoted 5 lines

Signed-off-by: Luca Boccassi <
[email protected]

Quoted 1 line

---
v2: Just enable by default, and let the files be installed in

the

Quoted 22 lines
Quoted 22 lines

main package
as requested by reviewers.

 meta/recipes-core/systemd/systemd_242.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_242.bb +1 -1
index 73e03c7a77..f15d125bf8 100644
@@ -81,6 +81,7 @@ PACKAGECONFIG ??= " \
     nss \
     nss-mymachines \
     nss-resolve \
+    portabled \
     quotacheck \
     randomseed \
     resolved \
--

2.20.1

Quoted 6 lines
Quoted 6 lines

--
_______________________________________________
Openembedded-core mailing list
[email protected]

http://lists.openembedded.org/mailman/listinfo/openembedded-core

Quoted 1 line
Quoted 1 line
Signature · 2 lines
Kind regards,
Luca Boccassi
#9 lore raw

PATCH v3 1/1 python*-setuptools: add separate packages for pkg_resources module

In reply to [email protected]

From: Luca Boccassi <[email protected]>

The pkg_resources Python module is useful by itself, for example for automatic loading of resources shipped in a Python package. Add separate packages for it, so that users can depend on them individually and avoid pulling in the entire setuptools, which include scripts to download other packages, which might not be desired on minimal images.

Other distributions like Debian and Ubuntu already split setuptools and pkg-resources in this way.

The setuptools packages now depend on the new pkg-resources packages, to avoid regressions for other packages that depend on them already.

---

v2: restrict new RDEPENDS to class-target. As advised by Alexander, bitbake
cannot resolve native rdeps that mention package names rather than recipe names.
v3: manually add RPROVIDES to the native class instead of restricting the
RDEPENDS to the target class as a better workaround. Also document why the package is being split.

 meta/recipes-devtools/python/python-setuptools.inc | 11 +++++++++++
 1 file changed, 11 insertions(+)
meta/recipes-devtools/python/python-setuptools.inc +11 -0
index 357aa07086..f49e078697 100644
@@ -37,3 +37,14 @@ do_install_prepend() {
 }
 
 BBCLASSEXTEND = "native nativesdk"
+
+# The pkg-resources module can be used by itself, without the package downloader
+# and easy_install. Ship it in a separate package so that it can be used by
+# minimal distributions.
+PACKAGES =+ "${PYTHON_PN}-pkg-resources "
+FILES_${PYTHON_PN}-pkg-resources = "${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
+# Due to the way OE-Core implemented native recipes, the native class cannot
+# have a dependency on something that is not a recipe name. Work around that by
+# manually setting RPROVIDES.
+RDEPENDS_${PN}_append = " ${PYTHON_PN}-pkg-resources"
+RPROVIDES_append_class-native = " ${PYTHON_PN}-pkg-resources-native"
Signature · 1 line
2.20.1
#10 lore raw

Re: [PATCH v3] python*-setuptools: add separate packages for pkg_resources module

Quoted 60 lines · On Tue, 2019-05-21 at 13:34 +0100, [email protected] wrote:

From: Luca Boccassi <
[email protected]

Quoted 1 line

The pkg_resources Python module is useful by itself, for example for automatic loading of resources shipped in a Python package. Add separate packages for it, so that users can depend on them individually and avoid pulling in the entire setuptools, which include scripts to download other packages, which might not be desired on minimal images.

Other distributions like Debian and Ubuntu already split setuptools and pkg-resources in this way.

The setuptools packages now depend on the new pkg-resources packages, to avoid regressions for other packages that depend on them already.

Signed-off-by: Luca Boccassi <
[email protected]

Quoted 1 line

---

v2: restrict new RDEPENDS to class-target. As advised by Alexander, bitbake
cannot resolve native rdeps that mention package names rather
than
recipe names.
v3: manually add RPROVIDES to the native class instead of restricting the
RDEPENDS to the target class as a better workaround. Also
document why
the package is being split.

 meta/recipes-devtools/python/python-setuptools.inc | 11 +++++++++++
 1 file changed, 11 insertions(+)
meta/recipes-devtools/python/python-setuptools.inc +2 -0
index 357aa07086..f49e078697 100644
@@ -37,3 +37,14 @@ do_install_prepend() {
 }
 
 BBCLASSEXTEND = "native nativesdk"
+
+# The pkg-resources module can be used by itself, without the

package downloader
+# and easy_install. Ship it in a separate package so that it can be used by

meta/recipes-devtools/python/python-setuptools.inc +3 -0
+# minimal distributions.
+PACKAGES =+ "${PYTHON_PN}-pkg-resources "
+FILES_${PYTHON_PN}-pkg-resources =

"${PYTHON_SITEPACKAGES_DIR}/pkg_resources/*"
+# Due to the way OE-Core implemented native recipes, the native class cannot
+# have a dependency on something that is not a recipe name. Work around that by

meta/recipes-devtools/python/python-setuptools.inc do_install_prepend() { · line 50

Quoted 3 lines
meta/recipes-devtools/python/python-setuptools.inc +3 -0
+# manually setting RPROVIDES.
+RDEPENDS_${PN}_append = " ${PYTHON_PN}-pkg-resources"
+RPROVIDES_append_class-native = " ${PYTHON_PN}-pkg-resources-native"

Sorry, wrong in-reply-to, resending.

Signature · 2 lines
Kind regards,
Luca Boccassi