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

Re: [PATCH] Support for "hardware burn-in" stage (updated)



Otavio Salvador wrote:

> While I agree that the patch looks good, I'd like to give it a try
> before acking it.

I've updated the patches a little to:

 * Incorporate a few suggestions that were made (Thanks, Frans)
 * Add some small logging functionality
 * General tidying

The updated version of the patches are attached. I have uploaded packages
for i386 and amd64 here:

  http://lamby.uwcs.co.uk/b/d-i_cpuburn/

  736479a5ff10560a768ff50f6aebc16f6f211ef9  cpuburn-udeb_1.4-27_amd64.udeb
  1ddae37cf12a2807da687e64943d4b57d1a89e09  cpuburn-udeb_1.4-27_i386.udeb

Regards,

-- 
Chris Lamb, UK                                       chris@chris-lamb.co.uk
                                                            GPG: 0x634F9A20
diff --git a/debian/cpuburn.dirs b/debian/cpuburn.dirs
new file mode 100644
index 0000000..a49457a
--- /dev/null
+++ b/debian/cpuburn.dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/lintian/overrides
diff --git a/debian/cpuburn.docs b/debian/cpuburn.docs
new file mode 100644
index 0000000..d1cdb5e
--- /dev/null
+++ b/debian/cpuburn.docs
@@ -0,0 +1,2 @@
+Design
+README
diff --git a/debian/cpuburn.manpages b/debian/cpuburn.manpages
new file mode 100644
index 0000000..e08300c
--- /dev/null
+++ b/debian/cpuburn.manpages
@@ -0,0 +1 @@
+debian/cpuburn.1
diff --git a/debian/cpuburn.overrides b/debian/cpuburn.overrides
new file mode 100644
index 0000000..225e31b
--- /dev/null
+++ b/debian/cpuburn.overrides
@@ -0,0 +1,6 @@
+cpuburn: statically-linked-binary ./usr/bin/burnBX
+cpuburn: statically-linked-binary ./usr/bin/burnK6
+cpuburn: statically-linked-binary ./usr/bin/burnK7
+cpuburn: statically-linked-binary ./usr/bin/burnP5
+cpuburn: statically-linked-binary ./usr/bin/burnP6
+cpuburn: statically-linked-binary ./usr/bin/burnMMX
diff --git a/debian/cpuburn.postinst b/debian/cpuburn.postinst
new file mode 100644
index 0000000..339a0f2
--- /dev/null
+++ b/debian/cpuburn.postinst
@@ -0,0 +1,13 @@
+#!/bin/sh 
+set -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/cpuburn.templates b/debian/cpuburn.templates
new file mode 100644
index 0000000..06436d2
--- /dev/null
+++ b/debian/cpuburn.templates
@@ -0,0 +1,9 @@
+Template: cpuburn/dangerous
+Type: note
+_Description: cpuburn is dangerous for your system
+ This program is designed to heavily load CPU chips. Undercooled,
+ overclocked or otherwise weak systems may fail causing data loss
+ (filesystem corruption) and possibly permanent damage to electronic
+ components. Use at your own risk.
+ .
+ For more information, see /usr/share/doc/cpuburn/README.
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index a49457a..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/bin
-usr/share/lintian/overrides
diff --git a/debian/docs b/debian/docs
deleted file mode 100644
index d1cdb5e..0000000
--- a/debian/docs
+++ /dev/null
@@ -1,2 +0,0 @@
-Design
-README
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index e08300c..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-debian/cpuburn.1
diff --git a/debian/overrides b/debian/overrides
deleted file mode 100644
index 225e31b..0000000
--- a/debian/overrides
+++ /dev/null
@@ -1,6 +0,0 @@
-cpuburn: statically-linked-binary ./usr/bin/burnBX
-cpuburn: statically-linked-binary ./usr/bin/burnK6
-cpuburn: statically-linked-binary ./usr/bin/burnK7
-cpuburn: statically-linked-binary ./usr/bin/burnP5
-cpuburn: statically-linked-binary ./usr/bin/burnP6
-cpuburn: statically-linked-binary ./usr/bin/burnMMX
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
index cef83a3..e409cb1 100644
--- a/debian/po/POTFILES.in
+++ b/debian/po/POTFILES.in
@@ -1 +1 @@
-[type: gettext/rfc822deb] templates
+[type: gettext/rfc822deb] cpuburn.templates
diff --git a/debian/po/cs.po b/debian/po/cs.po
index d1e6de7..16be60a 100644
--- a/debian/po/cs.po
+++ b/debian/po/cs.po
@@ -25,13 +25,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn je pro váš systém nebezpeÄ?ný"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -45,6 +45,6 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Pro více informací si pÅ?eÄ?tÄ?te /usr/share/doc/cpuburn/README."
diff --git a/debian/po/da.po b/debian/po/da.po
index 2719d3e..13ca46a 100644
--- a/debian/po/da.po
+++ b/debian/po/da.po
@@ -26,13 +26,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn er farligt for dit system"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -45,6 +45,6 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "For flere oplysninger, se /usr/share/doc/cpuburn/README."
diff --git a/debian/po/de.po b/debian/po/de.po
index 45e19c7..cefa9b4 100644
--- a/debian/po/de.po
+++ b/debian/po/de.po
@@ -27,13 +27,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn ist gefährlich für Ihr System"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -46,7 +46,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Für weitere Informationen siehe /usr/share/doc/cpuburn/README."
 
