diff mbox series

[meta-oe,PATCHv2] cups-pk-helper: add recipe

Message ID 20230124054024.11634-1-f_l_k@t-online.de
State Under Review
Headers show
Series [meta-oe,PATCHv2] cups-pk-helper: add recipe | expand

Commit Message

Markus Volk Jan. 24, 2023, 5:40 a.m. UTC
cups-pk-helper is a runtime dependency for gnome-control-center
or system-config-printer.

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 .../recipes-printing/cups/cups-pk-helper_0.2.7.bb | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb

Comments

Markus Volk Jan. 24, 2023, 7:03 a.m. UTC | #1
Another thing I've forgot since I created this recipe some time ago. 
There is an issue with gettext.
cups-pk-helper wants to created a localized 
'org.opensuse.cupspkhelper.mechanism.policy' file from an according 
policy.in.
For that it would be required to build polkit-native and then there's 
still a problem, because polkit installes the polkit.its file in 
${STAGING_DATADIR_NATIVE}/gettext while gettext creates a wrapper that 
uses ${STAGING_DATADIR_NATIVE}/gettext-${PV}and the needed its-rule 
still can't be found:

| 
/home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/cups-pk-helper/0.2.7-r0/recipe-sysroot-native/usr/bin/msgfmt: 
cannot locate ITS rules for 
../cups-pk-helper-0.2.7/src/org.opensuse.cupspkhelper.mechanism.policy.in
| [45/59] 
/home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/cups-pk-helper/0.2.7-r0/recipe-sysroot-native/usr/bin/gdbus-codegen 
--c-generate-autocleanup all --interface-prefix 
org.opensuse.CupsPkHelper. --c-namespace CphIface 
--c-generate-object-manager --header --output src/cph-iface-mechanism.h 
../cups-pk-helper-0.2.7/src/cups-pk-helper-mechanism.xml
| [46/59] 
/home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/cups-pk-helper/0.2.7-r0/recipe-sysroot-native/usr/bin/gdbus-codegen 
--c-generate-autocleanup all --interface-prefix 
org.opensuse.CupsPkHelper. --c-namespace CphIface 
--c-generate-object-manager --body --output src/cph-iface-mechanism.c 
../cups-pk-helper-0.2.7/src/cups-pk-helper-mechanism.xml
| ninja: build stopped: subcommand failed

I'd like to fix this but am unsure, what would be the best way to to 
it. Any suggestions ? I instinctively tend to completely wipe that 
${PV} from gettext directory because I really disslike dynamically 
changing directory names.

Another reasonable and simple fix for this is to patch meson not to try 
localization, just copy the policy.in file to policy and live with the 
fact, that its english only

Am Di, 24. Jan 2023 um 06:41:07 +0100 schrieb Markus Volk 
<f_l_k@t-online.de>:
> v2 adds polkit to REQUIRED_DISTRO_FEATURES
> 
> Am Di, 24. Jan 2023 um 06:40:24 +0100 schrieb Markus Volk 
> <f_l_k@t-online.de>:
>> cups-pk-helper is a runtime dependency for gnome-control-center
>> or system-config-printer.
>> 
>> Signed-off-by: Markus Volk <f_l_k@t-online.de 
>> <mailto:f_l_k@t-online.de>>
>> ---
>>  .../recipes-printing/cups/cups-pk-helper_0.2.7.bb | 15 
>> +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>  create mode 100644 
>> meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
>> 
>> diff --git a/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb 
>> b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
>> new file mode 100644
>> index 000000000..9639a123d
>> --- /dev/null
>> +++ b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
>> @@ -0,0 +1,15 @@
>> +DESCRIPTION = "CUPS polkit helper"
>> +HOMEPAGE = 
>> "<https://www.freedesktop.org/software/cups-pk-helper/releases/>"
>> +LICENSE = "GPL-2.0-only"
>> +LIC_FILES_CHKSUM = 
>> "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 
>> <file://copying;md5=b234ee4d69f5fce4486a80fdaf4a4263/>
>> +
>> +DEPENDS = "cups polkit glib-2.0 xz intltool-native"
>> +
>> +inherit meson pkgconfig gettext features_check
>> +
>> +REQUIRED_DISTRO_FEATURES = "polkit"
>> +
>> +SRC_URI = 
>> "https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-${PV}.tar.xz 
>> <https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-$%7BPV%7D.tar.xz>"
>> +SRC_URI[sha256sum] = 
>> "66070ddb448fe9fcee76aa26be2ede5a80f85563e3a4afd59d2bfd79fbe2e831"
>> +
>> +FILES:${PN} += "${datadir}"
>> --
>> 2.34.1
>>
Markus Volk Jan. 25, 2023, 7:50 a.m. UTC | #2
What seemed quite logical in theory did not pass the practical test. I 
can't find the error in the localization so far. I still send a v3 for 
the patch that disables localization for now. The recipe is still 
pretty useful for being able to enable printers via the gui and grant 
permissions via polkit.

