| Both sides previous revision Previous revision Next revision | Previous revision |
| compiling_lxc_containers [2021/11/09 15:21] – grandmabetty | compiling_lxc_containers [2021/12/22 12:14] (current) – First step for unprivileged containers not needed anymore. grandmabetty |
|---|
| 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 [[https://wiki.batocera.org/compile_batocera.linux#compilation|this step]]. Then, before starting to compile, do the following preparations for either unprivileged or privileged LXC containers: | 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 ==== |
| 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> |