diff --git a/debian/po/es.po b/debian/po/es.po
index 3fc2893..feba712 100644
--- a/debian/po/es.po
+++ b/debian/po/es.po
@@ -39,17 +39,17 @@ msgstr ""
 "X-Poedit-SourceCharset: utf-8\n"
 
 #. Type: note
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn es peligroso para su sistema"
 
 #. Type: note
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "This program is designed to heavily load CPU chips. Undercooled, overclocked or otherwise weak systems may fail causing data loss (filesystem corruption) and possibly permanent damage to electronic components. Use at your own risk."
 msgstr "Este programa está diseñado para cargar intensamente los procesadores. Los sistemas mal refrigerados, «overclockeados» o débiles por algún otro motivo pueden fallar y producir pérdidas de datos (sistema de ficheros corrupto) y posible daño permanente en los componentes electrónicos. Utilícelo bajo su responsabilidad."
 
 #. Type: note
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Si desea más información consulte /usr/share/doc/cpuburn/README."
 
diff --git a/debian/po/fr.po b/debian/po/fr.po
index 49fa634..df1e536 100644
--- a/debian/po/fr.po
+++ b/debian/po/fr.po
@@ -25,13 +25,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "Cpuburn est dangereux pour votre système"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -46,7 +46,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr ""
 "Pour plus d'information, veuillez consultez le fichier /usr/share/doc/"
diff --git a/debian/po/it.po b/debian/po/it.po
index f8174d1..08b6c39 100644
--- a/debian/po/it.po
+++ b/debian/po/it.po
@@ -1,11 +1,11 @@
-# Italian (it) translation of debconf templates for cpuburn
+# Italian (it) translation of debconf cpuburn.templates for cpuburn
 # Copyright (C) 2007 Free Software Foundation, Inc.
 # This file is distributed under the same license as the cpuburn package.
 # Luca Monducci <luca.mo@tiscali.it>, 2007.
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: cpuburn 1.4 italian debconf templates\n"
+"Project-Id-Version: cpuburn 1.4 italian debconf cpuburn.templates\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2007-04-13 04:30+0200\n"
 "PO-Revision-Date: 2007-05-29 21:12+0200\n"
@@ -17,13 +17,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn è pericoloso per il sistema"
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -36,6 +36,6 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Per ulteriori informazioni consultare /usr/share/doc/cpuburn/README."
diff --git a/debian/po/ja.po b/debian/po/ja.po
index 47048cf..ef2fe85 100644
--- a/debian/po/ja.po
+++ b/debian/po/ja.po
@@ -26,13 +26,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn ¤Ï¥·¥¹¥Æ¥à¤ò´í¸±¤Ê¾õÂ֤ˤ·¤Þ¤¹"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -46,6 +46,6 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢/usr/share/doc/cpuburn/README ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£"
diff --git a/debian/po/nl.po b/debian/po/nl.po
index c89cf03..c6c6bf5 100644
--- a/debian/po/nl.po
+++ b/debian/po/nl.po
@@ -18,19 +18,19 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn is gevaarlijk voor uw systeem"
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid "This program is designed to heavily load CPU chips. Undercooled, overclocked or otherwise weak systems may fail causing data loss (filesystem corruption) and possibly permanent damage to electronic components. Use at your own risk."
 msgstr "Dit programma is ontwikkeld om uw CPU-chips zwaar te belasten. Onderkoelde, overgeklokte, of anders zwakke systemen kunnen falen en daardoor dataverlies (wegens corruptie van bestandssystemen) en zelfs permanente schade aan uw elektronica-componenten veroorzaken. Gebruik is strikt op eigen risico."
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Meer informatie vindt u in /usr/share/doc/cpuburn/README ."
 
