Hi,
This is a small patch for linuxboot/Makefile that does three things.
1) linuxthreads has been replaced by NPTL in recent versions of glibc. So, if
the default is 2.6.1, then the
glibc-linuxthreads line should be commented out. In order to keep make from
complaining, there are a couple of if blocks
near the end of the patch to not include certain lines when glibc-linuxthreads
is not defined.
2) I try to automatically detect if genisoimage is present. If it is we use
that. Otherwise use mkisofs as usual.
3) remove what I think is the last remaining bashism so the makefile works on
systems where /bin/sh is a POSIX compliant
shell other than bash. Brace expansion is a bash extension.
With these changes, it compiles on a Lenny system without complaining assuming
that all of the necessary dev libraries are
installed and assuming that gcc-4.1 is used.
Allan.
Index: Makefile
===================================================================
RCS file: /cvsroot/unattended/unattended/linuxboot/Makefile,v
retrieving revision 1.199
diff -u -r1.199 Makefile
--- Makefile 6 Feb 2009 12:20:44 -0000 1.199
+++ Makefile 8 Feb 2009 04:05:34 -0000
@@ -13,7 +13,7 @@
# 2.3.6 for Debian Etch, FC4. 2.6.1 for Debian Lenny.
glibc=glibc-2.6.1
# Awful hack Comment out if glibc > 2.4. 2.4 does not support linuxthreads.
-glibc-linuxthreads=$(strip $(patsubst glibc-%,glibc-linuxthreads-%,$(glibc)))
+#glibc-linuxthreads=$(strip $(patsubst glibc-%,glibc-linuxthreads-%,$(glibc)))
kbd=kbd-1.12
linux=linux-2.6.28.3
module-init-tools=module-init-tools-3.5
@@ -48,10 +48,13 @@
CC=gcc
-# uncomment one of the following two lines depending on what the binary to make iso
-# images on your system is called.
-mkisofs=mkisofs
-#mkisofs=genisoimage
+# Debian/Ubuntu systems likely use genisoimage to create iso files
+# otherwise try to use mkisofs
+ifneq ("$(strip $(wildcard /usr/bin/genisoimage))","")
+ mkisofs=genisoimage
+else
+ mkisofs=mkisofs
+endif
# Macro to generate rule for copying single file
copy_file= \
@@ -393,11 +396,9 @@
cd $(kbd) \
&& make DESTDIR=$(cwd)/stage1 install
rm -rf stage1/usr/share/locale
- rm stage1/usr/bin/{deallocvt,dumpkeys,fgconsole,getkeycodes} \
- stage1/usr/bin/{kbdrate,loadunimap,mapscrn} \
- stage1/usr/bin/psf*table \
- stage1/usr/bin/{resizecons,setkeycodes,setleds} \
- stage1/usr/bin/{setmetamode,showconsolefont,showkey}
+ cd stage1/usr/bin && rm deallocvt dumpkeys fgconsole \
+ getkeycodes kbdrate loadunimap mapscrn psf*table \
+ setkeycodes setleds setmetamode showconsolefont showkey
[ -e $@ ]
stage1 += stage1/bin/loadkeys
@@ -904,9 +905,12 @@
download_targets=$(addprefix download-,$(packages) pci.ids)
+
+ifneq "$(strip $(glibc-linuxthreads))" ""
download_targets += download-$(glibc-linuxthreads)
download-$(glibc-linuxthreads) : download-$(glibc)
+endif
download: $(download_targets)
@@ -930,8 +934,10 @@
# :pserver:anon...@sources.redhat.com:/cvs/glibc)
$(call download_rule, $(glibc), tar.bz2, http://ftp.gnu.org/gnu/glibc/)
# Awful hack
+ifneq "$(strip $(glibc-linuxthreads))" ""
$(call download_rule, $(glibc-linuxthreads), tar.bz2, \
http://ftp.gnu.org/gnu/glibc/, $(glibc))
+endif
$(call download_rule, $(kbd), tar.bz2, \
http://www.all.kernel.org/pub/linux/utils/kbd/)
$(call download_rule, $(linux), tar.bz2, \
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
unattended-devel mailing list
unattended-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unattended-devel