Discussion:
How to identify version of installed zfs commands?
roemer
2014-03-13 00:22:22 UTC
Permalink
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!
--
---
You received this message because you are subscribed to the Google Groups "zfs-macos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-macos+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
b***@public.gmane.org
2014-03-13 23:19:45 UTC
Permalink
At present there is no mechanism to do this.

Brendon
Post by roemer
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!
--
---
You received this message because you are subscribed to the Google Groups "zfs-macos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-macos+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Bjoern Kahl
2014-03-13 23:42:23 UTC
Permalink
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Post by b***@public.gmane.org
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
Post by b***@public.gmane.org
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!
- --
| 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-----
--
---
You received this message because you are subscribed to the Google Groups "zfs-macos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-macos+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
roemer
2014-03-14 10:57:03 UTC
Permalink
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!
--
---
You received this message because you are subscribed to the Google Groups "zfs-macos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-macos+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
roemer
2014-03-14 11:02:12 UTC
Permalink
Post by b***@public.gmane.org
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.
--
---
You received this message because you are subscribed to the Google Groups "zfs-macos" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zfs-macos+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
Loading...