diff --git a/debian/po/pt.po b/debian/po/pt.po
index 42d8159..21866f6 100644
--- a/debian/po/pt.po
+++ b/debian/po/pt.po
@@ -16,13 +16,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid "cpuburn is dangerous for your system"
 msgstr "O cpuburn é perigoso para o seu sistema"
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -36,7 +36,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:1001
+#: ../cpuburn.templates:1001
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Para mais informação, veja /usr/share/doc/cpuburn/README."
 
diff --git a/debian/po/pt_BR.po b/debian/po/pt_BR.po
index 87f5f8c..5974d51 100644
--- a/debian/po/pt_BR.po
+++ b/debian/po/pt_BR.po
@@ -25,13 +25,13 @@ msgstr "pt_BR UTF-8\n"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn é perigoso para o seu sistema"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -45,6 +45,6 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Para maiores informações, veja /usr/share/doc/cpuburn/README."
diff --git a/debian/po/ru.po b/debian/po/ru.po
index 470cd1a..3e9f2cd 100644
--- a/debian/po/ru.po
+++ b/debian/po/ru.po
@@ -25,13 +25,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn ÏÐÁÓÅÎ ÄÌÑ ×ÁÛÅÊ ÓÉÓÔÅÍÙ"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -44,6 +44,6 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "äÌÑ ÄÏÐÏÌÎÉÔÅÌØÎÏÊ ÉÎÆÏÒÍÁÃÉÉ, ÓÍÏÔÒÉÔÅ /usr/share/doc/cpuburn/README."
diff --git a/debian/po/sv.po b/debian/po/sv.po
index b08c3aa..f7cf9d2 100644
--- a/debian/po/sv.po
+++ b/debian/po/sv.po
@@ -24,13 +24,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "cpuburn är farligt för ditt system"
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -42,7 +42,7 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "För mer information, se /usr/share/doc/cpuburn/README."
 
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
index 66487c0..c73e4ed 100644
--- a/debian/po/templates.pot
+++ b/debian/po/templates.pot
@@ -26,13 +26,13 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -41,6 +41,6 @@ msgstr ""
 
 #. Type: note
 #. Description
-#: ../templates:3
+#: ../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr ""
diff --git a/debian/po/vi.po b/debian/po/vi.po
index 0787cfc..155041a 100644
--- a/debian/po/vi.po
+++ b/debian/po/vi.po
@@ -17,13 +17,13 @@ msgstr ""
 
 #.Type: note
 #.Description
-#:../templates:3
+#:../cpuburn.templates:3
 msgid "cpuburn is dangerous for your system"
 msgstr "Trình cpuburn gây nguy hi�m cho h� th�ng bạn."
 
 #.Type: note
 #.Description
-#:../templates:3
+#:../cpuburn.templates:3
 msgid ""
 "This program is designed to heavily load CPU chips. Undercooled, overclocked "
 "or otherwise weak systems may fail causing data loss (filesystem corruption) "
@@ -32,6 +32,6 @@ msgstr "Trình này Ä?ược thiết kế Ä?á»? buá»?c phiến tinh thá»? CPU ma
 
 #.Type: note
 #.Description
-#:../templates:3
+#:../cpuburn.templates:3
 msgid "For more information, see /usr/share/doc/cpuburn/README."
 msgstr "Ä?á»? tìm thông tin thêm, hãy xem /usr/share/doc/cpuburn/README."
diff --git a/debian/postinst b/debian/postinst
deleted file mode 100644
index 339a0f2..0000000
--- a/debian/postinst
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh 
-set -e
-
-# Source debconf library.
-. /usr/share/debconf/confmodule
-db_version 2.0
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
diff --git a/debian/rules b/debian/rules
index a5493e0..a4c1ef5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -24,7 +24,8 @@ install: build
 	dh_clean -k
 	dh_installdirs
 
