skip installation by meeting a condition in pre section of Spec file in RPM packaging
Fawad Ali
faw.studies at gmail.com
Fri Feb 18 10:30:46 UTC 2011
Hi,
I followed Marc's method but it never goes to pre section if it is
already installed.
On Thu, Feb 17, 2011 at 10:55 PM, Stuart D. Gathman <stuart at bmsi.com> wrote:
> On Thu, 17 Feb 2011, Fawad Ali wrote:
>
> > I am new to rpm and to rpm packaging. I was asked to copy a
> > war file from one location to another. through rpm. I packaged that.
> > So what it does is like below.
> > 1) Copy file to AUTODEPLOY folder in tomcat server
> > 2) From the AUTODEPLOY folder the tomcat server picks up the war file
> > and explodes it in WEBAPPS folder and removes the content from
> > AUTODEPLOY.
> >
> > Now if I want to REINSTALL, it should first check that whether WEBAPPS
> > contains the exploded war file or not. If yes, then it should display
> > that package is already installed and skip the installation, if the
> > web apps does not contain the exploded war file then it should force
> > the installation process.
> >
> > Can anyone tell me how can I do that.
>
> I do the following:
>
> Install the exploded webapp to a fixed directory structure. For instance,
> our web tracking goes in /bms/webapp/webtrk with WEB-INF META-INF
> subdirs and maybe an art subdir, etc. (If Linux Standards Base ever
> addresses the issue, it would probably belong in /usr/share/java-webapp
> or /var/lib/java-webapp instead.)
>
> Then add a symlink to your webapp container, for instance with JPP packaged
> tomcat5, add /var/lib/tomcat5/webapp/webtrk -> /bms/webapp/webtrk
>
> I also find it handy to symlink WEB-INF/classes -> /bms/java where the
> webapp
> and additional RPMs drop class files for our local java packages (so that
> the
> web app is composed of multiple versioned RPMs). To enable this symlink,
> the RPM needs to also install META-INF/context.xml with something like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Context allowLinking="true">
>
> <!-- Default set of monitored resources -->
> <WatchedResource>WEB-INF/web.xml</WatchedResource>
>
> <!-- Uncomment this to disable session persistence across Tomcat
> restarts -->
> <!--
> <Manager pathname="" />
> -->
>
> </Context>
>
> --
> Stuart D. Gathman <stuart at bmsi.com>
> Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154
> "Confutatis maledictis, flammis acribus addictis" - background song for
> a Microsoft sponsored "Where do you want to go from here?" commercial.
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
--
Regards,
S. Fawad Ali Shah
Software Engineer,
Stafona. Inc.
Cell# +92 334 500 1577
www.7thbillion.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20110218/87ac0665/attachment-0001.html>
More information about the Rpm-list
mailing list