Skip to contentSkip to conversation

package/polkit: bump to version 0.116

PATCH New aduskett at gmail.com 3 participants 20 messages Dec 6, 2019 – Feb 9, 2020

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/6 package/polkit: bump to version 0.116

From: Adam Duskett <[email protected]>

Other changes:
- Add spidermonkey as a dependency.
- Add 0001-make-netgroup-support-optional.patch to allow building on musl.
- Add a runtime dependency on dbus.
- Add --disable-libelongind.
- Add --disable-libsystemd-login.
- Update dependencies for systemd pam support.
- Update dependencies for udisks.

---
changes v1 -> v6:
- Add depends on BR2_HOST_GCC_AT_LEAST_4_9 to the following:
- package/polkit/Config.in
- package/systemd/Config.in
- package/udisks/Config.in

 DEVELOPERS                                    |   1 +
 .../0001-make-netgroup-support-optional.patch | 232 ++++++++++++++++++
 package/polkit/Config.in                      |  25 +-
 package/polkit/polkit.hash                    |   2 +-
 package/polkit/polkit.mk                      |   8 +-
 package/systemd/Config.in                     |  16 +-
 package/udisks/Config.in                      |  27 +-
 7 files changed, 293 insertions(+), 18 deletions(-)
 create mode 100644 package/polkit/0001-make-netgroup-support-optional.patch
DEVELOPERS +1 -0
index e9546a7299..d5fd6e0e93 100644
@@ -53,6 +53,7 @@ F:	package/openjdk/
 F:	package/openjdk-bin/
 F:	package/php/
 F:	package/policycoreutils/
+F:	package/polkit/
 F:	package/python3/
 F:	package/python-aioredis/
 F:	package/python-asgiref/
package/polkit/0001-make-netgroup-support-optional.patch new file +232 -0

232 lines not on this page · raw message

package/polkit/Config.in +20 -5
index ac17cb4dc3..cc7cb03c40 100644
@@ -1,11 +1,18 @@
 config BR2_PACKAGE_POLKIT
 	bool "polkit"
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # spidermonkey
+	depends on BR2_INSTALL_LIBSTDCPP # spidermonkey
+	depends on BR2_PACKAGE_DBUS # runtime
+	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS # spidermonkey
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # spidermonkey
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # spidermonkey
 	depends on BR2_USE_MMU # libglib2
-	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
-	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_USE_WCHAR # libglib2
-	select BR2_PACKAGE_LIBGLIB2
+	depends on !BR2_STATIC_LIBS # spidermonkey
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # spidermonkey
 	select BR2_PACKAGE_EXPAT
+	select BR2_PACKAGE_LIBGLIB2
+	select BR2_PACKAGE_SPIDERMONKEY
 	help
 	  PolicyKit is a toolkit for defining and handling
 	  authorizations. It is used for allowing unprivileged
@@ -13,6 +20,14 @@ config BR2_PACKAGE_POLKIT
 
 	  http://www.freedesktop.org/wiki/Software/polkit
 
-comment "polkit needs a toolchain w/ wchar, threads"
+comment "polkit needs a glibc or musl toolchain with C++, wchar, dynamic library, NPTL, gcc >= 4.9"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_PACKAGE_DBUS
+	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_USES_UCLIBC || \
+		!BR2_INSTALL_LIBSTDCPP || \
+		BR2_STATIC_LIBS || \
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
+		!BR2_HOST_GCC_AT_LEAST_4_9 || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+		!BR2_USE_WCHAR
package/polkit/polkit.hash +1 -1
index 6368091c4a..bacd682139 100644
@@ -1,5 +1,5 @@
 # Locally calculated after checking pgp signature
-sha256	8fdc7cc8ba4750fcce1a4db9daa759c12afebc7901237e1c993c38f08985e1df	polkit-0.105.tar.gz
+sha256	88170c9e711e8db305a12fdb8234fac5706c61969b94e084d0f117d8ec5d34b1	polkit-0.116.tar.gz
 
 # Locally calculated
 sha256	d2e2aa973e29c75e1b492e67ea7b7da9de2d501d49a934657971fd74f9a0b0a8	COPYING
package/polkit/polkit.mk +5 -3
index fb4c171c52..507d1865fa 100644
@@ -4,20 +4,22 @@
 #
 ################################################################################
 
-POLKIT_VERSION = 0.105
+POLKIT_VERSION = 0.116
 POLKIT_SITE = http://www.freedesktop.org/software/polkit/releases
 POLKIT_LICENSE = GPL-2.0
 POLKIT_LICENSE_FILES = COPYING
 
 POLKIT_INSTALL_STAGING = YES
 
-POLKIT_DEPENDENCIES = libglib2 host-intltool expat
+POLKIT_DEPENDENCIES = libglib2 host-intltool expat spidermonkey
 
 # We could also support --with-authfw=pam
 POLKIT_CONF_OPTS = \
 	--with-authfw=shadow \
 	--with-os-type=unknown \
 	--disable-man-pages \
-	--disable-examples
+	--disable-examples \
+	--disable-libelogind \
+	--disable-libsystemd-login
 
 $(eval $(autotools-package))
package/systemd/Config.in +13 -3
index aef39abe27..356c9bbbb3 100644
@@ -275,7 +275,12 @@ config BR2_PACKAGE_SYSTEMD_NETWORKD
 
 config BR2_PACKAGE_SYSTEMD_POLKIT
 	bool "enable polkit support"
