mirror of https://github.com/fspc/dswim
freesource
23 years ago
4 changed files with 0 additions and 2146 deletions
@ -1,140 +0,0 @@ |
|||
READ THE REQUIREMENTS |
|||
|
|||
Now you can skip the next three steps if you have an installed Debian |
|||
distribution and you are in a hurry for a demonstration, but you will miss |
|||
out on swim's more awesome capabilities. With that said..... |
|||
|
|||
FIRST GET SWIMRC PREPARED |
|||
|
|||
Edit the swimrc configution file, you should read swimrc(5), but I'll ask |
|||
you some question right now. You can find swimrc in /etc/swim, and in |
|||
your home directory in the subdirectory .swim. Entries in the home |
|||
directory swimrc override ones in /etc/swim. |
|||
|
|||
Are you using an installed Debian system? If so, you almost definitely |
|||
have dpkg installed. So uncomment this line in /etc/swim/swimrc by |
|||
removing the pound sign. |
|||
|
|||
$package_tool = "/usr/bin/dpkg"; |
|||
|
|||
otherwise |
|||
|
|||
$package_tool = "/usr/bin/ar"; |
|||
|
|||
Do you have the apt package installed? Configure this, or -xyz will not |
|||
work. |
|||
|
|||
$apt = "yes"; |
|||
|
|||
Now you need to decide what architecture you would like to be swim's |
|||
default value when you download, build, and query the not-installed |
|||
databases. |
|||
|
|||
What flavor, do you want alpha, arm, hurd-i386, i386, m68k, powerpc, |
|||
or sparc? (more coming :*) I decided on ..... |
|||
|
|||
$architecture = "i386"; |
|||
|
|||
What kind of distribution do you want to be your default? stable, |
|||
unstable, frozen, or experimental (rare) I like the ever changing ... |
|||
|
|||
$distribution = "unstable"; |
|||
|
|||
Decide which sections you want? You can have this |
|||
|
|||
@user_defined_section = qw(main contrib non-free); |
|||
|
|||
or this. |
|||
|
|||
@user_defined_section = qw(main); |
|||
|
|||
or ..... |
|||
|
|||
|
|||
SECOND GET SWIMZ.LIST PREPARED |
|||
|
|||
Now grab a copy of the README.mirrors from |
|||
http://www.debian.org/misc/README.mirrors, you will need this to set-up |
|||
the configuration file /etc/swim/swimz.list. |
|||
|
|||
If your using apt make sure to read swim(8) to get the nitty gritty on how |
|||
you can synchronize swim along with apt :*} using swimz.list. |
|||
|
|||
Humm, you found a site which has the distribution you want, and you know |
|||
which section you want, and you are happy knowing about packages which can |
|||
install on the architecture you computer happens to have. |
|||
|
|||
So what site is that? |
|||
|
|||
deb ftp://ftp.swimz.org |
|||
|
|||
What was the directory you happened to notice in the README.mirrors page? |
|||
|
|||
deb ftp://ftp.swimz.org/pub/debian |
|||
|
|||
What distribution did you want? Note: You won't want to use the Release |
|||
code name for the distribution, see swimz.list. |
|||
|
|||
deb ftp://ftp.swimz.org/pub/debian unstable |
|||
|
|||
What sections did you want? |
|||
|
|||
deb ftp://ftp.swimz.org/pub/debian unstable main contrib non-free |
|||
|
|||
Now put this line in the swimz.list, exactly like written, and ofcourse |
|||
use the values you want. |
|||
|
|||
THIRD GET THE DEBIAN DATABASE WITH FTP |
|||
|
|||
Just issue this command. |
|||
|
|||
swim --ftp --Contents DF --Packages DF |
|||
|
|||
and wait a little bit. |
|||
|
|||
|
|||
FOURTH BUILD THE DATABASES |
|||
|
|||
This is for a computer system with a Debian distribution installed. |
|||
|
|||
swim --initdb |
|||
|
|||
This next part applies to people who followed all the steps to get here, |
|||
and also read the important requirements at the top. This makes the |
|||
not-installed databases. Go take a walk, or a swim :*} |
|||
|
|||
swim --initndb --Contents DF DF |
|||
|
|||
When either of these commands are complete they will say "over and out". |
|||
|
|||
NOW WHAT? |
|||
|
|||
Now the real fun begins. If you happen to have some experience with rpm |
|||
you already know some of the options which swim uses, but be prepared for |
|||
surpises. swim(8) goes into more detail, the "Maximum RPM" book by |
|||
Edward C. Bailey which is freely available may provide help for swim's |
|||
--query option, but you will find that swim greatly diverges from rpm. |
|||
|
|||
Try something like this, and do not use the -n unless you made the |
|||
not-installed databases, on the other hand, REMEMBER to use -n if you |
|||
do not have an installed system.... |
|||
|
|||
swim -n --search swim |
|||
|
|||
now do this.. |
|||
|
|||
swim -qnSi or swim -hn |
|||
|
|||
go to the directory /usr/bin and do |
|||
|
|||
swim -qnf . |
|||
|
|||
you probably will have to do |
|||
|
|||
swim -qnft . |
|||
|
|||
...the fun is just beginning... |
|||
|
|||
Where are you swimming to today? |
|||
|
|||
|
@ -1,90 +0,0 @@ |
|||
REQUIRMENTS: |
|||
|
|||
Don't get intimidated, this is just to cover all bases, most computer |
|||
systems meet the requirements. |
|||
|
|||
PERL: Yes, preferably Perl 5.004.04 or greater. |
|||
|
|||
FTP CAPABILITIES: (optional) You may need to get Net::FTP (Debian |
|||
libnet-perl package) which depends on Data::Dumper (Debian data-dumper |
|||
package). Also check the CPAN mirrors or the PACKAGES below. You also |
|||
need gcc if you do not have a Debian system so that swim can figure out |
|||
what architecture your machine is. You can also find these modules at the |
|||
CPAN mirrors or the PACKAGES below. |
|||
|
|||
READLINE CAPABILITIES: (optional) For nice readline cpabilities get |
|||
Term::ReadLine::Gnu or alternatively Term::ReadLine::Perl which depends on |
|||
Term::ReadKey. Term::ReadLine::Gnu may be tricky to set-up on non Debian |
|||
systems because it depends on ncurses3.4 and the GNU Readline Library |
|||
version 2.1 or later, but Term::ReadLine::Perl is much easier to set-up |
|||
and allows a huge amount of package names to be present on the command |
|||
line without a segmentation fault. You could get swim's ftp capabilities |
|||
working first, and then just fetch the Debian ReadLine package(s) and then |
|||
use swim's --extract option to set the package(s) up, but, it is sure fun |
|||
doing a 'make test' when setting up the ReadLine modules! You can also |
|||
find these modules at the CPAN mirrors or the PACKAGES below. |
|||
|
|||
DATABASE CAPABILITIES: DB_File comes standard with Perl. But, this |
|||
doesn't mean it is compiled for the newer Berkeley Database Libraries. DB |
|||
1.85 has known bugs which effect SWIM. SWIM can work with 1.85, but |
|||
--rebuildflatdb and --rebuildflatndb will not work properly. You can run |
|||
a test to find out whether or not you need to make the change if you have |
|||
db_dump available on your system (which db_dump). Enter this: |
|||
|
|||
perl -e 'use DB_File; tie %testdb,'DB_File',"testdb";'; |
|||
db_dump testdb |
|||
|
|||
If 'db_dump testdb' produces an error you need to make the change by |
|||
installing the newest DB_File. If you have a version of libc6 less than |
|||
2.1, first, install a new version (2.3.4 or greater) of the Berkeley DB if |
|||
you don't already have it installed. If you get DB_File from CPAN you |
|||
will need to edit config.in to point to the location of where libdb2 |
|||
installed db.h, where libdb2 is installed on your system, and the name of |
|||
the library. For Debian this would be: |
|||
|
|||
INCLUDE = /usr/include/db2 |
|||
LIB = /usr/lib |
|||
DBNAME = -ldb2 |
|||
|
|||
PACKAGES - You can get the CPAN modules in some package formats. Debian |
|||
2.1 and Red Hat 5.0 have been tested with these packages: |
|||
|
|||
Debian - |
|||
|
|||
libnet-perl and |
|||
data-dumper and |
|||
libterm-readline-gnu-perl (plus a lot more) or |
|||
libterm-readline-perl-perl and |
|||
libterm-readkey-perl |
|||
libdb2 |
|||
|
|||
Red Hat - |
|||
|
|||
perl-libnet and |
|||
perl-Data-Dumper |
|||
db-? |
|||
|
|||
USER: root. Some of swim's most important functions will not work |
|||
properly unless you are running the program as root. |
|||
|
|||
HARD DRIVE SPACE: Make sure you have enough hard drive space. 1500 |
|||
installed packages produces a 10MB fileindex.deb, and the virtual |
|||
not-installed filesystem database for the unstable distribution is now |
|||
over 40MB. 100MB of free space on your hard drive is probably a good |
|||
safety margin, if you run out of hard drive space the program will just |
|||
hang or quit. |
|||
|
|||
MEMORY: Databases made for an installed Debian system require memory in |
|||
proportion to the amount of packages actually installed; the --lowmem |
|||
option is an excellent alternative for making the databases if the |
|||
computer system is either overloaded or low on memory. If you get "out of |
|||
memory" warnings try to free up some memory first then make the databases. |
|||
You can also avoid making the virtual filesystem by not using the |
|||
--Contents option or using the FDB argument for that option. Updating the |
|||
databases uses very little memory. |
|||
|
|||
OTHER SWIM FUNCTIONS: Most free operating systems have these packages |
|||
installed: On a non Debian system, ar from binutils is used to query |
|||
Debian binary packages. These next packages are essential in a free |
|||
operating system (Linux) - textutils, fileutils, grep, tar, gzip, and |
|||
mount. |
File diff suppressed because it is too large
@ -1,294 +0,0 @@ |
|||
|
|||
swimrc - swim configuration file |
|||
-------------------------------- |
|||
Jonathan D. Rosenbaum<mttrader@access.mountain.net> |
|||
27 May 1999 |
|||
|
|||
0.1 Contents |
|||
------------ |
|||
|
|||
1. DESCRIPTION |
|||
|
|||
2. USAGE |
|||
|
|||
3. VARIABLES |
|||
3.1. OUTPUT VARIABLE |
|||
3.2. HISTORY |
|||
3.3. AR or DPKG? |
|||
3.4. APT |
|||
3.5. PAGER |
|||
3.6. NOT-INSTALLED VARIABLES |
|||
3.7. DF LOCATION |
|||
3.8. TEMPORARY DIRECTORY |
|||
3.9. FTP |
|||
|
|||
4. OTHER VARIABLES |
|||
|
|||
5. FILES |
|||
|
|||
6. BUGS |
|||
|
|||
0.2 Copyright Notice |
|||
-------------------- |
|||
|
|||
Copyright © 1999 Jonathan D. Rosenbaum |
|||
|
|||
SWIM, including this manual, is free software; you may 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, or (at |
|||
your option) any later version. |
|||
|
|||
This is distributed in the hope that it will be useful, but *without |
|||
any warranty*; without even the implied warranty of merchantability or |
|||
fitness for a particular purpose. See the GNU General Public License |
|||
for more details. |
|||
|
|||
You should have received a copy of the GNU General Public License with |
|||
the swim source as the file `COPYING'. If not, write to the Free |
|||
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
|||
|
|||
|
|||
------------------------------------------------------------------------------- |
|||
|
|||
|
|||
1. DESCRIPTION |
|||
--------------- |
|||
|
|||
swimrc is the configuartion file for swim allowing many default values |
|||
to be set so that they do not have to be mentioned on the command |
|||
line. Swimrc interacts directly with Perl allowing a wide variety of |
|||
variables found in SWIW::Conf to be altered. |
|||
|
|||
|
|||
------------------------------------------------------------------------------- |
|||
|
|||
|
|||
2. USAGE |
|||
--------- |
|||
|
|||
Values for variable can be altered for *swim* by assigning different |
|||
values enclosed in quotes or quoted whitespace (qw()), and ending with |
|||
a semi-colon. |
|||
|
|||
` $variable = ``value'';' |
|||
|
|||
`$variable = ``(value1 value2 ..)'';' |
|||
|
|||
|
|||
|
|||
------------------------------------------------------------------------------- |
|||
|
|||
|
|||
3. VARIABLES |
|||
------------- |
|||
|
|||
This is a list of variables with explanations. The default values for |
|||
*swim* are shown. |
|||
|
|||
|
|||
3.1. OUTPUT VARIABLE |
|||
--------------------- |
|||
|
|||
`$my_number' can be changed to how many lines you would like ``swim |
|||
-qf <>'' to print out, before the program asks for `-t' or `--total'. |
|||
Exception: If `-i' is used in the query and there is more than one |
|||
package then the total will be presented. |
|||
|
|||
Hint: `-t' can be used with all the various `--scripts' family members |
|||
to view the title of the script file regardless of this variable |
|||
setting, and if `-t' has to be used, the titles will be displayed, |
|||
which makes sense. |
|||
|
|||
*$my_number = 23;* |
|||
|
|||
|
|||
3.2. HISTORY |
|||
------------- |
|||
|
|||
This is a shell-like history kept in relation to searches and the most |
|||
recent edit when `--stdin' is used. |
|||
|
|||
*$HISTORY = 10;* |
|||
|
|||
|
|||
3.3. AR or DPKG? |
|||
----------------- |
|||
|
|||
Debian packages are ar archives. If you are using a Debian |
|||
Distribution assign ``dpkg'' to $package_tool, otherwise assign ``ar'' |
|||
to $package_tool. |
|||
|
|||
*$package_tool = "/usr/bin/ar";* |
|||
|
|||
|
|||
3.4. APT |
|||
--------- |
|||
|
|||
*Swim* does not assign a value for apt. To use `--apt' and `-xyz' |
|||
assign `$apt' the value ``yes''. |
|||
|
|||
Example: *$apt = "yes";* |
|||
|
|||
|
|||
3.5. PAGER |
|||
----------- |
|||
|
|||
*less* is a nice pager, unless you like *more*! Pager is used for |
|||
`--help' and *swim* called without any options. There is an option |
|||
`--nopager' or `-n'. *more* comes from the required package |
|||
util-linux, whereas *less* comes from a standard package called less. |
|||
Values: ``less'', ``more'', or ``most'' or... |
|||
|
|||
*$ENV{PAGER} = "less";* |
|||
|
|||
|
|||
3.6. NOT-INSTALLED VARIABLES |
|||
----------------------------- |
|||
|
|||
Assign values for `$architecture' and/or `$distribution' to avoid |
|||
having to use `--arch' and `--dists' everytime the not-installed |
|||
databases are accessed with `-n' or made or altered. |
|||
|
|||
Architectures are always being added so check with Debian to find a |
|||
list. There is *alpha, arm, hurd-i386 (alternative kernel to linux), |
|||
i386, m68k, powerpc, sparc*. Just use the arch found after the hyphen |
|||
in the Contents-(arch) file. |
|||
|
|||
*$architecture = "i386";* |
|||
|
|||
The distribution can be either *stable, unstable, frozen, or |
|||
experimental (rare)*. These represent the state of development that |
|||
the packages are under. The unstable distribution can have lot's of |
|||
changes within a very short time period, and frozen may or may not be |
|||
available. |
|||
|
|||
*$distribution = "unstable";* |
|||
|
|||
Distributions are divided into sections. These sections were called |
|||
distributions in the version 2.4.1.0 packaging manual, because they |
|||
were at one time separate distributions, but this has since changed. |
|||
|
|||
You can determine which of the sections *main, non-free, contrib or |
|||
non-US* to pull out of the Contents file if you don't want to use |
|||
`--main', `--contrib', `--non-free', and `--non-us' to selectively |
|||
pick the sections. |
|||
|
|||
For efficiency, you should choose the sections which you will be |
|||
pulling out of the Packages `file(s)' being targetted. |
|||
|
|||
Rule: Use ``non-US'' not ``non-us''. |
|||
|
|||
*@user_defined_section = qw(main contrib non-free non-US);* |
|||
|
|||
|
|||
3.7. DF LOCATION |
|||
----------------- |
|||
|
|||
A little philosophy: *swim* was developed for maximum versatility, so |
|||
whether you are just interested in researching, and keeping tabs on |
|||
the newest packages, or maintaining a Debian virtual distribution on a |
|||
non-Debian distribution, or you are a using *swim* for distribution |
|||
development, *swim* provides a way. |
|||
|
|||
The next two variables determine the location of the DF (default |
|||
directory/file system) |
|||
|
|||
The default directory keeps track of Contents and/or Packages |
|||
databases retrieved with --ftp. The Contents and Packages databases |
|||
and Release file are give names specific to the distribution and |
|||
architectures they represent using the naming convention found in |
|||
apt's sources directory. You also have the freedom not to use the |
|||
default directory, in which case swim will still do the renaming and |
|||
keeping track of the mtime, but you will have to remember where you |
|||
put the files. |
|||
|
|||
*$default_directory = '/root/.swim';* |
|||
|
|||
The default root directory (DRD) is the key to easy management of |
|||
binary packages, source, dsc, and diff files received from --ftp, and |
|||
provides an easy way to put together a personalized distribution. This |
|||
directory can be a real ftp site on your computer, or put wherever |
|||
else you are allowed to have directories. The DRD is always placed |
|||
below the value assigned to $default_directory. According to the |
|||
previous assignment to $default_directory, if the DRD is |
|||
``/pub/a/debian'' then the full path would be |
|||
``/root/.swim/pub/a/debian''. |
|||
|
|||
Example: When a package is downloaded it will be placed in |
|||
dists/distribution/section/architecture/subject below the DRD. |
|||
|
|||
Rule: debian must be the final directory before dists, this is because |
|||
other distributions are placed alongside debian, like debian-non-US or |
|||
personal (specialized distribution). |
|||
|
|||
*$default_root_directory = '/pub/debian';* |
|||
|
|||
Because you may be using a real ftp site, this variable allows you to |
|||
determine what permissions *swim* will assign for directories it |
|||
creates below the DRD. |
|||
|
|||
*$permission = '0755';* |
|||
|
|||
|
|||
3.8. TEMPORARY DIRECTORY |
|||
------------------------- |
|||
|
|||
If you want to set an alternative directory for the temporary files |
|||
created when the databases are made, change here. You may want to make |
|||
`$tmp' a RAM disk. See package loadlin for initrd documentation and an |
|||
explanation for making such a disk. There is also documentation in |
|||
/usr/src/kernel-source.version/Documentation. Whether this will speed |
|||
things up is a subject of experimentation. |
|||
|
|||
*$tmp = "/tmp";* |
|||
|
|||
|
|||
3.9. FTP |
|||
--------- |
|||
|
|||
You can alter the Firewall, Port, Timeout, Debug and Passive |
|||
characteristics of the ftp client as defined in Net::FTP(3pm) by |
|||
providing arguments to these variables. All variables but $timeout are |
|||
set to untrue by default. |
|||
$firewall = 0; (FTP firewall machine name) |
|||
$port = 0; (defaults to 23) |
|||
$timeout = 120; (120 seconds) |
|||
$debug = 0; (1 will turn on STDERR) |
|||
$passive = 0; (1 will enable) |
|||
|
|||
|
|||
------------------------------------------------------------------------------- |
|||
|
|||
|
|||
4. OTHER VARIABLES |
|||
------------------- |
|||
|
|||
see SWIM::Conf |
|||
|
|||
|
|||
------------------------------------------------------------------------------- |
|||
|
|||
|
|||
5. FILES |
|||
--------- |
|||
|
|||
` /etc/swim/swimrc' |
|||
|
|||
`~/.swim/swimrc' |
|||
|
|||
|
|||
------------------------------------------------------------------------------- |
|||
|
|||
|
|||
6. BUGS |
|||
------- |
|||
|
|||
Send directly to mttrader@access.mountain.net. |
|||
|
|||
|
|||
------------------------------------------------------------------------------- |
|||
|
|||
|
|||
swimrc - swim configuration file |
|||
Jonathan D. Rosenbaum<mttrader@access.mountain.net> 27 May 1999 |
|||
|
Loading…
Reference in new issue