<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Redhat Linux package &amp;quot;rpmbuild&amp;quot; question in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804573#M23819</link>
    <description>Hello, &lt;BR /&gt;&lt;BR /&gt;How are you?&lt;BR /&gt;&lt;BR /&gt;Sorry to bother, I just have a quick question regarding Redhat Linux 3.0 &amp;amp; 4.0 packaging via rpmbuild.&lt;BR /&gt;&lt;BR /&gt;For some packages, we have to run shell scripts before package is installed and after package is installed. I know I can put shell scripts into "pkg.spec" file as "%pre" and "%post" before performing "rpmbuild". But this way will make the "pkg.sepc" file very long and not easy to troubleshoot. I would like to use seperate pre shell script and post shell script, but I am not sure how to integragte them into the "pkg.spec" file in order to run shell scripts before package instlalation, and after installation.&lt;BR /&gt;&lt;BR /&gt;For instance, pkg.spec file&lt;BR /&gt;&lt;BR /&gt;Summary: test&lt;BR /&gt;name: test&lt;BR /&gt;&lt;BR /&gt;%pre&lt;BR /&gt;&lt;BR /&gt;ksh /tmp/pkgpre.sh ????&lt;BR /&gt;(syntax to integrate the shell pre script; need to put shell into specific location? &lt;BR /&gt;&lt;BR /&gt;% post&lt;BR /&gt;ksh /tmp/pkgpost.sh ???&lt;BR /&gt;syntax to integrate the shell pre script; need to put shell into specific location? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you can advise when you get a chance, I would appreciate it.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance&lt;BR /&gt;</description>
    <pubDate>Mon, 12 Jun 2006 16:36:57 GMT</pubDate>
    <dc:creator>Allison1</dc:creator>
    <dc:date>2006-06-12T16:36:57Z</dc:date>
    <item>
      <title>Redhat Linux package "rpmbuild" question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804573#M23819</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;How are you?&lt;BR /&gt;&lt;BR /&gt;Sorry to bother, I just have a quick question regarding Redhat Linux 3.0 &amp;amp; 4.0 packaging via rpmbuild.&lt;BR /&gt;&lt;BR /&gt;For some packages, we have to run shell scripts before package is installed and after package is installed. I know I can put shell scripts into "pkg.spec" file as "%pre" and "%post" before performing "rpmbuild". But this way will make the "pkg.sepc" file very long and not easy to troubleshoot. I would like to use seperate pre shell script and post shell script, but I am not sure how to integragte them into the "pkg.spec" file in order to run shell scripts before package instlalation, and after installation.&lt;BR /&gt;&lt;BR /&gt;For instance, pkg.spec file&lt;BR /&gt;&lt;BR /&gt;Summary: test&lt;BR /&gt;name: test&lt;BR /&gt;&lt;BR /&gt;%pre&lt;BR /&gt;&lt;BR /&gt;ksh /tmp/pkgpre.sh ????&lt;BR /&gt;(syntax to integrate the shell pre script; need to put shell into specific location? &lt;BR /&gt;&lt;BR /&gt;% post&lt;BR /&gt;ksh /tmp/pkgpost.sh ???&lt;BR /&gt;syntax to integrate the shell pre script; need to put shell into specific location? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If you can advise when you get a chance, I would appreciate it.&lt;BR /&gt;&lt;BR /&gt;Thank you in advance&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jun 2006 16:36:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804573#M23819</guid>
      <dc:creator>Allison1</dc:creator>
      <dc:date>2006-06-12T16:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Redhat Linux package "rpmbuild" question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804574#M23820</link>
      <description>Hello,&lt;BR /&gt;I've never added shell scripts, but the document of creating RPM has these lines:&lt;BR /&gt;You can put scripts in that get run before and after the installation and uninstallation of binary packages. A main reason for this is to do things like run ldconfig after installing or removing packages that contain shared libraries. The macros for each of the scripts is as follows: &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;%pre is the macro to do pre-install scripts. &lt;BR /&gt;&lt;BR /&gt;%post is the macro to do post-install scripts. &lt;BR /&gt;&lt;BR /&gt;%preun is the macro to do pre-uninstall scripts. &lt;BR /&gt;&lt;BR /&gt;%postun is the macro to do post-uninstall scripts. &lt;BR /&gt;&lt;BR /&gt;The contents of these sections should just be any sh style script, though you do not need the #!/bin/sh. &lt;BR /&gt;&lt;BR /&gt;So, I'd recommend you to get rid of the preceding ksh and so that in %post section for example you have only /tmp/pkgpost.sh&lt;BR /&gt;&lt;BR /&gt;Hope it helps.</description>
      <pubDate>Mon, 12 Jun 2006 21:27:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804574#M23820</guid>
      <dc:creator>Alexander Chuzhoy</dc:creator>
      <dc:date>2006-06-12T21:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Redhat Linux package "rpmbuild" question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804575#M23821</link>
      <description>Hello, Alexander &lt;BR /&gt;&lt;BR /&gt;Thank you very much for the information. &lt;BR /&gt;&lt;BR /&gt;The issue I have is that the shell scripts for pre, post are very long, if I put them into the "pkg.spec" file, it would make the spec file too long to read &amp;amp; throubleshooting. &lt;BR /&gt;&lt;BR /&gt;I would think I can use seperate shell scripts, just not sure how to integrate them into the spec file. I went through some Linux package docs, none of them mentions it. Any recommendations?&lt;BR /&gt;&lt;BR /&gt;Thanks again.</description>
      <pubDate>Tue, 13 Jun 2006 11:00:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804575#M23821</guid>
      <dc:creator>Allison1</dc:creator>
      <dc:date>2006-06-13T11:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: Redhat Linux package "rpmbuild" question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804576#M23822</link>
      <description>The method you used was correct, assuming these files existed at this point (which they wouldn't in %pre, but possibly in %post).&lt;BR /&gt;&lt;BR /&gt;I think what Alexander was mentioning was that most systems don't have 'ksh' installed on them.&lt;BR /&gt;&lt;BR /&gt;For %pre, try to cut it down to the essentials, and put it in the SPEC file directly.&lt;BR /&gt;&lt;BR /&gt;For the %post, you can do basically anything you want, as you can include any files you want in the RPM it's self.</description>
      <pubDate>Tue, 13 Jun 2006 15:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804576#M23822</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2006-06-13T15:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Redhat Linux package "rpmbuild" question</title>
      <link>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804577#M23823</link>
      <description>rpm should NOT call external scripts, for the simple reasons that this would be a MAJOR security risk. How can you be sure that the script that will be run is indeed the script that YOU want to be run, and not a fake one with the same name ?&lt;BR /&gt;&lt;BR /&gt;I strongly suggest to read the wiki pages located here:&lt;A href="http://fedoraproject.org/wiki/Packaging/Guidelines" target="_blank"&gt;http://fedoraproject.org/wiki/Packaging/Guidelines&lt;/A&gt;</description>
      <pubDate>Wed, 14 Jun 2006 01:56:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/redhat-linux-package-quot-rpmbuild-quot-question/m-p/3804577#M23823</guid>
      <dc:creator>Manuel Wolfshant</dc:creator>
      <dc:date>2006-06-14T01:56:08Z</dc:date>
    </item>
  </channel>
</rss>

