From owner-freebsd-ports@freebsd.org Wed Aug 29 00:30:27 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 ACDE2109BDBB for ; Wed, 29 Aug 2018 00:30:27 +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 2E8BE746B2 for ; Wed, 29 Aug 2018 00:30:27 +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 w7T0UND9021975 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 28 Aug 2018 17:30:24 -0700 (PDT) (envelope-from danm@prime.gushi.org) DKIM-Filter: OpenDKIM Filter v2.10.3 prime.gushi.org w7T0UND9021975 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gushi.org; s=prime2014; t=1535502624; bh=K9AaV6nKR+Rx7OBljWsF87j5Lt0yZiRkLX0bpkAteBA=; h=Date:From:To; z=Date:=20Tue,=2028=20Aug=202018=2017:30:22=20-0700=20(PDT)|From:=2 0"Dan=20Mahoney=20(Gushi)"=20|To:=20freebsd-por ts@freebsd.org; b=lMsiJG1GaKFfX2opfC/tCNdvjdKZGXzONGw+dt8LFcW9pIgo4T58uwK/E8fCefEw3 8xv0kB34rr+SFBXC8l4mBehInVyQzjFtUySCj67TMBETSnkrYfO6zHiIesdWCmEUAP ltIA9z5M0S4SSvu2tJNqjZdXxwIqiRG1S4T45FGhbFkbQAxIHsEni4cvJ//q8C7rHz wzgGcPm37YX+7XKkHzhimwG7j0qmWScbDzNeZgO3g8WUM3nOD0gqYQzORKv5mY1OAF hEJQJ8ejSrpygiBaPeFKDnu7hwB4w452uUfIiiBfgaYThyWkvdh+Q6Y9ADBOO7b84y x2klfDjIAOiHA== Received: (from danm@localhost) by prime.gushi.org (8.15.2/8.15.2/Submit) id w7T0UNb1021974; Tue, 28 Aug 2018 17:30:23 -0700 (PDT) (envelope-from danm) Date: Tue, 28 Aug 2018 17:30:22 -0700 (PDT) From: "Dan Mahoney (Gushi)" X-X-Sender: danm@prime.gushi.org To: freebsd-ports@freebsd.org 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; format=flowed; charset=US-ASCII 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:30:27 -0000 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 -- --------Dan Mahoney-------- Techie, Sysadmin, WebGeek Gushi on efnet/undernet IRC FB: fb.com/DanielMahoneyIV LI: linkedin.com/in/gushi Site: http://www.gushi.org ---------------------------