public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Daisuke Fujimura <booleanlabel@gmail.com>
To: cygwin-apps@cygwin.com
Subject: Re: [ITA] ruby 3.2.2
Date: Sat, 22 Apr 2023 21:04:27 +0900	[thread overview]
Message-ID: <CAA3frXQx4SK=N+zvJLErTkO9pffDwfTF9qC=oViRBPjGWvoagQ@mail.gmail.com> (raw)
In-Reply-To: <f7c299bc-31c0-f481-d737-da44a050383e@dronecode.org.uk>

[-- Attachment #1: Type: text/plain, Size: 5214 bytes --]

> >>>> Are you planning to adopt also the ruby-* sub-packages ?

I intend to do that.


> > 2. Modify cygport and release it.
> >      - Add code to detect dependencies on `ruby_xy`.
> >      - It is similar to the process for `perl5_xy0`.
> >          - https://github.com/cygwin/cygport/blob/0.36.2/lib/pkg_info.cygpart#L442
> >          - https://github.com/cygwin/cygport/blob/0.36.2/lib/pkg_info.cygpart#L639
>
> Yes.
>
> I'm not asking you to do this work though, unless you really feel like it :)

Please review the attached diff.


> >      - Add `ruby_PROVIDES="ruby_${${VERSION%.*}//./}"` to ruby.cygport.

```
/tmp/cygport-ruby/ruby.cygport: line 49: ${${VERSION%.*}//./}: bad substitution
```

Is the warning being displayed because $VERSION (=3.2.2) starts with a number?


On Sat, Apr 22, 2023 at 5:06 AM Jon Turney <jon.turney@dronecode.org.uk> wrote:
>
> On 21/04/2023 20:36, Daisuke Fujimura via Cygwin-apps wrote:
> > Thank you for your review.
> >
> > Based on your review, I understand that the following steps are necessary.
> >
> > Could you please let me know if it is correct?
> >
> > 1. Release `ruby-2.6.4-2`.
> >      - Add `ruby_PROVIDES="ruby_${${VERSION%.*}//./}"` to ruby.cygport.
> >      - The value of this variable will be `ruby_26`.
> >      - `provides: ruby_26` is added to `ruby-2.6.4-2.hint`.
>
> This isn't needed.  I've retroactively modified the existing 2.6.4-1 and
> 2.6.3-1 packages to have this provide.
>
> > 2. Modify cygport and release it.
> >      - Add code to detect dependencies on `ruby_xy`.
> >      - It is similar to the process for `perl5_xy0`.
> >          - https://github.com/cygwin/cygport/blob/0.36.2/lib/pkg_info.cygpart#L442
> >          - https://github.com/cygwin/cygport/blob/0.36.2/lib/pkg_info.cygpart#L639
>
> Yes.
>
> I'm not asking you to do this work though, unless you really feel like it :)
>
> > 3. Rebuild `ruby-*` subpackages.
>
> Again, this isn't needed as I can retroactively modify existing packages.
>
> >      - The new cygport adds `depends: ruby_26` to the hint.
>
> I've retroactively added this to the packages listed below, which
> install into /usr/lib/ruby/vendor_ruby/2.6/ a .so linked to cygruby260.dll:
>
> >      - (Question) Does a gem that has no dependencies on `cygruby*.dll`
> > need to rebuild?
>
> I don't really know enough about ruby to answer that question, but
> I don't think so.
>
> > 4. Release `ruby-3.2.2-1`.
> >      - The value of `provides` becomes `ruby_32`.
> >      - Packages that depend on `ruby_26` will no longer be installable.
> > 5. Rebuild `ruby-*` subpackages.
> >      - The rebuild adds `depends: ruby_32` to the hint.
>
> Yes.
>
> The idea is that this will ensures that packages which are installed
> together will work together, going forwards.
>
> > On Fri, Apr 21, 2023 at 1:13 AM Jon Turney wrote:
> >> On 20/04/2023 11:50, Jon Turney via Cygwin-apps wrote:
> >>> On 20/04/2023 04:28, Marco Atzeri via Cygwin-apps wrote:
> >>>> On 20.04.2023 00:42, Daisuke Fujimura via Cygwin-apps wrote:
> >>>>> Hello,
> >>>>>
> >>>>> ====
> >>>>>
> >>>>> Cygportfile:
> >>>>> -
> >>>>> https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/playground.git;a=shortlog;h=refs/heads/ruby
> >>>>>
> >>
> >> Looks fine. Thanks very much for updating this!
> >>
> >>>>> Packages, logs:
> >>>>> - https://github.com/cygwin/scallywag/actions/runs/4743191979
> >>>>
> >>>>
> >>>> all yours
> >>>>
> >>>> Are you planning to adopt also the ruby-* sub-packages ?
> >>>>
> >>>> Regards
> >>>> Marco
> >>>
> >>> I have a concern about how this changes a soversioned dll inside the
> >>> package (from cygruby260.dll to cygruby320.dll)
> >>>
> >>> I don't know if there's anything linked against this DLL (perhaps ruby
> >>> bindings provided by other packages) which will get broken?
> >>>
> >>> Please hold off on uploading this until I have a chance to look into
> >>> that issue a bit more.
> >> It seems we have a handful of ruby binding packages, which install a .so
> >> file into /usr/lib/ruby/vendor_ruby/2.6/ which is linked against
> >> cygruby260.dll:
> >>
> >> ruby-gv
> >> ruby-marisa
> >> ruby-openbabel
> >> ruby-openwsman
> >> ruby-solv
> >> ruby-xapian
> >> ruby-zinnia
> >> subversion-ruby
>
> ruby-caca also belongs on this list, but the ruby binding hasn't been
> rebuilt since ruby 2.3.0
>
> Additionally, there are some packages which install a .so into
> /usr/lib/gems/ruby/2.6/, which probably need similar treatment?
>
> >> (There might also be some other packages which link with that dll to
> >> embed the ruby interpreter or something, but those are harder for me to
> >> identify quickly...)
> >>
> >> I think this can be handled in the same way as perl, i.e. add something
> >> like "ruby_PROVIDES=ruby_${${VERSION%.*}//./}" to ruby.cygport, and add
> >> a mechanism to cygport to make the binding packages have an additional
> >> dependency on that provide.
> >>
> >> I'll look into retroactively adding this to the existing ruby 2.6.x
> >> packages, to prevent non-working combinations of packages getting installed.

[-- Attachment #2: pkg_info.cygpart.diff --]
[-- Type: application/octet-stream, Size: 1831 bytes --]

diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index b9022d73..37cfa676 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -81,7 +81,7 @@ __list_deps() {
 	local mldep mldir mllib
 	local phpdep phpmoddir pldep pldirs plver
 	local pydep pydirs pyexts pyscr pysite pyver
-	local rbdep rbdirs gemdir gemextdir gemspecdir
+	local rbdep rbdirs rbver gemdir gemextdir gemspecdir
 	local tcldep tclpkgs vapidep vapidir
 	local tcgcclibdir tcgccsysroot
 	local dlltool="dlltool"
@@ -599,6 +599,19 @@ for suffix, mode, type in imp.get_suffixes(): print(suffix)')
 		done
 	fi
 
+	rbver=( $(find "${@//^_^/ }" -path "usr/*/ruby/vendor_ruby/[0-9].[0-9]/*" \
+	        | sed -E 's!usr/.*/ruby/vendor_ruby/([0-9]).([0-9])/.*!ruby_\1\2!' \
+	        | sort -ru) )
+	if [ "${#rbver[@]}" -gt 1 ]
+	then
+		warning "More than one targeted Ruby version: ${rbver[*]},"
+		warning "using only the latest as dependency: ${rbver[0]}."
+	fi
+	if [ "${#rbver[@]}" -gt 0 ] && [ "${PN}" != "ruby" ]
+	then
+		echo "${rbver[0]}"
+	fi
+
 	if [ $(find "${@//^_^/ }" -path 'usr/share/doc/*' -prune \
 		${deps_prune} \
 		-o -path 'usr/share/help/*' -prune \
@@ -637,6 +650,7 @@ for suffix, mode, type in imp.get_suffixes(): print(suffix)')
 	alldeps+=" "$(find "${@//^_^/ }" -type l | xargs -r readlink -f)
 
 	# add perl5_0xy requirement if linked with cygperl5_xy.dll
+	# add ruby_xy requirement if linked with cygrubyxy0.dll
 	for dll in $(echo ${alldeps} | tr \\n ' ' ) ; do
 	    case "${dll##*/}" in
 		cygperl5_[0-9][0-9].dll)
@@ -644,6 +658,11 @@ for suffix, mode, type in imp.get_suffixes(): print(suffix)')
 		    plver="${plver%%.dll}"
 		    echo "perl5_0${plver}"
 		    ;;
+		cygruby[0-9][0-9]0.dll)
+		    rbver="${dll##*cygruby}"
+		    rbver="${rbver%%0.dll}"
+		    echo "ruby_${rbver}"
+		    ;;
 	    esac
 	done
 

  reply	other threads:[~2023-04-22 12:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 22:42 Daisuke Fujimura
2023-04-20  3:28 ` Marco Atzeri
2023-04-20 10:50   ` Jon Turney
2023-04-20 16:13     ` Jon Turney
2023-04-21 19:36       ` Daisuke Fujimura
2023-04-21 20:06         ` Jon Turney
2023-04-22 12:04           ` Daisuke Fujimura [this message]
2023-04-23 13:35             ` Jon Turney
2023-04-23 23:44               ` Daisuke Fujimura
2023-04-24 20:10                 ` Jon Turney
2023-04-25  9:56                   ` Daisuke Fujimura
2023-04-25 13:52                     ` Jon Turney
2023-04-25 21:10                       ` Daisuke Fujimura
2023-04-25 22:13                         ` Jon Turney
2023-04-25 22:37                           ` Daisuke Fujimura
2023-06-08 14:38 ` [GOLDSTAR] " Jon Turney
2023-06-13 15:04   ` Andrew Schulman
2023-06-13 23:24     ` Daisuke Fujimura

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA3frXQx4SK=N+zvJLErTkO9pffDwfTF9qC=oViRBPjGWvoagQ@mail.gmail.com' \
    --to=booleanlabel@gmail.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).