Hello,

You have a post on the forums at this link http://answers.bitrock.com/questions/341/how-to-get-advanced-rpm-features-with-bitrock-installbuilder, which gives an example of a custom spec file for RPM.

Example file is at: http://support.bitrock.com/files/0000/0029/example.spec

  1. Can you please explain the macros that are used in that spec file, such as ${bitrock_rpm_buildroot}, ${bitrock_rpm_group}, etc. Where are they defined, please? I did not find it in the User Guide, or Reference Manual, for example.

  2. Can this spec file be used as is, where I would just replace "Requires" entry for my package dependencies?

  3. If custom RPM spec is supplied, does it take precedence over project.xml or does BitRock engine still processes both project.xml and the spec, such that they complement each other? For example, if "installdir" is defined inside project.xml, do I need to specify it in the spec file (%define installdir /), as well? Or if install files are defined inside project.xml, do I still need a tag %files inside spec file?

  4. In general, if, for the purpose of RPM generation, I only need to add dependencies list to my install script, do I need custom spec, or is there a way to specify RPM dependencies in project.xml? Note: dependencies that I need may not be always tested with "is_in_path", but rather they are .so libraries

4a. If answer to "4" is "Yes", then how to make those depndency packages be available through underlying package management download using BitRock?

Thank you.

asked 13 Sep '12, 13:48

Sasha's gravatar image

Sasha
6222323
accept rate: 0%


1) The list of macros available when creating a custom spec file is:

${bitrock_rpm_topdir}: A reference to the %{_topdir} of the RPM
${bitrock_rpm_buildroot}: A reference to the buildRoot of the RPM (%{_topdir}/buildRoot)
${bitrock_rpm_copyright}: This is currently not configurable. It is resolved to "Other"  when not using a custom spec file
${bitrock_rpm_description}: Resolves to the <description> tag of the project
${bitrock_rpm_group}: Not configurable, it is resolved to "Applications" when not using a custom spec file
${bitrock_rpm_name}: Resolved to the <nativePackageName> of the project if provided. If not, it is resolved to the <shortName>
${bitrock_rpm_producturlinfoabout}: Set to the <productUrlInfoAbout> tag of the project.
${bitrock_rpm_release}: Set to the <release> of the project.
${bitrock_rpm_summary}: Set to the <summary> of the project.
${bitrock_rpm_vendor}: Set to the <vendor> of the project.
${bitrock_rpm_version}: Set to the <version> of the project.
${bitrock_rpm_post}: Replaced with the postInstallationActionList of the project
${bitrock_rpm_preun}: Replaced with the preUninstallationActionList of the project
${bitrock_rpm_postun}: Replaced with the postUninstallationActionList of the project

2) You can simply use the sampley spec file and customize it with your needs, like changing the "Requires". The default internal spec file used by InstallBuilder is:

%define installdir /
BuildRoot: ${bitrock_rpm_buildroot}
Group: ${bitrock_rpm_group}
License: Other
Release: ${bitrock_rpm_release}
Name: ${bitrock_rpm_name}
Vendor: ${bitrock_rpm_vendor}
Version: ${bitrock_rpm_version}
Summary: ${bitrock_rpm_summary}
Requires: package1 package2 package3

AutoReqProv: no
%define __find_requires %{nil}
AutoReq: 0
%define _use_internal_dependency_generator 0
%define _topdir ${bitrock_rpm_topdir}
%define _rpmdir %{_topdir}
%description
${bitrock_rpm_description}
%post
${bitrock_rpm_post}
%preun
${bitrock_rpm_preun}
%postun
${bitrock_rpm_postun}
%files
%defattr(-,root,root)
%installdir

3) If provided, it will take precedence. You should keep the "installdir" in the spec file and the %files directive at the end if you want all the files configured in the project XML to be included.

4) You will need to custom spec file if you want the dependencies to be handled by RPM.

link

answered 14 Sep '12, 11:58

juanjo's gravatar image

juanjo ♦♦
5.8k413
accept rate: 23%

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:

×21
×2

Asked: 13 Sep '12, 13:48

Seen: 3,045 times

Last updated: 14 Sep '12, 11:58