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

How compile an rpm myself? #2

Closed
butsjoh opened this issue Feb 15, 2019 · 4 comments
Closed

How compile an rpm myself? #2

butsjoh opened this issue Feb 15, 2019 · 4 comments

Comments

@butsjoh
Copy link

butsjoh commented Feb 15, 2019

Hi,

We would like to use your nginx-more as a base for adding additional modules as well. How would we be able todo that? Could you explain a bit how you build your packages? Maybe i can help in building a script that would run for example in a docker container and results in building an rpm. Glad to help out.

@butsjoh
Copy link
Author

butsjoh commented Feb 15, 2019

I think i already figured it out :) I just need to modify your spec file and then run an rpmbuild it seems (https://access.redhat.com/sites/default/files/attachments/rpm_building_howto.pdf)

I am not familiar with building rpm's but i will try it this way :)

@karljohns0n
Copy link
Owner

Hi,

I would highly recommend using mock to build this package for el6 and el7. You can install mock from EPEL on a CentOS 7 server. Clone this repo, get all modules sources with the right name, use mock to build both SRPMS and RPMS. You can always use the RPMS I provide with your own configurations. Updating the package wont overwrite your .conf files.

Good luck! :)

@karljohns0n
Copy link
Owner

Quick note before I close this issue. If you build this RPM with mock, you need to add Aeris repository in your mock configuration because the package depends on libraries outside CentOS base such as libmaxminddb-devel for GeoIP2.

File: /etc/mock/epel-7-x86_64.cfg

[aeris]
name=Aeris Packages for Enterprise Linux 7 - stable - $basearch
baseurl=http://repo.aerisnetwork.com/stable/centos/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-AERIS

@butsjoh
Copy link
Author

butsjoh commented Feb 28, 2019

For reference to other people. I managed todo it with just these lines of code:

# Downloads all sources with http url listed in the .spec file
spectool -g -R SPECS/nginx-tp.spec

# Download deps listed in the .spec file
yum-builddep -y SPECS/nginx-tp.spec

# Starts build
rpmbuild -ba SPECS/nginx-tp.spec

tedwardia added a commit to tedwardia/nginx-more that referenced this issue Aug 4, 2020
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

No branches or pull requests

2 participants