Jens's picture

I’m new to TurnKey Linux, and I want to modify an existing app.
I’m using turnkey-tkldev-14.1-jessie-amd64.ova.

I can make that app as well as core as described there:
https://github.com/turnkeylinux-apps/tkldev/tree/master/docs
The recommended “Setup” linked there works fine for me.

However, I’m stuck at “Hello world”:
https://github.com/turnkeylinux-apps/tkldev/blob/master/docs/helloworld.rst
Executing the first command fails already:
fab-chroot build/root.sandbox/
mount: mount point /turnkey/fab/products/core/build/root.sandbox/proc does not exist

In fact, the build directories are all empty (after make, mind you):
ls build/root.*
build/root.spec

build/root.build:

build/root.patched:

build/root.sandbox:

What do I need to do for non-empty directories?

Probably related: All packages for the app are downloaded and installed for
every invocation of make, which takes ages.  How to set up the system such
that only updated packages get downloaded and installed?

Thanks
Jens

 

Forum: 
Tags: 
Jeremy Davis's picture

Sorry the docs are a bit out of date. After the release of v14.0 (v14.x is based on Debian Jessie) we discovered a regression that made the sandbox do some weird things. We discovered a fix, but that broke the sandbox altogether. We ended up just leaving that as is for now until we can work out a better/proper resolution. But obviously that leaves our docs broken...

Hopefully the discussion further down in that last link may help?

Apologies that the current docs lead you astray. Hopefully we'll tidy that up ASAP, but for now, you'll just need to ignore the bits of the docs that discuss the sandbox...

Iuri de Araujo Sampaio's picture

https://github.com/turnkeylinux-apps/tkldev/blob/master/docs/helloworld.rst

 

Following the tutorial, I ran the command line 

 

root@tkldev .../products/core# fab-chroot build/root.sandbox/

and got the same error

 

mount: mount point /turnkey/fab/products/core/build/root.sandbox/proc does not exist

Traceback (most recent call last):

  File "/usr/lib/fab/wrapper.py", line 34, in <module>

    CliWrapper.main()

  File "/usr/lib/python2.7/dist-packages/pyproject.py", line 388, in main

    commands.run(name, args)

  File "/usr/lib/python2.7/dist-packages/pyproject.py", line 261, in run

    command.module.main()

  File "/usr/lib/fab/pylib/cmd_chroot.py", line 110, in main

    chroot = Chroot(newroot, environ=get_environ(env_conf))

  File "/usr/lib/python2.7/dist-packages/chroot.py", line 69, in __init__

    self.magicmounts = MagicMounts(self.path)

  File "/usr/lib/python2.7/dist-packages/chroot.py", line 28, in __init__

    self.mount()

  File "/usr/lib/python2.7/dist-packages/chroot.py", line 39, in mount

    executil.system("mount -t proc", "proc-chroot", self.paths.proc)

  File "/usr/lib/python2.7/dist-packages/executil.py", line 56, in system

    raise ExecError(command, exitcode)

executil.ExecError: non-zero exitcode (32) for command: mount -t proc 'proc-chroot'  '/turnkey/fab/products/core/build/root.sandbox/proc'

Jeremy Davis's picture

And to add to the issues, in v15.x we we had to move from auFS to OverlayFS. Because of differences in functionality we need to rewrite of one of the underlying tools we use (called 'deck'). The rewrite was quite minimalist and primarily done by Alon (in a hurray, for his own internal needs at the time) and didn't include all the features that the original deck provides. We have extended Alon's rewrite since, but in part because of OverlayFS, it still doesn't work the same way as it used to.

I really need to update the docs and I'm really sorry that we haven't done a good job of keeping them up to date.

So to recap, the 'sandbox' is no longer created. Plus the "decks" (e.g. root.build, root.patched', etc) don't work the same as they used to.

It's been a while since I did it, but IIRC you can still play around in the chroot, but you're probably best off just building to root.patched (i.e. 'make root.patched') and then chroot in. Then you should be able to complete the build... Unfortunately, I haven't tested that so I'm not 100% sure it'll work...

Apologies again about the misalignment between the docs and reality...

Jeremy Davis's picture

Out of interest, the way I usually develop a new appliance (I use a local TKLDev VM) goes something like this:

  • select "best fit" base appliance and clone repo to products directory
  • remove all superfluous build code from the conf script, add as much as I'm relatively sure will work, add an 'exit 1' to the end of the last conf script (so that the build will stop after applying the last conf script)
  • ensure that the required dependencies (from debian repos) are in the plan run make
  • chroot into root.patched and test. Continue developing build code as required, ensure that any new code developed is added back to the conf script.
  • Once happy with that, rebuild (it should only rebuild root.patched)
  • Test from root.patched again and tweak buildcode as required
  • Remove 'exit 1' from conf script and build all the way to ISO
  • install ISO in a new VM
  • take a snapsot of the default VM (so I can "roll back" if need be)
  • test iso and develop any remaining code required (I find I almost always miss something...). Ensure that you add any new code back to the conf script and/or overlay (i.e. within the TKLDev build code)
  • If changes were required, then on TKLDev rerun the build from scratch and do a final install of the new ISO into a new VM

I hope that is of some value for you...

Add new comment