Date: Tue, 3 Mar 2020 16:42:38 +0100 From: Polytropon <freebsd@edvax.de> To: Yuri Pankov <ypankov@fastmail.com> Cc: Robert Huff <roberthuff@rcn.com>, freebsd-questions@freebsd.org, tech-lists <tech-lists@zyxst.net> Subject: Re: make delete-old Message-ID: <20200303164238.7d881844.freebsd@edvax.de> In-Reply-To: <448ac139-21a5-4064-fbf6-39a4ea13814b@fastmail.com> References: <20200303123132.GB58645@bastion.zyxst.net> <24158.22171.586832.36541@jerusalem.litteratus.org> <00b0229e-03ee-16f4-f64b-51550626848d@fastmail.com> <20200303160716.671eb676.freebsd@edvax.de> <b5872f6f-d298-2183-4bef-f185dcd7f0cd@fastmail.com> <20200303163046.c906b9e3.freebsd@edvax.de> <448ac139-21a5-4064-fbf6-39a4ea13814b@fastmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 3 Mar 2020 18:34:39 +0300, Yuri Pankov wrote: > On 03.03.2020 18:30, Polytropon wrote: > > On Tue, 3 Mar 2020 18:16:37 +0300, Yuri Pankov wrote: > >> On 03.03.2020 18:07, Polytropon wrote: > >>> On Tue, 3 Mar 2020 17:13:50 +0300, Yuri Pankov wrote: > >>>> On 03.03.2020 16:07, Robert Huff wrote: > >>>>> tech-lists writes: > >>>>> > >>>>>> Is a reboot required after make delete-old ? > >>>>> > >>>>> I don't think so. > >>>>> But you might want to re-run ldconfig. > >>>> > >>>> I don't think delete-old deletes shared libraries (and that's the answer > >>>> for original question, you don't need to reboot), there's > >>>> delete-old-libs for that, more so, running ldconfig (the binary) can be > >>>> harmful, if needed there's a ldconfig service; not sure which one you meant. > >>> > >>> According to /usr/src/Makefile's comment header, the > >>> step "make delete-old" is followed by a reboot (in > >>> combination with the 2nd mergemaster run, after > >>> "make installworld"), while "make delete-old-libs" > >>> is performed after the reboot, without a further one. > >>> > >>> In /usr/src/Makefile, you can find the following order: > >>> > >>> # For individuals wanting to upgrade their sources (even if only a > >>> # delta of a few days): > >>> # > >>> # 1. `cd /usr/src' (or to the directory containing your source tree). > >>> # 2. `make buildworld' > >>> # 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). > >>> # 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). > >>> # [steps 3. & 4. can be combined by using the "kernel" target] > >>> # 5. `reboot' (in single user mode: boot -s from the loader prompt). > >>> # 6. `mergemaster -p' > >>> # 7. `make installworld' > >>> # 8. `mergemaster' (you may wish to use -i, along with -U or -F). > >>> # 9. `make delete-old' > >>> # 10. `reboot' > >>> # 11. `make delete-old-libs' (in case no 3rd party program uses them anymore) > >>> > >>> Additional information from "man 7 build": > >>> > >>> delete-old Delete obsolete base system files and directories inter- > >>> actively. When -DBATCH_DELETE_OLD_FILES is specified at > >>> the command line, the delete operation will be non-in- > >>> teractive. The variables DESTDIR, TARGET_ARCH and > >>> TARGET should be set as with "make installworld". > >>> > >>> delete-old-libs Delete obsolete base system libraries interactively. > >>> This target should only be used if no third party soft- > >>> ware uses these libraries. When > >>> -DBATCH_DELETE_OLD_FILES is specified at the command > >>> line, the delete operation will be non-interactive. The > >>> variables DESTDIR, TARGET_ARCH and TARGET should be set > >>> as with "make installworld". > >>> > >>> To conclude this into an answer that matches existing > >>> documentation: > >>> > >>> Yes, "make delete-old" requires a reboot. :-) > >> > >> It's the 'installworld' (7) and 'mergemaster' (8) steps that require a > >> reboot, and 'delete-old' (9) being immediately followed by 'reboot' (10) > >> step does NOT mean 'delete-old' requires 'reboot'. > > > > The documentation suggests that the "make delete-old" step > > happens in single-user mode (which you entered in step 5). > > So in this "limited mode", deleting libraries is safer than > > doing this in a state where 3rd party programs might use > > them (as it would typically happen in multi-user mode). > > This whole setting is to make the process safer. So when > > you do the "make delete-old" step in the setting it is > > suggested for, i. e., in single-user mode, you'll have > > to exit that mode, and the step the documentation uses > > here is "reboot" (to make sure everything previously > > installed by "make installworld") is in place during > > a system startup; just using "exit" to continue into > > multi-user mode doesn't sound convincing... > > We are talking about delete-old which does NOT touch shared libraries, > and the original question was about that target only, everything else is > out of context. Yes, this is correct; according to the description, "make delete-old" will affect "obsolete base system files and directories". While this does not explicitely include libraries (as the description of "make delete-old-libs" does), it is used in combination with the "make installworld" step which warrants the reboot. So my interpretation is that when you do "make delete-old", you have done "make installworld" and "mergemaster" just before it, and you are in single-user mode. That is the reason of my conclusion that a reboot is, if not needed, at least suggested if (!) you follow the procedure mentioned in /usr/src/Makefile. Of course, if you already are in multi-user mode, _not_ having done "make delete-old" in single-user mode (where you did all the other steps), then, yes, I agree, a reboot should not be needed, as all things installed new are already in place and therefore also in use, as it should be. -- 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?20200303164238.7d881844.freebsd>