RPM2PKG(8)

NAME
rpm2pkg - RPM to BSD package conversion helper

SYNOPSIS
rpm2pkg [-d directory] [-f package_list] [-i ignored_dir] [-p prefix] [-s strip_path_count] rpm_file ...

DESCRIPTION
rpm2pkg helps in building BSD packages from RPM files by unpacking each specified rpm_file, and by building a package_list according to what was extracted. The package_list has the format expected by the NetBSD package system.

rpm2pkg 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 /var or /etc.

The following options are available:

-d directory
    Change working directory to directory.

-f package_list
    Produce a NetBSD package list package_list from what was actually extracted from the RPM files archives.

-i ignored_dir
    Do not extract files contained in the ignored_dir directory of the RPM file's archives.

-p prefix
    Use prefix when extracting files.

-s strip_path_count
    Strip strip_path_count leading directories in file names.

EXAMPLES
rpm2pkg -d /usr/pkg -f /usr/pkgsrc/emulator/more_linux_lib/work/PLIST_DYNAMIC -p emul/linux -i tmp -i var -i usr/tmp /usr/pkgsrc/distfiles/more_linux_lib/foo.rpm /usr/pkgsrc/distfiles/more_linux_lib/bar.rpm

This will extract foo.rpm and bar.rpm into /usr/pkg/emul/linux. A packing list called PLIST_DYNAMIC will be created, with pathnames relative to /usr/pkg, because this is the directory into which we asked rpm2pkg to change with the -d option.

rpm2pkg will not extract files contained in the tmp, var, or usr/tmp directories of the RPM file's archives.

rpm2pkg -s 1 -d /usr/pkg /usr/pkgsrc/distfiles/pack/bar.rpm

This will extract the bar.rpm file in /usr/pkg while striping the leading directory of files path in bar.rpm. This is useful for dealing with RPM archives that contains files like usr/bin/foo, which you would like to go in /usr/pkg/bin.

COMPATIBILITY
rpm2pkg should work with any regular RPM file.

SEE ALSO
cpio(1), rpm(8), rpm2cpio(8)

AUTHORS
Matthias Scheler <tron@netbsd.org>
This man page was written by Emmanuel Dreyfus <manu@netbsd.org>