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

Bug#657830: win32-loader: Please make pxe.target depend on the ipxe package



tags 657830 +patch
thanks

Le 29.01.2012 11:00, Alkis Georgopoulos a écrit :
> An ipxe package is available in Debian wheezy and sid:
> $ rmadison ipxe
>  ipxe | 1.0.0+git-2.149b50-1 | wheezy | source, all
>  ipxe | 1.0.0+git-2.149b50-1 | sid    | source, all
> 
> It would be awesome if people could get win32-loader.exe directly from
> the Debian archives (by decompressing the .deb of course).

Hi Alkis, and thanks for your bugreport,

I propose the attached patch that would do even "better", by providing a
win32-loader-pxe.exe from the Debian mirrors, available on
http://ftp.debian.org/debian/tools/win32-loader/unstable/win32-loader-pxe.exe

That win32-loader-pxe.exe is basically the standalone win32-loader.exe
"plus" the PXE choice, so there is a (minor) duplication of
functionality, but the default win32-loader.exe pointed at by
get.debian.net and the installation manuals would stay the "normal"
win32-loader.exe

What do you (and debian-boot ?) think about that ?

Cheers,

OdyX
From 769df684f27f477549e2cd73f00bcf85ccb15049 Mon Sep 17 00:00:00 2001
From: Didier Raboud <odyx@debian.org>
Date: Mon, 30 Jan 2012 12:01:34 +0100
Subject: [PATCH] Build a standalone PXE-enabled version.

- Ship the PXE-enabled version as byhand file to push it towards the mirrors network as win32-loader-pxe.exe
- Document the two standalone flavours
- Add ipxe as Build-Depends.
- Add ipxe to the Built-Using list.

Closes: #657830
Reported-By: Alkis Georgopoulos <alkisg@gmail.com>
Signed-off-by: Didier Raboud <odyx@debian.org>
---
 Makefile                    |    5 ++++-
 debian/control              |    1 +
 debian/rules                |   12 +++++++++++-
 debian/win32-loader_doc.txt |    6 ++++++
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index e5c6f66..c99843b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 export SHELL := bash
 
 # Targets that will always be run (as they depend on stuff from installed packages)
-.PHONY: core.img g2ldr g2ldr.mbr loadlin.pif loadlin.exe
+.PHONY: core.img g2ldr g2ldr.mbr loadlin.pif loadlin.exe pxe.lkrn
 
 PACKAGE	:= win32-loader
 VERSION	:= $(shell head -n 1 debian/changelog | sed -e "s/^$(PACKAGE) (\(.*\)).*/\1/g")
@@ -105,6 +105,9 @@ loadlin.pif: genpif
 loadlin.exe: /usr/lib/loadlin/loadlin.exe.gz
 	gunzip -c $^ > $@
 
+pxe.lkrn: /usr/lib/ipxe/ipxe.lkrn
+	cp $^ $@
+
 ifdef PXE
 pxe.target: pxe.lkrn templates/ternary_choice.ini
 else
diff --git a/debian/control b/debian/control
index df4ea69..6f16736 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,7 @@ Build-Depends:
  mingw-w64,
  gettext,
  grub-pc-bin (>= 1.99~rc1-3),
+ ipxe,
  loadlin (>= 1.6c.really1.6c.nobin-1~),
  locales-all,
  gpgv-win32, debian-archive-keyring,
diff --git a/debian/rules b/debian/rules
index fc84014..a3d111a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,8 +5,9 @@ BYHAND ?= yes
 
 W32_VERSION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
 W32_BYHAND_NAME := win32-loader_$(W32_VERSION)_all
+W32_PXE_BYHAND_NAME := win32-loader-pxe_$(W32_VERSION)_all
 
-B_D_PACKAGES := grub-pc-bin cpio-win32 gzip-win32 gpgv-win32 debian-archive-keyring loadlin
+B_D_PACKAGES := grub-pc-bin cpio-win32 gzip-win32 gpgv-win32 debian-archive-keyring loadlin ipxe
 
 PACKAGES_LIST := $(shell set -e; \
 	for p in ${B_D_PACKAGES}; \
@@ -42,6 +43,11 @@ ifeq ($(BYHAND),yes)
 		OUTFILE_NAME=$(W32_BYHAND_NAME).exe \
 		dh_auto_build
 	
+	# Build the PXE (standalone) version
+	PXE=yes \
+		OUTFILE_NAME=$(W32_PXE_BYHAND_NAME).exe \
+		dh_auto_build
+	
 	# Prepare the README file
 	awk '{sub(/@PACKAGES_LIST@/,"$(PACKAGES_LIST)")}1 \
              {sub(/@NSIS_VERSION@/,"$(NSIS_VERSION)")}1 \
@@ -56,6 +62,7 @@ endif
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -f $(W32_BYHAND_NAME).exe
+	rm -f $(W32_PXE_BYHAND_NAME).exe
 	rm -f $(W32_BYHAND_NAME).txt
 
 override_dh_builddeb:
@@ -64,6 +71,9 @@ ifeq ($(BYHAND),yes)
 	cp $(W32_BYHAND_NAME).exe ../
 	dpkg-distaddfile $(W32_BYHAND_NAME).exe byhand -
 
+	cp $(W32_PXE_BYHAND_NAME).exe ../
+	dpkg-distaddfile $(W32_PXE_BYHAND_NAME).exe byhand -
+
 	cp $(W32_BYHAND_NAME).txt ../
 	dpkg-distaddfile $(W32_BYHAND_NAME).txt byhand -
 endif
diff --git a/debian/win32-loader_doc.txt b/debian/win32-loader_doc.txt
index 6162ddd..31ec502 100644
--- a/debian/win32-loader_doc.txt
+++ b/debian/win32-loader_doc.txt
@@ -29,6 +29,12 @@ the Debian Installation Guide before launching win32-loader.exe:
 
 	http://www.debian.org/releases/stable/installmanual
 
+== Versions ==
+
+The standalone win32-loader is provided in two versions: the standard
+`win32-loader.exe` and the PXE-enabled `win32-loader-pxe.exe` which
+additionally offers the possibility to boot the iPXE loader.
+
 == Removal ==
 
 When win32-loader.exe is uninstalled, it removes the Debian-Installer image
-- 
1.7.2.5

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: