[OpenAFS] OpenAFS 1.8.0 alpha 1 available

Benjamin Kaduk kaduk@mit.edu
Sat, 31 Dec 2016 19:03:01 -0600

On Thu, Dec 29, 2016 at 05:22:19PM +0100, Gaja Sophie Peters wrote:
> Am 14.12.16 um 05:57 schrieb Benjamin Kaduk:
> > The OpenAFS Guardians are hapy to announce the availability of the first
> > prerelease candidate of OpenAFS 1.8.0.
> > A large number of bugfixes and new features are included, and there are also
> > behavior and functional changes that may require administrator action as
> > part of the upgrade; please consult the release notes for details.
> I was looking for the release-notes, but didn't find them - but I wanted 
> to try the client-bit myself, so this is my "story". I guess this is 
> more of a "success" story, than a bug, so I'll provide my feedback 
> (little as it may be) here, in case it may be helpful to anybody.

The release notes are at
which should be linked from the main http://openafs.org/main.html page
but may have been missing for a short while at one point.

Anyway, thanks for the story (as well as the subsequent bug report)!

> I used the Debian-Git-Repository of OpenAFS to build a package that can 
> be installed on Ubuntu 14.04, which we use on most of our Linux-Clients.
> The procedure wasn't quite straight-forward, and I can make no promises 
> that I did everything completely right - however, it runs for me now, 
> and seems to work. So far, I tested only the client-part of OpenAFS 1.8. 
> The servers are still 1.6.18 (or so - the version from jessie-backports).
> This is as much a reference for myself, what I actually did, because I 
> didn't find anywhere a description, how to build a Debian-Package (not 
> even a generic one)... At least I eventually found that there's a 
> program "dpkg-build-package", which does most of the job.

In the 'devscripts' package there is a tool 'debuild' that provides
a wrapper around most of the debian package building steps.
I think that just 'debuild -uc -us' (don't try to sign source package or changes
file) should suffice in most cases.

> Building a .deb-package with dpkg-buildpackage didn’t (quite) work with 
> an AFS-Home-directory, the build got stuck at "chown" - seems like the 
> "fakeroot" didn’t quite do what it was supposed to, so I started over in 
> /var/tmp...

Not terribly surprising, as chown in AFS does not behave quite like
chown on standard Unix filesystems.

> > cd /var/tmp
> > git clone https://anonscm.debian.org/cgit/pkg-k5-afs/openafs.git
> > cd openafs
> > git checkout $(git tag|grep debian/1.8|tail -1)
> > sudo apt-get build-dep openafs
> > sudo apt-get install debian-keyring heimdal-multidev libperl-dev
> > dpkg-buildpackage -d -b -uc -us
> > sed -i s/rk_base64_/base64_/ src/auth/userok.c

Yeah, this part is a bit unfortunate, depending on how old of a system
roken you have.  (You could hack things up to use the bundled roken
for your local testing if you want, but luckily this change is probably
easier than doing that.)

> > dpkg-buildpackage -d -b -uc -us -nc
> > rm debian/tmp/usr/lib/perl/ukernel.so debian/tmp/usr/lib/perl/AFS/ukernel.pm
> > sed -i 's/dh_strip --dbgsym-migration/dh_strip #--dbgsym-migration/' debian/rules
> > dpkg-buildpackage -d -b -uc -us -nc
> > cd ..
> Now the building itself is finished. Next install it...
> > sudo dpkg -i openafs-modules-dkms_1.8.0*_all.deb openafs-krb5_1.8.0*_amd64.deb openafs-client_1.8.0*_amd64.deb
> > sudo rm -rf /var/cache/openafs/* /var/cache/openafs-client
> > sudo reboot
> Some comments:
> - The original openafs-source is missing the "debian"-subdirectory which 
> contains the pre-defined rules for "Configure". I could probably have 
> done it manually, but since the Debian-Git already contains everything, 
> I used that as a starting point.

Quite reasonable, since Ubuntu is a debian-derived system.

> - The "checkout" line tells git to use the 1.8.<most recent> tree, 
> instead of the 1.6.20 tree
> - the "build-dep" for openafs is not sufficient, because it takes only 
> OpenAFS 1.6.X into account, so two more packages are needsd. I don't 
> remember, why I put "debian-keyring" also into the list. I remember it 
> was needed for SOMEthing, but not if it was for this build.

It removes a warning from 'apt-get source', IIRC, since the source package
is signed with my personal key.  (There is no security issue since it
is also authenticated via the apt repo, but there is nonetheless a warning
issued otherwise.)

> - The parameters -uc and -us "dpkg-buildpackage" (unsigned source, 
> unsigned .changes) are probably not needed any more, because I told it 
> to only create binary packages anyways, the "-d" tells it to ignore 
> pre-depends, it wouldn't build on Ubuntu 14.04 otherwise, and the "-b" 
> tells it to only create binary packages, no source-packages.

The binary package would still generate a changes file, so only the
-us could be omitted.

> - Something in the debian/rules makes it garble the file 
> "src/auth/userok.c", which fixes the following sed-line. The file is ok 
> before I called the dpkg-buildpackage -- probably some difference 
> between Debian and Ubuntu

I alluded to this before.
The difference betweeen Debian (unstable) and Ubuntu is the version of
the heimdal source package -- upstream heimdal provides a libroken,
which had to rename the base64 encode/decode routines to avoid conflicts
with something else.  Recent Debian has the rename, and apparently your
version of Ubuntu does not.  Since the OpenAFS source is normally
compiled against a bundled copy of libroken, there is not an issue, but
to make the package DFSG compliant for Debian, I have to use the
system libroken, which means a debian-specific patch to update the
symbol names.  You could also remove that line from debian/patches/series
before building instead of messing around with sed, but either is fine
for your purposes.

> - Next I installed with "dpkg -i" the three packages that are needed for 
> a client-install and courageously rebooted - only to find out that AFS 
> wasn't find my home-dir. (All other directories were working fine, 
> except the one above my homedir and my homedir...)

Do you think there was anything other than your home directory in your
local cache at the time you installed the new packages?

> - Any combination of "fs flush" "fs flushmount" and "fs flushall" didn't 
> help either, so I manually cleared out the AFS-cache and restarted again.

That 'fs flushall' did not help is somewhat surprising; hopefully the
developers can take a look and see if there's something strange going on.

Thanks again for the reports,