Hello,

I am using BitRock to generate linux installers for my product. Using the same .xml script, I generate two types of linux installers - <installer>.run, and the native for Fedora, <installer>.RPM There is logic in my .xml script to NOT remove certain files at uninstall of my package. I am instructing BitRock to <removefilesfromuninstall> for those files. <installer>.run performs action, as expected. Files remain on the system at uninstall. <installer>.RPM, though, erases all the files that came with the package. It does not seem to process the directive to not remove certain files. Is there a way, when using BitRock to build an RPM package, to instruct RPM to leave certain files behind at uninstall? For example, how can I modify the spec, or %post ${bitrock_rpm_post}?

Thank you.

asked 10 May '13, 19:04

Sasha's gravatar image

Sasha
6222323
accept rate: 0%


It is not possible to use <removeFilesFromUninstaller> to cause files not to be removed in RPM mode. The file installation and uninstallation is managed by RPM and the actions should mainly be used to start/stop services, but full functionality of the installer is not available in RPM/Debian mode.

It is possible to add custom spec fileby using the <rpmSpecFileTemplate> tag. For example:

<project> ... <rpmSpecFileTemplate>path/to/your.spec</rpmSpecFileTemplate> ... </project>

You could use the below somple as a reference:

%define _unpackaged_files_terminate_build 0 %define installdir / %define _topdir ${bitrock_rpm_topdir} %define _rpmdir %{_topdir} BuildRoot: ${bitrock_rpm_buildroot} Name: ${bitrock_rpm_name} Version: ${bitrock_rpm_version} Release: ${bitrock_rpm_release} Group: ${bitrock_rpm_group} Vendor: ${bitrock_rpm_vendor} Summary: ${bitrock_rpm_summary} License: ${bitrock_rpm_copyright} Provides: ${bitrock_rpm_name} %description ${bitrock_rpm_description} %post ${bitrock_rpm_post} %preun ${bitrock_rpm_preun} %postun ${bitrock_rpm_postun} %files %defattr(-,root,root) %installdir

The ${bitrock_} variables are replaced by InstallBuilder when building the RPM package.

link

answered 13 May '13, 02:53

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×54
×21

Asked: 10 May '13, 19:04

Seen: 2,218 times

Last updated: 13 May '13, 02:53