From owner-freebsd-questions@freebsd.org Tue Jan 29 19:23:50 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 D3A3E14C8A23 for ; Tue, 29 Jan 2019 19:23:49 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0A9095CAC for ; Tue, 29 Jan 2019 19:23:48 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([92.193.226.69]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPA (Nemesis) id 1MSLAe-1ghzPp0Ebw-00ScXB; Tue, 29 Jan 2019 20:23:33 +0100 Date: Tue, 29 Jan 2019 20:23:32 +0100 From: Polytropon To: Arthur Chance Cc: Lorenzo Salvadore , FreeBSD Questions Subject: Re: Replacing base commands with pkg versions Message-Id: <20190129202332.7f7023ea.freebsd@edvax.de> In-Reply-To: References: <2WSWeqA769U9_j-YlfypjYKPgycGgCJH_5-w2PzJSegmBaHtZtTie7Kht_IANZU2s9xDJSE8kiDBP_9EvUj7ccQa1uevCPPiyoOAIm03fPo=@protonmail.ch> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:ooSCbjbqs056sCTI36gcJYIVrd3v4CpDkl7vIgkAXKb2h89TEnB W+xr+l95sHve01Qvraod9DNyDVkTM2+v02wcrOj72hYsE1+eN5z2ZeYYkADLiO9hqJG5lNF rohMpCVcULAb4guyvs/8GrTRNuCGVFdm9U2El1m8VPqdM/yCfP5/GTlAtsuwNoBZOzChd5m 4jwpmYkT1Sb+TVFsuCLsQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:IHA8k/N11Wg=:vS9XDZqnRfr7PUhHnZi5dN rmjz58WywUj7ZUctCNjdpAjyWSvGku2q1Hg5dZywHaZKI7al8uGU9JwRJxYKUR3crSZJnREMQ 3uM7DNj7BiVThZCyBOp7E+SKYcMFlGyyBi10Gzde9QXPMzvtlll15O9EkIEhKNPKaN5qlpXLZ w5NFyIwgWvNpusn3QE/+1/l2hbewm0D56oGJvDXraY+UcPCtxbB4XaqlkFXVFqfpzOAMICqJw N2+FsDAu5F5VB0R7l2yMrO9SBH/P12UruKJ2RirsNdXBRAMxRaYu0U0VePCPPJSy+O8ClwqT1 jfd2b6kU/Xq5H897KRrQ1e6o/J36yWzvs7sIRZurfhJdaTqq57fcDbl/Amlz57uEosPIzft6H ICExhmV0oIb3Ft4r7V3TQsw2Iv+I/K7ucH+b5yZdjNbCjDkgfOGriJNn+fiyJnjML+KBJCry4 oUE3jJjWcBMwEjD9/2bo9bCP2wotXO+uRRA0qK/A0FURnrSTnukBEBrXxnyFAT0h1U2ZcX736 0LigVbKrFVlrJVVl7keGQvSXwMuGLrO9YGUCrYYAM2LHTHBxl/cvqCUzNDxC6X5rt97C7alBB 59XOqfmgb8SgpjgCkPe6nItE+dAmSNWaYkP5tmoochyKas2bf9h6PDbo3UlrTyvVoUUlPopzy 0vO6oKBZ39JmLfuS+SvdDoq+IewrRAGDoZuri7azkuUxVmOvQqJyVPhSf48L3pVo9x1I1i1mf h/LMCbWuU+Q3mkaMMEIBXr8SF/wlA4IEb6EwlZnc4H1MVKBSrNCmOlDdSzc= X-Rspamd-Queue-Id: B0A9095CAC X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [4.76 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[mx01.schlund.de,mx00.schlund.de]; RECEIVED_SPAMHAUS_PBL(0.00)[69.226.193.92.zen.spamhaus.org : 127.0.0.10]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_SPAM_SHORT(0.30)[0.301,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.91)[0.906,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(0.96)[0.956,0]; RCVD_IN_DNSWL_NONE(0.00)[135.126.227.212.list.dnswl.org : 127.0.5.0]; MID_CONTAINS_FROM(1.00)[]; R_SPF_NA(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.21)[ip: (-0.36), ipnet: 212.227.0.0/16(-0.71), asn: 8560(2.14), country: DE(-0.01)] 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 19:23:50 -0000 On Tue, 29 Jan 2019 12:35:14 +0000, Arthur Chance wrote: > 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 llvm > >> come to mind) and if there's any official guidance on this I've missed it. > > > > I cannot give you an official answer, but if you always want to have the pkg > > version getting precedence on the base version, I would reorder the PATH > > 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. I have dealt with older CUPS installations that way: Sure, you can change $PATH, but you need to do this everywhere and universally if you don't want some of the base programs to be accidentally called. Using chmod -x is one way, renaming them (for my specific example: lpq -> lpq.base) is another. A third option is to delete the binary altogether. But be careful that every time you update your system, your changes will be reverted! So a "post-update" script would be needed. Some programs can be removed from the installation upon system generation, i. e, with src.conf, you can omit building and installing certain parts. But this will only work if you update from source _and_ the parts you want to disable can actually be disabled. With packaged base, soon, this will probably be much easier. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...