Skip to content

Commit

Permalink
Apply rpm version information to app_version filed in vars.config
Browse files Browse the repository at this point in the history
This applies the _revision field in the RPM spec file to the
app_version template variable.  This fixes the issue where
RPMs would not show information for the `runner version` command
due to the env.sh not having the proper variables filled out.

The PKG_VERSION makefile variable is set to the _revision
variable which now gets added to the vars.config properly.

Fixes: #69
  • Loading branch information
jaredmorrow committed Jul 29, 2013
1 parent cb6a91c commit 9433346
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion priv/templates/rpm/specfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Obsoletes: {{package_name}}
%define platform_lib_dir %{platform_base_dir}/lib
%define platform_log_dir %{_localstatedir}/log/{{package_install_name}}


# Setup vars.config like other platforms, but do it inside of spec file
%prep
%setup -q -n {{package_name}}-%{_revision}
cat > rpm.vars.config <<EOF
Expand All @@ -50,9 +52,9 @@ cat > rpm.vars.config <<EOF
{runner_patch_dir, "%{platform_lib_dir}/{{package_patch_dir}}"}.
{runner_user, "{{package_install_user}}"}.
{pipe_dir, "%{_localstatedir}/run/{{package_install_name}}/"}.
{app_version, "%{_revision}"}.
EOF


%build
OVERLAY_VARS="overlay_vars=../rpm.vars.config" make rel

Expand Down

0 comments on commit 9433346

Please sign in to comment.