Changeset 4382a36 for introduction/important
- Timestamp:
- 07/21/2005 10:27:23 PM (19 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- cbadf6b
- Parents:
- 8aefeb67
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
introduction/important/pkgmgt.xml
r8aefeb67 r4382a36 55 55 <itemizedlist> 56 56 <listitem> 57 <para>If one of the toolchain package (glibc, gcc, 58 binutils) needs to be upgraded to a newer minor vesion, it is safer to rebuild 59 LFS. Though you <emphasis>may</emphasis> be able to get by 60 rebuilding all the packages in their dependency order. We do not recommend it. 61 For example, if glibc-2.2.x needs to be updated to glibc-2.3.x, it is safer 62 to rebuild. For micro version updates, a simple reinstallation usually works, but 63 is not guaranteed. For example, upgrading from glibc-2.3.1 to glibc-2.3.2 will not 64 usually cause any problems.</para> 57 <para>If one of the toolchain packages 58 (<application>Glibc</application>, <application>GCC</application> or 59 <application>Binutils</application>) needs to be upgraded to a newer 60 minor vesion, it is safer to rebuild LFS. Though you 61 <emphasis>may</emphasis> be able to get by rebuilding all the packages 62 in their dependency order, we do not recommend it. For example, if 63 glibc-2.2.x needs to be updated to glibc-2.3.x, it is safer to rebuild. 64 For micro version updates, a simple reinstallation usually works, but 65 is not guaranteed. For example, upgrading from glibc-2.3.4 to 66 glibc-2.3.5 will not usually cause any problems.</para> 65 67 </listitem> 66 68 <listitem> 67 69 <para>If a package containing a shared library is updated, and if the 68 name of the library changes, then all the packages dynamically linked to the 69 library need to be recompiled to link against the newer library. (Note that there 70 is no corelation between the package version and the name of the library.) For 71 example, consider a package foo-1.2.3 that installs a shared library with name 72 <filename>libfoo.so.1</filename>. Say you upgrade the package to a newer version 73 foo-1.2.4 that installs a shared library with name <filename>libfoo.so.2</filename>. 74 In this case, all packages that are dynamically linked to <filename>libfoo.so.1</filename> 75 need to be recompiled to link against <filename>libfoo.so.2</filename>. Note that 76 you should not remove the previous libraries till the dependent packages are 77 recompiled.</para> 70 name of the library changes, then all the packages dynamically linked 71 to the library need to be recompiled to link against the newer library. 72 (Note that there is no correlation between the package version and the 73 name of the library.) For example, consider a package foo-1.2.3 that 74 installs a shared library with name 75 <filename class='libraryfile'>libfoo.so.1</filename>. Say you upgrade 76 the package to a newer version foo-1.2.4 that installs a shared library 77 with name <filename class='libraryfile'>libfoo.so.2</filename>. In this 78 case, all packages that are dynamically linked to 79 <filename class='libraryfile'>libfoo.so.1</filename> need to be 80 recompiled to link against 81 <filename class='libraryfile'>libfoo.so.2</filename>. Note that you 82 should not remove the previous libraries until the dependent packages 83 are recompiled.</para> 78 84 </listitem> 79 85 <listitem> … … 91 97 92 98 <para>The following are some common package management techniques. Before 93 making a decision on a package manager, do aresearch on the various99 making a decision on a package manager, do some research on the various 94 100 techniques, particularly the drawbacks of the particular scheme.</para> 95 101 … … 110 116 <para>This is a simplistic package management that does not need any extra package 111 117 to manage the installations. Each package is installed in a separate directory. 112 For example, package foo-1.1 is installed in <filename>/usr/pkg/foo-1.1</filename> 118 For example, package foo-1.1 is installed in 119 <filename class='directory'>/usr/pkg/foo-1.1</filename> 113 120 and a symlink is made from <filename>/usr/pkg/foo</filename> to 114 <filename>/usr/pkg/foo-1.1</filename>. When installing a new version foo-1.2, 115 it is installed in <filename>/usr/pkg/foo-1.2</filename> and the previous 116 symlink is replaced by a symlink to the new vesion.</para> 117 118 <para>The environment variables such as those 119 mentioned in <xref linkend="intro-important-beyond"/> need to be expanded to 121 <filename class='directory'>/usr/pkg/foo-1.1</filename>. When installing 122 a new version foo-1.2, it is installed in 123 <filename class='directory'>/usr/pkg/foo-1.2</filename> and the previous 124 symlink is replaced by a symlink to the new version.</para> 125 126 <para>The environment variables such as those mentioned in 127 <xref linkend="intro-important-beyond"/> need to be expanded to 120 128 include <filename>/usr/pkg/foo</filename>. For more than a few packages, 121 129 this scheme becomes unmanageable.</para> … … 126 134 <title>Symlink Style Package Management</title> 127 135 128 <para>This is a variation of the previous package management technique. Each package 129 is installed similar to the previous scheme. But instead of making the symlink, 130 each file is symlinked into <filename>/usr</filename> hierarchy. This removes the need 131 to expand the environment variables. Though the symlinks can be created by the user, 132 to automate the creation, many package managers have been written on this approach. 133 A few of the popular ones are Stow, Epkg, Graft, and Depot.</para> 136 <para>This is a variation of the previous package management technique. 137 Each package is installed similar to the previous scheme. But instead of 138 making the symlink, each file is symlinked into the 139 <filename class='directory'>/usr</filename> hierarchy. This removes the 140 need to expand the environment variables. Though the symlinks can be 141 created by the user to automate the creation, many package managers have 142 been written using this approach. A few of the popular ones are Stow, 143 Epkg, Graft, and Depot.</para> 134 144 135 145 <para>The installation needs to be faked, so that the package thinks that it is 136 146 installed in <filename class="directory">/usr</filename> though in reality it is 137 installed in <filename class="directory">/usr/pkg</filename> hierarchy.147 installed in the <filename class="directory">/usr/pkg</filename> hierarchy. 138 148 Installing in this manner is not usually a trivial task. For example, consider 139 149 that you are installing a package libfoo-1.1. The following instructions may … … 144 154 make install</userinput></screen> 145 155 146 <para>The installation will work, but the dependent packages may not link to 147 libfoo as you would expect. If you compile a package that links against libfoo, 148 you may notice that it is linked to <filename>/usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename> 149 instead of <filename>/usr/lib/libfoo.so.1</filename> as you would expect. The correct 150 approach is to use <envar>DESTDIR</envar> strategy to fake installation of the package. 151 This approach works as follows:</para> 156 <para>The installation will work, but the dependent packages may not link 157 to libfoo as you would expect. If you compile a package that links against 158 libfoo, you may notice that it is linked to 159 <filename class='libraryfile'>/usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename> 160 instead of <filename class='libraryfile'>/usr/lib/libfoo.so.1</filename> 161 as you would expect. The correct approach is to use <envar>DESTDIR</envar> 162 strategy to fake installation of the package. This approach works as 163 follows:</para> 152 164 153 165 <screen><userinput>./configure --prefix=/usr … … 155 167 make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen> 156 168 157 <para>Most of the packages do support this approach, but there are some which do not. 158 For the non-compliant packages, you may either need to manually install the package, 159 or you may find that it is easier to install some problematic packages into 160 <filename>/opt</filename>.</para> 169 <para>Most of the packages do support this approach, but there are some 170 which do not. For the non-compliant packages, you may either need to 171 manually install the package, or you may find that it is easier to install 172 some problematic packages into 173 <filename class='directory'>/opt</filename>.</para> 161 174 162 175 </sect3> … … 165 178 <title>Timestamp Based</title> 166 179 167 <para>In this technique, a file is timestamped before the installation of the package. 168 After the installation, a simple use of the <command>find</command> command with the 169 appropriate options can generate a log of all the files installed after the timestamp 170 file was created. A package manager written with this approach is install-log.</para> 180 <para>In this technique, a file is timestamped before the installation of 181 the package. After the installation, a simple use of the 182 <command>find</command> command with the appropriate options can generate 183 a log of all the files installed after the timestamp file was created. A 184 package manager written with this approach is install-log.</para> 171 185 172 186 <para>Though this scheme has the advantage of being simple, it has two drawbacks. … … 211 225 <title>User Based Management</title> 212 226 213 <para>This scheme, that isunique to LFS, was devised by Matthias Benkmann,227 <para>This scheme, unique to LFS, was devised by Matthias Benkmann, 214 228 and is available from the <ulink url="http://www.linuxfromscratch.org/hints/">Hints 215 229 Project</ulink>. In this scheme, each package is installed as a separate user 216 230 into the standard locations. Files belonging to a package are easily identified 217 by checking the user id. The features and shortcomings of this approach are231 by checking the user ID. The features and shortcomings of this approach are 218 232 too complex to describe in this section. For the details please see the hint at <ulink 219 233 url="http://www.linuxfromscratch.org/hints/downloads/files/more_control_and_pkg_man.txt"/>.</para>
Note:
See TracChangeset
for help on using the changeset viewer.