--- mbr-1.1.9.orig/tests/inst-1 +++ mbr-1.1.9/tests/inst-1 @@ -2,7 +2,7 @@ # Basic installation tests. set -e dd if=/dev/zero of=test-old bs=510 count=1 2>/dev/null -echo -ne '\125\252' >>test-old +printf '\125\252' >>test-old # Do install dd if=test-old of=test-mbr 2>/dev/null --- mbr-1.1.9.orig/tests/version +++ mbr-1.1.9/tests/version @@ -1,5 +1,5 @@ #! /bin/sh -function check_version { +check_version () { md5sum mbr-$1.b >test-y echo "$2 mbr-$1.b" >test-x diff -u test-x test-y --- mbr-1.1.9.orig/wraptest.in +++ mbr-1.1.9/wraptest.in @@ -1,21 +1,21 @@ #! /bin/sh set -e -function do_cmp { +do_cmp () { local X Y ; X=$1 ; Y=$2 ; shift ; shift dd if=$X of=test-x "$@" 2>/dev/null dd if=$Y of=test-y "$@" 2>/dev/null cmp test-x test-y } -function do_install { +do_install () { ./install-mbr "$@" } -function run_dos { +run_dos () { exit 1 } -function harness { +harness () { @HAVE_VM86_FALSE@ exit 77 @HAVE_VM86_TRUE@ harness/harness "$@" } @@ -23,7 +23,7 @@ for TEST in "$@" do rm -f test-* dd if=/dev/zero of=test-old bs=510 count=1 2>/dev/null - echo -ne '\125\252' >>test-old + printf '\125\252' >>test-old dd if=table.b of=test-mbr bs=512 count=1 2>/dev/null . $TEST done --- mbr-1.1.9.orig/debian/control +++ mbr-1.1.9/debian/control @@ -0,0 +1,15 @@ +Source: mbr +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Santiago Garcia Mantinan +Standards-Version: 3.7.2 +Build-Depends: bin86, libc6-dev-i386 [amd64], gcc-multilib [amd64] + +Package: mbr +Architecture: i386 amd64 +Depends: ${shlibs:Depends} +Description: Master Boot Record for IBM-PC compatible computers. + The MBR is used in booting operating systems from the hard disk. It + runs first, then transfers control to the operating system's loader + which transfers control to the kernel. --- mbr-1.1.9.orig/debian/rules +++ mbr-1.1.9/debian/rules @@ -0,0 +1,77 @@ +#!/usr/bin/make -f + +package = mbr +docdir = debian/tmp/usr/share/doc/$(package) + +KERNEL_ARCH := $(shell uname -m) + +CC = gcc -m32 +LD = ld -melf_i386 + +CFLAGS = -g -Wall -W +INSTALL_PROGRAM = install + +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +build: + $(checkdir) + ./configure --prefix=/ + $(MAKE) CC="$(CC)" LD="$(LD)" CFLAGS="$(CFLAGS)" +ifneq (,$(findstring x86_64,$(KERNEL_ARCH))) + # Limit the tests on x86_64 kernels + $(MAKE) TESTS="tests/inst-1 tests/inst-3 tests/inst-4 tests/inst-6 tests/inst-7 tests/inst-8" check-TESTS +else + $(MAKE) check-TESTS +endif + touch build + +clean: + $(checkdir) + rm -f build + -$(MAKE) distclean + rm -f `find . -name "*~"` + rm -rf debian/tmp debian/files* core debian/substvars + +binary-indep: checkroot build + $(checkdir) + +binary-arch: checkroot build + $(checkdir) + rm -rf debian/tmp + install -d debian/tmp/DEBIAN $(docdir) + $(MAKE) install prefix=`pwd`/debian/tmp \ + INSTALL_PROGRAM="$(INSTALL_PROGRAM)" +# cd debian/tmp && install -d boot +# install -m 644 mbr.b debian/tmp/boot + cp -p ChangeLog $(docdir)/changelog + cp -p debian/changelog $(docdir)/changelog.Debian + cp -p README NEWS debian/README-1st.Debian debian/copyright $(docdir) + cp -p AUTHORS $(docdir) + cd $(docdir) && gzip -9 changelog changelog.Debian + gzip -r9 debian/tmp/share/man + mv debian/tmp/share/man debian/tmp/usr/share + rmdir debian/tmp/share + dpkg-shlibdeps debian/tmp/sbin/* + dpkg-gencontrol -isp + cd debian/tmp && \ + md5sum `find * -type f ! -regex "DEBIAN/.*"` > DEBIAN/md5sums + chown -R root:root debian/tmp + chmod -R go=rX debian/tmp + dpkg --build debian/tmp .. + +define checkdir + test -f $(package).S86 -a -f debian/rules +endef + +binary: binary-indep binary-arch + +checkroot: + $(checkdir) + test root = "`whoami`" + +.PHONY: binary binary-arch binary-indep clean checkroot --- mbr-1.1.9.orig/debian/README-1st.Debian +++ mbr-1.1.9/debian/README-1st.Debian @@ -0,0 +1,20 @@ +mbr for Debian +-------------- + +This package used to consist essentialy of the file /boot/mbr.b, which was +used by the `lilo' package. Now this has changed and the lilo package uses +the install-mbr program to install our mbr if you want it. + +You can also use the install-mbr by yourself, even to put our mbr on +machines that don't have Debian or Linux at all, as our mbr is capable of +loading other OS loaders, and being small it has some nice things, like our +prompt allowing us to boot from different drives/partitions, or now the Y2K +patch for some buggy BIOSes. + +The README file included in this directory is from the source package and it +is included here for completeness, you don't have to follow what it says if +you are letting liloconfig install the mbr for you, but if you want to +install the mbr by yourself you should give it a look. + +If you want to see how the mbr interacts with lilo, see +/usr/sbin/liloconfig. --- mbr-1.1.9.orig/debian/changelog +++ mbr-1.1.9/debian/changelog @@ -0,0 +1,161 @@ +mbr (1.1.9-2ubuntu1) gutsy; urgency=low + + * Add gcc-multilib to fix FTBFS on amd64 (our current lib32gcc1 alone is not + enough to make 'gcc -m32' work on amd64). + * Drop ia32-libs build dependency on amd64, it is not needed any more. + * ./wraptest.in, tests/inst-1: Replace 'echo -ne' with 'printf' since POSIX + sh does not support -ne. (For the record, using bash does not help either, + since bash 3.2 breaks compatibility with the three-digit form, see + LP #116226) + * debian/control: Set Ubuntu maintainer. + + -- Martin Pitt Tue, 22 May 2007 19:02:34 +0200 + +mbr (1.1.9-2) unstable; urgency=low + + * Fix FTBFS on new kernels. Closes: #392776. + * Bashisms should be now gone. Closes: #382586. + + -- Santiago Garcia Mantinan Sat, 25 Nov 2006 20:41:01 +0100 + +mbr (1.1.9-1) unstable; urgency=low + + * New upstream version. + + -- Santiago Garcia Mantinan Tue, 3 Oct 2006 19:48:03 +0200 + +mbr (1.1.8-2) unstable; urgency=low + + * Change section to accomodate to override. + + -- Santiago Garcia Mantinan Tue, 23 May 2006 00:02:53 +0200 + +mbr (1.1.8-1) unstable; urgency=low + + * The "I thought nobody used mbr anymore" release. + + [ Santiago Garcia Mantinan ] + * New upstream version. + * Bump up Standards-Version. + * Change description so that it is OS independant. + + [ Goswin von Brederlow ] + * Port to amd64 (closes: #330190) + + debian/rules: set CC and LD + + debian/rules: add -W to CFLAGS for proper warnings + + debian/control: Build-Depend on libc6-dev-i386 [amd64] and + (temporary) on ia32-libs [amd64] for dpkg-shlibdeps to work + * Fix potentialy harmfull warnings + + harness/args.c:57: warning: suggest parentheses around arithmetic + + harness/output.c:22: warning: comparison between signed and unsigned + + harness/process.c:25: warning: implicit declaration of function 'exit' + + install-mbr.c:617: warning: return type defaults to 'int' + + install-mbr.c:702: warning: comparison between signed and unsigned + + install-mbr.c:1357: warning: format '%d' expects type 'int', but + argument 4 has type 'char *' + * Enable testsuite partialy + + remove tests for non existing old mbrs + + conditionaly remove runtime test that fail on amd64 + * Fix typo in manpage found by A Costa (Closes: #311235) + + -- Santiago Garcia Mantinan Mon, 22 May 2006 20:45:18 +0200 + +mbr (1.1.5-2) unstable; urgency=low + + * The "we are no longer required for anything" release. + * Updated Standards-Version to 3.6.1 thanks to Santiago Vila. + * Lowered priority to optional. Closes: #169492. + + -- Santiago Garcia Mantinan Sat, 29 May 2004 13:16:27 +0200 + +mbr (1.1.5-1) unstable; urgency=low + + * New upstream version. + + -- Santiago Garcia Mantinan Mon, 17 Sep 2001 12:12:17 +0200 + +mbr (1.1.4-1) unstable; urgency=low + + * New upstream version, extends the maximum time limit. Closes #95528. + + -- Santiago Garcia Mantinan Wed, 25 Jul 2001 12:23:36 +0200 + +mbr (1.1.3-1) unstable; urgency=low + + * New maintainer. + * New upstream version, includes my Y2K fix for some buggy BIOSes. + * Removed /boot/mbr.b as now lilo uses install-mbr to install it. + + -- Santiago Garcia Mantinan Wed, 11 Apr 2001 21:46:34 +0200 + +mbr (1.1.2-2) unstable; urgency=low + + * Added a Depends: line (because of the install-mbr program). + * Build-Depends: bin86. + + -- Santiago Vila Sat, 9 Sep 2000 19:01:54 +0200 + +mbr (1.1.2-1) frozen unstable; urgency=low + + * Installed upstream ChangeLog in the doc directory. + * Fixed install-mbr manpage (Bug #58799). + * Added set -e to prerm and postinst. + * New upstream release: The MBR now prints out the string "MBR" to show + it's presence. Initial logo code by Tom Rothamel (Bug #56973). + + -- Santiago Vila Fri, 3 Mar 2000 20:32:35 +0100 + +mbr (1.1.1-1) unstable; urgency=low + + * Standards-Version: 3.1.1. + * New upstream release, featuring: + - Added support for accessing large disks (>8G). + - Added the install-mbr utility. + + -- Santiago Vila Thu, 13 Jan 2000 12:18:39 +0100 + +mbr (1.0.1-1) unstable; urgency=low + + * New upstream release, containing a lot of fixes + from Kalle Olavi Niemitalo . + + -- Santiago Vila Tue, 21 Sep 1999 11:48:57 +0200 + +mbr (1.0.0-7) unstable; urgency=low + + * Updated source URL in copyright file (Bug #34874). + * Pristine source. + + -- Santiago Vila Wed, 7 Apr 1999 17:19:51 +0200 + +mbr (1.0.0-6) unstable; urgency=low + + * Allow building with both old and new as86 (thanks to Juan Cespedes). + * Removed debstd dependency. + * Compressed changelog.Debian. + * New maintainer. + + -- Santiago Vila Fri, 12 Dec 1997 13:45:35 +0100 + +mbr (1.0.0-5) unstable; urgency=low + + * Rebuilt with debmake 3.2.0 to change md5sums filename. + + -- Santiago Vila Wed, 19 Feb 1997 21:44:28 +0100 + +mbr (1.0.0-4) unstable; urgency=low + + * Remade .orig source from original HTTP site. There was a missing file. + * Rewritten using debmake. This fixes a typo in Standards Version + number, makes debian/rules clean target to actually remove + debian/files, copies changelog.Debian to /usr/doc/mbr and + adds MD5 sums automatically. + * Added README-1st.Debian, following a suggestion by Ian Jackson. + + -- Santiago Vila Sat, 15 Feb 1997 18:48:48 +0100 + +mbr (1.0.0-3) unstable; urgency=low + + * Upgraded to new packaging standards. + + -- Shaya Potter Thu, 23 Jan 1997 13:16:08 -0500 --- mbr-1.1.9.orig/debian/copyright +++ mbr-1.1.9/debian/copyright @@ -0,0 +1,31 @@ +This is Debian GNU/Linux's prepackaged version of the MBR Master Boot +Record for IBM PC compatible computers, by Neil Turton. MBR is used +in conjunction with other boot loaders such as LILO and the DOS boot +loader, which are installed on hard disk partitions. MBR makes it possible +to select one of these partition boot loaders for booting. + +The author of this program is Neil Turton . + +This package was first put together by Bruce Perens , +then it was maintained by Santiago Vila and it is +currently maintained by Santiago García Mantiñán . + +The source for this release was taken from: + +http://www.chiark.greenend.org.uk/~neilt/mbr/ + +Program Copyright (C) 1995, 1999-2001 Neil Turton. +Modifications for Debian GNU/Linux Copyright (C) 1995 Bruce Perens. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- mbr-1.1.9.orig/Makefile.am +++ mbr-1.1.9/Makefile.am @@ -17,12 +17,11 @@ AS86 = as86 LD86 = ld86 -AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror +AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes man_MANS = install-mbr.8 -TESTS = tests/version tests/inst-1 tests/inst-2 tests/inst-3 \ - tests/inst-4 tests/inst-5 tests/inst-6 tests/inst-7 tests/inst-8 \ +TESTS = tests/inst-4 tests/mbr-1 tests/mbr-2 tests/mbr-3 tests/mbr-4 \ tests/mbr-5 tests/mbr-6 \ tests/testdisk-1 tests/testdisk-2 tests/testdisk-3 \ @@ -31,13 +30,7 @@ check-TESTS: \ table.b \ - mbr.b \ - mbr-1.1.3.b \ - mbr-1.1.2.b \ - mbr-1.1.1.b \ - mbr-1.1.0.b \ - mbr-1.0.1.b \ - mbr-1.0.0.b + mbr.b EXTRA_DIST = table.S86 historic,v wraptest ${TESTS} ${man_MANS} --- mbr-1.1.9.orig/Makefile.in +++ mbr-1.1.9/Makefile.in @@ -81,11 +81,11 @@ AS86 = as86 LD86 = ld86 -AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror +AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes man_MANS = install-mbr.8 -TESTS = tests/version tests/inst-1 tests/inst-2 tests/inst-3 tests/inst-4 tests/inst-5 tests/inst-6 tests/inst-7 tests/inst-8 tests/mbr-1 tests/mbr-2 tests/mbr-3 tests/mbr-4 tests/mbr-5 tests/mbr-6 tests/testdisk-1 tests/testdisk-2 tests/testdisk-3 tests/testdisk-4 tests/testdisk-5 tests/testdisk-6 +TESTS = tests/inst-4 tests/mbr-1 tests/mbr-2 tests/mbr-3 tests/mbr-4 tests/mbr-5 tests/mbr-6 tests/testdisk-1 tests/testdisk-2 tests/testdisk-3 tests/testdisk-4 tests/testdisk-5 tests/testdisk-6 TESTS_ENVIRONMENT = sh ${srcdir}/wraptest @@ -497,14 +497,7 @@ check-TESTS: \ - table.b \ - mbr.b \ - mbr-1.1.3.b \ - mbr-1.1.2.b \ - mbr-1.1.1.b \ - mbr-1.1.0.b \ - mbr-1.0.1.b \ - mbr-1.0.0.b + table.b .PRECIOUS: mbr.b y2k.b testdisk.b --- mbr-1.1.9.orig/harness/Makefile.am +++ mbr-1.1.9/harness/Makefile.am @@ -12,4 +12,4 @@ time.c \ vm86.c -AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -m32 +AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -g -m32 --- mbr-1.1.9.orig/harness/Makefile.in +++ mbr-1.1.9/harness/Makefile.in @@ -72,7 +72,7 @@ harness_SOURCES = harness.h vm86.h args.c bios.c event.c harness.c mbr.c output.c process.c time.c vm86.c -AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -m32 +AM_CFLAGS = -Wall -Wstrict-prototypes -Wmissing-prototypes -g -m32 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) --- mbr-1.1.9.orig/harness/vm86.c +++ mbr-1.1.9/harness/vm86.c @@ -11,9 +11,6 @@ /* The purpose of this file is to interact with the kernel and run the V86 task. */ -static -_syscall2(int, vm86, unsigned long, fn, struct vm86plus_struct *, v86); - static void vm86_dump(void) { unsigned long eflags = v86.regs.eflags;