Hi Yuvraaj,

I think you mistakenly consider "Sailfish OS Platform SDK" and Scratchbox2 for 
the same thing. Sailfish OS Platform SDK is a root filesystem image with 
Scratchbox2 and other tools preinstalled. In theory you could install sb2 
directly on your workstation but the SDK exists for your convenience. chroot 
and bind mount is used to enter the SDK but sb2 itself is not a chroot nor bind 
mount based - sb2 runs with normal user privileges.

Normally you enter the SDK using the /mer-sdk-chroot script which basically 
does bind mount and chroot. I am quite sure it is possible to repackage the SDK 
as a Docker image without the need for superuser privileges. Look into 
mer-sdk-chroot to learn what is needed to enter the SDK.

You can read more about the various components of Sailfish OS SDK e.g. here 
https://sailfishos.org/wiki/Platform_SDK_Target_Installation#Platform_SDK_Targets_and_Toolings

BR,
Martin

________________________________
From: Devel [devel-boun...@lists.sailfishos.org] on behalf of Yuvraaj Kelkar 
[yuvr...@gmail.com]
Sent: Sunday, December 31, 2017 12:21 AM
To: Sailfish OS Developers
Subject: Re: [SailfishDevel] Compile without Scratchbox2 environment

The plan is to package up each Sailfish target into a Docker image to be used 
in a CI system.
For my purposes, Docker is a easy-to-use chroot that's also easy to share and 
deploy as compared to a virtual machine with a toolchain in sb2.

I do know that sb2 is more than just a chroot with bind mounts, but thats all I 
really need: a pre-populated chroot with bind mounts. Docker fits that bill 
quite nicely.

No, I don't want multiple targets in the same image.
No, I don't need the management of multiple build targets within the same 
Docker image.
I don't want any of the other sb2 features: I dont need Xephyr, I don't need to 
automagically run the compiled binary under qemu, etc.

Necessity is the mother of this re-invention.
Can you help?

Thanks,
-Yuvraaj

On Sat, Dec 30, 2017 at 2:23 PM, Tone Kastlunger 
<users.giulie...@gmail.com<redir.aspx?REF=GuDMcfCHuB8brjoJB2IasZaQCcD5TRFZ8lyjmzGUDxvEBSHKclbVCAFtYWlsdG86dXNlcnMuZ2l1bGlldHRhQGdtYWlsLmNvbQ..>>
 wrote:
I have personally nothing against docker.
I think however what you are trying to do is a bit unusual, to say the least.
Intending to use (at least as I understood it) docker as a substitute for SB2 
is "wrong" (if you pass me the word).
sb2 is more than "just" a virtualization layer bind-mounting directories. It 
manages build targets, for one, which docker does not know about,
and never will. Yes, of course you can have a single docker image for a single 
build target, with all the replica which comes with it;
or you can have one docker image with multiple toolchains / target envs; but 
then you have rolled your own sb2.

I cant but recall the words : those who do not understand Unix, are doomed to 
reinvent it, poorly.

Best,
tortoisedoc

On Fri, Dec 22, 2017 at 10:09 AM, Yuvraaj Kelkar 
<yuvr...@gmail.com<redir.aspx?REF=IVTh18ePPtLLjaQoUsMPs47PrfMXSzoFoaEyiXX4kTfEBSHKclbVCAFtYWlsdG86eXV2cmFhakBnbWFpbC5jb20.>>
 wrote:
I want to create a Docker image for Sailfish development.
I know it is possible to create a Docker image with sb2 in it; I've done that 
for other sb2 toolchains - Maemo and Harmattan.
However, those images can only run as privileged Docker containers because of 
sb2 bind mounts (I think).

I'd like to avoid being forced to run privileged Docker containers.
Also, running sb2 inside a Docker container seems like inception.

If it is possible to install the Sailfish toolchain without sb2, it should be 
possible to capture that into a non-privileged Docker image. (I hope)

The documentation for anything related to scratchbox is either hard to google 
or has broken links to 
maemo.org<redir.aspx?REF=8iQEVyQxyFm_eS2gZlNYK5u_P4QpHfErlhTQ47Fpe_jEBSHKclbVCAFodHRwOi8vbWFlbW8ub3Jn>
 or is just non-existant.

As to why Docker and not sb2: "Why not?" and "Better documentation"

Thanks,
-Yuvraaj

On Thu, Dec 21, 2017 at 11:56 PM, Tone Kastlunger 
<users.giulie...@gmail.com<redir.aspx?REF=GuDMcfCHuB8brjoJB2IasZaQCcD5TRFZ8lyjmzGUDxvEBSHKclbVCAFtYWlsdG86dXNlcnMuZ2l1bGlldHRhQGdtYWlsLmNvbQ..>>
 wrote:
Out of curiosity, what's blocking you from using scratchbox?

On Fri, Dec 22, 2017 at 7:53 AM, Yuvraaj Kelkar 
<yuvr...@gmail.com<redir.aspx?REF=IVTh18ePPtLLjaQoUsMPs47PrfMXSzoFoaEyiXX4kTfEBSHKclbVCAFtYWlsdG86eXV2cmFhakBnbWFpbC5jb20.>>
 wrote:
Ha!
Any other ideas?

Thanks,
-Yuvraaj

On 12/21/17 8:08 PM, Juice wrote:
Yuvraaj Kelkar kirjoitti torstai 21. joulukuuta 2017:
Hi all,

Is it possible to compile for sailfish without using scratchbox2?

Thanks,
-Yuvraaj

Sure, just compile in the device itself... :)

   - juice -



_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org<redir.aspx?REF=iDdEYnSVhPuMyplsrwY6asURlPc4i6XPveyHlxKu1A_EBSHKclbVCAFtYWlsdG86ZGV2ZWwtdW5zdWJzY3JpYmVAbGlzdHMuc2FpbGZpc2hvcy5vcmc.>


_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org<redir.aspx?REF=iDdEYnSVhPuMyplsrwY6asURlPc4i6XPveyHlxKu1A_EBSHKclbVCAFtYWlsdG86ZGV2ZWwtdW5zdWJzY3JpYmVAbGlzdHMuc2FpbGZpc2hvcy5vcmc.>


_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org<redir.aspx?REF=iDdEYnSVhPuMyplsrwY6asURlPc4i6XPveyHlxKu1A_EBSHKclbVCAFtYWlsdG86ZGV2ZWwtdW5zdWJzY3JpYmVAbGlzdHMuc2FpbGZpc2hvcy5vcmc.>


_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to 
devel-unsubscr...@lists.sailfishos.org<redir.aspx?REF=iDdEYnSVhPuMyplsrwY6asURlPc4i6XPveyHlxKu1A_EBSHKclbVCAFtYWlsdG86ZGV2ZWwtdW5zdWJzY3JpYmVAbGlzdHMuc2FpbGZpc2hvcy5vcmc.>

_______________________________________________
SailfishOS.org Devel mailing list
To unsubscribe, please send a mail to devel-unsubscr...@lists.sailfishos.org

Reply via email to