[ANN] Snapcraft for Pharo

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] Snapcraft for Pharo

Guillermo Polito
Hi all,

Just wanted to share this:


It is basically the code to generate a snap package of the pharo-vm using snapcraft. Using this, the VM is generated and packaged with all dependencies. This should help in running pharo in different linux distributions.

I invite you to check it, report problems and submit fixes.

Cheers,
Guille
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

EstebanLM
+42

On 13 Jan 2017, at 11:50, Guillermo Polito <[hidden email]> wrote:

Hi all,

Just wanted to share this:


It is basically the code to generate a snap package of the pharo-vm using snapcraft. Using this, the VM is generated and packaged with all dependencies. This should help in running pharo in different linux distributions.

I invite you to check it, report problems and submit fixes.

Cheers,
Guille

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Pavel Krivanek-3
In reply to this post by Guillermo Polito
Thank you. I'll try it on several Fedora versions.

Cheers
-- Pavel

2017-01-13 11:50 GMT+01:00 Guillermo Polito <[hidden email]>:
Hi all,

Just wanted to share this:


It is basically the code to generate a snap package of the pharo-vm using snapcraft. Using this, the VM is generated and packaged with all dependencies. This should help in running pharo in different linux distributions.

I invite you to check it, report problems and submit fixes.

Cheers,
Guille

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Denis Kudriashov
In reply to this post by EstebanLM
Nice

2017-01-13 12:00 GMT+01:00 Esteban Lorenzano <[hidden email]>:
+42

On 13 Jan 2017, at 11:50, Guillermo Polito <[hidden email]> wrote:

Hi all,

Just wanted to share this:


It is basically the code to generate a snap package of the pharo-vm using snapcraft. Using this, the VM is generated and packaged with all dependencies. This should help in running pharo in different linux distributions.

I invite you to check it, report problems and submit fixes.

Cheers,
Guille


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Peter Uhnak
In reply to this post by Guillermo Polito
Hi,

looking at the commands I see

sudo snap install --dangerous --devmode pharo-vm_6.0_amd64.snap

Does this mean that:

1. snap has to be already installed in the system
2. root priviledges are required for installing snaps

The first requirement is eyebrow-raising (considering the install instructions are more complex than for pharo-vm),
and both first and second requirement makes me think this is not for end-user consumers, but for e.g. remote deployment or something like that.

My use case is a system where I don't have root but I want to run pharo (e.g. school computers, customers), so I would like to know if this can help me in any way.
(Right now I circumvent root with dynamic linking... but it's half-assed, and not really tested cross-distro).

Thanks,
Peter



On Fri, Jan 13, 2017 at 11:50:23AM +0100, Guillermo Polito wrote:

> Hi all,
>
> Just wanted to share this:
>
> https://github.com/guillep/pharo-snapcraft
>
> It is basically the code to generate a snap package of the pharo-vm using
> snapcraft. Using this, the VM is generated and packaged with all
> dependencies. This should help in running pharo in different linux
> distributions.
>
> I invite you to check it, report problems and submit fixes.
>
> Cheers,
> Guille

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

stepharong
In reply to this post by Guillermo Polito
thanks a lot guille for your positive attitude.
You give me the energy to continue when I'm sometimes tired. :)


Hi all,

Just wanted to share this:


It is basically the code to generate a snap package of the pharo-vm using snapcraft. Using this, the VM is generated and packaged with all dependencies. This should help in running pharo in different linux distributions.

I invite you to check it, report problems and submit fixes.

Cheers,
Guille



--
Using Opera's mail client: http://www.opera.com/mail/
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

alistairgrant
In reply to this post by Guillermo Polito
Hi Guille,

Thanks very much for making this available.

I'm trying to build the snap and am getting the following error:

# snapcraft
Loaded local plugin for pharo-build-plugin
Skipping pull pharo-sources (already ran)
Skipping pull pharo-vm (already ran)
Preparing to build pharo-sources
Building pharo-sources
Preparing to build pharo-vm
Building pharo-vm
scripts/build.sh
+ '[' '' = -h ']'
+ '[' '' = --help ']'
+ '[' 0 -gt 0 ']'
++ readlink scripts/build.sh
+ SCRIPT_DIR=
+ SCRIPT_DIR=scripts/build.sh
++ dirname scripts/build.sh
+ SCRIPT_DIR=scripts
+ cd scripts
++ pwd -P
+ SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts
++ uname
++ tr '[:upper:]' '[:lower:]'
+ TMP_OS=linux
+ [[ {linux} = *darwin* ]]
+ [[ {linux} = *linux* ]]
+ OS=linux
+ cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/../image
+ ./newImage.sh
++ readlink ./newImage.sh
+ IMAGE_DIR=
+ IMAGE_DIR=./newImage.sh
++ dirname ./newImage.sh
+ IMAGE_DIR=.
+ cd .
++ pwd -P
+ IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
+ wget -O- get.pharo.org/50+vm
+ bash
./newImage.sh: line 12: wget: command not found
+ echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
LOADING VM MAKER SOURCES INTO IMAGE
+ set -x
+ ./pharo Pharo.image
/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../scripts/LoadVMMaker.st
./newImage.sh: line 16: ./pharo: No such file or directory
Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']' returned
non-zero exit status 1


I haven't built the VM before, so it will take me a while to track
this down.  If this is a common problem with an easy solution I'd like
to know :-)

P.S. In the readme under Installing snapcraft, build-essential doesn't
have an "s", and git is required, e.g.

$ sudo apt install build-essential git

Thanks again,
Alistair





On 13 January 2017 at 21:50, Guillermo Polito <[hidden email]> wrote:

> Hi all,
>
> Just wanted to share this:
>
> https://github.com/guillep/pharo-snapcraft
>
> It is basically the code to generate a snap package of the pharo-vm using
> snapcraft. Using this, the VM is generated and packaged with all
> dependencies. This should help in running pharo in different linux
> distributions.
>
> I invite you to check it, report problems and submit fixes.
>
> Cheers,
> Guille

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

alistairgrant
Never mind, I just saw the "wget not found" error.

Sorry for the noise,
Alistair


On 14 January 2017 at 09:17, Alistair Grant <[hidden email]> wrote:

> Hi Guille,
>
> Thanks very much for making this available.
>
> I'm trying to build the snap and am getting the following error:
>
> # snapcraft
> Loaded local plugin for pharo-build-plugin
> Skipping pull pharo-sources (already ran)
> Skipping pull pharo-vm (already ran)
> Preparing to build pharo-sources
> Building pharo-sources
> Preparing to build pharo-vm
> Building pharo-vm
> scripts/build.sh
> + '[' '' = -h ']'
> + '[' '' = --help ']'
> + '[' 0 -gt 0 ']'
> ++ readlink scripts/build.sh
> + SCRIPT_DIR=
> + SCRIPT_DIR=scripts/build.sh
> ++ dirname scripts/build.sh
> + SCRIPT_DIR=scripts
> + cd scripts
> ++ pwd -P
> + SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts
> ++ uname
> ++ tr '[:upper:]' '[:lower:]'
> + TMP_OS=linux
> + [[ {linux} = *darwin* ]]
> + [[ {linux} = *linux* ]]
> + OS=linux
> + cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/../image
> + ./newImage.sh
> ++ readlink ./newImage.sh
> + IMAGE_DIR=
> + IMAGE_DIR=./newImage.sh
> ++ dirname ./newImage.sh
> + IMAGE_DIR=.
> + cd .
> ++ pwd -P
> + IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
> + wget -O- get.pharo.org/50+vm
> + bash
> ./newImage.sh: line 12: wget: command not found
> + echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
> LOADING VM MAKER SOURCES INTO IMAGE
> + set -x
> + ./pharo Pharo.image
> /home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../scripts/LoadVMMaker.st
> ./newImage.sh: line 16: ./pharo: No such file or directory
> Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']' returned
> non-zero exit status 1
>
>
> I haven't built the VM before, so it will take me a while to track
> this down.  If this is a common problem with an easy solution I'd like
> to know :-)
>
> P.S. In the readme under Installing snapcraft, build-essential doesn't
> have an "s", and git is required, e.g.
>
> $ sudo apt install build-essential git
>
> Thanks again,
> Alistair
>
>
>
>
>
> On 13 January 2017 at 21:50, Guillermo Polito <[hidden email]> wrote:
>> Hi all,
>>
>> Just wanted to share this:
>>
>> https://github.com/guillep/pharo-snapcraft
>>
>> It is basically the code to generate a snap package of the pharo-vm using
>> snapcraft. Using this, the VM is generated and packaged with all
>> dependencies. This should help in running pharo in different linux
>> distributions.
>>
>> I invite you to check it, report problems and submit fixes.
>>
>> Cheers,
>> Guille

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Guillermo Polito
Hi all,

First, Peter. Actually, this package is meant for those people using Snapcraft to install packages. It's like with docker, you need docker to make it work. Actually I made this not to make it the default way to distribute pharo, but just because they asked it in the university, it is the default way they want to install new packages in here...

Alistair, 
  - thanks for the typo. Maybe we can force wget as a build dependency? Like that it will not fail like that ;)
  - I'll fix the typos. However, next time could you just open a pull request? or make an issue? emails tend to get lost (specially in a weekend and with many answers :P)

Guille

On Fri, Jan 13, 2017 at 11:35 PM, Alistair Grant <[hidden email]> wrote:
Never mind, I just saw the "wget not found" error.

Sorry for the noise,
Alistair


On 14 January 2017 at 09:17, Alistair Grant <[hidden email]> wrote:
> Hi Guille,
>
> Thanks very much for making this available.
>
> I'm trying to build the snap and am getting the following error:
>
> # snapcraft
> Loaded local plugin for pharo-build-plugin
> Skipping pull pharo-sources (already ran)
> Skipping pull pharo-vm (already ran)
> Preparing to build pharo-sources
> Building pharo-sources
> Preparing to build pharo-vm
> Building pharo-vm
> scripts/build.sh
> + '[' '' = -h ']'
> + '[' '' = --help ']'
> + '[' 0 -gt 0 ']'
> ++ readlink scripts/build.sh
> + SCRIPT_DIR=
> + SCRIPT_DIR=scripts/build.sh
> ++ dirname scripts/build.sh
> + SCRIPT_DIR=scripts
> + cd scripts
> ++ pwd -P
> + SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts
> ++ uname
> ++ tr '[:upper:]' '[:lower:]'
> + TMP_OS=linux
> + [[ {linux} = *darwin* ]]
> + [[ {linux} = *linux* ]]
> + OS=linux
> + cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/../image
> + ./newImage.sh
> ++ readlink ./newImage.sh
> + IMAGE_DIR=
> + IMAGE_DIR=./newImage.sh
> ++ dirname ./newImage.sh
> + IMAGE_DIR=.
> + cd .
> ++ pwd -P
> + IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
> + wget -O- get.pharo.org/50+vm
> + bash
> ./newImage.sh: line 12: wget: command not found
> + echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
> LOADING VM MAKER SOURCES INTO IMAGE
> + set -x
> + ./pharo Pharo.image
> /home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../scripts/LoadVMMaker.st
> ./newImage.sh: line 16: ./pharo: No such file or directory
> Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']' returned
> non-zero exit status 1
>
>
> I haven't built the VM before, so it will take me a while to track
> this down.  If this is a common problem with an easy solution I'd like
> to know :-)
>
> P.S. In the readme under Installing snapcraft, build-essential doesn't
> have an "s", and git is required, e.g.
>
> $ sudo apt install build-essential git
>
> Thanks again,
> Alistair
>
>
>
>
>
> On 13 January 2017 at 21:50, Guillermo Polito <[hidden email]> wrote:
>> Hi all,
>>
>> Just wanted to share this:
>>
>> https://github.com/guillep/pharo-snapcraft
>>
>> It is basically the code to generate a snap package of the pharo-vm using
>> snapcraft. Using this, the VM is generated and packaged with all
>> dependencies. This should help in running pharo in different linux
>> distributions.
>>
>> I invite you to check it, report problems and submit fixes.
>>
>> Cheers,
>> Guille


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Peter Uhnak
On Mon, Jan 16, 2017 at 02:40:36PM +0100, Guillermo Polito wrote:
> Hi all,
>
> First, Peter. Actually, this package is meant for those people using
> Snapcraft to install packages. It's like with docker, you need docker to
> make it work. Actually I made this not to make it the default way to
> distribute pharo, but just because they asked it in the university, it is
> the default way they want to install new packages in here...

I guessed as much, but I am still confused about the sudo requirement for installation of new snaps;
e.g. if I asked our university admin to install snapcraft, it still wouldn't help us (or other teachers), because they don't have sudo priviledges.
(And although an exception can be added from snapcraft, I am not sure whether the installation process itself is sandboxed.)
Is this correct?

Thanks,
Peter


>
> Alistair,
>   - thanks for the typo. Maybe we can force wget as a build dependency?
> Like that it will not fail like that ;)
>   - I'll fix the typos. However, next time could you just open a pull
> request? or make an issue? emails tend to get lost (specially in a weekend
> and with many answers :P)
>
> Guille
>
> On Fri, Jan 13, 2017 at 11:35 PM, Alistair Grant <[hidden email]>
> wrote:
>
> > Never mind, I just saw the "wget not found" error.
> >
> > Sorry for the noise,
> > Alistair
> >
> >
> > On 14 January 2017 at 09:17, Alistair Grant <[hidden email]> wrote:
> > > Hi Guille,
> > >
> > > Thanks very much for making this available.
> > >
> > > I'm trying to build the snap and am getting the following error:
> > >
> > > # snapcraft
> > > Loaded local plugin for pharo-build-plugin
> > > Skipping pull pharo-sources (already ran)
> > > Skipping pull pharo-vm (already ran)
> > > Preparing to build pharo-sources
> > > Building pharo-sources
> > > Preparing to build pharo-vm
> > > Building pharo-vm
> > > scripts/build.sh
> > > + '[' '' = -h ']'
> > > + '[' '' = --help ']'
> > > + '[' 0 -gt 0 ']'
> > > ++ readlink scripts/build.sh
> > > + SCRIPT_DIR=
> > > + SCRIPT_DIR=scripts/build.sh
> > > ++ dirname scripts/build.sh
> > > + SCRIPT_DIR=scripts
> > > + cd scripts
> > > ++ pwd -P
> > > + SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts
> > > ++ uname
> > > ++ tr '[:upper:]' '[:lower:]'
> > > + TMP_OS=linux
> > > + [[ {linux} = *darwin* ]]
> > > + [[ {linux} = *linux* ]]
> > > + OS=linux
> > > + cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/../image
> > > + ./newImage.sh
> > > ++ readlink ./newImage.sh
> > > + IMAGE_DIR=
> > > + IMAGE_DIR=./newImage.sh
> > > ++ dirname ./newImage.sh
> > > + IMAGE_DIR=.
> > > + cd .
> > > ++ pwd -P
> > > + IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
> > > + wget -O- get.pharo.org/50+vm
> > > + bash
> > > ./newImage.sh: line 12: wget: command not found
> > > + echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
> > > LOADING VM MAKER SOURCES INTO IMAGE
> > > + set -x
> > > + ./pharo Pharo.image
> > > /home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../
> > scripts/LoadVMMaker.st
> > > ./newImage.sh: line 16: ./pharo: No such file or directory
> > > Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']' returned
> > > non-zero exit status 1
> > >
> > >
> > > I haven't built the VM before, so it will take me a while to track
> > > this down.  If this is a common problem with an easy solution I'd like
> > > to know :-)
> > >
> > > P.S. In the readme under Installing snapcraft, build-essential doesn't
> > > have an "s", and git is required, e.g.
> > >
> > > $ sudo apt install build-essential git
> > >
> > > Thanks again,
> > > Alistair
> > >
> > >
> > >
> > >
> > >
> > > On 13 January 2017 at 21:50, Guillermo Polito <[hidden email]>
> > wrote:
> > >> Hi all,
> > >>
> > >> Just wanted to share this:
> > >>
> > >> https://github.com/guillep/pharo-snapcraft
> > >>
> > >> It is basically the code to generate a snap package of the pharo-vm
> > using
> > >> snapcraft. Using this, the VM is generated and packaged with all
> > >> dependencies. This should help in running pharo in different linux
> > >> distributions.
> > >>
> > >> I invite you to check it, report problems and submit fixes.
> > >>
> > >> Cheers,
> > >> Guille
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Guillermo Polito


On Mon, Jan 16, 2017 at 4:23 PM, Peter Uhnak <[hidden email]> wrote:
On Mon, Jan 16, 2017 at 02:40:36PM +0100, Guillermo Polito wrote:
> Hi all,
>
> First, Peter. Actually, this package is meant for those people using
> Snapcraft to install packages. It's like with docker, you need docker to
> make it work. Actually I made this not to make it the default way to
> distribute pharo, but just because they asked it in the university, it is
> the default way they want to install new packages in here...

I guessed as much, but I am still confused about the sudo requirement for installation of new snaps;
e.g. if I asked our university admin to install snapcraft, it still wouldn't help us (or other teachers), because they don't have sudo priviledges.
(And although an exception can be added from snapcraft, I am not sure whether the installation process itself is sandboxed.)
Is this correct?

I guess so...
But I just know the basics I learnt while building the package.

BTW,

I just enhanced some things:

 
- fix the typos
- fixed build dependencies to make it work in a clean linux box (added cmake, unzip,  wget...)
- added a travis job to validate that the package can be built ;)
 

Thanks,
Peter


>
> Alistair,
>   - thanks for the typo. Maybe we can force wget as a build dependency?
> Like that it will not fail like that ;)
>   - I'll fix the typos. However, next time could you just open a pull
> request? or make an issue? emails tend to get lost (specially in a weekend
> and with many answers :P)
>
> Guille
>
> On Fri, Jan 13, 2017 at 11:35 PM, Alistair Grant <[hidden email]>
> wrote:
>
> > Never mind, I just saw the "wget not found" error.
> >
> > Sorry for the noise,
> > Alistair
> >
> >
> > On 14 January 2017 at 09:17, Alistair Grant <[hidden email]> wrote:
> > > Hi Guille,
> > >
> > > Thanks very much for making this available.
> > >
> > > I'm trying to build the snap and am getting the following error:
> > >
> > > # snapcraft
> > > Loaded local plugin for pharo-build-plugin
> > > Skipping pull pharo-sources (already ran)
> > > Skipping pull pharo-vm (already ran)
> > > Preparing to build pharo-sources
> > > Building pharo-sources
> > > Preparing to build pharo-vm
> > > Building pharo-vm
> > > scripts/build.sh
> > > + '[' '' = -h ']'
> > > + '[' '' = --help ']'
> > > + '[' 0 -gt 0 ']'
> > > ++ readlink scripts/build.sh
> > > + SCRIPT_DIR=
> > > + SCRIPT_DIR=scripts/build.sh
> > > ++ dirname scripts/build.sh
> > > + SCRIPT_DIR=scripts
> > > + cd scripts
> > > ++ pwd -P
> > > + SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts
> > > ++ uname
> > > ++ tr '[:upper:]' '[:lower:]'
> > > + TMP_OS=linux
> > > + [[ {linux} = *darwin* ]]
> > > + [[ {linux} = *linux* ]]
> > > + OS=linux
> > > + cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/../image
> > > + ./newImage.sh
> > > ++ readlink ./newImage.sh
> > > + IMAGE_DIR=
> > > + IMAGE_DIR=./newImage.sh
> > > ++ dirname ./newImage.sh
> > > + IMAGE_DIR=.
> > > + cd .
> > > ++ pwd -P
> > > + IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
> > > + wget -O- get.pharo.org/50+vm
> > > + bash
> > > ./newImage.sh: line 12: wget: command not found
> > > + echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
> > > LOADING VM MAKER SOURCES INTO IMAGE
> > > + set -x
> > > + ./pharo Pharo.image
> > > /home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../
> > scripts/LoadVMMaker.st
> > > ./newImage.sh: line 16: ./pharo: No such file or directory
> > > Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']' returned
> > > non-zero exit status 1
> > >
> > >
> > > I haven't built the VM before, so it will take me a while to track
> > > this down.  If this is a common problem with an easy solution I'd like
> > > to know :-)
> > >
> > > P.S. In the readme under Installing snapcraft, build-essential doesn't
> > > have an "s", and git is required, e.g.
> > >
> > > $ sudo apt install build-essential git
> > >
> > > Thanks again,
> > > Alistair
> > >
> > >
> > >
> > >
> > >
> > > On 13 January 2017 at 21:50, Guillermo Polito <[hidden email]>
> > wrote:
> > >> Hi all,
> > >>
> > >> Just wanted to share this:
> > >>
> > >> https://github.com/guillep/pharo-snapcraft
> > >>
> > >> It is basically the code to generate a snap package of the pharo-vm
> > using
> > >> snapcraft. Using this, the VM is generated and packaged with all
> > >> dependencies. This should help in running pharo in different linux
> > >> distributions.
> > >>
> > >> I invite you to check it, report problems and submit fixes.
> > >>
> > >> Cheers,
> > >> Guille
> >
> >


Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Ben Coman
In reply to this post by Peter Uhnak


