librelist archives

« back to archive

Call for some ubuntu folks for some testing of the new curl installer.

Call for some ubuntu folks for some testing of the new curl installer.

From:
James Gifford
Date:
2012-01-06 @ 22:49
Heya folks!

So, after some work, a few cups of tea and a few headaches, I have
something ready.


Instructions:

First, you need 11.04 or 11.10 - as far as I know, this won't work in
10.04 or 10.10.

Second, you need to install two things before you can run the script,
arkose and curl.

Arkose is a application sandbox that you can get along without, but
since I'm not 150% sure if this'll work without a hitch, I highly
recommend you use it.

Curl is... well, curl.
to install them:

sudo apt-get install curl arkose -y

Second, if you use rvm/rbenv, I recommend creating a new user (with
access to the admin/sudo group) - since this does some funky things
with a system wide rvm install, a user version will really screw
things up.

Then, start the sandbox with this:
sudo arkose -n -h -c "cd $PWD; $SHELL"

run `hostname` in the shell just to make sure you're in the sandbox -
should show something like this:

arkose-tmpdxeIat

Ok, you're now in the sandbox, and it's "safe".

If you want to inspect the script beforehand, it's over here:

https://gist.github.com/1567370

Next, run the following:

curl 
https://raw.github.com/gist/1567370/d58ad3994624e8bb6bddc0d67256a7f763b2e7b5/install-shoes.sh
| sudo sh

If you run into any errors, put them in a gist/pastebin with your
system arch (32 or 64) and then reply to this email.
Once its done (and it will take a long time, took me almost 40
minutes), run `/opt/shoes/shoes` in your terminal, and you should see
shoes run.
:)

Re: [shoes] Call for some ubuntu folks for some testing of the new curl installer.

From:
Cecil Coupe
Date:
2012-01-07 @ 01:34
James,

  I haven't tried your script but I did look at it after reading your
warning about rvm. On my system 

> ccoupe@twb:~/Projects/shoes3.1$ which rvm
> /home/ccoupe/.rvm/bin/rvm

Which means I'd have to install rvm on my sandboxed user because I
don't want a system wide rvm.  You might want to apt-get the developer tools
because I'm not sure base Ubuntu includes everything needed to build
ruby but maybe thats old memory. 

One other suggestion, I put my compiled stuff in /usr/local instead of /opt. 
You could query the script user where they want it.

It is a good start. If there was a way to detect apt-get systems vs
fedora package management at the top of the script then you could use
the whatever package management commands they need.

Nice start.
On Fri, 2012-01-06 at 17:49 -0500, James Gifford wrote:
> Heya folks!
> 
> So, after some work, a few cups of tea and a few headaches, I have
> something ready.
> 
> 
> Instructions:
> 
> First, you need 11.04 or 11.10 - as far as I know, this won't work in
> 10.04 or 10.10.
> 
> Second, you need to install two things before you can run the script,
> arkose and curl.
> 
> Arkose is a application sandbox that you can get along without, but
> since I'm not 150% sure if this'll work without a hitch, I highly
> recommend you use it.
> 
> Curl is... well, curl.
> to install them:
> 
> sudo apt-get install curl arkose -y
> 
> Second, if you use rvm/rbenv, I recommend creating a new user (with
> access to the admin/sudo group) - since this does some funky things
> with a system wide rvm install, a user version will really screw
> things up.
> 
> Then, start the sandbox with this:
> sudo arkose -n -h -c "cd $PWD; $SHELL"
> 
> run `hostname` in the shell just to make sure you're in the sandbox -
> should show something like this:
> 
> arkose-tmpdxeIat
> 
> Ok, you're now in the sandbox, and it's "safe".
> 
> If you want to inspect the script beforehand, it's over here:
> 
> https://gist.github.com/1567370
> 
> Next, run the following:
> 
> curl 
https://raw.github.com/gist/1567370/d58ad3994624e8bb6bddc0d67256a7f763b2e7b5/install-shoes.sh
> | sudo sh
> 
> If you run into any errors, put them in a gist/pastebin with your
> system arch (32 or 64) and then reply to this email.
> Once its done (and it will take a long time, took me almost 40
> minutes), run `/opt/shoes/shoes` in your terminal, and you should see
> shoes run.
> :)

Re: [shoes] Call for some ubuntu folks for some testing of the new curl installer.

From:
James Gifford
Date:
2012-01-07 @ 02:05
> James,
>
>  I haven't tried your script but I did look at it after reading your
> warning about rvm. On my system
>
>> ccoupe@twb:~/Projects/shoes3.1$ which rvm
>> /home/ccoupe/.rvm/bin/rvm
>
> Which means I'd have to install rvm on my sandboxed user because I
> don't want a system wide rvm.  You might want to apt-get the developer tools
> because I'm not sure base Ubuntu includes everything needed to build
> ruby but maybe thats old memory.

The script installs all needed dependencies - they are pulled in via
the ruby-rvm package - thats also why you need to remove your other
RVM, otherwise things don't work.

