Commit Graph

21 Commits

Author SHA1 Message Date
reed 10564be9b7 show the verbose commands for bozohttpd and calendar too
And bump the version.
2020-07-14 01:01:05 +00:00
reed 733d4f249e Remove -a from example
(removed from script and manual in the 20170821 version)
2020-07-08 00:06:33 +00:00
agc 89894cf870 Also report versions of tcpdump, libpcap, and wpa_supplicant
Bump sys_info version to 20170928
2017-09-28 18:08:04 +00:00
wiz 598b83d451 Sort options and their descriptions in man page and usage. 2017-09-21 07:07:28 +00:00
agc c77bafde22 Update sys_info to 20170920
+ add a -d <destdir> option, which allows the versions of programs
in a directory tree rooted at "<destdir>" to be reported on, rather
than the programs and libraries rooted under /. This is useful, for
example, for finding out the versions of utilities and libraries
after a build.sh run:

	% sys_info
	awk-20121220
	bind-9.10.5pl2
	bozohttpd-20170201
	bzip2-1.0.6
	calendar-20160601
	dhcpcd-7.0.0-rc1
	dtc-1.4.4
	ftpd-20110904
	g++-5.4.0
	gcc-5.4.0
	grep-2.5.1anb1
	gzip-20170803
	libc-12.208
	...
	% sys_info -d /data/8/build/dest/x86_64
	awk-20121220
	bind-9.10.5pl1
	bozohttpd-20170201
	bzip2-1.0.6
	calendar-20160601
	dhcpcd-7.0.0-rc1
	ftpd-20110904
	g++-5.4.0
	gcc-5.4.0
	grep-2.5.1anb1
	gzip-20150113
	libc-12.207
	...
	%
2017-09-21 01:15:45 +00:00
jmcneill 048928076f add dtc (Device Tree Compiler) version info 2017-09-09 14:12:09 +00:00
wiz b595ba67a1 Sync usage with man page. 2017-08-27 20:40:22 +00:00
wiz 76fb9e13aa Use Nm. 2017-08-27 20:39:26 +00:00
wiz acc8606ccd Fix xref. 2017-08-27 20:38:39 +00:00
kre 9f2931ceb6 Get rid of the arg sorting - it doesn't work properly, and makes it
impossible to support component names containing embedded \n's (the
similar embedded space problem would have been trivial to fix.)
Deleting the sorting makes those issues moot, the args are no longer
processed, hence can be anything.

An alternative would be to sort the results - but that would separate
the -v output from the real output (-v stuff is not rationally sortable)
and also makes it much more difficult to get the error code for an
unknown component (like one containing an embedded \n !) as the pipe
to strt that would be used would cause the while loop to run in a sub-shell
(effectively.)
2017-08-24 01:43:42 +00:00
agc da4a8c85c5 Move back to a simple version string for sys_info. The way of using
CVS's $ Date $ expansion to calculate the date, whilst being more
accurate, runs into issues with reproducible builds, and alternate
repository software. Simplicity wins here.

Add yacc to the list of utilities to report on
2017-08-23 21:18:57 +00:00
kre fa98c4d014 Add a \ -- allows sys_info -v pkg_install to tell us who the version info
is obtained, rather than just how we go about printing the result.
2017-08-23 19:18:38 +00:00
agc dc6cab8695 add pkg_install to the list of programs reported
don't throw a warning if tcsh is not found in the path
2017-08-23 18:15:53 +00:00
kre e5c13d3e3e Put back getopts - it is easier to get correct than hand rolled code.
Add -L and -P flags to allow the library/cmd search paths to be set.
Add support for getting vers info from sh, dhcpcd, and userland (/etc/release).
Stop abusing "sh -x" to support -v - do it properly.  Get rid of the duplicate
list of components used when there are no args, instead make better use of sh
capabilities to just process everything.  Better use of what sh can do for us
other places too.   Add a (more or less random) set of libraries to include
in output when no args are given.

OK agc (well, earlier version...)
2017-08-23 01:17:46 +00:00
agc 3e7391255c also add tzdata versioning information 2017-08-21 19:51:32 +00:00
agc 82610a7d71 restore martin's change for tcsh versioning which got lost in the last update 2017-08-21 19:36:57 +00:00
agc 8df5d7616d Changes to sys_info (20170821)
+ get rid of -a argument, which was superfluous since no arguments
means provide information on everything known

+ add the shell function to check for the path of a program. Taken
from pkgsrc bootstrap script, modified for return values, and "not
found" action

+ use this shell function for tcsh and unbound, both of which may not
exist on systems

+ go back to using standard shell construct for parsing options now,
since there is only 1 option with no optargs

+ from a suggestion from Paul Goyette, run the provided arguments
through sort | uniq

+ add sys_info itself to the list of programs to report
2017-08-21 19:22:31 +00:00
martin 090bfffa53 Use tcsh --version instead of an echo $version -- the old way did not
work for me (not quite sure why not).
2017-08-20 10:17:55 +00:00
agc 65b09bb66d Parse the arguments to sys_info(1) a bit differently, using getopts(1)
Thanks to Paul Goyette for the nudge
2017-08-19 18:36:31 +00:00
agc f2db8c00aa + don't assume that tcsh is always installed, pointed out by jmcneill - thanks!
+ a "sys_info" invocation without any args is now the equivalent of sys_info -a,
just like pkg_info
2017-08-19 03:06:50 +00:00
agc 3f81b60716 Following positive feedback on tech-userlevel, move the sys_info
script from othersrc to usr.bin/sys_info

	The sys_info script is a small script which will show the version
	information for installed utilities.  It also works on the kernel, and
	on most libraries.

	Its use is as follow:

		[19:41:13] agc@netbsd-002 ...external/bsd/sys_info [4568] > ./sys_info -a
		awk-20121220
		bind-9.10.3pl3
		bzip2-1.0.6
		calendar-20160601
		ftpd-20110904
		g++-4.8.5
		gcc-4.8.5
		grep-2.5.1anb1
		gzip-20150113
		bozohttpd-20151231
		NetBSD-7.99.26
		netpgp-3.99.17
		netpgpverify-20160214
		ntp-4.2.8pl5
		openssl-1.0.1r
		sqlite3-3.12.2
		openssh-7.1
		opensshd-7.1
		tcsh-6.19.00
		xz-5.2.1
		[19:41:20] agc@netbsd-002 ...external/bsd/sys_info [4569] > ./sys_info ntp ssh netpgp
		ntp-4.2.8pl5
		openssh-7.1
		netpgp-3.99.17
		[19:41:31] agc@netbsd-002 ...external/bsd/sys_info [4570] > ./sys_info ntp ssh netbsd
		ntp-4.2.8pl5
		openssh-7.1
		NetBSD-7.99.26
		[19:41:38] agc@netbsd-002 ...external/bsd/sys_info [4571] >

	The -a option can be given to the script to print out the information
	on all known components.

	The sys_info script also works on libraries, returning their
	"versions" as given by the shared object version numbers.

		[19:45:06] agc@netbsd-002 ...external/bsd/sys_info [4572] > ./sys_info libevent libXfont libc netbsd
		libevent-4.0
		libXfont-3.0
		libc-12.200
		NetBSD-7.99.26
		[19:45:27] agc@netbsd-002 ...external/bsd/sys_info [4573] >

	Alistair Crooks
	Wed Jun  1 19:44:01 PDT 2016
2016-06-04 15:27:11 +00:00