.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Alien::Package::Rpm 3pm" .TH Alien::Package::Rpm 3pm "2020-11-01" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Alien::Package::Rpm \- an object that represents a rpm package .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is an object class that represents a rpm package. It is derived from Alien::Package. .SH "FIELDS" .IX Header "FIELDS" .IP "prefixes" 4 .IX Item "prefixes" Relocatable rpm packages have a prefixes field. .SH "METHODS" .IX Header "METHODS" .IP "checkfile" 4 .IX Item "checkfile" Detect rpm files by their extension. .IP "install" 4 .IX Item "install" Install a rpm. If \s-1RPMINSTALLOPT\s0 is set in the environment, the options in it are passed to rpm on its command line. .IP "scan" 4 .IX Item "scan" Implement the scan method to read a rpm file. .IP "unpack" 4 .IX Item "unpack" Implement the unpack method to unpack a rpm file. This is a little nasty because it has to handle relocatable rpms and has to do a bit of permissions fixing as well. .IP "prep" 4 .IX Item "prep" Prepare for package building by generating the spec file. .IP "cleantree" 4 .IX Item "cleantree" Delete the spec file. .IP "build" 4 .IX Item "build" Build a rpm. If \s-1RPMBUILDOPT\s0 is set in the environment, the options in it are passed to rpm on its command line. .Sp An optional parameter, if passed, can be used to specify the program to use to build the rpm. It defaults to rpmbuild. .IP "version" 4 .IX Item "version" Set/get version. .Sp When retreiving the version, remove any dashes in it. .IP "postinst" 4 .IX Item "postinst" .PD 0 .IP "postrm" 4 .IX Item "postrm" .IP "preinst" 4 .IX Item "preinst" .IP "prerm" 4 .IX Item "prerm" .PD Set/get script fields. .Sp When retrieving a value, we have to do some truly sick mangling. Since debian/slackware scripts can be anything \*(-- perl programs or binary files \&\*(-- and rpm is limited to only shell scripts, we need to encode the files and add a scrap of shell script to make it unextract and run on the fly. .Sp When setting a value, we do some mangling too. Rpm maintainer scripts are typically shell scripts, but often lack the leading shebang line. This can confuse dpkg, so add the shebang if it looks like there is no shebang magic already in place. .Sp Additionally, it's not uncommon for rpm maintainer scripts to contain bashisms, which can be triggered when they are ran on systems where /bin/sh is not bash. To work around this, the shebang line of the scripts is changed to use bash. .Sp Also, if the rpm is relocatable, the script could refer to \&\s-1RPM_INSTALL_PREFIX,\s0 which is set by rpm at run time. Deal with this by adding code to the script to set \s-1RPM_INSTALL_PREFIX.\s0 .IP "arch" 4 .IX Item "arch" Set/get arch field. When the arch field is set, some sanitizing is done first to convert it to the debian format used internally. When it's retrieved it's converted back to rpm form from the internal form. .SH "AUTHOR" .IX Header "AUTHOR" Joey Hess