From owner-freebsd-ports@freebsd.org Thu Aug 30 17:19:23 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7792510A4A5C for ; Thu, 30 Aug 2018 17:19:23 +0000 (UTC) (envelope-from adamw@adamw.org) Received: from mail-yw1-xc2d.google.com (mail-yw1-xc2d.google.com [IPv6:2607:f8b0:4864:20::c2d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1DD128AFD6 for ; Thu, 30 Aug 2018 17:19:22 +0000 (UTC) (envelope-from adamw@adamw.org) Received: by mail-yw1-xc2d.google.com with SMTP id w202-v6so3912664yww.3 for ; Thu, 30 Aug 2018 10:19:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adamw-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xyq2bgGp1E0p5ubh8IVZOkD6eINdpfuYw/yBTMbUpN4=; b=RzGMkm+WF0Vru265QTmN1B1oHbmPxuDApQ3bYfReThf2eKZpaov6Lj5zdnk7mWNn/a AMivviDzfOEsLzPr+VoAWm32Qfj4RP05qbyX8N+jK389EibJBd2JehfEwXDYNK65sL+7 XM+8jVbscvbXI9ZFo4ZE6Zdp49flaainJMM5QKovsLDjiExjjky27nXdBrr+xzlxecMl hKeoPRXVMS4ckjVh2EhanOtd/ouCrHrne/+vv2EEZcERPPrQDktfvodzv3PVDUQ4Pgho bFf3x5rfC5uSBzOepinXEh41trtIpGeFA47MIWIKq/UB039pDyJiqMX3gwX3rHXPlurD FGlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xyq2bgGp1E0p5ubh8IVZOkD6eINdpfuYw/yBTMbUpN4=; b=mXPtWTI582VqsWjNeV3qUk0XxIOEl8sFOol68z+0CGyrOyL6bsKvNcXiQNPzVyq85a JS1YNaL+xJDacFScOLJ0ZKzg2QJ33Q/Lb5b2LWXpsbAH+GtQ1y2hFtnryIx9283aekjZ jC1Pf5KRPF9Iw4hcznSjtKZKqTfWOlHANeqwSjXGBZyXO0Qs+j7IxkyBr30Q4XNcUNH3 vfbyvuv64yHVv7ubsA0maIMN2tc/4UcmFcdTAYHeckw8Ig0r3brt6jMGDypLqtnkhoVp eEfrET8OcawXMIoFAFgqMBgG2V5HXRYdv30wsQ3YoF+8PYfXXw6NxMRoFWbdDMYBdEcq uQAw== X-Gm-Message-State: APzg51BzMlnyprJR7JF5mFw79IFHXCSj6VLU8Cpk6de4KrtzTGna3y2r WIsSUPC89688gnQUI1lCyaJUhPFwQK5B0FJ5E65CnQ== X-Google-Smtp-Source: ANB0VdYOqMiLqy59739s7hs0eQdVlPht5zwRJTWYzyFExhT/RDxwWzY2S0tIuvow1m8morsgF3beYXvdVJuLDIkBj/4= X-Received: by 2002:a81:4f42:: with SMTP id d63-v6mr6633164ywb.451.1535649562319; Thu, 30 Aug 2018 10:19:22 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Adam Weinberger Date: Thu, 30 Aug 2018 11:19:06 -0600 Message-ID: Subject: Re: Cannot specify ntpd binary in ports with ntpd startup file. To: freebsd@gushi.org Cc: freebsd-ports@freebsd.org, cy@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2018 17:19:23 -0000 On Tue, Aug 28, 2018 at 6:34 PM Dan Mahoney (Gushi) wrote: > > 1) Got the version wrong. I'm on 10.4. > > 2) Forgot a subject. Whoops. > > 3) Forgot to cc maintainer. Doh! > > -Dan > > On Tue, 28 Aug 2018, Dan Mahoney (Gushi) wrote: > > > Hey all, > > > > Funny question. I'm on FreeBSD 11.4, and would like to use the latest > > version of NTP, which is in pkg. > > > > The version in pkg doesn't have a startup script, which I'm not sure is > > supposed to be the case. I know for things like BIND (when it was both in > > base and in ports) you could override the binary in /etc/rc.conf. > > > > However, the version of /etc/rc.d/ntpd in BASE doesn't seem to have the > > ability to override the binary in rc.conf: > > > > name="ntpd" > > rcvar="ntpd_enable" > > command="/usr/sbin/${name}" > > pidfile="/var/run/${name}.pid" > > extra_commands="fetch" > > fetch_cmd="ntpd_fetch_leapfile" > > start_precmd="ntpd_precmd" > > > > What's weirder, is even if I manually modify the /etc/rc.d/ntpd file to point > > at /usr/local/sbin (which I should never have to do), the version in > > /usr/sbin gets started. > > > > root@vortex2:/etc/rc.d # service ntpd start > > Starting ntpd. > > root@vortex2:/etc/rc.d # ps auxwww|grep ntpd > > root 36362 38.3 0.2 26192 18132 - Ss 12:17AM 0:04.73 > > /usr/sbin/ntpd -c /etc/ntp.conf -p /var/run/ntpd.pid -f /var/db/ntpd.drift > > root 36364 0.0 0.0 18844 2328 1 R+ 12:17AM 0:00.00 grep ntpd > > root@vortex2:/etc/rc.d # grep command ntpd > > command="/usr/local/sbin/${name}" > > [...] > > > > So, asking as a port maintainer, a few questions: > > > > 0) Why the heck is it doing this even when I override the path? > > > > 1) How can we encourage base to allow override of command_name? > > > > 2) Is this a brokenness in the port that it doesn't ship with a startup file? > > > > 3) Not strictly related, but what's the proper case for pathing since things > > like "ntpq", the base path would naturally be found in any standard $PATH. > > Some ports used to have an overwrite_base option, but this also feels wrong > > as it breaks freebsd-update in various ways. I.e. should the port print a > > message stating that you should chmod 000 the original binaries? Should the > > ports versions be named something different? Should the port just warn you > > that you need to call these things by absolute path, always? > > > > -Dan Ping: cy Why does net/ntp not include an rc(8) script or a pkg-message describing how to activate it? It would go a long way if you could add at least one of those things. # Adam -- Adam Weinberger adamw@adamw.org https://www.adamw.org