LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 8670|回复: 24

最强的slackware包管理工具SWARET说明

[复制链接]
发表于 2004-1-17 17:05:14 | 显示全部楼层 |阅读模式
比slapt-get还要强大的第三方管理工具,有了它和slapt-get和checkinstall,我们的slackware也很强大好用了!

Frequently Asked Questions
--------------------------
1. If I have a Question, what should I do?
2. When do I need to use the Command: 'swaret --update'?
3. Can I Upgrade Slackware 7.1 or Slackware 8.0
to Slackware 8.1 or Higher or Current?
4. How can I Upgrade Slackware 8.1 safely
to Slackware 9.0 or Higher?
5. How can I Upgrade Slackware 8.1 or Higher safely
to Slackware Current?
6. Is it possible to Update my Slackware System from cron?
7. How do I Install Patches on my Slackware 9.1 System?
8. Can I use more then one 'File' URL in /etc/swaret.conf?
9. Can I use NFS shares and/or Samba shares with swaret?
10. Can I use my Slackware Linux CD-ROM with swaret?
11. swaret hangs. What should I do?
12. swaret does not want to Upgrade some Packages,
and says it's up-to-date. What should I do?
13. What should I do if swaret cannot resolve
a missing Library to a Package?
14. How do I Re-Install the whole Base System?
15. Can I Upgrade Slackware Packages
matching the Slackware Directories a/ and ap/?
16. Can I use more than one Keyword?
17. How do I Exclude some Packages and/or Patches and/or Sources
when Upgrading, Installing, Re-Installing,... etc?
18. swaret does not Upgrade my kernel. What should I do?
19. Will swaret start LILO after Upgrading the kernel?
20. Will swaret start LILO after Upgrading LILO?
21. Abiword gives me some missing Libraries. What should I do?
22. Can I randomize the order of ROOT, DEP_ROOT and/or REPOS_ROOT Mirrors?
23. When I want to use a Local Mirror,
swaret says my Network Connection is down.
What should I do?
24. How do I Install all Packages with one Command?
25. I have a Slackware Linux 9.1 CD mounted at /mnt/cdrom.
Is it possible to create locally a Library List,
or can I use the Libraries List from the Internet?
26. Is it possible to use another Download Interface?
27. How does the GPG Signature Check work for
Official Slackware Linux Packages?
28. What should I do if swaret cannot find
a Package in the List Files?
29. Why is there a --dep action?
30. Can I use '(Advanced) Regular Expressions (REGEXP)'?
31. How to automate the Update of the 'slocate' Database?
32. How can I allow swaret to use a Remote or Local Repository?
33. How can I create my own Local Repository and
allow swaret to use it?
34. Can swaret Track and Fix missing Libraries
from Remote or Local Repository Packages?
35. swaret seem not to start the Dependency Check after
Upgrading, Installing and/or Re-Installing Packages,
how is that possible?
36. Can I use a Repository without using the Official
Slackware Linux Mirrors? (ROOT Variable(s) in swaret.conf)
37. Can swaret E-Mail the List of Packages ready for Upgrade?
38. Can swaret use GPG Signature Check on Repository Packages?
39. How to create a Secret GPG Key, a Public GPG Key and
GPG Signature Files for Slackware (Repository) Packages?
40. Can swaret Upgrade, Install, Re-Install, Get Packages
from Sites like http://www.linuxpackages.net?
41. How does the Dependency Support work for Repository Packages?
42. Can I Search the FAQ for Q&A matching a Keyword?
43. Can I Search the HOW-TO-USE-SWARET
for Examples matching a Keyword?
44. swaret is Listing Items too fast, what shall I do?
45. How can I use my Language in swaret?
46. I have a Firewall, and swaret doesn't seem to work well with it.
47. Help! I have a i586 CPU, and swaret wants me to use i686 Packages!
48. I need to use a Proxy, how can I set it up in swaret.conf?
99. I did not find my Question here. What should I do?



1.
Q: If I have a Question, what should I do?
A: The best thing is to Check out the swaret Forum,
http://www.swaret.org, and post your Question there.
For more Information:
swaret --htus
swaret --manual
swaret --manual -c

2.
Q: When do I need to use the Command: 'swaret --update'?
A: You need to --update every time there are new
Packages or Patches or Sources out there.
If you don't --update the List Files regularly,
you won't be able to get the latest Files.
You can always use the Command, 'swaret --changelog',
which will Show the latest ChangeLog. The ChangeLog
is a Log File which gives you Information about the latest
Changes to Slackware Linux. You can also Check for
Changes at http://www.slackware.com/changelog/.

3.
Q: Can I Upgrade Slackware 7.1 or Slackware 8.0
to Slackware 8.1 or Higher or Current?
A: No, you can 't!
Slackware 8.0 and lower use an old Slackware Package scheme.
Slackware 8.1 and later use the new Slackware Package scheme.

OLD: pkgname.tgz
NEW: packagename-version-arch-build.tgz

If you are using Slackware 8.1 or Higher,
you will be able to use swaret without any problem!

4.
Q: How can I Upgrade Slackware 8.1 safely
to Slackware 9.0 or Higher?
A: Edit /etc/swaret.conf, set VERSION and ROOT to 9.0.

Retrieve the latest List Files for the new Version:
swaret --update

Download a/glibc-solibs, a/pkgtools, a/bin and a/sed.
swaret --get glibc-solibs,pkgtools,bin-,sed -a

Go to the cache Directory (/var/swaret) and apply the following Commands:
upgradepkg glibc-solibs*.tgz
upgradepkg pkgtools*.tgz
upgradepkg bin-*.tgz
installpkg sed*.tgz

Upgrade Slackware Linux 8.1 to Slackware Linux 9.0 with:
swaret --upgrade (manual installation)
or
swaret --upgrade -a (automatic installation)

NOTE:
If you have already tried to Upgrade to Current and it gave you problems,
Download a/glibc-solibs, a/pkgtools, a/bin and a/sed
manually from any available mirror below.

#ROOT=file:/mnt/cdrom
#ROOT=file:/mnt/dvdrom
#ROOT=file:/mnt/usbmemstick
ROOT=ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-9.0
ROOT=http://sunsite.cnlab-switch.ch/ftp/mirror/slackware/slackware-9.0
ROOT=ftp://ftp.slackware.no/pub/linux/slackware/slackware-9.0
ROOT=http://www.slackware.no/slackware/slackware-9.0
ROOT=ftp://ftp.slackware.at/slackware-9.0
ROOT=http://www.slackware.at/data/slackware-9.0
ROOT=ftp://ftp.planetmirror.com/pub/slackware/slackware-9.0
ROOT=http://ftp.planetmirror.com/pub/slackware/slackware-9.0
#ROOT=rsync://rsync.slackware.no/slackware/slackware-9.0
#ROOT=rsync://rsync.slackware.at/slackware/slackware-9.0
#ROOT=file:/pub/slackware
#ROOT=file:/mnt/nfsshare/slackware
#ROOT=file:/mnt/sambashare/slackware

