Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 818769 - www-servers/nginx-unit: ruby plugin upgrade?
Summary: www-servers/nginx-unit: ruby plugin upgrade?
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Ruby Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-18 04:25 UTC by Anton Bolshakov
Modified: 2023-01-18 05:54 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2021-10-18 04:25:00 UTC
Hello,

I'm migrating my system to ruby 2.7 and was wondering how nginx-unit would handle it. It seems that it does not detect a new version:

ldd /usr/lib64/nginx-unit/ruby.unit.so
        linux-vdso.so.1 (0x00007fff3d5d7000)
        libruby26.so.2.6 => /usr/lib64/libruby26.so.2.6 (0x00007f78084aa000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f7808369000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f78081af000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f7808195000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f7808175000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f780816b000)
        libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f78080ef000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f78080e9000)
        libcrypt.so.2 => /lib64/libcrypt.so.2 (0x00007f78080ae000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f78087c3000)

As you can see, it is still compiled against "libruby26".
Is any way to change the ebuild, so portage could detect a new ruby?
Thanks

emerge --info
Portage 3.0.20 (python 3.9.7-final-0, default/linux/amd64/17.1/hardened, gcc-11.2.0, glibc-2.33-r1, 5.14.8-pentoo x86_64)
=================================================================
System uname: Linux-5.14.8-pentoo-x86_64-Intel-R-_Core-TM-_i7-10750H_CPU_@_2.60GHz-with-glibc2.33
KiB Mem:    16303260 total,   1972116 free
KiB Swap:    8388604 total,   8386044 free
Timestamp of repository gentoo: Sun, 17 Oct 2021 23:45:01 +0000
Head commit of repository gentoo: 332d132bf226d187bf06c3ae4218c4266a596a6d
Head commit of repository pentoo: 78fdf42792778363b60f31d347de82a5d53d6675

Timestamp of repository steam-overlay: Thu, 14 Oct 2021 22:36:20 +0000
Head commit of repository steam-overlay: cc01859eea8d1fa353e7048b0a934a3ab34979ba

sh bash 5.1_p8
ld GNU ld (Gentoo 2.37_p1 p0) 2.37
app-shells/bash:          5.1_p8::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.34.0-r3::gentoo
dev-lang/python:          3.9.7_p1::gentoo
dev-lang/rust-bin:        1.53.0::gentoo
dev-util/cmake:           3.20.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.43.5-r1::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.71-r1::gentoo
sys-devel/automake:       1.13.4-r2::gentoo, 1.16.4::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc:            11.2.0::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r1::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync2.au.gentoo.org/gentoo-portage/
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

localrepo
    location: /var/db/repos/localrepo
    masters: gentoo

pentoo
    location: /var/db/repos/pentoo-overlay
    sync-type: git
    sync-uri: https://github.com/pentoo/pentoo-overlay
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /etc/stunnel/stunnel.conf /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/unifi"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs compress-build-logs config-protect-if-modified distlocks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://ftp.iij.ad.jp/pub/linux/gentoo/"
INSTALL_MASK="*.la"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0"
LINGUAS="en ru"
MAKEOPTS="-j12"
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-18 04:29:52 UTC
The dependency needs to be fixed, I think:
>dev-lang/ruby:*
>dev-ruby/rubygems:*

That first one needs to become := to be rebuilt.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-18 04:49:00 UTC
(In reply to Sam James from comment #1)
> The dependency needs to be fixed, I think:
> >dev-lang/ruby:*
> >dev-ruby/rubygems:*
> 
> That first one needs to become := to be rebuilt.

(and/or use some ruby eclass)
Comment 3 Larry the Git Cow gentoo-dev 2021-10-18 16:28:14 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75bb38fbd309593497e946c222c2a8359eb1daf7

commit 75bb38fbd309593497e946c222c2a8359eb1daf7
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2021-10-18 16:28:05 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2021-10-18 16:28:05 +0000

    www-servers/nginx-unit: Rebuild with new ruby when detected
    
    Closes: https://bugs.gentoo.org/818769
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 www-servers/nginx-unit/nginx-unit-1.25.0-r2.ebuild | 91 ++++++++++++++++++++++
 1 file changed, 91 insertions(+)
Comment 4 Anton Bolshakov 2021-10-22 05:32:00 UTC
I haven't tried the fix, but pretty sure it won't work.
The ruby is slotted, it could be two versions of ruby in the system.
Ideally, it should be two binaries provided by nginx-unit for both versions (if any).

As a workaround, you could introduce USE_RUBY, but again, it won't handle ruby slots.

Also, a similar problem was solved in the following bug:
https://bugs.gentoo.org/687762
FYI.

Regards,
Anton
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-10-22 05:41:10 UTC
(In reply to Anton Bolshakov from comment #4)
> I haven't tried the fix, but pretty sure it won't work.

I think it's possible it may not work how one would expect, but := guarantees it'll get rebuilt if a new slot appears. The issue is that you can't _pick which_ right now.

Please do try it and let us know. Not disagreeing because I think a ruby eclass solution may be needed here (but not sure if the right one exists for this).
Comment 6 Anton Bolshakov 2021-10-22 06:11:36 UTC
Just an idea:
Use 'ruby-single' eclass, detect ruby using  'ruby_get_use_implementations' (see bug #687762) and specify a correct ruby module in the configure script:

./configure ruby --help

    --ruby=FILE    set ruby executable, default: ruby
    --module=NAME  set unit ruby module name

Something like --ruby=/usr/bin/ruby27 --module=ruby27.
Comment 7 Mike Pagano gentoo-dev 2021-10-22 11:19:52 UTC
Ruby project, if you think this can be fixed in the eclass, please review. Otherwise feel free to close
Comment 8 Anton Bolshakov 2023-01-18 05:54:45 UTC
FYI, it might be possible to fix it using app-alternatives.

Currently, ruby27 and ruby30 are both enabled by default.
So the server would stop working if user would switch to ruby30.