From 0afcbc984d5220e26fad259b8962f088a5e84a4f Mon Sep 17 00:00:00 2001 From: Sergio Garcia Date: Mon, 26 May 2025 11:08:31 +0200 Subject: [PATCH 1/4] Remove slc6 workaround --- autotools.sh | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/autotools.sh b/autotools.sh index 18204416fe..5f490d5678 100644 --- a/autotools.sh +++ b/autotools.sh @@ -80,24 +80,6 @@ pushd libtool* hash -r popd -# Do not judge me. I am simply trying to float. -# Apparently slc6 needs a different order compared -# to the rest. -case $ARCHITECTURE in - slc6*|ubuntu14*) - # automake -- requires: m4, autoconf, gettext - pushd automake* - $USE_AUTORECONF && [ -e bootstrap ] && sh ./bootstrap - ./configure --prefix $INSTALLROOT - make MAKEINFO=true ${JOBS+-j $JOBS} - make MAKEINFO=true install - hash -r - popd - ;; - *) ;; -esac - - # gettext -- requires: nothing special pushd gettext* $USE_AUTORECONF && autoreconf -ivf @@ -120,22 +102,6 @@ pushd gettext* hash -r popd -# Do not judge me. I am simply trying to float. -case $ARCHITECTURE in - slc6*|ubuntu14*) ;; - *) - # automake -- requires: m4, autoconf, gettext - pushd automake* - $USE_AUTORECONF && [ -e bootstrap ] && sh ./bootstrap - ./configure --prefix $INSTALLROOT - make MAKEINFO=true ${JOBS+-j $JOBS} - make MAKEINFO=true install - hash -r - popd - ;; -esac - - # pkgconfig -- requires: nothing special pushd pkg-config* OLD_LDFLAGS="$LDFLAGS" From 2165058b60235351181363aeeac26c65caae2800 Mon Sep 17 00:00:00 2001 From: Sergio Garcia Date: Mon, 26 May 2025 11:09:28 +0200 Subject: [PATCH 2/4] Remove macOS workaround macOS xargs provides a no-op -r option for compatibility nowadays --- autotools.sh | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/autotools.sh b/autotools.sh index 5f490d5678..5f8206c2e9 100644 --- a/autotools.sh +++ b/autotools.sh @@ -116,17 +116,15 @@ pushd pkg-config* hash -r popd -# We need to detect OSX becase xargs behaves differently there -XARGS_DO_NOT_FAIL='-r' -[[ ${ARCHITECTURE:0:3} == osx ]] && XARGS_DO_NOT_FAIL= +popd || exit 1 # Fix perl location, required on /usr/bin/perl -grep -l -R -e '^#!.*perl' $INSTALLROOT | \ - xargs ${XARGS_DO_NOT_FAIL} -n1 sed -ideleteme -e 's;^#!.*perl;#!/usr/bin/perl;' -find $INSTALLROOT -name '*deleteme' -delete -grep -l -R -e 'exec [^ ]*/perl' $INSTALLROOT | \ - xargs ${XARGS_DO_NOT_FAIL} -n1 sed -ideleteme -e 's;exec [^ ]*/perl;exec /usr/bin/perl;g' -find $INSTALLROOT -name '*deleteme' -delete +grep -l -R -e '^#!.*perl' "$INSTALLROOT" | \ + xargs -n1 sed -ideleteme -e 's;^#!.*perl;#!/usr/bin/perl;' +find "$INSTALLROOT" -name '*deleteme' -delete +grep -l -R -e 'exec [^ ]*/perl' "$INSTALLROOT" | \ + xargs -n1 sed -ideleteme -e 's;exec [^ ]*/perl;exec /usr/bin/perl;g' +find "$INSTALLROOT" -name '*deleteme' -delete # Pretend we have a modulefile to make the linter happy (don't delete) #%Module From 8701b8a5e799f4456af25e09b1b2412f5c30d038 Mon Sep 17 00:00:00 2001 From: Sergio Garcia Date: Mon, 26 May 2025 11:10:02 +0200 Subject: [PATCH 3/4] Fix linter issues --- autotools.sh | 49 ++++++++++++++++++++++++------------------------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/autotools.sh b/autotools.sh index 5f8206c2e9..9daf0754e8 100644 --- a/autotools.sh +++ b/autotools.sh @@ -1,11 +1,12 @@ package: autotools version: "%(tag_basename)s" -tag: v1.6.4 +tag: "v1.6.4" source: https://github.com/alisw/autotools prefer_system: "(?!slc5|slc6)" prefer_system_check: | export PATH=$PATH:$(brew --prefix gettext || true)/bin:$(brew --prefix texinfo || true)/bin; - which autoconf && which m4 && which automake && which makeinfo && which aclocal && which pkg-config && which autopoint && which libtool; + which autoconf && which m4 && which automake && which makeinfo && which \ + aclocal && which pkg-config && which autopoint && which libtool; if [ $? -ne 0 ]; then printf "One or more autotools packages are missing on your system.\n * On a RHEL-compatible system you probably need: autoconf automake texinfo gettext gettext-devel libtool\n * On an Ubuntu-like system you probably need: autoconf automake autopoint texinfo gettext libtool libtool-bin pkg-config\n * On macOS you need: brew install autoconf automake gettext pkg-config"; exit 1; fi prepend_path: PKG_CONFIG_PATH: $(pkg-config --debug 2>&1 | grep 'Scanning directory' | sed -e "s/.*'\(.*\)'/\1/" | xargs echo | sed -e 's/ /:/g') @@ -27,11 +28,11 @@ esac echo "Building ALICE autotools. To avoid this install autoconf, automake, autopoint, texinfo, pkg-config." # Restore original timestamps to avoid reconf (Git does not preserve them) -pushd $SOURCEDIR +pushd "$SOURCEDIR" || exit 1 ./missing-timestamps.sh --apply -popd +popd || exit 1 -rsync -a --delete --exclude '**/.git' $SOURCEDIR/ . +rsync -a --delete --exclude '**/.git' "$SOURCEDIR"/ . # Use our auto* tools as we build them export PATH=$INSTALLROOT/bin:$PATH @@ -39,15 +40,15 @@ export LD_LIBRARY_PATH=$INSTALLROOT/lib:$LD_LIBRARY_PATH # help2man if pushd help2man*; then - ./configure --disable-dependency-tracking --prefix $INSTALLROOT + ./configure --disable-dependency-tracking --prefix "$INSTALLROOT" make ${JOBS+-j $JOBS} make install hash -r - popd + popd || exit 1 fi # m4 -- requires: nothing special -pushd m4* +pushd m4* || exit 1 # texinfo uses utf-8 by default, but doc/m4.text is still iso-8859-1. # MacOS sed only understands the command with the linebreaks like this. sed -i.bak '1i\ @@ -55,35 +56,35 @@ pushd m4* ' doc/m4.texi rm -f doc/m4.texi.bak $USE_AUTORECONF && autoreconf -ivf - ./configure --disable-dependency-tracking --prefix $INSTALLROOT + ./configure --disable-dependency-tracking --prefix "$INSTALLROOT" make ${JOBS+-j $JOBS} make install hash -r -popd +popd || exit 1 # autoconf -- requires: m4 # FIXME: is that really true? on slc7 it fails if I do it the other way around # with the latest version of autoconf / m4 -pushd autoconf* +pushd autoconf* || exit 1 $USE_AUTORECONF && autoreconf -ivf - ./configure --prefix $INSTALLROOT + ./configure --prefix "$INSTALLROOT" make MAKEINFO=true ${JOBS+-j $JOBS} make MAKEINFO=true install hash -r -popd +popd || exit 1 # libtool -- requires: m4 -pushd libtool* - ./configure --disable-dependency-tracking --prefix $INSTALLROOT --enable-ltdl-install +pushd libtool* || exit 1 + ./configure --disable-dependency-tracking --prefix "$INSTALLROOT" --enable-ltdl-install make ${JOBS+-j $JOBS} make install hash -r -popd +popd || exit 1 # gettext -- requires: nothing special -pushd gettext* +pushd gettext* || exit 1 $USE_AUTORECONF && autoreconf -ivf - ./configure --prefix $INSTALLROOT \ + ./configure --prefix "$INSTALLROOT" \ --without-xz \ --without-bzip2 \ --disable-curses \ @@ -95,27 +96,25 @@ pushd gettext* --disable-acl \ --disable-java \ --disable-dependency-tracking \ - --without-emacs \ + --without-emacs \ --disable-silent-rules make ${JOBS+-j $JOBS} make install hash -r -popd +popd || exit 1 # pkgconfig -- requires: nothing special -pushd pkg-config* +pushd pkg-config* || exit 1 OLD_LDFLAGS="$LDFLAGS" [[ ${ARCHITECTURE:0:3} == osx ]] && export LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Carbon" ./configure --disable-debug \ - --prefix=$INSTALLROOT \ + --prefix="$INSTALLROOT" \ --disable-host-tool \ --with-internal-glib export LDFLAGS="$OLD_LDFLAGS" make ${JOBS+-j $JOBS} make install hash -r -popd - popd || exit 1 # Fix perl location, required on /usr/bin/perl @@ -127,4 +126,4 @@ grep -l -R -e 'exec [^ ]*/perl' "$INSTALLROOT" | \ find "$INSTALLROOT" -name '*deleteme' -delete # Pretend we have a modulefile to make the linter happy (don't delete) -#%Module +# alibuild-generate-module From 99d4b63ec150392c685fc27ce7d9ef82dbbb83f1 Mon Sep 17 00:00:00 2001 From: Sergio Garcia Date: Mon, 26 May 2025 14:00:47 +0200 Subject: [PATCH 4/4] Remove exit 1 --- autotools.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/autotools.sh b/autotools.sh index 9daf0754e8..96bb235bad 100644 --- a/autotools.sh +++ b/autotools.sh @@ -28,9 +28,9 @@ esac echo "Building ALICE autotools. To avoid this install autoconf, automake, autopoint, texinfo, pkg-config." # Restore original timestamps to avoid reconf (Git does not preserve them) -pushd "$SOURCEDIR" || exit 1 +pushd "$SOURCEDIR" ./missing-timestamps.sh --apply -popd || exit 1 +popd rsync -a --delete --exclude '**/.git' "$SOURCEDIR"/ . @@ -44,11 +44,11 @@ if pushd help2man*; then make ${JOBS+-j $JOBS} make install hash -r - popd || exit 1 + popd fi # m4 -- requires: nothing special -pushd m4* || exit 1 +pushd m4* # texinfo uses utf-8 by default, but doc/m4.text is still iso-8859-1. # MacOS sed only understands the command with the linebreaks like this. sed -i.bak '1i\ @@ -60,29 +60,29 @@ pushd m4* || exit 1 make ${JOBS+-j $JOBS} make install hash -r -popd || exit 1 +popd # autoconf -- requires: m4 # FIXME: is that really true? on slc7 it fails if I do it the other way around # with the latest version of autoconf / m4 -pushd autoconf* || exit 1 +pushd autoconf* $USE_AUTORECONF && autoreconf -ivf ./configure --prefix "$INSTALLROOT" make MAKEINFO=true ${JOBS+-j $JOBS} make MAKEINFO=true install hash -r -popd || exit 1 +popd # libtool -- requires: m4 -pushd libtool* || exit 1 +pushd libtool* ./configure --disable-dependency-tracking --prefix "$INSTALLROOT" --enable-ltdl-install make ${JOBS+-j $JOBS} make install hash -r -popd || exit 1 +popd # gettext -- requires: nothing special -pushd gettext* || exit 1 +pushd gettext* $USE_AUTORECONF && autoreconf -ivf ./configure --prefix "$INSTALLROOT" \ --without-xz \ @@ -101,10 +101,10 @@ pushd gettext* || exit 1 make ${JOBS+-j $JOBS} make install hash -r -popd || exit 1 +popd # pkgconfig -- requires: nothing special -pushd pkg-config* || exit 1 +pushd pkg-config* OLD_LDFLAGS="$LDFLAGS" [[ ${ARCHITECTURE:0:3} == osx ]] && export LDFLAGS="$LDFLAGS -framework CoreFoundation -framework Carbon" ./configure --disable-debug \ @@ -115,7 +115,7 @@ pushd pkg-config* || exit 1 make ${JOBS+-j $JOBS} make install hash -r -popd || exit 1 +popd # Fix perl location, required on /usr/bin/perl grep -l -R -e '^#!.*perl' "$INSTALLROOT" | \