(More Slackware Linux Mirrors available at http://www.slackware.com/)

After Downloading, use the following Commands to Upgrade and start swaret over:

upgradepkg glibc-solibs*.tgz
upgradepkg pkgtools*.tgz
upgradepkg bin-*.tgz
installpkg sed*.tgz

swaret --upgrade (manual installation)
or
swaret --upgrade -a (automatic installation)

5.
Q: How can I Upgrade Slackware 8.1 or Higher
safely to Slackware Current?
A: Edit /etc/swaret.conf, set VERSION and ROOT to current.

Retrieve the latest List Files for the new Version.
swaret --update

Download a/glibc-solibs, a/pkgtools, a/bin and a/sed:
swaret --get glibc-solibs,pkgtools,bin-,sed -a

Go to the cache Directory (/var/swaret) and apply the following Commands:
upgradepkg glibc-solibs*.tgz
upgradepkg pkgtools*.tgz
upgradepkg bin-*.tgz
installpkg sed*.tgz

Upgrade Slackware Linux 8.1 to Slackware Linux Current with:
swaret --upgrade (manual installation)
or
swaret --upgrade -a (automatic installation)

NOTE:
If you have already tried to Upgrade to Current and it gave you problems,
Download a/glibc-solibs, a/pkgtools, a/bin and a/sed
manually from any available Mirror below.

#ROOT=file:/mnt/cdrom
#ROOT=file:/mnt/dvdrom
#ROOT=file:/mnt/usbmemstick
ROOT=ftp://ftp.nluug.nl/pub/os/Linux/distr/slackware/slackware-current
ROOT=http://sunsite.cnlab-switch.ch/ftp/mirror/slackware/slackware-current
ROOT=ftp://ftp.slackware.no/pub/linux/slackware/slackware-current
ROOT=http://www.slackware.no/slackware/slackware-current
ROOT=ftp://ftp.slackware.at/slackware-current
ROOT=http://www.slackware.at/data/slackware-current
ROOT=ftp://ftp.planetmirror.com/pub/slackware/slackware-current
ROOT=http://ftp.planetmirror.com/pub/slackware/slackware-current
#ROOT=rsync://rsync.slackware.no/slackware/slackware-current
#ROOT=rsync://rsync.slackware.at/slackware/slackware-current
#ROOT=file:/pub/slackware
#ROOT=file:/mnt/nfsshare/slackware
#ROOT=file:/mnt/sambashare/slackware


(More Slackware Linux Mirrors available at http://www.slackware.com/)

After Downloading, use the following Commands to Upgrade and start swaret over:

upgradepkg glibc-solibs*.tgz
upgradepkg pkgtools*.tgz
upgradepkg bin-*.tgz
installpkg sed*.tgz

swaret --upgrade (manual installation)
or
swaret --upgrade -a (automatic installation)

6.
Q: Is it possible to Update my Slackware System from cron?
A: Yes. For Example, to Upgrade your Slackware Linux System
every Day at 3:00 AM, use the following cronjob rule:

0 3 * * * /usr/sbin/swaret --update && /usr/sbin/swaret --upgrade -a

You can also use 'swaret --get -au' to only Get the Packages:

0 3 * * * /usr/sbin/swaret --update && /usr/sbin/swaret --get -au

If you want to know which Packages have been Upgraded,
take a look in swaret's Log File (default: /var/log/swaret).

7.
Q: How do I Install Patches on my Slackware 9.1 System?
A: Set VERSION to 9.1 in /etc/swaret.conf and add
Slackware 9.1 Mirrors to the ROOT Variable(s).
Now, --update and use the --install -p option
to Install all Patches manually. You can also use the
Search and/or List actions to know which Patches are available.
Install the latest OpenSSH Patch can be done by doing:
swaret --install openssh -p. If there is already an
installed Version of OpenSSH, swaret will Upgrade this Package
with the available Patch, else it will Install the Patch.
swaret --upgrade openssh should also do the trick.

8.
Q: Can I use more then one 'File' URL in /etc/swaret.conf?
A: Yes. If you have a CD-ROM mounted at /mnt/cdrom and
a NFS share mounted at /mnt/slackware,
you can add both to the ROOT Variable(s) in /etc/swaret.conf.

9.
Q: Can I use NFS shares and Samba shares with swaret?
A: Yes, you can! For Example (NFS or Samba), you have a Copy of Slackware Linux
on a Server which is shared with NFS or Samba. Mount the NFS share or Samba share
to /mnt/slackware and set ROOT to 'file:/mnt/slackware' in /etc/swaret.conf.

10.
Q: Can I use my Slackware Linux CD-ROM with swaret?
A: Yes, you can! For Example, mount the CD-ROM to /mnt/cdrom
and set ROOT to 'file:/mnt/cdrom' in /etc/swaret.conf.

11.
Q: swaret hangs. What should I do?
A: Press 'CTRL + C' to break out of swaret, and try again.

12.
Q: swaret does not want to Upgrade some Packages,
and says it's up-to-date. What should I do?
A: This is because swaret cannot Version some Packages.
You should try to --get the new Package, and
'upgradepkg' the Package manually found in the swaret
Packages Cache Directory. (default: /var/swaret).
For Repository Packages, you can 'cd' to
/var/swaret/repos/REPOSITORYNAME.
Remember to use up-to-date Slackware Linux Mirrors!

13.
Q: What should I do if swaret cannot resolve
a missing Library to a Package?
A: Set DSEARCHLIB to 1 in /etc/swaret.conf, and try over again.
swaret will try to Search for missing Libraries
that could be found on your System, but not tracked by ldconfig.
You can also set DSEARCHM to 1 if you got an up-to-date 'slocate' Database,
else if it's set to 0, swaret will use the 'find' Command.
If swaret can't find the missing Library, you can use the Library Name
as a Keyword to Search for using your Favourite Search Engine.
Google is our recommended Search Engine: www.google.com.

14.
Q: How do I Re-Install the whole Base System?
A: In the Slackware Packages Tree you have the following Directories:
a/ ap/ d/ e/ f/ gnome/ k/ kde/ kdei/ l/ n/ t/ tcl/ x/ xap/ y/
The Base System files can be found in the Directory a/
To Re-Install the Base System: swaret --reinstall a/

15.
Q: Can I Upgrade Slackware Packages
matching the Slackware Directories a/ and ap/?
A: Yes: swaret --upgrade a/,ap/

16.
Q: Can I use more than one Keyword?
A: Yes. For Example, you want to Install gnome, kde, and the xfree Packages.
Do this: swaret --install gnome,kde,xfree
Should work on all actions which require a Keyword.

17.
Q: How do I Exclude some Packages and/or Patches and/or Sources
when Upgrading, Installing, Re-Installing,... etc?
A: If you don't want swaret to Upgrade, Install, Re-Install,... etc,
some Packages and/or Patches and/or Sources,
add the Keywords to the EXCLUDE Variable(s).
Basic EXCLUDE example:
EXCLUDE=lilo kernel -*dl$ -*rob$ -*mybuild$
Syntax for Advanced Exclude:
KEYWORD[DONT_EXCLUDE_ME_KEYWORD1,DONT_EXCLUDE_ME_KEYWORD2,...]
Example for Advanced Exclude:
EXCLUDE=kde-i18n[nl,en_GB] koffice-i18n[nl,en_GB] xfree86[docs,fonts]

18.
Q: swaret does not Upgrade my kernel. What should I do?
A: Remove the Keyword 'kernel' from the EXCLUDE Variable(s) in /etc/swaret.conf.
If your System is f*cked up after a Kernel Upgrade, it's your problem.
If you are an expert, you know how to handle it anyway.
I would advise you to compile your own kernel from Source.
Get it with: swaret --get kernel -s (Download Kernel Source manually)

19.
Q: Will swaret reinitialise LILO after Upgrading the kernel?
A: Yes.
NOTE: If the Keyword 'kernel' is found in an EXCLUDE Variable in /etc/swaret.conf,
LILO will not be reinitialised, so remove it.

20.
Q: Will swaret start LILO after Upgrading LILO?
A: Yes.
NOTE: If the Keyword 'lilo' is found in an EXCLUDE Variable in /etc/swaret.conf,
LILO will not be reinitialised, so remove it.

21.
Q: Abiword gives me some missing Libraries. What should I do?
A: Set the Variables DEPENDENCY and DEP_ROOT in /etc/swaret.conf
and issue 'swaret --dep abiword'. This will track all missing Libraries
and will try to Download the necessary Packages,
and you have possibility to Upgrade or Install or Re-Install the Packages.
If swaret cannot find the missing Libraries,
you can set DSEARCHLIB=1 (and DSEARCHM) in /etc/swaret.conf,
which will tell swaret to Search your entire System for them,
and correct the problem.

22.
Q: Can I randomize the order of Slackware Mirrors?
A: Ya Sure! Set RANDOMR=1 in /etc/swaret.conf.

23.
Q: When I want to use a Local Mirror,
swaret says my Network Connection is down.
What should I do?
A: Set NIC=lo in /etc/swaret.conf to tell swaret
to use your local loopback device.

24.
Q: How do I Install all Packages with one Command?
A: Most of the actions do not require a Keyword.
If you don't use a Keyword, swaret will apply the action
to all Packages, Patches and/or Sources.
For Example, you want to Install all Packages with one Command,
use this Command: swaret --install.
Same for Upgrade, swaret --upgrade; Also for Sources,
Download all Sources automatically: swaret --get -as.

25.
Q: I have a Slackware Linux 9.1 CD mounted at /mnt/cdrom.
Is it possible to create a Local Library List,
or can I use the Libraries List from the Internet?
A: Yes! If there are no DEP_ROOT Variables defined in /etc/swaret.conf,
swaret will try to create the Libraries List itself.
It will fetch these Files from Slackware Mirrors defined in the ROOT Variables.
If you want to use the Libraries List defined in DEP_ROOT,
swaret will not create the Libraries List itself. It's your choice.
If there are no DEP_ROOT Variables defined in /etc/swaret.conf,
the Dependency Check called with the --dep action or called
with the Upgrade, Install, Re-Install, Download, etc. Procedures,
will create the Libraries List without your Interaction.
If DEP_ROOT Variables are defined,
swaret will fetch the Libraries List defined in it.

26.
Q: Is it possible to use another Download Interface?
A: Yeah. If PROGRESS is set to 0 in /etc/swaret.conf,
swaret will use its '%' Download Interface.
If set to 1, the 'size' Interface will be used.
If set to 2, the wget/rsync Download Interface will be used.

27.
Q: How does the GPG Signature Check work for
Official Slackware Linux Packages?
A: First of all, you will need the GPG Public Key from Patrick Volkerding.
It can be found in the Slackware Root Directory of any Slackware Linux Mirror.
When you have Fetched the GPG-KEY, you can import it with:
swaret --gpg -i /path/to/GPG-KEY
Set GPGCHECK=1 in /etc/swaret.conf. swaret will from now on
Fetch every Package with its GPG Signature File, and Verify
it with the Public GPG Key you've imported.

28.
Q: What should I do if swaret cannot find
a Package in the List Files?
A: Set the DSEARCHLIB and DSEARCHM Variables in /etc/swaret.conf,
and try the --dep action (again). If this doesn't help,
try to Search for the Package with your Favourite Search Engine.
Google is our recommended Search Engine: www.google.com.

29.
Q: Why is there a --dep action?
A: The --dep action is made to Check for missing Libraries whenever you want.
If you have set DEPENDENCY to 1 in /etc/swaret.conf,
swaret will launch the Dependency Check after you've ran the
Upgrade, Install, Re-Install,... etc, Procedures.

30.
Q: Can I use '(Advanced) Regular Expressions (REGEXP)'?
A: Yes you can! If you don't know how REGEXP works,
try to Search for Regular Expressions on Google (www.google.com).
A simple Example to Search for all Packages matching *lib*gnome*,
use this Command: swaret --search .*lib.*gnome.*
For all XFree86 Packages with Fonts: swaret --search xfree.*fonts.*
You can use a normal Pattern/Keyword also,
For Example: swaret --search kde

31.
Q: How to automate the Update of the 'slocate' Database?
A: After Dependency Check has finished tracking missing Libraries,
swaret can Search for missing Libraries on your System,
only the /usr and /opt directories.
By default, swaret will use the 'find' command. You can also
use the 'slocate' program attached to a Database. This Database
contains a List of all Files available on your System.
You need to Update this Database regularly with 'updatedb'.
To automate this with cron, you can add the following rule,
which will start the 'updatedb' command every day at 4:00 PM.

NOTE: First try out the Command 'updatedb' manually.
If it returns a warning like:
"could not open database: /var/lib/slocate/slocate.db"
issue the Command: touch /var/lib/slocate/slocate.db,
and restart 'updatedb'.

0 4 * * * `which updatedb` >/dev/null 2>&1

(use: crontab -e)

32.
Q: How can I allow swaret to use a Remote or Local Repository?
A: - To allow swaret to use a REMOTE Repository, you need to add
any Repository URL to the REPOS_ROOT Variable(s) in /etc/swaret.conf.

Syntax:
REPOS_ROOT=REPOSITORYNAME%PROTOCOL:URL

Example for FTP:
REPOS_ROOT=SomeRemoteRepository%http://www.someremoterepository.net

Example for HTTP:
REPOS_ROOT=SomeRemoteRepository%ftp://ftp.someremoterepository.net

Example for RSYNC:
REPOS_ROOT=SomeRemoteRepository%rsync://rsync.someremoterepository.net

The REPOSITORY NAME can only be ONE Keyword!

The Remote Repository MUST contain Slackware Linux similar List Files.
These Files are: CHECKSUMS.md5, FILELIST.TXT, PACKAGES.TXT, and MANIFEST.bz2.
If the Repository has NO PACKAGES.TXT and/or MANIFEST.bz2 File(s),
swaret can still work with the CHECKSUMS.md5 and FILELIST.TXT Files.

- To allow swaret to use a LOCAL Repository, you need to add
any Repository URL to the REPOS_ROOT Variable(s) in /etc/swaret.conf.

Syntax:
REPOS_ROOT=REPOSITORYNAME%PROTOCOL:URL

Example for FILE:
REPOS_ROOT=MyLocalRepository%file:/pub/slackwarepackages

The REPOSITORY NAME can only be ONE Keyword!

The Repository MUST contain Slackware Linux similar List Files.
These Files are: CHECKSUMS.md5, FILELIST.TXT, PACKAGES.TXT, and MANIFEST.bz2.
If the Repository has NO PACKAGES.TXT and/or MANIFEST.bz2 File(s),
swaret can still work with the CHECKSUMS.md5 and FILELIST.TXT Files.

You can create a Repository with 'swaret-tools'!
'swaret-tools' is available on http://www.swaret.org.

33.
Q: How can I create my own Local Repository and
allow swaret to use it?
A: You can create a Repository by using 'swaret-tools'!
'swaret-tools' is available at http://www.swaret.org!

You also need a Directory with Slackware Packages which
can be locally available on your Box, maybe mounted through
iso9660 (CD-ROM), nfs (NFS), smbfs (Samba),... and even
a Remote Directory with Slackware Packages somewhere on the Internet.

For Example, i'm using /pub/slackwarepackages which contains
Slackware Packages, and still needs Files to let swaret
to work with it. Every Repository MUST contain Slackware Linux
similar Files: - CHECKSUMS.md5
- FILELIST.TXT
- PACKAGES.TXT
- MANIFEST.bz2

After creating the Repository using 'swaret-tools', you need to add:
REPOS_ROOT=MyLocalRepository%file:/pub/slackwarepackages to /etc/swaret.conf!

Issue also the Command: 'swaret --update' and start using swaret with
your Local Repository! ;-)

34.
Q: Can swaret Track and Fix missing Libraries from
Remote or Local Repository Packages?
A: Yes! If the Local or Remote Repository has the necessary List Files:
CHECKSUMS.md5, FILELIST.TXT, PACKAGES.TXT, and MANIFEST.bz2 Package.
When using --install, --reinstall and/or --dep, swaret will try
to Track and Fix missing Libraries by Downloading the necessary
Packages, else it will tell you which Libraries you need if not found!

35.
Q: swaret seem not to start the Dependency Check after
Upgrading, Installing and/or Re-Installing Packages,
how is that possible?
A: swaret keeps Track of all Files in a bin or sbin Directory.
It then checks those binary Files with ldd, looking for any
return of 'not found' in the return string.
It then tries to resolve the missing library to a Package Name.

36.
Q: Can I use a Repository without using the Official
Slackware Linux Mirrors? (ROOT Variable(s) in swaret.conf)
A: Yes, just comment (#) the ROOT Variable(s) in /etc/swaret.conf,
swaret --update and start using swaret with the Repository ;-)

37.
Q: Can swaret E-Mail the List of Packages ready for Upgrade?
A: Yes, you can use the Command 'swaret --extra' for this.
You could also add a cronjob rule to cron to ask swaret
to send an E-Mail with the List of Packages
ready for Upgrade every Day at 3:00 PM.
Use the following cronjob rule

0 15 * * * /usr/sbin/swaret --extra -u mail user[@domain-name.domain]

Be sure to have an SMTP Daemon installed and running!

38.
Q: Can swaret use GPG Signature Check on Repository Packages?
A: Yes, you need a Public GPG Key (GPG-KEY) which is used
to Verify the Package with its GPG Signature. You need also
Slackware Packages (.tgz) with their GPG Signature File.
(packagename-version-arch-build.tgz.asc). It is very
important that the Package (.tgz) and GPG Signature File
are in the same Directory!
If GPGCHECK is set to 1 in /etc/swaret.conf, swaret will
try to Fetch the GPG Signature File for the concerning
Package, and start the GPG Signature Check.
Remember to import the Public GPG Key with:
swaret --gpg -i /path/to/GPG-KEY

GPG-KEY (or any similar named Public GPG Key) should
be found in the root of the Repository you're using!

More info about GPG: http://www.gnupg.org

39.
Q: How to create a Secret GPG Key, a Public GPG Key and
GPG Signature Files for Slackware (Repository) Packages?
A: You first need to Install GnuPG (slackware/n/gnupg).
I'll explain all this by using an Example to be clear.

Create a Secret GPG Key with:
gpg --gen-key

Follow my Example for the 'gpg --gen-key' Command:

--
gpg (GnuPG) 1.2.3; Copyright (C) 2003 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Please select what kind of key you want:
(1) DSA and ElGamal (default)
(2) DSA (sign only)
(5) RSA (sign only)
Your selection? 5
What keysize do you want? (1024)
Requested keysize is 1024 bits
Please specify how long the key should be valid.
0 = key does not expire
= key expires in n days
w = key expires in n weeks
m = key expires in n months
y = key expires in n years
Key is valid for? (0) 0
Key does not expire at all
Is this correct (y/n)? y

You need a User-ID to identify your key; the software constructs the user id
from Real Name, Comment and Email Address in this form:
Heinrich Heine (Der Dichter)

Real name: Luc Cottyn
Email address: luc@swaret.org
Comment: swaret Creator
You selected this USER-ID:
Luc Cottyn (swaret Creator)

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a Passphrase to protect your secret key.

We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
..+++++
..+++++
public and secret key created and signed.
key marked as ultimately trusted.

pub 1024R/5D368499 2003-11-09 Luc Cottyn (swaret Creator)
Key fingerprint = 1234 1234 1234 1234 1234 1234 1234 1234 1234 1234
--

After specifying several parameters, you need the ID
of the Secret GPG Key you've created.

Use 'gpg --list-secret-keys' and you will see
something like this:

sec 1024R/5D368499 2003-11-09 Luc Cottyn (swaret Creator)

Now create a Public GPG Key with:
gpg -a -o GPG-KEY --export 5D368499

This Command will create an ASCII File called GPG-KEY,
which contains your Public GPG Key to be used by swaret.

At this moment we've a locally stored Secret GPG Key,
which may NEVER float on the Internet..., and also
a Public GPG Key called: GPG-KEY

We will now create a GPG Signature File for a simple
Slackware Package Example:

(Browse to your Slackware Packages Repository)
gpg -a -b pkgtools-9.0.0-i386-1.tgz

This will create the pkgtools-9.0.0-i386-1.tgz.asc File
which is a GPG Signature File used to check if
the pkgtools Package has been created by you or not.

You need to do this MANUALLY for all Slackware Packages!

If you want to AUTOMATE the creation of
GPG Signature Files you can use an easy way to do it.
This is not a very secure way, you can always give it a try.
You can also take a look on http://www.gnupg.org how to
automate the creation of GPG Signature Files securely.

YOUR_PASSPHRASE=SOME_PLAINTEXT_PASSPHRASE
REPOS=/path/to/localrepository
###
MMTIME=`date +%s`
echo $YOUR_PASSPHRASE > ~/.gpgpp$MMTIME
for i in `find $REPOS -name *.tgz`; do
gpg -a --detach --passphrase-fd 3 3<~/.gpgpp$MMTIME --sign $i
done
rm -f ~/.gpgpp$MMTIME
###

Ending this little 'howto'... You should now have
a Repository of Slackware Linux Packages with
each their own .asc GPG Signature File.

Users who want to use your Slackware Packages, need
to 'swaret --gpg -i /path/to/GPG-KEY' your GPG-KEY,
enable GPGCHECK with --set GPGCHECK=1 or edit
/etc/swaret.conf manually, and swaret will start
a GPG Signature Check on every Package to check
wether the Package has been created by you or not.

.. tHE eND ..

More info about GPG: http://www.gnupg.org

40.
Q: Can swaret Upgrade, Install, Re-Install, Get Packages
from Sites like http://www.linuxpackages.net?
A: Yes, just add the following REPOS_ROOT Variable in
/etc/swaret.conf, --update and start using swaret.

For LinuxPackages DOT NET:
lpdotnet%ftp://ftp.linuxpackages.net/pub/Slackware-9.1

You can also take a look to the default Config File
found in /usr/doc/swaret-VERSION which contains
several Repositories with Slackware Packages which
can be used by swaret.

Visit http://www.swaret.org?menu=sp regularly for new Repository
Sites which can be added in /etc/swaret.conf ;-)

