[Bug 255683] math/maxima fails to install due to strange staging error

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 22 Jun 2021 22:52:18 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255683

--- Comment #23 from russo_at_bogodyn.org ---
Bingo.  I see where this is happening now.

The configure script for maxima has this:
'
if test x"${git_found}" = xtrue; then
    # Test to see if git describe works (discarding any output).  If
    # it works, use it.  Otherwise, keep existing value of VERSION.
    # (git describe fails if git is executed in a non-Git directory, e.g.,
    # an unpacked tarball. Since the exit codes of git describe are
undocumented
,
    # we cannot distinguish that from a missing annotated tag.
    # Play it safe by refusing to change VERSION.)
    if git describe > /dev/null 2>&1; then
        VERSION="`git describe --dirty`"
        # When building RPMs, hyphens in the version are not allowed, so
        # replace them with underscores.
        VERSION=`echo $VERSION | sed 's;-;_;g'`
    fi
fi


And guess what "git describe --dirty" outputs:
10-eol-90770-g4226927ef6b6
(this is, of course, a ports tree that has been updated since my last post to
this thread).



And this little mess is coming from THIS cute little bit of configure.ac:
dnl See if git exists.  If it does, update VERSION to include a git tag
AC_CHECK_PROG(git_found, git, true, false)
if test x"${git_found}" = xtrue; then
    # Test to see if git describe works (discarding any output).  If
    # it works, use it.  Otherwise, keep existing value of VERSION.
    # (git describe fails if git is executed in a non-Git directory, e.g.,
    # an unpacked tarball. Since the exit codes of git describe are
undocumented,
    # we cannot distinguish that from a missing annotated tag.
    # Play it safe by refusing to change VERSION.)
    if git describe > /dev/null 2>&1; then
        VERSION="`git describe --dirty`"
        # When building RPMs, hyphens in the version are not allowed, so
        # replace them with underscores.
        VERSION=`echo $VERSION | sed 's;-;_;g'`
    fi
fi


This is deliberately setting VERSION to a string that represents how many
commits there have been since the last tag in the history, the name of that
tag, and the git sha of the current commit.

Somehow, this is not happening for you, but it is *definitely* happening for
me.  

If git were not found, or if "git describe" didn't work, this wouldn't be a
problem, as it would not clobber VERSION at all.

Now, why VERSION is being used to name staging directories and using git to get
the VERSION value is a question I can't answer.

But perhaps a patch that took this bit out of configure.ac and configure, so
that git is never used to get VERSION during package/port creation would be
reasonable?

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Tue Jun 22 2021 - 22:52:18 UTC

Original text of this message