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]
Date:   Mon, 2 Oct 2023 16:09:03 -0700
From:   Nathan Chancellor <nathan@...nel.org>
To:     Masahiro Yamada <masahiroy@...nel.org>
Cc:     linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Nicolas Schier <nicolas@...sle.eu>
Subject: Re: [PATCH] kbuild: rpm-build: generate kernel.spec in
 rpmbuild/SPECS/

On Sat, Sep 30, 2023 at 07:38:47PM +0900, Masahiro Yamada wrote:
> kernel.spec is the last piece that resides outside the rpmbuild/
> directory. Move all RPM-related files to rpmbuild/ consistently.
> 
> Signed-off-by: Masahiro Yamada <masahiroy@...nel.org>

Reviewed-by: Nathan Chancellor <nathan@...nel.org>
Tested-by: Nathan Chancellor <nathan@...nel.org>

> ---
> 
>  .gitignore                 | 1 -
>  Makefile                   | 2 +-
>  scripts/Makefile.package   | 8 ++++----
>  scripts/package/mkspec     | 6 ++++++
>  scripts/remove-stale-files | 2 +-
>  5 files changed, 12 insertions(+), 7 deletions(-)
> 
> diff --git a/.gitignore b/.gitignore
> index 0bbae167bf93..98274e1160d7 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -74,7 +74,6 @@ modules.order
>  #
>  # RPM spec file (make rpm-pkg)
>  #
> -/kernel.spec
>  /rpmbuild/
>  
>  #
> diff --git a/Makefile b/Makefile
> index 3de08c780c74..9e77a58207a8 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1486,7 +1486,7 @@ MRPROPER_FILES += include/config include/generated          \
>  		  certs/signing_key.pem \
>  		  certs/x509.genkey \
>  		  vmlinux-gdb.py \
> -		  kernel.spec rpmbuild \
> +		  rpmbuild \
>  		  rust/libmacros.so
>  
>  # clean - Delete most, but leave enough to build external modules
> diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> index 2bcab02da965..05b8c3e29aac 100644
> --- a/scripts/Makefile.package
> +++ b/scripts/Makefile.package
> @@ -69,9 +69,9 @@ $(linux-tarballs): .tmp_HEAD FORCE
>  # ---------------------------------------------------------------------------
>  
>  quiet_cmd_mkspec = GEN     $@
> -      cmd_mkspec = $(srctree)/scripts/package/mkspec > $@
> +      cmd_mkspec = $(srctree)/scripts/package/mkspec $@
>  
> -kernel.spec: FORCE
> +rpmbuild/SPECS/kernel.spec: FORCE
>  	$(call cmd,mkspec)
>  
>  PHONY += rpm-sources
> @@ -88,8 +88,8 @@ srcrpm-pkg: private build-type := s
>  binrpm-pkg: private build-type := b
>  
>  rpm-pkg srcrpm-pkg: rpm-sources
> -rpm-pkg srcrpm-pkg binrpm-pkg: kernel.spec
> -	+$(strip rpmbuild -b$(build-type) kernel.spec \
> +rpm-pkg srcrpm-pkg binrpm-pkg: rpmbuild/SPECS/kernel.spec
> +	+$(strip rpmbuild -b$(build-type) rpmbuild/SPECS/kernel.spec \
>  	--define='_topdir $(abspath rpmbuild)' \
>  	$(if $(filter a b, $(build-type)), \
>  		--target $(UTS_MACHINE)-linux --build-in-place --noprep --define='_smp_mflags %{nil}' \
> diff --git a/scripts/package/mkspec b/scripts/package/mkspec
> index d41608efb747..ce201bfa8377 100755
> --- a/scripts/package/mkspec
> +++ b/scripts/package/mkspec
> @@ -9,6 +9,12 @@
>  #	Patched for non-x86 by Opencon (L) 2002 <opencon@....skydome.net>
>  #
>  
> +output=$1
> +
> +mkdir -p "$(dirname "${output}")"
> +
> +exec >"${output}"
> +
>  if grep -q CONFIG_MODULES=y include/config/auto.conf; then
>  echo '%define with_devel %{?_without_devel: 0} %{?!_without_devel: 1}'
>  else
> diff --git a/scripts/remove-stale-files b/scripts/remove-stale-files
> index 8b1a636f8543..385610fe3936 100755
> --- a/scripts/remove-stale-files
> +++ b/scripts/remove-stale-files
> @@ -38,4 +38,4 @@ rm -rf include/ksym
>  
>  find . -name '*.usyms' | xargs rm -f
>  
> -rm -f binkernel.spec
> +rm -f *.spec
> -- 
> 2.39.2
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