On Mon, Jan 16, 2017 at 11:23 PM, Peter Uhnak <[hidden email]> wrote:

> On Mon, Jan 16, 2017 at 02:40:36PM +0100, Guillermo Polito wrote:
>> Hi all,
>>
>> First, Peter. Actually, this package is meant for those people using
>> Snapcraft to install packages. It's like with docker, you need docker to
>> make it work. Actually I made this not to make it the default way to
>> distribute pharo, but just because they asked it in the university, it is
>> the default way they want to install new packages in here...
>
> I guessed as much, but I am still confused about the sudo requirement for installation of new snaps;

I infer from this page that sudo privileges *are* required to install new snaps...
https://www.ubuntu.com/desktop/snappy

> e.g. if I asked our university admin to install snapcraft, it still wouldn't help us (or other teachers), because they don't have sudo priviledges.
> (And although an exception can be added from snapcraft, I am not sure whether the installation process itself is sandboxed.)
> Is this correct?

I guess your main issue has been running 32-bit Pharo on 64-bit Linux requiring sudo privileges to install 32-bit libs.
In learning more about snapcraft I discovered AppImage which would seem to suit your case. 
It packages application lib dependencies into a compressed CD filesystem you downloaded and run without installation.
https://en.wikipedia.org/wiki/AppImage

Even for 64-bit Pharo, AppImage could remain a good packing option for a case where university machines might not all have SDL libs installed.

cheers -ben

>

> Thanks,
> Peter
>
>
>>
>> Alistair,
>>   - thanks for the typo. Maybe we can force wget as a build dependency?
>> Like that it will not fail like that ;)
>>   - I'll fix the typos. However, next time could you just open a pull
>> request? or make an issue? emails tend to get lost (specially in a weekend
>> and with many answers :P)
>>
>> Guille
>>
>> On Fri, Jan 13, 2017 at 11:35 PM, Alistair Grant <[hidden email]>
>> wrote:
>>
>> > Never mind, I just saw the "wget not found" error.
>> >
>> > Sorry for the noise,
>> > Alistair
>> >
>> >
>> > On 14 January 2017 at 09:17, Alistair Grant <[hidden email]> wrote:
>> > > Hi Guille,
>> > >
>> > > Thanks very much for making this available.
>> > >
>> > > I'm trying to build the snap and am getting the following error:
>> > >
>> > > # snapcraft
>> > > Loaded local plugin for pharo-build-plugin
>> > > Skipping pull pharo-sources (already ran)
>> > > Skipping pull pharo-vm (already ran)
>> > > Preparing to build pharo-sources
>> > > Building pharo-sources
>> > > Preparing to build pharo-vm
>> > > Building pharo-vm
>> > > scripts/build.sh
>> > > + '[' '' = -h ']'
>> > > + '[' '' = --help ']'
>> > > + '[' 0 -gt 0 ']'
>> > > ++ readlink scripts/build.sh
>> > > + SCRIPT_DIR=
>> > > + SCRIPT_DIR=scripts/build.sh
>> > > ++ dirname scripts/build.sh
>> > > + SCRIPT_DIR=scripts
>> > > + cd scripts
>> > > ++ pwd -P
>> > > + SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts
>> > > ++ uname
>> > > ++ tr '[:upper:]' '[:lower:]'
>> > > + TMP_OS=linux
>> > > + [[ {linux} = *darwin* ]]
>> > > + [[ {linux} = *linux* ]]
>> > > + OS=linux
>> > > + cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/../image
>> > > + ./newImage.sh
>> > > ++ readlink ./newImage.sh
>> > > + IMAGE_DIR=
>> > > + IMAGE_DIR=./newImage.sh
>> > > ++ dirname ./newImage.sh
>> > > + IMAGE_DIR=.
>> > > + cd .
>> > > ++ pwd -P
>> > > + IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
>> > > + wget -O- get.pharo.org/50+vm
>> > > + bash
>> > > ./newImage.sh: line 12: wget: command not found
>> > > + echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
>> > > LOADING VM MAKER SOURCES INTO IMAGE
>> > > + set -x
>> > > + ./pharo Pharo.image
>> > > /home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../
>> > scripts/LoadVMMaker.st
>> > > ./newImage.sh: line 16: ./pharo: No such file or directory
>> > > Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']' returned
>> > > non-zero exit status 1
>> > >
>> > >
>> > > I haven't built the VM before, so it will take me a while to track
>> > > this down.  If this is a common problem with an easy solution I'd like
>> > > to know :-)
>> > >
>> > > P.S. In the readme under Installing snapcraft, build-essential doesn't
>> > > have an "s", and git is required, e.g.
>> > >
>> > > $ sudo apt install build-essential git
>> > >
>> > > Thanks again,
>> > > Alistair
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On 13 January 2017 at 21:50, Guillermo Polito <[hidden email]>
>> > wrote:
>> > >> Hi all,
>> > >>
>> > >> Just wanted to share this:
>> > >>
>> > >> https://github.com/guillep/pharo-snapcraft
>> > >>
>> > >> It is basically the code to generate a snap package of the pharo-vm
>> > using
>> > >> snapcraft. Using this, the VM is generated and packaged with all
>> > >> dependencies. This should help in running pharo in different linux
>> > >> distributions.
>> > >>
>> > >> I invite you to check it, report problems and submit fixes.
>> > >>
>> > >> Cheers,
>> > >> Guille
>> >
>> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Guillermo Polito
That looks cool, I put it in my todo :)

On Tue, Jan 17, 2017 at 3:23 AM, Ben Coman <[hidden email]> wrote:


On Mon, Jan 16, 2017 at 11:23 PM, Peter Uhnak <[hidden email]> wrote:

> On Mon, Jan 16, 2017 at 02:40:36PM +0100, Guillermo Polito wrote:
>> Hi all,
>>
>> First, Peter. Actually, this package is meant for those people using
>> Snapcraft to install packages. It's like with docker, you need docker to
>> make it work. Actually I made this not to make it the default way to
>> distribute pharo, but just because they asked it in the university, it is
>> the default way they want to install new packages in here...
>
> I guessed as much, but I am still confused about the sudo requirement for installation of new snaps;

I infer from this page that sudo privileges *are* required to install new snaps...
https://www.ubuntu.com/desktop/snappy

> e.g. if I asked our university admin to install snapcraft, it still wouldn't help us (or other teachers), because they don't have sudo priviledges.
> (And although an exception can be added from snapcraft, I am not sure whether the installation process itself is sandboxed.)
> Is this correct?

I guess your main issue has been running 32-bit Pharo on 64-bit Linux requiring sudo privileges to install 32-bit libs.
In learning more about snapcraft I discovered AppImage which would seem to suit your case. 
It packages application lib dependencies into a compressed CD filesystem you downloaded and run without installation.
https://en.wikipedia.org/wiki/AppImage

Even for 64-bit Pharo, AppImage could remain a good packing option for a case where university machines might not all have SDL libs installed.

cheers -ben

>

> Thanks,
> Peter
>
>
>>
>> Alistair,
>>   - thanks for the typo. Maybe we can force wget as a build dependency?
>> Like that it will not fail like that ;)
>>   - I'll fix the typos. However, next time could you just open a pull
>> request? or make an issue? emails tend to get lost (specially in a weekend
>> and with many answers :P)
>>
>> Guille
>>
>> On Fri, Jan 13, 2017 at 11:35 PM, Alistair Grant <[hidden email]>
>> wrote:
>>
>> > Never mind, I just saw the "wget not found" error.
>> >
>> > Sorry for the noise,
>> > Alistair
>> >
>> >
>> > On 14 January 2017 at 09:17, Alistair Grant <[hidden email]> wrote:
>> > > Hi Guille,
>> > >
>> > > Thanks very much for making this available.
>> > >
>> > > I'm trying to build the snap and am getting the following error:
>> > >
>> > > # snapcraft
>> > > Loaded local plugin for pharo-build-plugin
>> > > Skipping pull pharo-sources (already ran)
>> > > Skipping pull pharo-vm (already ran)
>> > > Preparing to build pharo-sources
>> > > Building pharo-sources
>> > > Preparing to build pharo-vm
>> > > Building pharo-vm
>> > > scripts/build.sh
>> > > + '[' '' = -h ']'
>> > > + '[' '' = --help ']'
>> > > + '[' 0 -gt 0 ']'
>> > > ++ readlink scripts/build.sh
>> > > + SCRIPT_DIR=
>> > > + SCRIPT_DIR=scripts/build.sh
>> > > ++ dirname scripts/build.sh
>> > > + SCRIPT_DIR=scripts
>> > > + cd scripts
>> > > ++ pwd -P
>> > > + SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts
>> > > ++ uname
>> > > ++ tr '[:upper:]' '[:lower:]'
>> > > + TMP_OS=linux
>> > > + [[ {linux} = *darwin* ]]
>> > > + [[ {linux} = *linux* ]]
>> > > + OS=linux
>> > > + cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/../image
>> > > + ./newImage.sh
>> > > ++ readlink ./newImage.sh
>> > > + IMAGE_DIR=
>> > > + IMAGE_DIR=./newImage.sh
>> > > ++ dirname ./newImage.sh
>> > > + IMAGE_DIR=.
>> > > + cd .
>> > > ++ pwd -P
>> > > + IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
>> > > + wget -O- get.pharo.org/50+vm
>> > > + bash
>> > > ./newImage.sh: line 12: wget: command not found
>> > > + echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
>> > > LOADING VM MAKER SOURCES INTO IMAGE
>> > > + set -x
>> > > + ./pharo Pharo.image
>> > > /home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../
>> > scripts/LoadVMMaker.st
>> > > ./newImage.sh: line 16: ./pharo: No such file or directory
>> > > Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']' returned
>> > > non-zero exit status 1
>> > >
>> > >
>> > > I haven't built the VM before, so it will take me a while to track
>> > > this down.  If this is a common problem with an easy solution I'd like
>> > > to know :-)
>> > >
>> > > P.S. In the readme under Installing snapcraft, build-essential doesn't
>> > > have an "s", and git is required, e.g.
>> > >
>> > > $ sudo apt install build-essential git
>> > >
>> > > Thanks again,
>> > > Alistair
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On 13 January 2017 at 21:50, Guillermo Polito <[hidden email]>
>> > wrote:
>> > >> Hi all,
>> > >>
>> > >> Just wanted to share this:
>> > >>
>> > >> https://github.com/guillep/pharo-snapcraft
>> > >>
>> > >> It is basically the code to generate a snap package of the pharo-vm
>> > using
>> > >> snapcraft. Using this, the VM is generated and packaged with all
>> > >> dependencies. This should help in running pharo in different linux
>> > >> distributions.
>> > >>
>> > >> I invite you to check it, report problems and submit fixes.
>> > >>
>> > >> Cheers,
>> > >> Guille
>> >
>> >
>
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Peter Uhnak
Indeed, this looks much more appropriate for my use case.

Thanks!

Peter

On Tue, Jan 17, 2017 at 10:07:26AM +0100, Guillermo Polito wrote:

> That looks cool, I put it in my todo :)
>
> On Tue, Jan 17, 2017 at 3:23 AM, Ben Coman <[hidden email]> wrote:
>
> >
> >
> > On Mon, Jan 16, 2017 at 11:23 PM, Peter Uhnak <[hidden email]> wrote:
> > > On Mon, Jan 16, 2017 at 02:40:36PM +0100, Guillermo Polito wrote:
> > >> Hi all,
> > >>
> > >> First, Peter. Actually, this package is meant for those people using
> > >> Snapcraft to install packages. It's like with docker, you need docker to
> > >> make it work. Actually I made this not to make it the default way to
> > >> distribute pharo, but just because they asked it in the university, it
> > is
> > >> the default way they want to install new packages in here...
> > >
> > > I guessed as much, but I am still confused about the sudo requirement
> > for installation of new snaps;
> >
> > I infer from this page that sudo privileges *are* required to install new
> > snaps...
> > https://www.ubuntu.com/desktop/snappy
> >
> > > e.g. if I asked our university admin to install snapcraft, it still
> > wouldn't help us (or other teachers), because they don't have sudo
> > priviledges.
> > > (And although an exception can be added from snapcraft, I am not sure
> > whether the installation process itself is sandboxed.)
> > > Is this correct?
> >
> > I guess your main issue has been running 32-bit Pharo on 64-bit Linux
> > requiring sudo privileges to install 32-bit libs.
> > In learning more about snapcraft I discovered AppImage which would seem to
> > suit your case.
> > It packages application lib dependencies into a compressed CD filesystem
> > you downloaded and run without installation.
> >
> > * http://askubuntu.com/questions/866511/differences-
> > between-snaps-appimage-flatpak-and-others
> > * https://en.wikipedia.org/wiki/AppImage
> > * http://appimage.org/
> > * https://github.com/probonopd/AppImageKit/blob/master/README.md
> > * https://plus.google.com/+LinusTorvalds/posts/WyrATKUnmrS
> >
> > Even for 64-bit Pharo, AppImage could remain a good packing option for a
> > case where university machines might not all have SDL libs installed.
> >
> > cheers -ben
> >
> > >
> > > Thanks,
> > > Peter
> > >
> > >
> > >>
> > >> Alistair,
> > >>   - thanks for the typo. Maybe we can force wget as a build dependency?
> > >> Like that it will not fail like that ;)
> > >>   - I'll fix the typos. However, next time could you just open a pull
> > >> request? or make an issue? emails tend to get lost (specially in a
> > weekend
> > >> and with many answers :P)
> > >>
> > >> Guille
> > >>
> > >> On Fri, Jan 13, 2017 at 11:35 PM, Alistair Grant <[hidden email]
> > >
> > >> wrote:
> > >>
> > >> > Never mind, I just saw the "wget not found" error.
> > >> >
> > >> > Sorry for the noise,
> > >> > Alistair
> > >> >
> > >> >
> > >> > On 14 January 2017 at 09:17, Alistair Grant <[hidden email]>
> > wrote:
> > >> > > Hi Guille,
> > >> > >
> > >> > > Thanks very much for making this available.
> > >> > >
> > >> > > I'm trying to build the snap and am getting the following error:
> > >> > >
> > >> > > # snapcraft
> > >> > > Loaded local plugin for pharo-build-plugin
> > >> > > Skipping pull pharo-sources (already ran)
> > >> > > Skipping pull pharo-vm (already ran)
> > >> > > Preparing to build pharo-sources
> > >> > > Building pharo-sources
> > >> > > Preparing to build pharo-vm
> > >> > > Building pharo-vm
> > >> > > scripts/build.sh
> > >> > > + '[' '' = -h ']'
> > >> > > + '[' '' = --help ']'
> > >> > > + '[' 0 -gt 0 ']'
> > >> > > ++ readlink scripts/build.sh
> > >> > > + SCRIPT_DIR=
> > >> > > + SCRIPT_DIR=scripts/build.sh
> > >> > > ++ dirname scripts/build.sh
> > >> > > + SCRIPT_DIR=scripts
> > >> > > + cd scripts
> > >> > > ++ pwd -P
> > >> > > + SCRIPT_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/
> > build/scripts
> > >> > > ++ uname
> > >> > > ++ tr '[:upper:]' '[:lower:]'
> > >> > > + TMP_OS=linux
> > >> > > + [[ {linux} = *darwin* ]]
> > >> > > + [[ {linux} = *linux* ]]
> > >> > > + OS=linux
> > >> > > + cd /home/pharo/pharo-snapcraft/parts/pharo-vm/build/scripts/.
> > ./image
> > >> > > + ./newImage.sh
> > >> > > ++ readlink ./newImage.sh
> > >> > > + IMAGE_DIR=
> > >> > > + IMAGE_DIR=./newImage.sh
> > >> > > ++ dirname ./newImage.sh
> > >> > > + IMAGE_DIR=.
> > >> > > + cd .
> > >> > > ++ pwd -P
> > >> > > + IMAGE_DIR=/home/pharo/pharo-snapcraft/parts/pharo-vm/build/image
> > >> > > + wget -O- get.pharo.org/50+vm
> > >> > > + bash
> > >> > > ./newImage.sh: line 12: wget: command not found
> > >> > > + echo -e 'LOADING VM MAKER SOURCES INTO IMAGE'
> > >> > > LOADING VM MAKER SOURCES INTO IMAGE
> > >> > > + set -x
> > >> > > + ./pharo Pharo.image
> > >> > > /home/pharo/pharo-snapcraft/parts/pharo-vm/build/image/../
> > >> > scripts/LoadVMMaker.st
> > >> > > ./newImage.sh: line 16: ./pharo: No such file or directory
> > >> > > Command '['/bin/sh', '/tmp/tmpgelke1nt', 'scripts/build.sh']'
> > returned
> > >> > > non-zero exit status 1
> > >> > >
> > >> > >
> > >> > > I haven't built the VM before, so it will take me a while to track
> > >> > > this down.  If this is a common problem with an easy solution I'd
> > like
> > >> > > to know :-)
> > >> > >
> > >> > > P.S. In the readme under Installing snapcraft, build-essential
> > doesn't
> > >> > > have an "s", and git is required, e.g.
> > >> > >
> > >> > > $ sudo apt install build-essential git
> > >> > >
> > >> > > Thanks again,
> > >> > > Alistair
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > >
> > >> > > On 13 January 2017 at 21:50, Guillermo Polito <
> > [hidden email]>
> > >> > wrote:
> > >> > >> Hi all,
> > >> > >>
> > >> > >> Just wanted to share this:
> > >> > >>
> > >> > >> https://github.com/guillep/pharo-snapcraft
> > >> > >>
> > >> > >> It is basically the code to generate a snap package of the pharo-vm
> > >> > using
> > >> > >> snapcraft. Using this, the VM is generated and packaged with all
> > >> > >> dependencies. This should help in running pharo in different linux
> > >> > >> distributions.
> > >> > >>
> > >> > >> I invite you to check it, report problems and submit fixes.
> > >> > >>
> > >> > >> Cheers,
> > >> > >> Guille
> > >> >
> > >> >
> > >
> >

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

alistairgrant
In reply to this post by Guillermo Polito
On 17 January 2017 at 00:40, Guillermo Polito <[hidden email]> wrote:
> Hi all,
> ...
>
> Alistair,
>   - thanks for the typo. Maybe we can force wget as a build dependency? Like
> that it will not fail like that ;)
>   - I'll fix the typos. However, next time could you just open a pull
> request? or make an issue? emails tend to get lost (specially in a weekend
> and with many answers :P)

Sure, I'll create the pull request next time (I was a bit distracted
and didn't even think of it :-().

Thanks again,
Alistair

Reply | Threaded
Open this post in threaded view
|

Re: [ANN] Snapcraft for Pharo

Guillermo Polito
No problem ;)

BTW, you can find latest `already package` snaps in bintray here:


(Also the readme is updated)

Guille 

On Wed, Jan 18, 2017 at 10:28 AM, Alistair Grant <[hidden email]> wrote:
On 17 January 2017 at 00:40, Guillermo Polito <[hidden email]> wrote:
> Hi all,
> ...
>
> Alistair,
>   - thanks for the typo. Maybe we can force wget as a build dependency? Like
> that it will not fail like that ;)
>   - I'll fix the typos. However, next time could you just open a pull
> request? or make an issue? emails tend to get lost (specially in a weekend
> and with many answers :P)

Sure, I'll create the pull request next time (I was a bit distracted
and didn't even think of it :-().

Thanks again,
Alistair