41.
Q: How does the Dependency Support work for Repository Packages?
A: You first need one or more Repository Variables in
/etc/swaret.conf (REPOS_ROOT). If you are sure
about that, you need to --update to get the List Files.
After Upgrading, Installing, and/or Re-Installing
Repository Packages, swaret will launch the Dependency Check
on these Packages and will fetch the MANIFEST.bz2 Package
which contains Information to create the Library List
used by the Dependency Check, the rest will be done by swaret.
Remember to set DEPENDENCY to 1 in /etc/swaret.conf!

- CHECKSUMS.md5 (For MD5 Sum, REQUIRED)
- FILELIST.TXT (For Package Name + Size, REQUIRED)
- PACKAGES.TXT (For Package Description, NOT REQUIRED)
- MANIFEST.bz2 (For Dependency Support, NOT REQUIRED)

42.
Q: Can I Search the FAQ for Q&A matching a Keyword?
A: Yes, just use: 'swaret --faq [KEYWORD]' instead
of using 'swaret --faq'.
For Example: 'swaret --faq dependency'

43.
Q: Can I Search the HOW-TO-USE-SWARET
for Examples matching a Keyword?
A: Yes, just use: 'swaret --htus [KEYWORD]' instead
of using 'swaret --htus'.
For Example: 'swaret --htus dependency'

44.
Q: swaret is Listing Items too fast, what shall I do?
A: You can use '| more'. For Example:
swaret --list | more

OR

swaret --search apache,php,mod_ssl | more

45.
Q: How can I use my Language in swaret?
A: Copy /usr/share/swaret-VERSION/swaret.lang.LANGUAGE to
/etc/swaret.lang and start using swaret.
If your Language is not available, take a look at
http://www.swaret.org/?menu=i18n for (new)
available Language Files.
If your Language is not available, you can always
Translate this Language File into your Language.
Please, Mail it to i18n@swaret.org so we can include it
in the swaret Package, and on the swaret Site.

46.
Q: I have a Firewall, and swaret doesn't seem to work well with it.
A: Try to set the PASSIVE_FTP Variable to its correct Value.

Use ACTIVE MODE
swaret --set PASSIVE_FTP=0

USE PASSIVE MODE
swaret --set PASSIVE_FTP=1

47.
Q: Help! I have a i586 CPU, and swaret wants me to use i686 Packages!
How can I prevent swaret to use 'i686' Packages?
A: Add .*i686.* to any EXCLUDE Variable in /etc/swaret.conf.
.*i686.* matches all 'i686' Packages which should be excluded.

48.
Q: I need to use a Proxy, how can I set it up in swaret.conf?
A: If you are using WGET, you can setup the WGET_PROXY Variable,
else if you are using RSYNC, you can setup the RSYNC_PROXY Variable.

For WGET - HTTP or WGET - FTP:
WGET_PROXY=http://IP or HOSTORT

For RSYNC:
RSYNC_PROXY=IP or HOSTORT

99.
Q: I did not find my question here. What should I do?
A: Check out the HOW-TO-USE-SWARET Documentation Files.
You can view it with 'swaret --htus'.
It will give an example for every --action used by swaret.
Else, check the swaret Forum on http://www.swaret.org



Copyright ?2002-2003 swaret Team  -  info at swaret dot org  -  Last Update: 2003-12-8 ~ 1:00 AM  


Linux?is a trademark of Linus Torvalds.
Slackware?is a registered trademark of Slackware Linux, Inc.
 楼主| 发表于 2004-1-17 17:06:03 | 显示全部楼层

how-to-use-swaret

Table of Contents
-----------------
1. If I got a Question, what should I do?
2. When do I need to use the Command: 'swaret --update'?
3. Example for action: update
4. Example for action: upgrade
5. Example for action: install
6. Example for action: reinstall
7. Example for action: remove
8. Example for action: get
9. Example for action: dep
10. Example for action: resume
11. Example for action: list
12. Example for action: search
13. Example for action: show
14. Example for action: changelog
15. Example for action: set
16. Example for action: gpg
17. Example for action: log
18. Example for action: purge
19. Example for action: check
20. Various Example: Install all Packages with one Command
21. Various Example: Download all Patches with one Command
22. Various Example: Track and Fix all missing Libraries
23. Various Example: Upgrade only XFree86 Fonts and Docs Packages, and Exclude other XFree86 Packages
24. Various Example: Exclude kernel, lilo and other vital Packages during Upgrade Procedure
25. Various Example: Install 'French' Language File


1.
Q: I got a question, what should I do?
A: The best thing is to forward you to the swaret Forum,
http://www.swaret.org and post your Question.
For more information,
swaret --faq
swaret --manual
swaret --manual -c

2.
Q: When do I need to use the Command: 'swaret --update'?
A: You need to --update every time there are new
Packages and/or Patches and/or Sources out there.
If you don't --update the List Files regularly,
you won't be able to get the latest Files.
You can always use the Command, 'swaret --changelog',
which will Show the latest ChangeLog.
The ChangeLog is a Log File which gives you Information
about the latest Changes to Slackware Linux.
You can also check for changes at http://www.slackware.com/changelog/.

3.
--update <> EXAMPLE:
===================================
With this action, you can update the List Files.
If DESCRIPTIONS is set to 1 in /etc/swaret.conf,
it is also possible to fetch the Descriptions File
for Packages, Extra Packages, and Patches.

4.
--upgrade <> EXAMPLE:
===================================
With this action, you can Upgrade Packages.
Each time there are new things out there,
remember to --update. So, if you want
to Upgrade the openssl Packages, use this:
swaret --upgrade openssl. Suppose you want
to Upgrade Extra Package bittorrent, use:
swaret --upgrade bittorrent. You can
always use the --changelog action to check
out if there are new things out there.
Let say you want to Upgrade all Packages
matching Keyword 'gnome', do it like this:
swaret --upgrade gnome. You want to Upgrade
all KDE Packages automatically, use this:
swaret --upgrade kde -a.
For Upgrading all Packages, you can use:
'swaret --upgrade'.

5.
--install <> EXAMPLE:
===================================
With this action, you can Install Packages,
or Patches. Suppose you want
to Install all Packages matching Keyword
'kde', use: swaret --install kde. And you
would like to Install 'xfree86' also, use:
swaret --install xfree86. You should also
not forget to Install the latest Abiword
Word Processor, do it like this:
swaret --install abiword -a (automatically).
Ouch, you want also to install xcdroast to
burn CD's. xcdroast is an Extra Package,
so Install it with: swaret --install xcdroast.
There is a Patch available for OpenSSH,
Install it with: swaret --install openssh -p.
If there is a previous Version installed
of the OpenSSL Package, swaret will Upgrade it,
else swaret will Install the new OpenSSL Patch.
You can also use --upgrade ;-)

6.
--reinstall <> EXAMPLE:
===================================
With this action, you can Re-Install installed
Packages or Patches. Suppose you want to
Re-Install the whole Base System, use this:
swaret --reinstall a/ -a (automatically).
You want to Re-Install everything of gnome,
because your gnome Installation is f*cked up,
do it like this: swaret --reinstall gnome.
You want to Re-Install xcdroast, use this:
swaret --reinstall xcdroast.

7.
--remove <> EXAMPLE:
===================================
With this action, you can Remove
installed Packages or Patches.
You want to Remove all KDE, gnome and xfree86
Packages automatically, use:
swaret --remove kde,gnome,xfree86 -a

8.
--get <> EXAMPLE:
===================================
With this action, you can Get Packages, Patches
and/or Sources. Let say you want to Get
Packages matching Keyword glibc,
use: swaret --get glibc.
You also need to Get all Packages
matching Keyword bin-: swaret --get bin-.
You have mounted my CD-ROM Drive to /mnt/cdrom
and added file:/mnt/cdrom as ROOT in
/etc/swaret.conf, this means you can use Local Files.
To Get all available KDE Packages from CD-ROM,
use: swaret --get kde -a (automatically).
You want to compile OpenSSH and Apache+PHP yourself,
Get the Sources with: swaret --get openssh,apache,php -s
and use the 'SlackBuild' Scripts which are also
saved in the swaret Sources Cache Directory
(default: /var/swaret/sources).
Get all Packages to Upgrade automatically,
use: swaret --get -au ; Get all Packages
matching Keyword 'openssl' to Upgrade:
use: swaret --get openssl -au.

