Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'kbuild-fixes-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

- fix build errors in binrpm-pkg and bindeb-pkg targets

- fix false positive matches in merge_config.sh

- fix build version mismatch in deb-pkg target

- fix dtbs_install handling in (bin)deb-pkg target

- revert a commit that allows setlocalversion to write to source tree

* tag 'kbuild-fixes-v4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
builddeb: Fix inclusion of dtbs in debian package
Revert "scripts/setlocalversion: git: Make -dirty check more robust"
kbuild: deb-pkg: fix too low build version number
kconfig: merge_config: avoid false positive matches from comment lines
kbuild: deb-pkg: fix bindeb-pkg breakage when O= is used
kbuild: rpm-pkg: fix binrpm-pkg breakage when O= is used

+19 -14
+4 -3
scripts/kconfig/merge_config.sh
··· 102 102 fi 103 103 104 104 MERGE_LIST=$* 105 - SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)[= ].*/\2/p" 105 + SED_CONFIG_EXP1="s/^\(${CONFIG_PREFIX}[a-zA-Z0-9_]*\)=.*/\1/p" 106 + SED_CONFIG_EXP2="s/^# \(${CONFIG_PREFIX}[a-zA-Z0-9_]*\) is not set$/\1/p" 106 107 107 108 TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) 108 109 ··· 117 116 echo "The merge file '$MERGE_FILE' does not exist. Exit." >&2 118 117 exit 1 119 118 fi 120 - CFG_LIST=$(sed -n "$SED_CONFIG_EXP" $MERGE_FILE) 119 + CFG_LIST=$(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $MERGE_FILE) 121 120 122 121 for CFG in $CFG_LIST ; do 123 122 grep -q -w $CFG $TMP_FILE || continue ··· 160 159 161 160 162 161 # Check all specified config values took (might have missed-dependency issues) 163 - for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do 162 + for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do 164 163 165 164 REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) 166 165 ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG")
+3 -3
scripts/package/builddeb
··· 81 81 cp System.map "$tmpdir/boot/System.map-$version" 82 82 cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version" 83 83 fi 84 - cp "$($MAKE -s image_name)" "$tmpdir/$installed_image_path" 84 + cp "$($MAKE -s -f $srctree/Makefile image_name)" "$tmpdir/$installed_image_path" 85 85 86 - if grep -q "^CONFIG_OF=y" $KCONFIG_CONFIG ; then 86 + if grep -q "^CONFIG_OF_EARLY_FLATTREE=y" $KCONFIG_CONFIG ; then 87 87 # Only some architectures with OF support have this target 88 - if grep -q dtbs_install "${srctree}/arch/$SRCARCH/Makefile"; then 88 + if [ -d "${srctree}/arch/$SRCARCH/boot/dts" ]; then 89 89 $MAKE KBUILD_SRC= INSTALL_DTBS_PATH="$tmpdir/usr/lib/$packagename" dtbs_install 90 90 fi 91 91 fi
+5 -2
scripts/package/mkdebian
··· 88 88 version=$KERNELRELEASE 89 89 if [ -n "$KDEB_PKGVERSION" ]; then 90 90 packageversion=$KDEB_PKGVERSION 91 + revision=${packageversion##*-} 91 92 else 92 93 revision=$(cat .version 2>/dev/null||echo 1) 93 94 packageversion=$version-$revision ··· 206 205 #!$(command -v $MAKE) -f 207 206 208 207 build: 209 - \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= 208 + \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \ 209 + KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= 210 210 211 211 binary-arch: 212 - \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} KBUILD_SRC= intdeb-pkg 212 + \$(MAKE) KERNELRELEASE=${version} ARCH=${ARCH} \ 213 + KBUILD_BUILD_VERSION=${revision} KBUILD_SRC= intdeb-pkg 213 214 214 215 clean: 215 216 rm -rf debian/*tmp debian/files
+6 -5
scripts/package/mkspec
··· 12 12 # how we were called determines which rpms we build and how we build them 13 13 if [ "$1" = prebuilt ]; then 14 14 S=DEL 15 + MAKE="$MAKE -f $srctree/Makefile" 15 16 else 16 17 S= 17 18 fi ··· 79 78 $S %setup -q 80 79 $S 81 80 $S %build 82 - $S make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} 81 + $S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} 83 82 $S 84 83 %install 85 84 mkdir -p %{buildroot}/boot 86 85 %ifarch ia64 87 86 mkdir -p %{buildroot}/boot/efi 88 - cp \$(make image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE 87 + cp \$($MAKE image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE 89 88 ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/ 90 89 %else 91 - cp \$(make image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE 90 + cp \$($MAKE image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE 92 91 %endif 93 - $M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_install 94 - make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr KBUILD_SRC= headers_install 92 + $M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install 93 + $MAKE %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install 95 94 cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE 96 95 cp .config %{buildroot}/boot/config-$KERNELRELEASE 97 96 bzip2 -9 --keep vmlinux
+1 -1
scripts/setlocalversion
··· 74 74 fi 75 75 76 76 # Check for uncommitted changes 77 - if git status -uno --porcelain | grep -qv '^.. scripts/package'; then 77 + if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then 78 78 printf '%s' -dirty 79 79 fi 80 80