Up to [local] / src / usr.sbin / fw_update
Request diff between arbitrary revisions
Default branch: MAIN
Revision 1.56 / (download) - annotate - [select for diffs], Thu Mar 21 01:02:29 2024 UTC (2 months, 2 weeks ago) by afresh1
Branch: MAIN
CVS Tags: HEAD
Changes since 1.55: +3 -2 lines
Diff to previous 1.55 (colored)
Clear spinner after each cycle Otherwise we can get left with a piece of the spinner if all firmware gets updates and don't print a "kept" value. While here, replace \010 with the ksh supported \b, as suggested by cheloha@ Noticed by deraadt@
Revision 1.55 / (download) - annotate - [select for diffs], Wed Nov 15 02:07:43 2023 UTC (6 months, 3 weeks ago) by afresh1
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE,
OPENBSD_7_5
Changes since 1.54: +7 -4 lines
Diff to previous 1.54 (colored)
Don't let signify mess up our status line While not verbose the status line is built as we go, so save errors from signify until after we've finished the status line. This should exit and print the error immediately, since this happens when fetching the SHA256.sig and fw_update exits early in that case.
Revision 1.54 / (download) - annotate - [select for diffs], Wed Nov 15 02:03:49 2023 UTC (6 months, 3 weeks ago) by afresh1
Branch: MAIN
Changes since 1.53: +22 -4 lines
Diff to previous 1.53 (colored)
Improve output after waiting for package db lock OpenBSD::PackageInfo::lock_db will send messages to STDERR if we ended up waiting for a lock, if that happens, it stomped over the "fw_update:" prefix on the status line so tidy up and print it out again.
Revision 1.53 / (download) - annotate - [select for diffs], Wed Nov 15 02:00:02 2023 UTC (6 months, 3 weeks ago) by afresh1
Branch: MAIN
Changes since 1.52: +55 -13 lines
Diff to previous 1.52 (colored)
Better handle ftp errors in fw_update Trap STDERR to post-process it looking for 404 errors to handle them differently. The fetch method now also returns different error codes for errors that can continue on. Currently only 404 is special and everything else should cause fw_update to exit early without trying all the files. Exit early if the SHA256.sig gets a 404 because that is required to figure out what valid firmware are.
Revision 1.52 / (download) - annotate - [select for diffs], Wed Nov 15 01:54:01 2023 UTC (6 months, 3 weeks ago) by afresh1
Branch: MAIN
Changes since 1.51: +33 -33 lines
Diff to previous 1.51 (colored)
Improve fw_update output on errors Mostly some setup for the future, by separating out the filehandles we use for the status and errors more specifically, we can trap the things we know about without hiding surprises.
Revision 1.51 / (download) - annotate - [select for diffs], Sat Oct 14 18:10:47 2023 UTC (7 months, 3 weeks ago) by afresh1
Branch: MAIN
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)
Verify but don't overwrite SHA256.sig in fw_update(8) Signify is happy to overwite the file with the signature stripped off. However, if we do that, when downloading firmware we lose the ability to check the signature before verifying checksums on the downloaded files. Noticed by Thomas <exnihilo () fastmail ! org> Right deraadt@
Revision 1.50 / (download) - annotate - [select for diffs], Thu Sep 28 01:18:52 2023 UTC (8 months, 1 week ago) by afresh1
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE,
OPENBSD_7_4
Changes since 1.49: +14 -6 lines
Diff to previous 1.49 (colored)
Don't register firmware already in /var/db/pkg If installing firmware with `make install` from a port, it doesn't register properly by adding "@option firmware" to the packing list, this means we ignore that it is installed and reinstall it over and over with the registration ending up in a tmpdir named directory inside the existing directory in /var/db/pkg. Unfortunately I don't know of a good way to automatically clean up from that, so we just print a message after installing the actual firmware. Reported by job@ No complaints about the patch on tech@ for several weeks.
Revision 1.49 / (download) - annotate - [select for diffs], Thu Sep 28 00:52:16 2023 UTC (8 months, 1 week ago) by afresh1
Branch: MAIN
Changes since 1.48: +3 -1 lines
Diff to previous 1.48 (colored)
Exit successfully at the end of fw_update Otherwise the exit status depends on whether we kept any firmware. Reported by Brian Conway <bconway () rcesoftware ! com> The clean solution suggested by guenther@
Revision 1.48 / (download) - annotate - [select for diffs], Thu Sep 28 00:45:22 2023 UTC (8 months, 1 week ago) by afresh1
Branch: MAIN
Changes since 1.47: +7 -2 lines
Diff to previous 1.47 (colored)
Download firmware to LOCALSRC when using filenames Previously if you did: fw_update otus-firmware-1.0p1.tgz and that firmware didn't exist in the current directory, we would download that firmware into the current directory. Which is not the expected outcome.
Revision 1.47 / (download) - annotate - [select for diffs], Thu Aug 31 21:29:53 2023 UTC (9 months, 1 week ago) by afresh1
Branch: MAIN
Changes since 1.46: +4 -4 lines
Diff to previous 1.46 (colored)
Add spaces for failure status
Revision 1.46 / (download) - annotate - [select for diffs], Thu Aug 31 19:00:00 2023 UTC (9 months, 1 week ago) by afresh1
Branch: MAIN
Changes since 1.45: +10 -5 lines
Diff to previous 1.45 (colored)
Exit fw_update(8) lock_db subprocess when parent exits If fw_update exits unexpectedly the package database would never unlock. select solution from millert@
Revision 1.45 / (download) - annotate - [select for diffs], Thu Aug 31 18:19:21 2023 UTC (9 months, 1 week ago) by afresh1
Branch: MAIN
Changes since 1.44: +220 -96 lines
Diff to previous 1.44 (colored)
Improve feedback from fw_update(8) Show status as we go with spinner rather than printing only at the end. Suggestions from deraadt@ Most of this has been in snapshots for a while
Revision 1.44 / (download) - annotate - [select for diffs], Mon Dec 12 02:30:51 2022 UTC (17 months, 4 weeks ago) by afresh1
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE,
OPENBSD_7_3
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)
Remove extra : in parameter substitution From Rob Whitlock <rwhitlock22 () gmail ! com>
Revision 1.43 / (download) - annotate - [select for diffs], Fri Aug 5 18:01:40 2022 UTC (22 months ago) by afresh1
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE,
OPENBSD_7_2
Changes since 1.42: +16 -7 lines
Diff to previous 1.42 (colored)
Support wildcards in fw_update patterns Up to two wildcards, since we have to work around the way ksh does things. Tweaks and suggestions from kn@ and halex@
Revision 1.42 / (download) - annotate - [select for diffs], Sun Feb 20 21:53:04 2022 UTC (2 years, 3 months ago) by afresh1
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE,
OPENBSD_7_1
Changes since 1.41: +2 -2 lines
Diff to previous 1.41 (colored)
Only use /snapshots dir when -current Not during release, -stable, or -beta. This diverges from how packages work and how things were done in the past where -beta also looked in /snapshots. Discussed in icb. OK deraadt@
Revision 1.41 / (download) - annotate - [select for diffs], Sun Feb 20 19:24:19 2022 UTC (2 years, 3 months ago) by afresh1
Branch: MAIN
Changes since 1.40: +3 -2 lines
Diff to previous 1.40 (colored)
Remove downloaded SHA256.sig if signature validation fails Without the "noclobber" setting we would have overwitten with an empty file and best not to leave a failed file around. Noticed by florian@
Revision 1.40 / (download) - annotate - [select for diffs], Sun Feb 20 18:06:05 2022 UTC (2 years, 3 months ago) by afresh1
Branch: MAIN
Changes since 1.39: +95 -95 lines
Diff to previous 1.39 (colored)
Show summary even if no firmware are detected or installed OK florian@
Revision 1.39 / (download) - annotate - [select for diffs], Sat Feb 19 02:19:42 2022 UTC (2 years, 3 months ago) by afresh1
Branch: MAIN
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)
Ignore sitelib in perl snippet All base tools should be doing that and I forgot. While here remove the no longer necessary TERM handler, it was only needed so a TERM signal would still trigger the END block.
Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 15 08:02:03 2022 UTC (2 years, 3 months ago) by espie
Branch: MAIN
Changes since 1.37: +3 -5 lines
Diff to previous 1.37 (colored)
make use of pkg_* infra simplifications okay afresh1@
Revision 1.37 / (download) - annotate - [select for diffs], Fri Feb 11 00:46:58 2022 UTC (2 years, 3 months ago) by afresh1
Branch: MAIN
Changes since 1.36: +35 -1 lines
Diff to previous 1.36 (colored)
Lock the pkg db while running At least when not running in the installer. Suggestions from espie@ Works for me sthen@ fine deraadt@
Revision 1.36 / (download) - annotate - [select for diffs], Thu Feb 10 00:29:32 2022 UTC (2 years, 3 months ago) by afresh1
Branch: MAIN
Changes since 1.35: +23 -7 lines
Diff to previous 1.35 (colored)
Don't unregister firmware if we can't fetch the SHA256.sig Also avoid trying to download it multiple times if it fails, which makes error reporting much nicer. Noticed by and OK semarie@
Revision 1.35 / (download) - annotate - [select for diffs], Sun Jan 30 02:39:19 2022 UTC (2 years, 4 months ago) by afresh1
Branch: MAIN
Changes since 1.34: +16 -16 lines
Diff to previous 1.34 (colored)
Localize variables used only in functions Somehow I missed some
Revision 1.34 / (download) - annotate - [select for diffs], Sat Jan 29 22:43:50 2022 UTC (2 years, 4 months ago) by afresh1
Branch: MAIN
Changes since 1.33: +9 -9 lines
Diff to previous 1.33 (colored)
Clean up exit codes Being different didn't help me figure out what was going wrong anyway. Suggested by deraadt@
Revision 1.33 / (download) - annotate - [select for diffs], Sat Jan 29 22:32:02 2022 UTC (2 years, 4 months ago) by afresh1
Branch: MAIN
Changes since 1.32: +49 -19 lines
Diff to previous 1.32 (colored)
"Unregister" installed firmware that isn't in the SHA256.sig We assume in this case that the firmware's license was improved and it moved to be distributed in the base system. If we find that situation remove the package registration but leave the firmware files.
Revision 1.32 / (download) - annotate - [select for diffs], Mon Jan 24 00:47:05 2022 UTC (2 years, 4 months ago) by afresh1
Branch: MAIN
Changes since 1.31: +24 -20 lines
Diff to previous 1.31 (colored)
Redownload existing files with failed checksums
Revision 1.31 / (download) - annotate - [select for diffs], Sat Jan 22 05:03:47 2022 UTC (2 years, 4 months ago) by afresh1
Branch: MAIN
Changes since 1.30: +74 -38 lines
Diff to previous 1.30 (colored)
Support multiple -v as promised in the man page There are now four levels of verbosity: 0. Prints only the summary 1. Prints a line when installing/removing 2. Uses the ftp(1) progress bar 3. Provides more details for debugging With some excellent ksh knowledge provided by kn@
Revision 1.30 / (download) - annotate - [select for diffs], Wed Jan 12 02:21:15 2022 UTC (2 years, 4 months ago) by afresh1
Branch: MAIN
Changes since 1.29: +10 -10 lines
Diff to previous 1.29 (colored)
Bug fixes and performance improvements Plus improving usage to match the man page fine deraadt@
Revision 1.29 / (download) - annotate - [select for diffs], Tue Jan 11 03:25:52 2022 UTC (2 years, 4 months ago) by afresh1
Branch: MAIN
Changes since 1.28: +9 -15 lines
Diff to previous 1.28 (colored)
Tidy up some comments requested by deraadt@
Revision 1.28 / (download) - annotate - [select for diffs], Sat Jan 8 22:32:00 2022 UTC (2 years, 5 months ago) by afresh1
Branch: MAIN
Changes since 1.27: +46 -16 lines
Diff to previous 1.27 (colored)
Don't download SHA256.sig unless it's needed This allows installing local files without network. it *might* work now deraadt@
Revision 1.27 / (download) - annotate - [select for diffs], Fri Jan 7 02:25:40 2022 UTC (2 years, 5 months ago) by afresh1
Branch: MAIN
Changes since 1.26: +19 -19 lines
Diff to previous 1.26 (colored)
whitespace
Revision 1.26 / (download) - annotate - [select for diffs], Thu Jan 6 20:15:54 2022 UTC (2 years, 5 months ago) by deraadt
Branch: MAIN
Changes since 1.25: +2 -2 lines
Diff to previous 1.25 (colored)
repair usage
Revision 1.25 / (download) - annotate - [select for diffs], Thu Jan 6 19:27:01 2022 UTC (2 years, 5 months ago) by afresh1
Branch: MAIN
Changes since 1.24: +6 -6 lines
Diff to previous 1.24 (colored)
Switch fw_update -D to instead -F The perl version of fw_update used -D for something else and although the mneumonic isn't as good, the conflict was worse. Requested by deraadt@
Revision 1.24 / (download) - annotate - [select for diffs], Wed Jan 5 16:32:46 2022 UTC (2 years, 5 months ago) by afresh1
Branch: MAIN
Changes since 1.23: +463 -37 lines
Diff to previous 1.23 (colored)
Commit the correct version of fw_update Sigh.
Revision 1.23 / (download) - annotate - [select for diffs], Wed Jan 5 16:28:19 2022 UTC (2 years, 5 months ago) by afresh1
Branch: MAIN
Changes since 1.22: +36 -123 lines
Diff to previous 1.22 (colored)
Add the shell based fw_update and updated man page This allows installing firmware from the installer without having to wait to boot into a live system. commit deraadt@
Revision 1.22, Fri Jan 23 14:38:24 2015 UTC (9 years, 4 months ago) by halex
Branch: MAIN
Changes since 1.21: +1 -1 lines
FILE REMOVED
Killing my darling. Functionality and binary name moved to pkg_* and friends. So long and thanks for all the fish. ok deraadt@
Revision 1.21 / (download) - annotate - [select for diffs], Sun Feb 23 22:22:16 2014 UTC (10 years, 3 months ago) by halex
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE,
OPENBSD_5_6,
OPENBSD_5_5_BASE,
OPENBSD_5_5
Changes since 1.20: +13 -9 lines
Diff to previous 1.20 (colored)
- add a -p <path> switch for specifying the location of firmware packages - reword 'firmware files' to 'firmware' - pick some style and whitespace nits ok deraadt@
Revision 1.20 / (download) - annotate - [select for diffs], Sun Feb 23 20:09:59 2014 UTC (10 years, 3 months ago) by halex
Branch: MAIN
Changes since 1.19: +3 -1 lines
Diff to previous 1.19 (colored)
print out the path to the firmware packages in verbose mode, for use with the upcoming -p <path> flag
Revision 1.19 / (download) - annotate - [select for diffs], Thu Jan 30 00:12:09 2014 UTC (10 years, 4 months ago) by halex
Branch: MAIN
Changes since 1.18: +27 -11 lines
Diff to previous 1.18 (colored)
add a -d flag to remove the specified firmware packages ok espie@
Revision 1.18 / (download) - annotate - [select for diffs], Fri Jan 3 14:58:54 2014 UTC (10 years, 5 months ago) by espie
Branch: MAIN
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)
explicitly tells pkg_add we're fw_update, will have some nice side-effects later. okay deraadt@
Revision 1.17 / (download) - annotate - [select for diffs], Fri Oct 18 23:25:02 2013 UTC (10 years, 7 months ago) by halex
Branch: MAIN
Changes since 1.16: +11 -3 lines
Diff to previous 1.16 (colored)
don't silence stderr from pkg_add when running in verbose mode suggested by Alexander Holupirek ok rpe@
Revision 1.16 / (download) - annotate - [select for diffs], Tue Aug 20 22:42:08 2013 UTC (10 years, 9 months ago) by halex
Branch: MAIN
Changes since 1.15: +2 -3 lines
Diff to previous 1.15 (colored)
use a single line in usage() and SYNOPSIS and explain in text which combinations are not allowed discussed with jmc@
Revision 1.15 / (download) - annotate - [select for diffs], Tue Aug 20 09:14:31 2013 UTC (10 years, 9 months ago) by mpi
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)
tedu netnatm and ueagle(4). ok mikeb@, sthen@, tedu@ (implied), doc bits ok jmc@
Revision 1.14 / (download) - annotate - [select for diffs], Tue Aug 13 21:16:45 2013 UTC (10 years, 9 months ago) by kettenis
Branch: MAIN
Changes since 1.13: +3 -3 lines
Diff to previous 1.13 (colored)
Handle firmware for radeondrm(4). pointed out by jasper@
Revision 1.13 / (download) - annotate - [select for diffs], Tue Aug 13 20:11:21 2013 UTC (10 years, 9 months ago) by halex
Branch: MAIN
Changes since 1.12: +37 -14 lines
Diff to previous 1.12 (colored)
allow the user to specify which firmware to install, or install all of them using the -a switch ok rpe@
Revision 1.12 / (download) - annotate - [select for diffs], Mon Sep 17 18:28:43 2012 UTC (11 years, 8 months ago) by rpe
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE,
OPENBSD_5_4,
OPENBSD_5_3_BASE,
OPENBSD_5_3
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)
simplify the detection of release/stable vs. snapshot kernel by using the same logic from install.sub ok halex@
Revision 1.11 / (download) - annotate - [select for diffs], Wed Sep 5 08:16:34 2012 UTC (11 years, 9 months ago) by espie
Branch: MAIN
Changes since 1.10: +5 -3 lines
Diff to previous 1.10 (colored)
don't let pkg_add turn interactive, and waive the @ask-update questions. okay sthen@ halex "you know best"... problem(s) reported by claudio@
Revision 1.10 / (download) - annotate - [select for diffs], Thu Jan 26 20:20:18 2012 UTC (12 years, 4 months ago) by halex
Branch: MAIN
CVS Tags: OPENBSD_5_2_BASE,
OPENBSD_5_2,
OPENBSD_5_1_BASE,
OPENBSD_5_1
Changes since 1.9: +4 -4 lines
Diff to previous 1.9 (colored)
closing fd 0-2 is bad practice, so dup to /dev/null instead ok krw@
Revision 1.9 / (download) - annotate - [select for diffs], Tue Oct 25 20:48:32 2011 UTC (12 years, 7 months ago) by halex
Branch: MAIN
Changes since 1.8: +3 -3 lines
Diff to previous 1.8 (colored)
Reduce noice by fw_update on network errors, among others ok deraadt@
Revision 1.8 / (download) - annotate - [select for diffs], Tue Aug 2 15:52:26 2011 UTC (12 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE,
OPENBSD_5_0
Changes since 1.7: +6 -6 lines
Diff to previous 1.7 (colored)
Say "firmware files" instead of "firmwares". It is so hard to be clear when they are per-device packages which can containing more than one firmware files.. Shown to halex, no response
Revision 1.7 / (download) - annotate - [select for diffs], Wed Jul 27 15:12:57 2011 UTC (12 years, 10 months ago) by halex
Branch: MAIN
Changes since 1.6: +27 -10 lines
Diff to previous 1.6 (colored)
a bunch of requested changes: - pass same count of -v's to pkg_add as was passed to fw_update - don't be all quiet if -v is specified - add -n flag as per pkg_add - prefix all verbose messages by 'fw_update: ' - look for devices in current dmesg as well as dmesg.boot ok deraadt krw
Revision 1.6 / (download) - annotate - [select for diffs], Sat Jul 16 22:27:09 2011 UTC (12 years, 10 months ago) by espie
Branch: MAIN
Changes since 1.5: +1 -0 lines
Diff to previous 1.5 (colored)
missing $OpenBSD$ marker
Revision 1.5 / (download) - annotate - [select for diffs], Sat Jul 9 21:27:23 2011 UTC (12 years, 11 months ago) by halex
Branch: MAIN
Changes since 1.4: +1 -1 lines
Diff to previous 1.4 (colored)
zap a glob leftover noted by weerd@, thanks
Revision 1.4 / (download) - annotate - [select for diffs], Sat Jul 9 17:56:46 2011 UTC (12 years, 11 months ago) by halex
Branch: MAIN
Changes since 1.3: +10 -7 lines
Diff to previous 1.3 (colored)
- use pkg_info -q instead of looking in /var/db/pkg/*. it is not as expensive as I thought. - pass -D repair to pkg_add - move the 'updating firmwares' message into rc.firsttime first two from espie@ and sthen@, respectively; thanks "looks good" deraadt@
Revision 1.3 / (download) - annotate - [select for diffs], Sat Jul 9 04:49:29 2011 UTC (12 years, 11 months ago) by halex
Branch: MAIN
Changes since 1.2: +1 -1 lines
Diff to previous 1.2 (colored)
when checking for installed packages we should indeed be as precise as possible pointed out by sthen@
Revision 1.2 / (download) - annotate - [select for diffs], Sat Jul 9 01:42:30 2011 UTC (12 years, 11 months ago) by halex
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)
error messages goes to stderr pointed out by naddy@
Revision 1.1 / (download) - annotate - [select for diffs], Sat Jul 9 01:16:57 2011 UTC (12 years, 11 months ago) by halex
Branch: MAIN
welcome fw_update, which installs and/or updates non-free firmware for detected and previously installed devices that needs it "go ahead and commit it" deraadt@