Skip to contentSkip to conversation

ntp : Convert libcap use from PACKAGECONFIG to hard DEPEND.

PATCH In review Philip Balister 3 participants 3 messages Apr 23, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ntp : Convert libcap use from PACKAGECONFIG to hard DEPEND.

If ntp is built without libcap, it refuses to start with the following message:

Starting ntpd: /usr/sbin/ntpd: The ``user'' option has been disabled -- built without --enable-clockctl or --enable-linuxcaps
ntpd - NTP daemon program - Ver. 4.2.6p5
USAGE: ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]...

---
 meta-networking/recipes-support/ntp/ntp.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta-networking/recipes-support/ntp/ntp.inc +3 -2
index 9c3e0d1..b8e9853 100644
@@ -29,20 +29,21 @@ inherit autotools update-rc.d useradd systemd
 
 # The ac_cv_header_readline_history is to stop ntpdc depending on either
 # readline or curses
-EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no --with-binsubdir=sbin"
+EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no --with-binsubdir=sbin --enable-linuxcaps"
 CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
 
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ntp \
                        --shell /bin/false --user-group ntp"
 
+DEPEND = "libcap"
+
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
                           --with-openssl-incdir=${STAGING_INCDIR} \
                           --with-crypto, \
                           --without-openssl --without-crypto, \
                           openssl"
-PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
 PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
 
 do_install_append() {
Signature · 1 line
1.9.0
#1 lore raw
Quoted 5 lines · Philip Balister

If ntp is built without libcap, it refuses to start with the following message:

Starting ntpd: /usr/sbin/ntpd: The ``user'' option has been disabled -- built without --enable-clockctl or --enable-linuxcaps

Aside from the DEPEND thing, wouldn't it be better to just avoid the "--user" option if building without libcap?

p.

#2 lore raw
In reply to Philip Balister
Quoted 3 lines · Philip Balister

If ntp is built without libcap, it refuses to start with the following message:

Why don't you just add cap to default PACKAGECONFIG? someone can add PACKAGECONFIG for clockctl later and use that instead of linuxcaps.

Quoted 46 lines

Starting ntpd: /usr/sbin/ntpd: The ``user'' option has been disabled -- built without --enable-clockctl or --enable-linuxcaps
ntpd - NTP daemon program - Ver. 4.2.6p5
USAGE: ntpd [ -<flag> [<val>] | --<name>[{=| }<val>] ]...

---
 meta-networking/recipes-support/ntp/ntp.inc | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
meta-networking/recipes-support/ntp/ntp.inc +3 -2
index 9c3e0d1..b8e9853 100644
@@ -29,20 +29,21 @@ inherit autotools update-rc.d useradd systemd
 
 # The ac_cv_header_readline_history is to stop ntpdc depending on either
 # readline or curses
-EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no --with-binsubdir=sbin"
+EXTRA_OECONF += "--with-net-snmp-config=no --without-ntpsnmpd ac_cv_header_readline_history_h=no --with-binsubdir=sbin --enable-linuxcaps"
 CFLAGS_append = " -DPTYS_ARE_GETPT -DPTYS_ARE_SEARCHED"
 
 USERADD_PACKAGES = "${PN}"
 USERADD_PARAM_${PN} = "--system --home-dir /var/lib/ntp \
                        --shell /bin/false --user-group ntp"
 
+DEPEND = "libcap"
+
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[openssl] = "--with-openssl-libdir=${STAGING_LIBDIR} \
                           --with-openssl-incdir=${STAGING_INCDIR} \
                           --with-crypto, \
                           --without-openssl --without-crypto, \
                           openssl"
-PACKAGECONFIG[cap] = "--enable-linuxcaps,--disable-linuxcaps,libcap"
 PACKAGECONFIG[readline] = "--with-lineeditlibs,--without-lineeditlibs,readline"
 
 do_install_append() {
Signature · 7 lines
1.9.0

-- 
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]