Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 47162 - nvram-wakeup-0.95a + nvram-reboot-2003.08.07 (NEW)
Summary: nvram-wakeup-0.95a + nvram-reboot-2003.08.07 (NEW)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL: http://sourceforge.net/projects/nvram...
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2004-04-07 16:45 UTC by Stefan Briesenick (RETIRED)
Modified: 2005-03-12 17:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nvram-wakeup-0.95a.ebuild (nvram-wakeup-0.95a.ebuild,1.18 KB, text/plain)
2004-04-07 16:46 UTC, Stefan Briesenick (RETIRED)
Details
nvram-reboot-2003.08.07.ebuild (nvram-reboot-2003.08.07.ebuild,768 bytes, text/plain)
2004-04-07 16:46 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.95a.ebuild (nvram-wakeup-0.95a.ebuild,1.49 KB, text/plain)
2004-04-08 05:29 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.95a.ebuild (nvram-wakeup-0.95a.ebuild,1.62 KB, text/plain)
2004-04-09 12:13 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.96.ebuild (nvram-wakeup-0.96.ebuild,2.03 KB, text/plain)
2004-06-11 09:11 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.96.ebuild (nvram-wakeup-0.96.ebuild,1.96 KB, text/plain)
2004-06-11 12:06 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.96.ebuild (nvram-wakeup-0.96.ebuild,1.99 KB, text/plain)
2004-06-11 12:42 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.97.ebuild (nvram-wakeup-0.97.ebuild,2.01 KB, text/plain)
2004-07-25 18:35 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.97.ebuild - alternative ebuild, no user/group support (nvram-wakeup-0.97.ebuild,1.25 KB, text/plain)
2004-07-26 14:44 UTC, Carsten Lohrke (RETIRED)
Details
nvram-wakeup-0.97-r1.ebuild (nvram-wakeup-0.97-r1.ebuild,1.79 KB, text/plain)
2004-10-10 02:23 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.97.ebuild.patch (nvram-wakeup-0.97.ebuild.patch,898 bytes, patch)
2004-10-10 02:24 UTC, Stefan Briesenick (RETIRED)
Details | Diff
nvram-wakeup-0.97-r1.ebuild (nvram-wakeup-0.97-r1.ebuild,1.81 KB, text/plain)
2004-10-10 02:28 UTC, Stefan Briesenick (RETIRED)
Details
nvram-wakeup-0.97.ebuild.patch (nvram-wakeup-0.97.ebuild.patch,916 bytes, patch)
2004-10-10 02:28 UTC, Stefan Briesenick (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Briesenick (RETIRED) gentoo-dev 2004-04-07 16:45:18 UTC
This is a (small) program that can read and write the WakeUp time in the BIOS (via /dev/nvram on recent 2.4.x kernels). On this WakeUp time the computer will be powered on automatically from the soft-off state.

I made two ebuilds. One for the main package and one for the optional PowerOff bootimages.

I suggest "sys-apps/nvram-wakeup" and "sys-apps/nvram-reboot".


Reproducible: Always
Steps to Reproduce:
Comment 1 Stefan Briesenick (RETIRED) gentoo-dev 2004-04-07 16:46:11 UTC
Created attachment 28865 [details]
nvram-wakeup-0.95a.ebuild

Tool to read/write the WakeUp time in the BIOS (/dev/nvram)
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2004-04-07 16:46:53 UTC
Created attachment 28866 [details]
nvram-reboot-2003.08.07.ebuild

PowerOff Boot-Images for nvram-wakeup (not needed for GRUB)
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2004-04-08 05:29:52 UTC
Created attachment 28885 [details]
nvram-wakeup-0.95a.ebuild

Updated Ebuild: now trying to download the latest nvram-wakeup-mb.c file from
CVS
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2004-04-09 12:13:22 UTC
Created attachment 28975 [details]
nvram-wakeup-0.95a.ebuild

update #2: CVS update is now optional via USE-Flag 'mbcvs'.

It's safer this way, because the author told me, that this file could be
changed in future in CVS and then the ebuild would be broken until the new
version arrives.
Comment 5 Stefan Briesenick (RETIRED) gentoo-dev 2004-04-12 13:30:39 UTC
ok, the last ebuild is stable for me and the final version. I won't change it anymore. Feel free to put it into portage. ;-)
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2004-05-13 09:52:50 UTC
remind remind remind ;-)
Comment 7 Stefan Briesenick (RETIRED) gentoo-dev 2004-06-11 07:55:42 UTC
version 0.96 is out. I provide a new ebuild (with some enhancements). still testing... gimme an hour... ;-)
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2004-06-11 09:11:33 UTC
Created attachment 33087 [details]
nvram-wakeup-0.96.ebuild

version bump + some enhancements.

adding new group 'nvram' and suid the nvram-wakeup binary, so users which
are in the nvram group are able to use it w/o superuser rights.

the GID of nvram is currently 64000. But feel free to change it (see $MY_GID).

ATTENTION: this ebuild introduces a *new* USE-flag 'mbcvs'
Comment 9 Stefan Briesenick (RETIRED) gentoo-dev 2004-06-11 12:06:21 UTC
Created attachment 33095 [details]
nvram-wakeup-0.96.ebuild

little bugfixing. forgot to provide 'set_timer' sample script (installed as
doc).
Comment 10 Stefan Briesenick (RETIRED) gentoo-dev 2004-06-11 12:16:54 UTC
ok, the ebuild works perfectly on x86 with kernel 2.6.5.
now you can put it into portage ASAP. ;-)

btw: both ebuilds should also work on amd64, but I had no
time to test it yet. 'nvram-reboot' installs only x86 32-Bit
boot-images, but this should not be a problem, since Athlon-64
can excute it and the only purpose is to HALT the machine.

btw^2: VDR users need this!
Comment 11 Stefan Briesenick (RETIRED) gentoo-dev 2004-06-11 12:42:57 UTC
Created attachment 33097 [details]
nvram-wakeup-0.96.ebuild

grmpf! fixing another small issue.

/usr/share/locale/de/LC_MESSAGES/guess-helper.mo had
executable bit set. changed perms to 644.
Comment 12 Stefan Briesenick (RETIRED) gentoo-dev 2004-07-10 12:21:07 UTC
hmm, no reaction. So I remind again... ;-)
Comment 13 Stefan Briesenick (RETIRED) gentoo-dev 2004-07-25 18:20:54 UTC
0.97 is out!
Comment 14 Stefan Briesenick (RETIRED) gentoo-dev 2004-07-25 18:23:31 UTC
ok, just version bump 0.96 to 0.97 and it works (tested!)

Comment 15 Stefan Briesenick (RETIRED) gentoo-dev 2004-07-25 18:35:14 UTC
Created attachment 36156 [details]
nvram-wakeup-0.97.ebuild

small change in VDR sample scripts. placing them into $DOCDIR/VDR.
Comment 16 Carsten Lohrke (RETIRED) gentoo-dev 2004-07-26 14:44:08 UTC
Created attachment 36231 [details]
nvram-wakeup-0.97.ebuild - alternative ebuild, no user/group support

Stefan: Downloading stuff inside of the ebuild is a security flaw and therefore
not allowed. Changing CFLAGS makes no sense for this package, since there will
be no noticable performance advantange for sure and damaging the BIOS because
of some avoidable optimiziation would be painful - this is a something to go
with author defaults imho.

Have a look at my sample ebuild.
Comment 17 Stefan Briesenick (RETIRED) gentoo-dev 2004-07-26 15:02:18 UTC
1. ok, drop the 'mbcvs'-flag (seen such thingy in another ebuild)
2. ok, drop $CFLAGS

but:

