[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
slackbook:package_management [2012/09/17 03:01 (UTC)] – [Installing, Removing, and Upgrading Packages] Added original text and formatting mfillpotslackbook:package_management [2012/09/17 03:12 (UTC)] (current) – [Sources] updated the author list mfillpot
Line 143: Line 143:
 ===== Package Compression Formats ===== ===== Package Compression Formats =====
  
-In the past, all Slackware packages were compressed with the gzip(1) compression utility, which was a good compromise between compression speed and size. Recently, new compression schemes have been added and the package management tools have been upgraded to handle these. Today, official Slackware packages are compressed with the xz utility and end with .txz extensions. Older packages (and many third party packages) still use the .tgz extension.+In the past, all Slackware packages were compressed with the 
 +**//gzip//**(1) compression utility, which was a 
 +good compromise between compression speed and size.Recently, new 
 +compression schemes have been added and the package management tools 
 +have been upgraded to handle these. Today, official Slackware 
 +packages are compressed with the **//xz//** 
 +utility and end with .txz extensions.Older packages (and many 
 +third party packages) still use the .tgz extension.
  
-It's worth emphasizing that .tgz and .txz (or, more succinctly, .t?z files) are very standard, non-unique extensions for compressed .tar files. This has many advantages; they're easy to build on nearly any UNIX system (many other package formats require special toolchains), and they're just as simple to de-construct. 
  
-However, it is also important to realize that just because all Slackware packages are .t?z files, not all .t?z files are Slackware packages. Installpkg won't magically install just any .t?z file, only Slackware packages.+It's worth emphasizing that .tgz and .txz (or, more succinctly, .t?z 
 +files) are very standard, non-unique extensions for compressed .tar 
 +files. This has many advantages; they're easy to build on nearly any 
 +UNIX system (many other package formats require special toolchains), 
 +and they're just as simple to de-construct. 
 + 
 + 
 +However, it is also important to realize that just because all Slackware 
 +packages **are** .t?z files, not all .t?z files are 
 +Slackware packages. **//Installpkg//** won't 
 +magically install just any .t?z file, only Slackware packages.
 ==== slackpkg ==== ==== slackpkg ====
  
-Slackpkg is an automated tool for management of Slackware Linux Packages. It originally appeared in /extra for the release of slackware-12.1, and since the release of slackware-12.2 it has been included in the ap/ series of a base installation.+**//Slackpkg//** is an automated tool for 
 +management of Slackware Linux Packages. It originally appeared in 
 +/extra for the release of slackware-12.1, and since the release 
 +of slackware-12.2 it has been included in the ap/ series of a 
 +base installation.
  
-Just as you are able to use installpkg to install Slackware packages from the /extra directory included on the install media, you can use slackpkg to pull packages from the Internet and install them. This is particularly useful for security updates or significant application upgrades that are posted to the Slackware servers, some of which you may want to start using on your own system. 
  
-Without slackpkg, the process would be:+Just as you are able to use **//installpkg//** to 
 +install Slackware packages from the /extra directory included on 
 +the install media, you can use **//slackpkg//** 
 +to pull packages from the Internet and install them. This is 
 +particularly useful for security updates or significant application 
 +upgrades that are posted to the Slackware servers, some of which you 
 +may want to start using on your own system. 
 + 
 + 
 +Without **//slackpkg//**, the process would be:
   - Notice in the Slackware changelog that an update has been released.   - Notice in the Slackware changelog that an update has been released.
   - Look on your local Slackware mirror to find a download link of the package.   - Look on your local Slackware mirror to find a download link of the package.
   - Download the package from a Slackware mirror to your hard drive.   - Download the package from a Slackware mirror to your hard drive.
-  - Use either installpkg or pkgtool to install the downloaded package.+  - Use either **//installpkg//** or **//pkgtool//** to install the downloaded package.
  
-With slackpkg, this is reduced to:+With **//slackpkg//**, this is reduced to:
  
-  - Notice in the Slackware changelog that an update for foo has been released. +  - Notice in the Slackware changelog that an update for **//foo//** has been released. 
-  - **slackpkg** [installfoo+  - **slackpkg** //install// foo
  
 Clearly, this streamlines a fairly common task. Clearly, this streamlines a fairly common task.
  
-To use slackpkg, configure your system with a Slackware mirror by editing /etc/slackpkg/mirrors as root. Find the mirror that is associated with your Slackware version and architecture, and uncomment it. This list of mirrors offers ftp and http access, but you must uncomment only one mirror. 
  
-Once a mirror has been selected, update the list of remote files by issuing the initial command **slackpkg update**. This should be done any time you notice that new package has been posted //(regularly checking in with the Slackware changelog is recommended; see [[slackbook:tracking_updates|Chapter 18Keeping Track of Updates]] for more information)//.+To use **//slackpkg//**, configure your system 
 +with Slackware mirror by editing 
 +''/etc/slackpkg/mirrors'' as root. Find 
 +the mirror that is associated with your Slackware version and 
 +architectureand uncomment it. This list of mirrors offers ftp and 
 +http access, but you must uncomment **only one** 
 +mirror.
  
-To search for packageuse **slackpkg search foo**and to install use **slackpkg install foo**.+Once mirror has been selectedupdate the list of remote files by 
 +issuing the initial command ''slackpkg update''. This 
 +should be done any time you notice that a new package has been 
 +posted (regularly checking in with the Slackware changelog is 
 +recommended; see [[slackbook:tracking_updates|Chapter 18Keeping Track of Updates]] for more information).
  
-Once a package has been installed with slackpkg, it can be removed or upgraded using pkgtool and the other package management commands as detailed in the section called “[[#installing_removing_and_upgrading_packages|Installing, Removing, and Upgrading Packages]]”.+To search for a package, use ''slackpkg search foo'', 
 +and to install use ''slackpkg install foo''.
  
-For more information see the man pages for slackpkg(8) and slackpkg.conf(5), and see its website at [[http://www.slackpkg.org/]]+Once a package has been installed with 
 +**//slackpkg//**, it can be removed or upgraded 
 +using **//pkgtool//** and the other package 
 +management commands as detailed in[[#installing_removing_and_upgrading_packages|Installing, Removing, and Upgrading Packages]]. 
 + 
 +For more information see the **//man//** pages 
 +for slackpkg(8) and slackpkg.conf(5), and see its website at [[ 
 +http://www.slackpkg.org/|http://www.slackpkg.org/]]
 ==== rpm2tgz ==== ==== rpm2tgz ====
  
-One of the most ubiquitous package formats for Linux software is RPM; it's not uncommon to find a developer offering their application for download as either source code or an RPM file, and no more. In this case, you would have three options:+One of the most ubiquitous package formats for Linux software is 
 +RPM; it's not uncommon to find a developer offering their 
 +application for download as either source code or an RPM file, and 
 +no more. In this case, you would have three options:
  
   - Build your own Slackware package.   - Build your own Slackware package.
Line 184: Line 232:
   - Convert and install from RPM.   - Convert and install from RPM.
  
-Building from source code or creating your own Slackware package is usually not as complex as you might think but installing directly from source code is generally discouraged because there is no easy way to track what has been installed on your system after issuing the **make install** command. Building your own Slackware packages is outside the scope of this chapter. So this leaves us with the helpful tool rpm2tgz.+Building from source code or creating your own Slackware package is 
 +usually not as complex as you might think but installing directly from 
 +source code is generally discouraged because there is no easy way to 
 +track what has been installed on your system after issuing the 
 +''make install'' command. Building your own Slackware 
 +packages is outside the scope of this chapter. So this leaves us with 
 +the helpful tool **//rpm2tgz//**. 
 + 
 +**//rpm2tgz//** converts RPM packages into a 
 +Slackware package that can then be installed via 
 +**//pkgtool//** or 
 +**//installpkg//**. This circumvents the need to 
 +create your own Slackware package but grants you the benefit of 
 +being able to remove, update, and track what you've installed.
  
-rpm2tgz converts RPM packages into a Slackware package that can then be installed via pkgtool or installpkg. This circumvents the need to create your own Slackware package but grants you the benefit of being able to remove, update, and track what you've installed. 
  
 <note warning> <note warning>
-While a Slackware package is just a shell script and source code, an RPM package can by comparison be a maze of dependency listings and special instructions. Therefore, rpm2tgz will not always work, especially on very complex applications, and it will never magically resolve dependencies.+ 
 +While a Slackware package is just a shell script and source code, 
 +an RPM package can by comparison be a maze of dependency listings 
 +and special instructions. Therefore, 
 +**//rpm2tgz//** will not always work, 
 +especially on very complex applications, and it will never 
 +magically resolve dependencies. 
 </note> </note>
  
-To try rpm2tgz, download an RPM file from a trusted source and convert it:+To try **//rpm2tgz//**, download an RPM file from 
 +a trusted source and convert it: 
  
 <code> <code>
-  rpm2tgz foo-x.x.xx.rpm+ 
 +rpm2tgz foo-x.x.xx.rpm
 </code> </code>
  
-The result is a .tgz file, so after the conversion is finished, the original RPM can safely be discarded. Use installpkg to install the Slackware package you've just created, provided that you've installed all dependency code for the application to actually function. 
  
 +The result is a .tgz file, so after the conversion is finished, the
 +original RPM can safely be discarded. Use
 +**//installpkg//** to install the Slackware
 +package you've just created, provided that you've
 +installed all dependency code for the application to actually function.
 ====== Chapter Navigation ====== ====== Chapter Navigation ======
  
Line 208: Line 282:
 ====== Sources ====== ====== Sources ======
 <!-- If you copy information from another source, then specify that source --> <!-- If you copy information from another source, then specify that source -->
-  * Original source: [[http://www.slackbook.org/beta]]  \\+  * Original source: [[http://www.slackbook.org/beta]] \\
 <!-- Authors are allowed to give credit to themselves! --> <!-- Authors are allowed to give credit to themselves! -->
-  * Originally written by Alan Hicks +  * Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson
 <!-- * Contrbutions by [[wiki:user:yyy | User Y]] --> <!-- * Contrbutions by [[wiki:user:yyy | User Y]] -->
  
 slackbook:package_management ()