Moiv's picture

Hi All,

I am trying to create my first custom appliance while I will share once it's tested.

I have followed the documentation here: https://github.com/turnkeylinux-apps/tkldev/blob/master/docs/helloworld.rst and chrooted and made some changes to test.

When I run 'make' I run into the following error:

cp build/root.sandbox/boot/initrd.img-4.9.0-9-amd64 build/cdroot/casper/initrd.gz
rm -f build/cdroot/casper/20sandbox.squashfs
mksquashfs $(deck --get-level=last build/root.sandbox) build/cdroot/casper/20sandbox.squashfs
fatal: unrecognized option: --get-level=last
SYNTAX:mksquashfs source1 source2 ...  dest [options] [-e list of exclude

 

Just wondering why this is happening and if there is a workaround for this?

 

Thanks in advance :)

Forum: 
Moiv's picture

All good, I found another forum post where it has been explained that the sandbox is a little broken at the moment :)

Jeremy Davis's picture

We really need to update the TKLDev docs. Actually, we should at least update the docs to note that the sandbox is currently broken. That would save users such as yourself a bit of time...

Anyway, I'm really glad to hear that you worked it out. Please don't hesitate to post back if you have any further questions or feedback.

Also if you are working on an appliance that only includes open source software, then maybe we could look at adding it to the "official" TurnKey library? If you're interested in that, please push your code to GitHub (requires a free GitHub user account) and I'm more than happy to give some feedback and advice on meeting our requirements for inclusion.

Regardless, good luck with it!

Moiv's picture

Hi again,

The appliance I am building is based on the LAMP appliance but with php 7.2 installed from sury.org and the latest composer and symfony packages installed.

Not sure if this will meet the requirements for an official appliance?

The reason I am doing this is to play around with the latest symfony framework. I understand this is a bit bleeding edge for a debian based system.

Regardless, I do have this pushed to github as a private repo and I am happy to make it public. I was going to wait until I have used it a bit to make sure its working well :)

Jeremy Davis's picture

Thanks for sharing what you're working on. It sounds great!

Out of interest, you may already realise, but we do already have a Symfony appliance (based on LAMP). Although the current appliance includes PHP7.0 (from Debian) and installs Symfony 3.x LTS (as you'd be aware, the latest 4.x requires newer PHP). By default at build time the latest version of Composer should be installed.

I'm almost tempted to suggest that you have a go at updating the existing appliance, although I suspect that that might be a bit of a pain for existing 3.x users?! Perhaps we should consider forking the current appliance to create a "Symfony4" appliance? If you've any thoughts on that, I'd be interested to hear. Also if you're interested in having a go at that, I'd be happy to provide some input and guidance. We'd be more than happy to give you public credit for your work.

Also, we've recently made adjustments to "common" (namely here and here) to support ease of install of PHP 7.2 (we probably should also support 7.3 too).

A few of our (upcoming) appliance updates use the newer version of PHP (7.2) because they now require newer than what Debian provides (7.0). To leverage this new component of the build system, I'll try to walk you through it. To keep it targetted, I'll assume that you have forked the Symfony app build code and renamed it "symfony4". Where appropriate, I'll use the (soon to be released) updated Nextcloud appliance build code as an example:

  • First ensure that you have the latest commits for common (assuming that you haven't made adjustments to the local branch and the remote branch that it's tracking by default):
    cd /turnkey/fab/common
    git pull origin master
    
  • Then cd to symfony4 (your appliance build code) and edit the Makefile to include this line (i.e. as per in the Nextcloud appliance):
    PHP_VERSION=7.2
  • Then update the the plan (plan/main) to include the lamp72 plan (e.g. plan/main in Nextcloud). I.e.:
    //swap this line:
    #include <turnkey/lamp>
    //to look like this:
    #include <turnkey/lamp72>
    
  • Whilst editing the plan, also update the package names to reflect the PHP version. E.g. for Nextcloud (note the php-pear package does not include the php version).
From a glance, other things you'll need to adjust are in the conf.d/main script. Namely the PHP ini path (here) and the version of Symfony to install (here).

There are also likely other tweaks and adjustments required, but that should be a solid start... Any further questions or suggestions, I'd love to hear! :)

Jeremy Davis's picture

Actually, I think that the install method that we currently use for Symfony does not support 4.x, so it may require a little more work than I suggested... However, perhaps we can merge your conf script with what we have (inc the changes I also noted above) perhaps?

Moiv's picture

Thanks for your in depth response!

I had a look last night and decided that the existing symfony appliance was a better starting point and decided to start again based off that. Also, great minds think alike, I had already named the appliance symfony4 so it will not get confused with the current symfony appliance.

I saw the lamp72 plan in the common folder and figured someone was working on a method to use it however simply changing to that plan instead of lamp didn't work as the repo's weren't in the initial bootstrap but with that change to the Makefile that you have mentioned that should sort that out. I will make the change to the makefile as you have pointed out :)

So, realistically you have already done half the work by having the php7.2 stuff already done.

It will just be a matter of updating the symfony stuff in the main config and making whatever tweaks are nessesary.

I have just made my repo public at https://github.com/moiv/tkl-symfony4, this is the lamp based version, I will update it hopefully tonight with a new version forked off the current symfony appliance

Jeremy Davis's picture

It's awesome to have you looking into this! :)

Glad to hear that my post was useful. Please feel free to let me know if you get stuck on anything and I'll do my best to point you in the right direction.

Add new comment