1Alien::Package::Rpm(3)User Contributed Perl DocumentationAlien::Package::Rpm(3)
2
3
4

NAME

6       Alien::Package::Rpm - an object that represents a rpm package
7

DESCRIPTION

9       This is an object class that represents a rpm package. It is derived
10       from Alien::Package.
11

FIELDS

13       prefixes
14           Relocatable rpm packages have a prefixes field.
15

METHODS

17       checkfile
18           Detect rpm files by their extension.
19
20       install
21           Install a rpm. If RPMINSTALLOPT is set in the environment, the
22           options in it are passed to rpm on its command line.
23
24       scan
25           Implement the scan method to read a rpm file.
26
27       unpack
28           Implement the unpack method to unpack a rpm file. This is a little
29           nasty because it has to handle relocatable rpms and has to do a bit
30           of permissions fixing as well.
31
32       prep
33           Prepare for package building by generating the spec file.
34
35       cleantree
36           Delete the spec file.
37
38       build
39           Build a rpm. If RPMBUILDOPT is set in the environment, the options
40           in it are passed to rpm on its command line.
41
42           An optional parameter, if passed, can be used to specify the
43           program to use to build the rpm. It defaults to rpmbuild.
44
45       version
46           Set/get version.
47
48           When retreiving the version, remove any dashes in it.
49
50       postinst
51       postrm
52       preinst
53       prerm
54           Set/get script fields.
55
56           When retrieving a value, we have to do some truely sick mangling.
57           Since debian/slackware scripts can be anything -- perl programs or
58           binary files -- and rpm is limited to only shell scripts, we need
59           to encode the files and add a scrap of shell script to make it
60           unextract and run on the fly.
61
62           When setting a value, we do some mangling too. Rpm maintainer
63           scripts are typically shell scripts, but often lack the leading
64           shebang line.  This can confuse dpkg, so add the shebang if it
65           looks like there is no shebang magic already in place.
66
67           Additionally, it's not uncommon for rpm maintainer scripts to
68           contain bashisms, which can be triggered when they are ran on
69           systems where /bin/sh is not bash. To work around this, the shebang
70           line of the scripts is changed to use bash.
71
72           Also, if the rpm is relocatable, the script could refer to
73           RPM_INSTALL_PREFIX, which is set by rpm at run time. Deal with this
74           by adding code to the script to set RPM_INSTALL_PREFIX.
75
76       arch
77           Set/get arch field. When the arch field is set, some sanitizing is
78           done first to convert it to the debian format used internally. When
79           it's retrieved it's converted back to rpm form from the internal
80           form.
81

AUTHOR

83       Joey Hess <joey@kitenet.net>
84
85
86
87perl v5.30.1                      2020-01-28            Alien::Package::Rpm(3)
Impressum