Skip to contentSkip to conversation

package/systemd: add fdisk support

PATCH New James Hilliard 3 participants 3 messages Mar 8, 2020 – Apr 12, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/systemd: add fdisk support

---
 package/systemd/systemd.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/systemd/systemd.mk +6 -0
index 22165de2c1..526c749191 100644
@@ -125,6 +125,12 @@ else
 SYSTEMD_CONF_OPTS += -Dpam=false
 endif
 
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),y)
+SYSTEMD_CONF_OPTS += -Dfdisk=true
+else
+SYSTEMD_CONF_OPTS += -Dfdisk=false
+endif
+
 ifeq ($(BR2_PACKAGE_VALGRIND),y)
 SYSTEMD_DEPENDENCIES += valgrind
 SYSTEMD_CONF_OPTS += -Dvalgrind=true
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 package/systemd: add fdisk support

Hi James,

Quoted 10 lines · James Hilliard
---
 package/systemd/systemd.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/systemd/systemd.mk +0 -0
index 22165de2c1..526c749191 100644

package/systemd/systemd.mk else · line 131

Quoted 7 lines
package/systemd/systemd.mk +4 -0
@@ -125,6 +125,12 @@ else
 SYSTEMD_CONF_OPTS += -Dpam=false
 endif
 
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),y)
+SYSTEMD_CONF_OPTS += -Dfdisk=true
+else
+SYSTEMD_CONF_OPTS += -Dfdisk=false

Since BR2_PACKAGE_UTIL_LINUX_BINARIES -> BR2_PACKAGE_UTIL_LINUX_LIBFDISK is selected, the 'else' part is dead code. I'd rather have BR2_PACKAGE_SYSTEMD select BR2_PACKAGE_UTIL_LINUX_LIBFDISK directly, and make -Dfdisk=true unconditional.

baruch

package/systemd/systemd.mk else · line 136

Quoted 5 lines
package/systemd/systemd.mk +2 -0
+endif
+
 ifeq ($(BR2_PACKAGE_VALGRIND),y)
 SYSTEMD_DEPENDENCIES += valgrind
 SYSTEMD_CONF_OPTS += -Dvalgrind=true

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

#2 lore raw

PATCH 1/1 package/systemd: add fdisk support

In reply to James Hilliard
Quoted 4 lines · On Sun, 8 Mar 2020 17:18:22 -0600 James Hilliard <[email protected]>…
---
 package/systemd/systemd.mk | 6 ++++++
 1 file changed, 6 insertions(+)

I have seen the comment from Baruch, and I admit I hesitated a bit as well. However, the fact that UTIL_LINUX_BINARIES selects UTIL_LINUX_LIBFDISK can be seen as some "internal" detail of util-linux. It makes sense to keep things simple and simply enable/disable the -Dfdisk option depending on the availability of the libfdisk library. It was not a super strong feeling from me though, so if anybody disagree, I'm definitely willing to reconsider.

In the mean time, I've applied to master. Thanks!

Thomas

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