Re: [PATCHv2] Check generated config files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2016-08-17 at 12:38 -0700, Miguel Flores Silverio wrote:
> Double check configuration files in order to avoid discrepancies
> like this: https://bugzilla.redhat.com/show_bug.cgi?id=1347454
>
> Signed-off-by: Miguel Flores Silverio <floresmigu3l@xxxxxxxxx>

-- (or ---?) here, please.

>  * PATCHv1
>    - Check config files at compilation time
> 
>  * PATCHv2
>    - Check config files before and after oldconfig is aplied
>    - Save log of mismatches in logs directory in tree
>    
> ---
>  kernel.spec | 16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel.spec b/kernel.spec
> index d6856d2..d12b74b 100644
> --- a/kernel.spec
> +++ b/kernel.spec
> @@ -1161,7 +1161,6 @@ if [ ! -d .git ]; then
>      git commit -a -q -m "baseline"
>  fi
>  
> -
>  # released_kernel with possible stable updates
>  %if 0%{?stable_base}
>  # This is special because the kernel spec is hell and nothing is
> consistent
> @@ -1181,6 +1180,19 @@ make -f %{SOURCE19} config-release
>  %endif
>  %endif
>  
> +# Used to check for discrepancies in configuration files
> +CheckConfigs() {
> +    if [ ! -d ../../logs ];then
> +	mkdir ../../logs
> +    fi
> +    GEN_CONFIG=$1
> +    FINAL_CONFIG=$2
> +    Arch=$3
> +    awk 'NR==FNR{gen_cofigs[$1]++;next;}

gen_cofigs here ...

> +    !($0 in gen_configs)' $FINAL_CONFIG $GEN_CONFIG > 

but gen_configs here. Looks suspicious. Did you actually test this?

> ../../logs/config-check-$Arch.log
> +    rm $GEN_CONFIG
> +}
> +
>  # Dynamically generate kernel .config files from config-* files
>  make -f %{SOURCE20} VERSION=%{version} configs
>  
> @@ -1227,6 +1239,7 @@ rm -f kernel-%{version}-*debug.config
>  # now run oldconfig over all the config files
>  for i in *.config
>  do
> +  cat $i > temp-$i
>    mv $i .config
>    Arch=`head -1 .config | cut -b 3-`
>    make ARCH=$Arch listnewconfig | grep -E '^CONFIG_' >.newoptions ||
> true
> @@ -1240,6 +1253,7 @@ do
>    make ARCH=$Arch oldnoconfig
>    echo "# $Arch" > configs/$i
>    cat .config >> configs/$i
> +  CheckConfigs temp-$i configs/$i $Arch
>  done
>  # end of kernel config
>  %endif

Thanks,


Paul Bolle
_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux