RPM the easy way ?
source link: https://arrfab.net/posts/2009/May/30/rpm-the-easy-way/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
While Karanbir posted an interesting rpm the other day , that reminded me another commercial app I had to look once. The application was provided as an RPM, but it seems that none of the installed files was declared in the rpmdb .. and here is why :
[arrfab@waldorf vmware]\$ echo -e "Files present in the RPM package:
\n" ; rpm -qlp VMware-Player-2.5.1-126130.x86_64.rpm ; echo -e "\nand
now the RPM script : \n" ; rpm -qp --scripts
VMware-Player-2.5.1-126130.x86_64.rpm
Files present in the RPM package:
/var/cache/vmware/VMware-Player-2.5.1-126130.x86_64.bundle
and now the RPM script :
preinstall program: /bin/sh
postinstall scriptlet (using /bin/sh):
# Execute bundle installer on install or upgrade after laying down
bundle
# and then delete the bundle afterwards.
# Have to redirect the console to stdin because it's closed by
default.
# Setting VMWARE_SKIP_RPM_UNINSTALL is necessary because we don't
want the
# bundle to run rpm commands, since rpm will deadlock if that
happens.
TERM=dumb VMWARE_SKIP_RPM_UNINSTALL=1
/var/cache/vmware/VMware-Player-2.5.1-126130.x86_64.bundle \
--required --console \< /dev/tty
rm -f /var/cache/vmware/VMware-Player-2.5.1-126130.x86_64.bundle
preuninstall scriptlet (using /bin/sh):
# On uninstall only, remove existing bundle installation.
if [ \$1 -eq 0 ]; then
if [ -e /usr/bin/vmware-uninstall ]; then
TERM=dumb /usr/bin/vmware-uninstall --console > /dev/null 2>&1
fi
fi
postuninstall program: /bin/sh
Do we really have to comment on that one ?
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK