Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 May 2020 01:56:17 +0200
From:      Christoph Moench-Tegeder <cmt@burggraben.net>
To:        Guido Falsi <madpilot@freebsd.org>
Cc:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   Re: svn commit: r533475 - in head/net/asterisk16: . files
Message-ID:  <20200430235617.GB2431@elch.exwg.net>
In-Reply-To: <202004302028.03UKSgs1063077@repo.freebsd.org>
References:  <202004302028.03UKSgs1063077@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

## Guido Falsi (madpilot@FreeBSD.org):

> Log:
>   - Update asterisk16 to 16.10.0

This fails in poudriere in very intersting ways, and it's entirely not
your fault :)
During configure, I get

: [pjproject]  Verifying /portdistfiles/asterisk/pjproject-2.9.tar.bz2
: [pjproject]  Verify successful
: touch: /portdistfiles/asterisk/pjproject-2.9.tar.bz2: Permission denied
: rm: /portdistfiles/asterisk/pjproject-2.9.tar.bz2: Permission denied
: [pjproject]  Downloading https://raw.githubusercontent.com/asterisk/third-party/master/pjproject/2.9/pjproject-2.9.tar.bz2 to /portdistfiles/asterisk/pjproject>
: /bin/sh: cannot create /portdistfiles/asterisk/pjproject-2.9.tar.bz2: Permission denied

and then configure bombs out, failed, etc.
After a wild goose chase (16.9.0 built just fine, and I couldn't see any
relevant change), I figured out:

asterisk-16.10.0/third-party/pjproject/Makefile l. 91:
: $(DOWNLOAD_DIR)/$(TARBALL_FILE): ../versions.mak
:     $(CMD_PREFIX) ($(TARBALL_EXISTS) && $(TARBALL_VERIFY) && touch $@) || (rm -rf $@ ;\
:     $(TARBALL_DOWNLOAD)) || (rm -rf $@ ;\
:     $(SHELL_ECHO_PREFIX) Retrying download ; $(TARBALL_DOWNLOAD))

(BTW the code is the same in 16.9.0).

DOWNLOAD_DIR points to /portdistfiles/asterisk.
That means: whenever asterisk's source time stamps are newer than the
(unchanged since weeks) pjproject-2.9.tar.bz2, this snippet will happily
try to "VERIFY" (md5 check, that's ok) and touch (why? oh WHY?) that
tarball, which of course fails as /portdistfiles is read-only.

The correct approach would be to patch out that verify-and-download
step: we do know that we have our pjproject tarball, and it's checksum
has been verified by the ports framework. If nobody else beats me to
it, I'll cook up a patch tomorrow ("I'll just update asterisk", he said,
and then it was 02:00).

The quick workaround was to touch ${DISTDIR}/asterisk/pjproject-2.9tar.bz2
myself - that bumped modification time and allowed the build to pass.

While practicing my staring-in-disbelief with the configure output, I
noticed that we get a few errors in there:

: ./configure: PJPROJECT_CONFIGURE_OPTS+= --build=amd64-portbld-freebsd12.1: not found
: ./configure: PJPROJECT_CONFIGURE_OPTS+= --host=: not found
: ./configure: PJPROJECT_CONFIGURE_OPTS+= --with-ssl=/usr: not found

That looks like we got a few bashisms in there, despite configure
claiming to be "/bin/sh" and may result in a few wrong arguments being
used when configuring pjproject.

Regards,
Christoph

-- 
Spare Space



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200430235617.GB2431>