bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie automake/autoconf grief


From: John Sutton
Subject: Re: newbie automake/autoconf grief
Date: Tue, 30 Apr 2002 23:13:55 +0100

Me again...

Sorted it out now with the newly released grub-0.92 and using automake-1.5 and
autoconf-2.53.

Here's a spec file to do it plus a patch for the diskonchip patch.

grub.spec:
-----------------
Name: grub
Version: 0.92mtd
%define version 0.92
Release: 1
Summary: GRUB - the Grand Unified Boot Loader.
Group: System Environment/Base
License: GPL
URL: http://www.gnu.org/software/%{name}/
Source0: ftp://alpha.gnu.org/gnu/%{name}/%{name}-%{version}.tar.gz
Patch0: grub-2002-02-19-doc-patch.patch
Patch1: grub-2002-02-19-doc.patch
ExclusiveArch: i386
BuildRequires: binutils >= 2.9.1.0.23, automake = 1.5, autoconf >= 2.52
PreReq: /sbin/install-info
Requires: mktemp
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
GRUB (Grand Unified Boot Loader) is an experimental boot loader
capable of booting into most free operating systems - Linux, FreeBSD,
NetBSD, GNU Mach, and others as well as most commercial operating
systems.

%prep
%setup -q -n %{name}-%{version}
# Copy the doc patch into BUILD because we need to patch it
cp $RPM_SOURCE_DIR/grub-2002-02-19-doc.patch \
        $RPM_BUILD_DIR/%{name}-%{version}
# Patch the patch
patch -p0 --fuzz=0 -d $RPM_BUILD_DIR/%{name}-%{version} \
        < $RPM_SOURCE_DIR/grub-2002-02-19-doc-patch.patch
# Apply the patched patch
patch -p0 --fuzz=0 -d $RPM_BUILD_DIR/%{name}-%{version} \
        < $RPM_BUILD_DIR/%{name}-%{version}/grub-2002-02-19-doc.patch

# Need to do this because doc patch has patched the .am files
aclocal && automake && autoconf

%build
%configure \
        --disable-fat \
        --disable-ffs \
        --disable-minix \
        --disable-reiserfs \
        --disable-vstafs \
        --disable-jfs \
        --disable-xfs \
        --disable-md5-password \
        --disable-hercules \
        --enable-serial \
        --enable-ext2fs \
        --enable-diskonchip-2000

make

%install
rm -fr $RPM_BUILD_ROOT
%makeinstall sbindir=${RPM_BUILD_ROOT}/sbin
mkdir -p ${RPM_BUILD_ROOT}/boot/grub

%clean
rm -fr $RPM_BUILD_ROOT

%post
if [ "$1" = 1 ]; then
  /sbin/install-info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
fi

%preun
if [ "$1" = 0 ] ;then
  /sbin/install-info --delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
fi

%files
%defattr(-,root,root)
%doc AUTHORS ChangeLog NEWS README README_DiskOnChip COPYING TODO docs/menu.lst
/boot/grub
/sbin/grub
/sbin/grub-install
/sbin/grub-md5-crypt
%{_bindir}/mbchk
%{_infodir}/grub*
%{_mandir}/man*/*
%{_datadir}/grub

%changelog
* Tue Apr  9 2002 Jeremy Katz <address@hidden> 0.91-4
- new splash screen

* Fri Mar  8 2002 Jeremy Katz <address@hidden> 0.91-3
- include patch from Denis Kitzmen to fix typo causing several options to 
  never be defined (in upstream CVS)
- include patch from upstream CVS to make displaymem always use hex for 
  consistency
- add patch from GRUB mailing list from Keir Fraser to add a --once flag to
  savedefault function so that you can have the equivalent of lilo -R 
  functionality (use 'savedefault --default=N --once' from the grub shell)
- back to autoconf

* Sun Jan 27 2002 Jeremy Katz <address@hidden> 
- change to use $grubdir instead of /boot/grub in the symlink patch (#58771)

* Fri Jan 25 2002 Jeremy Katz <address@hidden> 0.91-2
- don't ifdef out the auto memory passing, use the configure flag instead
- add a patch so that grub respects mem= from the kernel command line when 
  deciding where to place the initrd (#52558)

* Mon Jan 21 2002 Jeremy Katz <address@hidden> 0.91-1
- update to 0.91 final
- add documentation on splashimage param (#51609)

* Wed Jan  2 2002 Jeremy Katz <address@hidden> 0.91-0.20020102cvs
- update to current CVS snapshot to fix some of the hangs on boot related
  to LBA probing (#57503, #55868, and others)

* Fri Dec 21 2001 Erik Troan <address@hidden> 0.90-14
- fixed append patch to not require arguments to begin with
- changed to autoreconf from autoconf

* Wed Oct 31 2001 Jeremy Katz <address@hidden> 0.90-13
- include additional patch from Erich to add sync calls in grub-install to 
  work around updated images not being synced to disk
- fix segfault in grub shell if 'password --md5' is used without specifying
  a password (#55008)

* Fri Oct 26 2001 Jeremy Katz <address@hidden> 0.90-12
- Include Erich Boleyn <address@hidden>'s patch to disconnect from the 
  BIOS after APM operations.  Should fix #54375

* Wed Sep 12 2001 Erik Troan <address@hidden>
- added patch for 'a' option in grub boot menu

* Wed Sep  5 2001 Jeremy Katz <address@hidden> 0.90-11
- grub-install: if /boot/grub/grub.conf doesn't exist but /boot/grub/menu.lst 
  does, create a symlink

* Fri Aug 24 2001 Jeremy Katz <address@hidden>
- pull in patch from upstream CVS to fix md5crypt in grub shell (#52220)
- use mktemp in grub-install to avoid tmp races

* Fri Aug  3 2001 Jeremy Katz <address@hidden>
- link curses statically (#49519)

* Thu Aug  2 2001 Jeremy Katz <address@hidden>
- fix segfault with using the serial device before initialization (#50219)

* Thu Jul 19 2001 Jeremy Katz <address@hidden>
- add --copy-only flag to grub-install

* Thu Jul 19 2001 Jeremy Katz <address@hidden>
- copy files in grub-install prior to device probe

* Thu Jul 19 2001 Jeremy Katz <address@hidden>
- original images don't go in /boot and then grub-install does the right
  thing

* Thu Jul 19 2001 Jeremy Katz <address@hidden>
- fix the previous patch
- put the password prompt in the proper location

* Thu Jul 19 2001 Jeremy Katz <address@hidden>
- reset the screen when the countdown is cancelled so text will disappear 
  in vga16 mode

* Mon Jul 16 2001 Jeremy Katz <address@hidden>
- change configfile defaults to grub.conf

* Sun Jul 15 2001 Jeremy Katz <address@hidden>
- updated to grub 0.90 final

* Fri Jul  6 2001 Matt Wilson <address@hidden>
- modifed splash screen to a nice shade of blue

* Tue Jul  3 2001 Matt Wilson <address@hidden>
- added a first cut at a splash screen

* Sun Jul  1 2001 Nalin Dahyabhai <address@hidden>
- fix datadir mismatch between build and install phases

* Mon Jun 25 2001 Jeremy Katz <address@hidden>
- update to current CVS 
- forward port VGA16 patch from Paulo César Pereira de 
  Andrade <address@hidden>
- add patch for cciss, ida, and rd raid controllers
- don't pass mem= to the kernel

* Wed May 23 2001 Erik Troan <address@hidden>
- initial build for Red Hat
-----------------

grub-2002-02-19-doc-patch.patch:
----------------------
JES. OK, this is mad but how else do you do it?  The part of the original
grub-2002-02-19-doc.patch which patches the ChangeLog won't stick because
the ChangeLog has moved on, so the patch command fails so the whole rpm
build fails ;-(  So, this is a patch to the patch which accomodates the
change in the ChangeLog!

--- grub-2002-02-19-doc.patch.orig      Fri Mar 22 17:38:19 2002
+++ grub-2002-02-19-doc.patch   Tue Apr 30 17:05:33 2002
@@ -18,12 +18,12 @@
 Index: ChangeLog
 ===================================================================
 RCS file: /usr/local/cvsroot/grub/ChangeLog,v
-retrieving revision 1.1.1.3
-retrieving revision 1.5
-diff -u -r1.1.1.3 -r1.5
---- ChangeLog  19 Feb 2002 21:53:36 -0000      1.1.1.3
-+++ ChangeLog  21 Mar 2002 21:48:52 -0000      1.5
-@@ -1,3 +1,66 @@
+--- ChangeLog.orig     Tue Apr 30 16:32:51 2002
++++ ChangeLog  Tue Apr 30 16:59:03 2002
+@@ -86,6 +86,69 @@
+       * stage2/cmdline.c (run_script): Prompt a user's intervention,
+       only when FALLBACK_ENTRY is negative.
+       
 +2002-03-21  Ilguiz Latypov <address@hidden>
 +
 +      Applied the GRUB patch written by David Woodhouse
----------------------


On Tue, 30 Apr 2002, you wrote:
> Hi there
> 
> I've downloaded, built and installed grub-0.91 no problem.  Wonderful piece of
> work!  Bye bye lilo... except that I'm trying to put a boot loader onto an mtd
> device.  I've succeeded in doing this with lilo but not yet with grub ;-(
> 
> Problem is, I need to patch the grub source, which I've done, but then I need 
> to
> run automake and autoconf and this is where the trouble lies.  To try to sort
> this out I've discarded the mtd patch and am working with the vanilla 0.91
> source, but I cannot get aclocal/autoheader/automake/autoconf/autoreconf (in
> all possible permuted orders ;-) to work.
> 
> I've tried automake versions 1.4, 1.4-p5 and 1.6.1 and autoconf 2.13 and 2.53,
> again in all possible combinations, and still no luck.
> 
> You can guess how long I've been hacking away at this ;-(
> 
> So, my questions are:
> 
> To work with the 0.91 source, which versions of automake and autoconf are
> required?
> 
> In which order should I run the tools:
> 
>   aclocal && autoheader && automake && autoconf ?
> 
> TIA
> 
> PS: Here, FWIW and in no particular order, are some snippets of the kind of
> grief I've been getting:
> 
> # automake
> stage1/Makefile.am:2: invalid variable `nodist_pkgdata_DATA'
> stage2/Makefile.am: nbloader_exec_OBJECTS should not be defined
> stage2/Makefile.am: variable `LDADD' not defined
> 
> # automake --gnu --add-missing
> automake: docs/Makefile.am: Assembler source seen but `CCAS' not defined in 
> `configure.in'
> automake: docs/Makefile.am: Assembler source seen but `CCASFLAGS' not defined 
> in `configure.in'
> 
> # autoheader
> WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
> WARNING: and `config.h.top', to define templates for `config.h.in'
> WARNING: is deprecated and discouraged.
> 
> WARNING: Using the third argument of `AC_DEFINE' and
> WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
> WARNING: `acconfig.h':
> 
> # make
> asm.o: In function `main':
> asm.o(.text+0x0): multiple definition of `start'
> start.o(.text+0x0): first defined here
> asm.o: In function `main':
> asm.o(.text+0x0): multiple definition of `_start'
> start.o(.text+0x0): first defined here
> e2fs_stage1_5_exec-stage1_5.o: In function `cmain':
> /usr/src/grub/stage2/stage1_5.c:59: undefined reference to `chain_stage2'
> 
> ***************************************************
> John Sutton
> SCL Internet
> URL http://www.scl.co.uk/
> Tel. +44 (0) 1239 711 888
> ***************************************************
-- 

***************************************************
John Sutton
SCL Internet
URL http://www.scl.co.uk/
Tel. +44 (0) 1239 711 888
***************************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]