-	depends on BR2_TOOLCHAIN_USES_GLIBC # polkit
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # spidermonkey
+	depends on BR2_INSTALL_LIBSTDCPP # polkit -> spidermonkey
+	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS # polkit -> spidermonkey
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # polkit -> spidermonkey
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # polkit -> spidermonkey
+	depends on BR2_USE_WCHAR # libglib2
 	select BR2_PACKAGE_POLKIT
 	help
 	  If enabled, systemd is built with polkit support and policy
@@ -285,8 +290,13 @@ config BR2_PACKAGE_SYSTEMD_POLKIT
 
 	  http://wiki.freedesktop.org/www/Software/polkit/
 
-comment "polkit support needs a glibc toolchain"
-	depends on !BR2_TOOLCHAIN_USES_GLIBC
+comment "polkit support needs a toolchain with C++, wchar, NPTL, gcc >= 4.9"
+	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
+		!BR2_HOST_GCC_AT_LEAST_4_9 || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+		!BR2_USE_WCHAR
 
 config BR2_PACKAGE_SYSTEMD_QUOTACHECK
 	bool "enable quotacheck tools"
package/udisks/Config.in +21 -6
index c1e5538fb5..4037f0ba9e 100644
@@ -1,11 +1,15 @@
 config BR2_PACKAGE_UDISKS
 	bool "udisks"
+	depends on BR2_HOST_GCC_AT_LEAST_4_9 # spidermonkey
+	depends on BR2_INSTALL_LIBSTDCPP # spidermonkey
 	depends on BR2_PACKAGE_HAS_UDEV
-	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2
-	depends on BR2_TOOLCHAIN_USES_GLIBC # polkit, lvm2
+	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS # spidermonkey
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # spidermonkey
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # polkit
 	depends on BR2_USE_MMU # lvm2
-	depends on !BR2_STATIC_LIBS # lvm2
 	depends on BR2_USE_WCHAR # dbus-glib -> glib2
+	depends on !BR2_TOOLCHAIN_USES_UCLIBC # polkit, lvm2
+	depends on !BR2_STATIC_LIBS # lvm2, spidermonkey
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_GLIB
 	select BR2_PACKAGE_SG3_UTILS
@@ -30,17 +34,28 @@ if BR2_PACKAGE_UDISKS
 
 config BR2_PACKAGE_UDISKS_LVM2
 	bool "lvm2 support"
+	# The lvm app library can't compile agianst musl
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_LVM2_APP_LIBRARY
 	help
 	  Enable LVM2 support
 
+comment "lvm2 support needs a glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
 endif
 
 comment "udisks needs udev /dev management"
 	depends on BR2_USE_MMU
 	depends on !BR2_PACKAGE_HAS_UDEV
 
-comment "udisks needs a glibc toolchain w/ wchar, threads, dynamic library"
+comment "udisks needs a glibc or musl toolchain with C++, wchar, dynamic library, NPTL, gcc >= 4.9"
 	depends on BR2_USE_MMU
-	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		BR2_STATIC_LIBS || !BR2_TOOLCHAIN_USES_GLIBC
+	depends on BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS
+	depends on BR2_TOOLCHAIN_USES_UCLIBC || \
+		!BR2_INSTALL_LIBSTDCPP || \
+		BR2_STATIC_LIBS || \
+		!BR2_TOOLCHAIN_HAS_THREADS_NPTL || \
+		!BR2_HOST_GCC_AT_LEAST_4_9 || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+		!BR2_USE_WCHAR
Signature · 1 line
2.23.0
#1 lore raw

PATCH v6 2/6 package/polkit: support different authentication frameworks

From: Adam Duskett <[email protected]>

Use pam if available, otherwise use shadow.

---
 package/polkit/polkit.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
package/polkit/polkit.mk +6 -2
index 507d1865fa..7791d23d19 100644
@@ -13,13 +13,17 @@ POLKIT_INSTALL_STAGING = YES
 
 POLKIT_DEPENDENCIES = libglib2 host-intltool expat spidermonkey
 
-# We could also support --with-authfw=pam
 POLKIT_CONF_OPTS = \
-	--with-authfw=shadow \
 	--with-os-type=unknown \
 	--disable-man-pages \
 	--disable-examples \
 	--disable-libelogind \
 	--disable-libsystemd-login
 
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+POLKIT_CONF_OPTS += --with-authfw=pam
+else
+POLKIT_CONF_OPTS += --with-authfw=shadow
+endif
+
 $(eval $(autotools-package))
Signature · 1 line
2.23.0
#2 lore raw

PATCH v6 2/6 package/polkit: support different authentication frameworks

Quoted 8 lines · On Fri, 6 Dec 2019 15:46:45 -0800 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

Use pam if available, otherwise use shadow.

---
 package/polkit/polkit.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH v6 3/6 package/polkit: add systemd service file.

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

- Add polkit.service for systemd based systems.
- Add a polkitd user upon which /usr/lib/polkit-1/polkitd relies.
- Set appropriate directory permissions to allow the polkitd user to access rules and actions.
- Set appropriate default attributes for the pkexec binary.

---
Changes v1 -> v5:
- Add a [install] section to the servie file (J?r?my)

 package/polkit/polkit.mk      | 18 ++++++++++++++++++
 package/polkit/polkit.service | 10 ++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 package/polkit/polkit.service