9.
--dep <> EXAMPLE:
===================================
With this action, you can Track Missing
Libraries and Fix them. Let say your
GIMP Installation is f*cked up, and it's
missing some Libraries, you can use:
swaret --dep gnome.
If there are NO DEP_ROOT Variable(s) defined
in /etc/swaret.conf, swaret will Fetch the
MANIFEST Package(s) from available Mirrors
and create the Libraries List itself.
Suppose you got a Local Copy of
Slackware Linux in the Directory
/mnt/slackware (maybe mounted with
iso9660, smbfs or nfs), you can comment
all the DEP_ROOT Variables in /etc/swaret.conf
and swaret will build the Libraries List
itself ;-) Remember to set NIC to 'lo' in
/etc/swaret.conf if you want to use
Local Files (Local Repository).
If you want to Dependency Check
Everything, use '--dep'.

10
--resume <> EXAMPLE:
===================================
With this action, you can Resume broken
Packages, Patches, and Sources
found in the swaret Packages or Sources Cache Directory.
Resume all Packages: swaret --resume
Resume all Patches: swaret --resume -p
Resume all Sources: swaret --resume -s

11.
--list <> EXAMPLE:
===================================
With this action, you can List installed
and available Packages, Patches and/or Sources.
List all available Sources, use:
swaret --list -s.
Suppose you want to List all Patches
which are not installed yet, use:
swaret --list -np. If you want to know which
Packages or Patches are installed
on your System, use: swaret --list -i.
You want to see all available Packages out there?
Use: swaret --list.

12.
--search <> EXAMPLE:
===================================
With this action, you can Search installed
or available Packages, Patches and/or Sources.
Let say you want to Search for all
available Sources matching Keyword KDE, use:
swaret --search kde -s.
Suppose you want to Search for all Packages
matching Keyword 'open', so use:
swaret --search open. If you want to know which
Packages matching Keyword 'kernel' are installed
on your System, use:
swaret --search kernel -i. If you need to know
which KDE Packages aren't installed yet,
use: swaret --search kde -n.
Search for available Packages evolution,
and mozilla: swaret --search evolution,mozilla

13.
--show <> EXAMPLE:
===================================
With this action, you can View the
Description for available or installed
Packages, Extra Packages and/or Patches.
You want to View the Description for the
installed KDE Packages, so use:
swaret --show kde -i. You want to View the
Description for all available Gnome
Packages, so use: swaret --show gnome.
Show Description for xcdroast and mplayer:
swaret --show xcdroast,mplayer.
Remember, you need to set up DESCRIPTIONS
to 1 in /etc/swaret.conf and restart --update.

14.
--changelog <> EXAMPLE:
===================================
With this action, you can View the latest ChangeLog.

15.
--set <> EXAMPLE:
===================================
Disable DESCRIPTIONS: swaret --set DESCRIPTIONS=0
Disable Dependency Check: swaret --set DEPENDENCY=0
Disable Search Libraries: swaret --set DSEARCHLIB=0
Change Network Interface to ppp0: swaret --set NIC=ppp0
Disable REPOS_ROOT URL's: swaret --set REPOS_ROOT=0
Disable ROOT URL: ftp://ftp.swaret.org:
swaret --set ROOT=ftp://ftp.swaret.org=0
For more information, use: 'swaret --set' and hit ENTER.

16.
--gpg <> EXAMPLE:
===================================
With this action, you can Import
a Public GPG Key. I fetched the GPG Key
which I found in the Slackware Root.
I will import it with this Command:
swaret --gpg -i GPG-KEY

17.
--log <> EXAMPLE:
===================================
With this action, you can View
the Log File, and if you use the -t
option you can tail the Log File
/var/log/swaret. To clear the
swaret Log File, use:
'swaret --log -c'

18.
--purge <> EXAMPLE:
===================================
With this action, you can Purge Files.
Lets say you want to Purge all Packages,
use: swaret --purge. You want also to Purge
Sources, use: swaret --purge -s.
You would like to Purge the Cache Directory
with Files which are older then 4 Weeks,
use this Command: swaret --purge -w 4.
You would like to Purge the Sources Cache
Directory with Files which are older then
14 Days, so use: swaret --purge -ds 14.

19.
--check <> EXAMPLE:
===================================
Make Connection to the Internet (swaret.org)
using 'wget' and figure out if there is a new
Version available of swaret.

20.
VARIOUS EXAMPLE <> Install all Packages with one Command.
===================================
Simply use the following Command:
swaret --install -a (Install All Packages automatically).
(Saved in swaret Packages Cache Directory, default: /var/swaret)

21.
VARIOUS EXAMPLE <> Download all Patches with one Command.
===================================
swaret --get -ap
(Download All Patches automatically).
(Saved in swaret Packages Cache Directory, default: /var/swaret)

22.
VARIOUS EXAMPLE <> Track all missing Libraries and Fix missing Libraries.
===================================
swaret --dep -a (Start Dependency Check automatically)
If swaret cannot Track the missing Libraries,
you can always set DSEARCHLIB in /etc/swaret.conf to 1.
When starting the Dependency Check again,
swaret will Search on your entire System
for the missing Libraries and add the
necessary Directories to /etc/ld.so.conf.
(And swaret will restart ldconfig automatically of course)
swaret will use the 'find' program to Search
for missing Libraries, if you want to use the 'slocate'
Command, you can set DSEARCHM to 1 in /etc/swaret.conf! ;-)
You should also keep your 'slocate' Database up-to-date
with the 'updatedb' Command.

23.
VARIOUS EXAMPLE <> Upgrade only XFree86 Fonts and Docs Packages,
VARIOUS EXAMPLE <> and Exclude other XFree86 Packages.
===================================
- You can do this with Exclude Method:
Edit /etc/swaret.conf and alter the EXCLUDE Variable(s) by
adding the Keyword 'xfree86[docs,fonts]'.
Start the Upgrade Procedure and it will Upgrade Packages
matching xfree86-docs and xfree86-fonts,
and skip the other XFree86 Packages.
- You can do this with multiple Keywords:
swaret --upgrade xfree86-docs,xfree86-fonts

24.
VARIOUS EXAMPLE <> Exclude kernel, lilo and other vital Packages
VARIOUS EXAMPLE <> during Upgrade Procedure.
===================================
The Upgrade Procedure will run with EXCLUDE method.
Add the Keywords 'kernel' and 'lilo'
to the EXCLUDE Variable(s) in /etc/swaret.conf.
When you start the Upgrade Procedure it will Upgrade
all installed Packages (matching a Keyword),
but not the Packages which have been excluded
(matching the EXCLUDE Variable(s) found in /etc/swaret.conf).

25.
VARIOUS EXAMPLE <> Install 'French' Language File
===================================
Copy /usr/share/swaret-VERSION/swaret.lang.FRANCAIS to
/etc/swaret.lang and start using swaret.
If it is not available, take a look at
http://www.swaret.org/?menu=i18n and
save the French Language File as /etc/swaret.lang,
and start using swaret.



Copyright ?2002-2003 swaret Team  -  info at swaret dot org  -  Last Update: 2003-12-8 ~ 1:00 AM  


