lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNAQMGYWfoid3-MJBfuABXC+L3=o5r=Yai4avMOqfcEq+og@mail.gmail.com>
Date: Tue, 6 Aug 2024 14:34:10 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Anders Roxell <anders.roxell@...aro.org>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] scripts: kconfig: merge_config: config files: add a
 trailing newline

On Mon, Aug 5, 2024 at 6:22 PM Anders Roxell <anders.roxell@...aro.org> wrote:
>
> When merging files without trailing newlines at the end of the file, two
> config fragments end up at the same row if file1.config doens't have a
> trailing newline at the end of the file.
>
> file1.config "CONFIG_1=y"
> file2.config "CONFIG_2=y"
> ./scripts/kconfig/merge_config.sh -m .config file1.config file2.config
>
> This will generate a .config looking like this.
> cat .config
> ...
> CONFIG_1=yCONFIG_2=y"
>
> Making sure so we add a newline at the end of every config file that is
> passed into the script.
>
> Signed-off-by: Anders Roxell <anders.roxell@...aro.org>
> ---


Applied to linux-kbuild/fixes.
Thanks.


>  scripts/kconfig/merge_config.sh | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
> index 902eb429b9db..0b7952471c18 100755
> --- a/scripts/kconfig/merge_config.sh
> +++ b/scripts/kconfig/merge_config.sh
> @@ -167,6 +167,8 @@ for ORIG_MERGE_FILE in $MERGE_LIST ; do
>                         sed -i "/$CFG[ =]/d" $MERGE_FILE
>                 fi
>         done
> +       # In case the previous file lacks a new line at the end
> +       echo >> $TMP_FILE
>         cat $MERGE_FILE >> $TMP_FILE
>  done
>
> --
> 2.43.0
>


-- 
Best Regards
Masahiro Yamada

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