[trusty/retpoline-hints,3/3] UBUNTU: [Packaging] include the retpoline extractor in the headers

Message ID 20180403165249.15489-8-apw@canonical.com
State New
Headers show
Series
  • Untitled series #37214
Related show

Commit Message

Andy Whitcroft April 3, 2018, 4:52 p.m.
BugLink: http://bugs.launchpad.net/bugs/1760876
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 debian/rules                    | 6 +++++-
 debian/rules.d/2-binary-arch.mk | 2 ++
 scripts/Makefile.build          | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

Comments

Stefan Bader April 4, 2018, 10:06 a.m. | #1
On 03.04.2018 18:52, Andy Whitcroft wrote:
> BugLink: http://bugs.launchpad.net/bugs/1760876
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>

> ---

Same as before...

>  debian/rules                    | 6 +++++-
>  debian/rules.d/2-binary-arch.mk | 2 ++
>  scripts/Makefile.build          | 2 +-
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/debian/rules b/debian/rules
> index 3bd11997b59e..5eee4785c556 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -90,10 +90,14 @@ clean: debian/control
>  	# Install the copyright information.
>  	cp $(DEBIAN)/copyright debian/copyright
>  
> +	# Install the retpoline extractor.
> +	cp $(DROOT)/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one
> +
>  distclean: clean
>  	rm -rf $(DROOT)/control $(DROOT)/control.stub $(DEBIAN)/control.stub \
>  		$(DEBIAN)/d-i/kernel-versions debian/changelog \
> -		debian/control debian/control.stub debian/copyright
> +		debian/control debian/control.stub debian/copyright \
> +		scripts/ubuntu-retpoline-extract-one
>  
>  # Builds the image, arch headers and debug packages
>  include $(DROOT)/rules.d/2-binary-arch.mk
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 3573dc7c149f..504a48b89b1e 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -267,6 +267,8 @@ ifeq ($(build_arch),powerpc)
>  	mkdir -p $(hdrdir)/arch/powerpc/lib
>  	cp $(builddir)/build-$*/arch/powerpc/lib/*.o $(hdrdir)/arch/powerpc/lib
>  endif
> +	# Copy over the new retpoline extractor.
> +	cp scripts/ubuntu-retpoline-extract-one $(hdrdir)/scripts
>  	# Script to symlink everything up
>  	$(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
>  	# The build symlink
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 82e8403af569..645677c3d3f2 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -292,7 +292,7 @@ cmd_record_mcount = 						\
>  endif
>  
>  ifdef CONFIG_RETPOLINE
> -cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/debian/scripts/retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
> +cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/scripts/ubuntu-retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
>  else
>  cmd_ubuntu_retpoline =
>  endif
>
Kleber Sacilotto de Souza April 4, 2018, 11:23 a.m. | #2
On 04/03/18 18:52, Andy Whitcroft wrote:
> BugLink: http://bugs.launchpad.net/bugs/1760876
> Signed-off-by: Andy Whitcroft <apw@canonical.com>

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

Same comment as Stefan's regarding the changes description.

Compiled tested along with the retpoline-hints pull request changes on
all supported architectures.


Kleber

> ---
>  debian/rules                    | 6 +++++-
>  debian/rules.d/2-binary-arch.mk | 2 ++
>  scripts/Makefile.build          | 2 +-
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/debian/rules b/debian/rules
> index 3bd11997b59e..5eee4785c556 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -90,10 +90,14 @@ clean: debian/control
>  	# Install the copyright information.
>  	cp $(DEBIAN)/copyright debian/copyright
>  
> +	# Install the retpoline extractor.
> +	cp $(DROOT)/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one
> +
>  distclean: clean
>  	rm -rf $(DROOT)/control $(DROOT)/control.stub $(DEBIAN)/control.stub \
>  		$(DEBIAN)/d-i/kernel-versions debian/changelog \
> -		debian/control debian/control.stub debian/copyright
> +		debian/control debian/control.stub debian/copyright \
> +		scripts/ubuntu-retpoline-extract-one
>  
>  # Builds the image, arch headers and debug packages
>  include $(DROOT)/rules.d/2-binary-arch.mk
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 3573dc7c149f..504a48b89b1e 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -267,6 +267,8 @@ ifeq ($(build_arch),powerpc)
>  	mkdir -p $(hdrdir)/arch/powerpc/lib
>  	cp $(builddir)/build-$*/arch/powerpc/lib/*.o $(hdrdir)/arch/powerpc/lib
>  endif
> +	# Copy over the new retpoline extractor.
> +	cp scripts/ubuntu-retpoline-extract-one $(hdrdir)/scripts
>  	# Script to symlink everything up
>  	$(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
>  	# The build symlink
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 82e8403af569..645677c3d3f2 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -292,7 +292,7 @@ cmd_record_mcount = 						\
>  endif
>  
>  ifdef CONFIG_RETPOLINE
> -cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/debian/scripts/retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
> +cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/scripts/ubuntu-retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
>  else
>  cmd_ubuntu_retpoline =
>  endif
>
Kleber Sacilotto de Souza April 5, 2018, 10:14 a.m. | #3
On 04/03/18 18:52, Andy Whitcroft wrote:
> BugLink: http://bugs.launchpad.net/bugs/1760876
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
>  debian/rules                    | 6 +++++-
>  debian/rules.d/2-binary-arch.mk | 2 ++
>  scripts/Makefile.build          | 2 +-
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/debian/rules b/debian/rules
> index 3bd11997b59e..5eee4785c556 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -90,10 +90,14 @@ clean: debian/control
>  	# Install the copyright information.
>  	cp $(DEBIAN)/copyright debian/copyright
>  
> +	# Install the retpoline extractor.
> +	cp $(DROOT)/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one
> +
>  distclean: clean
>  	rm -rf $(DROOT)/control $(DROOT)/control.stub $(DEBIAN)/control.stub \
>  		$(DEBIAN)/d-i/kernel-versions debian/changelog \
> -		debian/control debian/control.stub debian/copyright
> +		debian/control debian/control.stub debian/copyright \
> +		scripts/ubuntu-retpoline-extract-one
>  
>  # Builds the image, arch headers and debug packages
>  include $(DROOT)/rules.d/2-binary-arch.mk
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 3573dc7c149f..504a48b89b1e 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -267,6 +267,8 @@ ifeq ($(build_arch),powerpc)
>  	mkdir -p $(hdrdir)/arch/powerpc/lib
>  	cp $(builddir)/build-$*/arch/powerpc/lib/*.o $(hdrdir)/arch/powerpc/lib
>  endif
> +	# Copy over the new retpoline extractor.
> +	cp scripts/ubuntu-retpoline-extract-one $(hdrdir)/scripts
>  	# Script to symlink everything up
>  	$(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
>  	# The build symlink
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 82e8403af569..645677c3d3f2 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -292,7 +292,7 @@ cmd_record_mcount = 						\
>  endif
>  
>  ifdef CONFIG_RETPOLINE
> -cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/debian/scripts/retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
> +cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/scripts/ubuntu-retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
>  else
>  cmd_ubuntu_retpoline =
>  endif
> 

Applied to trusty/master-next branch, with the commit
message fixup for commit 3/3.

Thanks,
Kleber

Patch

diff --git a/debian/rules b/debian/rules
index 3bd11997b59e..5eee4785c556 100755
--- a/debian/rules
+++ b/debian/rules
@@ -90,10 +90,14 @@  clean: debian/control
 	# Install the copyright information.
 	cp $(DEBIAN)/copyright debian/copyright
 
+	# Install the retpoline extractor.
+	cp $(DROOT)/scripts/retpoline-extract-one scripts/ubuntu-retpoline-extract-one
+
 distclean: clean
 	rm -rf $(DROOT)/control $(DROOT)/control.stub $(DEBIAN)/control.stub \
 		$(DEBIAN)/d-i/kernel-versions debian/changelog \
-		debian/control debian/control.stub debian/copyright
+		debian/control debian/control.stub debian/copyright \
+		scripts/ubuntu-retpoline-extract-one
 
 # Builds the image, arch headers and debug packages
 include $(DROOT)/rules.d/2-binary-arch.mk
diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
index 3573dc7c149f..504a48b89b1e 100644
--- a/debian/rules.d/2-binary-arch.mk
+++ b/debian/rules.d/2-binary-arch.mk
@@ -267,6 +267,8 @@  ifeq ($(build_arch),powerpc)
 	mkdir -p $(hdrdir)/arch/powerpc/lib
 	cp $(builddir)/build-$*/arch/powerpc/lib/*.o $(hdrdir)/arch/powerpc/lib
 endif
+	# Copy over the new retpoline extractor.
+	cp scripts/ubuntu-retpoline-extract-one $(hdrdir)/scripts
 	# Script to symlink everything up
 	$(SHELL) $(DROOT)/scripts/link-headers "$(hdrdir)" "$(indeppkg)" "$*"
 	# The build symlink
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 82e8403af569..645677c3d3f2 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -292,7 +292,7 @@  cmd_record_mcount = 						\
 endif
 
 ifdef CONFIG_RETPOLINE
-cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/debian/scripts/retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
+cmd_ubuntu_retpoline = $(CONFIG_SHELL) $(srctree)/scripts/ubuntu-retpoline-extract-one $(@) $(<) "$(filter -m16 %code16gcc.h,$(a_flags))";
 else
 cmd_ubuntu_retpoline =
 endif