[Box Backup] bbackupquery strange issue

Martin Ebourne boxbackup at fluffy.co.uk
Wed May 10 20:05:06 BST 2006


On Wed, 2006-05-10 at 12:31 +0000, Chris Wilson wrote:
> Hi,
> 
> > I installed the client from the parcel that was compiled on the server
> > box with CentOS 4.3.
> 
> That's probably the problem. There are two different ways to get 
> information about a file or directory. Box Backup picks one depending on 
> whether it works or not on the machine where it was compiled. That way 
> might or might not work on another machine. I guess that it does work on 
> CentOS, and not on Fedora, which caused your CentOS build to fail on 
> Fedora.

There's not many unixen where its safe to build a binary on a more
recent version and run it on an older version. Almost always
unsupported. Generally works the other way though.

CentOS 4.3 is more recent than FC2 so that's the problem here. Just
checked on FC5 and d_type is now working. Certainly wasn't a year or two
ago in the older FCs. The onward march of progress!

Have to say I don't really like the parcels concept. Apart from being
totally unusual and non standard it encourages people to copy binaries
around between non binary compatible systems, and then be surprised when
it doesn't work. To have a good chance of it working right you can
either build from source (wonderful stuff!) or use a proper package
manager that understands binary compatibility and prevents foot
shooting. Unfortunately parcels are neither. Furthermore the test suite
should ideally be run on every different platform in use.

> Ben, perhaps if we detect HAVE_VALID_DIRENT_D_TYPE and compile with it 
> enabled, then we should add a check that d_type is correct for the "." and 
> ".." directories, and maybe for a known file as well? Or else just use 
> stat() on all platforms?

I'm generally of the opinion that we should only support binaries built
on the same platform, otherwise we land ourselves in a whole load of
trouble. However, in this case it does seem like a reasonable check and
it is trivial. You only need to test one entry, doesn't matter what it
is, just check that d_type is not DT_UNKNOWN.

Cheers,

Martin.




More information about the Boxbackup mailing list