git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/4] travis: build and test on Linux with musl libc and busybox

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Apr 1, 2020, 22:18 UTC
Message-ID
<20200401221835.GH2224@szeder.dev>
In-Reply-To
<6cf6400f2e0f7336e9b13ddbf412101c4ab48dc5.1585474409.git.congdanhqx@gmail.com>
On Sun, Mar 29, 2020 at 05:12:31PM +0700, Đoàn Trần Công Danh wrote:
> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>
Show 25 quoted lines
> diff --git a/ci/run-alpine-build.sh b/ci/run-alpine-build.sh
> new file mode 100755
> index 0000000000..c83df536e4
> --- /dev/null
> +++ b/ci/run-alpine-build.sh
> @@ -0,0 +1,31 @@
> +#!/bin/sh
> +#
> +# Build and test Git in Alpine Linux
> +#
> +# Usage:
> +#   run-alpine-build.sh <host-user-id>
> +#
> +
> +set -ex
> +
> +useradd () {
> +	adduser -D "$@"
> +}
> +
> +. "${0%/*}/lib-docker.sh"
> +
> +# Update packages to the latest available versions
> +apk add --update autoconf build-base curl-dev openssl-dev expat-dev \
> +	gettext pcre2-dev python3 musl-libintl >/dev/null

In 'ci/run-docker.sh' we run 'docker run' with a bunch of '--env ...' options to make some important environment variables available inside the container. At this point in this script all those variables are set to the expected values, but ...

> +# Build and test
> +su -m -l $CI_USER -c '

... but here, for some reason, those environment variables are not set anymore. This is bad, because this CI job then builds Git sequentially, runs the tests sequentially, runs the tests with 'make' instead of 'prove', and runs the tests without '-V -x'. IOW, it's slow, it produces a lot of useless output, it doesn't report all the failures, and doesn't tell us anything about the failures.

Show 6 quoted lines
> +	set -ex
> +	cd /usr/src/git
> +	test -n "$cache_dir" && ln -s "$cache_dir/.prove" t/.prove
> +	autoconf
> +	echo "PYTHON_PATH=/usr/bin/python3" >config.mak
> +	./configure --with-libpcre

The recommended way to build Git is without autoconf and configure. You can set the PYTHON_PATH and USE_LIBPCRE Makefile knobs in MAKEFLAGS in 'ci/lib.sh', but to be able to access MAKEFLAGS in the container you'll need to build this patch series on top of:

  https://public-inbox.org/git/20200401212151.15164-1-szeder.dev@gmail.com/
Show 21 quoted lines
> +	make
> +	make test
> +'
> diff --git a/ci/run-docker.sh b/ci/run-docker.sh
> index be698817cb..f203db03cf 100755
> --- a/ci/run-docker.sh
> +++ b/ci/run-docker.sh
> @@ -10,6 +10,10 @@ Linux32)
>  	CI_TARGET=linux32
>  	CI_CONTAINER="daald/ubuntu32:xenial"
>  	;;
> +linux-musl)
> +	CI_TARGET=alpine
> +	CI_CONTAINER=alpine
> +	;;
>  *)
>  	exit 1 ;;
>  esac
> -- 
> 2.26.0.302.g234993491e
> 
Previous: Đoàn Trần Công DanhNext: Danh Doan
Message 14 of 42 in “add travis job for linux with musl libc”
  1. 0/3 add travis job for linux with musl libcĐoàn Trần Công Danh, Mar 26, 2020
  2. 1/3 ci: libify logic for usage and checking CI_USERĐoàn Trần Công Danh, Mar 26, 2020
  3. 2/3 ci: refactor docker runner scriptĐoàn Trần Công Danh, Mar 26, 2020
  4. Eric SunshineMar 26, 2020
  5. SZEDER GáborMar 28, 2020
  6. Danh DoanMar 29, 2020
  7. 3/3 travis: build and test on Linux with musl libc and busyboxĐoàn Trần Công Danh, Mar 26, 2020
  8. Junio C HamanoMar 29, 2020
  9. 0/4 Travis + Azure jobs for linux with musl libcĐoàn Trần Công Danh, Mar 29, 2020
  10. 1/4 ci: libify logic for usage and checking CI_USERĐoàn Trần Công Danh, Mar 29, 2020
  11. 2/4 ci: refactor docker runner scriptĐoàn Trần Công Danh, Mar 29, 2020
  12. SZEDER GáborApr 1, 2020
  13. 3/4 travis: build and test on Linux with musl libc and busyboxĐoàn Trần Công Danh, Mar 29, 2020
  14. SZEDER GáborApr 1, 2020
  15. Danh DoanApr 2, 2020
  16. Johannes SchindelinApr 7, 2020
  17. Junio C HamanoApr 7, 2020
  18. Johannes SchindelinApr 10, 2020
  19. 4/4 t3402: use POSIX compliant regex(7)Đoàn Trần Công Danh, Mar 29, 2020
  20. Junio C HamanoMar 29, 2020
  21. 0/6 Travis + Azure jobs for linux with musl libcĐoàn Trần Công Danh, Apr 2, 2020
  22. 1/6 ci: make MAKEFLAGS available inside the Docker container in the Linux32 jobĐoàn Trần Công Danh, Apr 2, 2020
  23. 2/6 ci/lib-docker: preserve required environment variablesĐoàn Trần Công Danh, Apr 2, 2020
  24. SZEDER GáborApr 3, 2020
  25. Danh DoanApr 3, 2020
  26. SZEDER GáborApr 3, 2020
  27. 3/6 ci/linux32: parameterise command to switch archĐoàn Trần Công Danh, Apr 2, 2020
  28. 4/6 ci: refactor docker runner scriptĐoàn Trần Công Danh, Apr 2, 2020
  29. 5/6 ci/linux32: libify install-dependencies stepĐoàn Trần Công Danh, Apr 2, 2020
  30. 6/6 travis: build and test on Linux with musl libc and busyboxĐoàn Trần Công Danh, Apr 2, 2020
  31. Junio C HamanoApr 2, 2020
  32. Danh DoanApr 3, 2020
  33. 0/6 Travis jobs for linux with musl libcĐoàn Trần Công Danh, Apr 4, 2020
  34. 1/6 ci: make MAKEFLAGS available inside the Docker container in the Linux32 jobĐoàn Trần Công Danh, Apr 4, 2020
  35. 2/6 ci/lib-docker: preserve required environment variablesĐoàn Trần Công Danh, Apr 4, 2020
  36. 3/6 ci/linux32: parameterise command to switch archĐoàn Trần Công Danh, Apr 4, 2020
  37. 4/6 ci: refactor docker runner scriptĐoàn Trần Công Danh, Apr 4, 2020
  38. 5/6 ci/linux32: libify install-dependencies stepĐoàn Trần Công Danh, Apr 4, 2020
  39. 6/6 travis: build and test on Linux with musl libc and busyboxĐoàn Trần Công Danh, Apr 4, 2020
  40. Junio C HamanoApr 5, 2020
  41. Johannes SchindelinApr 7, 2020
  42. Junio C HamanoApr 7, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.