-	cp $(CURDIR)/debian/overrides $(CURDIR)/debian/cpuburn/usr/share/lintian/overrides/cpuburn
+	cp $(CURDIR)/debian/cpuburn.overrides $(CURDIR)/debian/cpuburn/usr/share/lintian/overrides/cpuburn
+
 	for i in burnP5 burnP6 burnK6 burnK7 burnBX burnMMX ; do \
 		cp $(CURDIR)/$$i $(CURDIR)/debian/cpuburn/usr/bin ; \
 	done
diff --git a/debian/templates b/debian/templates
deleted file mode 100644
index 06436d2..0000000
--- a/debian/templates
+++ /dev/null
@@ -1,9 +0,0 @@
-Template: cpuburn/dangerous
-Type: note
-_Description: cpuburn is dangerous for your system
- This program is designed to heavily load CPU chips. Undercooled,
- overclocked or otherwise weak systems may fail causing data loss
- (filesystem corruption) and possibly permanent damage to electronic
- components. Use at your own risk.
- .
- For more information, see /usr/share/doc/cpuburn/README.
diff --git a/debian/control b/debian/control
index 20c5eff..65f46e4 100644
--- a/debian/control
+++ b/debian/control
@@ -2,7 +2,7 @@ Source: cpuburn
 Section: misc
 Priority: extra
 Maintainer: Aurelien Jarno <aurel32@debian.org>
-Build-Depends: debhelper (>> 4.0.0)
+Build-Depends: debhelper (>> 4.0.0), quilt (>= 0.40)
 Standards-Version: 3.7.3
 
 Package: cpuburn
diff --git a/debian/patches/01-data-allocation.diff b/debian/patches/01-data-allocation.diff
new file mode 100644
index 0000000..22d9afb
--- /dev/null
+++ b/debian/patches/01-data-allocation.diff
@@ -0,0 +1,44 @@
+--- cpuburn-1.4.orig/burnP5.S
++++ cpuburn-1.4/burnP5.S
+@@ -77,6 +77,7 @@
+ #else
+ 	int	$0x80
+ #endif
++.data				# Data allocation
+ .align 32,0
+ half:	.long 0xffffffff,0x3fdfffff
+ one:	.long 0xffffffff,0x3fefffff
+--- cpuburn-1.4.orig/burnK6.S
++++ cpuburn-1.4/burnK6.S
+@@ -68,6 +68,7 @@
+ 	push	%eax
+ 	int	$0x80
+ #endif
++.data				# Data allocation
+ .align 32,0
+ half:	.long 0x7fffffff,0
+ e:	.long 0xffffffff,0x3fdfffff
+--- cpuburn-1.4.orig/burnP6.S
++++ cpuburn-1.4/burnP6.S
+@@ -69,6 +69,7 @@
+ 	push	%eax		# *BSD syscall
+ 	int	$0x80
+ #endif
++.data				# Data allocation
+ .align 32,0
+ half:	.long 0x7fffffff,0
+ e:	.long 0xffffffff,0x3fdfffff
+--- cpuburn-1.4.orig/burnK7.S
++++ cpuburn-1.4/burnK7.S
+@@ -74,10 +74,9 @@
+ 	push	%eax
+ 	int	$0x80
+ #endif
++.data				# Data allocation
+ .align 32,0
+ 	.fill 64
+ half:	.long 0x7fffffff,0
+ e:	.long 0xffffffff,0x3fdfffff
+ rt:	.long 0xffffffff,0x3fefffff
+-
+-
diff --git a/debian/patches/02-gcc-m32.diff b/debian/patches/02-gcc-m32.diff
new file mode 100644
index 0000000..65bf0c2
--- /dev/null
+++ b/debian/patches/02-gcc-m32.diff
@@ -0,0 +1,7 @@
+--- cpuburn-1.4.orig/Makefile
++++ cpuburn-1.4/Makefile
+@@ -1,3 +1,3 @@
+ all : burnP5 burnP6 burnK6 burnK7 burnBX burnMMX
+ .S:
+-	gcc -s -nostdlib -o $@ $<
++	gcc -m32 -s -nostdlib -o $@ $<
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6ec46f6
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+01-data-allocation.diff
+02-gcc-m32.diff
diff --git a/debian/rules b/debian/rules
index a4c1ef5..06f202e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,13 +5,15 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-build: build-stamp
+include /usr/share/quilt/quilt.make
+
+build: patch build-stamp
 build-stamp:
 	dh_testdir
 	$(MAKE)
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f burnP5 burnP6 burnK6 burnK7 burnBX burnMMX
diff --git a/debian/control b/debian/control
index 65f46e4..57f3661 100644
--- a/debian/control
+++ b/debian/control
@@ -18,3 +18,12 @@ Description: a collection of programs to put heavy load on CPU
  putting stress on the CPU itself, cooling system, motherboard. This
  may cause data loss (filesystem corruption) and possibly permanent 
  damage to electronic components. Use at your own risk.
