[sane-devel] [janitorial] Git post-receive hook changes (was Re: Pushing autofoo changes to Alioth leaves me "stumped")

Olaf Meeuwissen paddy-hack at member.fsf.org
Tue Jun 13 11:52:45 UTC 2017


Hi again list,

Following up on my own post cuz I've made a few changes on how things
work on Alioth, triggered by me "being stumped".  I've peeked and poked
in the git hooks and think I now sort of know what has been going on all
this time.  From here on things will be a wee bit different, though.

Olaf Meeuwissen writes:

> Hi list,
>
> I just pushed a commit changing configure.ac and backends/Makefile.am.
> Here's part of what that gave me.
>
>  remote: *** A Makefile was modified; please ./configure && make on Alioth
>  remote: *** Contact sane-devel if you don't know what to do

Rather than telling *you* what to do, the post-receive hook will do it
for you.  Unless I screwed up, of course, and within the limitations
that Alioth imposes (no autoconf, no automake, no ... nothing, really,
as far as autotools and gettext are concerned).

> I'm clueless, hence my mail.

I'm a lot less clueless now but still not omniscient, so if you have
trouble pushing your changes to Alioth, please contact the list.

Gory details follow.

> [...]  Let's try
>
>   ./configure
>
> Barfs towards the end with
>
>   configure: creating ./config.status
>   chmod: changing permissions of `./config.status': Operation not permitted
>   configure: error: write failure creating ./config.status
>
> Tried running make anyway.
>
>   Generating epsonds.conf from epsonds.conf.in
>   /bin/bash: epsonds.conf: Permission denied
>   make[1]: *** [epsonds.conf] Error 1
>   make[1]: Leaving directory `/var/lib/gforge/chroot/home/groups/sane/sane-backends-lists-git/backend'
>   make: *** [all-recursive] Error 1
>
> So apart from the lack of tools to do what *should* be done, there are
> also a bunch of permission issues that make the message when pushing,
> eh, well, rather useless.

I've tried to work around this by liberally sprinkling `sg sane`
statements in the scripts that are invoked from the post-receive hook
*and* a `chmod g+w --recursive` on that checkout on Alioth (lots of
"permission denied" errors there, though).

Hope that helps.

> The message when pushing is courtesy of the git post-receive hook.  If I
> rip that out, what will change for the worse, stop working or just plain
> break?

It'll try to run a `./config.status --recheck` for you now.  Which is
really just a half-assed attempt to do the right thing.  The trigger for
this is a change in any file that matches Makefile.  That matches any of
Makefile, Makefile.in, Makefile.in.in and Makefile.am.

# It even matches doc/plustek/Makefile.kernel2[46]!  No idea what those
# are for, yet.

If a Makefile.am changed, you should run automake (or let `make` do the
right thing when ./configure has been run with --enable-maintainer-mode
(it hasn't) but that would in turn fail because automake is missing and
the `missing` script will tell you so).

If a Makefile.in or Makefile.in.in changed, you *should* run autoconf.
Again, if ./configure had been run with --enable-maintainer-mode it does
that for you (but would fail because autoconf is also `missing`).

> In the mean time, I've just run autoreconf on my debian-8-full Docker
> container[1] and pushed the "fall out".
>
>  [1] https://gitlab.com/sane-project/ci-envs
>
> Hmm, that triggered a pile of such messages and tried to
>
>   remote: cd .. && make  am--refresh
>   remote: make[1]: Entering directory `/var/lib/gforge/chroot/home/groups/sane/sane-backends-lists-git'
>   remote: /bin/bash ./config.status --recheck
>
> failing with the same permission errors as before.  All this is rather
> disappointing to see and I'd like to do something about it.  Clues and
> suggestions very welcome.

Failing any suggestions, I'll see if I can at least sort most of this
*mess* out and have the post-receive hook do what's necessary insofar
possible and give actionable feedback where needed.

# It's not just changes to Makefile.am.  Changes to configure.ac and
# acinclude.m4 as well as a few other files will also require running
# some tools that are *not* available on Alioth.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2            FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Software                        https://my.fsf.org/donate
 Join the Free Software Foundation              https://my.fsf.org/join



More information about the sane-devel mailing list