[owncloud-devel] ownCloud Pi Device: Snappy Ubuntu Core images available

Kyle Fazzari kyle.fazzari at canonical.com
Tue Mar 22 02:03:16 GMT 2016


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.
kyle at canonical.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.owncloud.org/pipermail/devel/attachments/20160321/bcf04f04/attachment-0001.sig>


More information about the Devel mailing list