Dear friends, This series of patches enhances cpuburn to support a hardware burn-in stage in D-I. These sorts of tests are useful when you have built a new machine and you wish to test the stability of the system, or you are experimenting with "overclocking" and/or esoteric cooling solutions. The basic idea is that shortcomings in the cooling, installation and the hardware itself are forced to appear at a predetermined stage, instead of arising at some inconvenient time in the future. Many system builders perform tests such as these after Debian has been installed, but it may be advantageous to perform it in the installer in order to prevent against filesystem corruption. It would also be significantly more convenient and allow integration with preseeding, etc. Obviously, this should not be part of the main install process (!), but as an optional component. My patch is in three parts: 1. Updates cpuburn packaging to be more accomodating to another binary package. 2. Moves all patches from the .diff.gz to debian/patches and quilt. 3. Adds the cpuburn-udeb package (the interesting bit) The resulting udeb is approximately 3KiB. I have put some screenshots online here [0]. (Frans asked me to post the patch here instead of filing a wishlist bug against cpuburn. I believe Aurelien--the maintainer of cpuburn--reads this list anyway.) /Lamby [0] http://lamby.uwcs.co.uk/b/d-i_cpuburn/ -- 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..64afd84 100644 --- a/debian/control +++ b/debian/control @@ -18,3 +18,11 @@ 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 +Section: debian-installer +Architecture: amd64 i386 hurd-i386 kfreebsd-i386 kfreebsd-amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Performs hardware burn-in 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..10e411a --- /dev/null +++ b/debian/cpuburn-udeb.postinst @@ -0,0 +1,141 @@ +#!/bin/sh + +#DEBHELPER# + +. /usr/share/debconf/confmodule + +db_capb backup progresscancel + +set -eu + +TEMPLATE_ROOT=cpuburn-udeb + +STATE=1 + +while [ "$STATE" -ge 1 -a "$STATE" -le 4 ]; +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/type || true + ;; + 3) + db_input critical $TEMPLATE_ROOT/duration || true + ;; + 4) + db_get $TEMPLATE_ROOT/type + BURN_TYPE="$RET" + + db_get $TEMPLATE_ROOT/duration + BURN_DURATION="$RET" + + # Parse inputs + case "$BURN_TYPE" in + BX|K7|K6|MMX|P5|P6) + ;; + *) + echo "Error parsing burn type '$BURN_DURATION'" + exit 1 + ;; + esac + + QUANTITY=$(echo $BURN_DURATION | sed -e 's/^\([0-9]*\).*/\1/') + case "$QUANTITY" in + [0-9]*) + ;; + *) + echo "Error parsing 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)) + ;; + *) + echo "Error parsing duration '$BURN_DURATION'" + exit 1 + ;; + esac + + db_progress START 0 $SECONDS $TEMPLATE_ROOT/progress/title + + # Start a burn process for each core/processor, keeping + # track of their pids. + NUM_CPUS=$(grep -c "^processor" /proc/cpuinfo) + PID_LIST="" + while [ $NUM_CPUS -gt 0 ]; + do + burn$BURN_TYPE & + PID_LIST="$PID_LIST $!" + 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 a + # sign 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 + kill $PID || true + done + + db_progress STOP + ;; + 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..da9a905 --- /dev/null +++ b/debian/cpuburn-udeb.templates @@ -0,0 +1,42 @@ +Template: debian-installer/cpuburn-udeb/title +Type: text +Description: Perform hardware 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. Use at your own risk. + +Template: cpuburn-udeb/type +Type: select +Choices: P5, P6, K6, K7, MMX, BX +_Description: Burn-in type: + You should select a burn-in type suitable to your system. + . + The 'P5' test type is optimized for Intel Pentium processors, + 'P6' for Intel Pentium Pro, Pentium II & III and Celeron CPUs, + 'K6' for AMD K6 processors, and 'K7' for AMD Athlon and Duron + processors. + . + The 'MMX' variant is to test cache and memory interfaces on all + CPUs with MMX, and 'BX' is an alternate cache and memory test for + Intel CPUs. + +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..df55cc8 100755 --- a/debian/rules +++ b/debian/rules @@ -30,6 +30,7 @@ install: build for i in burnP5 burnP6 burnK6 burnK7 burnBX burnMMX ; do \ cp $(CURDIR)/$$i $(CURDIR)/debian/cpuburn/usr/bin ; \ + cp $(CURDIR)/$$i $(CURDIR)/debian/cpuburn-udeb/usr/bin ; \ done # Build architecture-independent files here.
Attachment:
signature.asc
Description: PGP signature