-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added github actions for rpm package build
This includes the rpm dir with a makefile and spec template. Ported over async_lru for lack of fedora packaging.
- Loading branch information
Showing
13 changed files
with
351 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
name: RPM build in Fedora Copr | ||
on: | ||
# Build only on pushes into master branch. | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
build: | ||
name: Submit a build from Fedora container | ||
container: fedora:latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out proper version of sources | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install API token for copr-cli | ||
env: | ||
API_TOKEN_CONTENT: ${{ secrets.COPR_API_TOKEN }} | ||
run: | | ||
mkdir -p "$HOME/.config" | ||
echo "$API_TOKEN_CONTENT" > "$HOME/.config/copr" | ||
- name: Install tooling for source RPM build | ||
run: | | ||
dnf -y install @development-tools @rpm-development-tools copr-cli make | ||
- name: Build the source RPM | ||
run: | | ||
cd rpm && make srpm | ||
- name: Submit the build by uploading the source RPM | ||
run: | | ||
copr build quadsdev/python3-badfish rpm/*.src.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
*.spec | ||
*.tar.gz | ||
*.src.rpm | ||
noarch/ | ||
python3-badfish.spec/ |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
PYTHON := python3 | ||
BUILD_HELPER := ./build-helper | ||
|
||
VERSION = $(shell $(BUILD_HELPER) --version) | ||
RELEASE = $(shell $(BUILD_HELPER) --release) | ||
DATE = $(shell date +'%a %b %d %Y') | ||
TARBALL = python3-badfish-$(VERSION).tar.gz | ||
|
||
all: python3-badfish.spec python3-badfish-$(VERSION).tar.gz | ||
|
||
.PHONY: $(TARBALL) | ||
$(TARBALL): | ||
rm -f $(TARBALL) | ||
( cd .. && git archive --prefix python3-badfish-$(VERSION)/ HEAD ) \ | ||
| gzip > "$@" | ||
|
||
python3-badfish.spec: python3-badfish.spec.tpl ../setup.py | ||
@echo " GEN $@" ; \ | ||
sed -e "s|@VERSION@|$(VERSION)|g" \ | ||
-e "s|@RELEASE@|$(RELEASE)|g" \ | ||
-e "s|@DATE@|$(DATE)|g" \ | ||
$< > $@.output ; \ | ||
mv "$@.output" "$@" # move when successful | ||
|
||
srpm: all | ||
dir=`pwd` ; \ | ||
rm *.src.rpm ; \ | ||
rpmbuild --define "_sourcedir $$dir" \ | ||
--define "_rpmdir $$dir" \ | ||
--define "_builddir $$dir" \ | ||
--define "_specdir $$dir" \ | ||
--define "_srcrpmdir $$dir" \ | ||
-bs *.spec | ||
|
||
clean: | ||
rm -rf *.src.rpm *.tar.gz *.spec noarch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#! /bin/sh | ||
|
||
case $1 in | ||
--version) | ||
cd .. ; ${PYTHON-python3} setup.py --version | ||
;; | ||
--release) | ||
echo "git.$(date +"%Y%m%d_%H%M%S")" | ||
;; | ||
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
%global sum Badfish is a Redfish-based API tool for managing bare-metal systems via the Redfish API | ||
%global desc \ | ||
Badfish is a vendor-agnostic, redfish-based API tool used to consolidate \ | ||
management of IPMI and out-of-band interfaces for common server hardware \ | ||
vendors. Badfish is also a popular song from Sublime, this may be a \ | ||
coincidence – are you a badfish too? | ||
|
||
|
||
Name: python3-badfish | ||
Version: @VERSION@ | ||
Release: @RELEASE@%{?dist} | ||
Summary: %{sum} | ||
|
||
License: GPLv3 | ||
URL: https://github.com/redhat-performance/badfish | ||
Source0: %{url}/archive/v%{version}/python3-badfish-%{version}.tar.gz | ||
|
||
BuildArch: noarch | ||
BuildRequires: python3-setuptools | ||
BuildRequires: python3-devel | ||
|
||
%description | ||
%{desc} | ||
|
||
%prep | ||
%autosetup -n %{name}-%{version} | ||
|
||
%build | ||
%py3_build | ||
|
||
%install | ||
%py3_install | ||
|
||
%files -n %{name} | ||
%doc README.md | ||
%license LICENSE | ||
%{python3_sitelib}/* | ||
%{_bindir}/badfish | ||
|
||
%changelog | ||
* @DATE@ Gonzalo Rafuls <gonza@redhat.com> - @VERSION@-@RELEASE@ | ||
- built from upstream, changelog ignored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.