From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-wi0-x232.google.com ([2a00:1450:400c:c05::232]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1YGAnk-000575-JM for ptxdist@pengutronix.de; Tue, 27 Jan 2015 19:23:49 +0100 Received: by mail-wi0-f178.google.com with SMTP id em10so6886713wid.5 for ; Tue, 27 Jan 2015 10:23:43 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20150127075636.GD5565@pengutronix.de> References: <20150127075636.GD5565@pengutronix.de> Date: Tue, 27 Jan 2015 19:23:39 +0100 Message-ID: From: Guillermo Rodriguez Garcia Subject: Re: [ptxdist] ptxdist: BUSYBOX_NTPD blocks NTP Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============0060689346==" Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: "ptxdist@pengutronix.de" --===============0060689346== Content-Type: multipart/alternative; boundary=f46d0444028e9fdcfd050da65acc --f46d0444028e9fdcfd050da65acc Content-Type: text/plain; charset=UTF-8 Hi Michael, 2015-01-27 8:56 GMT+01:00 Michael Olbrich : > On Mon, Jan 26, 2015 at 05:24:55PM +0100, Guillermo Rodriguez Garcia wrote: > > Hello all, > > > > I am using the ntpd applet in busybox but also wanted to enable the > ntpdate > > program (yes I know use of ntpdate is not recommended in general but this > > is for a very specific use case). However I see that ntpdate is part of > the > > "ntp" package and that the ntp package is blocked by BUSYBOX_NTPD. From > > rules/ntp.in: > > > > menuconfig NTP > > tristate > > prompt "ntp " > > select OPENSSL if NTP_CRYPTO > > select ROOTFS_VAR_CACHE if NTP_NTPD > > select LIBC_M > > select LIBC_RT > > select GCCLIBS_GCC_S > > select LIBMD > > depends on !BUSYBOX_NTPD || ALLYES > > > > [...] > > config NTP_NTPDATE > > bool > > prompt "install ntpdate" > > depends on NTP > > > > > > Obviously one would not want to run two ntp services at the same time, > but > > since busybox lacks an ntpdate command, there are cases where one would > > want to use ntpdate from the NTP package while still using Busybox's ntpd > > for everything else. > > > > My question is: Is there any reason why this wouldn't work? Was the > > "depends on !BUSYBOX_NTPD" line added just to avoid the possibility of > the > > two ntp services running at the same time? Or is it there to guard from > > other possible problems/issues? > > We usually add those lines only to prevent two packages from installing the > same file. In this case we have the !BUSYBOX_NTPD check twice, once for the > package and once for ntpd. This is clearly wrong. I don't see a reason why > the check for the packages is needed and I don't remember why I added it. I > suggest you remove the check (and the comment at the end of the file) and > see what happens. > OK, tried just that: Removed the first (package-level) check, then selected ntpdate from the ntp package and ntpd from busybox, rebuilt, tested on the target, and I can confirm that everything works as expected. So I would say that this check can be removed. Thank you, Guillermo Rodriguez Garcia guille.rodriguez@gmail.com --f46d0444028e9fdcfd050da65acc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Michael,

2015-01-27 8:56 GMT+01:00 Michael Olbrich <m.olbri= ch@pengutronix.de>:
On Mon, Jan 26, 2015 at 05:24:55PM +0100, Guillermo Rodriguez = Garcia wrote:
> Hello all,
>
> I am using the ntpd applet in busybox but also wanted to enable the nt= pdate
> program (yes I know use of ntpdate is not recommended in general but t= his
> is for a very specific use case). However I see that ntpdate is part o= f the
> "ntp" package and that the ntp package is blocked by BUSYBOX= _NTPD. From
> rules/ntp.in:
>
> menuconfig NTP
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0tristate
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0prompt "ntp=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0select OPENSSL=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 if NTP_CRYPTO
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0select ROOTFS_VAR_CACHE if NTP_NTPD >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0select LIBC_M
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0select LIBC_RT
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0select GCCLIBS_GCC_S
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0select LIBMD
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0depends on !BUSYBOX_NTPD || ALLYES >
> [...]
> config NTP_NTPDATE
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bool
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0prompt "install ntpdate" >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0depends on NTP
>
>
> Obviously one would not want to run two ntp services at the same time,= but
> since busybox lacks an ntpdate command, there are cases where one woul= d
> want to use ntpdate from the NTP package while still using Busybox'= ;s ntpd
> for everything else.
>
> My question is: Is there any reason why this wouldn't work? Was th= e
> "depends on !BUSYBOX_NTPD" line added just to avoid the poss= ibility of the
> two ntp services running at the same time? Or is it there to guard fro= m
> other possible problems/issues?

We usually add those lines only to prevent two packages from in= stalling the
same file. In this case we have the !BUSYBOX_NTPD check twice, once for the=
package and once for ntpd. This is clearly wrong. I don't see a reason = why
the check for the packages is needed and I don't remember why I added i= t. I
suggest you remove the check (and the comment at the end of the file) and see what happens.

OK, tried just = that: Removed the first (package-level) check, then selected
ntpdate from the ntp package and ntpd from busybox, rebuilt, tested on th= e
target, and I can confirm that everything works as expect= ed. So I would say
that this check can be removed.

Thank you,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com
--f46d0444028e9fdcfd050da65acc-- --===============0060689346== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline -- ptxdist mailing list ptxdist@pengutronix.de --===============0060689346==--