1. tell me why we should drop user/group support
2. tell me why you dropped all the VDR stuff:

	# provide the sample config in /etc
	insinto /etc
	doins ${MY_DOC}/nvram-wakeup.conf
	rm -f ${MY_DOC}/nvram-wakeup.conf

	# move documents and examples
	dodoc ${MY_DOC}/*
	docinto VDR
	dodoc ${D}/usr/bin/vdrshutdown set_timer
	rm -f ${D}/usr/bin/vdrshutdown
	rm -rf ${MY_DOC}

It's ok that you "optimize" the ebuild, but please do not drop the resulting document-structure. It was well designed and had a good reason to do it as I have done it!

'vdrshutdown' and 'set_timer' are *sample*-scripts and *NOT* runnable as-is! You have to edit them first. And it's not a good idea to edit sample-scripts in /usr/bin!
Comment 18 Carsten Lohrke (RETIRED) gentoo-dev 2004-07-26 16:30:51 UTC
You got me wrong, Stefan. I made the ebuild for myself before even looking if there is a bug report. I'm not doing base-system stuff and just wanted to give you some input - mainly because of the wget. :)
Comment 19 Stefan Briesenick (RETIRED) gentoo-dev 2004-07-26 17:32:58 UTC
oh, sorry! ;) but doesn't matter, since the maintainer (HELLO?!) will read your comments. And so I have to answer.

we can talk about wget and CFLAGS, but we can *not* talk about the doc-thingy. ;-)

btw: you can't damage the BIOS with wrong CFLAGS, because this is a very simple program. It uses /dev/nvram and has only access to 128 Bytes of the nvram. The worsest thing that could happen, is that you trash the BIOS-config (but you can do this also with "good" CFLAGS). Then you have to find the little jumper to reset the config. *g*

nvram-wakeup works *perfect* for me since the first betas. It's a really cool program!
Comment 20 Carsten Lohrke (RETIRED) gentoo-dev 2004-07-27 02:51:14 UTC
>btw: you can't damage the BIOS with wrong CFLAGS, because this is a very simple program.
I'll trust the author - even though his warnings are obviously there to prevent him being held liable. I'm just very conservative and careful when it comes to such things. And even if you don't run the risk of damaging the BIOS, optimization is pretty useless here.
Comment 21 Stefan Briesenick (RETIRED) gentoo-dev 2004-09-04 16:48:44 UTC
remind, remind, remind. ;-)
Comment 22 SpanKY gentoo-dev 2004-10-07 21:03:51 UTC
yes, we dont want to let the user kill themselves with silly CFLAGS, but allowing the makefile to use the default isnt acceptable either ...

i changed the ebuild to run `strip-flags`

nvram-wakeup is now in portage
Comment 23 SpanKY gentoo-dev 2004-10-07 21:06:35 UTC
i dont understand the point of the nvram-reboot package

they're basically bootable images that, when booted, turn your computer off ??
Comment 24 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-07 23:41:14 UTC
yes, these are boot-images to power off the PC and are really needed if you don't use GRUB (which has a 'halt' command). There's a short README, just read it, if you want to learn more. ;-)
Comment 25 SpanKY gentoo-dev 2004-10-08 06:00:05 UTC
there is no README in the reboot tarball, just two .txt files

one just has an example lilo entry while the other is completely in german ... my german's pretty rusty, so gimme sometime to try to understand the other :P
Comment 26 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-08 13:44:16 UTC
ooops. sorry! ;-)

ok, you need the images to power off the PC after setting the time in nvram. This is needed by some BIOSes. 'nvram-wakeup' sets the time, but it is activated by the BIOS *after* reboot on some (most?) boards. So the trick is to reboot into a poweroff bzImage. If you have grub installed, you can use the 'halt' command instead. But with lilo you need such tricky images, hence I made this package optional. But you have to put it into portage, because w/o, nvram-wakeup isn't complete.
Comment 27 SpanKY gentoo-dev 2004-10-09 23:38:45 UTC
cleaned up and added to portage, enjoy
Comment 28 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-10 02:05:55 UTC
the nvram-wakeup ebuild you've put into portage is buggy!

at least 2 things are odd:

1. /usr/bin/vdrshutdown is a sample script. It doesn't work. I know, that the includes installer installs it into /usr/bin, but that's wrong. Right place is the doc dir.

2. you install /usr/share/man/man8/set_timer.8.gz but forgot to install 'set_timer', which is also a samplescript and should to into docdir.

my ebuild had all these patches. But you used Carsten's ebuild and that was a mistake, if you don't merge all features. ;-)

Ok, I fix it and attach the corrected ebuild. Please put this patched ebuild into portage then (ASAP). Thanks!
Comment 29 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-10 02:23:28 UTC
Created attachment 41444 [details]
nvram-wakeup-0.97-r1.ebuild

fixed nvram-wakeup-0.97.ebuild

please put it into portage ASAP.
Comment 30 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-10 02:24:22 UTC
Created attachment 41445 [details, diff]
nvram-wakeup-0.97.ebuild.patch

diff only to nvram-wakeup-0.97.ebuild so you can see the differences.
Comment 31 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-10 02:26:46 UTC
what have I done:

1. removed -g (debug info) from CFLAGS
2. install sample config into /etc
3. move vdrshutdown sample script from /usr/bin to ${DOCDIR}/VDR
4. install set_timer sample script into ${DOCDIR}/VDR

btw: oops: ;-) small error found... I correct it and upload it again.
Comment 32 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-10 02:28:29 UTC
Created attachment 41446 [details]
nvram-wakeup-0.97-r1.ebuild

small fix.
Comment 33 Stefan Briesenick (RETIRED) gentoo-dev 2004-10-10 02:28:59 UTC
Created attachment 41447 [details, diff]
nvram-wakeup-0.97.ebuild.patch

dito for the diff.
Comment 34 SpanKY gentoo-dev 2005-03-12 14:32:55 UTC
fixed up 0.97-r1
Comment 35 Stefan Briesenick (RETIRED) gentoo-dev 2005-03-12 17:58:43 UTC
wow! 5 months for this tiny fix.

nonetheless, thanks.