I guess at this point, the question has to be asked "Do we want to
distribute this via the package manager in the future?" - right now, i
think the answer is yet. Otherwise, I'd go right ahead and hack
something together with normal userland RVM, but I'd like to have
Steve weigh in on that, and preferably someone with more Linux
experience then I do... (Steve?)

> One other suggestion, I put my compiled stuff in /usr/local instead of /opt.
> You could query the script user where they want it.

Eventually, yes that could be on the roadmap. However, right now, I'm
following the hier manpage, which states:

        /opt   This  directory  should  contain  add-on  packages  that contain
               static files.

http://manpages.ubuntu.com/manpages/gutsy/man7/hier.7.html

> It is a good start. If there was a way to detect apt-get systems vs
> fedora package management at the top of the script then you could use
> the whatever package management commands they need.

Eventually, I want to do something rails-ready style with recipes and
stuff. https://github.com/joshfng/railsready

> Nice start.

Thanks!

Re: [shoes] Call for some ubuntu folks for some testing of the new curl installer.

From:
Cecil Coupe
Date:
2012-01-07 @ 03:55
On Fri, 2012-01-06 at 21:05 -0500, James Gifford wrote:
> > James,
> >
> >  I haven't tried your script but I did look at it after reading your
> > warning about rvm. On my system
> >
> >> ccoupe@twb:~/Projects/shoes3.1$ which rvm
> >> /home/ccoupe/.rvm/bin/rvm
> >
> > Which means I'd have to install rvm on my sandboxed user because I
> > don't want a system wide rvm.  You might want to apt-get the developer tools
> > because I'm not sure base Ubuntu includes everything needed to build
> > ruby but maybe thats old memory.
> 
> The script installs all needed dependencies - they are pulled in via
> the ruby-rvm package - thats also why you need to remove your other
> RVM, otherwise things don't work.

My bad for missing the ruby-rvm package (11.04 synaptic doesn't know
about it, BTW)

Do we really want to modify the users system directories and
configuration with sudo level manipulations and rvm installs just to run
a shoes script? I get kind of squishing thinking about the unintended
damage that could do. What if they have a app that needs 1.8.7 (I
*think* there are a few so the rvm set default is not a good idea) 

Why not create a .deb that doesn't need RVM? Include your chosen ruby
1.9.[1|2|3] source code which gets built properly (an issue for fun
debugging) for Shoes' needs in someplace out of the $PATH and deleted
after Shoes gets built and installed

