Alien:...ge::Rpm(3pm)
β¨ Alien:...ge::Rpm(3pm) β¨
okay bestie, listen up β this is the manual page for Alien:...ge::Rpm, and it lives in the User Contributed Perl Documentation section of the manual. Yes the name is spelled like that. No I will not be fixing it. It's iconic, it's canon, periodt. π
πΈ NAME πΈ
Alien::Package::Rpm β an object that represents a rpm package π
π¦ DESCRIPTION π¦
So basically? This is an object class that represents a rpm package. That's the whole vibe. It's derived from Alien::Package, which is giving "inherits everything from its parent and then does its own thing." Main character energy, honestly. π
π FIELDS π
prefixesβ relocatable rpm packages have aprefixesfield. If your rpm is relocatable, it's got one. That's it, that's the field. π«Ά
β METHODS β
π checkfile
Detect rpm files by their extension. Lowkey the simplest detective work ever but someone's gotta do it. π
π install
Install a rpm. And heads up β if RPMINSTALLOPT is set in the environment, the options in it are passed to rpm on its command line. So like, that env var is the plug. β¨
π scan
Implement the scan method to read a rpm file. Reading. Vibes. Done. π
π unpack
Implement the unpack method to unpack a rpm file. Ngl bestie, this one is a little nasty π because it has to handle relocatable rpms and has to do a bit of permissions fixing as well. Two jobs. One method. She's working overtime.
π prep
Prepare for package building by generating the spec file. Getting ready for her big moment. π
π cleantree
Delete the spec file. She's done. She's leaving. No notes. π
π build
Build a rpm. And if RPMBUILDOPT is set in the environment, the options in it are passed to rpm on its command line. Env vars stay winning. π₯
There's also an optional parameter β if you pass it, it can be used to specify the program to use to build the rpm. It defaults to rpmbuild.
π version
Set/get version. π
When retreiving the version, remove any dashes in it. (Yes, "retreiving". We keep it. Verbatim. It's part of the lore.)
π postinst, postrm, preinst, prerm
Set/get script fields.
When retrieving a value, we have to do some truly sick mangling π€’β¨. Here's why: 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. It's giving "smuggling a whole other file format through a shell script." Unhinged. Love that for us.
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.
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.
Also, if the rpm is relocatable, the script could refer to RPM_INSTALL_PREFIX, which is set by rpm at run time. Deal with this by adding code to the script to set RPM_INSTALL_PREFIX.
π 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. So it's a little round trip. Glow up and glow down. π¦
π AUTHOR π
Joey Hess <joey@kitenet.net> π
okay and that's the whole page bestie, you ate that π
cute little sign-off time: this one's from perl v5.40.1, dated 2025-10-08, and it's filed under Alien:...ge::Rpm(3pm) in the User Contributed Perl Documentation. Stan. πβ¨πΈ
π¦ where this page comes from
- ubuntu resolute: alien 8.95.9-1 Β· GPL-2.0-or-later
- ubuntu stonking: alien 8.95.9-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms