Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 uid=99(nobody) gid=98(nobody) groups=98(nobody) Safe-mode: OFF (not secure) /usr/doc/slapt-get-0.9.11e/ drwxr-xr-x | |
| Viewing file: Select action/file-type: Frequently Asked Questions:*Contents 1. What is slapt-get ? 2. Why yet another package management tool for Slackware? 3. How do I build/install slapt-get? How do I remove slapt-get? 4. How do I find a package I want to install? 5. Can I upgrade all my installed packages? 6. How can I see what will be upgraded without upgrading? 7. What if I only want to download the updates? 8. How can I re-install an existing package? 9. Can I "dist-upgrade" to a newer Slackware release? 10. What about package dependencies? 11. What about multiple package sources, ala linuxpackages.net? 12. How can I get more detailed statistics for downloads? 13. How can I install every available package? 14. What if I only want to upgrade one package? 15. What about Dropline support? 16. How can I generate an exclude list for an entire disk set? 17. How do I create my own package source? 18. How can I download every package in a disk set? 19. How can I add dependency information to my packages? 20. How do I get the newest development version of slapt-get? 21. How can I contribute my ideas or code? 22. How can I get slapt-get to speak in my native tongue? 23. How do I set the output language? 24. How do I specify proxy settings? 25. How can I exclude all *pre*, *beta*, and *686* packages safely? 26. How does the transaction engine work? 27. How does the package version comparison algorithm work? 28. I am tracking current, how do I keep the base disk set up to date? 29. How would I script an ldd dependency hack with slapt-get? 30. Does EXCLUDE work for install as well as upgrade and dist-upgrade? 31. What about package conflicts? How can I specify a conflict for my package? 32. Is the ROOT environment variable honored for install and upgrading? 33. How do I specify the exact version of a package to install? 34. Why is upgradepkg complaining it cannot find installpkg or removepkg, with sudo? 35. How can I specify a username/password for the connection to the package source? 36. /var/slapt-get is growing large, how can I safely free up space? 37. What about extra, testing, or pasture packages? 38. Can I use slapt-get to mirror packages? 39. Is there a way to use tab completion for the package names in Bash? 40. How do I remove obsoleted packages? 41. What provisions have you made for dialup users? 42. Is there a way to get a report with the pending updates emailed to me? 43. What if I don't trust third party sources for upgrades? 44. How do I specify an addon that is not a dependency of my package? 45. Will slapt-get break my system? 46. What is a meta package and how can I take advantage of it? 47. How can I downgrade a package? 48. How can I search the contents of a package for a file or library? 49. Will slapt-get support a --compile like option for slackbuilds? 50. What about mirror fall back / fail-over ? 51. How do I install a kernel rather than upgrade the existing kernel? 1. What is slapt-get ? slapt-get is an APT like system for Slackware package management. It allows one to search slackware.com and mirrors for packages, compare them with installed packages, install new packages or upgrade installed packages all with a few simple commands. Great for scripting as well. slapt-get is not affiliated or endorsed by Patrick Volkerding / slackware.com. 2. Why yet another package management tool for Slackware? Various reasons came together which inspired me to create slapt-get. I was trying to explain to a good friend of mine the functionality provided by apt-get on Debian GNU/Linux. And I needed a uniform and easily scripted method of installing software on various User-Mode Linux instances I was using for development. Thus slapt-get was born. 3. How do I build/install slapt-get? How do I remove slapt-get? Two ways to install: A: You can build slapt-get from source and use the 'install' make target, B: You can build from source and make a Slackware package with the 'pkg' make target. Then install the generated package within the newly created 'pkg' directory. If you installed via `make install`, there is an 'uninstall' make target. If you installed the slack package, then use removepkg. See the INSTALL file included with slapt-get. 4. How do I find a package I want to install? You can use the --search feature, supplying an expression. POSIX and extended regular expressions are supported. This searches the name, version, location, or description of packages. 5. Can I upgrade all my installed packages? Yes, use the --upgrade option. slapt-get will check for newer versions of all packages already installed. Please review the Slackware ChangeLog.txt for the Slackware release you are running. This is especially important for -current. 6. How can I see what will be upgraded without upgrading? If the transaction report is not enough, use the --simulate option before --upgrade. See slapt-get --help 7. What if I only want to download the updates? Use the --download-only option with --upgrade. See slapt-get --help 8. How can I re-install an existing package? Use the --reinstall option with --install pkg_name. See slapt-get --help 9. Can I "dist-upgrade" to a newer Slackware release? Yes. See also http://slackwiki.org/Upgrade_Using_Slapt-get. Change your source location within /etc/slapt-get/slapt-getrc to point to the newer release directory. --update your local package cache, then --dist-upgrade to the newer release. You will also want to disable any third party package sources while upgrading to a newer release due to the fact that third party packages might not be as rigorously tested as official packages, or may cause conflicts with files provided by official packages. For instance, you have the following line as your source: SOURCE=ftp://distro.ibiblio.org/pub/Linux/distributions/slackware/slackware-9.0/ Simply change the URL to point to current, like so: SOURCE=ftp://distro.ibiblio.org/pub/Linux/distributions/slackware/slackware-current/ CAVEAT: Follow the instructions in UPGRADE.TXT. Now you --dist-upgrade to retrieve the package data for that release. What dist-upgrade does is basically make sure that any missing packages from the base disk set are installed, as well as upgrade to any newer versions of the currently installed packages. All of this happens in one transaction. dist-upgrade'ing involves doing the following: ### upgrade your local package cache $ slapt-get --update ### first, download all of the packages prior to upgrading $ slapt-get --dist-upgrade --download-only ### second, install (not upgrade!) the newest kernel $ slapt-get --install kernel --no-upgrade ### then, upgrade the most important #(this installs any newer versions) $ slapt-get --install glibc-solibs pkgtools sed In newer versions of slapt-get, dist-upgrade automatically handles installing/upgrading glibc-solibs, pkgtools, and sed prior to any other changes. ### finally, let slapt-get upgrade the rest $ slapt-get --dist-upgrade You can specify --remove-obsolete to remove all depreciated packages. CAUTION: this can only take into consideration packages that are available from your current sources. Thus self made packages will be considered obsolete as well (they can be excluded within slapt-getrc, however). Only use this if you have been using Slackware packages exclusively. You can also use this option for information purposes, observing the obsolete packages, then passing all the ones you are sure of to --remove (which can accept multiple packages at once). ### dist upgrade and remove all depreciated/obsolete packages $ slapt-get --dist-upgrade --remove-obsolete Then follow the rest of the directions in UPGRADE.TXT. You should make sure any new packages within the disk sets you are using are also installed, as they will not be detected during --dist-upgrade, as only packages already installed will be upgraded. To accomplish this, you can specify slapt-get to install a disk set like so: ### install all X and X application packages $ slapt-get --install-set x xap Do the same for all your installed disk sets, such as gnome, x, xap, l, n, etc. Piotr Simon has a script that easily identifies new packages from release release. You can find it here: http://www.tenboard.com/slackware/index.php?path=SlackBuilds/ 10. What about package dependencies? First of all, slapt-get does not provide dependency resolution for vanilla Slackware packages (ie, official Slackware packages that come with the distribution). However, slapt-get does provide a framework for dependency resolution for packages that follow the Slackware package format, while still being backwards compatible. This information is stored in so called meta files within the package. slapt-get does not parse the packages themselves. It uses the PACKAGES.TXT package database that Patrick Volkerding provides along with his packages. slapt-get uses this file by extending it with optional extra fields. This information is stored within the package simply as a means of easy transport, to later be parsed into a PACKAGES.TXT. For example, the entry for man within PACKAGES.TXT looks like: PACKAGE NAME: man-1.5l-i386-1.tgz PACKAGE LOCATION: ./slackware/ap PACKAGE SIZE (compressed): 166 K PACKAGE SIZE (uncompressed): 390 K PACKAGE DESCRIPTION: man: man (format and display the on-line manual pages) It is extended like so: PACKAGE NAME: man-1.5l-i386-1.tgz PACKAGE MIRROR: http://www.slackware.at/data/slackware-9.1/ PACKAGE LOCATION: ./slackware/ap PACKAGE SIZE (compressed): 166 K PACKAGE SIZE (uncompressed): 390 K PACKAGE REQUIRES: groff >= 1.56-noarch-1,man-pages | man-pages-de PACKAGE CONFLICTS: PACKAGE SUGGESTS: PACKAGE DESCRIPTION: man: man (format and display the on-line manual pages) The REQUIRES line is an addition supported by slapt-get, along with CONFLICTS and SUGGESTS. The meta files supporting dependencies, conflicts, and suggestions are within the packages inside the ./install/ directory. The REQUIRES information is stored in the slack-required file. The CONFLICTS information is stored within the slack-conflicts file. The SUGGESTS information is stored in the slack-suggests file. See FAQ #19 for a breakdown of the structure of REQUIRES, FAQ #31 for CONFLICTS, and FAQ #44 for SUGGESTS. MIRROR is an optional location so that the packages can be hosted elsewhere (this is the internal representation slapt-get uses after caching the package date from the remote package source). This information is added to the PACKAGES.TXT file by extracting it from the meta files within the package. This is normally done by the provider of the packages when they generate the PACKAGES.TXT support file for their package source. See FAQ #17 for an example script to generate an extended PACKAGES.TXT file. The inclusion of this information within the Slackware package format does not inhibit the ability for Slackware pkgtools to install these packages. This information is silently ignored and discarded after the package is installed. Packages supporting this framework can be found at linuxpackages.net, along with several Slackware derived distributions such as CollegeLinux (starting with 2.5) and VectorLinux (starting with 5.0). Also, Stefano Stabellini has created a PACKAGES.TXT that contains the dependency information for Slackware packages without modifying the actual packages themselves. This can be used as a slapt-get source to pull the packages from official slackware.com mirrors. Read more about it at Stefano's page: http://www.stabellini.net/depslack.html 11. What about multiple package sources, ala linuxpackages.net? You can use multiple sources with slapt-get (including linuxpackages.net). See the example slapt-getrc in the source tarball or look in the slapt-get directory within /usr/doc/ if you installed a binary package. See the README for further details. 12. How can I get more detailed statistics for downloads? If you would like more notification on downloading pkgs/files, use the command line option --show-stats (or -S). This will show curl style download information. 13. How can I install every available package? Even though it is not built in, it is simple since slapt-get is easy to script with. Here is how to install every package that is available but not currently installed: slapt-get --available|grep inst=no|awk '{print $1}'|uniq|xargs -r slapt-get --install 14. What if I only want to upgrade one package? The --install option works for this as well. If the package is already installed, it will check and install any newer versions: slapt-get --install {pkg_name} 15. What about Dropline support? There is no direct support for Dropline packages. If you do not want them upgraded, put either the package names or a regex into the exception list. Use the following to exclude Dropline (from the example slapt-getrc): EXCLUDE=kernel-ide,kernel-source,kernel-headers,kernel-modules,lilo,.*-[0-9]dl$,devs 16. How can I generate an exclude list for an entire disk set? You can exclude an entire disk set by placing the disk set as an exclude. Be sure to use the beginning-of-line (^) and end-of-line ($) operators for specific matching. For example: To exclude all of ./slackware/x and ./slackware/xap EXCLUDE=^./slackware/x$,^./slackware/xap$ 17. How do I create my own package source? Within slapt-getrc, change your SOURCE= lines to point to your package source. This might be a local source using file:// URLs, or a publicly available source. For example, you could have an official and a local source like: SOURCE=ftp://ftp.slackware.no/pub/linux/slackware/slackware-9.1/ SOURCE=file:///usr/src/local_pkg_repository/ This local directory must have the PACKAGES.TXT and CHECKSUMS.md5 files present. This could be a mounted Slackware release CDROM, or a custom repository. The CHECKSUMS.md5 file can be generated with find: rm CHECKSUMS.md5; find . -name '*.tgz' -exec md5sum {} >> CHECKSUMS.MD5 \; The PACKAGES.TXT can be generated by the following script: ### BEGIN SCRIPT #!/bin/sh #DL_URL=http://your_remove_pkg_host.tld/packages/ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # any later version. function gen_packages_txt { echo '' > PACKAGES.TXT find . -type f -name '*.meta' -exec cat {} \; >> PACKAGES.TXT cat PACKAGES.TXT | gzip -9 -c - > PACKAGES.TXT.gz } function gen_md5_checksums { echo '' > CHECKSUMS.md5 find . -type f -name '*.tgz' -exec md5sum {} \; >> CHECKSUMS.md5 cat CHECKSUMS.md5 | gzip -9 -c - > CHECKSUMS.md5.gz } function gen_meta { if [ ! -f $1 ]; then echo "File not found: $1" exit 1; fi if [ "`echo $1|grep -E '(.*{1,})\-(.*[\.\-].*[\.\-].*).tgz[ ]{0,}$'`" == "" ]; then return; fi NAME=$(echo $1|sed -re "s/(.*\/)(.*.tgz)$/\2/") LOCATION=$(echo $1|sed -re "s/(.*)\/(.*.tgz)$/\1/") SIZE=$( expr `gunzip -l $1 |tail -1|awk '{print $1}'` / 1024 ) USIZE=$( expr `gunzip -l $1 |tail -1|awk '{print $2}'` / 1024 ) REQUIRED=$(tar xzfO $1 install/slack-required 2>/dev/null|xargs -r -iZ echo -n "Z,"|sed -e "s/,$//") CONFLICTS=$(tar xzfO $1 install/slack-conflicts 2>/dev/null|xargs -r -iZ echo -n "Z,"|sed -e "s/,$//") SUGGESTS=$(tar xzfO $1 install/slack-suggests 2>/dev/null|xargs -r ) METAFILE=${NAME%tgz}meta echo "PACKAGE NAME: $NAME" > $LOCATION/$METAFILE if [ -n "$DL_URL" ]; then echo "PACKAGE MIRROR: $DL_URL" >> $LOCATION/$METAFILE fi echo "PACKAGE LOCATION: $LOCATION" >> $LOCATION/$METAFILE echo "PACKAGE SIZE (compressed): $SIZE K" >> $LOCATION/$METAFILE echo "PACKAGE SIZE (uncompressed): $USIZE K" >> $LOCATION/$METAFILE echo "PACKAGE REQUIRED: $REQUIRED" >> $LOCATION/$METAFILE echo "PACKAGE CONFLICTS: $CONFLICTS" >> $LOCATION/$METAFILE echo "PACKAGE SUGGESTS: $SUGGESTS" >> $LOCATION/$METAFILE echo "PACKAGE DESCRIPTION:" >> $LOCATION/$METAFILE tar xzfO $1 install/slack-desc |grep -E '\w+\:'|grep -v '^#' >> $LOCATION/$METAFILE echo "" >> $LOCATION/$METAFILE } case "$1" in pkg) if [ -n "$2" ]; then gen_meta $2 else echo "$0 [pkg [file]|all|new|PACKAGESTXT|MD5]" fi ;; all) for pkg in `find . -type f -name '*.tgz' -print` do gen_meta $pkg done $0 PACKAGESTXT $0 MD5 ;; new) for pkg in `find . -type f -name '*.tgz' -print` do if [ ! -f ${pkg%tgz}meta ]; then gen_meta $pkg fi done ;; PACKAGESTXT) gen_packages_txt ;; MD5) gen_md5_checksums ;; *) echo "$0 [pkg [file]|all|new|PACKAGESTXT|MD5]" ;; esac ### END SCRIPT 18. How can I download every package in a disk set? You can use the install-set option to install all of the packages within a disk set. To install every package from xap: slapt-get --install-set xap 19. How can I add dependency information to my packages? This is for package developers. If you are not a package developer, please request your packager include this information. To export the dependency data for a package, include within your package the following file: ./install/slack-required The structure of this file is one entry per line in the following format: package_name or [package_name] [condition] [version] where [condition] is =, >=, =<, <, or > <= and =< should both work, just in case of editing errors. Version should include the arch and build if using '='. That is the full Slackware package version designation. 1.1.0-386-1 is valid. 1.1.0 is not. You can specify multiple packages to satisfy a dependency. The alternate packages are separated by a pipe, |. jre = 1.4.1-i586-1 | j2sdk >= 1.4.2-i386-1 | jdk > 1.5.0-i386-1 The package names are case sensitive. So make sure you keep the case of the package name as it appears in the package filename. An example slack-required file is present within the slapt-get slack package. This data will then need to be extracted when the mirrors PACKAGES.TXT file is generated. See FAQ #17 for an example of how to generate the PACKAGES.TXT file. The following is an example entry: PACKAGE NAME: man-pages-1.56-noarch-1.tgz ...(snip) PACKAGE REQUIRED: man >= 1.5l-i386-1 An example command to pull that data: tar xzfO pkg-name-version-arch-rel.tgz install/slack-required |xargs -iZ echo -n "Z,"|sed -e "s/,$//" 20. How do I get the newest development version of slapt-get? See the 'Using cvs' section of the INSTALL document. 21. How can I contribute my ideas or code? Send in ideas or patches to the development list: slapt-get-devel at software dot jaos dot org The user list can be used for questions on slapt-get usage, etc: slapt-get-user at software dot jaos dot org 22. How can I get slapt-get to speak in my native tongue? GNU gettext is used to extract all translatable strings from the source. Please look in the po/ directory of the slapt-get source. Copy the slapt-get.pot file to a new file named with your native language abbreviation, ending in .po. For example, to translate to German, download the current translation file available here: http://software.jaos.org/BUILD/slapt-get/po/slapt-get.pot $ cp slapt-get.pot de.po Edit that file. For every msgid, translate that into the msgstr "". Leave the formatting the same. More translations are needed. Email in your translation to the slapt-get-devel mailing list (slapt-get-devel at software dot jaos dot org). Your contributions are greatly appreciated. 23. How do I set the output language? You can change the locale at runtime by setting the LANG environment variable. $ LANG=fr slapt-get 24. How do I specify proxy settings? slapt-get takes advantage of the normal http_proxy and ftp_proxy shell variables. Here are some examples: # setting the env variables for the entire session $ export http_proxy=http://host:port $ export ftp_proxy=ftp://host:port # just setting them for the current command invocation $ http_proxy=http://host:port slapt-get --update If you are using ~/.netrc, libcurl automatically picks up your preferences. See the netrc(5) manpage for more information. 25. How can I exclude all *pre*, *beta*, and *686* packages safely? An exclude regex like .*pre.* , .*beta.*, or .*686.* may net you the results of excluding all packages with those characters in the name or version. But they may also catch packages that have those characters normally occurring in the package name. This regex seems to work much better: [0-9\_\.\-]{1}pre[0-9\-\.\-]{1} for beta packages: [0-9\_\.\-]{1}beta[0-9\-\.\-]{1} or for i686 packages (or for i585 or i486): [0-9\_\.\-]+i686 Anything matching these regex will be added to the exclude list for the transaction. 26. How does the transaction engine work? The last few series of releases (0.9.6x and 0.9.7x) have supported transactions so that nothing happens unless everything checks out properly. The transaction is built up of packages to install, upgrade and remove. The transaction status will be reported to the user to be confirmed (unless the user passes in --no-prompt on the command line). After this confirmation, all packages will be downloaded before anything else happens. If anything fails to download, the transaction is immediately aborted. If all packages download successfully, all removals in the transaction are completed first (in case packages being installed/upgraded share files with the packages to be removed). Next, all packages to be installed (new installs) are installed. This should satisfy dependencies of the packages to be upgraded, which follow after the new installs. The order of package dependencies, where available, is honored. These dependencies are installed prior to the packages that require them. This helps keep your system in a consistent state. 27. How does the package version comparison algorithm work? Say we have foo-1.1.3-i386-1rob and foo-1.1.3-i686-1. The version parts will be compared, first 1, then 1, then 3. At this point, both packages are equal, since 1.1.3 == 1.1.3. If one is greater at this point, the version check returns. Then, it checks to make sure that both pkgs have the same number of "version parts". This is the case in this example, both have 3 (1,1,3). This is useful when you see packages like 1.2 and 1.2.1. Whichever has more parts wins. At this point, we know if one only has 2 parts, and the other has 3, then the first two parts of both version strings have to be equal. Then, the package versions are checked to see if they follow the Slackware convention. This is determined by checking the first instance of '-' against the last instance. If the pointer returned from index and rindex are different, then we assume we have at least two package version separators (meaning we should have an upstream version, arch, and build at least). If two separators are found, the build portion of the string is located. The integer value of the build strings are compared. So "1rob" has an integer value of 1, and "1" has an integer value of 1. So in our example, both package versions are the same. If the only difference is the arch and the packages follow the conventions, then they should always be equal. If two separators are not found, then the entire version string from both pkgs are compared via strcmp. This is a fallback mechanism. 28. I am tracking current, how do I keep the base disk set up to date? If you are tracking current, --dist-upgrade is more appropriate than --upgrade. Even if you aren't intentionally switching to a newer distribution, --dist-upgrade will ensure that the base set is always present while at the same time keeping your installed packages up to date. See also FAQ #9. --dist-upgrade --reinstall can also be useful when some packages in the base disk set change versions (cxxlibs and sed come to mind). This will reinstall those base packages that may have lesser version numbers. --dist-upgrade --remove-obsolete will remove any packages that Pat has removed from current. CAUTION: this can only take into consideration packages that are available from your current sources. Thus self made packages will be considered obsolete as well (they can be excluded within slapt-getrc, however). Only use this if you have been using Slackware packages exclusively. You can also use this option for information purposes. --dist-upgrade --remove-obsolete --reinstall will do all of the above in one action. It will ensure every package from /a/ is reinstalled, and remove obsolete packages. 29. How would I script an ldd dependency hack with slapt-get? Do something like the following: ### begin script #!/bin/sh # slapt-get wrapper to hack dependencies via ldd where slack-required isn't available # Copyright (C) 11-30-2003 Jason Woodward |
:: Command execute :: | |
--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0155 ]-- |