+
+Package: cpuburn-udeb
+XC-Package-Type: udeb
+XB-Installer-Menu-Item: 2600
+Priority: optional
+Section: debian-installer
+Architecture: amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: perform CPU stress test (burn in) - expert use only
diff --git a/debian/cpuburn-udeb.dirs b/debian/cpuburn-udeb.dirs
new file mode 100644
index 0000000..e772481
--- /dev/null
+++ b/debian/cpuburn-udeb.dirs
@@ -0,0 +1 @@
+usr/bin
diff --git a/debian/cpuburn-udeb.postinst b/debian/cpuburn-udeb.postinst
new file mode 100644
index 0000000..a8b4020
--- /dev/null
+++ b/debian/cpuburn-udeb.postinst
@@ -0,0 +1,171 @@
+#!/bin/sh
+
+#DEBHELPER#
+
+. /usr/share/debconf/confmodule
+
+db_capb backup progresscancel
+
+set -eu
+
+TEMPLATE_ROOT=cpuburn-udeb
+
+log() {
+	logger -t "$(basename $0)" "$@"
+}
+
+error() {
+	log "error: $*"
+}
+
+info() {
+	log "info: $*"
+}
+
+detect_burn_type() {
+	VENDOR=$(grep '^vendor_id' /proc/cpuinfo | head -n1 | cut -d: -f2)
+	FAMILY=$(grep '^cpu family' /proc/cpuinfo | head -n1 | cut -d: -f2)
+	MODEL=$(grep '^model[[:space:]]*:' /proc/cpuinfo | head -n1 | cut -d: -f2)
+
+	# Try and detect using vendor/model, etc.
+	case "$VENDOR" in
+	    " AuthenticAMD"*)
+		case "$FAMILY" in
+		    " 6"|" 15")	BURN_TYPE=K7 ;;
+		    " 5")	BURN_TYPE=K6 ;;
+		esac
+		;;
+	    " GenuineIntel")
+		case "$FAMILY" in
+		    " 6"|" 15")	BURN_TYPE=P6 ;;
+		esac
+		;;
+	    " CentaurHauls")
+		case "$FAMILY" in
+		    " 6")
+			case "$MODEL" in
+			    " 9"|" 10")	BURN_TYPE=P6 ;;
+			esac
+			;;
+		esac
+		;;
+	esac
+
+	# If we haven't succeeded so far, try a capability-based approach. Fall
+	# back to 'P5', however.
+	if [ -z "$BURN_TYPE" ]; then
+		BURN_TYPE=P5
+
+		if grep '^flags.* mmx' /proc/cpuinfo > /dev/null; then
+			BURN_TYPE=MMX
+		fi
+	fi
+
+	echo $BURN_TYPE
+}
+
+STATE=1
+
+while true; do
+	case "$STATE" in
+	    1)
+		db_input critical $TEMPLATE_ROOT/confirm || true
+		;;
+	    2)
+		# Check confirmation before continuing
+		db_get $TEMPLATE_ROOT/confirm
+		test "$RET" = "true" || exit 0
+
+		db_input critical $TEMPLATE_ROOT/duration || true
+		;;
+	    3)
+		db_get $TEMPLATE_ROOT/duration
+		BURN_DURATION="$RET"
+
+		QUANTITY=$(echo $BURN_DURATION | sed -e 's/^\([0-9]*\).*/\1/')
+		case "$QUANTITY" in
+		    [0-9]*) ;;
+		    *)
+			error "Could not parse duration '$BURN_DURATION'"
+			exit 1
+			;;
+		esac
+
+		UNIT=$(echo $BURN_DURATION | sed -e 's/.*\([sSmMhHdD]\)$/\1/g' | tr A-Z a-z)
+		case "$UNIT" in
+		    s) SECONDS=$QUANTITY ;;
+		    m) SECONDS=$(($QUANTITY * 60)) ;;
+		    h) SECONDS=$(($QUANTITY * 60 * 60)) ;;
+		    d) SECONDS=$(($QUANTITY * 60 * 60 * 24)) ;;
+		    *)
+			error "Could not parse duration '$BURN_DURATION'"
+			exit 1
+			;;
+		esac
+
+		db_progress START 0 $SECONDS $TEMPLATE_ROOT/progress/title
+
+		NUM_CPUS=$(grep -c "^processor" /proc/cpuinfo)
+		info "Detected $NUM_CPUS CPU(s)"
+
+		BURN_TYPE=$(detect_burn_type)
+		info "Using '$BURN_TYPE' burn type"
+
+		# Start a burn process for each core/processor, keeping
+		# track of their pids.
+		PID_LIST=""
+		while [ $NUM_CPUS -gt 0 ]; do
+			burn$BURN_TYPE &
+			PID=$!
+			info "Spawned burn$BURN_TYPE as pid $PID"
+
+			PID_LIST="$PID_LIST $PID"
+			NUM_CPUS=$(($NUM_CPUS - 1))
+		done
+
+		# We need to augment the progress bar with something that will
+		# stop moving when our system locks. Using the progress bar would 
+		# not be effective for this during long burns.
+		#
+		# An alternative solution would be to display the amount of time
+		# left for the burn-in, which the user can see decrementing as one
+		# clue that their machine is still alive.
+		STEP=1
+		while [ $SECONDS -gt 0 ]; do
+			case $STEP in
+			    1)	PROGRESS="/" ;;
+			    2)	PROGRESS="-" ;;
+			    3)	PROGRESS="\\" ;;
+			    4)	PROGRESS="|"
+				STEP=0
+				;;
+			esac
+			STEP=$(($STEP + 1))
+
+			db_subst $TEMPLATE_ROOT/progress/step PROGRESS "$PROGRESS"
+			db_progress INFO $TEMPLATE_ROOT/progress/step || break
+			db_progress STEP 1 || break
+
+			SECONDS=$(($SECONDS - 1))
+			sleep 1
+		done
+
+		for PID in $PID_LIST; do
+			info "Killing burn$BURN_TYPE process (pid $PID)"
+			kill $PID || true
+		done
+
+		db_progress STOP
+		;;
+
+	    *)
+	    	break
+		;;
+	esac
+
+	if db_go; then
+		STATE=$(($STATE + 1))
+	else
+		STATE=$(($STATE - 1))
+	fi
+done
diff --git a/debian/cpuburn-udeb.templates b/debian/cpuburn-udeb.templates
new file mode 100644
index 0000000..5c0877a
--- /dev/null
+++ b/debian/cpuburn-udeb.templates
@@ -0,0 +1,29 @@
+Template: debian-installer/cpuburn-udeb/title
+Type: text
+Description: Perform CPU stress test (burn in)
+
+Template: cpuburn-udeb/confirm
+Type: boolean
+Default: false
+_Description: Are you sure you want to perform a burn test?
+ This may be dangerous for your system.
+ .
+ This process is designed to heavily load CPU chips. Undercooled,
+ overclocked or otherwise weak systems may fail causing possibly
+ permanent damage to electronic components.
+ .
+ Users should read the cpuburn documentation carefully before use.
+
+Template: cpuburn-udeb/duration
+Type: select
+Default: 30m
+Choices: 10m, 30m, 1h, 6h, 24h
+_Description: Burn-in duration
+
+Template: cpuburn-udeb/progress/title
+Type: text
+Description: Performing hardware burn-in
+
+Template: cpuburn-udeb/progress/step
+Type: text
+Description: Performing hardware burn-in. This may take some time... ${PROGRESS}
diff --git a/debian/rules b/debian/rules
index 06f202e..4ffe368 100755
--- a/debian/rules
+++ b/debian/rules
@@ -32,6 +32,10 @@ install: build
 		cp $(CURDIR)/$$i $(CURDIR)/debian/cpuburn/usr/bin ; \
 	done
 
+	for i in burnP5 burnP6 burnK6 burnK7 burnMMX ; do \
+		cp $(CURDIR)/$$i $(CURDIR)/debian/cpuburn-udeb/usr/bin ; \
+	done
+
 # Build architecture-independent files here.
 binary-indep: build install
 # We have nothing to do by default.

Attachment: signature.asc
Description: PGP signature


Reply to: