diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-09-30 10:10:08 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-11-14 23:19:01 +0900 |
commit | 002494d87d51cb87a4dd7bd11743113cd759e714 (patch) | |
tree | 6221b14850f9aba8f4a05cd78ba65acedd5ca041 /scripts | |
parent | 0b7f12f5912de636a9c1671ee343f31f21c42b2f (diff) | |
download | linux-002494d87d51cb87a4dd7bd11743113cd759e714.tar.gz linux-002494d87d51cb87a4dd7bd11743113cd759e714.tar.bz2 linux-002494d87d51cb87a4dd7bd11743113cd759e714.zip |
kbuild: rpm-pkg: replace $RPM_BUILD_ROOT with %{buildroot}
$RPM_BUILD_ROOT must be escaped to prevent shell from expanding it
when generating the spec file.
%{build_root} is more readable than \$RPM_BUILD_ROOT.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/package/mkspec | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index d352a0188770..280027fad991 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec @@ -81,30 +81,30 @@ $S %build $S make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release} $S %install - mkdir -p \$RPM_BUILD_ROOT/boot + mkdir -p %{buildroot}/boot %ifarch ia64 - mkdir -p \$RPM_BUILD_ROOT/boot/efi - cp \$(make image_name) \$RPM_BUILD_ROOT/boot/efi/vmlinuz-$KERNELRELEASE - ln -s efi/vmlinuz-$KERNELRELEASE \$RPM_BUILD_ROOT/boot/ + mkdir -p %{buildroot}/boot/efi + cp \$(make image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE + ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/ %else - cp \$(make image_name) \$RPM_BUILD_ROOT/boot/vmlinuz-$KERNELRELEASE + cp \$(make image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE %endif -$M make %{?_smp_mflags} INSTALL_MOD_PATH=\$RPM_BUILD_ROOT KBUILD_SRC= modules_install - make %{?_smp_mflags} INSTALL_HDR_PATH=\$RPM_BUILD_ROOT/usr KBUILD_SRC= headers_install - cp System.map \$RPM_BUILD_ROOT/boot/System.map-$KERNELRELEASE - cp .config \$RPM_BUILD_ROOT/boot/config-$KERNELRELEASE +$M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_install + make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr KBUILD_SRC= headers_install + cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE + cp .config %{buildroot}/boot/config-$KERNELRELEASE bzip2 -9 --keep vmlinux - mv vmlinux.bz2 \$RPM_BUILD_ROOT/boot/vmlinux-$KERNELRELEASE.bz2 -$S$M rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/build -$S$M rm -f \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE/source -$S$M mkdir -p \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE -$S$M tar cf - . $EXCLUDES | tar xf - -C \$RPM_BUILD_ROOT/usr/src/kernels/$KERNELRELEASE -$S$M cd \$RPM_BUILD_ROOT/lib/modules/$KERNELRELEASE + mv vmlinux.bz2 %{buildroot}/boot/vmlinux-$KERNELRELEASE.bz2 +$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/build +$S$M rm -f %{buildroot}/lib/modules/$KERNELRELEASE/source +$S$M mkdir -p %{buildroot}/usr/src/kernels/$KERNELRELEASE +$S$M tar cf - . $EXCLUDES | tar xf - -C %{buildroot}/usr/src/kernels/$KERNELRELEASE +$S$M cd %{buildroot}/lib/modules/$KERNELRELEASE $S$M ln -sf /usr/src/kernels/$KERNELRELEASE build $S$M ln -sf /usr/src/kernels/$KERNELRELEASE source %clean - rm -rf \$RPM_BUILD_ROOT + rm -rf %{buildroot} %post if [ -x /sbin/installkernel -a -r /boot/vmlinuz-$KERNELRELEASE -a -r /boot/System.map-$KERNELRELEASE ]; then |