Hey Jos,

On 03/21/2016 01:39 PM, Jos Poortvliet wrote:
> Hi all,
> 
> So we tried to figure out what PHP modules were installed, but Snappy 
> confounded us ;-)
> 
> SSH-ing into the Pi and typing "php" gets you command not found, same with 
> any 
> of the other things we know are running underneath the ownCloud which works 
> just fine...

One of the main overarching differences between snaps and, say, debs, is
that snaps contain all their dependencies. Apache, PHP, MySQL, etc. is
all bundled into this single snap. We control the entire chain of
dependencies. This is a little confusing off the bat though, because it
means none of these things are available system-wide. For example, there
is no /var/www where all the web applications are. There is no
/etc/apache containing the configs. You can't even run php scripts
directly, because php is nested inside the snap-- not actually available
to call without some terminal gymnastics.

> Clearly, a 'snappy for dummies' is needed, I couldn't really find answers to 
> my 
> questions on the intarwebz either. I might write a blog for starters once 
> I've 
> learned about it :D
> 
> In the mean time, looking at the code in 
> https://github.com/kyrofa/owncloud-snap in the rolling branch (that's where 
> our image lives for now) I can't 
> really figure out how things work there, either.

Yeah that's probably not the best package to begin learning, either. You
can see some work in other branches to simplify things, but none of them
have landed quite yet. When we meet I'll take you through some simpler
examples so the basic concepts are more clear :) .

> Kyle, would you be able to give a quick rundown of the repo, what file does 
> what and where? For example, I found where ownCloud's config.php is but when 
> I 
> tried to see what PHP modules are included and how to modify that, I got 
> stuck 
> rather quickly. The only place I found PHP was in snapcraft.yaml but that 
> seems to be sparse build instructions or so? Or does this pull in deb's from 
> the repo? If debs, I see no php modules, in what section could we add "php-
> apcu"?

All the main dependencies are built from source. So including PHP
modules (assuming they're distributed in the PHP source) is usually as
simple as adding an --enable in [1] somewhere. Also, since PHP is an
apache module it's built in the same part as apache, thus the lack of
explicit PHP part (checkout the apache Makefile). APCu seems to be a
PECL package, and I haven't tried including any of those in a snap just
yet. Feel free to give it a try!

> If ok with you, I'll give you a call tomorrow to walk through this a bit and 
> I'll try and help document it ;-)

Tomorrow I have a beta freeze I really need to hit, but I can meet after
that.

[1]:
https://github.com/kyrofa/owncloud-snap/blob/rolling/src/apache/Makefile#L51

--
Kyle Fazzari (kyrofa)
Software Engineer
Canonical Ltd.
k...@canonical.com

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Devel mailing list
Devel@owncloud.org
http://mailman.owncloud.org/mailman/listinfo/devel

Reply via email to