Or you could use the disfigured update-alternatives hack that ubuntu
offers to manage multiple versions (it does work for multiple rubies).
It's like a system wide rvm but it sucks the ubuntu way. Then fix the
Shoes rakefile to detect that the suckiness of update-alternatives is
active and it does the right thing to build and install shoes (and an
icon in the Applications->Programming menu and then your script restores
the users ruby default version 


> http://manpages.ubuntu.com/manpages/gutsy/man7/hier.7.html

gutsy was a long time ago. On the 11.10 page the description
of /usr/local  would also apply. This is an old issue, dating back to
Solaris and GNU/FSF days of infighting and made worse by some apple
third party package managers (cough fink). Shoes should stay above that.
Pick what ever the user has in $PATH and if neither, offer them a
choice.
> 
> > It is a good start. If there was a way to detect apt-get systems vs
> > fedora package management at the top of the script then you could use
> > the whatever package management commands they need.
> 
> Eventually, I want to do something rails-ready style with recipes and
> stuff. https://github.com/joshfng/railsready

Why would to want to configure grandma's Ubuntu so radically just to
write or run a shoes script.

Re: [shoes] Call for some ubuntu folks for some testing of the new curl installer.

From:
James Gifford
Date:
2012-01-07 @ 17:26
On Fri, Jan 6, 2012 at 10:55 PM, Cecil Coupe <ccoupe@cableone.net> wrote:
> On Fri, 2012-01-06 at 21:05 -0500, James Gifford wrote:
>> > James,
>> >
>> >  I haven't tried your script but I did look at it after reading your
>> > warning about rvm. On my system
>> >
>> >> ccoupe@twb:~/Projects/shoes3.1$ which rvm
>> >> /home/ccoupe/.rvm/bin/rvm
>> >
>> > Which means I'd have to install rvm on my sandboxed user because I
>> > don't want a system wide rvm.  You might want to apt-get the developer tools
>> > because I'm not sure base Ubuntu includes everything needed to build
>> > ruby but maybe thats old memory.
>>
>> The script installs all needed dependencies - they are pulled in via
>> the ruby-rvm package - thats also why you need to remove your other
>> RVM, otherwise things don't work.

> My bad for missing the ruby-rvm package (11.04 synaptic doesn't know
> about it, BTW)

Ok, that rules out using that package, whatever we write needs to
support 10.04+ (probably)...

> Do we really want to modify the users system directories and
> configuration with sudo level manipulations and rvm installs just to run
> a shoes script? I get kind of squishing thinking about the unintended
> damage that could do. What if they have a app that needs 1.8.7 (I
> *think* there are a few so the rvm set default is not a good idea)
>
> Why not create a .deb that doesn't need RVM? Include your chosen ruby
> 1.9.[1|2|3] source code which gets built properly (an issue for fun
> debugging) for Shoes' needs in someplace out of the $PATH and deleted
> after Shoes gets built and installed

Something I've considered doing is a proper-proper deb that gets done
on the ubuntu PPA builders so that when you install the package, you
end up with a binary - no need to install the build env.

> Or you could use the disfigured update-alternatives hack that ubuntu
> offers to manage multiple versions (it does work for multiple rubies).
> It's like a system wide rvm but it sucks the ubuntu way. Then fix the
> Shoes rakefile to detect that the suckiness of update-alternatives is
> active and it does the right thing to build and install shoes (and an
> icon in the Applications->Programming menu and then your script restores
> the users ruby default version

That update-alternatives hack caused me a lot of pain trying to do
this without RVM - not really interested in dealing with that again,
if someone wants to try, I'm willing to help them.

>
>> http://manpages.ubuntu.com/manpages/gutsy/man7/hier.7.html
>
> gutsy was a long time ago. On the 11.10 page the description
> of /usr/local  would also apply. This is an old issue, dating back to
> Solaris and GNU/FSF days of infighting and made worse by some apple
> third party package managers (cough fink). Shoes should stay above that.
> Pick what ever the user has in $PATH and if neither, offer them a
> choice.

Yes, gutsy was a long time ago. However, its not the only place:

http://developer.ubuntu.com/publish/my-apps-packages/

That explicitly states that it has to:

- Be in one, self-contained directory
- Be able to be installed into /opt/<package-name>
- Be executable by all users from /opt/<package-name> (NOTE: Users
only have read and NOT write privileges to this directory)

That is the reasoning why i was putting it in /opt/shoes - besides,
google chrome installs there in /opt/google/google-chrome, and if its
good enough for Google, its good enough for shoes.

>> > It is a good start. If there was a way to detect apt-get systems vs
>> > fedora package management at the top of the script then you could use
>> > the whatever package management commands they need.
>>
>> Eventually, I want to do something rails-ready style with recipes and
>> stuff. https://github.com/joshfng/railsready
>
> Why would to want to configure grandma's Ubuntu so radically just to
> write or run a shoes script.

When I said eventually, I meant thats the next step, and then after
that, I hope shoes becomes entirely ruby, (yay green_shoes!) so we
don't have to deal with anything like this - just a simple script that
installs the system ruby and uses that. However, that is
(unfortunately) a long ways away.

If I'm not making any sense, just tell me know and I'll go and
re-think things, and I'm open to suggestions. :)

Re: [shoes] Call for some ubuntu folks for some testing of the new curl installer.

From:
Cecil Coupe
Date:
2012-01-08 @ 03:31
On Sat, 2012-01-07 at 12:26 -0500, James Gifford wrote:

> 
> Something I've considered doing is a proper-proper deb that gets done
> on the ubuntu PPA builders so that when you install the package, you
> end up with a binary - no need to install the build env.

I've looked at .deb a little and it seem like it can do what we want if
only someone can understand it. One web page had a comment, "If only
there was a gui to package a .deb".  Great opportunity for a Shoes
programmer looking for a project to do.

Another advantage to .deb or ppa is that more people will find Shoes
while rummaging around in the repositories. I often find interesting
things I never new about.

An issue with .deb is getting the desired ruby source code and configure
options for compiling a ruby that Shoes likes. Once can't count on
Ubuntu doing much with Ruby.

Re: [shoes] Call for some ubuntu folks for some testing of the new curl installer.

From:
Steve Klabnik
Date:
2012-01-08 @ 16:06
> Another advantage to .deb or ppa is that more people will find Shoes
> while rummaging around in the repositories. I often find interesting
> things I never new about.

One of the problems is that Ubuntu _has_ a Shoes .deb in it, but it
was uploaded by someone out of touch, and it's _years_ old. I think
it's pre-Rasins. jrgifford was working on getting that changed, but
the bureaucracy is thick...

Re: [shoes] Call for some ubuntu folks for some testing of the new curl installer.

From:
James Gifford
Date:
2012-01-08 @ 18:06
>> 
>> Another advantage to .deb or ppa is that more people will find Shoes
>> while rummaging around in the repositories. I often find interesting
>> things I never new about.
> 
> One of the problems is that Ubuntu _has_ a Shoes .deb in it, but it
> was uploaded by someone out of touch, and it's _years_ old. I think
> it's pre-Rasins. jrgifford was working on getting that changed, but
> the bureaucracy is thick...

Bureaucracy is thick, and tbh (and I didn't realize this at the time), I 
don't really have the knowledge of shoes and how the old package was 
build. It's not just a "copy the debian control files over and be done" 
process.