pkgsrc/pkgtools/rpm2pkg/files/rpm2pkg.8
2001-12-03 19:03:19 +00:00

161 lines
4.6 KiB
Groff

.\" $NetBSD: rpm2pkg.8,v 1.5 2001/12/03 19:03:23 wiz Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Emmanuel Dreyfus.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd January 27, 2001
.Dt RPM2PKG 8
.Os
.Sh NAME
.Nm rpm2pkg
.Nd RPM to BSD package conversion helper
.Sh SYNOPSIS
.Nm
.Op Fl d Ar directory
.Op Fl f Ar package_list
.Op Fl i Ar ignored_dir
.Op Fl p Ar prefix
.Op Fl s Ar strip_path_count
.Ar rpm_file ...
.Sh DESCRIPTION
.Nm
helps in building BSD packages from RPM files by unpacking each specified
.Ar rpm_file ,
and by building a
.Ar package_list
according to what was extracted. The
.Ar package_list
has the format expected by the
.Nx
package system.
.Pp
.Nm
also provides a mechanism that helps in selecting what is actually
extracted from the RPM files. It is therefore possible to reject files
that are of no interest when building a BSD package. This is especially
useful for files that are to be extracted in
.Pa /var
or
.Pa /etc .
.Pp
The following options are available:
.Bl -tag -width indent
.It Fl d Ar directory
Change working directory to
.Ar directory .
.It Fl f Ar package_list
Produce a
.Nx
package list
.Ar package_list
from what was actually extracted from the RPM files archives.
.It Fl i Ar ignored_dir
Do not extract files contained in the
.Ar ignored_dir
directory of the RPM file's archives.
.It Fl p Ar prefix
Use
.Ar prefix
when extracting files.
.It Fl s Ar strip_path_count
Strip
.Ar strip_path_count
leading directories in file names.
.El
.Sh EXAMPLES
.Nm
.Fl d Ar /usr/pkg
.Fl f Ar /usr/pkgsrc/emulator/more_linux_lib/work/PLIST_DYNAMIC
.Fl p Ar emul/linux
.Fl i Ar tmp
.Fl i Ar var
.Fl i Ar usr/tmp
.Ar /usr/pkgsrc/distfiles/more_linux_lib/foo.rpm
.Ar /usr/pkgsrc/distfiles/more_linux_lib/bar.rpm
.Pp
This will extract
.Pa foo.rpm
and
.Pa bar.rpm
into
.Pa /usr/pkg/emul/linux .
A packing list called
.Pa PLIST_DYNAMIC
will be created, with pathnames relative to
.Pa /usr/pkg ,
because this is the directory into which we asked
.Nm
to change with the
.Fl d
option.
.Pp
.Nm
will not extract files contained in the
.Pa tmp ,
.Pa var ,
or
.Pa usr/tmp
directories of the RPM file's archives.
.Pp
.Nm
.Fl s Ar 1
.Fl d Ar /usr/pkg
.Ar /usr/pkgsrc/distfiles/pack/bar.rpm
.Pp
This will extract the
.Ar bar.rpm
file in
.Pa /usr/pkg
while striping the leading directory of files path in
.Ar bar.rpm .
This is useful for dealing with RPM archives that contains files like
.Pa usr/bin/foo ,
which you would like to go in
.Pa /usr/pkg/bin .
.Sh COMPATIBILITY
.Nm
should work with any regular RPM file.
.Sh SEE ALSO
.Xr cpio 1 ,
.Xr rpm 8 ,
.Xr rpm2cpio 8
.br
.Em Dq Documentation on the NetBSD Package System ,
.An Hubert Feyrer Aq hubert.feyrer@informatik.fh-regensburg.de ,
.An Alistair Crooks Aq agc@pkgsrc.org
.Sh AUTHORS
.An Matthias Scheler Aq tron@netbsd.org
.br
This man page was written by
.An Emmanuel Dreyfus Aq manu@netbsd.org