Re: [PATCH cygport] pkg_info.cygpart: Do not detect dependencies on itself in ruby package
Using cygport-0.36.9-1 with this patch merged in, it was confirmed that a ruby-3.3.1 package could be created in the local development environment. Thank you for merging. On Mon, May 6, 2024 at 11:12 PM Jon Turney wrote: > > On 03/04/2024 15:18, Daisuke Fujimura via Cygwin-apps wrote: > > Thank you for reviewing this. > > > >> Can you clarify what the "failure" is here? > > > [...] > > > > /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file > > -- rbconfig (LoadError) > > > [...] > > Thanks very much for the detailed explanation. > > So this is an error (or warning?) generated by invoking the > not-yet-properly installed, just-built ruby in ${D}. > > I applied your patch. > > > On Sun, Mar 10, 2024 at 10:34 PM Jon Turney > > wrote: > >> > >> On 16/02/2024 12:51, Daisuke Fujimura via Cygwin-apps wrote: > >>> Attempting to create a package for ruby-3.3, but it fails when trying > >>> to detect a dependency on itself. > >> > >> Thanks for this patch. > >> > >> Can you clarify what the "failure" is here? > >> > >>> To avoid this, skip them if the target is `ruby`. > >> > >> The second hunk seems like a removes the dependency on ruby_xy for the > >> ruby package, which also provides ruby_xy. > >> > >> Historically, we've allowed self-dependencies like this, because they > >> seem to be benign, although it seems like we could do with some generic > >> code to suppress them > > ... except I added something to generically prevent a packages provides: > appearing it it's requires: >
Re: [PATCH cygport] pkg_info.cygpart: Do not detect dependencies on itself in ruby package
On 03/04/2024 15:18, Daisuke Fujimura via Cygwin-apps wrote: Thank you for reviewing this. Can you clarify what the "failure" is here? [...] /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) [...] Thanks very much for the detailed explanation. So this is an error (or warning?) generated by invoking the not-yet-properly installed, just-built ruby in ${D}. I applied your patch. On Sun, Mar 10, 2024 at 10:34 PM Jon Turney wrote: On 16/02/2024 12:51, Daisuke Fujimura via Cygwin-apps wrote: Attempting to create a package for ruby-3.3, but it fails when trying to detect a dependency on itself. Thanks for this patch. Can you clarify what the "failure" is here? To avoid this, skip them if the target is `ruby`. The second hunk seems like a removes the dependency on ruby_xy for the ruby package, which also provides ruby_xy. Historically, we've allowed self-dependencies like this, because they seem to be benign, although it seems like we could do with some generic code to suppress them ... except I added something to generically prevent a packages provides: appearing it it's requires:
Re: [PATCH cygport] pkg_info.cygpart: Do not detect dependencies on itself in ruby package
Thank you for reviewing this. > Can you clarify what the "failure" is here? ruby.cygport and its CI results are as follows. - https://cygwin.com/cgit/cygwin-packages/ruby/commit/?id=65af41c137b45d09614ea99f78d7a4818b1bdfb1 - https://github.com/cygwin/scallywag/actions/runs/7580195232/job/20645744555#step:6:22939 ``` >>> Creating source package ruby-3.3.0-1.src/ ruby-3.3.0-1.src/2.0.0-cygwin-configure.patch ruby-3.3.0-1.src/2.0.0-cygwin-rubygems.patch ruby-3.3.0-1.src/2.5.1-win32-resolv.patch ruby-3.3.0-1.src/9357.patch ruby-3.3.0-1.src/ruby-2.1.0-always-use-i386.patch ruby-3.3.0-1.src/ruby-2.1.0-custom-rubygems-location.patch ruby-3.3.0-1.src/ruby-2.1.0-Enable-configuration-of-archlibdir.patch ruby-3.3.0-1.src/ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch ruby-3.3.0-1.src/ruby-2.3.0-ruby_version.patch ruby-3.3.0-1.src/ruby-3.3.0-Disable-syntax-suggest-test-case.patch ruby-3.3.0-1.src/ruby-3.3.0.tar.gz ruby-3.3.0-1.src/ruby-3.4.0-ruby-net-http-Renew-test-certificates.patch ruby-3.3.0-1.src/ruby.cygport /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' >>> ruby requires: cygwin libcrypt2 libffi8 libgcc1 libgmp10 libssl3 libyaml0_2 >>> ruby_33 zlib0 ca-certificates /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' >>> ruby-devel requires: pkg-config ruby ruby_33 libcrypt-devel libgmp-devel /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' /usr/share/rubygems/rubygems.rb:8:in `require': cannot load such file -- rbconfig (LoadError) from /usr/share/rubygems/rubygems.rb:8:in `' from :2:in `require' from :2:in `' >>> ruby-doc requires: >>> ruby-tcltk requires: ruby-tk >>> Testing ruby-3.3.0-1.x86_64 : : ``` LoadError is occurring three times because the ruby.exe used to detect dependencies in the ruby package is not /usr/bin/ruby.exe but ${D}/usr/bin/ruby.exe. - https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L562 - https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L564 - https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L565 ${D}/usr/bin/ruby.exe is used because ${D} is added to the PATH. - https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L137 As the ruby package itself does not depend on ruby-* other than its own sub-packages, we considered that lines 560~600 did not need to be executed. - https://github.com/cygwin/cygport/blob/0.36.8/lib/pkg_info.cygpart#L560-L600 As for `ruby_xy`, as pointed out, there should be no diff. On Sun, Mar 10, 2024 at 10:34 PM Jon Turney wrote: > > On 16/02/2024 12:51, Daisuke Fujimura via Cygwin-apps wrote: > > Attempting to create a package for ruby-3.3, but it fails when trying > > to detect a dependency on itself. > > Thanks for this patch. > > Can you clarify what the "failure" is here? > > > To avoid this, skip them if the target is `ruby`. > > The second hunk seems like a removes the dependency on ruby_xy for the > ruby package, which also provides ruby_xy. > > Historically, we've allowed self-dependencies like this, because they > seem to be benign, although it seems like we could do with some generic > code to suppress them > > (e.g. cygport also ends up generating cygwin-debuginfo with a dependency > on itself, which is harmless but could be suppressed) >
Re: [PATCH cygport] pkg_info.cygpart: Do not detect dependencies on itself in ruby package
On 16/02/2024 12:51, Daisuke Fujimura via Cygwin-apps wrote: Attempting to create a package for ruby-3.3, but it fails when trying to detect a dependency on itself. Thanks for this patch. Can you clarify what the "failure" is here? To avoid this, skip them if the target is `ruby`. The second hunk seems like a removes the dependency on ruby_xy for the ruby package, which also provides ruby_xy. Historically, we've allowed self-dependencies like this, because they seem to be benign, although it seems like we could do with some generic code to suppress them (e.g. cygport also ends up generating cygwin-debuginfo with a dependency on itself, which is harmless but could be suppressed)
[PATCH cygport] pkg_info.cygpart: Do not detect dependencies on itself in ruby package
Attempting to create a package for ruby-3.3, but it fails when trying to detect a dependency on itself. To avoid this, skip them if the target is `ruby`. pkg_info-for-ruby.diff Description: Binary data