<div dir="ltr">Well I think the %pre section should allow you to run a script that is not a part of the copy to final location.<div><br></div><div style>I am really confused on how to use the %pre section correctly where the source is a part of the Source: tag in the pre-amble.</div>
<div style><br></div><div style>Should that file be copied to the target location, in which case it is too late and the file(s) might have overwritten the files ?</div><div style><br></div><div style>I may need a script(or a bunch of scripts) to run much before any files are copied over to the destination.</div>
<div style><br></div><div style>The %pre is to be able to do that, but I am not able to get the .sh files there.</div><div style><br></div><div style>-Narahari</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Jun 7, 2013 at 10:29 AM, Jim Kinney <span dir="ltr">&lt;<a href="mailto:jim.kinney@gmail.com" target="_blank">jim.kinney@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Shouldn&#39;t that script file just be part of your SOURCE and then processed during make to be a plain copy to final location , listed in %files?<br></div><div class="gmail_extra"><div><div class="h5"><br>
<br><div class="gmail_quote">
On Fri, Jun 7, 2013 at 9:19 AM, Narahari &#39;n&#39; Savitha <span dir="ltr">&lt;<a href="mailto:savithari@gmail.com" target="_blank">savithari@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Ok, Thank you to all of you.  I created my .rpm and tried it out.  A few questions still linger.  Kindly help.<div><br></div><div>My package is not a relocatable package, at least thats what the tool tells me.  What am I doing wrong that is making it Non-Relocatable ?</div>



<div>Here is the spec file.</div><div><a href="http://pastebin.com/rFcE7Y05" target="_blank">http://pastebin.com/rFcE7Y05</a><br></div><div><br></div><div>Also please take a look at this link.</div><div><br></div><div>
<a href="http://stackoverflow.com/questions/7813436/rpmbuild-using-script-files-contained-in-the-package-in-pre-script" target="_blank">http://stackoverflow.com/questions/7813436/rpmbuild-using-script-files-contained-in-the-package-in-pre-script</a><br>


</div><div><br></div><div>In this the person who has replied says that Makeself allows you to create a self installable executable which is base64encoded.  But the question is how do you put a script (aka .sh file) which is a part of the .rpm file  in the</div>


