curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Reproducing the release tarballs

From: Jeffrey Walton via curl-library <curl-library_at_lists.haxx.se>
Date: Sat, 30 Mar 2024 14:53:03 -0400

On Sat, Mar 30, 2024 at 2:40 PM Daniel Stenberg via curl-library
<curl-library_at_lists.haxx.se> wrote:
>
> On Sat, 30 Mar 2024, Howard Chu wrote:
>
> > IMO only project developers should ever be touching the autotools.
> ...
>
> > Only our release engineer ever generates the configure script, and it's
> > committed to the repo along with everything else.
>
> For people using releases, it does not matter since the scripts are in the
> tarballs.
>
> Even if generated files are committed, there still needs to be a system or way
> to verify that the scripts are indeed generated correctly.
>
> Since Makefile.am, configure.ac, and *m4 files are updated quite frequently,
> it would be a lot of overhead to having to commit updated scripts (by a single
> person). It does not feel like a concept I would be comfortable with.

If I am not mistaken, you usually take the Autools gear that is
provided by the distro. There's no need to chase m4 files.

However, you should download the latest config.sub and config.guess to
package with your tarball per
<https://www.gnu.org/software/gettext/manual/html_node/config_002eguess.html>.
So your build script or bootstrap.sh would include something like:

if command -v wget >/dev/null 2>&1; then
    FETCH_CMD="wget -q -O"
elif command -v curl >/dev/null 2>&1; then
    FETCH_CMD="curl -L -s -o"
else
    FETCH_CMD="curl-and-wget-not-found"
fi

IS_DARWIN=`uname -s 2>&1 | "$GREP" -i -c darwin

echo "Updating config.sub"
if ${FETCH_CMD} config.sub.new \
   'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub'
>/dev/null 2>&1; then

    # Solaris removes +w, can't overwrite
    chmod +w build-aux/config.sub
    mv config.sub.new build-aux/config.sub
    chmod +x build-aux/config.sub

    if [ "$IS_DARWIN" -ne 0 ] && [ command -v xattr >/dev/null 2>&1 ]; then
        echo "Removing config.sub quarantine"
        xattr -d "com.apple.quarantine" build-aux/config.sub >/dev/null 2>&1
    fi
fi

echo "Updating config.guess"
if ${FETCH_CMD} config.guess.new \
   'https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess'
>/dev/null 2>&1; then

    # Solaris removes +w, can't overwrite
    chmod +w build-aux/config.guess
    mv config.guess.new build-aux/config.guess
    chmod +x build-aux/config.guess

    if [ "$IS_DARWIN" -ne 0 ] && [ command -v xattr >/dev/null 2>&1 ]; then
        echo "Removing config.guess quarantine"
        xattr -d "com.apple.quarantine" build-aux/config.guess >/dev/null 2>&1
    fi
fi

Jeff
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-03-30