Am Di, 24. Jan 2023 um 08:03:40 +0100 schrieb Markus Volk 
<f_l_k@t-online.de>:
> Another thing I've forgot since I created this recipe some time ago. 
> There is an issue with gettext.
> cups-pk-helper wants to created a localized 
> 'org.opensuse.cupspkhelper.mechanism.policy' file from an according 
> policy.in.
> For that it would be required to build polkit-native and then there's 
> still a problem, because polkit installes the polkit.its file in 
> ${STAGING_DATADIR_NATIVE}/gettext while gettext creates a wrapper 
> that uses ${STAGING_DATADIR_NATIVE}/gettext-${PV}and the needed 
> its-rule still can't be found:
> 
> | 
> /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/cups-pk-helper/0.2.7-r0/recipe-sysroot-native/usr/bin/msgfmt: 
> cannot locate ITS rules for 
> ../cups-pk-helper-0.2.7/src/org.opensuse.cupspkhelper.mechanism.policy.in
> | [45/59] 
> /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/cups-pk-helper/0.2.7-r0/recipe-sysroot-native/usr/bin/gdbus-codegen 
> --c-generate-autocleanup all --interface-prefix 
> org.opensuse.CupsPkHelper. --c-namespace CphIface 
> --c-generate-object-manager --header --output 
> src/cph-iface-mechanism.h 
> ../cups-pk-helper-0.2.7/src/cups-pk-helper-mechanism.xml
> | [46/59] 
> /home/flk/poky/build-intel/tmp/work/corei7-64-poky-linux/cups-pk-helper/0.2.7-r0/recipe-sysroot-native/usr/bin/gdbus-codegen 
> --c-generate-autocleanup all --interface-prefix 
> org.opensuse.CupsPkHelper. --c-namespace CphIface 
> --c-generate-object-manager --body --output src/cph-iface-mechanism.c 
> ../cups-pk-helper-0.2.7/src/cups-pk-helper-mechanism.xml
> | ninja: build stopped: subcommand failed
> 
> I'd like to fix this but am unsure, what would be the best way to to 
> it. Any suggestions ? I instinctively tend to completely wipe that 
> ${PV} from gettext directory because I really disslike dynamically 
> changing directory names.
> 
> Another reasonable and simple fix for this is to patch meson not to 
> try localization, just copy the policy.in file to policy and live 
> with the fact, that its english only
> 
> Am Di, 24. Jan 2023 um 06:41:07 +0100 schrieb Markus Volk 
> <f_l_k@t-online.de>:
>> v2 adds polkit to REQUIRED_DISTRO_FEATURES
>> 
>> Am Di, 24. Jan 2023 um 06:40:24 +0100 schrieb Markus Volk 
>> <f_l_k@t-online.de>:
>>> cups-pk-helper is a runtime dependency for gnome-control-center
>>> or system-config-printer.
>>> 
>>> Signed-off-by: Markus Volk <f_l_k@t-online.de 
>>> <mailto:f_l_k@t-online.de>>
>>> ---
>>>  .../recipes-printing/cups/cups-pk-helper_0.2.7.bb | 15 
>>> +++++++++++++++
>>>  1 file changed, 15 insertions(+)
>>>  create mode 100644 
>>> meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
>>> 
>>> diff --git a/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb 
>>> b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
>>> new file mode 100644
>>> index 000000000..9639a123d
>>> --- /dev/null
>>> +++ b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
>>> @@ -0,0 +1,15 @@
>>> +DESCRIPTION = "CUPS polkit helper"
>>> +HOMEPAGE = 
>>> "<https://www.freedesktop.org/software/cups-pk-helper/releases/>"
>>> +LICENSE = "GPL-2.0-only"
>>> +LIC_FILES_CHKSUM = 
>>> "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" 
>>> <file://copying;md5=b234ee4d69f5fce4486a80fdaf4a4263/>
>>> +
>>> +DEPENDS = "cups polkit glib-2.0 xz intltool-native"
>>> +
>>> +inherit meson pkgconfig gettext features_check
>>> +
>>> +REQUIRED_DISTRO_FEATURES = "polkit"
>>> +
>>> +SRC_URI = 
>>> "https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-${PV}.tar.xz 
>>> <https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-$%7BPV%7D.tar.xz>"
>>> +SRC_URI[sha256sum] = 
>>> "66070ddb448fe9fcee76aa26be2ede5a80f85563e3a4afd59d2bfd79fbe2e831"
>>> +
>>> +FILES:${PN} += "${datadir}"
>>> --
>>> 2.34.1
>>>
diff mbox series

Patch

diff --git a/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
new file mode 100644
index 000000000..9639a123d
--- /dev/null
+++ b/meta-oe/recipes-printing/cups/cups-pk-helper_0.2.7.bb
@@ -0,0 +1,15 @@ 
+DESCRIPTION = "CUPS polkit helper"
+HOMEPAGE = "https://www.freedesktop.org/software/cups-pk-helper/releases/"
+LICENSE = "GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
+
+DEPENDS = "cups polkit glib-2.0 xz intltool-native"
+
+inherit meson pkgconfig gettext features_check
+
+REQUIRED_DISTRO_FEATURES = "polkit"
+
+SRC_URI = "https://www.freedesktop.org/software/cups-pk-helper/releases/cups-pk-helper-${PV}.tar.xz"
+SRC_URI[sha256sum] = "66070ddb448fe9fcee76aa26be2ede5a80f85563e3a4afd59d2bfd79fbe2e831"
+
+FILES:${PN} += "${datadir}"