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

added missing setup.cfg to build RPMs #1108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jgruber
Copy link
Contributor

@jgruber jgruber commented Nov 29, 2017

@richbrowne

What issues does this address?

Fixes #1107
...

What's this change do?

adds setuptools file for RPMs

Where should the reviewer start?

run the RPM build script for 'redhat' '7'

Any background context?

@richbrowne
Copy link
Contributor

John,
Run this first --
python f5-openstack-agent-dist/scripts/universal_truth.py

Then run --
f5-openstack-agent-dist/scripts/package_agent.sh "redhat" 7

Sorry, we need to add a package section to the README to make this clear. The universal truth script was written to avoid issues where we had dependencies specified in a bunch of locations.

@ssorenso
Copy link

ssorenso commented Jan 8, 2018

Hi @jgruber,

I've got:
https://github.com/F5Networks/f5-openstack-agent/blob/master/.travis.yml#L32

Creating this file for you dynamically based upon the file:
https://github.com/F5Networks/f5-openstack-agent/blob/master/setup_requirements.txt

So this should work for you if you issue:

./f5-openstack-agent-dist/scripts/universal_truth.py
./f5-openstack-agent-dist/scripts/package_agent.sh "redhat" "7"

This will generate your .rpm file under:
./f5-openstack-agent-dist/rpms/builds/

Proof:

$ python ./f5-openstack-agent-dist/scripts/universal_truth.py
Successfully constructed /git/clones/f5-openstack-agent/setup.cfg and
/git/clones/f5-openstack-agent/f5-openstack-agent-dist/deb_dist/stdeb.cfg
$ ls setup.cfg
setup.cfg
$ ls f5-openstack-agent-dist/deb_dist/stdeb.cfg
f5-openstack-agent-dist/deb_dist/stdeb.cfg
$ ./f5-openstack-agent-dist/scripts/package_agent.sh 'redhat' '7'
...
Wrote: /tmp/f5-openstack-agent.Oahpg/rpmbuild/SRPMS/f5-openstack-agent-10.2.0.b1-1.src.rpm
Wrote: /tmp/f5-openstack-agent.Oahpg/rpmbuild/RPMS/noarch/f5-openstack-agent-10.2.0.b1-1.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.PJZtmg
+ umask 022
+ cd /tmp/f5-openstack-agent.Oahpg/rpmbuild/BUILD
+ cd f5-openstack-agent-10.2.0.b1
+ rm -rf /tmp/f5-openstack-agent.Oahpg/rpmbuild/BUILDROOT/f5-openstack-agent-10.2.0.b1-1.x86_64
+ exit 0
/
+ exit 0
$ ls f5-openstack-agent-dist/rpms/build/
f5-openstack-agent-10.2.0.b1-1.el7.noarch.rpm

This does require docker, and it reduces our requirements to a single file, setup_requirements.py (thus universal_truth). The thing I forgot to do was set things up for setup.py to use the setup_requirements.py, but this is a quick and easy thing to do. There's a ticket open to handle fixing this aspect.

Thanks,
@ssorenso

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

Successfully merging this pull request may close these issues.

3 participants