All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bruce Ashfield" <bruce.ashfield@gmail.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization] what is the state of meta-cloud-services, re: chef/puppet/ruby recipes?
Date: Tue, 5 Jan 2021 16:31:21 -0500	[thread overview]
Message-ID: <CADkTA4PCtpvTE6+GeWgPtBzMXkk9NK5pSuCjem4a3GtrAwtshw@mail.gmail.com> (raw)
In-Reply-To: <aceeb927-56eb-f93d-cdc3-9d9c3643dcdf@crashcourse.ca>

On Sat, Jan 2, 2021 at 3:07 PM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
> On Sun, 27 Dec 2020, Bruce Ashfield wrote:
>
> > No one has done much with the ruby support in quite some time, so it
> > would need work as well. I thought there was a meta-ruby floating
> > around, but I couldn't find it on the layerindex, so it looks like
> > just oe-core + some work would be required.
>
>   random thoughts after messing with various aspects of ruby for the
> last couple days.
>
>   first, would it not make sense to move the ruby.bbclass file to
> oe-core? given the fundamental nature of ruby.bbclass, it seems
> inappropriate to have it in a specialized layer like
> meta-cloud-services. if oe-core has class files related to things like
> perl and python, it would seem like ruby.bbclass belongs there as
> well.

It is a possibility, and was considered in the past. But oe-core
doesn't currently have any ruby recipes (just the toolchain), so it
isn't common enough for core. We had a lot of ruby in the openstack
world, so the extended support was created there.

>
>   also, i had to hack ruby.bbclass given the python 3 distinction
> between strings and bytes in order to get some ruby variables to be
> set properly:
>
> diff --git a/classes/ruby.bbclass b/classes/ruby.bbclass
> index 15ac9f4b..585d128d 100644
> --- a/classes/ruby.bbclass
> +++ b/classes/ruby.bbclass
> @@ -26,7 +26,7 @@ def get_rubyversion(p):
>      version = subprocess.Popen([cmd, "--version"],
> stdout=subprocess.PIPE).communicate()[0]
>
>      r = re.compile("ruby ([0-9]+\.[0-9]+\.[0-9]+)*")
> -    m = r.match(version)
> +    m = r.match(version.decode("utf-8"))
>      if m:
>          found_version = m.group(1)
>
> @@ -44,6 +44,7 @@ def get_rubygemslocation(p):
>         return found_loc
>
>      loc = subprocess.Popen([cmd, "env"], stdout=subprocess.PIPE).communicate()[0]
> +    loc = loc.decode("utf-8")
>
>      r = re.compile(".*\- (/usr.*/ruby/gems/.*)")
>      for line in loc.split('\n'):
>
>   i'm sure there's a cleaner way to do that ... i can submit that, but
> i'm not sure which ML to give it to.

The change should be good enough, that's the typical python3.x technique.

This is the right mailing list for any changes.

Bruce

>
>   in any event, i'm still beating up on ruby, and it would be nice to
> formalize how to get this organized.
>
> rday



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II

      reply	other threads:[~2021-01-05 21:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-26 18:28 what is the state of meta-cloud-services, re: chef/puppet/ruby recipes? Robert P. J. Day
2020-12-27 19:20 ` [meta-virtualization] " Bruce Ashfield
2021-01-02 14:20   ` Robert P. J. Day
2021-01-05 21:27     ` Bruce Ashfield
2021-01-02 20:07   ` Robert P. J. Day
2021-01-05 21:31     ` Bruce Ashfield [this message]

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=CADkTA4PCtpvTE6+GeWgPtBzMXkk9NK5pSuCjem4a3GtrAwtshw@mail.gmail.com \
    --to=bruce.ashfield@gmail.com \
    --cc=meta-virtualization@lists.yoctoproject.org \
    --cc=rpjday@crashcourse.ca \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.