package/polkit/polkit.mk +18 -0
index 7791d23d19..b440cd2f1c 100644
@@ -26,4 +26,22 @@ else
 POLKIT_CONF_OPTS += --with-authfw=shadow
 endif
 
+define POLKIT_USERS
+	polkitd -1 polkitd -1 * - - - Polkit Daemon
+endef
+
+define POLKIT_PERMISSIONS
+	/etc/polkit-1 r 750 root polkitd - - - - -
+	/usr/share/polkit-1 r 750 root polkitd - - - - -
+	/usr/bin/pkexec f 4755 root root - - - - -
+endef
+
+define POLKIT_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 644 package/polkit/polkit.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/polkit.service
+	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
+	ln -sf ../../../../usr/lib/systemd/system/polkit.service \
+		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/polkit.service
+endef
+
 $(eval $(autotools-package))
package/polkit/polkit.service new file +10 -0
new file mode 100644
index 0000000000..977b4acc5f
@@ -0,0 +1,10 @@
+[Unit]
+Description=Authorization Manager
+
+[Service]
+Type=dbus
+BusName=org.freedesktop.PolicyKit1
+ExecStart=/usr/lib/polkit-1/polkitd --no-debug
+
+[Install]
+WantedBy=multi-user.target
Signature · 1 line
2.23.0
#4 lore raw

PATCH v6 3/6 package/polkit: add systemd service file.

Quoted 3 lines · On Fri, 6 Dec 2019 15:46:46 -0800 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

- Add polkit.service for systemd based systems.

Why aren't you using the one from polkit itself? There is one in data/polkit.service.in, which gets compiled to polkit.service, and apparently installed if HAVE_SYSTEMD is enabled. There also a D-Bus service file at data/org.freedesktop.PolicyKit1.service.in.

Quoted 4 lines

- Add a polkitd user upon which /usr/lib/polkit-1/polkitd relies.
- Set appropriate directory permissions to allow the polkitd user to access rules and actions.
- Set appropriate default attributes for the pkexec binary.

These could be done separately from the systemd service file addition.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

PATCH v6 3/6 package/polkit: add systemd service file.

Thomas

Quoted 4 lines · Thomas Petazzoni

On Fri, 6 Dec 2019 15:46:46 -0800
aduskett at gmail.com wrote:

Quoted 8 lines
Quoted 3 lines

From: Adam Duskett <[email protected]>

- Add polkit.service for systemd based systems.

Why aren't you using the one from polkit itself? There is one in data/polkit.service.in, which gets compiled to polkit.service, and apparently installed if HAVE_SYSTEMD is enabled. There also a D-Bus service file at data/org.freedesktop.PolicyKit1.service.in.

I guess I could.

Quoted 8 lines
Quoted 5 lines

- Add a polkitd user upon which /usr/lib/polkit-1/polkitd relies.
- Set appropriate directory permissions to allow the polkitd user to access rules and actions.
- Set appropriate default attributes for the pkexec binary.

These could be done separately from the systemd service file addition.

No, they can't. The user is required to access those particular directories during
the service startup.

I explained that in IRC.

Quoted 5 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

I don't have time to make a new patch set, so I am going to just mark the entire patch series as rejected and move on.

If anybody else wants to resurrect this patch series they may do so.

Adam

#6 lore raw

PATCH v6 3/6 package/polkit: add systemd service file.

Hello,

Quoted 12 lines · On Sun, 8 Dec 2019 10:46:58 -0800 Adam Duskett <[email protected]> wrote:
Quoted 4 lines

Why aren't you using the one from polkit itself? There is one in data/polkit.service.in, which gets compiled to polkit.service, and apparently installed if HAVE_SYSTEMD is enabled. There also a D-Bus service file at data/org.freedesktop.PolicyKit1.service.in.

I guess I could.

Quoted 6 lines
Quoted 5 lines

- Add a polkitd user upon which /usr/lib/polkit-1/polkitd relies.
- Set appropriate directory permissions to allow the polkitd user to access rules and actions.
- Set appropriate default attributes for the pkexec binary.

Quoted 5 lines
Quoted 2 lines

These could be done separately from the systemd service file addition.

No, they can't. The user is required to access those particular directories during
the service startup.

They can be added before, as a separate patch. Note that if I hadn't come up with the systemd unit question, I would have applied as-is.

Quoted 4 lines

I don't have time to make a new patch set, so I am going to just mark the entire patch series as rejected and move on.

If anybody else wants to resurrect this patch series they may do so.

That's a bit said. What you've done is very good, it includes additional test cases.

I'm surprised you're giving up at v6. polkit was a complicated topic, other folks tried in the past, and gave up way before they reached the point where you are now, which is essentially very close to what can be merged.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#7 lore raw

PATCH v6 3/6 package/polkit: add systemd service file.

Quoted 40 lines · Thomas Petazzoni

Hello,

Quoted 12 lines · On Sun, 8 Dec 2019 10:46:58 -0800 Adam Duskett <[email protected]> wrote:
Quoted 4 lines

Why aren't you using the one from polkit itself? There is one in data/polkit.service.in, which gets compiled to polkit.service, and apparently installed if HAVE_SYSTEMD is enabled. There also a D-Bus service file at data/org.freedesktop.PolicyKit1.service.in.

I guess I could.

Quoted 6 lines
Quoted 5 lines

- Add a polkitd user upon which /usr/lib/polkit-1/polkitd relies.
- Set appropriate directory permissions to allow the polkitd user to access rules and actions.
- Set appropriate default attributes for the pkexec binary.

Quoted 5 lines
Quoted 2 lines

These could be done separately from the systemd service file addition.

No, they can't. The user is required to access those particular directories during
the service startup.

They can be added before, as a separate patch. Note that if I hadn't come up with the systemd unit question, I would have applied as-is.

Quoted 4 lines

I don't have time to make a new patch set, so I am going to just mark the entire patch series as rejected and move on.

If anybody else wants to resurrect this patch series they may do so.

That's a bit said. What you've done is very good, it includes additional test cases.

I'm surprised you're giving up at v6. polkit was a complicated topic, other folks tried in the past, and gave up way before they reached the point where you are now, which is essentially very close to what can be merged.

Quoted 7 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

I appreciate the compliment, however, I do get frustrated because I tend to submit complicated
patches that sit for weeks, months or even years without any feedback. Polkit is a pretty big exception
to this rule, and I do appreciate the fairly quick review.

I just fear that if I spend time making a v7, the patch set will sit for months without any feedback, or if there is
then I will submit a v8 which will include the fixes requested, and then another maintainer will chime in with
more requested fixes even though they didn't say anything to the previous patch set when it has been sitting
without feedback for months. This has been a pain point for me for quite some time.

I understand we are all volunteers with families and lives, however this also means that more complicated patches
get either zero reviews, sit for very long periods of time, or are never reviewed at all. This makes me really apprehensive about submitting anything other than simple fixes and version bumps that require nothing other than a version/hash update from now on.

I will see if I can apply your requested fixes in the meantime.

Adam

#8 lore raw

PATCH v6 3/6 package/polkit: add systemd service file.

Quoted 74 lines · Adam Duskett
Quoted 40 lines · Thomas Petazzoni

Hello,

Quoted 12 lines · On Sun, 8 Dec 2019 10:46:58 -0800 Adam Duskett <[email protected]> wrote:
Quoted 4 lines

Why aren't you using the one from polkit itself? There is one in data/polkit.service.in, which gets compiled to polkit.service, and apparently installed if HAVE_SYSTEMD is enabled. There also a D-Bus service file at data/org.freedesktop.PolicyKit1.service.in.

I guess I could.

Quoted 6 lines
Quoted 5 lines

- Add a polkitd user upon which /usr/lib/polkit-1/polkitd relies.
- Set appropriate directory permissions to allow the polkitd user to access rules and actions.
- Set appropriate default attributes for the pkexec binary.

Quoted 5 lines
Quoted 2 lines

These could be done separately from the systemd service file addition.

No, they can't. The user is required to access those particular directories during
the service startup.

They can be added before, as a separate patch. Note that if I hadn't come up with the systemd unit question, I would have applied as-is.

Quoted 4 lines

I don't have time to make a new patch set, so I am going to just mark the entire patch series as rejected and move on.

If anybody else wants to resurrect this patch series they may do so.

That's a bit said. What you've done is very good, it includes additional test cases.

I'm surprised you're giving up at v6. polkit was a complicated topic, other folks tried in the past, and gave up way before they reached the point where you are now, which is essentially very close to what can be merged.

Quoted 7 lines

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

I appreciate the compliment, however, I do get frustrated because I tend to submit complicated
patches that sit for weeks, months or even years without any feedback. Polkit is a pretty big exception
to this rule, and I do appreciate the fairly quick review.

I just fear that if I spend time making a v7, the patch set will sit for months without any feedback, or if there is
then I will submit a v8 which will include the fixes requested, and then another maintainer will chime in with
more requested fixes even though they didn't say anything to the previous patch set when it has been sitting
without feedback for months. This has been a pain point for me for quite some time.

I understand we are all volunteers with families and lives, however this also means that more complicated patches
get either zero reviews, sit for very long periods of time, or are never reviewed at all. This makes me really apprehensive about submitting anything other than simple fixes and version bumps that require nothing other than a version/hash update from now on.

Quoted 3 lines

I will see if I can apply your requested fixes in the meantime.

Adam

As a side note: I know my patches aren't perfect, so I also understand that not a lot of people even want to review them in the first place.

Adam

#9 lore raw

PATCH v6 4/6 support/testing: add polkit systemd test

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

This test is a simple integration test of the polkit package on systems running systemd.

It consists of the following:
- The brtest user attempts to restart the systemd-timesyncd service and is denied.

- A systemd-timesyncd-restart.rules file provided by polkit-rules-test-systemd is copied from /root/ to /etc/polkit-1/rules.d

- The brtest user attempts to restart the systemd-timesyncd service and should now succeed.

---
Changes v1 -> v5:
- Reorder this patch in the series.
- Add test to .gitlab-ci.yml
- Instead of a seperate test file for both systemd and initd, use just a single file called test_polkit.py.

