License | LicenseFile | LicenseColor |
---|---|---|
MIT |
../LICENSE |
yellow |
{{template "badge/travis" .}} {{template "badge/goreport" .}} {{template "badge/godoc" .}} {{template "license/shields" .}}
{{pkgdoc}}
Using a json
files to declare rules, it then performs necessary operations
to invoke rpmbuild
and build the package.
This tool is part of the go-github-release workflow
See the demo.
{{template "gh/releases" .}}
{{template "glide/install" .}}
{{template "linux/bintray_repo" .}}
{{template "linux/gh_pkg" .}}
A centos/fedora/redhat system, vagrant, travis, docker, whatever.
To create a binary package you need to
- build your application binaries
- invoke
go-bin-rpm
to generate the package - create rpm repositories on
travis
hosted ongh-pages
using this script
For a real world example including service, shortcuts, env, see this
For a casual example to provide a simple binary, see this
Several tokens are provided to consume into the JSON file.
name | description | example |
---|---|---|
!version! | The version number provided in the command line, or in the JSON file. |
1.0.2 |
!arch! | The architecture short name provided in the command line or in the JSON file. |
amd64 |
!name! | The name of the project provided in the JSON file. |
hello |
TLDR
# install
sudo rpm -ivh pkg.rpm
# upgrade
sudo rpm -Uvh pkg.rpm
# remove
sudo rpm -evv nx pkg.rpm
Please check the demo app here
- get a github repo
- get a travis account
- connect your github account to travis and register your repo
- install travis client
gem install --user travis
- run
travis encrypt --add -r YOUR_USERNAME/dummy GH_TOKEN=xxxx
- run
travis setup releases
- personalize the
.travis.yml
{{yaml ".travis.yml" | preline " " | color "yml"}}
# check dependencies before install
rpm -qpR pkg.rpm
# show info of a package before install
rpm -qip pkg.rpm
# install with no dependencies
rpm -ivh --nodeps pkg.rpm
# show info of installed package
rpm -qi pkg
# check installed package
rpm -q pkg
# list files of installed package
rpm -ql pkg
- https://fedoraproject.org/wiki/Packaging:RPMMacros
- http://www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html
- http://www.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html
- http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html
- http://www.rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html
- https://fedoraproject.org/wiki/PackagingDrafts:SystemdClarification#Packaging
- https://fedoraproject.org/wiki/Packaging:Scriptlets?rd=Packaging:ScriptletSnippets#Systemd
- https://fedoraproject.org/wiki/Packaging:Guidelines#BuildRequires_2
- http://wiki.networksecuritytoolkit.org/nstwiki/index.php/RPM_Quick_Reference#Secret_.25pretrans_and_.25posttrans_RPM_Scriptlets
- https://fedoraproject.org/wiki/Packaging:Scriptlets?rd=Packaging:ScriptletSnippets#desktop-database
- https://fedoraproject.org/wiki/Archive:PackagingDrafts/DesktopVerify?rd=PackagingDrafts/DesktopVerify
- https://fedoraproject.org/wiki/Archive:PackagingDrafts/DesktopFiles?rd=PackagingDrafts/DesktopFiles
gump patch -d # check
gump patch # bump