Linux

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • How to define symbolic links within a RPM spec file...

    5 answers - 957 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hello All,
    I am very new to the world of RPM and was wondering if anyone could tell
    me if there is a way to allow the RPM to create softlinks to my
    installed files. Currently I handle the creation and deletion of my
    softlinks within my %post, and %postun scripting sections:
    %post
    Symbolic link Creation
    # Create symbolic links to files
    ln -f -s /opt/test/bin/testfile1 /usr/local/bin
    ln -f -s /opt/test/sbin/testfile2 /usr/local/bin
    %postun
    Deletion of Symbolic links
    rm -f /usr/local/bin/testfile1
    rm -f /usr/local/bin/testfile2
    Basically, I am wondering if there is some way within the *.spec to
    define symbolic links in a way that the RPM handles the creation rather
    than relying on my manual %post and %postun script actions.
    Any help would be greatly appreciated.
    Best Regards,
    -Jim
    Rpm-list mailing list
    Rpm-list (AT) redhat (DOT) com
  • No.1 | | 472 bytes | |

    July 25, 2005 5:09:31 PM -0400 "James Welch (jimwelc)" <jimwelc (AT) cisco (DOT) comwrote:
    Basically, I am wondering if there is some way within the *.spec to
    define symbolic links in a way that the RPM handles the creation rather
    than relying on my manual %post and %postun script actions.

    Create the symlinks in the %install section? did you mean something else.
    -frank

    Rpm-list mailing list
    Rpm-list (AT) redhat (DOT) com
  • No.2 | | 703 bytes | |

    Mon, Jul 25, 2005 at 05:09:31PM -0400, James Welch (jimwelc) wrote:
    Basically, I am wondering if there is some way within the *.spec to
    define symbolic links in a way that the RPM handles the creation rather
    than relying on my manual %post and %postun script actions.

    Sure -- just create them in your BuildRoot area in your %install section
    like you would any other file. Remember that symlinks are just special files
    that contain the name of what they're pointing to. (Just make sure to make
    any relative symlinks based on the final real location, not the BuildRoot
    one.)

    Also, remember that creating files in /usr/local is generally considered bad
    RPM form.
  • No.3 | | 285 bytes | |

    Monday, July 25, 2005 5:13 PM -0400 Matthew Miller <mattdm (AT) mattdm (DOT) org
    wrote:
    Also, remember that creating files in /usr/local is generally considered
    bad RPM form.
    <>
    Rpm-list mailing list
    Rpm-list (AT) redhat (DOT) com
  • No.4 | | 463 bytes | |

    Mon, Jul 25, 2005 at 07:35:31PM -0700, Kenneth Porter wrote:
    >Also, remember that creating files in /usr/local is generally considered
    >bad RPM form.

    <>

    Your rpm should say instead of

    And, arguably, Fedora's "site_perl" should be defined as
    /usr/local/lib/perl5/site_perl. I think there's a bug for that in the RH
    bugzilla. And yeah, there should be a "vendor" man page area somewhere.
  • No.5 | | 672 bytes | |

    Kenneth Porter wrote:
    Matthew Miller wrote:
    >Also, remember that creating files in /usr/local is generally considered
    >bad RPM form.


    Agreed. It is reserved for local system use.

    <>

    The problem is that often people start out creating something for
    local use but then start distributing it. Arguably as soon as you
    start distributing your rpm then you become a vendor. So might as
    well plan for it from the beginning. But as long as you are only
    using it yourself then putting files in /usr/local is fine.

    Bob

    Rpm-list mailing list
    Rpm-list (AT) redhat (DOT) com

Re: How to define symbolic links within a RPM spec file...


max 4000 letters.
Your nickname that display:
In order to stop the spam: 2 + 1 =
QUESTION ON "Linux"

EMSDN.COM