ceremcem / build-freecad-asm3

Build FreeCAD Asm3 inside a Debian container and run from there.
6 stars 0 forks source link

Re-build #22

Closed macdroid53 closed 2 years ago

macdroid53 commented 2 years ago

So, today I did a git pull on my RT source.

Went off to my build-freecad-asm3/tools directory and issued:

./auto.sh --freecad-src ~/freecadL3-source

And got:

Skipping setup: Container already exists at /var/lib/lxc/fc.

Run FreeCAD anytime with:

    ./freecad.sh
ceremcem commented 2 years ago

What is your actual purpose? Do you want to update FreeCAD by pulling new commits and re-compiling? If so, you need to issue the following command:

./update-fc.sh

This command will:

ceremcem commented 2 years ago

Your first clone (at ~/freecadL3-source) is just copied into the container while setting up the container. After you succesfully create the container and build FreeCAD, you can free to delete ~/freecadL3-source, because it's never used again.

macdroid53 commented 2 years ago

I have the source in ~/freecadL3-source. I cd'd to that directory and issues: git pull This gets the latest changes to the source. (Just noted what I did...)

I then want to build the latest source.

Am I to understand that ./update.sh accomplishes this updating the source in the container?

If so I unwisely used the lxc command line to remove the container and am in the process of building the container, again, from scratch with ./auto.sh.

Oops, I guess.

ceremcem commented 2 years ago

If so I unwisely used the lxc command line to remove the container and am in the process of building the container, again, from scratch with ./auto.sh.

That was very unfortunate... So yes, you need to re-create the container and so on. After that, use ./update-fc.sh whenever you want to update your FreeCAD binary.

ceremcem commented 2 years ago

My scripts are not magic. I just automated whole thing correctly. Please note that:

  1. You are creating a Debian 10 rootfs in /var/lib/lxc/fc/rootfs. The easiest way was to use LXC, so I used LXC here. If you like, you can create a rootfs any way you like, for example by using https://github.com/ceremcem/multistrap-helpers
  2. You are "logging in" into the "remote machine" by chroot. Think that like ssh, but this is more performant.
  3. Whenever you want to modify anything within the "remote machine", use ./attach.sh (name is like lxc-attach) to login and do an modification you like.
ceremcem commented 2 years ago

FYI: I just renamed the ./auto.sh to ./setup-all.sh to reduce the confusion about the purpose of that script and added an appropriate updating procedure to the README.

macdroid53 commented 2 years ago

Thanks for the explanations.

I admit I'm not savvy about what LXC does...first I'd heard of it was your use here. Hence my bumbling around in the LXC man pages and removing the container.

I actually read the auto.sh and update scripts and didn't put the whole thing together.

ceremcem commented 2 years ago

Sorry for missing information. Sometimes some information seems to be obvious while it's not.

Please consider closing the issue whenever you satisfied with the answers here.

macdroid53 commented 2 years ago

Sorry for missing information. Sometimes some information seems to be obvious while it's not.

Indeed, I always try to assume the lowest common denominator when do documentation, then those who find it obvious can ignore what they already know...and even then I miss stuff that the consumer doesn't find.

Please consider closing the issue whenever you satisfied with the answers here.

Done. Thanks again!