Re: [PATCH v3 1/2] imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive

2021-05-08 Thread Baptiste Jonglez
On 07-05-21, Sven Roederer wrote:
> Baptiste,
> 
> Am Freitag, 7. Mai 2021, 14:12:21 CEST schrieb Baptiste Jonglez:
> > 
> > Since these settings are hidden under "Advanced configuration options (for
> > developers)", I don't think it's really necessary to leave this kind of
> > implicit information, I would prefer having a valid .config file.
> > 
> 
> Just sent out v4 of this patch including all the mentioned changes.

Thanks, I just applied the v4!

Baptiste


signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 1/2] imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive

2021-05-07 Thread Sven Roederer
Baptiste,

Am Freitag, 7. Mai 2021, 14:12:21 CEST schrieb Baptiste Jonglez:
> 
> Since these settings are hidden under "Advanced configuration options (for
> developers)", I don't think it's really necessary to leave this kind of
> implicit information, I would prefer having a valid .config file.
> 

Just sent out v4 of this patch including all the mentioned changes.

> Maybe we should even ignore every setting under this "Advanced
> configuration options" menu when generating the SDK and Imagebuilder...
> But these two are a good start.
> 

Not sure what's all inside these options, but seems a good idea. 
Probably then a more niversal way should be used than handling every option 
individually.

Sven




___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 1/2] imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive

2021-05-07 Thread Baptiste Jonglez
On 06-05-21, Sven Roederer wrote:
> Baptiste,
> 
> Am Donnerstag, 6. Mai 2021, 13:13:46 CEST schrieb Baptiste Jonglez:
> > > 
> > > + $(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER was reset by
> > > Imagebuilder/' $(PKG_BUILD_DIR)/.config + $(SED)
> > > 's/^CONFIG_DOWNLOAD_FOLDER=.*/# CONFIG_DOWNLOAD_FOLDER was reset by
> > > Imagebuilder/' $(PKG_BUILD_DIR)/.config
> > Several scripts assume that this exact format is used for disabled config:
> > "# CONFIG_FOO is not set" (same as in the kernel).
> > 
> > While your patch works [probably because these scripts are not run when
> > using the ImageBuilder], it seems cleaner to stick to the standard format,
> > e.g. in case a .config file is copied around from an imagebuilder.
> > 
> 
> The intention to not use th normal "unset" message was to leave a pointer why 
> it's unset in contrast to the build-time file, in case someone relies on it. 
> But I'm happy to us the normal message here.

Since these settings are hidden under "Advanced configuration options (for
developers)", I don't think it's really necessary to leave this kind of
implicit information, I would prefer having a valid .config file.

Maybe we should even ignore every setting under this "Advanced
configuration options" menu when generating the SDK and Imagebuilder...
But these two are a good start.

Thanks,
Baptiste


signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 1/2] imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive

2021-05-06 Thread Sven Roederer
Baptiste,

Am Donnerstag, 6. Mai 2021, 13:13:46 CEST schrieb Baptiste Jonglez:
> > 
> > +   $(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER was reset by
> > Imagebuilder/' $(PKG_BUILD_DIR)/.config +   $(SED)
> > 's/^CONFIG_DOWNLOAD_FOLDER=.*/# CONFIG_DOWNLOAD_FOLDER was reset by
> > Imagebuilder/' $(PKG_BUILD_DIR)/.config
> Several scripts assume that this exact format is used for disabled config:
> "# CONFIG_FOO is not set" (same as in the kernel).
> 
> While your patch works [probably because these scripts are not run when
> using the ImageBuilder], it seems cleaner to stick to the standard format,
> e.g. in case a .config file is copied around from an imagebuilder.
> 

The intention to not use th normal "unset" message was to leave a pointer why 
it's unset in contrast to the build-time file, in case someone relies on it. 
But I'm happy to us the normal message here.

Sven



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH v3 1/2] imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive

2021-05-06 Thread Baptiste Jonglez
Hi,

On 26-04-21, Sven Roederer wrote:
> Using these config-options to customize the folders used at build-time
> makes these folder settings appear in generated archive. This causes the
> imagebuilder to be not portable, as it's going to use the build-time folders
> on the new systems. Errors look like:
> 
>   mkdir: cannot create directory '/mnt/build': Permission denied
>   Makefile:116: recipe for target '_call_image' failed
>   make[2]: *** [_call_image] Error 1
>   Makefile:241: recipe for target 'image' failed
>   make[1]: *** [image] Error 2
> 
> The build-time settings of these folders are passed into the archives via
> .config file.
> The expected behavior is that after unpacking the imagebuilder acts like
> these settings have their defaults, using intree folders. So unset the
> build-time settings.
> 
> Signed-off-by: Sven Roederer 
> ---
>  target/imagebuilder/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
> index f9c08776a8..ef7fd3f25e 100644
> --- a/target/imagebuilder/Makefile
> +++ b/target/imagebuilder/Makefile
> @@ -29,6 +29,8 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
>   mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
>   $(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
>   -cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
> + $(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER was reset by 
> Imagebuilder/' $(PKG_BUILD_DIR)/.config
> + $(SED) 's/^CONFIG_DOWNLOAD_FOLDER=.*/# CONFIG_DOWNLOAD_FOLDER was reset 
> by Imagebuilder/' $(PKG_BUILD_DIR)/.config

Several scripts assume that this exact format is used for disabled config:
"# CONFIG_FOO is not set" (same as in the kernel).

While your patch works [probably because these scripts are not run when
using the ImageBuilder], it seems cleaner to stick to the standard format,
e.g. in case a .config file is copied around from an imagebuilder.

Baptiste


signature.asc
Description: PGP signature
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH v3 1/2] imagebuilder: unset BINARY_FOLDER and DOWNLOAD_FOLDER in final archive

2021-04-26 Thread Sven Roederer
Using these config-options to customize the folders used at build-time
makes these folder settings appear in generated archive. This causes the
imagebuilder to be not portable, as it's going to use the build-time folders
on the new systems. Errors look like:

  mkdir: cannot create directory '/mnt/build': Permission denied
  Makefile:116: recipe for target '_call_image' failed
  make[2]: *** [_call_image] Error 1
  Makefile:241: recipe for target 'image' failed
  make[1]: *** [image] Error 2

The build-time settings of these folders are passed into the archives via
.config file.
The expected behavior is that after unpacking the imagebuilder acts like
these settings have their defaults, using intree folders. So unset the
build-time settings.

Signed-off-by: Sven Roederer 
---
 target/imagebuilder/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index f9c08776a8..ef7fd3f25e 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -29,6 +29,8 @@ $(BIN_DIR)/$(IB_NAME).tar.xz: clean
mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
$(PKG_BUILD_DIR)/target $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
-cp $(TOPDIR)/.config $(PKG_BUILD_DIR)/.config
+   $(SED) 's/^CONFIG_BINARY_FOLDER=.*/# CONFIG_BINARY_FOLDER was reset by 
Imagebuilder/' $(PKG_BUILD_DIR)/.config
+   $(SED) 's/^CONFIG_DOWNLOAD_FOLDER=.*/# CONFIG_DOWNLOAD_FOLDER was reset 
by Imagebuilder/' $(PKG_BUILD_DIR)/.config
$(CP) -L \
$(INCLUDE_DIR) $(SCRIPT_DIR) \
$(TOPDIR)/rules.mk \
-- 
2.17.1


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel