Safer linux-headers install

Dan Nicholson dbn.lists at gmail.com
Tue Jul 10 21:34:05 PDT 2007


When you run `make headers_install' from the kernel, it will remove all
headers not from the kernel list in INSTALL_HDR_PATH. This bites people
who try to reinstall them, usually because they want to go back in Ch.
6. Another person got bit by this the other day:

http://linuxfromscratch.org/pipermail/lfs-support/2007-July/033327.html

I think we should just use a temporary path and cp it to /usr/include 
since this is safer for all cases and removes the problem of silently 
removing glibc's headers. Does anyone have a problem with the patch
below?

--
Dan

---
 BOOK/chapter01/changelog.xml     |   10 ++++++++++
 BOOK/chapter06/linux-headers.xml |    3 ++-
 BOOK/general.ent                 |    4 ++--
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/BOOK/chapter01/changelog.xml b/BOOK/chapter01/changelog.xml
index 239cb65..1ebf49a 100644
--- a/BOOK/chapter01/changelog.xml
+++ b/BOOK/chapter01/changelog.xml
@@ -37,6 +37,16 @@
 -->
 
     <listitem>
+      <para>2007-07-10</para>
+      <itemizedlist>
+        <listitem>
+          <para>[dnicholson] - Made the Linux API Headers install safer by
+          using an intermediate directory.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
       <para>2007-07-06</para>
       <itemizedlist>
         <listitem>
diff --git a/BOOK/chapter06/linux-headers.xml b/BOOK/chapter06/linux-headers.xml
index d345736..db2ad95 100644
--- a/BOOK/chapter06/linux-headers.xml
+++ b/BOOK/chapter06/linux-headers.xml
@@ -51,7 +51,8 @@
 
 <screen><userinput>make mrproper
 make headers_check
-make INSTALL_HDR_PATH=/usr headers_install</userinput></screen>
+make INSTALL_HDR_PATH=dest headers_install
+cp -rv dest/include/* /usr/include</userinput></screen>
 
   </sect2>
 
diff --git a/BOOK/general.ent b/BOOK/general.ent
index c4614fb..5b9741d 100644
--- a/BOOK/general.ent
+++ b/BOOK/general.ent
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-<!ENTITY version "SVN-20070706">
-<!ENTITY releasedate "July 6, 2007">
+<!ENTITY version "SVN-20070710">
+<!ENTITY releasedate "July 10, 2007">
 <!ENTITY milestone "6.3">
 <!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->
 
-- 
1.5.1.6



More information about the lfs-dev mailing list