NAME

       slackrpm  - convert a Slackware package to RedHat RPM format


SYNOPSIS

       slackrpm [ -bdeilrsxyCL ] [ -p prefix ] [ package ...  ]


DESCRIPTION

       slackrpm converts Slackware software packages into  RedHat
       Package  Manager  (RPM)  format.  It is useful for quickly
       creating RPM packages for public distribution or for  con­
       verting  a  Slackware Linux system to use RPM as the stan­
       dard package manager.  It can also  provide  an  alternate
       way  of viewing details of Slackware packages.  After con­
       verting packages to RPM, the tools rpm(8) and glint(8) can
       then be used to manage them in a consistent manner.

       slackrpm's  core function is to create RPM spec files. The
       information it requires comes from the  information  files
       left  behind  by  pkgtool(8)  and installpkg(8) after they
       install Slackware packages.  By default, slackrpm displays
       a  spec file representation of the given Slackware package
       without any side effects.

       A complete conversion using  the  -C  command-line  option
       consists of:

       o      generating a spec file for the Slackware package,

       o      manually editing the spec file,

       o      building an RPM package,

       o      installing the RPM package,

       o      and deleting the RPM package file.

       Each  of  these steps except for the last may also be per­
       formed independently using  the  appropriate  command-line
       option in place of -C.

       The  selected  package  may  be  the  name of an installed
       Slackware package or the path to  a  Slackware  `packages'
       file.   When  a path is given, the corresponding Slackware
       package installation script, if  any,  is  ignored  and  a
       warning to that effect is displayed.

       A  Slackware  installation  script  is  needed  whenever a
       Slackware package includes symbolic links or needs to mod­
       ify  files  already  on the system. The complete script is
       copied during Slackware package installation and  is  used
       during slackrpm's conversion process.

       If  it exists, a Slackware installation script corresponds
       to the %post section in an RPM spec file.  slackrpm parses
       the  script and recognizes symbolic link creation commands
       and certain  other  script  commands  which  are  safe  to
       ignore.   If  an  installation script consists entirely of
       these commands, symbolic links will be added to the %files
       section and the other commands will be ignored. This elim­
       inates the need for the %post section for such packages.

       If commands are are found in the script that slackrpm does
       not know how to handle, the entire script will be added to
       the  %post  section  and  the  %files  section   will   be
       unchanged. Since Slackware packages don't supply uninstal­
       lation scripts, there is no simple way to fully  undo  the
       effects of the installation script.  Instead, a message is
       added to the %preun section to warn the user doing an  RPM
       uninstall  operation of possible installation side effects
       which aren't undone.

       There is not a direct correlation between the  information
       required in spec files and the information supplied by the
       Slackware package tools; several items  must  be  inferred
       from the information available.

       Following is a list of data contained in the generated RPM
       spec file:

       %config
              Marks a configuration file in the  %files  section.
              This attribute is applied to files which match cer­
              tain  patterns  characteristic   of   configuration
              files.  For instance, all files ending in rc except
              for files ending in .arc, .src  (and  a  few  other
              exceptions) are marked with %config.

       %description
              The  entire  multi-line  Slackware package descrip­
              tion.

       %dir   Marks a directory in the %files section.  Normally,
              directories listed as part of the Slackware package
              are ignored unless no  files  are  actually  placed
              into  the directory.  Such directories are included
              and marked with %dir.  Some Slackware packages cre­
              ate  irrelevant directories which ought to be manu­
              ally removed from the spec file during the  editing
              stage.

       %doc   Marks  a  documentation file in the %files section.
              This attribute is applied to files which match cer­
              tain patterns characteristic of documentation files
              or man pages. For instance, all files in  a  direc­
              tory called man are marked as %doc files.

       %files The  list  of files listed as part of the Slackware
              package. Certain entries are marked with the  %con­
              fig, %dir and %doc attributes.

       %post  This  section  only exists if a Slackware installa­
              tion script exists but could not be  added  to  the
              %files   section.   If  so,  the  entire  Slackware
              installation script is included here.   If  the  -x
              option is given, this section is not created.

       %preun This  section  only exists if a Slackware installa­
              tion script exists but could not be  added  to  the
              %files  section.   If so, then this contains a mes­
              sage which is displayed during  the  uninstallation
              stage  to warn the user that the package may not be
              completely uninstalled.   This  is  because  it  is
              impossible  to  automatically  undo everything that
              could possibly be done in an  installation  script,
              based  only on the script itself.  If the -x option
              is given, this section is not created.

       Copyright:
              Set to `distributable' if this package  appears  to
              have  been installed by pkgtool (and therefore from
              an original Slackware distribution)  and  `unknown'
              otherwise.  You  should change this line to reflect
              the true copyright status of the package.

       Distribution:
              `Slackware'

       Group: If the package  was  installed  with  pkgtool,  the
              group  name  is  taken from the disk set containing
              the original  package.   The  group  has  the  form
              `Slackware/disk  set'; the list of disk sets can be
              viewed using the -d option. If the package  appears
              to  have  been installed with installpkg -r this is
              set to `Slackware/Custom'. Otherwise, it is set  to
              `Slackware/Unknown'.

       Name:  The  Slackware package name with the -p prefix. The
              name can be the archive file name  if  the  package
              was installed with installpkg.  If so, it should be
              edited to a plain name (without  the  .tar.gz  suf­
              fix).

       Packager:
              `Converted  from Slackware package by slackrpm ver.
              0.3'

       Prefix:
              This line is  always  commented  out  since  it  is
              impossible to tell if a given Slackware package can

              appears, its use is valid from the viewpoint of rpm
              and you may uncomment  the  line  if  the  software
              allows relocation.  If you decide to do this AND an
              installation script was included in the %post  sec­
              tion, AND you install the package with rpm's --pre­
              fix option, you must provide a --prefix  that  ends
              with   the  contents  of  the  Prefix:  line.   For
              instance, if  Prefix:  is  set  to  /usr/bin,  then
              --prefix  /usr/share/usr/bin  is valid but --prefix
              /usr/share/bin is not.  This is  the  only  way  to
              guarantee  that the installation script (which uses
              relative path names) will execute correctly.   Bro­
              ken  installation scripts (probably from other than
              an original Slackware distribution) that use  abso­
              lute path names will not work properly and may even
              overwrite files on your disk. For this  reason,  it
              is  best  not  to uncomment the Prefix: line when a
              %post section exists.  If you  change  the  Prefix:
              path,  you  must  change the path in the first non-
              comment line in the %post and  %preun  sections  as
              well.

       Release:
              Fixed  at 1. You may optionally increase this value
              while editing if this is not  the  first  time  you
              have released this version of the package.

       Summary:
              The  first line of the description. If this line is
              longer than 50 characters, a warning  comment  line
              is  placed  on  the  next  line. The line should be
              shortened manually during the edit phase.

       Version:
              The first line of the description  is  scanned  for
              what looks like a version number. Sometimes what is
              found is not actually a version  number  and  some­
              times  no version number can be found in which case
              this field is set to `unknown'.  In either case  it
              ought  to  be changed during the editing stage.  If
              you edit the version number, the -b and -i  options
              will  not work and you will have to rename the spec
              file and build and install the package manually.


CONVERSION HINTS

       There is not a one-to-one mapping between standard  Slack­
       ware  and RPM packages.  This can cause grief with package
       maintainance since pieces of  one  Slackware  package  can
       overlap  with  parts  of  several  RPM packages (and vice-
       versa).

       It is best to convert all Slackware packages before start­
       ing  to  add new RedHat RPM packages. This avoids problems

       overwrite old Slackware files.

       Once  you've converted your system to RPM, you should stop
       using the Slackware package deletion  function.  Slackware
       checks for shared files before deleting a package to avoid
       breaking anothers, but once you start installing RPM pack­
       ages  Slackware  has  no  knowledge of the files they use.
       Installing new Slackware  packages  should  be  safe,  but
       remember  that Slackware doesn't back up your old configu­
       ration files.

       Since RPM package dependencies depend on the proper  pack­
       age  name, dependencies will not be satisfied by Slackware
       packages which are prefixed with sl-.   You  may  wish  to
       delete such packages once they are converted, then install
       the RPM equivalents.

       The least confusion results if Slackware packages are con­
       verted  before  their  configuration files are edited. The
       rpm -V (verify) command will then  properly  show  changed
       configuration  files.   This is unlikely to be the case if
       you are converting a Slackware system that has been in use
       for a while, so don't worry too much about it.

       Several shared files are installed by more than one Slack­
       ware package.  Converting the second package to RPM format
       poses  a problem since RPM will refuse to overwrite a file
       that has already been installed.  This can be overcome  by
       manually invoking rpm with the --replacefiles option.

       The  recommended  order  for converting packages is larger
       packages with many files first  (like  man*,  info*,  bin,
       util, etc.), leaving smaller packages last.  This is so if
       a smaller Slackware or RPM package overwrites  some  files
       you  will  have  finer control after installation.  If you
       have installed a mixture of packages from different Slack­
       ware  distributions, it is best to convert the older pack­
       ages first.

       The -i option installs the  package  using  rpm's  -i  and
       --justdb  options.  All files in the package are marked as
       having just been installed, including configuration  files
       marked %config.  This means that if you changed a configu­
       ration file between installing the Slackware  package  and
       running  slackrpm, RPM assumes that the configuration file
       was unaltered. The next time you delete  or  upgrade  this
       package,  RPM  will not preserve the configuration file by
       renaming the original with an .rpmsave extension.  You may
       wish  to  copy  these  configuration files manually before
       removing or upgrading a slackrpm converted package if  you
       want to save the edits.


OPTIONS


       -e     Edit spec file after creation

       -i     Install converted package into the rpm database

       -l     List Slackware packages installed on this system

       -pprefix
              Add prefix to RPM package names (defaults to `sl-';
              this lets you see at  a  glance  which  are  legacy
              Slackware packages)

       -r     Remove  RPM  package  file after successful install
              (requires -i)

       -s     Write spec files to SPECS directory instead of std­
              out

       -x     Exclude install script from spec file (from %files,
              %post and %preun sections)

       -y     Overwrite spec file if it exists

       -C     Convert package; equivalent to -sebir

       -L     Display software license


ENVIRONMENT

       ADMIN_DIR
              Directory containing Slackware package  and  script
              directories.  This  defaults  to  /var/adm, but may
              need to be set to /var/log for  Slackware  ver.  >=
              3.0.

       EDITOR Editor to use with -e option (defaults to vi)

       PACKAGES
              Directory   containing   Slackware   package  files
              (defaults to $ADMIN_DIR/packages)

       SCRIPTS
              Directory containing Slackware installation scripts
              (defaults to $ADMIN_DIR/scripts )


EXIT STATUS

       slackrpm's  exit status is 1 when given a bad command-line
       option and 0 otherwise.


FILES

       /usr/lib/rpmrc
              RPM system configuration file

       /etc/rpmrc
              RPM custom configuration file

       ~/.rpmrc
              RPM user configuration file

       /usr/lib/slackrpm/*
              slackrpm program code


AUTHOR

       Daniel Fandrich <dan@coneharvesters.com>

       See <URL:http://www.npsnet.com/danf/software/>.


COPYRIGHT

       slackrpm is copyright © 1997,1998 by Daniel Fandrich.   It
       is  provided  "as is", without any express or implied war­
       ranties.  See the file COPYING for details.


SEE ALSO

       glint(8), installpkg(8), pkgtool(8), rpm(8)


Man(1) output converted with man2html