How to keep files generated by RPM at uninstall

Comments

1 comment

  • Avatar
    wojciechka

    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.

Please sign in to leave a comment.