Skip to contentSkip to conversation

openldap: pass correct URANDOM_DEVICE to CPPFLAGS

PATCH In review Yi Zhao 2 participants 3 messages Jun 11, 2022 – Jun 13, 2022

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/1 openldap: pass correct URANDOM_DEVICE to CPPFLAGS

We encountered a runtime error with slappasswd:

$ slappasswd -s foo
Password generation failed for scheme {SSHA}:

This is because the URANDOM_DEVICE is not passed to CPPFLAGS correctly, then the program can not open /dev/urandom.

---
 meta-oe/recipes-support/openldap/openldap_2.5.12.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/openldap/openldap_2.5.12.bb +1 -1
index a0ca2b5d3..c01db08e4 100644
@@ -131,7 +131,7 @@ PACKAGES += "${PN}-overlay-proxycache"
 # Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS:
 # This allows tls to obtain random bits from /dev/urandom, by default
 # it was disabled for cross-compiling.
-CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\' -fPIC"
+CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\\"/dev/urandom\\" -fPIC"
 
 LDFLAGS:append = " -pthread"
 
Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · Yi Zhao

We encountered a runtime error with slappasswd:

$ slappasswd -s foo
Password generation failed for scheme {SSHA}:

This is because the URANDOM_DEVICE is not passed to CPPFLAGS correctly, then the program can not open /dev/urandom.

backport to kirkstone?

-armin

Quoted 26 lines
---
  meta-oe/recipes-support/openldap/openldap_2.5.12.bb | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/openldap/openldap_2.5.12.bb +1 -2
index a0ca2b5d3..c01db08e4 100644
@@ -131,7 +131,7 @@ PACKAGES += "${PN}-overlay-proxycache"
  # Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS:
  # This allows tls to obtain random bits from /dev/urandom, by default
  # it was disabled for cross-compiling.
-CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\' -fPIC"
+CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\\"/dev/urandom\\" -fPIC"
 
  LDFLAGS:append = " -pthread"
 
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#97472): https://lists.openembedded.org/g/openembedded-devel/message/97472
Mute This Topic: https://lists.openembedded.org/mt/91688155/3616698
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw
Quoted 7 lines · Armin Kuster
Quoted 4 lines · Yi Zhao

We encountered a runtime error with slappasswd:

$ slappasswd -s foo
Password generation failed for scheme {SSHA}:
Quoted 6 lines
Quoted 4 lines

This is because the URANDOM_DEVICE is not passed to CPPFLAGS correctly, then the program can not open /dev/urandom.

backport to kirkstone?

The issue is introduced by commit b2261dbb956b1124ccef8ae22fbcb6375071fffd which is not included in kirkstone.

//Yi

Quoted 32 lines

-armin

Quoted 16 lines

---
  meta-oe/recipes-support/openldap/openldap_2.5.12.bb | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/openldap/openldap_2.5.12.bb +1 -3
index a0ca2b5d3..c01db08e4 100644
@@ -131,7 +131,7 @@ PACKAGES += "${PN}-overlay-proxycache"
   # Append URANDOM_DEVICE='/dev/urandom' to CPPFLAGS:
   # This allows tls to obtain random bits from /dev/urandom, by default
   # it was disabled for cross-compiling.
-CPPFLAGS:append = " -D_GNU_SOURCE -DURANDOM_DEVICE=\'/dev/urandom\' 
-fPIC"
+CPPFLAGS:append = " -D_GNU_SOURCE 
-DURANDOM_DEVICE=\\"/dev/urandom\\" -fPIC"
Quoted 4 lines

    LDFLAGS:append = " -pthread"

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#97473): https://lists.openembedded.org/g/openembedded-devel/message/97473
Mute This Topic: https://lists.openembedded.org/mt/91688155/3616783
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-