Date: Tue, 29 Jan 2019 20:23:32 +0100 From: Polytropon <freebsd@edvax.de> To: Arthur Chance <freebsd@qeng-ho.org> Cc: Lorenzo Salvadore <phascolarctos@protonmail.ch>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Replacing base commands with pkg versions Message-ID: <20190129202332.7f7023ea.freebsd@edvax.de> In-Reply-To: <e535aab1-1202-a032-d875-069da9f8e0a6@qeng-ho.org> References: <b0671230-ef4f-3337-71c6-d23bdfd3aff8@qeng-ho.org> <2WSWeqA769U9_j-YlfypjYKPgycGgCJH_5-w2PzJSegmBaHtZtTie7Kht_IANZU2s9xDJSE8kiDBP_9EvUj7ccQa1uevCPPiyoOAIm03fPo=@protonmail.ch> <e535aab1-1202-a032-d875-069da9f8e0a6@qeng-ho.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190129202332.7f7023ea.freebsd>
