Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec file with variable such as 'version' - how do we pass them? #1

Open
strus38 opened this issue Apr 15, 2020 · 3 comments
Open

Spec file with variable such as 'version' - how do we pass them? #1

strus38 opened this issue Apr 15, 2020 · 3 comments
Labels
good first issue Good for newcomers

Comments

@strus38
Copy link

strus38 commented Apr 15, 2020

Hi
Trying to build my spec file, it contains:
%{!?version: %define version 1.2.0} ...
I tried to pass the version as an env variable to the container, but it is ignored:
- name: build RPM package id: rpm_build uses: naveenrajm7/rpmbuild@master env: version: 1.4.0 ...
So how should I do?
Thanks!

@naveenrajm7
Copy link
Owner

naveenrajm7 commented Apr 15, 2020

Hi @strus38 ,
Thanks for trying out this Action. Currently, I rely on spec file for creating the source required by rpmbuild. Here is how it works in a nutshell

  1. Parse spec file get Name & Version
  2. Get repo contents and create a Source file with name <name>-<version>.tar.gz (move it to rpmbuild/SOURCE)
  3. Run rpmbuild
  4. Pass directory path for rpmbuild/RPMS and file path for rpmbuild/SRPMS as output , So it can be used by other Actions (like To Upload Release Asset or as Upload Artifact)

I do want to support multiple arguments in future versions like

  • Name & Version of RPM package
  • Any BuildRequires that need to be installed to create RPM .

As a quick response I can make version support by this week.
If you would like to Contribute or give Suggestions , Please feel free to do so .
Thanks!

@strus38
Copy link
Author

strus38 commented Apr 15, 2020 via email

@naveenrajm7 naveenrajm7 added the good first issue Good for newcomers label May 17, 2020
@bschonec
Copy link

bschonec commented Jan 4, 2024

@strus38 , have you made any updates to support your request? I would like to see this workflow support additional arguments such as, '--undefine=_disable_source_fetch' because sometimes the SOURCES tarball is downloaded directly from a http URL. I don't see any way that we can pass rpmbuild command line options but your suggestion implies that it's possible with a PR from you. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants