0

I need to build a RPM package to install in Citrix XenServer. (centos 5). The package maintainer didn't update the RPMs.

I downloaded and installed Centos 5 and the rpm-build, gcc, etc packages.

I downloaded: http://sourceforge.net/projects/apcupsd/files/apcupsd%20-%20Stable/3.14.12/

Put the tar.gz in /home/jsivil/rpmbuild/SOURCES

[jsivil@localhost ~]$ cd rpmbuild/
[jsivil@localhost rpmbuild]$ ls -la
total 56
drwxr-xr-x 7 jsivil root   4096 ene  8 21:04 .
drwx------ 4 jsivil jsivil 4096 ene  8 21:05 ..
drwxr-xr-x 2 jsivil root   4096 ene  8 21:04 BUILD
drwxr-xr-x 2 jsivil root   4096 ene  8 21:04 RPMS
drwxr-xr-x 2 jsivil root   4096 ene  8 21:26 SOURCES
drwxr-xr-x 2 jsivil root   4096 ene  8 21:04 SPECS
drwxr-xr-x 2 jsivil root   4096 ene  8 21:04 SRPMS

Now the tutorial says I need to create a .spec file.

In /platforms/redhat there is a file named apcupsd.spec.in

Should I use this?

Previously I unpacked the tar, and did ./configure and then make. It seems to have created a platforms/redhat/apcupsd.spec file (without .in extension), but the tutorial says that I must put the tar.gz in SOURCES.

How should I go on?

  • github.com/jordansissel/fpm - forget about specs and live happily ever after. – Deer Hunter Jan 9 '15 at 7:58
  • I'd second the recommendation for the fpm tool. It looks like a great /initial/ tool for someone looking to learn about enterprise linux packaging. It should create a usable spec, something to improve on and study. You WILL eventually need to (learn and) edit spec files yourself, but that's down the road. – user2066657 Aug 14 '15 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.