Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
compiling_lxc_containers [2021/11/09 15:09] grandmabettycompiling_lxc_containers [2021/12/22 12:14] (current) – First step for unprivileged containers not needed anymore. grandmabetty
Line 12: Line 12:
  
 For good security reasons LXC containers on Proxmox are running in unprivileged mode by default. It just keeps the container isolated from your Proxmox host and therefore from other different systems running on it. Nevertheless you have indeed the possibility to run an LXC container in privileged mode for whatever reason if you want to. When compiling Batocera on LXC containers be aware that both, unprivileged and privileged mode, need some minor preparations which will cover you from running into compile errors. For good security reasons LXC containers on Proxmox are running in unprivileged mode by default. It just keeps the container isolated from your Proxmox host and therefore from other different systems running on it. Nevertheless you have indeed the possibility to run an LXC container in privileged mode for whatever reason if you want to. When compiling Batocera on LXC containers be aware that both, unprivileged and privileged mode, need some minor preparations which will cover you from running into compile errors.
 +
 +On your unprivileged or privileged LXC container command line do all the steps until the [[compile_batocera.linux#compilation|compilation]] step. Then, before starting to compile, do the following preparations for either unprivileged or privileged LXC containers:
  
 ==== Unprivileged containers ==== ==== Unprivileged containers ====
Line 23: Line 25:
 To prevent these compile error(s) according to file permissions on ''tar'' operations cause by missing tar option flags you need to make a new branch and edit the following files from Batocera Github source as follows: To prevent these compile error(s) according to file permissions on ''tar'' operations cause by missing tar option flags you need to make a new branch and edit the following files from Batocera Github source as follows:
  
-  - Make the following edits to the ''./buildroot/Makefile'' at ~line 457 <WRAP center round tip> +  - Make the following edits to the ''./buildroot/Config.in'' in the ''config BR2_TAR_OPTIONS'' at ~line 160 \\ \\ <WRAP center round tip> 
-the ''-c'' option shows you the line numbers within then ''nano'' editor, eg: ''nano -c ./buildroot/Makefile'' +the ''-c'' option shows you the line numbers within then ''nano'' editor, eg: ''nano ./buildroot/Config.in'' 
-</WRAP> <code>TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf</code> to <code>TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xfo</code> +</WRAP> <code>default ""</code> to <code>default "--no-same-owner"</code>
-  - Make the following edits to the ''./buildroot/Config.in'' in the ''config BR2_TAR_OPTIONS'' at ~line 160 <code>default ""</code> to <code>default "--no-same-owner"</code>+
   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk/dxvk.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk/dxvk.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>
   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk-nvapi/dxvk-nvapi.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk-nvapi/dxvk-nvapi.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>
   - Make sure all of the files have saved.   - Make sure all of the files have saved.
  
-Now you should be able to compile without file permission errors caused by missing tar options flags.+Now you should be able to compile without file permission errors caused by missing tar options flags. You can continue now from [[compile_batocera.linux#compilation|here]].
  
 ==== Privileged containers ==== ==== Privileged containers ====
Line 59: Line 60:
 </code> </code>
  
-Save the file, quit the editor and fire up your LXC container. Now you should be able to compile without //AppArmor// errors.+Save the file, quit the editor and fire up your LXC container. Now you should be able to compile without //AppArmor// errors so you can continue now from [[compile_batocera.linux#compilation|here]].
  
  • compiling_lxc_containers.1636470561.txt.gz
  • Last modified: 5 years ago
  • by grandmabetty