[PATCH] override new rpm %install behavior

Martin Dengler martin at martindengler.com
Tue Sep 29 00:35:25 EDT 2009


New rpm behavior is to disallow %build to write to $RPM_BUILD_ROOT:

http://www.linux-archive.org/fedora-packaging/361136-unwanted-directory-removal-during-rpm-build.ht
ml

The kernel spec does this all over the place.

This change is the Red Hat patch:

* Wed Jul 22 2009 Tom "spot" Callaway <tcallawa at redhat.com>
  - We have to override the new %install behavior because, well... the kernel is special.
---
 olpc/SPECS/kernel-xo1.5.spec |    3 +++
 olpc/SPECS/kernel-xo1.spec   |    3 +++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/olpc/SPECS/kernel-xo1.5.spec b/olpc/SPECS/kernel-xo1.5.spec
index 5f84287..9560dc5 100644
--- a/olpc/SPECS/kernel-xo1.5.spec
+++ b/olpc/SPECS/kernel-xo1.5.spec
@@ -1,3 +1,6 @@
+# We have to override the new %%install behavior because, well... the kernel is special.
+%global __spec_install_pre %{___build_pre}
+
 Summary: The Linux kernel (the core of the Linux operating system)
 
 # What parts do we want to build?  We must build at least one kernel.
diff --git a/olpc/SPECS/kernel-xo1.spec b/olpc/SPECS/kernel-xo1.spec
index 7444f75..59f427c 100644
--- a/olpc/SPECS/kernel-xo1.spec
+++ b/olpc/SPECS/kernel-xo1.spec
@@ -1,3 +1,6 @@
+# We have to override the new %%install behavior because, well... the kernel is special.
+%global __spec_install_pre %{___build_pre}
+
 Summary: The Linux kernel (the core of the Linux operating system)
 
 # What parts do we want to build?  We must build at least one kernel.
-- 
1.6.2.5




More information about the Devel mailing list