[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading functio

From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH v6 4/8] module: implement module loading function
Date: Thu, 12 Sep 2013 13:44:59 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Sep 12, 2013 at 05:59:30AM -0600, Eric Blake wrote:
> On 09/11/2013 11:36 PM, Michael Tokarev wrote:
> > 
> > A solution which I proposed at the very beginning -- to export
> > a "hashed" init function from modules, and call it from the
> > main executable.  Like, instead of, say, qemu_module_init(),
> > call qemu_module_init_0xdeadbeaf(), where 0xdeadbeaf is a
> > hash of some build-dependent value.  This should be enough
> > to keep it going.
> And of course, since we store sources in git, you already have such a
> hash value at your disposal:
>  $CC -DBUILD_HASH=$(git rev-parse HEAD) ...
> coupled with
>  glue(qemu_module_init_, BUILD_HASH)
> where the only trick is to figure out how to bake in a hash when
> building from a released tarball rather than git.

IMHO we want this to change any time you do './configure', so I would
not tie this to git hash - we don't want all users of particular
release tar.gz to have the same hash regardless of configure options.
We want a situation where any time a distro builds an RPM or equiv,
a new hash is used. So to me generating it in 'configure' seems like
a reasonable place.

|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

reply via email to

[Prev in Thread] Current Thread [Next in Thread]