NAME

rt_distfiles - list files making up an RPM project's main archive

SYNOPSIS

 rt_distfiles [OPTIONS]
 rt_distfiles [OPTIONS] PROJECT.spec
 rt_distfiles [OPTIONS] PROJECT.spec.in
 rt_distfiles [OPTIONS] PROJECT.bootstrap

DESCRIPTION

rt_distfiles prints the file names making up an RPM's project main archive (source) file, using various heuristics and auxilliary files (which you may have to create). It's intended to be used with projects that maintain their spec files within their source trees; it expects to find the actual source files in the same directory as PROJECT.spec.

For example, if your spec file contains:

 ...
 Name: foo
 Version: 1.0
 Source: %name-%version.tar.gz
 ...

this script will try to print out the names of files that should be included in foo-1.0.tar.gz, as described below.

First, If no filenames are provided rt_distfiles will search "." and ".." for the files *.bootstrap, *.spec.in and *.spec in that order and exit with an error message if eiher directory contains more than one file of each kind, or if neither directory contains any files matching the above patterns.

Next, it tries to compile the list of files for inclusion in the source archive from three sets of glob patterns stored in auxilliary files in the directory containing the spec file. These files may refer to any RPM macros (e.g., %{name}) defined in the spec file or in the user and system RPM macro files ($HOME/.rpmmacros, etc.). All three files are optional and use reasonable defaults; they should contain one pattern per line:

OPTIONS

EXAMPLES

Here's a hypothetical example that shows how rt_distfiles ignores the files that are likely not needed in a distribution. It ignores ".svn" (filtered out by /etc/rpmtoolbox/distfiles.xfilter) and "private" (filtered out by foo.distfiles.skip).

 % ls -a -1
 .
 ..
 .svn
 foo.c
 foo.distfiles.skip
 foo.spec
 Makefile
 private/

 % cat foo.distfiles.skip
 private
 
 % rt_distfiles
 foo.c
 foo.distfiles.skip
 foo.spec
 Makefile

FILES

SEE ALSO

rt_archive(1), rt_makedist(1)

AUTHORS

Davlet Panech - dpanech at users dot sourceforge dot net

COPYRIGHT AND LICENSE

Copyright 2010 Davlet Panech.

Rpmtoolbox 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 3 of the License, or (at your option) any later version.

Rpmtoolbox 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 along with rpmtoolbox. If not, see <www.gnu.org>.