macos: find packagemaker instead of assuming path

in xcode 4.3, packagemaker is unbundled. make no assumptions
about where it can be found; instead, let spotlight tell us

Reviewed-on: http://gerrit.openafs.org/6966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit fba35ba4e1d933126c788824f464a78ca1c93bf8)

Change-Id: I5d4083fa743ef181d680ffc2934a56d8429a75dc
Reviewed-on: http://gerrit.openafs.org/6968
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
macos: iterate mdfound packagemakers when spaces are present

even if we get more than one match, and even if there's a space,
work anyway

Reviewed-on: http://gerrit.openafs.org/6971
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 745e1bb00350ac481cd0998b1623b6e040fc7312)

Change-Id: Ibd4ca5cbd5cee45793735cede8cf488a944add3c
Reviewed-on: http://gerrit.openafs.org/6972
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Windows: Fix VNOSERVICE EventLog parameters

Add missing volume and cell.

Reviewed-on: http://gerrit.openafs.org/6969
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit d1d51852be1daf45f92a8cbf5f294892141108f2)

Change-Id: I86004a463b118493828c5296b684a019085e59fd
Reviewed-on: http://gerrit.openafs.org/6974
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Add upstream changelog for 1.6.1 release
Imported Upstream version 1.6.1
Merge tag 'upstream/1.6.1'

Upstream version 1.6.1
Finalize changes for 1.6.1-1
viced: AFSDisk, AFSFetchVolumeStatus Int31 PartSize

The AFSDisk and AFSFetchVolumeStatus structures use signed
32-bit integers for representation partition size and
available blocks.  RoundInt64ToInt31() should be used instead
of RoundInt64ToInt32() when assigning their values.

Change-Id: I3834141fce2d54ce8bdfac3dc566074583bb305e
Reviewed-on: http://gerrit.openafs.org/7022
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit e8f6dfac59fe042a04a9ac5eb3c37356cb3a22a3)
Reviewed-on: http://gerrit.openafs.org/7023
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
SOLARIS: Correct misplaced osi_machdep.h #endif

Commit 64778fd7bece52360482f9a51f19b34dac1d2678 removed some '#ifdef
KERNEL' blocks, but for one block in SOLARIS/osi_machdep.h, the wrong
trailing #endif was removed. This effectively makes the last part of
the file Solaris 10+ only, and bypasses the header guard. On systems
before Solaris 10, this causes us to lose the osi_procname definition,
which eventually shows up as an undefined symbol.

So, reinstate the original #endif, and remove the correct #endif
instead.

Reviewed-on: http://gerrit.openafs.org/7042
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit a66268f69a2da0dc21957338eebe5c91b279ddda)

Change-Id: I0edd54c9984c591d56531e4eb210e8374ed8b608
Reviewed-on: http://gerrit.openafs.org/7045
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
afs: Ensure afs_calc_inum yields nonzero ino

afs_calc_inum can currently yield an inode of 0 if MD5-based inode
numbers are turned on. Some userspace applications (and for some
platforms, maybe even the kernel) make certain assumptions about the
inode number for a file; in particular for example, 'ls' will not
display a file with inode 0 in a normal directory listing.

So, read the md5 digest until we get a non-zero result. Fall back to
the non-md5 calculation if we still somehow end up with a 0.

While this case may at first glance seem to be extremely rare, in
practice it can occur, as the current calculation for volume
538313506, vnode 26178 does actually yield a 0.

Reviewed-on: http://gerrit.openafs.org/4901
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 39083fe1edab784fcd75eacbdaaf7f6affa14c9f)

Change-Id: I3d06a4b5dc76934b24ced883b1985bced35c893a
Reviewed-on: http://gerrit.openafs.org/7276
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
afs: Use cell for md5 inode numbers

When calculating the inode number for a file with md5 inodes, include
the cell number in the calculation, in order to reduce collisions
between cells.

Reviewed-on: http://gerrit.openafs.org/4902
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 42943aead4db2bdf9b8ec01c3917eb1c9ac9eb76)

Change-Id: I5cf88ecd30a5813697dbf3b86964d53bb1f3915a
Reviewed-on: http://gerrit.openafs.org/7277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
fs: Report default storebehind when errors exist

After 904c9fbe, we no longer print out the default store asynchrony
when any of the supplied paths results in a pioctl error. However, if
just one (or a few) of the paths supplied results in an error (such
as, the path does not exist), this does not prevent us from reporting
the default value.

Instead, keep track of whether or not we have a valid value, and try
to determine the default if we haven't already by the end of
StoreBehindCmd, and print it out.

Reviewed-on: http://gerrit.openafs.org/7376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 427f53eea7f9c05e7b1913c91d57777d72bc30b2)

Change-Id: I04bebe60fbb275ca44caeed9b8696283c4ded36b
Reviewed-on: http://gerrit.openafs.org/7384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
viced: Do not offline volume on successful IH_DEC

If we fail to CoW a file due to ENOSPC, we try to IH_DEC the new file
copy, and if IH_DEC fails, we take the volume offline for salvaging.
But IH_DEC returns 0 on success, not on error. So take the salvaging
path when we get non-zero.

Reviewed-on: http://gerrit.openafs.org/7054
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit 613f14727fbb404fb7fc1cac953dda46b671222e)

Change-Id: I207ffc4db59bdbd8b80fa4ffad9210d13d76b68f
Reviewed-on: http://gerrit.openafs.org/7394
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
bozo: preserve all options over restart

On unix, save all the bosserver command-line options and reuse
them on bosserver restarts. On Windows, the SCM integrator saves
the argument list, just use them.

Reviewed-on: http://gerrit.openafs.org/5532
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit db472e730e3989dac1d49b54d7371b54b24cd63c)

Change-Id: Ic6a8534f84f31f94e69c18fd970ecd368f7ee39e
Reviewed-on: http://gerrit.openafs.org/7395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Add OpenAFS to the dependencies of remote-fs.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>

Reviewed-on: http://gerrit.openafs.org/6093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 3328770612b7205abb92df5b5f4737eb3349c910)

Change-Id: I16b7b0ac6e68bf91c48652faab339871f18549a5
Reviewed-on: http://gerrit.openafs.org/7449
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
refactor afs_CheckServers

basically, we need the ability to reuse this function, so, let's make it work
differently so we can.

Reviewed-on: http://gerrit.openafs.org/3403
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e8d8a2240a57f9f4a11ee45b60c229d3f8447b86)

Change-Id: I2ad9de15cc5471810abfecf0cbc504da7da624b0
Reviewed-on: http://gerrit.openafs.org/6341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
libafs: dont handle outstatus on write error

if a write errored, we can't trust the OutStatus we got. don't.

Reviewed-on: http://gerrit.openafs.org/6714
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 4c8a3cd789a8495d0c0b3f8ff1a7ebb2a20f5336)

Change-Id: I69b26330aca2e5fd0d2092b579a0fcf1514acb53
Reviewed-on: http://gerrit.openafs.org/7483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
macos: lock module against unload during shutdown

during shutdown, once umount finished, it was possible to
unload the module before shutdown completed. fix that.

Reviewed-on: http://gerrit.openafs.org/7245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit a08f9baa7620a6643f12f0b847c2bbab41a0b255)

Change-Id: I6467b9ead03262a6ec8b0de673d2eeb664df1aef
Reviewed-on: http://gerrit.openafs.org/7484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
libafs: stop bkg first

because background daemons can have dependence on other subsystems, but
are not needed for other operations, stop them first.

Reviewed-on: http://gerrit.openafs.org/7246
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit e3c93b87b7fa751e9cf4c1356d606b7bb399b06c)

Change-Id: I258519a2ad85af53784cf4db381a7f4a8b429dc8
Reviewed-on: http://gerrit.openafs.org/7485
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
macos: remove mistyped vnode warning

newborn vnodes are corrected if needed; don't worry about it.

Reviewed-on: http://gerrit.openafs.org/7270
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit be1f110f3efb41a72278c7abc8a22cbfcfa8d0e3)

Change-Id: I82485f348afe9adbd0dc5743a4f15f18b7e04420
Reviewed-on: http://gerrit.openafs.org/7486
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>