{"thread":{"id":"53103","subject":"[PATCH 0/3] add travis job for linux with musl libc","startedAt":"2020-03-26T07:35:45Z","lastAt":"2020-04-10T13:39:05Z","messageCount":42,"participants":["Đoàn Trần Công Danh","Eric Sunshine","SZEDER Gábor","Junio C Hamano","Danh Doan","Johannes Schindelin"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"394054","messageId":"cover.1585203294.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":null,"subject":"[PATCH 0/3] add travis job for linux with musl libc","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T07:35:16Z","receivedAt":"2020-03-26T07:35:45Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Recently, we've un-broken git for Linux with musl libc,\nand we have a serie to fix false negative with busybox shell utils.\n\nThere is a sample travis build for this serie applied on top of master:\nhttps://travis-ci.org/github/sgn/git/builds/667111988\n\nAnd, after merging with my v4 to fix busybox false negative:\nhttps://travis-ci.org/github/sgn/git/builds/667112197\n\n\nĐoàn Trần Công Danh (3):\n  ci: libify logic for usage and checking CI_USER\n  ci: refactor docker runner script\n  travis: build and test on Linux with musl libc and busybox\n\n .travis.yml                                 | 10 +++++-\n azure-pipelines.yml                         |  4 +--\n ci/lib-docker.sh                            | 37 +++++++++++++++++++++\n ci/run-alpine-build.sh                      | 31 +++++++++++++++++\n ci/{run-linux32-docker.sh => run-docker.sh} | 20 +++++++----\n ci/run-linux32-build.sh                     | 35 +------------------\n 6 files changed, 94 insertions(+), 43 deletions(-)\n create mode 100644 ci/lib-docker.sh\n create mode 100755 ci/run-alpine-build.sh\n rename ci/{run-linux32-docker.sh => run-docker.sh} (46%)\n\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394055","messageId":"ca87bea4a379dac5d2e68bc18b0084201afe5fc4.1585203294.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585203294.git.congdanhqx@gmail.com","subject":"[PATCH 1/3] ci: libify logic for usage and checking CI_USER","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T07:35:17Z","receivedAt":"2020-03-26T07:35:47Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"This part of logic will be reused for alpine docker later.\n\nMerge those logic into single chunk since they will be used together.\n\nWhile we're at it, add a comment to tell people run with root inside\npodman container.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n\nThis patch is viewed better with \"git diff --color-moved\"\n\n ci/lib-docker.sh        | 37 +++++++++++++++++++++++++++++++++++++\n ci/run-linux32-build.sh | 35 +----------------------------------\n 2 files changed, 38 insertions(+), 34 deletions(-)\n create mode 100644 ci/lib-docker.sh\n\ndiff --git a/ci/lib-docker.sh b/ci/lib-docker.sh\nnew file mode 100644\nindex 0000000000..ac155ace54\n--- /dev/null\n+++ b/ci/lib-docker.sh\n@@ -0,0 +1,37 @@\n+# Library of functions shared by all CI scripts run inside docker\n+\n+if test $# -ne 1 || test -z \"$1\"\n+then\n+\techo >&2 \"usage: $0 <host-user-id>\"\n+\texit 1\n+fi\n+\n+# If this script runs inside a docker container, then all commands are\n+# usually executed as root. Consequently, the host user might not be\n+# able to access the test output files.\n+# If a non 0 host user id is given, then create a user \"ci\" with that\n+# user id to make everything accessible to the host user.\n+HOST_UID=$1\n+if test $HOST_UID -eq 0\n+then\n+\t# Just in case someone does want to run the test suite as root.\n+\t# or podman is used in place of docker\n+\tCI_USER=root\n+else\n+\tCI_USER=ci\n+\tif test \"$(id -u $CI_USER 2>/dev/null)\" = $HOST_UID\n+\tthen\n+\t\techo \"user '$CI_USER' already exists with the requested ID $HOST_UID\"\n+\telse\n+\t\tuseradd -u $HOST_UID $CI_USER\n+\tfi\n+\n+\t# Due to a bug the test suite was run as root in the past, so\n+\t# a prove state file created back then is only accessible by\n+\t# root.  Now that bug is fixed, the test suite is run as a\n+\t# regular user, but the prove state file coming from Travis\n+\t# CI's cache might still be owned by root.\n+\t# Make sure that this user has rights to any cached files,\n+\t# including an existing prove state file.\n+\ttest -n \"$cache_dir\" && chown -R $HOST_UID:$HOST_UID \"$cache_dir\"\n+fi\ndiff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh\nindex e3a193adbc..81296cdd19 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-linux32-build.sh\n@@ -8,11 +8,7 @@\n \n set -ex\n \n-if test $# -ne 1 || test -z \"$1\"\n-then\n-\techo >&2 \"usage: run-linux32-build.sh <host-user-id>\"\n-\texit 1\n-fi\n+. \"${0%/*}/lib-docker.sh\"\n \n # Update packages to the latest available versions\n linux32 --32bit i386 sh -c '\n@@ -21,35 +17,6 @@ linux32 --32bit i386 sh -c '\n \tlibexpat-dev gettext python >/dev/null\n '\n \n-# If this script runs inside a docker container, then all commands are\n-# usually executed as root. Consequently, the host user might not be\n-# able to access the test output files.\n-# If a non 0 host user id is given, then create a user \"ci\" with that\n-# user id to make everything accessible to the host user.\n-HOST_UID=$1\n-if test $HOST_UID -eq 0\n-then\n-\t# Just in case someone does want to run the test suite as root.\n-\tCI_USER=root\n-else\n-\tCI_USER=ci\n-\tif test \"$(id -u $CI_USER 2>/dev/null)\" = $HOST_UID\n-\tthen\n-\t\techo \"user '$CI_USER' already exists with the requested ID $HOST_UID\"\n-\telse\n-\t\tuseradd -u $HOST_UID $CI_USER\n-\tfi\n-\n-\t# Due to a bug the test suite was run as root in the past, so\n-\t# a prove state file created back then is only accessible by\n-\t# root.  Now that bug is fixed, the test suite is run as a\n-\t# regular user, but the prove state file coming from Travis\n-\t# CI's cache might still be owned by root.\n-\t# Make sure that this user has rights to any cached files,\n-\t# including an existing prove state file.\n-\ttest -n \"$cache_dir\" && chown -R $HOST_UID:$HOST_UID \"$cache_dir\"\n-fi\n-\n # Build and test\n linux32 --32bit i386 su -m -l $CI_USER -c '\n \tset -ex\n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394056","messageId":"2fada3db3d0c802b45551671dcb75e406e3ed2b6.1585203294.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585203294.git.congdanhqx@gmail.com","subject":"[PATCH 2/3] ci: refactor docker runner script","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T07:35:18Z","receivedAt":"2020-03-26T07:35:49Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"We will support alpine check in docker later in this serie.\n\nWhile we're at it, tell people to run as root in podman.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml                                 |  2 +-\n azure-pipelines.yml                         |  4 ++--\n ci/{run-linux32-docker.sh => run-docker.sh} | 19 +++++++++++++------\n 3 files changed, 16 insertions(+), 9 deletions(-)\n rename ci/{run-linux32-docker.sh => run-docker.sh} (48%)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex fc5730b085..32e80e2670 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -32,7 +32,7 @@ matrix:\n       services:\n         - docker\n       before_install:\n-      script: ci/run-linux32-docker.sh\n+      script: ci/run-docker.sh linux32\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/azure-pipelines.yml b/azure-pipelines.yml\nindex 675c3a43c9..ef504ff29f 100644\n--- a/azure-pipelines.yml\n+++ b/azure-pipelines.yml\n@@ -489,14 +489,14 @@ jobs:\n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n \n        res=0\n-       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-linux32-docker.sh || res=1\n+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-docker.sh linux32 || res=1\n \n        sudo chmod a+r t/out/TEST-*.xml\n        test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n \n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n        exit $res\n-    displayName: 'ci/run-linux32-docker.sh'\n+    displayName: 'ci/run-docker.sh linux32'\n     env:\n       GITFILESHAREPWD: $(gitfileshare.pwd)\n   - task: PublishTestResults@2\ndiff --git a/ci/run-linux32-docker.sh b/ci/run-docker.sh\nsimilarity index 48%\nrename from ci/run-linux32-docker.sh\nrename to ci/run-docker.sh\nindex 751acfcf8a..c8dff9d41a 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-docker.sh\n@@ -1,15 +1,22 @@\n #!/bin/sh\n #\n-# Download and run Docker image to build and test 32-bit Git\n+# Download and run Docker image to build and test git\n #\n \n . ${0%/*}/lib.sh\n \n-docker pull daald/ubuntu32:xenial\n+CI_TARGET=${1:-linux32}\n+case \"$CI_TARGET\" in\n+linux32) CI_CONTAINER=\"daald/ubuntu32:xenial\" ;;\n+*)       exit 1 ;;\n+esac\n+\n+docker pull \"$CI_CONTAINER\"\n \n # Use the following command to debug the docker build locally:\n-# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash daald/ubuntu32:xenial\n-# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>\n+# <host-user-id> must be 0 if podman is used in place of docker\n+# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/sh \"$CI_CONTAINER\"\n+# root@container:/# /usr/src/git/ci/run-$CI_TARGET-build.sh <host-user-id>\n \n container_cache_dir=/tmp/travis-cache\n \n@@ -23,8 +30,8 @@ docker run \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-\tdaald/ubuntu32:xenial \\\n-\t/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)\n+\t\"$CI_CONTAINER\" \\\n+\t\"/usr/src/git/ci/run-$CI_TARGET-build.sh\" $(id -u $USER)\n \n check_unignored_build_artifacts\n \n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394057","messageId":"7d65bb87a25ab35dbf21d972e10a2c3321cc6761.1585203294.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585203294.git.congdanhqx@gmail.com","subject":"[PATCH 3/3] travis: build and test on Linux with musl libc and busybox","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-26T07:35:19Z","receivedAt":"2020-03-26T07:35:50Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml            |  8 ++++++++\n ci/run-alpine-build.sh | 31 +++++++++++++++++++++++++++++++\n ci/run-docker.sh       |  1 +\n 3 files changed, 40 insertions(+)\n create mode 100755 ci/run-alpine-build.sh\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 32e80e2670..a2927dd120 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -33,6 +33,14 @@ matrix:\n         - docker\n       before_install:\n       script: ci/run-docker.sh linux32\n+    - env: jobname=linux-musl-busybox\n+      os: linux\n+      compiler:\n+      addons:\n+      services:\n+        - docker\n+      before_install:\n+      script: ci/run-docker.sh alpine\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/ci/run-alpine-build.sh b/ci/run-alpine-build.sh\nnew file mode 100755\nindex 0000000000..c83df536e4\n--- /dev/null\n+++ b/ci/run-alpine-build.sh\n@@ -0,0 +1,31 @@\n+#!/bin/sh\n+#\n+# Build and test Git in Alpine Linux\n+#\n+# Usage:\n+#   run-alpine-build.sh <host-user-id>\n+#\n+\n+set -ex\n+\n+useradd () {\n+\tadduser -D \"$@\"\n+}\n+\n+. \"${0%/*}/lib-docker.sh\"\n+\n+# Update packages to the latest available versions\n+apk add --update autoconf build-base curl-dev openssl-dev expat-dev \\\n+\tgettext pcre2-dev python3 musl-libintl >/dev/null\n+\n+# Build and test\n+su -m -l $CI_USER -c '\n+\tset -ex\n+\tcd /usr/src/git\n+\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n+\tautoconf\n+\techo \"PYTHON_PATH=/usr/bin/python3\" >config.mak\n+\t./configure --with-libpcre\n+\tmake\n+\tmake test\n+'\ndiff --git a/ci/run-docker.sh b/ci/run-docker.sh\nindex c8dff9d41a..47affcd6d3 100755\n--- a/ci/run-docker.sh\n+++ b/ci/run-docker.sh\n@@ -8,6 +8,7 @@\n CI_TARGET=${1:-linux32}\n case \"$CI_TARGET\" in\n linux32) CI_CONTAINER=\"daald/ubuntu32:xenial\" ;;\n+alpine)  CI_CONTAINER=\"alpine\" ;;\n *)       exit 1 ;;\n esac\n \n-- \n2.26.0.rc2.357.g1e1ba0441d\n\n"},{"id":"394104","messageId":"CAPig+cTajaEU6wFK9wVS77ppeqpwqM95XLMeYRCHUORjBFa3Cg@mail.gmail.com","threadId":"53103","inReplyTo":"2fada3db3d0c802b45551671dcb75e406e3ed2b6.1585203294.git.congdanhqx@gmail.com","subject":"Re: [PATCH 2/3] ci: refactor docker runner script","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2020-03-26T16:06:35Z","receivedAt":"2020-03-26T16:06:51Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Mar 26, 2020 at 3:35 AM Đoàn Trần Công Danh\n<congdanhqx@gmail.com> wrote:\n> We will support alpine check in docker later in this serie.\n\ns/serie/series/\n\n> While we're at it, tell people to run as root in podman.\n>\n> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n"},{"id":"394247","messageId":"20200328175329.GD2224@szeder.dev","threadId":"53103","inReplyTo":"2fada3db3d0c802b45551671dcb75e406e3ed2b6.1585203294.git.congdanhqx@gmail.com","subject":"Re: [PATCH 2/3] ci: refactor docker runner script","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2020-03-28T17:53:29Z","receivedAt":"2020-03-28T17:53:39Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Thu, Mar 26, 2020 at 02:35:18PM +0700, Đoàn Trần Công Danh wrote:\n> We will support alpine check in docker later in this serie.\n> \n> While we're at it, tell people to run as root in podman.\n\nWhy tell that to people?  Please clarify what podman is and why should\nwe care.\n\n> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> ---\n>  .travis.yml                                 |  2 +-\n>  azure-pipelines.yml                         |  4 ++--\n>  ci/{run-linux32-docker.sh => run-docker.sh} | 19 +++++++++++++------\n>  3 files changed, 16 insertions(+), 9 deletions(-)\n>  rename ci/{run-linux32-docker.sh => run-docker.sh} (48%)\n> \n> diff --git a/.travis.yml b/.travis.yml\n> index fc5730b085..32e80e2670 100644\n> --- a/.travis.yml\n> +++ b/.travis.yml\n> @@ -32,7 +32,7 @@ matrix:\n>        services:\n>          - docker\n>        before_install:\n> -      script: ci/run-linux32-docker.sh\n> +      script: ci/run-docker.sh linux32\n\nThe name of the 'Linux32' build job starts with a capital 'L'; please\nbe consistent with that.\n\n>      - env: jobname=StaticAnalysis\n>        os: linux\n>        compiler:\n> diff --git a/azure-pipelines.yml b/azure-pipelines.yml\n> index 675c3a43c9..ef504ff29f 100644\n> --- a/azure-pipelines.yml\n> +++ b/azure-pipelines.yml\n> @@ -489,14 +489,14 @@ jobs:\n>         test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n>  \n>         res=0\n> -       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-linux32-docker.sh || res=1\n> +       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-docker.sh linux32 || res=1\n>  \n>         sudo chmod a+r t/out/TEST-*.xml\n>         test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n>  \n>         test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n>         exit $res\n> -    displayName: 'ci/run-linux32-docker.sh'\n> +    displayName: 'ci/run-docker.sh linux32'\n>      env:\n>        GITFILESHAREPWD: $(gitfileshare.pwd)\n>    - task: PublishTestResults@2\n> diff --git a/ci/run-linux32-docker.sh b/ci/run-docker.sh\n> similarity index 48%\n> rename from ci/run-linux32-docker.sh\n> rename to ci/run-docker.sh\n> index 751acfcf8a..c8dff9d41a 100755\n> --- a/ci/run-linux32-docker.sh\n> +++ b/ci/run-docker.sh\n> @@ -1,15 +1,22 @@\n>  #!/bin/sh\n>  #\n> -# Download and run Docker image to build and test 32-bit Git\n> +# Download and run Docker image to build and test git\n\ns/git/Git/\n\n>  #\n>  \n>  . ${0%/*}/lib.sh\n>  \n> -docker pull daald/ubuntu32:xenial\n> +CI_TARGET=${1:-linux32}\n> +case \"$CI_TARGET\" in\n> +linux32) CI_CONTAINER=\"daald/ubuntu32:xenial\" ;;\n> +*)       exit 1 ;;\n> +esac\n> +\n> +docker pull \"$CI_CONTAINER\"\n>  \n>  # Use the following command to debug the docker build locally:\n> -# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash daald/ubuntu32:xenial\n> -# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>\n> +# <host-user-id> must be 0 if podman is used in place of docker\n> +# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/sh \"$CI_CONTAINER\"\n> +# root@container:/# /usr/src/git/ci/run-$CI_TARGET-build.sh <host-user-id>\n>  \n>  container_cache_dir=/tmp/travis-cache\n>  \n> @@ -23,8 +30,8 @@ docker run \\\n>  \t--env cache_dir=\"$container_cache_dir\" \\\n>  \t--volume \"${PWD}:/usr/src/git\" \\\n>  \t--volume \"$cache_dir:$container_cache_dir\" \\\n> -\tdaald/ubuntu32:xenial \\\n> -\t/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)\n> +\t\"$CI_CONTAINER\" \\\n> +\t\"/usr/src/git/ci/run-$CI_TARGET-build.sh\" $(id -u $USER)\n>  \n>  check_unignored_build_artifacts\n>  \n> -- \n> 2.26.0.rc2.357.g1e1ba0441d\n> \n"},{"id":"394262","messageId":"xmqq4ku7d82k.fsf@gitster.c.googlers.com","threadId":"53103","inReplyTo":"cover.1585203294.git.congdanhqx@gmail.com","subject":"Re: [PATCH 0/3] add travis job for linux with musl libc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-29T05:49:23Z","receivedAt":"2020-03-29T05:49:28Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n\n> Recently, we've un-broken git for Linux with musl libc,\n> and we have a serie to fix false negative with busybox shell utils.\n>\n> There is a sample travis build for this serie applied on top of master:\n> https://travis-ci.org/github/sgn/git/builds/667111988\n>\n> And, after merging with my v4 to fix busybox false negative:\n> https://travis-ci.org/github/sgn/git/builds/667112197\n\nI have this topic near the tip of 'pu' and it seems to be finding\nissues not in your build with 'master'.  I'd expect that we'll be\nseeing patches to various parts of the system from you or others\nwith musl libc to correct them, after which we can merge the topic\ndown.\n\nThanks.\n"},{"id":"394263","messageId":"20200329063608.GA22082@danh.dev","threadId":"53103","inReplyTo":"20200328175329.GD2224@szeder.dev","subject":"Re: [PATCH 2/3] ci: refactor docker runner script","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-29T06:36:08Z","receivedAt":"2020-03-29T06:36:17Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-03-28 18:53:29+0100, SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> On Thu, Mar 26, 2020 at 02:35:18PM +0700, Đoàn Trần Công Danh wrote:\n> > We will support alpine check in docker later in this serie.\n> > \n> > While we're at it, tell people to run as root in podman.\n> \n> Why tell that to people?  Please clarify what podman is and why should\n> we care.\n\npodman is a docker drop-in placement.\nI use it instead of docker to develop this series.\n\ndocker requires a service to be run and user in docker system groups,\npodman requires neither.\n\nroot user in podman is mapped to host user.\nI run into trouble when develop this series in my local machine.\n\n> > Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> > ---\n> >  .travis.yml                                 |  2 +-\n> >  azure-pipelines.yml                         |  4 ++--\n> >  ci/{run-linux32-docker.sh => run-docker.sh} | 19 +++++++++++++------\n> >  3 files changed, 16 insertions(+), 9 deletions(-)\n> >  rename ci/{run-linux32-docker.sh => run-docker.sh} (48%)\n> > \n> > diff --git a/.travis.yml b/.travis.yml\n> > index fc5730b085..32e80e2670 100644\n> > --- a/.travis.yml\n> > +++ b/.travis.yml\n> > @@ -32,7 +32,7 @@ matrix:\n> >        services:\n> >          - docker\n> >        before_install:\n> > -      script: ci/run-linux32-docker.sh\n> > +      script: ci/run-docker.sh linux32\n> \n> The name of the 'Linux32' build job starts with a capital 'L'; please\n> be consistent with that.\n\nthe old name of the script is run-linux32-docker,\nI think it's better to rename the job to all lowercase.\nAll other jobs, except Documentation and static analysis are in\nlowercase.\n\n> \n> >      - env: jobname=StaticAnalysis\n> >        os: linux\n> >        compiler:\n> > diff --git a/azure-pipelines.yml b/azure-pipelines.yml\n> > index 675c3a43c9..ef504ff29f 100644\n> > --- a/azure-pipelines.yml\n> > +++ b/azure-pipelines.yml\n> > @@ -489,14 +489,14 @@ jobs:\n> >         test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n> >  \n> >         res=0\n> > -       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-linux32-docker.sh || res=1\n> > +       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-docker.sh linux32 || res=1\n> >  \n> >         sudo chmod a+r t/out/TEST-*.xml\n> >         test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n> >  \n> >         test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n> >         exit $res\n> > -    displayName: 'ci/run-linux32-docker.sh'\n> > +    displayName: 'ci/run-docker.sh linux32'\n> >      env:\n> >        GITFILESHAREPWD: $(gitfileshare.pwd)\n> >    - task: PublishTestResults@2\n> > diff --git a/ci/run-linux32-docker.sh b/ci/run-docker.sh\n> > similarity index 48%\n> > rename from ci/run-linux32-docker.sh\n> > rename to ci/run-docker.sh\n> > index 751acfcf8a..c8dff9d41a 100755\n> > --- a/ci/run-linux32-docker.sh\n> > +++ b/ci/run-docker.sh\n> > @@ -1,15 +1,22 @@\n> >  #!/bin/sh\n> >  #\n> > -# Download and run Docker image to build and test 32-bit Git\n> > +# Download and run Docker image to build and test git\n> \n> s/git/Git/\n\nWill change\n\n-- \nDanh\n"},{"id":"394265","messageId":"cover.1585474409.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585203294.git.congdanhqx@gmail.com","subject":"[PATCH v2 0/4] Travis + Azure jobs for linux with musl libc","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-29T10:12:28Z","receivedAt":"2020-03-29T10:12:52Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Recently, we've un-broken git for Linux with musl libc,\nand we have a serie to fix false negative with busybox shell utils.\n\nAdd a CI job on Travis and Azure to make sure we won't break it again.\n\nThere is a sample travis build for this serie applied on top of:\njt/rebase-allow-duplicate\nhttps://travis-ci.org/github/sgn/git/builds/668300819\n\nAnd, after merging with junio's pu to fix busybox false negative:\nhttps://travis-ci.org/github/sgn/git/builds/668300919\nhttps://dev.azure.com/git/git/_build/results?buildId=1910&view=results\n\nChange from v1:\n- fix spelling\n- run-docker.sh: use \"jobname\" environment variable instead of passing argument\n- add linux-musl job on Azure\n- Add 4th patch for jt/rebase-allow-duplicate (feel free to squash into\n jt/rebase-allow-duplicate)\n\nThe first 3 patches could be applied on top of master,\nbut the last patch needs to be applied on top of jt/rebase-allow-duplicate\n\n\nĐoàn Trần Công Danh (4):\n  ci: libify logic for usage and checking CI_USER\n  ci: refactor docker runner script\n  travis: build and test on Linux with musl libc and busybox\n  t3402: use POSIX compliant regex(7)\n\n .travis.yml                                 | 10 +++++-\n azure-pipelines.yml                         | 39 +++++++++++++++++++--\n ci/lib-docker.sh                            | 37 +++++++++++++++++++\n ci/run-alpine-build.sh                      | 31 ++++++++++++++++\n ci/{run-linux32-docker.sh => run-docker.sh} | 26 ++++++++++----\n ci/run-linux32-build.sh                     | 35 +-----------------\n t/t3402-rebase-merge.sh                     |  8 ++---\n 7 files changed, 139 insertions(+), 47 deletions(-)\n create mode 100644 ci/lib-docker.sh\n create mode 100755 ci/run-alpine-build.sh\n rename ci/{run-linux32-docker.sh => run-docker.sh} (46%)\n\nRange-diff against v1:\n1:  f23f2a563a = 1:  1ec7c2024d ci: libify logic for usage and checking CI_USER\n2:  6fd1370678 ! 2:  140e0ef390 ci: refactor docker runner script\n    @@ Metadata\n      ## Commit message ##\n         ci: refactor docker runner script\n     \n    -    We will support alpine check in docker later in this serie.\n    +    We will support alpine check in docker later in this series.\n     \n         While we're at it, tell people to run as root in podman.\n     \n    @@ .travis.yml: matrix:\n              - docker\n            before_install:\n     -      script: ci/run-linux32-docker.sh\n    -+      script: ci/run-docker.sh linux32\n    ++      script: ci/run-docker.sh\n          - env: jobname=StaticAnalysis\n            os: linux\n            compiler:\n    @@ azure-pipelines.yml: jobs:\n      \n             res=0\n     -       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-linux32-docker.sh || res=1\n    -+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-docker.sh linux32 || res=1\n    ++       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=Linux32 bash -lxc ci/run-docker.sh || res=1\n      \n             sudo chmod a+r t/out/TEST-*.xml\n             test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n    @@ azure-pipelines.yml: jobs:\n             test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n             exit $res\n     -    displayName: 'ci/run-linux32-docker.sh'\n    -+    displayName: 'ci/run-docker.sh linux32'\n    ++    displayName: 'jobname=Linux32 ci/run-docker.sh'\n          env:\n            GITFILESHAREPWD: $(gitfileshare.pwd)\n        - task: PublishTestResults@2\n    @@ ci/run-docker.sh (new)\n     @@\n     +#!/bin/sh\n     +#\n    -+# Download and run Docker image to build and test git\n    ++# Download and run Docker image to build and test Git\n     +#\n     +\n     +. ${0%/*}/lib.sh\n     +\n    -+CI_TARGET=${1:-linux32}\n    -+case \"$CI_TARGET\" in\n    -+linux32) CI_CONTAINER=\"daald/ubuntu32:xenial\" ;;\n    -+*)       exit 1 ;;\n    ++case \"$jobname\" in\n    ++Linux32)\n    ++\tCI_TARGET=linux32\n    ++\tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n    ++\t;;\n    ++*)\n    ++\texit 1 ;;\n     +esac\n     +\n     +docker pull \"$CI_CONTAINER\"\n3:  2f68e65fb7 ! 3:  6cf6400f2e travis: build and test on Linux with musl libc and busybox\n    @@ .travis.yml\n     @@ .travis.yml: matrix:\n              - docker\n            before_install:\n    -       script: ci/run-docker.sh linux32\n    -+    - env: jobname=linux-musl-busybox\n    +       script: ci/run-docker.sh\n    ++    - env: jobname=linux-musl\n     +      os: linux\n     +      compiler:\n     +      addons:\n     +      services:\n     +        - docker\n     +      before_install:\n    -+      script: ci/run-docker.sh alpine\n    ++      script: ci/run-docker.sh\n          - env: jobname=StaticAnalysis\n            os: linux\n            compiler:\n     \n    + ## azure-pipelines.yml ##\n    +@@ azure-pipelines.yml: jobs:\n    +       PathtoPublish: t/failed-test-artifacts\n    +       ArtifactName: failed-test-artifacts\n    + \n    ++- job: linux_musl\n    ++  displayName: linux-musl\n    ++  condition: succeeded()\n    ++  pool:\n    ++    vmImage: ubuntu-latest\n    ++  steps:\n    ++  - bash: |\n    ++       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n    ++\n    ++       res=0\n    ++       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=linux-musl bash -lxc ci/run-docker.sh || res=1\n    ++\n    ++       sudo chmod a+r t/out/TEST-*.xml\n    ++       test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n    ++\n    ++       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n    ++       exit $res\n    ++    displayName: 'jobname=linux-musl ci/run-docker.sh'\n    ++    env:\n    ++      GITFILESHAREPWD: $(gitfileshare.pwd)\n    ++  - task: PublishTestResults@2\n    ++    displayName: 'Publish Test Results **/TEST-*.xml'\n    ++    inputs:\n    ++      mergeTestResults: true\n    ++      testRunTitle: 'musl'\n    ++      platform: Linux\n    ++      publishRunAttachments: false\n    ++    condition: succeededOrFailed()\n    ++  - task: PublishBuildArtifacts@1\n    ++    displayName: 'Publish trash directories of failed tests'\n    ++    condition: failed()\n    ++    inputs:\n    ++      PathtoPublish: t/failed-test-artifacts\n    ++      ArtifactName: failed-test-artifacts\n    ++\n    + - job: static_analysis\n    +   displayName: StaticAnalysis\n    +   condition: succeeded()\n    +\n      ## ci/run-alpine-build.sh (new) ##\n     @@\n     +#!/bin/sh\n    @@ ci/run-alpine-build.sh (new)\n     +'\n     \n      ## ci/run-docker.sh ##\n    -@@\n    - CI_TARGET=${1:-linux32}\n    - case \"$CI_TARGET\" in\n    - linux32) CI_CONTAINER=\"daald/ubuntu32:xenial\" ;;\n    -+alpine)  CI_CONTAINER=\"alpine\" ;;\n    - *)       exit 1 ;;\n    +@@ ci/run-docker.sh: Linux32)\n    + \tCI_TARGET=linux32\n    + \tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n    + \t;;\n    ++linux-musl)\n    ++\tCI_TARGET=alpine\n    ++\tCI_CONTAINER=alpine\n    ++\t;;\n    + *)\n    + \texit 1 ;;\n      esac\n    - \n-:  ---------- > 4:  a4eacb4362 t3402: use POSIX compliant regex(7)\n-- \n2.26.0.302.g234993491e\n\n"},{"id":"394266","messageId":"1ec7c2024d60ce2b6888367fc48942e8febef15f.1585474409.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585474409.git.congdanhqx@gmail.com","subject":"[PATCH v2 1/4] ci: libify logic for usage and checking CI_USER","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-29T10:12:29Z","receivedAt":"2020-03-29T10:13:01Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"This part of logic will be reused for alpine docker later.\n\nMerge those logic into single chunk since they will be used together.\n\nWhile we're at it, add a comment to tell people run with root inside\npodman container.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/lib-docker.sh        | 37 +++++++++++++++++++++++++++++++++++++\n ci/run-linux32-build.sh | 35 +----------------------------------\n 2 files changed, 38 insertions(+), 34 deletions(-)\n create mode 100644 ci/lib-docker.sh\n\ndiff --git a/ci/lib-docker.sh b/ci/lib-docker.sh\nnew file mode 100644\nindex 0000000000..ac155ace54\n--- /dev/null\n+++ b/ci/lib-docker.sh\n@@ -0,0 +1,37 @@\n+# Library of functions shared by all CI scripts run inside docker\n+\n+if test $# -ne 1 || test -z \"$1\"\n+then\n+\techo >&2 \"usage: $0 <host-user-id>\"\n+\texit 1\n+fi\n+\n+# If this script runs inside a docker container, then all commands are\n+# usually executed as root. Consequently, the host user might not be\n+# able to access the test output files.\n+# If a non 0 host user id is given, then create a user \"ci\" with that\n+# user id to make everything accessible to the host user.\n+HOST_UID=$1\n+if test $HOST_UID -eq 0\n+then\n+\t# Just in case someone does want to run the test suite as root.\n+\t# or podman is used in place of docker\n+\tCI_USER=root\n+else\n+\tCI_USER=ci\n+\tif test \"$(id -u $CI_USER 2>/dev/null)\" = $HOST_UID\n+\tthen\n+\t\techo \"user '$CI_USER' already exists with the requested ID $HOST_UID\"\n+\telse\n+\t\tuseradd -u $HOST_UID $CI_USER\n+\tfi\n+\n+\t# Due to a bug the test suite was run as root in the past, so\n+\t# a prove state file created back then is only accessible by\n+\t# root.  Now that bug is fixed, the test suite is run as a\n+\t# regular user, but the prove state file coming from Travis\n+\t# CI's cache might still be owned by root.\n+\t# Make sure that this user has rights to any cached files,\n+\t# including an existing prove state file.\n+\ttest -n \"$cache_dir\" && chown -R $HOST_UID:$HOST_UID \"$cache_dir\"\n+fi\ndiff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh\nindex e3a193adbc..81296cdd19 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-linux32-build.sh\n@@ -8,11 +8,7 @@\n \n set -ex\n \n-if test $# -ne 1 || test -z \"$1\"\n-then\n-\techo >&2 \"usage: run-linux32-build.sh <host-user-id>\"\n-\texit 1\n-fi\n+. \"${0%/*}/lib-docker.sh\"\n \n # Update packages to the latest available versions\n linux32 --32bit i386 sh -c '\n@@ -21,35 +17,6 @@ linux32 --32bit i386 sh -c '\n \tlibexpat-dev gettext python >/dev/null\n '\n \n-# If this script runs inside a docker container, then all commands are\n-# usually executed as root. Consequently, the host user might not be\n-# able to access the test output files.\n-# If a non 0 host user id is given, then create a user \"ci\" with that\n-# user id to make everything accessible to the host user.\n-HOST_UID=$1\n-if test $HOST_UID -eq 0\n-then\n-\t# Just in case someone does want to run the test suite as root.\n-\tCI_USER=root\n-else\n-\tCI_USER=ci\n-\tif test \"$(id -u $CI_USER 2>/dev/null)\" = $HOST_UID\n-\tthen\n-\t\techo \"user '$CI_USER' already exists with the requested ID $HOST_UID\"\n-\telse\n-\t\tuseradd -u $HOST_UID $CI_USER\n-\tfi\n-\n-\t# Due to a bug the test suite was run as root in the past, so\n-\t# a prove state file created back then is only accessible by\n-\t# root.  Now that bug is fixed, the test suite is run as a\n-\t# regular user, but the prove state file coming from Travis\n-\t# CI's cache might still be owned by root.\n-\t# Make sure that this user has rights to any cached files,\n-\t# including an existing prove state file.\n-\ttest -n \"$cache_dir\" && chown -R $HOST_UID:$HOST_UID \"$cache_dir\"\n-fi\n-\n # Build and test\n linux32 --32bit i386 su -m -l $CI_USER -c '\n \tset -ex\n-- \n2.26.0.302.g234993491e\n\n"},{"id":"394267","messageId":"140e0ef39064d0194e05cad6d9f48e8e5b03aacc.1585474409.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585474409.git.congdanhqx@gmail.com","subject":"[PATCH v2 2/4] ci: refactor docker runner script","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-29T10:12:30Z","receivedAt":"2020-03-29T10:13:03Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"We will support alpine check in docker later in this series.\n\nWhile we're at it, tell people to run as root in podman.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml                                 |  2 +-\n azure-pipelines.yml                         |  4 ++--\n ci/{run-linux32-docker.sh => run-docker.sh} | 22 +++++++++++++++------\n 3 files changed, 19 insertions(+), 9 deletions(-)\n rename ci/{run-linux32-docker.sh => run-docker.sh} (48%)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex fc5730b085..069aeeff3c 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -32,7 +32,7 @@ matrix:\n       services:\n         - docker\n       before_install:\n-      script: ci/run-linux32-docker.sh\n+      script: ci/run-docker.sh\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/azure-pipelines.yml b/azure-pipelines.yml\nindex af2a5ea484..f6dcc35ad4 100644\n--- a/azure-pipelines.yml\n+++ b/azure-pipelines.yml\n@@ -478,14 +478,14 @@ jobs:\n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n \n        res=0\n-       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-linux32-docker.sh || res=1\n+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=Linux32 bash -lxc ci/run-docker.sh || res=1\n \n        sudo chmod a+r t/out/TEST-*.xml\n        test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n \n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n        exit $res\n-    displayName: 'ci/run-linux32-docker.sh'\n+    displayName: 'jobname=Linux32 ci/run-docker.sh'\n     env:\n       GITFILESHAREPWD: $(gitfileshare.pwd)\n   - task: PublishTestResults@2\ndiff --git a/ci/run-linux32-docker.sh b/ci/run-docker.sh\nsimilarity index 48%\nrename from ci/run-linux32-docker.sh\nrename to ci/run-docker.sh\nindex 751acfcf8a..be698817cb 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-docker.sh\n@@ -1,15 +1,25 @@\n #!/bin/sh\n #\n-# Download and run Docker image to build and test 32-bit Git\n+# Download and run Docker image to build and test Git\n #\n \n . ${0%/*}/lib.sh\n \n-docker pull daald/ubuntu32:xenial\n+case \"$jobname\" in\n+Linux32)\n+\tCI_TARGET=linux32\n+\tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n+\t;;\n+*)\n+\texit 1 ;;\n+esac\n+\n+docker pull \"$CI_CONTAINER\"\n \n # Use the following command to debug the docker build locally:\n-# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash daald/ubuntu32:xenial\n-# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>\n+# <host-user-id> must be 0 if podman is used in place of docker\n+# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/sh \"$CI_CONTAINER\"\n+# root@container:/# /usr/src/git/ci/run-$CI_TARGET-build.sh <host-user-id>\n \n container_cache_dir=/tmp/travis-cache\n \n@@ -23,8 +33,8 @@ docker run \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-\tdaald/ubuntu32:xenial \\\n-\t/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)\n+\t\"$CI_CONTAINER\" \\\n+\t\"/usr/src/git/ci/run-$CI_TARGET-build.sh\" $(id -u $USER)\n \n check_unignored_build_artifacts\n \n-- \n2.26.0.302.g234993491e\n\n"},{"id":"394268","messageId":"6cf6400f2e0f7336e9b13ddbf412101c4ab48dc5.1585474409.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585474409.git.congdanhqx@gmail.com","subject":"[PATCH v2 3/4] travis: build and test on Linux with musl libc and busybox","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-29T10:12:31Z","receivedAt":"2020-03-29T10:13:11Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml            |  8 ++++++++\n azure-pipelines.yml    | 35 +++++++++++++++++++++++++++++++++++\n ci/run-alpine-build.sh | 31 +++++++++++++++++++++++++++++++\n ci/run-docker.sh       |  4 ++++\n 4 files changed, 78 insertions(+)\n create mode 100755 ci/run-alpine-build.sh\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 069aeeff3c..0cfc3c3428 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -33,6 +33,14 @@ matrix:\n         - docker\n       before_install:\n       script: ci/run-docker.sh\n+    - env: jobname=linux-musl\n+      os: linux\n+      compiler:\n+      addons:\n+      services:\n+        - docker\n+      before_install:\n+      script: ci/run-docker.sh\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/azure-pipelines.yml b/azure-pipelines.yml\nindex f6dcc35ad4..615289167b 100644\n--- a/azure-pipelines.yml\n+++ b/azure-pipelines.yml\n@@ -503,6 +503,41 @@ jobs:\n       PathtoPublish: t/failed-test-artifacts\n       ArtifactName: failed-test-artifacts\n \n+- job: linux_musl\n+  displayName: linux-musl\n+  condition: succeeded()\n+  pool:\n+    vmImage: ubuntu-latest\n+  steps:\n+  - bash: |\n+       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n+\n+       res=0\n+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=linux-musl bash -lxc ci/run-docker.sh || res=1\n+\n+       sudo chmod a+r t/out/TEST-*.xml\n+       test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n+\n+       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n+       exit $res\n+    displayName: 'jobname=linux-musl ci/run-docker.sh'\n+    env:\n+      GITFILESHAREPWD: $(gitfileshare.pwd)\n+  - task: PublishTestResults@2\n+    displayName: 'Publish Test Results **/TEST-*.xml'\n+    inputs:\n+      mergeTestResults: true\n+      testRunTitle: 'musl'\n+      platform: Linux\n+      publishRunAttachments: false\n+    condition: succeededOrFailed()\n+  - task: PublishBuildArtifacts@1\n+    displayName: 'Publish trash directories of failed tests'\n+    condition: failed()\n+    inputs:\n+      PathtoPublish: t/failed-test-artifacts\n+      ArtifactName: failed-test-artifacts\n+\n - job: static_analysis\n   displayName: StaticAnalysis\n   condition: succeeded()\ndiff --git a/ci/run-alpine-build.sh b/ci/run-alpine-build.sh\nnew file mode 100755\nindex 0000000000..c83df536e4\n--- /dev/null\n+++ b/ci/run-alpine-build.sh\n@@ -0,0 +1,31 @@\n+#!/bin/sh\n+#\n+# Build and test Git in Alpine Linux\n+#\n+# Usage:\n+#   run-alpine-build.sh <host-user-id>\n+#\n+\n+set -ex\n+\n+useradd () {\n+\tadduser -D \"$@\"\n+}\n+\n+. \"${0%/*}/lib-docker.sh\"\n+\n+# Update packages to the latest available versions\n+apk add --update autoconf build-base curl-dev openssl-dev expat-dev \\\n+\tgettext pcre2-dev python3 musl-libintl >/dev/null\n+\n+# Build and test\n+su -m -l $CI_USER -c '\n+\tset -ex\n+\tcd /usr/src/git\n+\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n+\tautoconf\n+\techo \"PYTHON_PATH=/usr/bin/python3\" >config.mak\n+\t./configure --with-libpcre\n+\tmake\n+\tmake test\n+'\ndiff --git a/ci/run-docker.sh b/ci/run-docker.sh\nindex be698817cb..f203db03cf 100755\n--- a/ci/run-docker.sh\n+++ b/ci/run-docker.sh\n@@ -10,6 +10,10 @@ Linux32)\n \tCI_TARGET=linux32\n \tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n \t;;\n+linux-musl)\n+\tCI_TARGET=alpine\n+\tCI_CONTAINER=alpine\n+\t;;\n *)\n \texit 1 ;;\n esac\n-- \n2.26.0.302.g234993491e\n\n"},{"id":"394269","messageId":"a4eacb4362f29857bb40907e6326d1b0c12d3eb6.1585474409.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585474409.git.congdanhqx@gmail.com","subject":"[PATCH v2 4/4] t3402: use POSIX compliant regex(7)","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-03-29T10:12:33Z","receivedAt":"2020-03-29T10:13:52Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"`\\?` is undefined for POSIX BRE, from:\nhttps://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_03_02\n\n> The interpretation of an ordinary character preceded\n> by an unescaped <backslash> ( '\\\\' ) is undefined, except for:\n> - The characters ')', '(', '{', and '}'\n> - The digits 1 to 9 inclusive\n> - A character inside a bracket expression\n\nThis test is failing with busybox grep.\n\nFix it by using character class.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\nNeeds to be applied on top of jt/rebase-allow-duplicate \n\nCc: Jonathan Tan <jonathantanmy@google.com>\n\n t/t3402-rebase-merge.sh | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t3402-rebase-merge.sh b/t/t3402-rebase-merge.sh\nindex 290c79e0f6..e8bab8102d 100755\n--- a/t/t3402-rebase-merge.sh\n+++ b/t/t3402-rebase-merge.sh\n@@ -228,15 +228,15 @@ test_expect_success '--skip-cherry-pick-detection refrains from reading unneeded\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\n \tMERGE_BASE_BLOB=$(git -C server rev-parse master^^:file.txt) &&\n \tADD_11_BLOB=$(git -C server rev-parse master^:file.txt) &&\n-\tgrep \"\\\\?$MERGE_BASE_BLOB\" missing_list &&\n-\tgrep \"\\\\?$ADD_11_BLOB\" missing_list &&\n+\tgrep \"[?]$MERGE_BASE_BLOB\" missing_list &&\n+\tgrep \"[?]$ADD_11_BLOB\" missing_list &&\n \n \tgit -C client rebase --merge --skip-cherry-pick-detection origin/master &&\n \n \t# The blob from the merge base had to be fetched, but not \"add 11\"\n \tgit -C client rev-list --objects --all --missing=print >missing_list &&\n-\t! grep \"\\\\?$MERGE_BASE_BLOB\" missing_list &&\n-\tgrep \"\\\\?$ADD_11_BLOB\" missing_list\n+\t! grep \"[?]$MERGE_BASE_BLOB\" missing_list &&\n+\tgrep \"[?]$ADD_11_BLOB\" missing_list\n '\n \n test_done\n-- \n2.26.0.302.g234993491e\n\n"},{"id":"394290","messageId":"xmqqmu7zb04q.fsf@gitster.c.googlers.com","threadId":"53103","inReplyTo":"cover.1585474409.git.congdanhqx@gmail.com","subject":"Re: [PATCH v2 0/4] Travis + Azure jobs for linux with musl libc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-03-29T16:23:49Z","receivedAt":"2020-03-29T16:23:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n\n> Change from v1:\n> - fix spelling\n> - run-docker.sh: use \"jobname\" environment variable instead of passing argument\n> - add linux-musl job on Azure\n> - Add 4th patch for jt/rebase-allow-duplicate (feel free to squash into\n>  jt/rebase-allow-duplicate)\n>\n> The first 3 patches could be applied on top of master,\n> but the last patch needs to be applied on top of jt/rebase-allow-duplicate\n\nThis note was very helpful.  Very much appreciated.\n\nPlease keep this a three-patch series ([1/4], [2/4] and [3/4] become\n[1/3], [2/3] and [3/3]), and make the fourth one a separate fix to\nthe other topic.  Even if we were not going to take this topic, the\nlast one is an independently useful improvement.\n\nI'll update jt/rebase-allow-duplicate with the last one, so no real\nharm done, but keeping the topics separate on the list would help\nreduce confusion.\n\nThanks.\n"},{"id":"394530","messageId":"20200401215121.GG2224@szeder.dev","threadId":"53103","inReplyTo":"140e0ef39064d0194e05cad6d9f48e8e5b03aacc.1585474409.git.congdanhqx@gmail.com","subject":"Re: [PATCH v2 2/4] ci: refactor docker runner script","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2020-04-01T21:51:21Z","receivedAt":"2020-04-01T21:51:27Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sun, Mar 29, 2020 at 05:12:30PM +0700, Đoàn Trần Công Danh wrote:\n> We will support alpine check in docker later in this series.\n> \n> While we're at it, tell people to run as root in podman.\n\nOk, I'll try to be more specific :)\n\nPlease clarify *in the commit message* why we should tell this to\npeople, i.e. what podman is and why should we care.\n\n"},{"id":"394531","messageId":"20200401221835.GH2224@szeder.dev","threadId":"53103","inReplyTo":"6cf6400f2e0f7336e9b13ddbf412101c4ab48dc5.1585474409.git.congdanhqx@gmail.com","subject":"Re: [PATCH v2 3/4] travis: build and test on Linux with musl libc and busybox","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2020-04-01T22:18:35Z","receivedAt":"2020-04-01T22:18:41Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Sun, Mar 29, 2020 at 05:12:31PM +0700, Đoàn Trần Công Danh wrote:\n> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n\n> diff --git a/ci/run-alpine-build.sh b/ci/run-alpine-build.sh\n> new file mode 100755\n> index 0000000000..c83df536e4\n> --- /dev/null\n> +++ b/ci/run-alpine-build.sh\n> @@ -0,0 +1,31 @@\n> +#!/bin/sh\n> +#\n> +# Build and test Git in Alpine Linux\n> +#\n> +# Usage:\n> +#   run-alpine-build.sh <host-user-id>\n> +#\n> +\n> +set -ex\n> +\n> +useradd () {\n> +\tadduser -D \"$@\"\n> +}\n> +\n> +. \"${0%/*}/lib-docker.sh\"\n> +\n> +# Update packages to the latest available versions\n> +apk add --update autoconf build-base curl-dev openssl-dev expat-dev \\\n> +\tgettext pcre2-dev python3 musl-libintl >/dev/null\n\nIn 'ci/run-docker.sh' we run 'docker run' with a bunch of '--env ...'\noptions to make some important environment variables available\ninside the container.  At this point in this script all those\nvariables are set to the expected values, but ...\n\n> +# Build and test\n> +su -m -l $CI_USER -c '\n\n... but here, for some reason, those environment variables are not set\nanymore.  This is bad, because this CI job then builds Git\nsequentially, runs the tests sequentially, runs the tests with 'make'\ninstead of 'prove', and runs the tests without '-V -x'.  IOW, it's\nslow, it produces a lot of useless output, it doesn't report all the\nfailures, and doesn't tell us anything about the failures.\n\n> +\tset -ex\n> +\tcd /usr/src/git\n> +\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n> +\tautoconf\n> +\techo \"PYTHON_PATH=/usr/bin/python3\" >config.mak\n> +\t./configure --with-libpcre\n\nThe recommended way to build Git is without autoconf and configure.\nYou can set the PYTHON_PATH and USE_LIBPCRE Makefile knobs in\nMAKEFLAGS in 'ci/lib.sh', but to be able to access MAKEFLAGS in the\ncontainer you'll need to build this patch series on top of:\n\n  https://public-inbox.org/git/20200401212151.15164-1-szeder.dev@gmail.com/\n\n> +\tmake\n> +\tmake test\n> +'\n> diff --git a/ci/run-docker.sh b/ci/run-docker.sh\n> index be698817cb..f203db03cf 100755\n> --- a/ci/run-docker.sh\n> +++ b/ci/run-docker.sh\n> @@ -10,6 +10,10 @@ Linux32)\n>  \tCI_TARGET=linux32\n>  \tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n>  \t;;\n> +linux-musl)\n> +\tCI_TARGET=alpine\n> +\tCI_CONTAINER=alpine\n> +\t;;\n>  *)\n>  \texit 1 ;;\n>  esac\n> -- \n> 2.26.0.302.g234993491e\n> \n"},{"id":"394540","messageId":"20200402014202.GC2764@danh.dev","threadId":"53103","inReplyTo":"20200401221835.GH2224@szeder.dev","subject":"Re: [PATCH v2 3/4] travis: build and test on Linux with musl libc and busybox","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T01:42:02Z","receivedAt":"2020-04-02T01:42:08Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-04-02 00:18:35+0200, SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> On Sun, Mar 29, 2020 at 05:12:31PM +0700, Đoàn Trần Công Danh wrote:\n> > Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> \n> > diff --git a/ci/run-alpine-build.sh b/ci/run-alpine-build.sh\n> > new file mode 100755\n> > index 0000000000..c83df536e4\n> > --- /dev/null\n> > +++ b/ci/run-alpine-build.sh\n> > @@ -0,0 +1,31 @@\n> > +#!/bin/sh\n> > +#\n> > +# Build and test Git in Alpine Linux\n> > +#\n> > +# Usage:\n> > +#   run-alpine-build.sh <host-user-id>\n> > +#\n> > +\n> > +set -ex\n> > +\n> > +useradd () {\n> > +\tadduser -D \"$@\"\n> > +}\n> > +\n> > +. \"${0%/*}/lib-docker.sh\"\n> > +\n> > +# Update packages to the latest available versions\n> > +apk add --update autoconf build-base curl-dev openssl-dev expat-dev \\\n> > +\tgettext pcre2-dev python3 musl-libintl >/dev/null\n> \n> In 'ci/run-docker.sh' we run 'docker run' with a bunch of '--env ...'\n> options to make some important environment variables available\n> inside the container.  At this point in this script all those\n> variables are set to the expected values, but ...\n> \n> > +# Build and test\n> > +su -m -l $CI_USER -c '\n> \n> ... but here, for some reason, those environment variables are not set\n> anymore.  This is bad, because this CI job then builds Git\n> sequentially, runs the tests sequentially, runs the tests with 'make'\n> instead of 'prove', and runs the tests without '-V -x'.  IOW, it's\n> slow, it produces a lot of useless output, it doesn't report all the\n> failures, and doesn't tell us anything about the failures.\n\nAt this point, I tempted to change this to\n\n\tsu -m -l $CI_USER -c /usr/src/git/ci/run-build-and-tests.sh\n\ninstead.\n\nBut, after digging into ci/lib.sh, I found too many setup for \"$CI_*\",\nlet choose your path instead.\n\n> > +\tset -ex\n> > +\tcd /usr/src/git\n> > +\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n> > +\tautoconf\n> > +\techo \"PYTHON_PATH=/usr/bin/python3\" >config.mak\n> > +\t./configure --with-libpcre\n> \n> The recommended way to build Git is without autoconf and configure.\n> You can set the PYTHON_PATH and USE_LIBPCRE Makefile knobs in\n> MAKEFLAGS in 'ci/lib.sh', but to be able to access MAKEFLAGS in the\n> container you'll need to build this patch series on top of:\n> \n>   https://public-inbox.org/git/20200401212151.15164-1-szeder.dev@gmail.com/\n> \n> > +\tmake\n> > +\tmake test\n> > +'\n> > diff --git a/ci/run-docker.sh b/ci/run-docker.sh\n> > index be698817cb..f203db03cf 100755\n> > --- a/ci/run-docker.sh\n> > +++ b/ci/run-docker.sh\n> > @@ -10,6 +10,10 @@ Linux32)\n> >  \tCI_TARGET=linux32\n> >  \tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n> >  \t;;\n> > +linux-musl)\n> > +\tCI_TARGET=alpine\n> > +\tCI_CONTAINER=alpine\n> > +\t;;\n> >  *)\n> >  \texit 1 ;;\n> >  esac\n> > -- \n> > 2.26.0.302.g234993491e\n> > \n\n-- \nDanh\n"},{"id":"394567","messageId":"cover.1585832270.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585474409.git.congdanhqx@gmail.com","subject":"[PATCH v3 0/6] Travis + Azure jobs for linux with musl libc","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T13:03:59Z","receivedAt":"2020-04-02T13:04:21Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Recently, we've un-broken git for Linux with musl libc,\nand we have a serie to fix false negative with busybox shell utils.\n\nAdd a CI job on Travis and Azure to make sure we won't break it again.\n\nThis is a nearly rewrite of this series, because there're GitHub Action\nallow running directly inside container.\n\n=> I rewrite this series to prepare as much as possible for the GitHub\nAction series.\n=> No range-diff\n\nThe first patch is coming from Szeder, Junio hasn't picked it up yet.\nAnd, this series depends on it.\n\nSample build without busybox fix series:\nhttps://travis-ci.org/github/sgn/git/builds/670097222\n\nWith busybox fix:\nhttps://travis-ci.org/github/sgn/git/builds/670103249\n\n\nSZEDER Gábor (1):\n  ci: make MAKEFLAGS available inside the Docker container in the\n    Linux32 job\n\nĐoàn Trần Công Danh (5):\n  ci/lib-docker: preserve required environment variables\n  ci/linux32: parameterise command to switch arch\n  ci: refactor docker runner script\n  ci/linux32: libify install-dependencies step\n  travis: build and test on Linux with musl libc and busybox\n\n .travis.yml                                   | 10 ++++-\n azure-pipelines.yml                           | 39 ++++++++++++++++++-\n ci/install-docker-dependencies.sh             | 18 +++++++++\n ci/lib.sh                                     |  8 ++++\n ...n-linux32-build.sh => run-docker-build.sh} | 39 +++++++++++++------\n ci/{run-linux32-docker.sh => run-docker.sh}   | 28 ++++++++++---\n 6 files changed, 121 insertions(+), 21 deletions(-)\n create mode 100755 ci/install-docker-dependencies.sh\n rename ci/{run-linux32-build.sh => run-docker-build.sh} (63%)\n rename ci/{run-linux32-docker.sh => run-docker.sh} (43%)\n\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394568","messageId":"2fdce60075935f8ff94bc117747f1768f41ed435.1585832270.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585832270.git.congdanhqx@gmail.com","subject":"[PATCH v3 1/6] ci: make MAKEFLAGS available inside the Docker container in the Linux32 job","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T13:04:00Z","receivedAt":"2020-04-02T13:04:36Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"From: SZEDER Gábor <szeder.dev@gmail.com>\n\nOnce upon a time we ran 'make --jobs=2 ...' to build Git, its\ndocumentation, or to apply Coccinelle semantic patches.  Then commit\neaa62291ff (ci: inherit --jobs via MAKEFLAGS in run-build-and-tests,\n2019-01-27) came along, and started using the MAKEFLAGS environment\nvariable to centralize setting the number of parallel jobs in\n'ci/libs.sh'.  Alas, it forgot to update 'ci/run-linux32-docker.sh' to\nmake MAKEFLAGS available inside the Docker container running the 32\nbit Linux job, and, consequently, since then that job builds Git\nsequentially, and it ignores any Makefile knobs that we might set in\nMAKEFLAGS (though we don't set any for the 32 bit Linux job at the\nmoment).\n\nSo update the 'docker run' invocation in 'ci/run-linux32-docker.sh' to\nmake MAKEFLAGS available inside the Docker container as well.  Set\nCC=gcc for the 32 bit Linux job, because that's the compiler installed\nin the 32 bit Linux Docker image that we use (Travis CI nowadays sets\nCC=clang by default, but clang is not installed in this image).\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/lib.sh                | 3 +++\n ci/run-linux32-docker.sh | 1 +\n 2 files changed, 4 insertions(+)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex c3a8cd2104..d637825222 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -198,6 +198,9 @@ osx-clang|osx-gcc)\n GIT_TEST_GETTEXT_POISON)\n \texport GIT_TEST_GETTEXT_POISON=true\n \t;;\n+Linux32)\n+\tCC=gcc\n+\t;;\n esac\n \n MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\ndiff --git a/ci/run-linux32-docker.sh b/ci/run-linux32-docker.sh\nindex 751acfcf8a..ebb18fa747 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-linux32-docker.sh\n@@ -20,6 +20,7 @@ docker run \\\n \t--env GIT_PROVE_OPTS \\\n \t--env GIT_TEST_OPTS \\\n \t--env GIT_TEST_CLONE_2GB \\\n+\t--env MAKEFLAGS \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394569","messageId":"b7b079f559a17b6d6cef037afd6ce023df8f90b0.1585832270.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585832270.git.congdanhqx@gmail.com","subject":"[PATCH v3 2/6] ci/lib-docker: preserve required environment variables","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T13:04:01Z","receivedAt":"2020-04-02T13:04:41Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"We're using \"su -m\" to preserve environment variables in the shell run\nby \"su\". But, that options will be ignored while \"-l\" (aka \"--login\") is\nspecified.\n\nSince we don't have interest in all environment variables,\npass only those necessary variables to the inner script.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/run-linux32-build.sh | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh\nindex e3a193adbc..7f985615c2 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-linux32-build.sh\n@@ -51,10 +51,17 @@ else\n fi\n \n # Build and test\n-linux32 --32bit i386 su -m -l $CI_USER -c '\n+linux32 --32bit i386 su -m -l $CI_USER -c \"\n \tset -ex\n+\texport DEVELOPER='$DEVELOPER'\n+\texport DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'\n+\texport GIT_PROVE_OPTS='$GIT_PROVE_OPTS'\n+\texport GIT_TEST_OPTS='$GIT_TEST_OPTS'\n+\texport GIT_TEST_CLONE_2GB='$GIT_TEST_CLONE_2GB'\n+\texport MAKEFLAGS='$MAKEFLAGS'\n+\texport cache_dir='$cache_dir'\n \tcd /usr/src/git\n-\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n+\ttest -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove\n \tmake\n \tmake test\n-'\n+\"\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394570","messageId":"8c8cf3eb24d3099fcf95807a10c5e1b9b0256a98.1585832270.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585832270.git.congdanhqx@gmail.com","subject":"[PATCH v3 3/6] ci/linux32: parameterise command to switch arch","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T13:04:02Z","receivedAt":"2020-04-02T13:04:45Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"In a later patch, the remaining of this command will be re-used for the\nCI job for linux with musl libc.\n\nAllow customisation of the emulator, now.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/run-linux32-build.sh  | 13 +++++++++++--\n ci/run-linux32-docker.sh |  2 ++\n 2 files changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh\nindex 7f985615c2..44bb332f64 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-linux32-build.sh\n@@ -14,8 +14,17 @@ then\n \texit 1\n fi\n \n+case \"$jobname\" in\n+Linux32)\n+\tswitch_cmd=\"linux32 --32bit i386\"\n+\t;;\n+*)\n+\texit 1\n+\t;;\n+esac\n+\n # Update packages to the latest available versions\n-linux32 --32bit i386 sh -c '\n+command $switch_cmd sh -c '\n     apt update >/dev/null &&\n     apt install -y build-essential libcurl4-openssl-dev libssl-dev \\\n \tlibexpat-dev gettext python >/dev/null\n@@ -51,7 +60,7 @@ else\n fi\n \n # Build and test\n-linux32 --32bit i386 su -m -l $CI_USER -c \"\n+command $switch_cmd su -m -l $CI_USER -c \"\n \tset -ex\n \texport DEVELOPER='$DEVELOPER'\n \texport DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'\ndiff --git a/ci/run-linux32-docker.sh b/ci/run-linux32-docker.sh\nindex ebb18fa747..54186b6aa7 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-linux32-docker.sh\n@@ -9,6 +9,7 @@ docker pull daald/ubuntu32:xenial\n \n # Use the following command to debug the docker build locally:\n # $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash daald/ubuntu32:xenial\n+# root@container:/# export jobname=<jobname>\n # root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>\n \n container_cache_dir=/tmp/travis-cache\n@@ -21,6 +22,7 @@ docker run \\\n \t--env GIT_TEST_OPTS \\\n \t--env GIT_TEST_CLONE_2GB \\\n \t--env MAKEFLAGS \\\n+\t--env jobname \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394571","messageId":"22cc7960c3a3a74ad3cd8e7e9ea36d3952249702.1585832270.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585832270.git.congdanhqx@gmail.com","subject":"[PATCH v3 4/6] ci: refactor docker runner script","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T13:04:03Z","receivedAt":"2020-04-02T13:04:46Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"We will support alpine check in docker later in this series.\n\nWhile we're at it, tell people to run as root in podman,\nif podman is used as drop-in replacement for docker,\nbecause podman will map host-user to container's root,\ntherefore, mapping their permission.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml                                   |  2 +-\n azure-pipelines.yml                           |  4 ++--\n ...n-linux32-build.sh => run-docker-build.sh} |  6 ++---\n ci/{run-linux32-docker.sh => run-docker.sh}   | 22 ++++++++++++++-----\n 4 files changed, 22 insertions(+), 12 deletions(-)\n rename ci/{run-linux32-build.sh => run-docker-build.sh} (93%)\n rename ci/{run-linux32-docker.sh => run-docker.sh} (53%)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex fc5730b085..069aeeff3c 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -32,7 +32,7 @@ matrix:\n       services:\n         - docker\n       before_install:\n-      script: ci/run-linux32-docker.sh\n+      script: ci/run-docker.sh\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/azure-pipelines.yml b/azure-pipelines.yml\nindex 675c3a43c9..11413f66f8 100644\n--- a/azure-pipelines.yml\n+++ b/azure-pipelines.yml\n@@ -489,14 +489,14 @@ jobs:\n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n \n        res=0\n-       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-linux32-docker.sh || res=1\n+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=Linux32 bash -lxc ci/run-docker.sh || res=1\n \n        sudo chmod a+r t/out/TEST-*.xml\n        test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n \n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n        exit $res\n-    displayName: 'ci/run-linux32-docker.sh'\n+    displayName: 'jobname=Linux32 ci/run-docker.sh'\n     env:\n       GITFILESHAREPWD: $(gitfileshare.pwd)\n   - task: PublishTestResults@2\ndiff --git a/ci/run-linux32-build.sh b/ci/run-docker-build.sh\nsimilarity index 93%\nrename from ci/run-linux32-build.sh\nrename to ci/run-docker-build.sh\nindex 44bb332f64..a05b48c559 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-docker-build.sh\n@@ -1,16 +1,16 @@\n #!/bin/sh\n #\n-# Build and test Git in a 32-bit environment\n+# Build and test Git inside container\n #\n # Usage:\n-#   run-linux32-build.sh <host-user-id>\n+#   run-docker-build.sh <host-user-id>\n #\n \n set -ex\n \n if test $# -ne 1 || test -z \"$1\"\n then\n-\techo >&2 \"usage: run-linux32-build.sh <host-user-id>\"\n+\techo >&2 \"usage: run-docker-build.sh <host-user-id>\"\n \texit 1\n fi\n \ndiff --git a/ci/run-linux32-docker.sh b/ci/run-docker.sh\nsimilarity index 53%\nrename from ci/run-linux32-docker.sh\nrename to ci/run-docker.sh\nindex 54186b6aa7..3881f99b53 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-docker.sh\n@@ -1,16 +1,26 @@\n #!/bin/sh\n #\n-# Download and run Docker image to build and test 32-bit Git\n+# Download and run Docker image to build and test Git\n #\n \n . ${0%/*}/lib.sh\n \n-docker pull daald/ubuntu32:xenial\n+case \"$jobname\" in\n+Linux32)\n+\tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n+\t;;\n+*)\n+\texit 1\n+\t;;\n+esac\n+\n+docker pull \"$CI_CONTAINER\"\n \n # Use the following command to debug the docker build locally:\n-# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash daald/ubuntu32:xenial\n+# <host-user-id> must be 0 if podman is used as drop-in replacement for docker\n+# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/sh \"$CI_CONTAINER\"\n # root@container:/# export jobname=<jobname>\n-# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>\n+# root@container:/# /usr/src/git/ci/run-docker-build.sh <host-user-id>\n \n container_cache_dir=/tmp/travis-cache\n \n@@ -26,8 +36,8 @@ docker run \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-\tdaald/ubuntu32:xenial \\\n-\t/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)\n+\t\"$CI_CONTAINER\" \\\n+\t/usr/src/git/ci/run-docker-build.sh $(id -u $USER)\n \n check_unignored_build_artifacts\n \n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394572","messageId":"2e0d54f81e4b997fd469cb6c0d04820140079a7c.1585832270.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585832270.git.congdanhqx@gmail.com","subject":"[PATCH v3 5/6] ci/linux32: libify install-dependencies step","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T13:04:04Z","receivedAt":"2020-04-02T13:04:48Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"In a later patch, we will add new Travis Job for linux-musl.\nMost of other code in this file could be reuse for that job.\n\nMove the code to install dependencies to a common script.\nShould we add new CI system that can run directly in container,\nwe can reuse this script for installation step.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/install-docker-dependencies.sh | 14 ++++++++++++++\n ci/run-docker-build.sh            |  7 +------\n 2 files changed, 15 insertions(+), 6 deletions(-)\n create mode 100755 ci/install-docker-dependencies.sh\n\ndiff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh\nnew file mode 100755\nindex 0000000000..a104c61d29\n--- /dev/null\n+++ b/ci/install-docker-dependencies.sh\n@@ -0,0 +1,14 @@\n+#!/bin/sh\n+#\n+# Install dependencies required to build and test Git inside container\n+#\n+\n+case \"$jobname\" in\n+Linux32)\n+\tlinux32 --32bit i386 sh -c '\n+\t\tapt update >/dev/null &&\n+\t\tapt install -y build-essential libcurl4-openssl-dev \\\n+\t\t\tlibssl-dev libexpat-dev gettext python >/dev/null\n+\t'\n+\t;;\n+esac\ndiff --git a/ci/run-docker-build.sh b/ci/run-docker-build.sh\nindex a05b48c559..4a153492ba 100755\n--- a/ci/run-docker-build.sh\n+++ b/ci/run-docker-build.sh\n@@ -23,12 +23,7 @@ Linux32)\n \t;;\n esac\n \n-# Update packages to the latest available versions\n-command $switch_cmd sh -c '\n-    apt update >/dev/null &&\n-    apt install -y build-essential libcurl4-openssl-dev libssl-dev \\\n-\tlibexpat-dev gettext python >/dev/null\n-'\n+\"${0%/*}/install-docker-dependencies.sh\"\n \n # If this script runs inside a docker container, then all commands are\n # usually executed as root. Consequently, the host user might not be\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394573","messageId":"b61ed50cf63371858c74efc19797342107fdff3d.1585832270.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585832270.git.congdanhqx@gmail.com","subject":"[PATCH v3 6/6] travis: build and test on Linux with musl libc and busybox","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-02T13:04:05Z","receivedAt":"2020-04-02T13:04:51Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml                       |  8 +++++++\n azure-pipelines.yml               | 35 +++++++++++++++++++++++++++++++\n ci/install-docker-dependencies.sh |  4 ++++\n ci/lib.sh                         |  5 +++++\n ci/run-docker-build.sh            |  4 ++++\n ci/run-docker.sh                  |  3 +++\n 6 files changed, 59 insertions(+)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 069aeeff3c..0cfc3c3428 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -33,6 +33,14 @@ matrix:\n         - docker\n       before_install:\n       script: ci/run-docker.sh\n+    - env: jobname=linux-musl\n+      os: linux\n+      compiler:\n+      addons:\n+      services:\n+        - docker\n+      before_install:\n+      script: ci/run-docker.sh\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/azure-pipelines.yml b/azure-pipelines.yml\nindex 11413f66f8..84ecad76ec 100644\n--- a/azure-pipelines.yml\n+++ b/azure-pipelines.yml\n@@ -514,6 +514,41 @@ jobs:\n       PathtoPublish: t/failed-test-artifacts\n       ArtifactName: failed-test-artifacts\n \n+- job: linux_musl\n+  displayName: linux-musl\n+  condition: succeeded()\n+  pool:\n+    vmImage: ubuntu-latest\n+  steps:\n+  - bash: |\n+       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n+\n+       res=0\n+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=linux-musl bash -lxc ci/run-docker.sh || res=1\n+\n+       sudo chmod a+r t/out/TEST-*.xml\n+       test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n+\n+       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n+       exit $res\n+    displayName: 'jobname=linux-musl ci/run-docker.sh'\n+    env:\n+      GITFILESHAREPWD: $(gitfileshare.pwd)\n+  - task: PublishTestResults@2\n+    displayName: 'Publish Test Results **/TEST-*.xml'\n+    inputs:\n+      mergeTestResults: true\n+      testRunTitle: 'musl'\n+      platform: Linux\n+      publishRunAttachments: false\n+    condition: succeededOrFailed()\n+  - task: PublishBuildArtifacts@1\n+    displayName: 'Publish trash directories of failed tests'\n+    condition: failed()\n+    inputs:\n+      PathtoPublish: t/failed-test-artifacts\n+      ArtifactName: failed-test-artifacts\n+\n - job: static_analysis\n   displayName: StaticAnalysis\n   condition: succeeded()\ndiff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh\nindex a104c61d29..26a6689766 100755\n--- a/ci/install-docker-dependencies.sh\n+++ b/ci/install-docker-dependencies.sh\n@@ -11,4 +11,8 @@ Linux32)\n \t\t\tlibssl-dev libexpat-dev gettext python >/dev/null\n \t'\n \t;;\n+linux-musl)\n+\tapk add --update build-base curl-dev openssl-dev expat-dev gettext \\\n+\t\tpcre2-dev python3 musl-libintl perl-utils ncurses >/dev/null\n+\t;;\n esac\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex d637825222..87cd29bab6 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -201,6 +201,11 @@ GIT_TEST_GETTEXT_POISON)\n Linux32)\n \tCC=gcc\n \t;;\n+linux-musl)\n+\tCC=gcc\n+\tMAKEFLAGS=\"$MAKEFLAGS PYTHON_PATH=/usr/bin/python3 USE_LIBPCRE2=Yes\"\n+\tMAKEFLAGS=\"$MAKEFLAGS NO_REGEX=Yes ICONV_OMITS_BOM=Yes\"\n+\t;;\n esac\n \n MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\ndiff --git a/ci/run-docker-build.sh b/ci/run-docker-build.sh\nindex 4a153492ba..8d47a5fda3 100755\n--- a/ci/run-docker-build.sh\n+++ b/ci/run-docker-build.sh\n@@ -18,6 +18,10 @@ case \"$jobname\" in\n Linux32)\n \tswitch_cmd=\"linux32 --32bit i386\"\n \t;;\n+linux-musl)\n+\tswitch_cmd=\n+\tuseradd () { adduser -D \"$@\"; }\n+\t;;\n *)\n \texit 1\n \t;;\ndiff --git a/ci/run-docker.sh b/ci/run-docker.sh\nindex 3881f99b53..37fa372052 100755\n--- a/ci/run-docker.sh\n+++ b/ci/run-docker.sh\n@@ -9,6 +9,9 @@ case \"$jobname\" in\n Linux32)\n \tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n \t;;\n+linux-musl)\n+\tCI_CONTAINER=alpine\n+\t;;\n *)\n \texit 1\n \t;;\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394614","messageId":"xmqqsghl3hb4.fsf@gitster.c.googlers.com","threadId":"53103","inReplyTo":"cover.1585832270.git.congdanhqx@gmail.com","subject":"Re: [PATCH v3 0/6] Travis + Azure jobs for linux with musl libc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-02T17:53:35Z","receivedAt":"2020-04-02T17:53:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n\n> This is a nearly rewrite of this series, because there're GitHub Action\n> allow running directly inside container.\n>\n> => I rewrite this series to prepare as much as possible for the GitHub\n> Action series.\n> ...\n>  .travis.yml                                   | 10 ++++-\n>  azure-pipelines.yml                           | 39 ++++++++++++++++++-\n>  ci/install-docker-dependencies.sh             | 18 +++++++++\n>  ci/lib.sh                                     |  8 ++++\n>  ...n-linux32-build.sh => run-docker-build.sh} | 39 +++++++++++++------\n>  ci/{run-linux32-docker.sh => run-docker.sh}   | 28 ++++++++++---\n>  6 files changed, 121 insertions(+), 21 deletions(-)\n>  create mode 100755 ci/install-docker-dependencies.sh\n>  rename ci/{run-linux32-build.sh => run-docker-build.sh} (63%)\n>  rename ci/{run-linux32-docker.sh => run-docker.sh} (43%)\n\nThanks.  The above diffstat makes me wonder if it makes more sense\nto do the topic from Dscho first to migrate existing CI targets to\nGitHub Actions and then add musl job to the ci suite on top?  That\nway, we won't have to worry about azure-pipelines.yml at all here.\n\n\n\n"},{"id":"394634","messageId":"20200403002324.GA29543@danh.dev","threadId":"53103","inReplyTo":"xmqqsghl3hb4.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v3 0/6] Travis + Azure jobs for linux with musl libc","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-03T00:23:24Z","receivedAt":"2020-04-03T00:23:31Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-04-02 10:53:35-0700, Junio C Hamano <gitster@pobox.com> wrote:\n> Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n> \n> > This is a nearly rewrite of this series, because there're GitHub Action\n> > allow running directly inside container.\n> >\n> > => I rewrite this series to prepare as much as possible for the GitHub\n> > Action series.\n> > ...\n> >  .travis.yml                                   | 10 ++++-\n> >  azure-pipelines.yml                           | 39 ++++++++++++++++++-\n> >  ci/install-docker-dependencies.sh             | 18 +++++++++\n> >  ci/lib.sh                                     |  8 ++++\n> >  ...n-linux32-build.sh => run-docker-build.sh} | 39 +++++++++++++------\n> >  ci/{run-linux32-docker.sh => run-docker.sh}   | 28 ++++++++++---\n> >  6 files changed, 121 insertions(+), 21 deletions(-)\n> >  create mode 100755 ci/install-docker-dependencies.sh\n> >  rename ci/{run-linux32-build.sh => run-docker-build.sh} (63%)\n> >  rename ci/{run-linux32-docker.sh => run-docker.sh} (43%)\n> \n> Thanks.  The above diffstat makes me wonder if it makes more sense\n> to do the topic from Dscho first to migrate existing CI targets to\n> GitHub Actions and then add musl job to the ci suite on top?  That\n> way, we won't have to worry about azure-pipelines.yml at all here.\n\nYou can ignore the change to azure-pipelines.yml in 6/6\nto reduce noise about Azure (it'll be deleted by next series anyway).\nAnd declare that this series is working\nfor Travis only (as same intention of v1). New diffstat:\n---------------8<------------------\n .travis.yml                                      | 10 +++++-\n azure-pipelines.yml                              |  4 +--\n ci/install-docker-dependencies.sh                | 18 +++++++++++\n ci/lib.sh                                        |  8 +++++\n ci/{run-linux32-build.sh => run-docker-build.sh} | 39 ++++++++++++++++--------\n ci/{run-linux32-docker.sh => run-docker.sh}      | 28 +++++++++++++----\n 6 files changed, 86 insertions(+), 21 deletions(-)\n\n---------------->8----------------\n\nIn _my_ opinion, I still prefer have this series first.\n\nBut, if we prefer to have GitHub Action first:\n- We'll need 5/6 moved to that series\n- In the rebased of this series, we'll change about 10 lines in GitHub Action yml.\n\nIf people think it's better that way, please tell me, I could re-order it.\n\n-- \nDanh\n"},{"id":"394643","messageId":"20200403082254.GJ2224@szeder.dev","threadId":"53103","inReplyTo":"b7b079f559a17b6d6cef037afd6ce023df8f90b0.1585832270.git.congdanhqx@gmail.com","subject":"Re: [PATCH v3 2/6] ci/lib-docker: preserve required environment variables","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2020-04-03T08:22:54Z","receivedAt":"2020-04-03T08:23:03Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Thu, Apr 02, 2020 at 08:04:01PM +0700, Đoàn Trần Công Danh wrote:\n> We're using \"su -m\" to preserve environment variables in the shell run\n> by \"su\". But, that options will be ignored while \"-l\" (aka \"--login\") is\n> specified.\n\nThis is not true.  See any previous runs of the 32 bit Linux job,\nwhich worked as expected, because none of these environment variables\nwere cleared.\n\n> Since we don't have interest in all environment variables,\n> pass only those necessary variables to the inner script.\n> \n> Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n> ---\n>  ci/run-linux32-build.sh | 13 ++++++++++---\n>  1 file changed, 10 insertions(+), 3 deletions(-)\n> \n> diff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh\n> index e3a193adbc..7f985615c2 100755\n> --- a/ci/run-linux32-build.sh\n> +++ b/ci/run-linux32-build.sh\n> @@ -51,10 +51,17 @@ else\n>  fi\n>  \n>  # Build and test\n> -linux32 --32bit i386 su -m -l $CI_USER -c '\n> +linux32 --32bit i386 su -m -l $CI_USER -c \"\n>  \tset -ex\n> +\texport DEVELOPER='$DEVELOPER'\n> +\texport DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'\n> +\texport GIT_PROVE_OPTS='$GIT_PROVE_OPTS'\n> +\texport GIT_TEST_OPTS='$GIT_TEST_OPTS'\n> +\texport GIT_TEST_CLONE_2GB='$GIT_TEST_CLONE_2GB'\n> +\texport MAKEFLAGS='$MAKEFLAGS'\n> +\texport cache_dir='$cache_dir'\n>  \tcd /usr/src/git\n> -\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n> +\ttest -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove\n>  \tmake\n>  \tmake test\n> -'\n> +\"\n> -- \n> 2.26.0.334.g6536db25bb\n> \n"},{"id":"394647","messageId":"20200403100931.GA32101@danh.dev","threadId":"53103","inReplyTo":"20200403082254.GJ2224@szeder.dev","subject":"Re: [PATCH v3 2/6] ci/lib-docker: preserve required environment variables","fromName":"Danh Doan","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-03T10:09:31Z","receivedAt":"2020-04-03T10:09:38Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"On 2020-04-03 10:22:54+0200, SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> On Thu, Apr 02, 2020 at 08:04:01PM +0700, Đoàn Trần Công Danh wrote:\n> > We're using \"su -m\" to preserve environment variables in the shell run\n> > by \"su\". But, that options will be ignored while \"-l\" (aka \"--login\") is\n> > specified.\n> \n> This is not true.  See any previous runs of the 32 bit Linux job,\n> which worked as expected, because none of these environment variables\n> were cleared.\n\nDifferent su have different behavior when combine \"-m\" and \"-l\"\n\nutil-linux's su has this as far as 60541961f, (docs: improve grammar,\nwording and formatting of su man page, 2013-10-12)\n\n       -m, -p, --preserve-environment\n              Preserve the entire environment, i.e., it does not set HOME,\n              SHELL, USER nor LOGNAME.  This option is ignored if the option\n              --login is specified.\n\nhttps://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/login-utils/su.1#n120\n\nUbuntu (our Linux32 builder), ships su by shadow-utils:\n\n\tNote that the default behavior for the environment is the following:\n\t\tThe $HOME, $SHELL, $USER, $LOGNAME, $PATH,\n\t\tand $IFS environment variables are reset.\n\n\t\tIf --login is not used, the environment is copied,\n\t\texcept for the variables above.\n\n\t\tIf --login is used, the $TERM, $COLORTERM, $DISPLAY, and\n\t\t$XAUTHORITY environment variables are copied if they were set.\n\nThere're no mentions of other variables, I _think_ our Linux32 works\nby accident.\n\nAlpine ships su from busybox, this su ignores \"-m\" if \"-l\" is set.\n\n-- \nDanh\n"},{"id":"394696","messageId":"20200403195551.GB7859@szeder.dev","threadId":"53103","inReplyTo":"20200403100931.GA32101@danh.dev","subject":"Re: [PATCH v3 2/6] ci/lib-docker: preserve required environment variables","fromName":"SZEDER Gábor","fromEmail":"szeder.dev@gmail.com","sentAt":"2020-04-03T19:55:51Z","receivedAt":"2020-04-03T19:55:57Z","isPatch":true,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"On Fri, Apr 03, 2020 at 05:09:31PM +0700, Danh Doan wrote:\n> On 2020-04-03 10:22:54+0200, SZEDER Gábor <szeder.dev@gmail.com> wrote:\n> > On Thu, Apr 02, 2020 at 08:04:01PM +0700, Đoàn Trần Công Danh wrote:\n> > > We're using \"su -m\" to preserve environment variables in the shell run\n> > > by \"su\". But, that options will be ignored while \"-l\" (aka \"--login\") is\n> > > specified.\n> > \n> > This is not true.  See any previous runs of the 32 bit Linux job,\n> > which worked as expected, because none of these environment variables\n> > were cleared.\n> \n> Different su have different behavior when combine \"-m\" and \"-l\"\n> \n> util-linux's su has this as far as 60541961f, (docs: improve grammar,\n> wording and formatting of su man page, 2013-10-12)\n> \n>        -m, -p, --preserve-environment\n>               Preserve the entire environment, i.e., it does not set HOME,\n>               SHELL, USER nor LOGNAME.  This option is ignored if the option\n>               --login is specified.\n> \n> https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git/tree/login-utils/su.1#n120\n> \n> Ubuntu (our Linux32 builder), ships su by shadow-utils:\n> \n> \tNote that the default behavior for the environment is the following:\n> \t\tThe $HOME, $SHELL, $USER, $LOGNAME, $PATH,\n> \t\tand $IFS environment variables are reset.\n> \n> \t\tIf --login is not used, the environment is copied,\n> \t\texcept for the variables above.\n> \n> \t\tIf --login is used, the $TERM, $COLORTERM, $DISPLAY, and\n> \t\t$XAUTHORITY environment variables are copied if they were set.\n> \n> There're no mentions of other variables, I _think_ our Linux32 works\n> by accident.\n\nWe do know which image we use, and we do know how its 'su' behaves.  I\nthink relying on that is fine, and it's not just \"works by accident\".\n\n> Alpine ships su from busybox, this su ignores \"-m\" if \"-l\" is set.\n\nThen the commit message should specifically mention these behavior\ndifferences between different 'su' variants.\n\n"},{"id":"394729","messageId":"2fdce60075935f8ff94bc117747f1768f41ed435.1585961568.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585961568.git.congdanhqx@gmail.com","subject":"[PATCH v4 1/6] ci: make MAKEFLAGS available inside the Docker container in the Linux32 job","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-04T01:08:45Z","receivedAt":"2020-04-04T01:09:05Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"From: SZEDER Gábor <szeder.dev@gmail.com>\n\nOnce upon a time we ran 'make --jobs=2 ...' to build Git, its\ndocumentation, or to apply Coccinelle semantic patches.  Then commit\neaa62291ff (ci: inherit --jobs via MAKEFLAGS in run-build-and-tests,\n2019-01-27) came along, and started using the MAKEFLAGS environment\nvariable to centralize setting the number of parallel jobs in\n'ci/libs.sh'.  Alas, it forgot to update 'ci/run-linux32-docker.sh' to\nmake MAKEFLAGS available inside the Docker container running the 32\nbit Linux job, and, consequently, since then that job builds Git\nsequentially, and it ignores any Makefile knobs that we might set in\nMAKEFLAGS (though we don't set any for the 32 bit Linux job at the\nmoment).\n\nSo update the 'docker run' invocation in 'ci/run-linux32-docker.sh' to\nmake MAKEFLAGS available inside the Docker container as well.  Set\nCC=gcc for the 32 bit Linux job, because that's the compiler installed\nin the 32 bit Linux Docker image that we use (Travis CI nowadays sets\nCC=clang by default, but clang is not installed in this image).\n\nSigned-off-by: SZEDER Gábor <szeder.dev@gmail.com>\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/lib.sh                | 3 +++\n ci/run-linux32-docker.sh | 1 +\n 2 files changed, 4 insertions(+)\n\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex c3a8cd2104..d637825222 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -198,6 +198,9 @@ osx-clang|osx-gcc)\n GIT_TEST_GETTEXT_POISON)\n \texport GIT_TEST_GETTEXT_POISON=true\n \t;;\n+Linux32)\n+\tCC=gcc\n+\t;;\n esac\n \n MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\ndiff --git a/ci/run-linux32-docker.sh b/ci/run-linux32-docker.sh\nindex 751acfcf8a..ebb18fa747 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-linux32-docker.sh\n@@ -20,6 +20,7 @@ docker run \\\n \t--env GIT_PROVE_OPTS \\\n \t--env GIT_TEST_OPTS \\\n \t--env GIT_TEST_CLONE_2GB \\\n+\t--env MAKEFLAGS \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394730","messageId":"cover.1585961568.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585474409.git.congdanhqx@gmail.com","subject":"[PATCH v4 0/6] Travis jobs for linux with musl libc","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-04T01:08:44Z","receivedAt":"2020-04-04T01:09:05Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Cc: Junio C Hamano <gitster@pobox.com>,\n SZEDER Gábor <szeder.dev@gmail.com>,\n Eric Sunshine <sunshine@sunshineco.com>,\n Johannes Schindelin <johannes.schindelin@gmx.de>\n\nRecently, we've un-broken git for Linux with musl libc,\nand we have a serie to fix false negative with busybox shell utils.\n\nAdd a CI job on Travis and Azure to make sure we won't break it again.\n\nChange from v3:\n* reword 2/6: adding su behavior in util-linux and busybox\n* 6/6: Drop change to azure-pipelines.yml, and declare this series will\n  be used for Travis only. Since Azure will be replaced by GitHub Action\n  in a later series.\n\nHi Junio,\nThe series for GitHub Actions will need to be rebased on this series again.\n6/6 in that seriess will have UD conflicts.\nPlease \"git rm azure-pipelines.yml\" to fix conflicts.\n\nSZEDER Gábor (1):\n  ci: make MAKEFLAGS available inside the Docker container in the\n    Linux32 job\n\nĐoàn Trần Công Danh (5):\n  ci/lib-docker: preserve required environment variables\n  ci/linux32: parameterise command to switch arch\n  ci: refactor docker runner script\n  ci/linux32: libify install-dependencies step\n  travis: build and test on Linux with musl libc and busybox\n\n .travis.yml                                   | 10 ++++-\n azure-pipelines.yml                           |  4 +-\n ci/install-docker-dependencies.sh             | 18 +++++++++\n ci/lib.sh                                     |  8 ++++\n ...n-linux32-build.sh => run-docker-build.sh} | 39 +++++++++++++------\n ci/{run-linux32-docker.sh => run-docker.sh}   | 28 ++++++++++---\n 6 files changed, 86 insertions(+), 21 deletions(-)\n create mode 100755 ci/install-docker-dependencies.sh\n rename ci/{run-linux32-build.sh => run-docker-build.sh} (63%)\n rename ci/{run-linux32-docker.sh => run-docker.sh} (43%)\n\nRange-diff against v3:\n1:  2fdce60075 = 1:  2fdce60075 ci: make MAKEFLAGS available inside the Docker container in the Linux32 job\n2:  b7b079f559 ! 2:  db574b3ff9 ci/lib-docker: preserve required environment variables\n    @@ Commit message\n     \n         We're using \"su -m\" to preserve environment variables in the shell run\n         by \"su\". But, that options will be ignored while \"-l\" (aka \"--login\") is\n    -    specified.\n    +    specified in util-linux and busybox's su.\n    +\n    +    In a later patch this script will be reused for checking Git for Linux\n    +    with musl libc on Alpine Linux, Alpine Linux uses \"su\" from busybox.\n     \n         Since we don't have interest in all environment variables,\n         pass only those necessary variables to the inner script.\n3:  8c8cf3eb24 = 3:  a13715245f ci/linux32: parameterise command to switch arch\n4:  22cc7960c3 = 4:  b5de868c1e ci: refactor docker runner script\n5:  2e0d54f81e = 5:  c39451ffe5 ci/linux32: libify install-dependencies step\n6:  b61ed50cf6 ! 6:  231affae83 travis: build and test on Linux with musl libc and busybox\n    @@ .travis.yml: matrix:\n            os: linux\n            compiler:\n     \n    - ## azure-pipelines.yml ##\n    -@@ azure-pipelines.yml: jobs:\n    -       PathtoPublish: t/failed-test-artifacts\n    -       ArtifactName: failed-test-artifacts\n    - \n    -+- job: linux_musl\n    -+  displayName: linux-musl\n    -+  condition: succeeded()\n    -+  pool:\n    -+    vmImage: ubuntu-latest\n    -+  steps:\n    -+  - bash: |\n    -+       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n    -+\n    -+       res=0\n    -+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=linux-musl bash -lxc ci/run-docker.sh || res=1\n    -+\n    -+       sudo chmod a+r t/out/TEST-*.xml\n    -+       test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n    -+\n    -+       test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n    -+       exit $res\n    -+    displayName: 'jobname=linux-musl ci/run-docker.sh'\n    -+    env:\n    -+      GITFILESHAREPWD: $(gitfileshare.pwd)\n    -+  - task: PublishTestResults@2\n    -+    displayName: 'Publish Test Results **/TEST-*.xml'\n    -+    inputs:\n    -+      mergeTestResults: true\n    -+      testRunTitle: 'musl'\n    -+      platform: Linux\n    -+      publishRunAttachments: false\n    -+    condition: succeededOrFailed()\n    -+  - task: PublishBuildArtifacts@1\n    -+    displayName: 'Publish trash directories of failed tests'\n    -+    condition: failed()\n    -+    inputs:\n    -+      PathtoPublish: t/failed-test-artifacts\n    -+      ArtifactName: failed-test-artifacts\n    -+\n    - - job: static_analysis\n    -   displayName: StaticAnalysis\n    -   condition: succeeded()\n    -\n      ## ci/install-docker-dependencies.sh ##\n     @@ ci/install-docker-dependencies.sh: Linux32)\n      \t\t\tlibssl-dev libexpat-dev gettext python >/dev/null\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394731","messageId":"db574b3ff9b0a2aff0f3c669e70379bb30d9e8d9.1585961568.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585961568.git.congdanhqx@gmail.com","subject":"[PATCH v4 2/6] ci/lib-docker: preserve required environment variables","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-04T01:08:46Z","receivedAt":"2020-04-04T01:09:13Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"We're using \"su -m\" to preserve environment variables in the shell run\nby \"su\". But, that options will be ignored while \"-l\" (aka \"--login\") is\nspecified in util-linux and busybox's su.\n\nIn a later patch this script will be reused for checking Git for Linux\nwith musl libc on Alpine Linux, Alpine Linux uses \"su\" from busybox.\n\nSince we don't have interest in all environment variables,\npass only those necessary variables to the inner script.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/run-linux32-build.sh | 13 ++++++++++---\n 1 file changed, 10 insertions(+), 3 deletions(-)\n\ndiff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh\nindex e3a193adbc..7f985615c2 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-linux32-build.sh\n@@ -51,10 +51,17 @@ else\n fi\n \n # Build and test\n-linux32 --32bit i386 su -m -l $CI_USER -c '\n+linux32 --32bit i386 su -m -l $CI_USER -c \"\n \tset -ex\n+\texport DEVELOPER='$DEVELOPER'\n+\texport DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'\n+\texport GIT_PROVE_OPTS='$GIT_PROVE_OPTS'\n+\texport GIT_TEST_OPTS='$GIT_TEST_OPTS'\n+\texport GIT_TEST_CLONE_2GB='$GIT_TEST_CLONE_2GB'\n+\texport MAKEFLAGS='$MAKEFLAGS'\n+\texport cache_dir='$cache_dir'\n \tcd /usr/src/git\n-\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n+\ttest -n '$cache_dir' && ln -s '$cache_dir/.prove' t/.prove\n \tmake\n \tmake test\n-'\n+\"\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394732","messageId":"a13715245f4587ea53d2ecbca75b3f25f9c15818.1585961568.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585961568.git.congdanhqx@gmail.com","subject":"[PATCH v4 3/6] ci/linux32: parameterise command to switch arch","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-04T01:08:47Z","receivedAt":"2020-04-04T01:09:13Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"In a later patch, the remaining of this command will be re-used for the\nCI job for linux with musl libc.\n\nAllow customisation of the emulator, now.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/run-linux32-build.sh  | 13 +++++++++++--\n ci/run-linux32-docker.sh |  2 ++\n 2 files changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/ci/run-linux32-build.sh b/ci/run-linux32-build.sh\nindex 7f985615c2..44bb332f64 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-linux32-build.sh\n@@ -14,8 +14,17 @@ then\n \texit 1\n fi\n \n+case \"$jobname\" in\n+Linux32)\n+\tswitch_cmd=\"linux32 --32bit i386\"\n+\t;;\n+*)\n+\texit 1\n+\t;;\n+esac\n+\n # Update packages to the latest available versions\n-linux32 --32bit i386 sh -c '\n+command $switch_cmd sh -c '\n     apt update >/dev/null &&\n     apt install -y build-essential libcurl4-openssl-dev libssl-dev \\\n \tlibexpat-dev gettext python >/dev/null\n@@ -51,7 +60,7 @@ else\n fi\n \n # Build and test\n-linux32 --32bit i386 su -m -l $CI_USER -c \"\n+command $switch_cmd su -m -l $CI_USER -c \"\n \tset -ex\n \texport DEVELOPER='$DEVELOPER'\n \texport DEFAULT_TEST_TARGET='$DEFAULT_TEST_TARGET'\ndiff --git a/ci/run-linux32-docker.sh b/ci/run-linux32-docker.sh\nindex ebb18fa747..54186b6aa7 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-linux32-docker.sh\n@@ -9,6 +9,7 @@ docker pull daald/ubuntu32:xenial\n \n # Use the following command to debug the docker build locally:\n # $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash daald/ubuntu32:xenial\n+# root@container:/# export jobname=<jobname>\n # root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>\n \n container_cache_dir=/tmp/travis-cache\n@@ -21,6 +22,7 @@ docker run \\\n \t--env GIT_TEST_OPTS \\\n \t--env GIT_TEST_CLONE_2GB \\\n \t--env MAKEFLAGS \\\n+\t--env jobname \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394735","messageId":"b5de868c1e354153bec78d892e13a6faf03c4f31.1585961568.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585961568.git.congdanhqx@gmail.com","subject":"[PATCH v4 4/6] ci: refactor docker runner script","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-04T01:08:48Z","receivedAt":"2020-04-04T01:09:13Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"We will support alpine check in docker later in this series.\n\nWhile we're at it, tell people to run as root in podman,\nif podman is used as drop-in replacement for docker,\nbecause podman will map host-user to container's root,\ntherefore, mapping their permission.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml                                   |  2 +-\n azure-pipelines.yml                           |  4 ++--\n ...n-linux32-build.sh => run-docker-build.sh} |  6 ++---\n ci/{run-linux32-docker.sh => run-docker.sh}   | 22 ++++++++++++++-----\n 4 files changed, 22 insertions(+), 12 deletions(-)\n rename ci/{run-linux32-build.sh => run-docker-build.sh} (93%)\n rename ci/{run-linux32-docker.sh => run-docker.sh} (53%)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex fc5730b085..069aeeff3c 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -32,7 +32,7 @@ matrix:\n       services:\n         - docker\n       before_install:\n-      script: ci/run-linux32-docker.sh\n+      script: ci/run-docker.sh\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/azure-pipelines.yml b/azure-pipelines.yml\nindex 675c3a43c9..11413f66f8 100644\n--- a/azure-pipelines.yml\n+++ b/azure-pipelines.yml\n@@ -489,14 +489,14 @@ jobs:\n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || ci/mount-fileshare.sh //gitfileshare.file.core.windows.net/test-cache gitfileshare \"$GITFILESHAREPWD\" \"$HOME/test-cache\" || exit 1\n \n        res=0\n-       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" bash -lxc ci/run-linux32-docker.sh || res=1\n+       sudo AGENT_OS=\"$AGENT_OS\" BUILD_BUILDNUMBER=\"$BUILD_BUILDNUMBER\" BUILD_REPOSITORY_URI=\"$BUILD_REPOSITORY_URI\" BUILD_SOURCEBRANCH=\"$BUILD_SOURCEBRANCH\" BUILD_SOURCEVERSION=\"$BUILD_SOURCEVERSION\" SYSTEM_PHASENAME=\"$SYSTEM_PHASENAME\" SYSTEM_TASKDEFINITIONSURI=\"$SYSTEM_TASKDEFINITIONSURI\" SYSTEM_TEAMPROJECT=\"$SYSTEM_TEAMPROJECT\" CC=$CC MAKEFLAGS=\"$MAKEFLAGS\" jobname=Linux32 bash -lxc ci/run-docker.sh || res=1\n \n        sudo chmod a+r t/out/TEST-*.xml\n        test ! -d t/failed-test-artifacts || sudo chmod a+r t/failed-test-artifacts\n \n        test \"$GITFILESHAREPWD\" = '$(gitfileshare.pwd)' || sudo umount \"$HOME/test-cache\" || res=1\n        exit $res\n-    displayName: 'ci/run-linux32-docker.sh'\n+    displayName: 'jobname=Linux32 ci/run-docker.sh'\n     env:\n       GITFILESHAREPWD: $(gitfileshare.pwd)\n   - task: PublishTestResults@2\ndiff --git a/ci/run-linux32-build.sh b/ci/run-docker-build.sh\nsimilarity index 93%\nrename from ci/run-linux32-build.sh\nrename to ci/run-docker-build.sh\nindex 44bb332f64..a05b48c559 100755\n--- a/ci/run-linux32-build.sh\n+++ b/ci/run-docker-build.sh\n@@ -1,16 +1,16 @@\n #!/bin/sh\n #\n-# Build and test Git in a 32-bit environment\n+# Build and test Git inside container\n #\n # Usage:\n-#   run-linux32-build.sh <host-user-id>\n+#   run-docker-build.sh <host-user-id>\n #\n \n set -ex\n \n if test $# -ne 1 || test -z \"$1\"\n then\n-\techo >&2 \"usage: run-linux32-build.sh <host-user-id>\"\n+\techo >&2 \"usage: run-docker-build.sh <host-user-id>\"\n \texit 1\n fi\n \ndiff --git a/ci/run-linux32-docker.sh b/ci/run-docker.sh\nsimilarity index 53%\nrename from ci/run-linux32-docker.sh\nrename to ci/run-docker.sh\nindex 54186b6aa7..3881f99b53 100755\n--- a/ci/run-linux32-docker.sh\n+++ b/ci/run-docker.sh\n@@ -1,16 +1,26 @@\n #!/bin/sh\n #\n-# Download and run Docker image to build and test 32-bit Git\n+# Download and run Docker image to build and test Git\n #\n \n . ${0%/*}/lib.sh\n \n-docker pull daald/ubuntu32:xenial\n+case \"$jobname\" in\n+Linux32)\n+\tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n+\t;;\n+*)\n+\texit 1\n+\t;;\n+esac\n+\n+docker pull \"$CI_CONTAINER\"\n \n # Use the following command to debug the docker build locally:\n-# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/bash daald/ubuntu32:xenial\n+# <host-user-id> must be 0 if podman is used as drop-in replacement for docker\n+# $ docker run -itv \"${PWD}:/usr/src/git\" --entrypoint /bin/sh \"$CI_CONTAINER\"\n # root@container:/# export jobname=<jobname>\n-# root@container:/# /usr/src/git/ci/run-linux32-build.sh <host-user-id>\n+# root@container:/# /usr/src/git/ci/run-docker-build.sh <host-user-id>\n \n container_cache_dir=/tmp/travis-cache\n \n@@ -26,8 +36,8 @@ docker run \\\n \t--env cache_dir=\"$container_cache_dir\" \\\n \t--volume \"${PWD}:/usr/src/git\" \\\n \t--volume \"$cache_dir:$container_cache_dir\" \\\n-\tdaald/ubuntu32:xenial \\\n-\t/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)\n+\t\"$CI_CONTAINER\" \\\n+\t/usr/src/git/ci/run-docker-build.sh $(id -u $USER)\n \n check_unignored_build_artifacts\n \n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394733","messageId":"c39451ffe56489a7550ab66fcef6ed132159ee6c.1585961568.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585961568.git.congdanhqx@gmail.com","subject":"[PATCH v4 5/6] ci/linux32: libify install-dependencies step","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-04T01:08:49Z","receivedAt":"2020-04-04T01:09:14Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"In a later patch, we will add new Travis Job for linux-musl.\nMost of other code in this file could be reuse for that job.\n\nMove the code to install dependencies to a common script.\nShould we add new CI system that can run directly in container,\nwe can reuse this script for installation step.\n\nSigned-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n ci/install-docker-dependencies.sh | 14 ++++++++++++++\n ci/run-docker-build.sh            |  7 +------\n 2 files changed, 15 insertions(+), 6 deletions(-)\n create mode 100755 ci/install-docker-dependencies.sh\n\ndiff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh\nnew file mode 100755\nindex 0000000000..a104c61d29\n--- /dev/null\n+++ b/ci/install-docker-dependencies.sh\n@@ -0,0 +1,14 @@\n+#!/bin/sh\n+#\n+# Install dependencies required to build and test Git inside container\n+#\n+\n+case \"$jobname\" in\n+Linux32)\n+\tlinux32 --32bit i386 sh -c '\n+\t\tapt update >/dev/null &&\n+\t\tapt install -y build-essential libcurl4-openssl-dev \\\n+\t\t\tlibssl-dev libexpat-dev gettext python >/dev/null\n+\t'\n+\t;;\n+esac\ndiff --git a/ci/run-docker-build.sh b/ci/run-docker-build.sh\nindex a05b48c559..4a153492ba 100755\n--- a/ci/run-docker-build.sh\n+++ b/ci/run-docker-build.sh\n@@ -23,12 +23,7 @@ Linux32)\n \t;;\n esac\n \n-# Update packages to the latest available versions\n-command $switch_cmd sh -c '\n-    apt update >/dev/null &&\n-    apt install -y build-essential libcurl4-openssl-dev libssl-dev \\\n-\tlibexpat-dev gettext python >/dev/null\n-'\n+\"${0%/*}/install-docker-dependencies.sh\"\n \n # If this script runs inside a docker container, then all commands are\n # usually executed as root. Consequently, the host user might not be\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394734","messageId":"231affae8376039c68248efa972c37ef92b79d90.1585961568.git.congdanhqx@gmail.com","threadId":"53103","inReplyTo":"cover.1585961568.git.congdanhqx@gmail.com","subject":"[PATCH v4 6/6] travis: build and test on Linux with musl libc and busybox","fromName":"Đoàn Trần Công Danh","fromEmail":"congdanhqx@gmail.com","sentAt":"2020-04-04T01:08:50Z","receivedAt":"2020-04-04T01:09:14Z","isPatch":true,"sender":{"key":"congdanhqx@gmail.com","avatar":"https://avatars.githubusercontent.com/u/42673067?v=4"},"body":"Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n---\n .travis.yml                       | 8 ++++++++\n ci/install-docker-dependencies.sh | 4 ++++\n ci/lib.sh                         | 5 +++++\n ci/run-docker-build.sh            | 4 ++++\n ci/run-docker.sh                  | 3 +++\n 5 files changed, 24 insertions(+)\n\ndiff --git a/.travis.yml b/.travis.yml\nindex 069aeeff3c..0cfc3c3428 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -33,6 +33,14 @@ matrix:\n         - docker\n       before_install:\n       script: ci/run-docker.sh\n+    - env: jobname=linux-musl\n+      os: linux\n+      compiler:\n+      addons:\n+      services:\n+        - docker\n+      before_install:\n+      script: ci/run-docker.sh\n     - env: jobname=StaticAnalysis\n       os: linux\n       compiler:\ndiff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh\nindex a104c61d29..26a6689766 100755\n--- a/ci/install-docker-dependencies.sh\n+++ b/ci/install-docker-dependencies.sh\n@@ -11,4 +11,8 @@ Linux32)\n \t\t\tlibssl-dev libexpat-dev gettext python >/dev/null\n \t'\n \t;;\n+linux-musl)\n+\tapk add --update build-base curl-dev openssl-dev expat-dev gettext \\\n+\t\tpcre2-dev python3 musl-libintl perl-utils ncurses >/dev/null\n+\t;;\n esac\ndiff --git a/ci/lib.sh b/ci/lib.sh\nindex d637825222..87cd29bab6 100755\n--- a/ci/lib.sh\n+++ b/ci/lib.sh\n@@ -201,6 +201,11 @@ GIT_TEST_GETTEXT_POISON)\n Linux32)\n \tCC=gcc\n \t;;\n+linux-musl)\n+\tCC=gcc\n+\tMAKEFLAGS=\"$MAKEFLAGS PYTHON_PATH=/usr/bin/python3 USE_LIBPCRE2=Yes\"\n+\tMAKEFLAGS=\"$MAKEFLAGS NO_REGEX=Yes ICONV_OMITS_BOM=Yes\"\n+\t;;\n esac\n \n MAKEFLAGS=\"$MAKEFLAGS CC=${CC:-cc}\"\ndiff --git a/ci/run-docker-build.sh b/ci/run-docker-build.sh\nindex 4a153492ba..8d47a5fda3 100755\n--- a/ci/run-docker-build.sh\n+++ b/ci/run-docker-build.sh\n@@ -18,6 +18,10 @@ case \"$jobname\" in\n Linux32)\n \tswitch_cmd=\"linux32 --32bit i386\"\n \t;;\n+linux-musl)\n+\tswitch_cmd=\n+\tuseradd () { adduser -D \"$@\"; }\n+\t;;\n *)\n \texit 1\n \t;;\ndiff --git a/ci/run-docker.sh b/ci/run-docker.sh\nindex 3881f99b53..37fa372052 100755\n--- a/ci/run-docker.sh\n+++ b/ci/run-docker.sh\n@@ -9,6 +9,9 @@ case \"$jobname\" in\n Linux32)\n \tCI_CONTAINER=\"daald/ubuntu32:xenial\"\n \t;;\n+linux-musl)\n+\tCI_CONTAINER=alpine\n+\t;;\n *)\n \texit 1\n \t;;\n-- \n2.26.0.334.g6536db25bb\n\n"},{"id":"394808","messageId":"xmqq5zedy8dj.fsf@gitster.c.googlers.com","threadId":"53103","inReplyTo":"cover.1585961568.git.congdanhqx@gmail.com","subject":"Re: [PATCH v4 0/6] Travis jobs for linux with musl libc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-05T20:39:52Z","receivedAt":"2020-04-05T20:39:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n\n> The series for GitHub Actions will need to be rebased on this series again.\n> 6/6 in that seriess will have UD conflicts.\n> Please \"git rm azure-pipelines.yml\" to fix conflicts.\n\nIf you want to keep doing this, please take over the ownership of\nboth series and build one on top of the other.  I asked you and\nDscho to coordinate and work together, but Dscho seems to be\ncomfortable with the idea of letting you touch his series, so doing\nso would still count as you two working together ;-).  I do not have\na strong opinion which parts should come first (it is something that\ncan be decided between you two which way is cleaner).\n\nThanks.\n\n"},{"id":"394958","messageId":"nycvar.QRO.7.76.6.2004071651060.46@tvgsbejvaqbjf.bet","threadId":"53103","inReplyTo":"20200401221835.GH2224@szeder.dev","subject":"Re: [PATCH v2 3/4] travis: build and test on Linux with musl libc and busybox","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-04-07T14:53:54Z","receivedAt":"2020-04-07T14:53:57Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Gábor,\n\nOn Thu, 2 Apr 2020, SZEDER Gábor wrote:\n\n> On Sun, Mar 29, 2020 at 05:12:31PM +0700, Đoàn Trần Công Danh wrote:\n> > Signed-off-by: Đoàn Trần Công Danh <congdanhqx@gmail.com>\n>\n> > +\tset -ex\n> > +\tcd /usr/src/git\n> > +\ttest -n \"$cache_dir\" && ln -s \"$cache_dir/.prove\" t/.prove\n> > +\tautoconf\n> > +\techo \"PYTHON_PATH=/usr/bin/python3\" >config.mak\n> > +\t./configure --with-libpcre\n>\n> The recommended way to build Git is without autoconf and configure.\n\nThat is news to me.\n\nMy understanding still is that `make` is the recommended way to build Git,\nand `./configure` is only for those who want to use autoconf.\n\nIt seems that the `INSTALL` file agrees with my understanding:\n\n-- snip --\n\n                Git installation\n\nNormally you can just do \"make\" followed by \"make install\", and that\nwill install the git programs in your own ~/bin/ directory.  If you want\nto do a global install, you can do\n\n        $ make prefix=/usr all doc info ;# as yourself\n        # make prefix=/usr install install-doc install-html install-info\n        # ;# as root\n\n(or prefix=/usr/local, of course).  Just like any program suite\nthat uses $prefix, the built results have some paths encoded,\nwhich are derived from $prefix, so \"make all; make prefix=/usr\ninstall\" would not work.\n\nThe beginning of the Makefile documents many variables that affect the way\ngit is built.  You can override them either from the command line, or in a\nconfig.mak file.\n\nAlternatively you can use autoconf generated ./configure script to\nset up install paths (via config.mak.autogen), so you can write instead\n\n        $ make configure ;# as yourself\n        $ ./configure --prefix=/usr ;# as yourself\n        $ make all doc ;# as yourself\n        # make install install-doc install-html;# as root\n-- snap --\n\nIf you think that I am wrong, I invite you to change the recommendation by\nproposing a patch to `INSTALL`, to change the current recommendation.\n\nCiao,\nDscho\n"},{"id":"394959","messageId":"nycvar.QRO.7.76.6.2004071654170.46@tvgsbejvaqbjf.bet","threadId":"53103","inReplyTo":"xmqq5zedy8dj.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v4 0/6] Travis jobs for linux with musl libc","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-04-07T14:55:03Z","receivedAt":"2020-04-07T14:55:09Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Sun, 5 Apr 2020, Junio C Hamano wrote:\n\n> Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n>\n> > The series for GitHub Actions will need to be rebased on this series again.\n> > 6/6 in that seriess will have UD conflicts.\n> > Please \"git rm azure-pipelines.yml\" to fix conflicts.\n>\n> If you want to keep doing this, please take over the ownership of\n> both series and build one on top of the other.  I asked you and\n> Dscho to coordinate and work together, but Dscho seems to be\n> comfortable with the idea of letting you touch his series, so doing\n> so would still count as you two working together ;-).  I do not have\n> a strong opinion which parts should come first (it is something that\n> can be decided between you two which way is cleaner).\n\nFor the record, Danh and I _are_ working together, and yes, I am totally\ncomfortable with him taking the lead on submitting the patch series'\niterations.\n\nThanks,\nDscho\n"},{"id":"394997","messageId":"xmqqd08jt7xn.fsf@gitster.c.googlers.com","threadId":"53103","inReplyTo":"nycvar.QRO.7.76.6.2004071654170.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v4 0/6] Travis jobs for linux with musl libc","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-07T19:25:08Z","receivedAt":"2020-04-07T19:25:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> Hi Junio,\n>\n> On Sun, 5 Apr 2020, Junio C Hamano wrote:\n>\n>> Đoàn Trần Công Danh  <congdanhqx@gmail.com> writes:\n>>\n>> > The series for GitHub Actions will need to be rebased on this series again.\n>> > 6/6 in that seriess will have UD conflicts.\n>> > Please \"git rm azure-pipelines.yml\" to fix conflicts.\n>>\n>> If you want to keep doing this, please take over the ownership of\n>> both series and build one on top of the other.  I asked you and\n>> Dscho to coordinate and work together, but Dscho seems to be\n>> comfortable with the idea of letting you touch his series, so doing\n>> so would still count as you two working together ;-).  I do not have\n>> a strong opinion which parts should come first (it is something that\n>> can be decided between you two which way is cleaner).\n>\n> For the record, Danh and I _are_ working together, and yes, I am totally\n> comfortable with him taking the lead on submitting the patch series'\n> iterations.\n\nGood.  Thanks, both.\n"},{"id":"395010","messageId":"xmqqh7xvrncc.fsf@gitster.c.googlers.com","threadId":"53103","inReplyTo":"nycvar.QRO.7.76.6.2004071651060.46@tvgsbejvaqbjf.bet","subject":"Re: [PATCH v2 3/4] travis: build and test on Linux with musl libc and busybox","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-04-07T21:35:15Z","receivedAt":"2020-04-07T21:35:23Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n>> The recommended way to build Git is without autoconf and configure.\n>\n> That is news to me.\n>\n> My understanding still is that `make` is the recommended way to build Git,\n> and `./configure` is only for those who want to use autoconf.\n>\n> It seems that the `INSTALL` file agrees with my understanding:\n\nDid you misread the sentence you quoted?  It says \"without\", not\n\"with\", so I think you two are on the same page.\n"},{"id":"395184","messageId":"nycvar.QRO.7.76.6.2004101538190.46@tvgsbejvaqbjf.bet","threadId":"53103","inReplyTo":"xmqqh7xvrncc.fsf@gitster.c.googlers.com","subject":"Re: [PATCH v2 3/4] travis: build and test on Linux with musl libc and busybox","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2020-04-10T13:38:58Z","receivedAt":"2020-04-10T13:39:05Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Junio,\n\nOn Tue, 7 Apr 2020, Junio C Hamano wrote:\n\n> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n>\n> >> The recommended way to build Git is without autoconf and configure.\n> >\n> > That is news to me.\n> >\n> > My understanding still is that `make` is the recommended way to build Git,\n> > and `./configure` is only for those who want to use autoconf.\n> >\n> > It seems that the `INSTALL` file agrees with my understanding:\n>\n> Did you misread the sentence you quoted?  It says \"without\", not\n> \"with\", so I think you two are on the same page.\n\nYes, I misread it. Thanks for pointing that out.\n\nCiao,\nDscho\n"}]}