From owner-freebsd-questions@freebsd.org Tue Jan 29 12:47:03 2019 Return-Path: Delivered-To: freebsd-questions@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 8ED5614BC7EF for ; Tue, 29 Jan 2019 12:47:03 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Received: from mail4.protonmail.ch (mail4.protonmail.ch [185.70.40.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.protonmail.ch", Issuer "SwissSign Server Silver CA 2014 - G22" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 463B6854E1 for ; Tue, 29 Jan 2019 12:47:02 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Date: Tue, 29 Jan 2019 12:46:46 +0000 To: FreeBSD Questions From: Lorenzo Salvadore Reply-To: Lorenzo Salvadore Subject: Re: Replacing base commands with pkg versions Message-ID: In-Reply-To: References: <2WSWeqA769U9_j-YlfypjYKPgycGgCJH_5-w2PzJSegmBaHtZtTie7Kht_IANZU2s9xDJSE8kiDBP_9EvUj7ccQa1uevCPPiyoOAIm03fPo=@protonmail.ch> Feedback-ID: X6az_D2smWSR8MT5MHqXnWF0upxehDyHia7Id1cbayHNBUkRu3CIeusDsZHiivIIjmaKB1_OofpALrRUYjNz3w==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=7.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.protonmail.ch X-Rspamd-Queue-Id: 463B6854E1 X-Spamd-Bar: ------- X-Spamd-Result: default: False [-7.84 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[phascolarctos@protonmail.ch]; R_DKIM_ALLOW(-0.20)[protonmail.ch:s=default]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[protonmail.ch.dwl.dnswl.org : 127.0.5.0]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[protonmail.ch:+]; DMARC_POLICY_ALLOW(-0.50)[protonmail.ch,quarantine]; MX_GOOD(-0.01)[cached: mailsec.protonmail.ch]; NEURAL_HAM_SHORT(-0.98)[-0.984,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; IP_SCORE(-3.75)[ip: (-9.84), ipnet: 185.70.40.0/24(-4.90), asn: 19905(-3.92), country: US(-0.08)]; ASN(0.00)[asn:19905, ipnet:185.70.40.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[27.40.70.185.list.dnswl.org : 127.0.5.1] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jan 2019 12:47:03 -0000 > On 29/01/2019 12:31, Lorenzo Salvadore via freebsd-questions wrote: > > > > What is the recommended way of dealing with the base versions of > > > commands when installing a package version instead? Should I chmod -x > > > the base executable(s), delete them or rename them? What happens if I > > > subsequently do a freebsd-update - do the base executables get > > > reinstated or are they ignored? > > > The specific case I'm interested in is unbound under 11.2, but this > > > applies to a variety of programs (CUPS vs base lpr, or base vs pkg ll= vm > > > come to mind) and if there's any official guidance on this I've misse= d it. > > > > I cannot give you an official answer, but if you always want to have th= e pkg > > version getting precedence on the base version, I would reorder the PAT= H > > variable. > > If instead you want to mix versions, I would not change the base system= , I > > would rather create aliases for the shell. > > In this case I specifically want to disable the base commands, and want > them to be disabled under all circumstances, hence the suggestions of > chmod -x, etc. If you really know what you're doing then locate the base program, rename i= t (to keep a backup) and make a link to the pkg version in the base location with= the original name. (Again, there is nothing official about this approach.) Be carefull: packages are tested with a base system unchanged, hence there = is no guarantee that if a software you install depends on a command in base that = you changed it will still work. Maybe you should think if there is a better way to achieve your goal than using pkg versions instead of base. Can you tell us what's the reason base = is not good enough for you? Lorenzo Salvadore.