Skip to contentSkip to conversation

systemd: added python-systemd package generation.

PATCH Superseded Yevhen Kyriukha 3 participants 4 messages Apr 5, 2013

v1 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: added python-systemd package generation.

---
 meta/recipes-core/systemd/systemd_199.bb |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
meta/recipes-core/systemd/systemd_199.bb +17 -4
index ba1d133..2a3d351 100644
@@ -10,12 +10,18 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 python"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
 
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d pythonnative python-dir
+
+# need to export these variables for python-config to work
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
 
 SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            file://touchscreen.rules \
@@ -63,9 +69,9 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --disable-coredump \
                  --disable-introspection \
                  --disable-tcpwrap \
+                 --with-python \
                  --enable-split-usr \
                  --disable-microhttpd \
-                 --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
                  ac_cv_path_KILL=${base_bindir}/kill \
                "
@@ -114,7 +120,7 @@ python populate_packages_prepend (){
 }
 PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install"
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install python-${PN} python-${PN}-dbg python-${PN}-staticdev"
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"
@@ -124,6 +130,13 @@ FILES_${PN}-analyze = "${base_bindir}/systemd-analyze"
 FILES_${PN}-initramfs = "/init"
 RDEPENDS_${PN}-initramfs = "${PN}"
 
+FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.py* ${PYTHON_SITEPACKAGES_DIR}/systemd/*.so"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-staticdev = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.la"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-dbg = "${PYTHON_SITEPACKAGES_DIR}/systemd/.debug"
+RDEPENDS_python-${PN} = "python-core"
+
 FILES_${PN}-gui = "${bindir}/systemadm"
 
 FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 50 lines · Yevhen Kyriukha
---
 meta/recipes-core/systemd/systemd_199.bb |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
meta/recipes-core/systemd/systemd_199.bb +10 -4
index ba1d133..2a3d351 100644
@@ -10,12 +10,18 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 python"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
 
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d pythonnative python-dir
+
+# need to export these variables for python-config to work
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
 
 SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            file://touchscreen.rules \
@@ -63,9 +69,9 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --disable-coredump \
                  --disable-introspection \
                  --disable-tcpwrap \
+                 --with-python \
                  --enable-split-usr \
                  --disable-microhttpd \
-                 --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
                  ac_cv_path_KILL=${base_bindir}/kill \
                "
@@ -114,7 +120,7 @@ python populate_packages_prepend (){
 }
 PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install"
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install python-${PN} python-${PN}-dbg python-${PN}-staticdev"
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"

meta/recipes-core/systemd/systemd_199.bb FILES_${PN}-analyze = "${base_bindir}/systemd-analyze" · line 138

Quoted 9 lines
meta/recipes-core/systemd/systemd_199.bb +6 -0
@@ -124,6 +130,13 @@ FILES_${PN}-analyze = "${base_bindir}/systemd-analyze"
 FILES_${PN}-initramfs = "/init"
 RDEPENDS_${PN}-initramfs = "${PN}"
 
+FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.py* ${PYTHON_SITEPACKAGES_DIR}/systemd/*.so"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-staticdev = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.la"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-dbg = "${PYTHON_SITEPACKAGES_DIR}/systemd/.debug"
+RDEPENDS_python-${PN} = "python-core"

You have 3x RDEPENDS_python-${PN} (maybe you wanted -dbg and -staticdev, but those do not need python-core imho).

It's more common to start with ${PN}, but maybe it makes sense with python- prefix if you think about it as python module not systemd package...

Quoted 12 lines
meta/recipes-core/systemd/systemd_199.bb +1 -0
+
 FILES_${PN}-gui = "${bindir}/systemadm"
 
 FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \
Signature · 7 lines
1.7.9.5


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#2 lore raw

2013/4/6 Martin Jansa <[email protected]>

Quoted 82 lines · Yevhen Kyriukha
Quoted 50 lines
---
 meta/recipes-core/systemd/systemd_199.bb |   21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)
meta/recipes-core/systemd/systemd_199.bb +10 -4
index ba1d133..2a3d351 100644
@@ -10,12 +10,18 @@ PROVIDES = "udev"
 
 PE = "1"
 
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 python"
 DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 
 SECTION = "base/shell"
 
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d pythonnative python-dir
+
+# need to export these variables for python-config to work
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
 
 SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
            file://touchscreen.rules \
@@ -63,9 +69,9 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                  --disable-coredump \
                  --disable-introspection \
                  --disable-tcpwrap \
+                 --with-python \
                  --enable-split-usr \
                  --disable-microhttpd \
-                 --without-python \
                  --with-sysvrcnd-path=${sysconfdir} \
                  ac_cv_path_KILL=${base_bindir}/kill \
                "
@@ -114,7 +120,7 @@ python populate_packages_prepend (){
 }
 PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install"
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install python-${PN} python-${PN}-dbg python-${PN}-staticdev"
 
 USERADD_PACKAGES = "${PN}"
 GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"

meta/recipes-core/systemd/systemd_199.bb FILES_${PN}-analyze = "${base_bindir}/systemd-analyze" · line 138

Quoted 9 lines
meta/recipes-core/systemd/systemd_199.bb +6 -0
@@ -124,6 +130,13 @@ FILES_${PN}-analyze = "${base_bindir}/systemd-analyze"
 FILES_${PN}-initramfs = "/init"
 RDEPENDS_${PN}-initramfs = "${PN}"
 
+FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.py* ${PYTHON_SITEPACKAGES_DIR}/systemd/*.so"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-staticdev = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.la"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-dbg = "${PYTHON_SITEPACKAGES_DIR}/systemd/.debug"
+RDEPENDS_python-${PN} = "python-core"

You have 3x RDEPENDS_python-${PN} (maybe you wanted -dbg and -staticdev, but those do not need python-core imho).

It's more common to start with ${PN}, but maybe it makes sense with python- prefix if you think about it as python module not systemd package...

Quoted 8 lines
meta/recipes-core/systemd/systemd_199.bb +1 -1
+
 FILES_${PN}-gui = "${bindir}/systemadm"
 
 FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \
--

1.7.9.5

Quoted 4 lines

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

Quoted 6 lines

--
Martin 'JaMa' Jansa jabber: [email protected]

You have 3x RDEPENDS_python-${PN} (maybe you wanted -dbg and -staticdev, but those do not need python-core imho).

Yes, I meant -dbg and -staticdev. I don't know what to write in RDEPENDS for these packages.

Quoted 3 lines

It's more common to start with ${PN}, but maybe it makes sense with python- prefix if you think about it as python module not systemd package...

It's python package that is an interface to some systemd functionality therefore I named it "python-systemd".

I'll send new version of this patch as I found some missing rdepends.

Regards,
Yevhen

#3 lore raw
In reply to Martin Jansa
Quoted 11 lines · Martin Jansa
Quoted 10 lines · Yevhen Kyriukha
---
  meta/recipes-core/systemd/systemd_199.bb |   21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
meta/recipes-core/systemd/systemd_199.bb +0 -0
index ba1d133..2a3d351 100644
@@ -10,12 +10,18 @@ PROVIDES = "udev"
 
Quoted 6 lines

meta/recipes-core/systemd/systemd_199.bb PROVIDES = "udev" · line 15

Quoted 6 lines
meta/recipes-core/systemd/systemd_199.bb +1 -1
  PE = "1"
 
-DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0"
+DEPENDS = "kmod docbook-sgml-dtd-4.1-native intltool-native gperf-native acl readline dbus libcap libcgroup tcp-wrappers glib-2.0 python"
  DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
 

I am going to defer this for 1.5, as it's a little late in the 1.4 cycle to make this kind of change. I would also like you to consider making it a PACKAGECONFIG, instead of hard wiring it.

If someone wants to create a minimal system with systemd, they might not want to have python pulled in also, so making it more optional would be better.

Thanks
Sau!

Quoted 71 lines
Quoted 34 lines
meta/recipes-core/systemd/systemd_199.bb +9 -3
  SECTION = "base/shell"
 
-inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d
+inherit gtk-doc useradd pkgconfig autotools perlnative update-rc.d pythonnative python-dir
+
+# need to export these variables for python-config to work
+export BUILD_SYS
+export HOST_SYS
+export STAGING_INCDIR
+export STAGING_LIBDIR
 
  SRC_URI = "http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz \
             file://touchscreen.rules \
@@ -63,9 +69,9 @@ EXTRA_OECONF = " --with-rootprefix=${base_prefix} \
                   --disable-coredump \
                   --disable-introspection \
                   --disable-tcpwrap \
+                 --with-python \
                   --enable-split-usr \
                   --disable-microhttpd \
-                 --without-python \
                   --with-sysvrcnd-path=${sysconfdir} \
                   ac_cv_path_KILL=${base_bindir}/kill \
                 "
@@ -114,7 +120,7 @@ python populate_packages_prepend (){
  }
  PACKAGES_DYNAMIC += "^lib(udev|gudev|systemd).*"
 
-PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install"
+PACKAGES =+ "${PN}-gui ${PN}-vconsole-setup ${PN}-initramfs ${PN}-analyze ${PN}-kernel-install python-${PN} python-${PN}-dbg python-${PN}-staticdev"
 
  USERADD_PACKAGES = "${PN}"
  GROUPADD_PARAM_${PN} = "-r lock; -r systemd-journal"

meta/recipes-core/systemd/systemd_199.bb FILES_${PN}-analyze = "${base_bindir}/systemd-analyze" · line 138

Quoted 9 lines
meta/recipes-core/systemd/systemd_199.bb +6 -0
@@ -124,6 +130,13 @@ FILES_${PN}-analyze = "${base_bindir}/systemd-analyze"
  FILES_${PN}-initramfs = "/init"
  RDEPENDS_${PN}-initramfs = "${PN}"
 
+FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.py* ${PYTHON_SITEPACKAGES_DIR}/systemd/*.so"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-staticdev = "${PYTHON_SITEPACKAGES_DIR}/systemd/*.la"
+RDEPENDS_python-${PN} = "python-core"
+FILES_python-${PN}-dbg = "${PYTHON_SITEPACKAGES_DIR}/systemd/.debug"
+RDEPENDS_python-${PN} = "python-core"

You have 3x RDEPENDS_python-${PN} (maybe you wanted -dbg and -staticdev, but those do not need python-core imho).

It's more common to start with ${PN}, but maybe it makes sense with python- prefix if you think about it as python module not systemd package...

Quoted 8 lines
meta/recipes-core/systemd/systemd_199.bb +1 -1
+
  FILES_${PN}-gui = "${bindir}/systemadm"
 
  FILES_${PN}-vconsole-setup = "${systemd_unitdir}/systemd-vconsole-setup \
--

1.7.9.5

Quoted 4 lines

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

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