What is the best way to create a symbolic link in a rpm - Redhat

This is a discussion on What is the best way to create a symbolic link in a rpm - Redhat ; What is the best way to create a symbolic link in a rpm? I created symbolic link in the %pre section in a .spec file but there is an error during installation: %pre server %{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: What is the best way to create a symbolic link in a rpm

  1. What is the best way to create a symbolic link in a rpm

    What is the best way to create a symbolic link in a rpm?

    I created symbolic link in the %pre section in a .spec file but there
    is an error during installation:

    %pre server
    %{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null || :
    %{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \
    -g sshd -M -r sshd 2>/dev/null || :
    ln -s -f /usr/lib/libcrypto.so.0 /usr/lib/libcrypto.so.2

    # rpm -Uvh app_server-server-4.9.9-9.i386.rpm
    error: failed dependencies:
    libcrypto.so.2 is needed by app_server-server-4.9.9-9

  2. Re: What is the best way to create a symbolic link in a rpm

    wong_powah@yahoo.ca wrote:
    > What is the best way to create a symbolic link in a rpm?
    >
    > I created symbolic link in the %pre section in a .spec file but there
    > is an error during installation:
    >
    > %pre server
    > %{_sbindir}/groupadd -r -g %{sshd_gid} sshd 2>/dev/null || :
    > %{_sbindir}/useradd -d /var/empty/sshd -s /bin/false -u %{sshd_uid} \
    > -g sshd -M -r sshd 2>/dev/null || :
    > ln -s -f /usr/lib/libcrypto.so.0 /usr/lib/libcrypto.so.2
    >
    > # rpm -Uvh app_server-server-4.9.9-9.i386.rpm
    > error: failed dependencies:
    > libcrypto.so.2 is needed by app_server-server-4.9.9-9


    I think you need to do the symlink in your '%install' procedures, and provide
    the link as a file in '%files' list. Also, don't use absolute links if you can
    avoid it. Use something like this:


    ln -s -f libcrypto.so.0 /usr/lib/libcrypto.so.2

    And which OS is this? Shouldn't libcrypto.so.2 be in your openssl or
    openssl-compat packages?

+ Reply to Thread