[ale] rpm's src vs binary and the confusion

Scott McBrien smcbrien at gmail.com
Tue Jun 4 22:57:16 EDT 2013


I think when we started I suggested you run the distro tomcat and do an rpm of your additional content.  Since you're not doing that and are rolling your own tomcat as well, you should take the original tomcat source and in the %prep section, patch in your adjustments, then roll the RPM.

If you still want to do two RPMs, you know where the tomcat rpm put its files if you Require a specific matching version of it.  You'll know because of the file manifest that is part of that RPM.

I think the intention of having two is that you could update tomcat as needed, then apply your changes on top, but if your changes RPM is no %files, but instead scripting that copies stuff from one location to another, you're really using RPM as tar, and you might as well just use tar for that.

-Scott

On Jun 4, 2013, at 10:24 PM, "Narahari 'n' Savitha" <savithari at gmail.com> wrote:

> Thank you for the corrections you have suggested.  It is not a     delta rpm           in the true sense. (long email please brace)
> 
> Let me see if my approach is right or not.  Please do critique my approach, if any.
> 
> We have had to customize the Apache tomcat by adding some extra folders to the apache tomcat.
> 
> We also have had to modify a few of the properties files, .sh files etc., of the vanilla version.
> 
> What I have done is, before customization, made an rpm of the vanilla version.(apache-tomcat-vanilla-7.0.37.rpm)
> 
> I have then started the process of creation of a .rpm of the differences aka the extra folders, modified props, modified .sh files etc.,(name is apache-tomcat-differences-7.0.37.rpm)
> 
> I will put Requires for the  apache-tomcat-differences-7.0.37.rpm  as apache-tomcat-vanilla-7.0.37.rpm and Conflicts as apache-tomcat-differences-7.0.37.rpm
> 
> I wont do deltas of deltas.  The idea is to install base and superimpose the extras/mods.
> 
> Now that i have hopefully have clarified that
> 
> What I would like to do is
> 
> a. check if apache-tomcat-7.0.37-vanilla is installed (this I can do in the Requires section of the preamble, I presume the name is the name of the rpm package)
> b. enquire the rpm tool as to where the package apache-tomcat-7.0.37-vanilla is installed ? not sure how to do this.
> c. cd to the location the apache-tomcat-7.0.37-vanilla is installed  and backup a few files.
> d. then do a cp -r from the BUILD folder to the target folder.
> 
> 
> Kindly read this long email and help.
> 
> -Narahari
> 
> 
> On Tue, Jun 4, 2013 at 8:17 PM, Scott McBrien <smcbrien at gmail.com> wrote:
>> I would attempt to dissuade you from using a delta rpm.  With deltas, you end up being really really concerned with versions.  So after your first delta gets applied, if you have another update, you make a delta of the delta, which means if there's a machine with the vanilla rpm out there and you apply delta2 on it, things devolve into madness quite quickly.  Does a regular RPM contain more stuff and take up more space?  Sure.  But if an RPM is 10MB or 100MB, who really cares.  The simpler you keep your packages, the more independent you keep your packages the less likely that you get into a situation you can't, or is extremely difficult, to reverse.
>> 
>> If you choose to ignore my advice, you should use not only the package name, but also the version in your Requires for your drpm, that should keep you from applying a drpm to a box that is not at the appropriate version to accept the delta successfully.
>> 
>> But seriously, keep it simple, it will improve your life in the long run, and admins who follow you will praise your good works rather than spitting and cursing at the mention of your name.
>> 
>> -Scott
>> 
>> On Jun 4, 2013, at 7:23 PM, "Narahari 'n' Savitha" <savithari at gmail.com> wrote:
>> 
>>> I built my vanilla Tomcat rpm and the %install section has
>>> 
>>> mkdir -p $RPM_BUILD_ROOT/opt/
>>> cp -R /home/virtual/rpmbuild/BUILD/apache-tomcat-7.0.37 $RPM_BUILD_ROOT/opt
>>> 
>>> I also built the delta.rpm and I am in the process of tinkering the %install section for that.
>>> What I would like to do is
>>> 
>>> a. check if apache-tomcat-7.0.37-vanilla is installed (this I can do in the Requires section of the preamble, I presume the name is the name of the rpm package)
>>> b. enquire the rpm tool as to where the package apache-tomcat-7.0.37-vanilla is installed ? not sure how to do this.
>>> c. cd to the location the apache-tomcat-7.0.37-vanilla is installed  and backup a few files.
>>> d. then do a cp -r from the BUILD folder to the target folder.
>>> 
>>> Where should I put the code for all this ?  I presume the %install section ?
>>> What all heavy lifting can I or should I do in the %install section and is using macros a requirement or a good thing to do kind of a thing ?
>>> 
>>> Kindly help.
>>> 
>>> -Narahari
>>> 
>>> 
>>> On Mon, Jun 3, 2013 at 3:31 PM, Scott Plante <splante at insightsys.com> wrote:
>>>> "Also, tomcat is not really built as in gcc or cc or whatever aka no make or configure."
>>>> 
>>>> Mostly true, however there is an optional native part, found in the "[tomcat-root]/bin/commons-daemon-native.tar.gz" file. If you're creating a Tomcat binary RPM it would be a good idea to compile this, as it allows you to have Tomcat listen on port 80/443 (or a port <1024) directly without running Tomcat as root. You don't need this if you're running Tomcat behind Apache HTTP, but for example WebRTC won't work proxying through ajp.
>>>> 
>>>> Scott
>>>> From: "Narahari 'n' Savitha" <savithari at gmail.com>
>>>> To: "Atlanta Linux Enthusiasts - Yes! We run Linux!" <ale at ale.org>
>>>> Sent: Sunday, June 2, 2013 10:02:11 PM
>>>> Subject: [ale] rpm's src vs binary and the confusion
>>>> 
>>>> 
>>>> Friends:
>>>> 
>>>> I am building an rpm for Apache Tomcat version 7.0.37.
>>>> 
>>>> Sorry to ask a lame question but what is the diff between src rpm and regular rpm ?
>>>> (dont flame, I know I have read it but it confuses me when I am building)
>>>> 
>>>> Also, tomcat is not really built as in gcc or cc or whatever aka no make or configure.
>>>> 
>>>> So in the install section what should I be really doing ?
>>>> Spec file is here.
>>>> 
>>>> http://pastebin.com/f6P64tSQ
>>>> 
>>>> Also, if I have a custom name for the rpm I am building, what macros or env variables are available in the %install section ?
>>>> 
>>>> Regards,
>>>> -Narahari
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Ale mailing list
>>>> Ale at ale.org
>>>> http://mail.ale.org/mailman/listinfo/ale
>>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>>> http://mail.ale.org/mailman/listinfo
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Ale mailing list
>>>> Ale at ale.org
>>>> http://mail.ale.org/mailman/listinfo/ale
>>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>>> http://mail.ale.org/mailman/listinfo
>>> 
>>> _______________________________________________
>>> Ale mailing list
>>> Ale at ale.org
>>> http://mail.ale.org/mailman/listinfo/ale
>>> See JOBS, ANNOUNCE and SCHOOLS lists at
>>> http://mail.ale.org/mailman/listinfo
>> 
>> _______________________________________________
>> Ale mailing list
>> Ale at ale.org
>> http://mail.ale.org/mailman/listinfo/ale
>> See JOBS, ANNOUNCE and SCHOOLS lists at
>> http://mail.ale.org/mailman/listinfo
> 
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20130604/08e32ace/attachment.html>


More information about the Ale mailing list