How to identify version of installed zfs commands?

62 views
Skip to first unread message

roemer

unread,
Mar 12, 2014, 8:22:22 PM3/12/14
to zfs-...@googlegroups.com
I am currently trying out zfs on OS X Mavericks.
There are a couple of different versions around (the stable MacZFS 74.3.3 and the latest builds of OSXzfs).
Once installed, is there a command to tell the version of a currently installed zfs distribution?
I do not mean the pool or filesystem version, but the build number of the actual tools (like the '-version' option of Gnu tools)...
This would be really handy during testing!

brendon....@mac.com

unread,
Mar 13, 2014, 7:19:45 PM3/13/14
to zfs-...@googlegroups.com
At present there is no mechanism to do this.

Brendon

Bjoern Kahl

unread,
Mar 13, 2014, 7:42:23 PM3/13/14
to zfs-...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Am 14.03.14 00:19, schrieb brendon....@mac.com:
> At present there is no mechanism to do this.

You can quite simply identify the stable MacZFS 74.3.3:

The zfs.kext has the version number in its Info.plist file, and also
logs it to the system log on kext load time.

All other binaries (zfs, zpool, the libraries, ...) have the full
version info compiled in. Simply do a

strings _file_to_test_ | grep -e 'PROJECT:'

For example, the zpool binary from MacZFS-74.3.3 would be identified as

@(#)PROGRAM:zpool PROJECT:maczfs_74-3-3-0-ge37cf7b
VERSION:74.3.3 BUILT:2014-02-19_01.19_+0100


Best regards

Björn
- --
| Bjoern Kahl +++ Siegburg +++ Germany |
| "googlelogin@-my-domain-" +++ www.bjoern-kahl.de |
| Languages: German, English, Ancient Latin (a bit :-)) |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQCVAgUBUyJCXFsDv2ib9OLFAQKjNAP/eOWjJMEtHx/TPEY0oI0FdZo8NmVL/RYz
9+U61060bR6lJcU+drzWnZ0BcC/wJn0bjuS82Xjeu3tImHVEuqoeaFHnxMBBTNfv
pOwIIJwHr+8Q6fDi1lZMD0UwtViSj0WfIy4OqiE21XxmRj2QdVeqc8/Tyl4UE55T
unefhdg1MjI=
=22er
-----END PGP SIGNATURE-----

roemer

unread,
Mar 14, 2014, 6:57:03 AM3/14/14
to zfs-...@googlegroups.com
On Friday, 14 March 2014 10:42:23 UTC+11, Bjoern Kahl wrote:
 You can quite simply identify the stable MacZFS 74.3.3: 

 The zfs.kext has the version number in its Info.plist file, ...

Thanks - good.
But would it be possible in the next release to swap the content of CFBundleShortVersionString and CFBundleVersion?
Also, I couldn't find the same version info in  /System/Library/Filesystems/zfs.fs/Content/Info.plist

Providing a useful numerical version number in CFBundleShortVersionString would allow to automatically deploy and update a MacZFS bundle using munki which by default compares these ShortVersionStrings to decide whether to update a bundle. And munki unfortunately is quite picky on how it evaluates version numbers - the current version string  of 'maczfs_74-3-3-0-ge37xf7b' certainly will not work ;)
 
and also  logs it to the system log on kext load time.

Good to know.
 
 All other binaries (zfs, zpool, the libraries, ...) have the full
 version info compiled in.  Simply do a

     strings _file_to_test_ | grep -e 'PROJECT:'

 For example, the zpool binary from MacZFS-74.3.3 would be identified as

    @(#)PROGRAM:zpool  PROJECT:maczfs_74-3-3-0-ge37cf7b
VERSION:74.3.3  BUILT:2014-02-19_01.19_+0100

That's great and exactly what I was looking for!
Thanks!

roemer

unread,
Mar 14, 2014, 7:02:12 AM3/14/14
to zfs-...@googlegroups.com
On Friday, 14 March 2014 10:19:45 UTC+11, brendon....@mac.com wrote:
At present there is no mechanism to do this.

Brendon

This relates to OSX zfs then?

For the same reasons which I pointed out in my previous post (better debugging and usability with munki software distribution scripts) I would vote to include version information in the executables and also useful version numbers in the Info.plist files of the zfs.kext.
I just checked and only found a very generic (or simply lazy?)  CFBundleShortVersionString 1.0 in the Info.plist of the zfs kernel extension... 
MacZFS 74.3.3 seems to do be compiled more user friendly in this regard.

Reply all
Reply to author
Forward
0 new messages