Results 1 to 9 of 9

Thread: How to fix RPMLINT W: suse-missing-rclink

  1. #1
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    248

    Default How to fix RPMLINT W: suse-missing-rclink

    Code:
    replay-sorcery.x86_64: W: suse-missing-rclink replay-sorcery-kms
    The package contains an init script or systemd service file but lacks the
    symlink /usr/sbin/rcFOO -> /usr/sbin/service
    Hi, I got the warning for my replay-sorcery package.
    https://build.opensuse.org/package/s...replay-sorcery

    I'm not sure what I suppose to do. Do I ln -s something?

    Thanks.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,728
    Blog Entries
    15

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Quote Originally Posted by andythe_great View Post
    Code:
    replay-sorcery.x86_64: W: suse-missing-rclink replay-sorcery-kms
    The package contains an init script or systemd service file but lacks the
    symlink /usr/sbin/rcFOO -> /usr/sbin/service
    Hi, I got the warning for my replay-sorcery package.
    https://build.opensuse.org/package/s...replay-sorcery

    I'm not sure what I suppose to do. Do I ln -s something?

    Thanks.
    Hi
    Yes

    Code:
    pushd %{buildroot}%{_sbindir}
    ln -s service rcreplay-sorcery
    popd
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    248

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Quote Originally Posted by malcolmlewis View Post
    Hi
    Yes

    Code:
    pushd %{buildroot}%{_sbindir}
    ln -s service rcreplay-sorcery
    popd
    Hi,

    I could not figured out where to put this macro.
    I always get this.
    Code:
    /usr/sbin: No such file or directory
    
    I tried placing it under cmake_build, pre, post, preun, postun, same error.

    I reduce it to
    pushd %{_sbindir}
    ln -s service rcreplay-sorcery-kms
    popd

    and put it above %files and it work.

    However, I got another error.
    It said file already exist, but still complain.
    What do I do?
    [ 32s] ... running 98-revert-uname-hack
    [ 32s] ... running 99-check-remove-rpms
    [ 32s] ... removing all built rpms
    [ 32s] (order: reverse replay-sorcery)
    [ 32s] /usr/sbin /
    [ 32s] ln: failed to create symbolic link 'rcreplay-sorcery-kms': File exists
    [ 32s] /
    [ 32s]
    [ 32s] RPMLINT report:
    [ 32s] ===============
    [ 32s] replay-sorcery.x86_64: W: suse-missing-rclink replay-sorcery-kms
    [ 32s] The package contains an init script or systemd service file but lacks the
    [ 32s] symlink /usr/sbin/rcFOO -> /usr/sbin/service
    [ 32s]
    [ 32s] 2 packages and 0 specfiles checked; 0 errors, 1 warnings.

    Last edited by malcolmlewis; 23-Jul-2021 at 13:23.

  4. #4
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,728
    Blog Entries
    15

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Hi
    In the %install section
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  5. #5
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    248

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Quote Originally Posted by malcolmlewis View Post
    Hi
    In the %install section
    Hi,

    I add it like this.
    Code:
    %install
    %cmake_install
    
    pushd %{_sbindir}
    ln -s service rcreplay-sorcery-kms
    popd
    But I got this.
    [ 14s] make: Leaving directory '/home/abuild/rpmbuild/BUILD/ReplaySorcery-0.6.0/build'
    [ 14s] + pushd /usr/sbin
    [ 14s] /usr/sbin ~/rpmbuild/BUILD/ReplaySorcery-0.6.0
    [ 14s] + ln -s service rcreplay-sorcery-kms
    [ 14s] ln: failed to create symbolic link 'rcreplay-sorcery-kms': Permission denied
    [ 14s] error: Bad exit status from /var/tmp/rpm-tmp.cVaCSa (%install)



  6. #6
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    31,728
    Blog Entries
    15

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Hi
    You missed the %{buildroot} from the pushd part...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  7. #7
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    248

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Quote Originally Posted by malcolmlewis View Post
    Hi
    You missed the %{buildroot} from the pushd part...
    Hi,

    I got the same error as before.

    Code:
    [   14s] + pushd /home/abuild/rpmbuild/BUILDROOT/replay-sorcery-0.6.0-0.x86_64/usr/sbin 
    [   14s] /var/tmp/rpm-tmp.YhHhKa: line 36: pushd: /home/abuild/rpmbuild/BUILDROOT/replay-sorcery-0.6.0-0.x86_64/usr/sbin: No such file or directory 
    [   14s] error: Bad exit status from /var/tmp/rpm-tmp.YhHhKa (%install)
    
    
    With this.
    Code:
    %install
    %cmake_install
    
    pushd %{buildroot}%{_bindir}
    ln -s service rcreplay-sorcery
    popd

  8. #8
    Join Date
    Sep 2012
    Posts
    6,790

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Quote Originally Posted by andythe_great View Post
    Hi,

    I got the same error as before.

    Code:
    [   14s] + pushd /home/abuild/rpmbuild/BUILDROOT/replay-sorcery-0.6.0-0.x86_64/usr/sbin
    [   14s] /var/tmp/rpm-tmp.YhHhKa: line 36: pushd: /home/abuild/rpmbuild/BUILDROOT/replay-sorcery-0.6.0-0.x86_64/usr/sbin: No such file or directory
    Is /usr/sbin created by your Makefile? If not, you need to create this directory manually, as part of %install section.

    With this.
    Code:
    %install
    %cmake_install
    
    pushd %{buildroot}%{_bindir}
    There is no way %{_bindir} can expand to /usr/sbin, so you cannot get this error with this code. For the umpteenth time - never manually write computer code and output, always copy and paste.

  9. #9
    Join Date
    Oct 2018
    Location
    Atlantis
    Posts
    248

    Default Re: How to fix RPMLINT W: suse-missing-rclink

    Quote Originally Posted by arvidjaar View Post
    Is /usr/sbin created by your Makefile? If not, you need to create this directory manually, as part of %install section.


    There is no way %{_bindir} can expand to /usr/sbin, so you cannot get this error with this code. For the umpteenth time - never manually write computer code and output, always copy and paste.
    Thanks, I mkdir and it is fix now.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •