shawnsi / docker-rpmbuild Goto Github PK
View Code? Open in Web Editor NEWDocker wrapper for rpmbuild
License: MIT License
Docker wrapper for rpmbuild
License: MIT License
I have another additional commit I would like to pull in if you want it, but you should probably agree on some kind of license.
BSD, MIT or something painless is my suggestion. :-)
{u'status': u'Pulling repository docker.example.net:5000/centos'}
{u'errorDetail': {u'message': u'Error: image centos not found'}, u'error': u'Error: image centos not found'}
Should throw an PackagerException if error is found.
"docker-rpmbuild" in same directory as spec to fill in all the required arguments for building the spec.
Ie .spec should check for config in .docker-rpmbuild to feed docker-rpmbuild with arguments.
You want to revert 631c073, you don't want to involve real files in a unit test (NamedTemporaryFile) .
Make integration tests incase you want that. (that's why we only assert that the mock is called once with the same argument given in --config.
It should auto publish docs written in sphinx.
Currently there is no option to change settings provided to the docker-py client instance.
"client = docker.Client(timeout=600)" ( https://github.com/shawnsi/docker-rpmbuild/blob/master/rpmbuild/__init__.py#L10)
Should support reading settings from /etc/docker-rpmbuild/settings.[conf|ini] or something to set docker client configuration.
Currently scl builds are only partially supported. Any scl build dependencies fail as yum-builddep does not properly parse the spec file with the defined variables required for collection support.
See subject
@norrs has been kind enough to write unit tests for his contributions. I'll get tox setup and start working on covering the rest of the package.
After a successful build, no rpm files are copied to the output directory. The documentation says that the default output dir is .
, but no files are written to the local directory, nor does a custom option like --output=/tmp
work either.
This is what I see at the end of a build for collectd:
Processing files: collectd-debuginfo-5.5.0-1.el6.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/collectd-5.5.0-1.el6.x86_64
Wrote: /root/rpmbuild/SRPMS/collectd-5.5.0-1.el6.src.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/collectd-5.5.0-1.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/collectd-amqp-5.5.0-1.el6.x86_64.rpm
... skipped package lines ...
Wrote: /root/rpmbuild/RPMS/x86_64/collectd-utils-5.5.0-1.el6.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/collectd-debuginfo-5.5.0-1.el6.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.0rwcNF
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd collectd-5.5.0
+ rm -rf /root/rpmbuild/BUILDROOT/collectd-5.5.0-1.el6.x86_64
+ exit 0
If you don't mind, I'll start on writing some documentation with sphinx on using docker-rpmbuild, with examples with both using config and overriding config values with provided command line arguments etc.
rpmbuild.build:main
fails on python 2.6.6 because line.decode
doesn't accept the encoding
keyword arg. It does work on python2.7; not sure how to reconcile that with python3.
https://github.com/shawnsi/docker-rpmbuild/blob/master/rpmbuild/build.py#L75
Incase something fails, you should be able to just enter the container commit to easier debug what is going wrong with your build.
Step 9 : CMD rpmbuild -ba /rpmbuild/SPECS/reedb.spec
---> Running in b635aea4c815
---> f89702171758
Successfully built f89702171758
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.nxLE2X
+ umask 022
+ cd /root/rpmbuild/BUILD
+ gem unpack /root/rpmbuild/SOURCES/reedb-0.11.gem
ERROR: While executing gem ... (Gem::Package::FormatError)
No such file or directory @ rb_sysopen - /root/rpmbuild/SOURCES/reedb-0.11.gem
RPM build errors:
I created a tarball with a .gem file in it which is called "reedb-0.11.gem" and it seems to be unpacking it correctly.
What I don't understand is how it finds the .spec but doesn't correctly copy the .gem to the directory it needs to be in.
Not sure if this is a bug with your code. But maybe you can help me? Thanks
At the moment we expect to find it under /rpmbuild/{SOURCES,SPECS ... }.
At least with the latest upstream docker centos6 image, this fails.
Maybe we could supply a .rpmmacros with %_topdir set.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.