Linux?is a trademark of Linus Torvalds.
Slackware?is a registered trademark of Slackware Linux, Inc.
 楼主| 发表于 2004-1-17 17:06:47 | 显示全部楼层

swaret - SlackWARE Tool

NAME
swaret - SlackWARE Tool

SYNOPSIS
swaret --ACTION [KEYWORD] [OPTION]

DESCRIPTION
swaret Upgrades, Installs, Re-Installs, Downloads,... Packages, Patches, Sources (with Build Scripts)
and much more! swaret includes Dependency Support, which Tracks and Fixes missing Libraries. It uses
several Slackware Linux Mirrors through http/ftp/rsync or a Local Repository. swaret has also Repository
Support to create a Repository of Slackware Packages which will allow swaret to use it with the known
--ACTIONS. swaret can also use 3rd-party Slackware Packages available on LinuxPackages DOT NET and
other (Repository) Sites. swaret has also Internationalization (i18n) Support.
Settings are read from swaret.conf(5) and will be used at runtime. If a KEYWORD is passed at the com-
mandline, then the action will only be performed on the Packages and/or Patches and/or Sources matching
that KEYWORD.
You can use ANY ADVANCED REGEXP (Regular Expression) as Keyword!
To see what options are applicable to which actions, use swaret --help.
You can also use --morehelp for advanced Help.
Advanced REGEXP Support is now available to use with Keyword! ;-)

ACTIONS
--update
Retrieve the latest List Files

--upgrade
Upgrade all installed Packages

--upgrade KEYWORD
Upgrade installed Packages matching a Keyword

--install
Install all available Packages or Patches

--install KEYWORD
Install available Packages or Patches matching a Keyword

--reinstall
Re-Install all installed Packages or Patches

--reinstall KEYWORD
Re-Install installed Packages or Patches matching a Keyword

--remove KEYWORD
Remove installed Packages matching a Keyword

--get Fetch all available Packages or Patches or Sources

--get KEYWORD
Fetch available Packages or Patches or Sources matching a Keyword

--dep Track and Fix all missing Libraries

--dep KEYWORD
Track and Fix missing Libraries matching a Keyword

--resume
Resume broken Packages or Patches or Sources

--list List Packages or Patches or Sources

--search KEYWORD
Search for Packages or Patches or Sources matching a Keyword

--show KEYWORD
Show Description for Packages or Patches matching a Keyword

--changelog
Show the latest ChangeLog

--exclude
Exclude, set -on or -off

--set Set any Variable found in /etc/swaret.conf using this action

--extra
Extra's

--gpg Import GPG Public Key

--log swaret Log File

--purge
Purge Cached Packages or Sources

--check
Check if swaret is up-to-date.

--config
Show Example swaret Config File

--faq Show F.A.Q.
Specify a Keyword to Search for Q&A

--htus Show How To Use Swaret
Specify a Keyword to Search for Examples

--help Show simple Help Screen

--morehelp
Show advanced Help Screen

--manual
Show swaret Manual

--version
Show swaret Version

OPTION
NO_OPTION
Apply action to Packages

-p Apply action to Patches

-s Apply action to Sources

-a Apply action to Packages and/or Patches and/or Sources without asking for Confirmation (none-
interactive-mode)

-i Apply action to installed Packages

-u Apply action to installed Packages which are ready for Upgrade

-n Used with the "search" and "list" actions, apply to Packages that are not installed yet

-np Used with the "search" and "list" actions, apply to Patches that are not installed yet

-on Used with the "exclude" action, enable Exclude Method.

-off Used with the "exclude" action, disable Exclude Method.

-i Used with "gpg" action, mention the Path to a Public GPG Key

-t Used with the "log" action, tail the swaret Log File

-c Used with the "log" action, clear the swaret Log File

-d Used with the "purge" action. With this option, all Packages found in the swaret Packages Cache
Directory (default: /var/swaret) will be purged which are more then # (Number) of Days old.

-ds Used with the "purge" action. With this option, all Sources found in the swaret Source Cache
Directory (default: /var/swaret/sources) will be purged which are more then # (Number) of Days
old.

-w Used with the "purge" action. With this option, all Packages matching found in the swaret Pack-
ages Cache Directory (default: /var/swaret) will be purged which are more then # (Number) of
Weeks old.

-ws Used with the "purge" action. With this option, all Sources found in the swaret Sources Cache
Directory (default: /var/swaret/sources) will be purged which are more then # (Number) of Weeks
old.

-v Used with the "purge" action. With this option, swaret will remove all Versions of Packages found
in the Packages Cache Directory, but not the most recent Version.

-c Used with the "log" action, clear the swaret Log File

-d Used with the "purge" action. With this option, all Packages found in the swaret Packages Cache
Directory (default: /var/swaret) will be purged which are more then # (Number) of Days old.

-ds Used with the "purge" action. With this option, all Sources found in the swaret Source Cache
Directory (default: /var/swaret/sources) will be purged which are more then # (Number) of Days
old.

-w Used with the "purge" action. With this option, all Packages matching found in the swaret Pack-
ages Cache Directory (default: /var/swaret) will be purged which are more then # (Number) of
Weeks old.

-ws Used with the "purge" action. With this option, all Sources found in the swaret Sources Cache
Directory (default: /var/swaret/sources) will be purged which are more then # (Number) of Weeks
old.

-v Used with the "purge" action. With this option, swaret will remove all Versions of Packages found
in the Packages Cache Directory, but not the most recent Version.

-c Used with "manual" action, show swaret Config Manual

-* For the Full List of options, use swaret --morehelp!

ACTION_OPTIONS
y Yes

n No

A All

Q Quit

FILES
/etc/swaret.conf: swaret Configuration File
/var/log/swaret: swaret Log File

BUGS
Before sending a Bug Report, first check out the swaret Forum on http://www.swaret.org for solutions...
If you are sure you found a Bug, you may send us a Bug Report to: . or post it on the
swaret Forum.

SUGGESTIONS
Any suggestion is always welcome! We will try to create, to test and to implement reasonable sugges-
tions. You can send us suggestions by E-Mail to: and/or post it on the swaret Forum at
http://www.swaret.org.

AUTHORS
Luc Cottyn
Michael G. Manry

SEE ALSO
swaret.conf(5)

Linux NOVEMBER 2003 SWARET(8)



Copyright ?2002-2003 swaret Team  -  info at swaret dot org  -  Last Update: 2003-12-8 ~ 1:00 AM  


Linux?is a trademark of Linus Torvalds.
Slackware?is a registered trademark of Slackware Linux, Inc.
 楼主| 发表于 2004-1-17 17:07:50 | 显示全部楼层

swaret.conf

NAME
swaret.conf - swaret (SlackWARE Tool) Configuration File

DESCRIPTION
swaret.conf (swaret Configuration File) is located in the System wide /etc Directory, and contains sev-
eral Settings that are read by swaret on each runtime.

OPTIONS
VERSION
Set this to the Version of Slackware Linux you want to use. Possible Values could be 8.1 or
Higher or Current. If you set VERSION to 'current', swaret will keep you up-to-date with Slack-
ware Linux Current.
- Used for Dependency Support and other Features

ROOT Define one or more valid HTTP URL or FTP URL or RSYNC URL or FILE URL to the Slackware Linux 8.1
or Higher or Current Root. You may specify multiple Slackware Linux Mirrors. A List of available
Slackware Linux Mirrors can be found at www.slackware.com.
Example URL's found in /usr/doc/swaret-VERSION/swaret.conf.new
Syntax: ROOT=PROTOCOL:URL
swaret will use the order of the specified ROOT URL's.
- Used for Official Slackware Linux Packages

DEP_ROOT
Similar to ROOT, but contains the libraries-VERSION URL. This is only used if DEPENDENCY is set
to 1. If no DEP_ROOT Variables are defined, swaret will create the Libraries List for you.
Example URL's found in /usr/doc/swaret-VERSION/swaret.conf.new
Syntax: DEP_ROOT=PROTOCOL:URL
swaret will use the order of the specified DEP_ROOT URL's.
- Used for Official Slackware Linux Packages

REPOS_ROOT
Define Repository URL's with Slackware Linux Packages.
Example URL's found in /usr/doc/swaret-VERSION/swaret.conf.new.
Syntax: REPOS_ROOT=REPOSITORYNAME%PROTOCOL:URL
swaret will use the order of the specified REPOS_ROOT URL's.
- Used for Repository Slackware Linux Packages

RANDOMR
Set to 1 if you want swaret to use Random Slackware Linux Mirrors.
default: 0

USEPKGDESC
If set to 1, swaret will also match Packages whose Description is matching the Keyword(s) you
specify after --ACTION.
default: 0
NOTE: swaret will parse all the Package Descriptions for this, and might slow down swaret when
using an older System.
If set to 0, swaret will not use Package Descriptions to match one or more Packages.

EXCLUDE
If you don't want swaret to Upgrade, Install, Re-Install, Download,... some Packages or Patches
or Sources, add the KEYWORDS to the EXCLUDE Variable.
You can add ANY ADVANCED REGEXP (Regular Expression) to the EXCLUDE Variable(s)
Basic Exclude Example:
EXCLUDE=lilo kernel -*dl$ -*rob$ -*mybuild$
Syntax for Advanced Exclude:
KEYWORD[DONT_EXCLUDE_ME_KEYWORD1,DONT_EXCLUDE_ME_KEYWORD2,...]
Example for Advanced Exclude:
EXCLUDE=kde-i18n[nl,en_GB] koffice-i18n[nl,en_GB] xfree86[docs,fonts]

DEPENDENCY
Set to 1 if you want swaret to Track and Fix missing Libraries. If set to 0, Dependency Support
will be disabled.
default: 1

DSEARCHLIB
If you want swaret to Search for missing Libraries which could be found on your System, but not
tracked by ldconfig, set to 1. Set to 0, if you don't want swaret to Search for missing
Libraries on your System.
default: 1

DSEARCHM
Set to 1, if you want swaret to use the 'slocate' program to Search for missing Libraries. If set
to 0, swaret will use the 'find' program to locate missing Libraries.
default: 0

MD5CHECK
Check the MD5 CHECKSUM for Packages or Sources.
default: 1

GPGCHECK
Check the GPG Signature for Packages. You need also to Import a Public GPG Key using 'swaret
--gpg'. Consult F.A.Q. (--faq gpg) for more Information!
default: 0

DESC If this is set to 0, the Description for Packages or Patches will not be shown during Upgrade,
Install, Re-Install,... So there will be no output.
If set to 1, you will see the Description for Packages or Patches.
default: 0

CACHE_DIR
The Directory for fetched Packages or Patches or Sources.
default: /var/swaret

LOG Set this to 1 to send important Information to a Log File. Set to 0 to disable this Feature.
default: 1

LOG_FILE
Everything what you and swaret is doing is logged in the swaret Log File.
default: /var/log/swaret
Big Brother is watching you ;-)

WARNINGS
If you don't want swaret to show Warnings, set to 0.
default: 1

INFORMATION
If you don't want swaret to show Information, set to 0.
default: 1

NIC What Network Interface to use for Downloading Files?
default: eth0
You can also set NIC to 'lo' if you want to use a Local Repository (CD-ROM, NFS Share, Samba
Share,...)

PROGRESS
If set to 0, swaret will use the '%' Download Interface.
If set to 1, swaret will use the 'size' Download Interface.
If set to 2, swaret will use the 'wget/rsync' Download Interface.
default: 1

TIMEOUT
The Timeout Value to use for wget and/or rsync (in seconds).
default: 35

RETRIES
The number of Retries for wget and/or rsync.
default: 5

PASSIVE_FTP
If you run swaret behind a Firewall, set to 1. Otherwise, set to 0.
default: 1

WGET_PROXY
If you need wget Proxy Support, set this to your Proxy Address and Port in the form of:
http://proxy.some-domain-name.domain:HTTP_PROXY_PORT

RSYNC_PROXY
If you need rsync Proxy Support, set this to your Proxy Address and Port in the form of:
Hostort

FILES
/var/log/swaret: swaret Log File


BUGS
Before sending a Bug Report, first check out the swaret Forum on http://www.swaret.org for solutions... If you
are sure you found a Bug, you may send us a Bug Report to: . or post it on the swaret Forum.


SUGGESTIONS
Any suggestion is always welcome! We will try to create, to test and to implement reasonable suggestions. You
can send us suggestions by E-Mail to: and/or post it on the swaret Forum at
http://www.swaret.org.


AUTHORS
Luc Cottyn
Michael G. Manry


SEE ALSO
swaret(8)



Copyright ?2002-2003 swaret Team  -  info at swaret dot org  -  Last Update: 2003-12-8 ~ 1:00 AM  


Linux?is a trademark of Linus Torvalds.
Slackware?is a registered trademark of Slackware Linux, Inc.
发表于 2004-1-17 18:32:52 | 显示全部楼层
晕啊,太长了。等开学了试试。
发表于 2004-1-18 15:42:55 | 显示全部楼层
I thought you have translated it into Chinese, but... ;-)
发表于 2004-1-18 20:42:57 | 显示全部楼层
checkinstall 的确是个不可缺少的好东西,偶就是喜欢在简洁易用的slack上compile各种需要的app ...
btw, Mozilla1.6 build仍然没有xft,一定要自己编译了才好看
发表于 2004-7-3 17:47:20 | 显示全部楼层
全英文啊,不太想看.....
发表于 2004-7-3 18:51:36 | 显示全部楼层
不用看,先把swaret装好,然后只要记住几条参数就好,

--update是更新软件库列表,用于安装、更新、搜索时定位软件包在网上的位置。

--upgrade是升级系统中已经安装的软件,包括内核!我的slack是8.1开始安装的,然后几乎每隔一两天都upgrade,所以什么新版本发行都与我无关,有了swaret我的slack永远是最新的!

--install “关键字”是从网络安装符合关键词的软件,有了swaret和网络,你完全无需自己找软件,配合以下的search参数,install将为你完成一切,包括依赖关系的检查!

--purge是清空swaret的临时文件夹,也就是从网上下载下来已经安装或者更新成功的软件包所对应的tgz文件。

--search “关键词”是搜索符合关键词的软件包

--show “关键词”是显示符合关键词的软件包的相关信息

--dep是解决系统中的包依赖关系,这条参数最为强大,彻底解决slack的依赖关系薄弱的缺点,自动从网上下载依赖包。

至于/etc/swaret.conf文件,你只要英语不差的话,对于标准的conf文件格式略有所知,那么可以根据你的需求来修改。

用过debian的人可以很快的发现以上的参数和功能与apt极为相似,不错,自从有了swaret后,slackware就成为了名副其实的完美发行版!真的很完美!

I'm lovin' it!
发表于 2004-7-4 22:51:53 | 显示全部楼层
太长了,看不下来
正在努力学习english
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表