<div><br></div><div>%pre section.</div><div><br></div><div>If I want to put Source2:narahari.sh how do you make it available %pre as in</div><div><br></div><div>%pre -f narahari.sh</div>
<div><br></div><div>Thank You</div><span><font color="#888888"><div>-Narahari</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 5, 2013 at 12:04 AM, Jeff Hubbs <span dir="ltr">&lt;<a href="mailto:jhubbslist@att.net" target="_blank">jhubbslist@att.net</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Meh.  Admins rotate in and out so much
      these days and documenting things is so unheard of...don&#39;t get me
      started.  Suffice it to say that no one will curse your name
      because no one will remember it. :)<br>
      <br>
      A few years ago I was trying to address a very unhealthy
      Tomcat-behind-Apache platform that was using some very old version
      of Tomcat that was so unstable that it was end-of-lifed and a
      whole new branch of the tree emerged with a &quot;there be dragons&quot;
      sign left at the old. :)<br>
      <br>
      The Apache people, over and over again, would say DON&#39;T use your
      distro&#39;s package manager...just DON&#39;T!!!  And sure enough, on RH
      and -alikes, I could see why at the time.  Whoever managed the
      Gentoo ebuild was very meticulous and it *would* work perfectly,
      but you could see that a &quot;Tomcat way&quot; and a &quot;Gentoo way&quot; of doing
      and placing things was being very carefully reconciled.  Just the
      same, if you eschewed the Tomcat ebuild under Gentoo and just took
      the Tomcat distribution as the Apache people intended, there
      wasn&#39;t any interference and it would work just fine also, provided
      you&#39;d laid in the dependencies by hand via Portage.  <br><div><div>
      <br>
      On 6/4/13 8:40 PM, Jim Kinney wrote:<br>
    </div></div></div><div><div>
    <blockquote type="cite">
      <p dir="ltr">+1e^infinity<br>
        KISS principle keeps later admins from putting a price on your
        head.</p>
      <div class="gmail_quote">On Jun 4, 2013 8:21 PM, &quot;Scott McBrien&quot;
        &lt;<a href="mailto:smcbrien@gmail.com" target="_blank">smcbrien@gmail.com</a>&gt;
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div dir="auto">
            <div>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&#39;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&#39;t,
              or is extremely difficult, to reverse.</div>
            <div><br>
            </div>
            <div>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.</div>
            <div><br>
            </div>
            <div>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.</div>
            <div><br>
            </div>
            <div>-Scott</div>
            <div><br>
              On Jun 4, 2013, at 7:23 PM, &quot;Narahari &#39;n&#39; Savitha&quot; &lt;<a href="mailto:savithari@gmail.com" target="_blank">savithari@gmail.com</a>&gt; wrote:<br>
              <br>
            </div>
            <blockquote type="cite">
              <div>
                <div dir="ltr">I built my vanilla Tomcat rpm and the
                  %install section has
                  <div><br>
                  </div>
                  <div>
                    <div>mkdir -p $RPM_BUILD_ROOT/opt/</div>
                    <div>cp -R
                      /home/virtual/rpmbuild/BUILD/apache-tomcat-7.0.37
                      $RPM_BUILD_ROOT/opt</div>
                  </div>
                  <div><br>
                  </div>
                  <div>I also built the delta.rpm and I am in the
                    process of tinkering the %install section for that.</div>
                  <div>What I would like to do is</div>
                  <div><br>
                  </div>
                  <div>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)</div>
                  <div>b. enquire the rpm tool as to where the package
                    apache-tomcat-7.0.37-vanilla is installed ? not sure
                    how to do this.</div>
                  <div>c. cd to the location
                    the apache-tomcat-7.0.37-vanilla is installed  and
                    backup a few files.</div>
                  <div>d. then do a cp -r from the BUILD folder to the
                    target folder.</div>
                  <div><br>
                  </div>
                  <div>Where should I put the code for all this ?  I
                    presume the %install section ?</div>
                  <div>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 ?</div>
                  <div><br>
                  </div>
                  <div>Kindly help.</div>
                  <div><br>
                  </div>
                  <div>-Narahari</div>
                </div>
                <div class="gmail_extra"><br>
                  <br>
                  <div class="gmail_quote">On Mon, Jun 3, 2013 at 3:31
                    PM, Scott Plante <span dir="ltr">&lt;<a href="mailto:splante@insightsys.com" target="_blank">splante@insightsys.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div>
                        <div style="font-size:12pt;font-family:arial,helvetica,sans-serif">
                          <div>&quot;<span style="font-family:Helvetica,Arial,sans-serif">Also,
                              tomcat is not really built as in gcc or cc
                              or whatever aka no make or configure.&quot;</span>
                            <div>
                              <br>
                            </div>
                          </div>
                          <div>Mostly true, however there is an optional
                            native part, found in the
                            &quot;[tomcat-root]/bin/commons-daemon-native.tar.gz&quot;
                            file. If you&#39;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 &lt;1024) directly without
                            running Tomcat as root. You don&#39;t need this
                            if you&#39;re running Tomcat behind Apache HTTP,
                            but for example WebRTC won&#39;t work proxying
                            through ajp.</div>
                          <div><br>
                          </div>
                          <div>Scott<br>
                            <hr>
                            <div style="font-size:12pt;font-style:normal;font-family:Helvetica,Arial,sans-serif;text-decoration:none;font-weight:normal"><b>From:
                              </b>&quot;Narahari &#39;n&#39; Savitha&quot; &lt;<a href="mailto:savithari@gmail.com" target="_blank">savithari@gmail.com</a>&gt;<br>
                              <b>To: </b>&quot;Atlanta Linux Enthusiasts -
                              Yes! We run Linux!&quot; &lt;<a href="mailto:ale@ale.org" target="_blank">ale@ale.org</a>&gt;<br>
                              <b>Sent: </b>Sunday, June 2, 2013
                              10:02:11 PM<br>
                              <b>Subject: </b>[ale] rpm&#39;s src vs binary
                              and the confusion
                              <div>
                                <div><br>
                                  <br>
                                  <div dir="ltr">
                                    <div>
                                      <div>
                                        <div>
                                          <div>
                                            <div>
                                              <div>
                                                <div>
                                                  <div>
                                                    <div>Friends:<br>
                                                      <br>
                                                    </div>
                                                    I am building an rpm
                                                    for Apache Tomcat
                                                    version 7.0.37.<br>
                                                    <br>
                                                  </div>
                                                  Sorry to ask a lame
                                                  question but what is
                                                  the diff between src
                                                  rpm and regular rpm ?<br>
                                                </div>
                                                (dont flame, I know I
                                                have read it but it
                                                confuses me when I am
                                                building)<br>
                                                <br>
                                              </div>
                                              Also, tomcat is not really
                                              built as in gcc or cc or
                                              whatever aka no make or
                                              configure.<br>
                                              <br>
                                            </div>
                                            So in the install section
                                            what should I be really
                                            doing ?<br>
                                          </div>
                                          Spec file is here.<br>
                                          <br>
                                          <a href="http://pastebin.com/f6P64tSQ" target="_blank">http://pastebin.com/f6P64tSQ</a><br>
                                          <br>
                                        </div>
                                        Also, if I have a custom name
                                        for the rpm I am building, what
                                        macros or env variables are
                                        available in the %install
                                        section ?<br>
                                        <br>
                                      </div>
                                      Regards,<br>
                                    </div>
                                    -Narahari<br>
                                    <div>
                                      <div>
                                        <div><br>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                  <br>
                                </div>
                              </div>
                              <div>_______________________________________________<br>
                                Ale mailing list<br>
                                <a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
                                <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
                                See JOBS, ANNOUNCE and SCHOOLS lists at<br>
                                <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
                              </div>
                            </div>
                            <br>
                          </div>
                        </div>
                      </div>
                      <br>
                      _______________________________________________<br>
                      Ale mailing list<br>
                      <a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
                      <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
                      See JOBS, ANNOUNCE and SCHOOLS lists at<br>
                      <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </blockquote>
            <blockquote type="cite">
              <div><span>_______________________________________________</span><br>
                <span>Ale mailing list</span><br>
                <span><a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a></span><br>
                <span><a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a></span><br>
                <span>See JOBS, ANNOUNCE and SCHOOLS lists at</span><br>
                <span><a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a></span><br>
              </div>
            </blockquote>
          </div>
          <br>
          _______________________________________________<br>
          Ale mailing list<br>
          <a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
          <a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
          See JOBS, ANNOUNCE and SCHOOLS lists at<br>
          <a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Ale mailing list
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a>
See JOBS, ANNOUNCE and SCHOOLS lists at
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org" target="_blank">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br><br clear="all"><br></div></div><div class="im">-- <br>-- <br>James P. Kinney III<br><i><i><i><i><br></i></i></i>Every time you stop a school, you will have to build a jail. What you 
        gain at one end you lose at the other. It&#39;s like feeding a dog on his 
        own tail. It won&#39;t fatten the dog.<br>

        - Speech 11/23/1900 Mark Twain<br><i><i><i><i><br><a href="http://electjimkinney.org" target="_blank">http://electjimkinney.org</a><br><a href="http://heretothereideas.blogspot.com/" target="_blank">http://heretothereideas.blogspot.com/</a><br>

</i></i></i>
</i></i></div></div>
<br>_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
<br></blockquote></div><br></div>