From owner-freebsd-ports@freebsd.org Wed Aug 29 00:34:11 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 CBF47109C18E for ; Wed, 29 Aug 2018 00:34:11 +0000 (UTC) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (prime.gushi.org [IPv6:2001:4f8:3:3d::42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "prime.gushi.org", Issuer "RapidSSL RSA CA 2018" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6537774B3E; Wed, 29 Aug 2018 00:34:11 +0000 (UTC) (envelope-from danm@prime.gushi.org) Received: from prime.gushi.org (danm@localhost [127.0.0.1]) by prime.gushi.org (8.15.2/8.15.2) with ESMTPS id w7T0Y9hr022565 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 28 Aug 2018 17:34:09 -0700 (PDT) (envelope-from danm@prime.gushi.org) DKIM-Filter: OpenDKIM Filter v2.10.3 prime.gushi.org w7T0Y9hr022565 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gushi.org; s=prime2014; t=1535502850; bh=fCePM9cYZsDaQeHKcgBcEBsHtlTVZoosbmDcoMdqqAA=; h=Date:From:To:cc:Subject; z=Date:=20Tue,=2028=20Aug=202018=2017:34:08=20-0700=20(PDT)|From:=2 0"Dan=20Mahoney=20(Gushi)"=20|To:=20freebsd-por ts@freebsd.org|cc:=20cy@freebsd.org|Subject:=20Cannot=20specify=20 ntpd=20binary=20in=20ports=20with=20ntpd=20startup=20file.; b=WpoXUPx5mhjl7+iuhVKvwCDAoodFXTWM+bh9k9SIrUQiUYdz1h58Hnz9SOFWoKda1 rfatJFxlhzqLkEjZoFeZfJ5B6hK+MuwiNGH1/sn0O1+LXpYs5bFhu7xo8h4q/dbfYz qwNZfY0wpYCq9/Pz+pEfZmyMaCu0PZyjk/QI06gRQEiKgFKJjSq9/a+0g1GTQkUbR0 gh+1pxf5bzRc0N7tnwbM7tbIhZQB+g4chtg7CRwnlkTzc+rgmBSiFTRNCzNNE0UuPj 4bRknk2a81X3fFSMGzxHcF0JlltmePhhQ3e+MUX6nfMkd5XNQHiB3uniZ9DgsFXBLH yGJY/uynaxHwA== Received: (from danm@localhost) by prime.gushi.org (8.15.2/8.15.2/Submit) id w7T0Y9ql022564; Tue, 28 Aug 2018 17:34:09 -0700 (PDT) (envelope-from danm) Date: Tue, 28 Aug 2018 17:34:08 -0700 (PDT) From: "Dan Mahoney (Gushi)" X-X-Sender: danm@prime.gushi.org To: freebsd-ports@freebsd.org cc: cy@freebsd.org Subject: Cannot specify ntpd binary in ports with ntpd startup file. Message-ID: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) X-OpenPGP-Key-ID: 0x624BB249 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed 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: Wed, 29 Aug 2018 00:34:12 -0000 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 > > -- "No mowore webooting!!!" -Paul, 10-16-99, 10 PM --------Dan Mahoney-------- Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC FB: fb.com/DanielMahoneyIV LI: linkedin.com/in/gushi Site: http://www.gushi.org ---------------------------