top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is spec file for building RPM file?

+2 votes
318 views

In my java web project, i am creating war file using ANT and i have a MAKEFILE for that. For now i want to create a binary package which will deploy war file in tomcat. I don't have much knowledge about building a rpm file. But for this i need a spec file which should do make and create a rpm package including the recently created war file.
Can anyone help?

posted Oct 17, 2013 by Satyabrata Mahapatra

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button
Its a big subject, please go through http://www.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html
Its difficult to explain in one answer. So first go though the link probably 2-3 pages and then ask specific query.
PS: Try to get the sample spec file and use rpm -bc <specfile> then try to modify that will be faster.

Similar Questions
0 votes

Given a particular user or particular group, is there a rpm command that returns what package created that particular user or particular group?

Analogous to rpm -q --whatprovides /etc/security/limits.conf returns the package "pam". Is there an rpm command that returns what package generated a particular user?

Most of us already know that the httpd package is associated with the user apache. But there are passwd and group entries that i would like to verify and want to know exactly how they got on my system. Further i would like to know which the security implications of adding another group to a user account.

Something like the following command:

`rpm --query --user apache` would return "httpd"
`rpm --query --group pulse-access` might return pulseaudio
+2 votes

I am trying installing Mysql server using RPM bundle

rpm -i MySQL-server-5.6.16-1.el6.x86_64.rpm
rpm -i MySQL-client-5.6.16-1.el6.x86_64.rpm

The server RPM places data under the /var/lib/mysql directory. The RPM also creates a login account for a user named mysql (if one does not exist) to use for running the MySQL server, and creates the appropriate entries in /etc/init.d/ to start the server automatically at boot time. (This means that if you have performed a previous installation and have made changes to its startup script, you may want to make a copy of the script so that you do not lose it when you install a newer RPM.

When I checked /var/lib I found none for mysql, any thoughts?

0 votes

Just curious, I see in Gkrellm quite often RPM takes much processor time. What is this RPM "daemon" Is it needed? I have not auto update on. Where I can find config for that?

0 votes

How do you pass vars to rpmbuild for definition?

eg: rpmbuild --define '"${_definition2}"'

I've been fiddling with ways to escape, but none is fricking working.. I mean, rpmbuild rushes to work(no errors nor failure) so if you try just command line do not believe it, because later as it executes %if you will see process does not see these definitions.

+1 vote

I am trying to figure out how to list the rpms in, say:

@base-x
or
@printing
or
@fedora-release-nonproduct

and so on.

Any help?

...