Changeset View
Changeset View
Standalone View
Standalone View
documentation/content/en/books/handbook/cutting-edge/_index.adoc
Show First 20 Lines • Show All 596 Lines • ▼ Show 20 Lines | |||||
[source,bash] | [source,bash] | ||||
.... | .... | ||||
# svnlite update /usr/src <.> | # svnlite update /usr/src <.> | ||||
check /usr/src/UPDATING <.> | check /usr/src/UPDATING <.> | ||||
# cd /usr/src <.> | # cd /usr/src <.> | ||||
# make -j4 buildworld <.> | # make -j4 buildworld <.> | ||||
# make -j4 kernel <.> | # make -j4 kernel <.> | ||||
# shutdown -r now <.> | # shutdown -r now <.> | ||||
# etcupdate -p <.> | |||||
# cd /usr/src <.> | # cd /usr/src <.> | ||||
# make installworld <.> | # make installworld <.> | ||||
# mergemaster -Ui <.> | # etcupdate -B <.> | ||||
# shutdown -r now 1<.> | # shutdown -r now 1<.> | ||||
.... | .... | ||||
<.> Get the latest version of the source. See <<updating-src-obtaining-src>> for more information on obtaining and updating source. | <.> Get the latest version of the source. See <<updating-src-obtaining-src>> for more information on obtaining and updating source. | ||||
<.> Check [.filename]#/usr/src/UPDATING# for any manual steps required before or after building from source. | <.> Check [.filename]#/usr/src/UPDATING# for any manual steps required before or after building from source. | ||||
<.> Go to the source directory. | <.> Go to the source directory. | ||||
<.> Compile the world, everything except the kernel. | <.> Compile the world, everything except the kernel. | ||||
<.> Compile and install the kernel. This is equivalent to `make buildkernel installkernel`. | <.> Compile and install the kernel. This is equivalent to `make buildkernel installkernel`. | ||||
<.> Reboot the system to the new kernel. | <.> Reboot the system to the new kernel. | ||||
<.> Update and merge configuraton files in [.filename]#/etc/# required before installworld. | |||||
<.> Go to the source directory. | <.> Go to the source directory. | ||||
<.> Install the world. | <.> Install the world. | ||||
<.> Update and merge configuration files in [.filename]#/etc/#. | <.> Update and merge configuration files in [.filename]#/etc/#. | ||||
<.> Restart the system to use the newly-built world and kernel. | <.> Restart the system to use the newly-built world and kernel. | ||||
==== | ==== | ||||
▲ Show 20 Lines • Show All 193 Lines • ▼ Show 20 Lines | |||||
# shutdown -r now | # shutdown -r now | ||||
.... | .... | ||||
[[updating-src-completing]] | [[updating-src-completing]] | ||||
=== Completing the Update | === Completing the Update | ||||
A few final tasks complete the update. Any modified configuration files are merged with the new versions, outdated libraries are located and removed, then the system is restarted. | A few final tasks complete the update. Any modified configuration files are merged with the new versions, outdated libraries are located and removed, then the system is restarted. | ||||
[[updating-src-completing-merge-etcupdate]] | |||||
==== Merging Configuration Files with man:etcupdate[8] | |||||
man:etcupdate[8] is a tool for managing updates to files that are not updated as part of an installworld such as files located in [.filename]#/etc/#. | |||||
It manages updates by doing a three-way merge of changes made to these files agianst the local versions. | |||||
It it also designed to minimize the amount of user intervention, in constrast to man:mergemaster[8]'s interactive prompts. | |||||
[NOTE] | |||||
==== | |||||
In general, man:etcupdate[8] does not need any specific arguments for its job. | |||||
There is however a handy in between command for sanity checking what will be done the first time man:etcupdate[8] is used: | |||||
[source,bash] | |||||
.... | |||||
# etcupdate diff | |||||
.... | |||||
This command allows the user to audit configuration changes. | |||||
==== | |||||
If man:etcupdate[8] is not able to merge a file automatically, the merge conflicts can be resolved with manual interaction by issuing: | |||||
[source,bash] | |||||
.... | |||||
# etcupdate resolve | |||||
.... | |||||
[WARNING] | |||||
==== | |||||
When switching from man:mergemaster[8] to man:etcupdate[8], the first run might print some bogus conflicts due to already applied changes. | |||||
In general, the following command sequence should recover from this behavior: | |||||
[.procedure] | |||||
==== | |||||
* Bootstrapping man:etcupdate[8] | |||||
+ | |||||
[source,bash] | |||||
.... | |||||
# etcupdate diff <.> | |||||
# etcupdate bootstrap <.> | |||||
# etcupdate diff 1<.> | |||||
.... | |||||
<.> Check the output before updating sources and building the newworld. | |||||
jhb: I think it might be simpler and less confusing to just tell users switching to etcupdate to… | |||||
If the output shows a lot of diffs that are not expected, continue with the bootstrap command. | |||||
<.> Bootstrap the program, for more information see man:etcupdate[8]. | |||||
<.> Check the diff agains after bootstrapping. The unexpected diffs should be gone. | |||||
==== | |||||
==== | |||||
[[updating-src-completing-merge-mergemaster]] | [[updating-src-completing-merge-mergemaster]] | ||||
==== Merging Configuration Files with man:mergemaster[8] | ==== Merging Configuration Files with man:mergemaster[8] | ||||
man:mergemaster[8] provides an easy way to merge changes that have been made to system configuration files with new versions of those files. | man:mergemaster[8] provides a way to merge changes that have been made to system configuration files with new versions of those files. | ||||
man:mergemaster[8] is an alternative to the preferred man:etcupdate[8] | |||||
With `-Ui`, man:mergemaster[8] automatically updates files that have not been user-modified and installs new files that are not already present: | With `-Ui`, man:mergemaster[8] automatically updates files that have not been user-modified and installs new files that are not already present: | ||||
[source,bash] | [source,bash] | ||||
.... | .... | ||||
# mergemaster -Ui | # mergemaster -Ui | ||||
.... | .... | ||||
If a file must be manually merged, an interactive display allows the user to choose which portions of the files are kept. See man:mergemaster[8] for more information. | If a file must be manually merged, an interactive display allows the user to choose which portions of the files are kept. See man:mergemaster[8] for more information. | ||||
▲ Show 20 Lines • Show All 74 Lines • Show Last 20 Lines |
I think it might be simpler and less confusing to just tell users switching to etcupdate to always do a bootstrap first.