Sat Mar 8 00:46:23 2008 UTC ()
Import new package from pkgsrc-wip: lilo

LILO is the Linux boot loader. It includes combined boot sector,
generic chain loader, map installer, and a simple boot partition setter.
LILO allows booting from multiple disks, and can have menus for choosing
different boot images. LILO is also able to pass command-line options
to the Linux kernel.

LILO does not depend on a specific file system, can boot Linux kernel
images from floppy disks and from hard disks, and can even act as a
"boot manager" for other operating systems.

LILO should be ran whenever any part of the system that it knows about
changes, e.g. after installing a new kernel.

Status:

Vendor Tag:	TNF
Release Tags:	pkgsrc-base


(reed)
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/Makefile
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/DESCR
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/MESSAGE.Linux
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/PLIST
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/distinfo
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/files/lilo.conf.example
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/patches/patch-aa
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/patches/patch-ab
diff -r0 -r1.1.1.1 pkgsrc/sysutils/lilo/patches/patch-ac

File Added: pkgsrc/sysutils/lilo/Makefile
# $NetBSD: Makefile,v 1.1.1.1 2008/03/08 00:46:23 reed Exp $

DISTNAME=		lilo-22.8.src
PKGNAME=		${DISTNAME:S/.src//}
CATEGORIES=		sysutils
MASTER_SITES=		${MASTER_SITE_SUNSITE:=system/boot/lilo/} \
			http://home.san.rr.com/johninsd/pub/linux/lilo/

MAINTAINER=		reed@reedmedia.net
HOMEPAGE=		http://lilo.go.dyndns.org/
COMMENT=		Generic boot loader for Linux

# This is LInux LOader; it can load different operating systems.
# Build untested on other operating systems.
ONLY_FOR_PLATFORM=	Linux-*-*

WRKSRC=			${WRKDIR}/${PKGNAME}

# Don't force perl for extra tool -- maybe a MESSAGE?
#USE_PERL5=		YES

#BUILD_DEPENDS+=		dev86>=0.16.10:../../devel/dev86
# bcc is old and doesn't have -v switch to indicate version
#BUILD_DEPENDS+=		bcc>=95.3.12:../../devel/bcc
BUILD_DEPENDS+=		bin86>=0.16.10:../../devel/bin86
BUILD_DEPENDS+=		nasm>=0.98:../../devel/nasm

USE_TOOLS+=		gmake
MAKE_ENV+=		ROOT=${PREFIX:Q}

CONF_FILES=		${PREFIX}/share/lilo/lilo.conf.example	${PKG_SYSCONFDIR}/lilo.conf

REPLACE_INTERPRETER+=	bash
REPLACE.bash.old=	.*/bin/bash
REPLACE.bash.new=	${SH}
REPLACE_FILES.bash=	mkrescue

REPLACE_INTERPRETER+=	perl
REPLACE.perl.old=	.*/bin/perl
REPLACE.perl.new=	${PERL5}
REPLACE_FILES.perl=	keytab-lilo.pl

post-patch:
	${CP} ${WRKSRC}/config.h ${WRKSRC}/config.h.orig
	${SED} -e "s:@@PREFIX@@:${PREFIX}:" \
		-e "s:@@PKG_SYSCONFDIR@@:${PKG_SYSCONFDIR}:" \
		< ${WRKSRC}/config.h.orig > ${WRKSRC}/config.h

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/lilo ${PREFIX}/sbin/lilo
	${INSTALL_SCRIPT} ${WRKSRC}/mkrescue ${PREFIX}/sbin/mkrescue
	${INSTALL_SCRIPT} ${WRKSRC}/keytab-lilo.pl ${PREFIX}/sbin/keytab-lilo
	${INSTALL_MAN} ${WRKSRC}/manPages/lilo.8 ${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_MAN} ${WRKSRC}/manPages/lilo.conf.5 ${PREFIX}/${PKGMANDIR}/man5
	${INSTALL_MAN} ${WRKSRC}/manPages/mkrescue.8 ${PREFIX}/${PKGMANDIR}/man8
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/lilo
	${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/lilo
	${INSTALL_DATA_DIR} ${PREFIX}/share/lilo
	${INSTALL_DATA} ${WRKSRC}/sample/lilo.sample.conf ${PREFIX}/share/lilo
	${INSTALL_DATA} ${FILESDIR}/lilo.conf.example ${PREFIX}/share/lilo

.include "../../mk/bsd.pkg.mk"

File Added: pkgsrc/sysutils/lilo/DESCR
LILO is the Linux boot loader. It includes combined boot sector,
generic chain loader, map installer, and a simple boot partition setter.
LILO allows booting from multiple disks, and can have menus for choosing
different boot images. LILO is also able to pass command-line options
to the Linux kernel.

LILO does not depend on a specific file system, can boot Linux kernel
images from floppy disks and from hard disks, and can even act as a
"boot manager" for other operating systems.

LILO should be ran whenever any part of the system that it knows about
changes, e.g. after installing a new kernel.

File Added: pkgsrc/sysutils/lilo/MESSAGE.Linux
===========================================================================
$NetBSD: MESSAGE.Linux,v 1.1.1.1 2008/03/08 00:46:23 reed Exp $

If you are using LILO as your boot loader, then
${PREFIX}/sbin/lilo should now be run to complete the update.

Also, if using lilo, whenever any of the Linux kernel files
that are used by LILO are moved or overwritten, the map should
be re-built by running lilo(8).

Sample lilo.conf files are in ${PREFIX}/share/lilo/.

===========================================================================

File Added: pkgsrc/sysutils/lilo/PLIST
@comment $NetBSD: PLIST,v 1.1.1.1 2008/03/08 00:46:23 reed Exp $
man/man5/lilo.conf.5
man/man8/lilo.8
man/man8/mkrescue.8
sbin/keytab-lilo
sbin/lilo
sbin/mkrescue
share/doc/lilo/README
share/lilo/lilo.conf.example
share/lilo/lilo.sample.conf
@dirrm share/lilo
@dirrm share/doc/lilo

File Added: pkgsrc/sysutils/lilo/distinfo
$NetBSD: distinfo,v 1.1.1.1 2008/03/08 00:46:23 reed Exp $

SHA1 (lilo-22.8.src.tar.gz) = 59852eab59b93dcea63b39eef1db7963b7268b0d
RMD160 (lilo-22.8.src.tar.gz) = b452f4821cbc917b29cf168587652a6f1efd33e1
Size (lilo-22.8.src.tar.gz) = 437555 bytes
SHA1 (patch-aa) = d35ee9dba01e27e27981b8dee8dd8b0bb77bf61b
SHA1 (patch-ab) = 069b7ed036a80f8730f4167fa6f33153b314eb6b
SHA1 (patch-ac) = f4df9a95fada2e099bd1d7697462ce5891d4e5bd

File Added: pkgsrc/sysutils/lilo/files/lilo.conf.example
# etc/lilo.conf: Sample LILO boot loader configuration.

boot=/dev/hda1
root=/dev/hda1
compact
install=/boot/boot.b
map=/boot/map
vga=normal
delay=20
image=/vmlinuz
       root=/dev/hda1
       label=Linux
       read-only

File Added: pkgsrc/sysutils/lilo/patches/patch-aa
$NetBSD: patch-aa,v 1.1.1.1 2008/03/08 00:46:23 reed Exp $

--- Makefile.orig	2007-02-19 11:15:10.000000000 -0600
+++ Makefile	2008-03-07 14:10:01.000000000 -0600
@@ -94,7 +94,8 @@
 SBIN_DIR=/sbin
 CFG_DIR=/etc
 BOOT_DIR=/boot
-USRSBIN_DIR=/usr/sbin
+USRSBIN_DIR=/sbin
+MAN_DIR=/${PKGMANDIR}
 BUILTIN=1
 
 PCONFIG=$(KVER) $(HDM) $(LILO) `( if [ -r $$ROOT/etc/lilo.defines ]; then \

File Added: pkgsrc/sysutils/lilo/patches/patch-ab
$NetBSD: patch-ab,v 1.1.1.1 2008/03/08 00:46:23 reed Exp $

--- config.h.orig	Sun Jun  9 19:17:32 2002
+++ config.h	Fri Nov  1 20:38:35 2002
@@ -27,8 +27,8 @@
 #define DFL_CHAIN   LILO_DIR "/chain.b" /* default chain loader */
 #define DFL_MBR	    LILO_DIR "/mbr.b"	/* default MBR */
 #else
-#define CFG_DIR	    "/etc"		/* location of configuration files */
-#define BOOT_DIR    "/boot"		/* location of boot files */
+#define CFG_DIR	    "@@PKG_SYSCONFDIR@@"		/* location of configuration files */
+#define BOOT_DIR    "@@PREFIX@@/boot"		/* location of boot files */
 #define BACKUP_DIR  BOOT_DIR /* boot sector and partition table backups */
 #define DFL_CONFIG  CFG_DIR "/lilo.conf"/* default configuration file */
 #define DFL_DISKTAB CFG_DIR "/disktab"	/* LILO's disk parameter table */

File Added: pkgsrc/sysutils/lilo/patches/patch-ac
$NetBSD: patch-ac,v 1.1.1.1 2008/03/08 00:46:23 reed Exp $

--- geometry.c.orig	2003-10-10 14:43:13.000000000 -0700
+++ geometry.c
@@ -99,6 +99,11 @@ struct evms_version_t {
 #define HDIO_GETGEO HDIO_REQ
 #endif
 
+/* Linux 2.6 compatibility */
+#undef _IOR
+#undef _IOWR
+#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
+#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
 
 typedef struct _st_buf {
     struct _st_buf *next;