https://www.slackwiki.com/index.php?title=Upgrade_Using_Slapt-get&feed=atom&action=historyUpgrade Using Slapt-get - Revision history2024-03-29T06:22:56ZRevision history for this page on the wikiMediaWiki 1.40.0https://www.slackwiki.com/index.php?title=Upgrade_Using_Slapt-get&diff=501&oldid=prevMerge-delete at 10:37, 26 June 20112011-06-26T10:37:24Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 10:37, 26 June 2011</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l152">Line 152:</td>
<td colspan="2" class="diff-lineno">Line 152:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= Related Links =</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>= Related Links =</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;">* [http://www.slackersbible.org/node/98 Unofficial slapt-get HOWTO]</del></div></td><td colspan="2" class="diff-side-added"></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Release_Changes|Changes in Slackware Release Versions]]</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[Release_Changes|Changes in Slackware Release Versions]]</div></td></tr>
</table>Merge-deletehttps://www.slackwiki.com/index.php?title=Upgrade_Using_Slapt-get&diff=202&oldid=prevErik: Copy from old2009-06-06T23:35:42Z<p>Copy from old</p>
<p><b>New page</b></p><div>[[Category:Tutorials]]<br />
= Introduction =<br />
<br />
See the [[Slapt-get]] page for an introduction to slapt-get and its functionality.<br />
<br />
Prior to using slapt-get, you should really be familiar with proper usage of the native Slackware package management tools:<br />
man pkgtool<br />
man installpkg<br />
man upgradepkg<br />
man removepkg<br />
As indicated in the link above, slapt-get is *not* a replacement for those utilities - it *uses* those utilities. As such, any inherent "limitations" (yes, I use that term loosely) in the pkgtool suite will also apply to slapt-get.<br />
<br />
= Installation and Configuration =<br />
<br />
Get the [[slapt-get]] package for your version of Slackware.<br />
<br />
Once it's installed, configure it to point to your favourite<br />
mirror (edit '''/etc/slapt-get/slaptgetrc''')<br />
<br />
# See /usr/doc/slapt-get-0.10.1/example.slapt-getrc <br />
# for example source entries and configuration hints.<br />
WORKINGDIR=/var/slapt-get<br />
EXCLUDE=^kernel-.*,^alsa-.*,^glibc.*,.*-[0-9]dl$,^devs$,^udev$,aaa_elflibs,x86_64<br />
SOURCE=http://slackware.osuosl.org/slackware-12.2/:OFFICIAL<br />
SOURCE=http://software.jaos.org/slackpacks/12.2/:OFFICIAL<br />
<br />
= Usage Hints =<br />
<br />
Depending upon your individual goals of using slapt-get, the usage hints will vary. An individual wishing to upgrade from one release of Slackware to another will have more issues with which to contend than another individual who simply wants to keep up-to-date with official security/stability patches.<br />
<br />
The biggest piece of advice I can give to *anyone* regardless of how/why you're using slapt-get is this: READ THE CHANGELOG! The pertinent portions of the changelog are also viewable for each package using --show option. You'll be okay most of the time if you ignore this advice, but don't come crying to ##slackware if you do... :) <br />
<br />
From '''man slapt-get''':<br />
UPGRADE.TXT and ChangeLog.txt is still required reading, the latter is especially true when running -current.<br />
<br />
By the way, don't even consider trying to follow the Slackware -current development using slapt-get; that's just *asking* for a problem (for reasons which will hopefully be clear later). <br />
Official ChangeLog is at ftp://ftp.slackware.com/pub/slackware/slackware-12.2/ChangeLog.txt<br />
Replace the "12.2" with the release version you're using.<br />
Rather than using the official ChangeLog (and Slackware.com bandwidth), it's better to use one of the official Slackware mirrors (you'll notice faster connections with the mirrors):<br />
<SlackwareMirror>/slackware-<version>/ChangeLog.txt<br />
See the Slackware site [[http://slackware.com/getslack/]] to find an official mirror site.<br />
<br />
== Usage Hint #1: Security and Stability Patches ==<br />
<br />
If your only goal is to stay up-to-date with official security and stability patches for your version of Slackware, then the default configuration of slapt-get should work fine for you. While I'm not the author of slapt-get (Jason, feel free to jump in here), it seems to me that this was the original intent of slapt-get (and it works *extremely* well for that task, might I add).<br />
<br />
The only exception of which I can think is kernel upgrades; thankfully, those haven't happened *too* often in official releases in recent memory, but they do occur frequently enough to be worth considering. The default configuration of slapt-get will ignore kernel upgrades, so the only way you'll know about those is by reading the official ChangeLog. Anyway, every time you upgrade your kernel, you'll need to make sure the paths in '''/etc/lilo.conf''' point to a valid kernel, and then run '''/sbin/lilo''' to reinstall LILO. If you use some other boot loader, then I'm going to assume you know enough about its usage to perform the corresponding operation (if required) after upgrading your kernel.<br />
<br />
I would recommend that you keep your old kernel around when installing a new one; it's always good to have a known-good kernel lying around just in case the new one doesn't boot. However, you'll notice that by default, running this command: <br />
slapt-get --install kernel-$VERSION<br />
will *upgrade* the kernel; in other words, it will *remove* the old kernel package and *install* the new one. This is not desirable if you wanted to keep your old kernel, so you can run this command instead:<br />
slapt-get --install --no-upgrade kernel-$VERSION<br />
From '''man slapt-get''':<br />
--no-upgrade<br />
Install the package rather than attempting to detect if a previous version is<br />
installed and upgrading it. This is useful for installing kernel packages. This<br />
option is only valid for --install targets.<br />
You might also find this option useful for installing multiple versions of the alsa-* packages; if you're running both 2.4.x and 2.6.x kernels, you'll need the alsa-driver packages for both kernels, so an *upgrade* of the 2.4.x version to 2.6.x will remove the 2.4.x version.<br />
<br />
== Usage Hint #2: Upgrade From One Release To Another ==<br />
<br />
Every Slackware release includes a file named UPGRADE.TXT - it was included for a reason, so READ IT! Once you are familiar with its contents, the rationale behind the information below will make more sense. <br />
<br />
=== Step 1: Edit your /etc/slapt-get/slaptgetrc ===<br />
<br />
Edit your '''/etc/slapt-get/slaptgetrc''' file to reflect the new Slackware version<br />
<br />
This:<br />
SOURCE=http://slackware.osuosl.org/slackware-12.1/<br />
SOURCE=http://software.jaos.org/slackpacks/12.1/<br />
becomes this:<br />
SOURCE=http://slackware.osuosl.org/slackware-12.2/:OFFICIAL<br />
SOURCE=http://software.jaos.org/slackpacks/12.2/:OFFICIAL<br />
<br />
=== Step 2: Download all updated packages === <br />
<br />
Download all updated packages to slapt-get's working directory; by default, this is '''/var/slapt-get'''<br />
slapt-get --dist-upgrade --ignore-excludes --download-only<br />
<br />
=== Step 3: Put your machine in single-user mode ===<br />
<br />
Make sure you have already performed step 2, because the network will not be available in runlevel 1.<br />
telinit 1<br />
<br />
=== Step 4: Upgrade main packages ===<br />
<br />
Versions >= 0.9.11 upgrade glibc-solibs, pkgtools, and sed first , and then upgrade the remainder of the packages. If you have read the UPGRADE.TXT file, you already know why this is needed. (hint, hint)<br />
<br />
* '''Step 4a:''' If you are using slapt-get version earlier than 0.9.11, do:<br />
slapt-get --install kernel --no-upgrade<br />
slapt-get --install glibc-solibs pkgtools sed<br />
slapt-get --dist-upgrade<br />
<br />
* '''Step 4b:''' If you are using slapt-get version 0.9.11 or later, do:<br />
slapt-get --install kernel --no-upgrade<br />
slapt-get --dist-upgrade --ignore-excludes<br />
<br />
The '''--dist-upgrade''' option will prompt you to install all *new* packages in the ./a series, and you should say "yes" to ensure that you have a working system after the upgrade. See step 8 below for more information on installing new packages.<br />
<br />
=== Step 5: Update LILO and config files ===<br />
* Make sure the paths in '''/etc/lilo.conf''' point to a valid kernel image, and then run '''/sbin/lilo'''<br />
* Fix your config files in '''/etc'''; the new ones are named with a *.new suffix. You should be able to use '''diff -u file file.new''' to show the differences between file and file.new. You'll have to decide whether to completely replace the old files with the new ones or merge your changes into the new ones first, but you *must* use the new files.<br />
<br />
=== Step 6: Go back to multi-user mode ===<br />
<br />
Sometimes the screen stays blank when you return to runlevel 3, and you might be worried that something went wrong. Before you panic, type '''clear''' and press Enter - you'll probably get your root prompt back :)<br />
telinit 3<br />
<br />
=== Step 7: Remove obsolete packages ===<br />
<br />
There is an option to do this automatically with slapt-get:<br />
slapt-get [--remove|--dist-upgrade] --remove-obsolete<br />
From '''man slapt-get'''<br />
--remove-obsolete<br />
Remove installed packages that are no longer available. This works for dist-upgrade<br />
only. This removes packages that are no longer available from any current package<br />
sources, but are currently installed. Be careful as this will also remove custom<br />
built packages.<br />
As you see, this option will be fine ''if you don't have any custom-compiled packages'' installed (such as with [[checkinstall]] or using [[SlackBuild_Scripts]]). Read through the official ChangeLog to find all packages that were removed from Slackware during the development phase; you might be able use something like this to make the process go a bit more quickly:<br />
grep -i removed ChangeLog.txt OR grep Removed ChangeLog.txt<br />
<br />
=== Step 8: Add new packages ===<br />
<br />
Similar to removing obsolete packages, there is an option to do this automatically with slapt-get using the '''--install-set''' option:<br />
slapt-get --upgrade --install-set a ap d f k kde l n t tcl x xap y<br />
<br />
From '''man slapt-get''':<br />
--install-set [disk set(s)]<br />
Install specified disk set(s). example: --install-set xap n l<br />
<br />
This option will upgrade (or install, if not already installed) every package in every disk set. For reasons already detailed (kernel/alsa versions), this may not be desirable; additionally, if you don't have a full installation of Slackware for whatever reason, this will not be desirable. <br />
<br />
The safest option is to read through the official ChangeLog.txt, make a note of new packages added during the release cycle, and install them now with this command:<br />
slapt-get --install <newpackage1> <newpackage2> <...><br />
You might be able to use something like this to make the process go a bit more quickly, but it will return quite a few extraneous results.<br />
grep -i added ChangeLog.txt<br />
<br />
=== Step 9: Admire the Results :) ===<br />
At this point, you should be running the latest version of Slackware. <br />
<br />
== Usage Hint #3: Keep Up With Slackware -current Development ==<br />
<br />
After modifying your <code>/etc/slapt-get/slaptgetrc</code> file to reflect -current sources, the most important advice you should hear is: <b>READ THE CHANGELOG</b><br />
<br />
Seriously, always read the ChangeLog.txt file associated with the -current tree; so long as you read it prior to running the <code>slapt-get --upgrade</code> command, you should be familiar with any issues that might be encountered.<br />
<br />
One idea you might consider is to use slapt-get as a "double checking" tool to ensure you haven't accidentally overlooked any packages. While the concerns detailed earlier in this article apply here (you won't be informed of any new packages added to -current), you can use the following lines to see if you missed anything that needed to be upgraded:<br />
<br />
slapt-get --update<br />
slapt-get --upgrade --simulate<br />
<br />
= Related Links =<br />
<br />
* [http://www.slackersbible.org/node/98 Unofficial slapt-get HOWTO]<br />
* [[Release_Changes|Changes in Slackware Release Versions]]</div>Erik