-
Couldn't load subscription status.
- Fork 450
Included RPM spec contrbution to build OS packages for EL7 #111
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool, thanks! I'll wait for one other bats-core member to approve before we merge this, but it definitely LGTM.
|
ack @mbland and thanks for reviving this project, very much appreciated. A package built from the above .spec is available here (built on CentOS 7) if anyone needs/wants to test it. This package upgrades cleanly from the older |
|
I don't know the rpm spec format, though everything seems in order. 🤷♂️ I'm not terribly excited about having yet another copy of the changelog, though. If/when we extract that to its own file, I'm assuming we can just reference the file instead of duplicating its contents into the rpm spec? |
|
Understand the concern. As an end user it's nice to have the changelog represented in the spec because it makes it visible through the package manager to the end user. I guess the changelog's generation could be scripted/extracted from the main changelog if the main changelog maintained a consistent parseable format. Alternatively, drop the changelog and keep the spec without it, for use as a basic template. |
Signed-off-by: pixdrift <[email protected]>
|
Before I forget: this PR is germane to #103. I imagine changelog dissemination must be a solved problem for other projects that are packaged via multiple mechanisms... Created #112 to track this. Right after creating this, I discovered (quoted from #112 (comment)):
So @pixdrift, perhaps you can update the |
|
@mbland nope, with that I'd be 👍 |
|
@mbland, the github packaging guide is similar to the Fedora packaging guidelines on changelog: Happy to update it, but it will still need bumping when versions are released. I can write a CI test for this as I have done elsewhere, eg. Is package.json the best source for version? This would result in CI tests failing unless the spec file was also up to date (version at top of spec, and latest changelog line), in line with the package.json. Would that be OK? Or would you prefer to avoid this burden? |
|
PR updated. Linked compiled packages above have also been updated (if anyone wants to test). Can add the tests to the PR, let me know how you would like to handle it. 👍 |
|
Maybe I'm just tired, but that Fedora I'm OK getting this in for now, and considering the automation to keep version numbers in sync later, as that's probably we can include within the scope of #112 as well. BTW, what would we need to do to make sure that new RPMs are built from the spec as new versions become available? |
|
@mbland, not too much. Now that a spec is in the repo, you can trigger a build process for each commit potentially. I set up similar for my own use for buildah, resulting packages are here: This builds (in a container) on every commit to the repo to speed up my own testing/validation. Source is here: |
|
Oh, I was thinking this was for including them in the RHEL and/or Fedora distributions. Guess it's a necessary first step, at least. |
|
Dumb question from an RPM newbie desperately trying to get this fork of bats into our internal yum repos: How am I supposed to build an RPM with this? 😅 Do I need to stage something locally before running rpmbuild? I don't understand why rpmbuild is even looking for a file there since there is a github URL in the Source0 field. 😕 I'm running RHEL 7.7. |
|
@okorz001 try with the following:
There is also a tool called Sorry I didn't see your message earlier, don't look in old PR's too often 😄 |
Bats 1.1.0 - 2018-07-08 This is the first release with new features relative to the original Bats 0.4.0. Added: * The `-r, --recursive` flag to scan directory arguments recursively for `*.bats` files (bats-core#109) * The `contrib/rpm/bats.spec` file to build RPMs (bats-core#111) Changed: * Travis exercises latest versions of Bash from 3.2 through 4.4 (bats-core#116, bats-core#117) * Error output highlights invalid command line options (bats-core#45, bats-core#46, bats-core#118) * Replaced `echo` with `printf` (bats-core#120) Fixed: * Fixed `BATS_ERROR_STATUS` getting lost when `bats_error_trap` fired multiple times under Bash 4.2.x (bats-core#110) * Updated `bin/bats` symlink resolution, handling the case on CentOS where `/bin` is a symlink to `/usr/bin` (bats-core#113, bats-core#115)
Signed-off-by: pixdrift [email protected]