Cool, thanks! I put instructions for this on the main page.
-Mike
I'm a packager for Fedora, so I might be able to help a bit.
On Fri, Nov 11, 2011 at 09:44:55 -0800, Anatol Pomozov wrote:
> The main issue here is that all packages are build on isolated environment
> with minimum stuff (see https://wiki.ubuntu.com/PbuilderHowto).
> 1) I was not able to use fuse - it looks like it is not possible to load
> fuse kernel module with pbuilder. I don't really understand what happens
> here, but if I try to run "./bootstrap.sh" I endup with error "cannot open
> file /dev/fuse" error.
Missing a BuildRequires on fuse-utils (or the Debian equivalent)?
> 2) Because we deploy source package to the build server it means we cannot
> use 'git describe' during the build process.
Release tarballs of tup shouldn't need to run 'git describe' I would
expect. Snapshots should be slightly different. The build could also
accept a TUP_HASH= or something during configure and use that instead
of calling 'git describe'.
IIRC, Github can also 'pre-configure' tarballs when downloaded. I can't
find an example, but using something like an environment variable in
some file in the repo will be replaced when a tarball of the repository
when downloaded. I'll see if I can find where I saw it being used. This
does, however, tie Github to (at least some part of) the release
infrastructure though.
> Currently I pack tup binary generated on the first step of the bootstrap
> process (the /build/tup binary). And I use sed tool to set correct git
> version in sources. Here is the script that builds source package and
> deploys it to PPA http://pastie.org/2848226
I don't know Debian's policies, but I know Fedora would only accept it
bootstrapping itself (it's also a great test of the current build).
--Ben
There is no such thing; apart from Windows builds and now this Debian
package, tup is only distributed in git repo form, to my knowledge.
True for now, but in the future, I would hope that releases are tagged.
--Ben
Is it a permissions issue? Is the user that pbuilder runs as in the fuse group?
And does the package install automatically put the user into the fuse
group? Or how is that normally handled?
>
>> 2) Because we deploy source package to the build server it means we cannot
>> use 'git describe' during the build process.
>
> Release tarballs of tup shouldn't need to run 'git describe' I would
> expect. Snapshots should be slightly different. The build could also
> accept a TUP_HASH= or something during configure and use that instead
> of calling 'git describe'.
>
> IIRC, Github can also 'pre-configure' tarballs when downloaded. I can't
> find an example, but using something like an environment variable in
> some file in the repo will be replaced when a tarball of the repository
> when downloaded. I'll see if I can find where I saw it being used. This
> does, however, tie Github to (at least some part of) the release
> infrastructure though.
I'd be happy to adjust the bootstrap.sh script to make it easier to
set the correct version without git. Maybe it could accept an
environment variable as you suggest, plus skip the ./build/tup init
and ./build/tup upd steps, since there's no need to have tup build
itself if the directory is just going to be blown away anyway. It
should probably also accept CFLAGS since right now the version built
from bootstrap.sh does not enable compiler optimizations. What would
be easiest for you guys?
-Mike
There are currently several versions tagged in the git repository. Or
are you referring to some other kind of tag?
-Mike
That would likely be sufficient. In Fedora, actual releases aren't given
a git hash since, given the git repository, the version number should be
sufficient as-is. Provided tags aren't moved (or announced when they
are), those tarballs should be fine.
--Ben
Does Debian do *everything* in a chroot or just the build step? I don't
know if/how mock (Fedora's tool) works with udev rules in the chroot.
--Ben
Can you try the latest master? Instead of bootstrap.sh, use build.sh.
You can pass in CFLAGS, LDFLASG, and TUP_LABEL (defaults to
"bootstrap") through the environment. It won't run tup afterward, so
it shouldn't need to use fuse (just access to the fuse dev
headers/libs). If you need any other changes to support this let me
know.
Thanks,
-Mike
Ok, thanks! Though I guess this would be a problem in the future if
someone wants to create a package for a program that uses tup to build
it. What would we have to do in that case?
-Mike
After thinking about it some more, tup could probably support a
one-time build so that it doesn't do any dependency tracking at all.
This would effectively turn off the fuse watcher, database, etc. It is
somewhat analogous to something like 'svn export', in that the result
is no longer usable by tup. But in the case of a packager the whole
tree is just going to be blown away anyway, so there's no real need
for all of that...
-Mike
Debuggability of the build system inside the buildroot would be nice.
CMake supports a VERBOSE=1 setting in the generated Makefiles. An
equivalent for these "stripped down" tup builds would be nice since the
build is a one-shot.
--Ben
I think the command could take a --verbose flag similar to 'tup upd'
so that it would print out the full command-line. Or is there
something else you would be debugging at that point?
-Mike
That should be enough...I can't remember what else I've used in the
past.
--Ben