Changes v5 -> v6:
- Use self.assertRunOk in test_polkit.py
- Flake8 cleanup.

 .gitlab-ci.yml                                |  1 +
 DEVELOPERS                                    |  2 +
 .../package/br2-external/polkit/Config.in     |  1 +
 .../package/br2-external/polkit/external.desc |  1 +
 .../package/br2-external/polkit/external.mk   |  1 +
 .../polkit-rules-test-systemd/Config.in       |  6 +++
 .../polkit-rules-test-systemd.mk              | 20 ++++++++
 .../systemd-timesyncd-restart.rules           |  7 +++
 support/testing/tests/package/test_polkit.py  | 48 +++++++++++++++++++
 9 files changed, 87 insertions(+)
 create mode 100644 support/testing/tests/package/br2-external/polkit/Config.in
 create mode 100644 support/testing/tests/package/br2-external/polkit/external.desc
 create mode 100644 support/testing/tests/package/br2-external/polkit/external.mk
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-systemd/Config.in
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-systemd/polkit-rules-test-systemd.mk
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-systemd/systemd-timesyncd-restart.rules
 create mode 100644 support/testing/tests/package/test_polkit.py
.gitlab-ci.yml +1 -0
index 6deb97351b..475d205d4a 100644
@@ -425,6 +425,7 @@ tests.package.test_perl_libwww_perl.TestPerllibwwwperl: { extends: .runtime_test
 tests.package.test_perl_mail_dkim.TestPerlMailDKIM: { extends: .runtime_test }
 tests.package.test_perl_x10.TestPerlX10: { extends: .runtime_test }
 tests.package.test_perl_xml_libxml.TestPerlXMLLibXML: { extends: .runtime_test }
+tests.package.test_polkit.TestPolkitSystemd: { extends: .runtime_test }
 tests.package.test_prosody.TestProsodyLua51: { extends: .runtime_test }
 tests.package.test_prosody.TestProsodyLuajit: { extends: .runtime_test }
 tests.package.test_python.TestPython2: { extends: .runtime_test }
DEVELOPERS +2 -0
index d5fd6e0e93..e63773c261 100644
@@ -76,6 +76,8 @@ F:	package/setools/
 F:	package/sngrep/
 F:	package/spidermonkey/
 F:	package/systemd/
+F:	support/testing/tests/package/br2-external/polkit/
+F:	support/testing/tests/package/test_polkit.py
 F:	support/testing/tests/package/test_python_gobject.py
 
 N:	Adam Heinrich <[email protected]>
support/testing/tests/package/br2-external/polkit/Config.in new file +1 -0
new file mode 100644
index 0000000000..bb555b5097
@@ -0,0 +1 @@
+source "$BR2_EXTERNAL_POLKIT_PATH/package/polkit-rules-test-systemd/Config.in"
support/testing/tests/package/br2-external/polkit/external.desc new file +1 -0
new file mode 100644
index 0000000000..ecef48692b
@@ -0,0 +1 @@
+name: POLKIT
support/testing/tests/package/br2-external/polkit/external.mk new file +1 -0
new file mode 100644
index 0000000000..64e369cce4
@@ -0,0 +1 @@
+include $(sort $(wildcard $(BR2_EXTERNAL_POLKIT_PATH)/package/*/*.mk))
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-systemd/Config.in new file +6 -0
new file mode 100644
index 0000000000..662b991d3b
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_POLKIT_RULES_TEST_SYSTEMD
+	bool "polkit rules test for systemd"
+	depends on BR2_PACKAGE_POLKIT
+	help
+	  Simple test to ensure polkit is loading and enforcing rules
+	  correctly using a rules file meant for systemd.
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-systemd/polkit-rules-test-systemd.mk new file +20 -0
new file mode 100644
index 0000000000..19a6be2b2f
@@ -0,0 +1,20 @@
+################################################################################
+#
+# polkit-rules-test-systemd
+#
+################################################################################
+
+POLKIT_RULES_TEST_SYSTEMD_DEPENDENCIES = polkit
+
+define POLKIT_RULES_TEST_SYSTEMD_USERS
+	brtest  -1  brtest  -1   =password  /home/brtest /bin/sh brtest
+endef
+
+define POLKIT_RULES_TEST_SYSTEMD_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/etc/polkit-1/rules.d
+
+	$(INSTALL) -D $(POLKIT_RULES_TEST_SYSTEMD_PKGDIR)/systemd-timesyncd-restart.rules \
+		$(TARGET_DIR)/root/systemd-timesyncd-restart.rules
+endef
+
+$(eval $(generic-package))
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-systemd/systemd-timesyncd-restart.rules new file +7 -0
new file mode 100644
index 0000000000..9461195091
@@ -0,0 +1,7 @@
+polkit.addRule(function(action, subject) {
+    if (action.id == "org.freedesktop.systemd1.manage-units" &&
+        action.lookup("unit") == "systemd-timesyncd.service" &&
+        subject.user == "brtest") {
+        return polkit.Result.YES;
+    }
+});
support/testing/tests/package/test_polkit.py new file +48 -0

48 lines not on this page · raw message

Signature · 1 line
2.23.0
#10 lore raw

PATCH v6 4/6 support/testing: add polkit systemd test

Quoted 4 lines · On Fri, 6 Dec 2019 15:46:47 -0800 aduskett at gmail.com wrote:
support/testing/tests/package/test_polkit.py new file +4 -0
+class TestPolkitSystemd(infra.basetest.BRTest):
+    br2_external = [infra.filepath("tests/package/br2-external/polkit")]
+    config = \
+        """

support/testing/tests/package/test_polkit.py line 18

Quoted 10 lines
support/testing/tests/package/test_polkit.py new file +10 -0
+        BR2_aarch64=y
+        BR2_TOOLCHAIN_EXTERNAL=y
+        BR2_INIT_SYSTEMD=y
+        BR2_JLEVEL=10
+        BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
+        BR2_LINUX_KERNEL=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+        BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.19.86"
+        BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+        BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"

This requires building the kernel, while the test infrastructure provides two pre-compiled kernels, one for ARMv7 and one for ARMv5. Isn't it possible to use them ?

support/testing/tests/package/test_polkit.py line 42

Quoted 5 lines
support/testing/tests/package/test_polkit.py new file +5 -0
+    def test_run(self):
+        self.login()
+
+        cmd = "su brtest -c '/bin/systemctl restart systemd-timesyncd.service'"
+        self.assertRunOk(cmd, timeout=10)

I'm confused, shouldn't this command fail, since it's executed before you copy the rule at the right place ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#11 lore raw

PATCH v6 5/6 package/polkit: add init service file

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

Add a S50polkit file which starts polkit for non-systemd based systems.

---
Changes v1 -> v5:
- Use start-stop-daemon in the init file. (Thomas)
- Reorder this patch in the series.

 package/polkit/S50polkit | 15 +++++++++++++++
 package/polkit/polkit.mk |  5 +++++
 2 files changed, 20 insertions(+)
 create mode 100644 package/polkit/S50polkit
package/polkit/S50polkit new file +15 -0
new file mode 100644
index 0000000000..55c10e99ae
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# start polkitd
+#
+
+case "$1" in
+	start)
+		start-stop-daemon -q -S -x /usr/lib/polkit-1/polkitd -- --no-debug &
+		;;
+	*)
+  echo "Usage: $0 {start}"
+		exit 1
+esac
+
+exit $?
package/polkit/polkit.mk +5 -0
index b440cd2f1c..8bb4512aee 100644
@@ -44,4 +44,9 @@ define POLKIT_INSTALL_INIT_SYSTEMD
 		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/polkit.service
 endef
 
+define POLKIT_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 0755 package/polkit/S50polkit \
+		$(TARGET_DIR)/etc/init.d/S50polkit
+endef
+
 $(eval $(autotools-package))
Signature · 1 line
2.23.0
#12 lore raw

PATCH v6 5/6 package/polkit: add init service file

Hello,

+Carlos in Cc for the review of the init script.

Quoted 6 lines · On Fri, 6 Dec 2019 15:46:48 -0800 aduskett at gmail.com wrote:
package/polkit/S50polkit new file +0 -0
new file mode 100644
index 0000000000..55c10e99ae

package/polkit/S50polkit line 8

Quoted 8 lines
package/polkit/S50polkit new file +8 -0
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# start polkitd
+#
+
+case "$1" in
+	start)
+		start-stop-daemon -q -S -x /usr/lib/polkit-1/polkitd -- --no-debug &

Why is the & necessary at this end ?

I think this init script deserves a comment that explains why it doesn't follow the traditional pattern for init scripts.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#13 lore raw

PATCH v6 5/6 package/polkit: add init service file

Quoted 28 lines · Thomas Petazzoni

Hello,

+Carlos in Cc for the review of the init script.

Quoted 6 lines · On Fri, 6 Dec 2019 15:46:48 -0800 aduskett at gmail.com wrote:
package/polkit/S50polkit new file +0 -0
new file mode 100644
index 0000000000..55c10e99ae

package/polkit/S50polkit line 8

Quoted 8 lines
package/polkit/S50polkit new file +8 -0
@@ -0,0 +1,15 @@
+#!/bin/sh
+#
+# start polkitd
+#
+
+case "$1" in
+     start)
+             start-stop-daemon -q -S -x /usr/lib/polkit-1/polkitd -- --no-debug &

Why is the & necessary at this end ?

I think this init script deserves a comment that explains why it doesn't follow the traditional pattern for init scripts.

Quoted 7 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Why is a polkitd init script requited if, according to the man page

DESCRIPTION
polkitd provides the org.freedesktop.PolicyKit1 D-Bus service on the system message bus. Users or administrators should never need to start this daemon as it will be automatically started by dbus-daemon(1) or systemd(1) whenever an application calls into the service.

Signature · 1 line
Carlos Santos <[email protected]>
#14 lore raw

PATCH v6 6/6 support/testing: add polkit initd test

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

This test is a simple integration test of the polkit package on systems running systemd.

It consists of the following:
- The brtest user attempts to restart the systemd-timesyncd service and is denied.

- A systemd-timesyncd-restart.rules file provided by polkit-rules-test-systemd is copied from /root/ to /etc/polkit-1/rules.d

- The brtest user attempts to restart the systemd-timesyncd service and should now succeed.

---
Changes v1 -> v5:
- Reorder this patch in the series.
- Add test to .gitlab-ci.yml
- Instead of a seperate test file, add the test to test_polkit.py in another class.

Changes v5 -> v6:
- Use self.assertRunOk in test_polkit.py
- Flake8 cleanup.

 .gitlab-ci.yml                                |  1 +
 .../package/br2-external/polkit/Config.in     |  1 +
 .../package/polkit-rules-test-initd/Config.in |  6 +++
 .../polkit-rules-test-initd/hello-polkit.c    |  6 +++
 .../hello-polkit.policy                       | 14 +++++
 .../hello-polkit.rules                        |  6 +++
 .../polkit-rules-test-initd.mk                | 31 +++++++++++
 support/testing/tests/package/test_polkit.py  | 51 +++++++++++++++++++
 8 files changed, 116 insertions(+)
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/Config.in
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/hello-polkit.c
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/hello-polkit.policy
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/hello-polkit.rules
 create mode 100644 support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/polkit-rules-test-initd.mk
.gitlab-ci.yml +1 -0
index 475d205d4a..448ba140ae 100644
@@ -426,6 +426,7 @@ tests.package.test_perl_mail_dkim.TestPerlMailDKIM: { extends: .runtime_test }
 tests.package.test_perl_x10.TestPerlX10: { extends: .runtime_test }
 tests.package.test_perl_xml_libxml.TestPerlXMLLibXML: { extends: .runtime_test }
 tests.package.test_polkit.TestPolkitSystemd: { extends: .runtime_test }
+tests.package.test_polkit.TestPolkitInitd: { extends: .runtime_test }
 tests.package.test_prosody.TestProsodyLua51: { extends: .runtime_test }
 tests.package.test_prosody.TestProsodyLuajit: { extends: .runtime_test }
 tests.package.test_python.TestPython2: { extends: .runtime_test }
support/testing/tests/package/br2-external/polkit/Config.in +1 -0
index bb555b5097..97309b9fca 100644
@@ -1 +1,2 @@
+source "$BR2_EXTERNAL_POLKIT_PATH/package/polkit-rules-test-initd/Config.in"
 source "$BR2_EXTERNAL_POLKIT_PATH/package/polkit-rules-test-systemd/Config.in"
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/Config.in new file +6 -0
new file mode 100644
index 0000000000..f19fc2660d
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_POLKIT_RULES_TEST_INITD
+	bool "polkit rules test for initd"
+	depends on BR2_PACKAGE_POLKIT
+	help
+	  Simple test to ensure polkit is loading and enforcing rules
+	  correctly using initd.
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/hello-polkit.c new file +6 -0
new file mode 100644
index 0000000000..cf5343cd75
@@ -0,0 +1,6 @@
+#include <stdio.h>
+
+int main(void){
+    printf("Hello polkit!\n");
+    return 0;
+}
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/hello-polkit.policy new file +14 -0
new file mode 100644
index 0000000000..8220293175
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC
+ "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
+ "http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
+<policyconfig>
+  <action id="org.freedesktop.policykit.pkexec.hello-polkit">
+    <message>Authentication is required to run the hello world test program</message>
+    <defaults>
+      <allow_inactive>no</allow_inactive>
+      <allow_active>no</allow_active>
+    </defaults>
+    <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/hello-polkit</annotate>
+  </action>
+</policyconfig>
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/hello-polkit.rules new file +6 -0
new file mode 100644
index 0000000000..a0a66f644d
@@ -0,0 +1,6 @@
+polkit.addRule(function(action, subject) {
+   if (action.id == "org.freedesktop.policykit.pkexec.hello-polkit" &&
+       subject.user == "brtest") {
+       return polkit.Result.YES;
+   }
+});
support/testing/tests/package/br2-external/polkit/package/polkit-rules-test-initd/polkit-rules-test-initd.mk new file +31 -0
new file mode 100644
index 0000000000..394c3e4405
@@ -0,0 +1,31 @@
+################################################################################
+#
+# polkit-rules-test-initd
+#
+################################################################################
+
+POLKIT_RULES_TEST_INITD_DEPENDENCIES = polkit
+
+define POLKIT_RULES_TEST_INITD_USERS
+	brtest  -1  brtest  -1   =password  /home/brtest /bin/sh brtest
+endef
+
+define POLKIT_RULES_TEST_INITD_BUILD_CMDS
+	$(INSTALL) -D $(POLKIT_RULES_TEST_INITD_PKGDIR)/hello-polkit.c $(@D)/hello-polkit.c
+	$(TARGET_CC) $(@D)/hello-polkit.c -o $(@D)/hello-polkit
+endef
+
+
+define POLKIT_RULES_TEST_INITD_INSTALL_TARGET_CMDS
+	mkdir -p $(TARGET_DIR)/usr/share/polkit-1/actions/
+	$(INSTALL) -D $(@D)/hello-polkit $(TARGET_DIR)/usr/bin/hello-polkit
+
+	$(INSTALL) -D $(POLKIT_RULES_TEST_INITD_PKGDIR)/hello-polkit.policy \
+		$(TARGET_DIR)/usr/share/polkit-1/actions/hello-polkit.policy
+
+	$(INSTALL) -D $(POLKIT_RULES_TEST_INITD_PKGDIR)/hello-polkit.rules \
+		$(TARGET_DIR)/root/hello-polkit.rules
+
+endef
+
+$(eval $(generic-package))
support/testing/tests/package/test_polkit.py +51 -0

54 lines not on this page · raw message

Signature · 1 line
2.23.0
#15 lore raw

PATCH v6 1/6 package/polkit: bump to version 0.116

In reply to aduskett at gmail.com
Quoted 11 lines · On Fri, 6 Dec 2019 15:46:44 -0800 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

Other changes:
- Add spidermonkey as a dependency.
- Add 0001-make-netgroup-support-optional.patch to allow building on musl.
- Add a runtime dependency on dbus.
- Add --disable-libelongind.
- Add --disable-libsystemd-login.
- Update dependencies for systemd pam support.
- Update dependencies for udisks.

Quoted 7 lines

---
changes v1 -> v6:
- Add depends on BR2_HOST_GCC_AT_LEAST_4_9 to the following:
- package/polkit/Config.in
- package/systemd/Config.in
- package/udisks/Config.in

To do the same as systemd, I changed the "depends on BR2_PACKAGE_DBUS" to a "select BR2_PACKAGE_DBUS", made a few minor tweaks, and applied to master. Thanks a lot for taking care of this difficult package!

One direction that would be nice to look at is to enable spidermonkey and then polkit on uClibc. Regarding the fenv issue, perhaps we could have a boolean that says whether uClibc provides fenv support for the current architecture, and then treat this as an architecture dependency inside BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS ? How many architectures have sufficient fenv support in uClibc for spidermonkey ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#16 lore raw

PATCH v6 1/6 package/polkit: bump to version 0.116

Hello;

Quoted 27 lines · Thomas Petazzoni
Quoted 11 lines · On Fri, 6 Dec 2019 15:46:44 -0800 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

Other changes:
- Add spidermonkey as a dependency.
- Add 0001-make-netgroup-support-optional.patch to allow building on musl.
- Add a runtime dependency on dbus.
- Add --disable-libelongind.
- Add --disable-libsystemd-login.
- Update dependencies for systemd pam support.
- Update dependencies for udisks.

Quoted 7 lines

---
changes v1 -> v6:
- Add depends on BR2_HOST_GCC_AT_LEAST_4_9 to the following:
- package/polkit/Config.in
- package/systemd/Config.in
- package/udisks/Config.in

To do the same as systemd, I changed the "depends on BR2_PACKAGE_DBUS" to a "select BR2_PACKAGE_DBUS", made a few minor tweaks, and applied to master. Thanks a lot for taking care of this difficult package!

Quoted 7 lines

One direction that would be nice to look at is to enable spidermonkey and then polkit on uClibc. Regarding the fenv issue, perhaps we could have a boolean that says whether uClibc provides fenv support for the current architecture, and then treat this as an architecture dependency inside BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS ? How many architectures have sufficient fenv support in uClibc for spidermonkey ?

Not many, Yann and I had a conversation about this earlier and it doesn't seem worth it.

Perhaps instead we could put the same effort into a variable that checks for uclibc fts support.
That way selinux can be enabled with uclibc:

For reference: https://patchwork.ozlabs.org/patch/787786/

Quoted 5 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Adam

#17 lore raw

PATCH v6 1/6 package/polkit: bump to version 0.116

Hello,

Quoted 9 lines · On Sun, 8 Dec 2019 11:04:16 -0800 Adam Duskett <[email protected]> wrote:
Quoted 7 lines

One direction that would be nice to look at is to enable spidermonkey and then polkit on uClibc. Regarding the fenv issue, perhaps we could have a boolean that says whether uClibc provides fenv support for the current architecture, and then treat this as an architecture dependency inside BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS ? How many architectures have sufficient fenv support in uClibc for spidermonkey ?

Not many, Yann and I had a conversation about this earlier and it doesn't seem worth it.

OK.

Quoted 3 lines

Perhaps instead we could put the same effort into a variable that checks for uclibc fts support.
That way selinux can be enabled with uclibc:

SELinux can already be enabled on uClibc. I added the musl-fts package, and used it in libselinux to make it available for uClibc/musl.

When you're grumpy, please verify your claims :-)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#18 lore raw

PATCH v6 1/6 package/polkit: bump to version 0.116

Hello;

Quoted 18 lines · Thomas Petazzoni

Hello,

Quoted 9 lines · On Sun, 8 Dec 2019 11:04:16 -0800 Adam Duskett <[email protected]> wrote:
Quoted 7 lines

One direction that would be nice to look at is to enable spidermonkey and then polkit on uClibc. Regarding the fenv issue, perhaps we could have a boolean that says whether uClibc provides fenv support for the current architecture, and then treat this as an architecture dependency inside BR2_PACKAGE_SPIDERMONKEY_ARCH_SUPPORTS ? How many architectures have sufficient fenv support in uClibc for spidermonkey ?

Not many, Yann and I had a conversation about this earlier and it doesn't seem worth it.

OK.

Quoted 9 lines
Quoted 3 lines

Perhaps instead we could put the same effort into a variable that checks for uclibc fts support.
That way selinux can be enabled with uclibc:

SELinux can already be enabled on uClibc. I added the musl-fts package, and used it in libselinux to make it available for uClibc/musl.

When you're grumpy, please verify your claims :-)

I'm aware of the option, but I don't agree with it. It's built into uClibc and requiring
an extra package is not nice in my opinion.

Quoted 5 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Adam

#19 lore raw

PATCH v6 1/6 package/polkit: bump to version 0.116

Quoted 8 lines · On Mon, 9 Dec 2019 11:03:08 -0800 Adam Duskett <[email protected]> wrote:
Quoted 4 lines

SELinux can already be enabled on uClibc. I added the musl-fts package, and used it in libselinux to make it available for uClibc/musl.

When you're grumpy, please verify your claims :-)

I'm aware of the option, but I don't agree with it. It's built into uClibc and requiring
an extra package is not nice in my opinion.

The <fts.h> API is deprecated, and very few packages use it. It doesn't make a lot of sense to force everybody to have it in uClibc, just for the sake of a few packages.

Alternatively, we could add a separate option to enable FTS support in uClibc when needed, but this stuff always gets annoying with uClibc external toolchains that may or may not have FTS support enabled.

The musl-fts solution is easy. It works for musl, it works for uClibc, regardless of the uClibc configuration.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com