Skip to contentSkip to conversation

upower: use archive file in SRC_URI and fix UPSTREAM_CHECK_URI

PATCH New [email protected] 1 participant 3 messages Dec 12, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 upower: use archive file in SRC_URI and fix UPSTREAM_CHECK_URI

From: Marc Ferland <[email protected]>

upower releases are available as tar.bz2 archives let's use them instead off cloning the whole repo.

Also, fix the UPSTREAM_CHECK regex that changed after revision 0.99.13. The format went from:

    UPOWER_0_99_13

to

    v0.99.14
---
 meta-oe/recipes-support/upower/upower_0.99.17.bb | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta-oe/recipes-support/upower/upower_0.99.17.bb +5 -4
index 0572cc801..5e2f04f31 100644
@@ -11,11 +11,12 @@ DEPENDS = " \
     dbus-glib \
 "
 
-SRC_URI = "git://gitlab.freedesktop.org/upower/upower.git;protocol=https;branch=master"
-SRCREV = "c889154ec8e3e2239db9260d48b2e198d72ba002"
-S = "${WORKDIR}/git"
+SRC_URI = "https://gitlab.freedesktop.org/${BPN}/${BPN}/-/archive/v${PV}/${BPN}-v${PV}.tar.bz2"
+SRC_URI[sha256sum] = "de7177deb2ee23d9c505046c74a856564acab8fd1d39aa1541d123af5a99ca8d"
+S = "${WORKDIR}/${BPN}-v${PV}"
 
-UPSTREAM_CHECK_GITTAGREGEX = "UPOWER_(?P<pver>\d+(\_\d+)+)"
+UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/${BPN}/${BPN}/-/tags"
+UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+(\.\d+)+)"
 
 GIR_MESON_ENABLE_FLAG = "enabled"
 GIR_MESON_DISABLE_FLAG = "disabled"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/3 upower: bump to 1.90.6

From: Marc Ferland <[email protected]>

---
 .../upower/{upower_0.99.17.bb => upower_1.90.6.bb}        | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
 rename meta-oe/recipes-support/upower/{upower_0.99.17.bb => upower_1.90.6.bb} (86%)
meta-oe/recipes-support/upower/upower_1.90.6.bb renamed from meta-oe/recipes-support/upower/upower_0.99.17.bb +7 -1
similarity index 86%
rename from meta-oe/recipes-support/upower/upower_0.99.17.bb
rename to meta-oe/recipes-support/upower/upower_1.90.6.bb
index 5e2f04f31..2cffdc14f 100644
@@ -12,7 +12,7 @@ DEPENDS = " \
 "
 
 SRC_URI = "https://gitlab.freedesktop.org/${BPN}/${BPN}/-/archive/v${PV}/${BPN}-v${PV}.tar.bz2"
-SRC_URI[sha256sum] = "de7177deb2ee23d9c505046c74a856564acab8fd1d39aa1541d123af5a99ca8d"
+SRC_URI[sha256sum] = "aed4e42a21307512ad236ad58d7ee4e0196670c8524a168a0edccdc32964ea0c"
 S = "${WORKDIR}/${BPN}-v${PV}"
 
 UPSTREAM_CHECK_URI = "https://gitlab.freedesktop.org/${BPN}/${BPN}/-/tags"
@@ -43,3 +43,9 @@ FILES:${PN} += " \
     ${datadir}/dbus-1/ \
     ${base_libdir}/udev/* \
 "
+
+do_install:append() {
+    # remove integration tests scripts
+    rm -rf ${D}${datadir}/installed-tests
+    rm -rf ${D}${libexecdir}/upower
+}
Signature · 1 line
2.34.1
#2 lore raw

PATCH 3/3 upower: add polkit PACKAGECONFIG option

In reply to [email protected]

From: Marc Ferland <[email protected]>

Add a PACKAGECONFIG option for polkit. Activate it when DISTRO_FEATURES contains 'polkit'.

---
 meta-oe/recipes-support/upower/upower_1.90.6.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-oe/recipes-support/upower/upower_1.90.6.bb +3 -1
index 2cffdc14f..6d5fa7016 100644
@@ -24,9 +24,10 @@ GTKDOC_MESON_OPTION = "gtk-doc"
 
 inherit meson pkgconfig gtk-doc gettext gobject-introspection systemd
 
-PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
+PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd polkit', d)}"
 PACKAGECONFIG[idevice] = "-Didevice=enabled,-Didevice=disabled,libimobiledevice libplist"
 PACKAGECONFIG[systemd] = "-Dsystemdsystemunitdir=${systemd_system_unitdir},-Dsystemdsystemunitdir=no -Dudevrulesdir=${base_libdir}/udev/rules.d,systemd"
+PACKAGECONFIG[polkit] = "-Dpolkit=enabled,-Dpolkit=disabled,polkit"
 
 EXTRA_OEMESON = " \
     -Dos_backend=linux \
@@ -41,6 +42,7 @@ RDEPENDS:${PN} += "dbus"
 RRECOMMENDS:${PN} += "pm-utils"
 FILES:${PN} += " \
     ${datadir}/dbus-1/ \
+    ${datadir}/polkit-1/ \
     ${base_libdir}/udev/* \
 "
 
Signature · 1 line
2.34.1