diff options
| author | Igor Pashev <pashev.igor@gmail.com> | 2013-03-26 23:01:50 +0000 |
|---|---|---|
| committer | Igor Pashev <pashev.igor@gmail.com> | 2013-03-26 23:45:27 +0000 |
| commit | c0d7893da879a8d5cbd33396ac106c865ea818ac (patch) | |
| tree | ba2c5c88c4403bc926a8b690e130f079f09f2c37 /illumos-grub/debian | |
| parent | 33a4ed4a772e4a2ebf087d239124cb1ace152833 (diff) | |
| download | illumos-packaging-c0d7893da879a8d5cbd33396ac106c865ea818ac.tar.gz | |
illumos-grub is buildable
Diffstat (limited to 'illumos-grub/debian')
| -rw-r--r-- | illumos-grub/debian/README.source | 10 | ||||
| -rw-r--r-- | illumos-grub/debian/changelog | 5 | ||||
| -rw-r--r-- | illumos-grub/debian/compat | 1 | ||||
| -rw-r--r-- | illumos-grub/debian/control | 22 | ||||
| -rw-r--r-- | illumos-grub/debian/copyright | 40 | ||||
| -rw-r--r-- | illumos-grub/debian/patches/grub-gnu-toolchain.patch | 95 | ||||
| -rw-r--r-- | illumos-grub/debian/patches/grub-minimal.patch | 13 | ||||
| -rw-r--r-- | illumos-grub/debian/patches/grub-netboot-make-syntax.patch | 16 | ||||
| -rw-r--r-- | illumos-grub/debian/patches/grub-stage2-types.patch | 71 | ||||
| -rw-r--r-- | illumos-grub/debian/patches/series | 4 | ||||
| -rwxr-xr-x | illumos-grub/debian/rules | 82 | ||||
| -rw-r--r-- | illumos-grub/debian/source/format | 1 |
12 files changed, 360 insertions, 0 deletions
diff --git a/illumos-grub/debian/README.source b/illumos-grub/debian/README.source new file mode 100644 index 0000000..9988910 --- /dev/null +++ b/illumos-grub/debian/README.source @@ -0,0 +1,10 @@ +Real sources are in the package illumos-source-X.Y, +where X and Y are numbers. Exact values of X and Y +are set in Build-Depends field of debian/control as +well as in the version string in debian/changelog, +in a form of X.Y-1. + +To add a patch you need first to unpack files from +illumos-source-X.Y using ./debian/rules unpack +and, desirably, ./debian/rules patch + diff --git a/illumos-grub/debian/changelog b/illumos-grub/debian/changelog new file mode 100644 index 0000000..4944540 --- /dev/null +++ b/illumos-grub/debian/changelog @@ -0,0 +1,5 @@ +illumos-grub (2.10-1) unstable; urgency=low + + * Initial release. + + -- Igor Pashev <pashev.igor@gmail.com> Tue, 26 Mar 2013 23:01:25 +0000 diff --git a/illumos-grub/debian/compat b/illumos-grub/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/illumos-grub/debian/compat @@ -0,0 +1 @@ +9 diff --git a/illumos-grub/debian/control b/illumos-grub/debian/control new file mode 100644 index 0000000..8b59661 --- /dev/null +++ b/illumos-grub/debian/control @@ -0,0 +1,22 @@ +Source: illumos-grub +Section: admin +Priority: required +Maintainer: Igor Pashev <pashev.igor@gmail.com> +Build-Depends: + dh-illumos, + illumos-source-2.10, + gcc-multilib [illumos-amd64], + sunmake, + quilt, +Standards-Version: 3.9.3 +Homepage: https://www.illumos.org + +Package: illumos-grub +Priority: optional +Section: admin +Architecture: illumos-any +Depends: ${shlibs:Depends}, ${misc:Depends}, +Description: GRand Unified Bootloader + This package includes GRUB capable to load Illumos + + diff --git a/illumos-grub/debian/copyright b/illumos-grub/debian/copyright new file mode 100644 index 0000000..63d56c8 --- /dev/null +++ b/illumos-grub/debian/copyright @@ -0,0 +1,40 @@ +Files: debian/* +Copyright: 2012, Igor Pashev <pashev.igor@gmail.com> +License: WTFPL-2 + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + . + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + . + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + . + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + . + 0. You just DO WHAT THE FUCK YOU WANT TO. + + +GRUB Copyright: + + Copyright (C) 1996 Erich Boleyn <erich@uruk.org> + Copyright (C) 1999-2000 Free Software Foundation, Inc. + + 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, version 2. + + 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. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +On Debian GNU systems, the complete text of the GNU General Public +License can be found in `/usr/share/common-licenses/GPL-2'. + diff --git a/illumos-grub/debian/patches/grub-gnu-toolchain.patch b/illumos-grub/debian/patches/grub-gnu-toolchain.patch new file mode 100644 index 0000000..86d9fab --- /dev/null +++ b/illumos-grub/debian/patches/grub-gnu-toolchain.patch @@ -0,0 +1,95 @@ +Index: illumos-grub/usr/src/grub/grub-0.97/Makefile.solaris.defs +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/Makefile.solaris.defs 2012-10-08 00:25:35.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/Makefile.solaris.defs 2013-03-26 18:55:24.304982248 +0000 +@@ -42,11 +42,11 @@ + OPTION_FS = $(POUND_SIGN) + + +-BASE_CFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS) +-BASE_CCASFLAGS = -B$(GCC_ROOT)/bin/ -g $(CPPFLAGS) $(OPTFLAGS) +-BASE_LDFLAGS = ++BASE_CFLAGS = -g $(CPPFLAGS) $(OPTFLAGS) ++BASE_CCASFLAGS = -g $(CPPFLAGS) $(OPTFLAGS) ++BASE_LDFLAGS = -m elf_i386_sol2 + +-CC = $(GCC_ROOT)/bin/gcc ++CC = /usr/bin/gcc -m32 + CFLAGS = $(BASE_CFLAGS) + CCDEPMODE = depmode=none + +@@ -55,20 +55,10 @@ + + CPP = $(CC) -E + +-# $(ENVCPPFLAGS4), if defined, should be something like "-Y I,somepath". +-# We want to get rid of the "-Y I," part but make's pattern replacement +-# macro reference doesn't allow spaces in it, e.g. $(ENVCPPFLAGS4:-Y I,%=%). +-# So we'll get rid of the "-Y" now and then the "I," later. By the way, this +-# should also work in case $(ENVCPPFLAGS4) is "-YI,somepath" (no space). +-t.ENVCPPFLAGS4 = $(ENVCPPFLAGS4:-Y%=%) +- +-CPPFLAGS = $(DEFS) $(INCLUDES) $(WARNFLAGS) \ +- $(ENVCPPFLAGS1:-I%=-isystem %) \ +- $(ENVCPPFLAGS2:-I%=-isystem %) \ +- $(ENVCPPFLAGS3:-I%=-isystem %) \ +- $(t.ENVCPPFLAGS4:I,%=-nostdinc -isystem %) ++CPPFLAGS = $(DEFS) $(INCLUDES) $(WARNFLAGS) + +-CCLD = $(GNU_ROOT)/bin/gld ++ ++CCLD = /usr/bin/ld + LDFLAGS = $(BASE_LDFLAGS) + LINKFLAGS = -g + LINK = $(CCLD) $(LINKFLAGS) $(LDFLAGS) +@@ -78,9 +68,9 @@ + #WARNFLAGS = -Wall -Wmissing-prototypes -Wunused -Wshadow \ + # -Wpointer-arith -Wundef + +-OBJCOPY = $(GNU_ROOT)/bin/gobjcopy ++OBJCOPY = /usr/bin/objcopy + +-AR = /usr/ccs/bin/ar ++AR = /usr/bin/ar + RANLIB = : + + MKDIR = mkdir -p +Index: illumos-grub/usr/src/grub/grub-0.97/netboot/Makefile.solaris +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/netboot/Makefile.solaris 2013-03-26 18:55:24.127214858 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/netboot/Makefile.solaris 2013-03-26 18:55:24.307083935 +0000 +@@ -21,7 +21,7 @@ + libdrivers_a-pci_io.o \ + libdrivers_a-pic8259.o \ + libdrivers_a-timer.o +-$(LIB_OBJS) := CFLAGS = $(BASE_CFLAGS) -Os -fno-builtin -nostdinc \ ++$(LIB_OBJS) := CFLAGS = $(BASE_CFLAGS) -Os -fno-builtin \ + -DFSYS_TFTP=1 $(NET_CFLAGS) $(NET_EXTRAFLAGS) + + # +Index: illumos-grub/usr/src/grub/grub-0.97/stage1/Makefile.solaris +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/stage1/Makefile.solaris 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/stage1/Makefile.solaris 2013-03-26 18:55:24.309214454 +0000 +@@ -15,7 +15,7 @@ + + + INCLUDES = -I. -I.. +-CCASFLAGS += -O2 -fno-builtin -nostdinc ++CCASFLAGS += -O2 -fno-builtin + LDFLAGS += -nostdlib -N -Ttext 7C00 + LIBS = + +Index: illumos-grub/usr/src/grub/grub-0.97/stage2/Makefile.solaris +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/stage2/Makefile.solaris 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/stage2/Makefile.solaris 2013-03-26 18:55:24.312008633 +0000 +@@ -38,7 +38,7 @@ + -DSYS_VSTAFS=1 + # GRUB_CFLAGS += -DSUPPORT_HERCULES=1 + STAGE1_5_CFLAGS = $(STAGE2_CFLAGS) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 +-STAGE2_CFLAGS = -Os -fno-builtin -nostdinc \ ++STAGE2_CFLAGS = -Os -fno-builtin \ + $(SERIAL_CFLAGS) $(GRAPHICS_CFLAGS) + $(STAGE2_NETBOOT)STAGE2_CFLAGS += $(NETBOOT_CFLAGS) + #STAGE2_CFLAGS += $(HERCULES_CFLAGS) diff --git a/illumos-grub/debian/patches/grub-minimal.patch b/illumos-grub/debian/patches/grub-minimal.patch new file mode 100644 index 0000000..2aed2fa --- /dev/null +++ b/illumos-grub/debian/patches/grub-minimal.patch @@ -0,0 +1,13 @@ +Index: illumos-grub/usr/src/grub/grub-0.97/Makefile.solaris +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/Makefile.solaris 2012-10-08 00:25:35.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/Makefile.solaris 2013-03-26 20:11:44.262681206 +0000 +@@ -9,7 +9,7 @@ + + .KEEP_STATE: + +-SUBDIRS = netboot stage2 stage1 lib grub util docs ++SUBDIRS = netboot stage2 stage1 + + # + # Source files to be installed in $(SRC_DIR). diff --git a/illumos-grub/debian/patches/grub-netboot-make-syntax.patch b/illumos-grub/debian/patches/grub-netboot-make-syntax.patch new file mode 100644 index 0000000..c656aa5 --- /dev/null +++ b/illumos-grub/debian/patches/grub-netboot-make-syntax.patch @@ -0,0 +1,16 @@ +Description: this works for both gnu make and sun make +Index: illumos-grub/usr/src/grub/grub-0.97/netboot/Makefile.solaris +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/netboot/Makefile.solaris 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/netboot/Makefile.solaris 2013-03-25 23:38:16.253412014 +0000 +@@ -144,8 +144,8 @@ + $(AR) cru $@ $(LIBDRIVERS_OBJS) + $(RANLIB) $@ + +-$(LIB_OBJS): $$(@:libdrivers_a-%.o=%.c) +- $(CC) $(CFLAGS) -c -o $@ $(@:libdrivers_a-%.o=%.c) ++libdrivers_a-%.o: %.c ++ $(CC) $(CFLAGS) -c -o $@ $< + + $(DRIVER_OBJS): $$(DRIVER_SRC) + $(CC) $(CFLAGS) -c -o $@ $(DRIVER_SRC) diff --git a/illumos-grub/debian/patches/grub-stage2-types.patch b/illumos-grub/debian/patches/grub-stage2-types.patch new file mode 100644 index 0000000..7ee29ed --- /dev/null +++ b/illumos-grub/debian/patches/grub-stage2-types.patch @@ -0,0 +1,71 @@ +Description: Lots of typedefs are missed. + Maybe it is related to ncurses.h +Index: illumos-grub/usr/src/grub/grub-0.97/netboot/types.h +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/netboot/types.h 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/netboot/types.h 2013-03-26 19:05:43.336828630 +0000 +@@ -6,6 +6,11 @@ + /* + * It's architecture depended headers for common integer types + */ ++ ++/* For uint64_t: */ ++#ifndef _LONGLONG_TYPE ++#define _LONGLONG_TYPE ++#endif + #include "stdint.h" + + /* +Index: illumos-grub/usr/src/grub/grub-0.97/stage2/builtins.c +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/stage2/builtins.c 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/stage2/builtins.c 2013-03-26 19:00:53.812524824 +0000 +@@ -48,6 +48,7 @@ + # include <md5.h> + #endif + ++#include <types.h> + #include <cpu.h> + + /* The type of kernel loaded. */ +Index: illumos-grub/usr/src/grub/grub-0.97/stage2/disk_io.c +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/stage2/disk_io.c 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/stage2/disk_io.c 2013-03-26 19:07:01.084167515 +0000 +@@ -20,6 +20,7 @@ + + + #include <shared.h> ++#include <types.h> + #include <filesys.h> + + #ifdef SUPPORT_NETBOOT +Index: illumos-grub/usr/src/grub/grub-0.97/stage2/defs.h +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/stage2/defs.h 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/stage2/defs.h 2013-03-26 19:25:58.350200952 +0000 +@@ -50,7 +50,7 @@ + typedef unsigned short u_short; /* unsigned short */ + typedef unsigned int u_int; /* unsigned int */ + +-#if !defined(__sun) || !defined(GRUB_UTIL) ++#if !defined(__sun) || !defined(GRUB_UTIL) || 1 + typedef struct _quad_ + { + unsigned int val[2]; /* 2 int values make... */ +Index: illumos-grub/usr/src/grub/grub-0.97/stage2/iso9660.h +=================================================================== +--- illumos-grub.orig/usr/src/grub/grub-0.97/stage2/iso9660.h 2012-10-08 00:25:37.000000000 +0000 ++++ illumos-grub/usr/src/grub/grub-0.97/stage2/iso9660.h 2013-03-26 19:39:47.165636057 +0000 +@@ -69,10 +69,10 @@ + #endif + #else + #ifndef GRUB_UTIL +-typedef char int8_t; + typedef short int16_t; + typedef int int32_t; + #endif /* ! GRUB_UTIL */ ++typedef char int8_t; + typedef unsigned char u_int8_t; + typedef unsigned short u_int16_t; + typedef unsigned int u_int32_t; diff --git a/illumos-grub/debian/patches/series b/illumos-grub/debian/patches/series new file mode 100644 index 0000000..02f305f --- /dev/null +++ b/illumos-grub/debian/patches/series @@ -0,0 +1,4 @@ +grub-netboot-make-syntax.patch +grub-gnu-toolchain.patch +grub-stage2-types.patch +grub-minimal.patch diff --git a/illumos-grub/debian/rules b/illumos-grub/debian/rules new file mode 100755 index 0000000..3be4523 --- /dev/null +++ b/illumos-grub/debian/rules @@ -0,0 +1,82 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/buildflags.mk + +export DH_VERBOSE = 1 + +cmd := \ + vt \ + +man := \ + +unpack: unpack-stamp +unpack-stamp: + dh_testdir + dh_illumos_gate --build \ + $(man) \ + usr/src/grub \ + + + # Buggy and unused: + echo > usr/src/Makefile.msg.targ + + # Use GNU ld: + sed -i '/LD_ALTEXEC/d' usr/env.sh + + touch $@ + +patch: patch-stamp +patch-stamp: unpack-stamp + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2 + touch $@ + +unpatch: + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2 + rm -f patch-stamp + +dirs-stamp: unpack-stamp + . usr/env.sh; mkdir -p \ + debian/tmp/usr/lib + touch $@ + +install: install-stamp + +install-stamp: build-stamp + touch $@ + +build build-arch build-indep: build-stamp +build-stamp: dirs-stamp patch-stamp + dh_illumos_make --native usr/src/grub -m sunmake + touch $@ + +binary binary-arch binary-indep: binary-stamp +binary-stamp: install-stamp + dh_testdir + dh_testroot + dh_installdirs + dh_install + dh_strip + dh_installman + dh_installdocs + dh_installexamples + dh_installchangelogs + dh_bash-completion + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_strip + dh_gencontrol + dh_md5sums + dh_builddeb + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + dh_clean + rm -rf usr .pc + diff --git a/illumos-grub/debian/source/format b/illumos-grub/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/illumos-grub/debian/source/format @@ -0,0 +1 @@ +3.0 (native) |
