# [PATCH 0/2] Prepare our git-p4 tests for running on APFS

11 messages from 2019-04-12 to 2019-04-17. Participants: Johannes Schindelin via GitGitGadget, Luke Diamand, Johannes Schindelin, Junio C Hamano.
Thread: https://gitlist.dev/t/50925

## Johannes Schindelin via GitGitGadget, 2019-04-12 11:39

Subject: [PATCH 0/2] Prepare our git-p4 tests for running on APFS
Message-ID: <pull.179.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.179.git.gitgitgadget%40gmail.com

```
Yesterday, the macOS agents of Azure Pipelines were upgraded to Mojave, and
since that does not support HFS+ anymore, everything will be upgraded to
APFS.

As I just found yesterday, we have one test that fails on that filesystem
(t9822, which is only run if Perforce's p4d is available).

The first patch adds a workaround, as I failed to find any way to finagle
APFS into accepting that ISO-8859-1 encoded file name.

The second patch is a fix to make things compile on Mojave again, apparently
Homebrew changed and the /usr/local/ directories need to be added to the
compiler and linker flags explicitly. Maybe this is a gcc-8 only thing, as
it seems to have affected only the osx-gcc job, not the osx-clang job.

Johannes Schindelin (2):
  t9822: skip tests if file names cannot be ISO-8895-1 encoded
  macOS: make sure that gettext is found

 config.mak.uname                | 2 ++
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 2 files changed, 9 insertions(+)


base-commit: e35b8cb8e212e3557efc565157ceb5cbaaf0d87f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-179%2Fdscho%2Fskip-t9822-on-apfs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-179/dscho/skip-t9822-on-apfs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/179
-- 
gitgitgadget

```

## Johannes Schindelin via GitGitGadget, 2019-04-12 11:39

Subject: [PATCH 2/2] macOS: make sure that gettext is found
Message-ID: <f006524f78a881b4f4e06cb15b877f8a226a9843.1555069181.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/f006524f78a881b4f4e06cb15b877f8a226a9843.1555069181.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.179.git.gitgitgadget@gmail.com>

```
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Due to reasons (some XCode versions seem to include gettext, some
don't?), Homebrew does not expose the libraries and headers in
/usr/local/ by default anymore.

Let's help find them again.

Note: for some reason, this is a change of behavior caused by the
upgrade to Mojave, identified in our Azure Pipeline; it seems that
Homebrew used to add the /usr/local/ directories to the include and link
search path before, but now it no longer does.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.mak.uname | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/config.mak.uname b/config.mak.uname
index 41e85fab1c..3605fead53 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -114,6 +114,8 @@ ifeq ($(uname_S),Darwin)
 	HAVE_BSD_SYSCTL = YesPlease
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
+	BASIC_CFLAGS += -I/usr/local/include
+	BASIC_LDFLAGS += -L/usr/local/lib
 endif
 ifeq ($(uname_S),SunOS)
 	NEEDS_SOCKET = YesPlease
-- 
gitgitgadget

```

## Johannes Schindelin via GitGitGadget, 2019-04-12 11:39

Subject: [PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded
Message-ID: <52681aee0a9657691521baf13f792bcfb9eeb898.1555069181.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/52681aee0a9657691521baf13f792bcfb9eeb898.1555069181.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.179.git.gitgitgadget@gmail.com>

```
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Most notably, it seems that macOS' APFS does not allow that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
index c78477c19b..de0b46581d 100755
--- a/t/t9822-git-p4-path-encoding.sh
+++ b/t/t9822-git-p4-path-encoding.sh
@@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths'
 UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
 ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
 
+ISO8859="$(printf "$ISO8859_ESCAPED")" &&
+echo content123 >"$ISO8859" &&
+rm "$ISO8859" || {
+	skip_all="fs does not accept ISO-8859-1 filenames"
+	test_done
+}
+
 test_expect_success 'start p4d' '
 	start_p4d
 '
-- 
gitgitgadget


```

## Luke Diamand, 2019-04-13 07:39

Subject: Re: [PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded
Message-ID: <CAE5ih79dyauRN3Kc17JMAx+p6dWFsy-P_1G=jTug-i9T=RrKLw@mail.gmail.com>
URL: https://gitlist.dev/e/CAE5ih79dyauRN3Kc17JMAx%2Bp6dWFsy-P_1G%3DjTug-i9T%3DRrKLw%40mail.gmail.com
In-Reply-To: <52681aee0a9657691521baf13f792bcfb9eeb898.1555069181.git.gitgitgadget@gmail.com>

```
On Fri, 12 Apr 2019 at 12:39, Johannes Schindelin via GitGitGadget
<gitgitgadget@gmail.com> wrote:
>
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Most notably, it seems that macOS' APFS does not allow that.

Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?

It seems reasonable other than that!

>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  t/t9822-git-p4-path-encoding.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
> index c78477c19b..de0b46581d 100755
> --- a/t/t9822-git-p4-path-encoding.sh
> +++ b/t/t9822-git-p4-path-encoding.sh
> @@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths'
>  UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
>  ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
>
> +ISO8859="$(printf "$ISO8859_ESCAPED")" &&
> +echo content123 >"$ISO8859" &&
> +rm "$ISO8859" || {
> +       skip_all="fs does not accept ISO-8859-1 filenames"
> +       test_done
> +}
> +
>  test_expect_success 'start p4d' '
>         start_p4d
>  '
> --
> gitgitgadget
>

```

## Johannes Schindelin, 2019-04-14 19:38

Subject: Re: [PATCH 1/2] t9822: skip tests if file names cannot be ISO-8895-1 encoded
Message-ID: <nycvar.QRO.7.76.6.1904142138130.45@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1904142138130.45%40tvgsbejvaqbjf.bet
In-Reply-To: <CAE5ih79dyauRN3Kc17JMAx+p6dWFsy-P_1G=jTug-i9T=RrKLw@mail.gmail.com>

```
Hi Luke,

On Sat, 13 Apr 2019, Luke Diamand wrote:

> On Fri, 12 Apr 2019 at 12:39, Johannes Schindelin via GitGitGadget
> <gitgitgadget@gmail.com> wrote:
> >
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > Most notably, it seems that macOS' APFS does not allow that.
>
> Did you mean in the subject "ISO-8895-1" encoded or "ISO-8859-1" encoded?

D'oh... Fixed in v2!

> It seems reasonable other than that!

Thanks,
Dscho

```

## Johannes Schindelin via GitGitGadget, 2019-04-14 21:19

Subject: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded
Message-ID: <6161c76702246ab34a520dae8104ad489b89b6a1.1555276767.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/6161c76702246ab34a520dae8104ad489b89b6a1.1555276767.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.179.v2.git.gitgitgadget@gmail.com>

```
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Most notably, it seems that macOS' APFS does not allow that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/t/t9822-git-p4-path-encoding.sh b/t/t9822-git-p4-path-encoding.sh
index c78477c19b..de0b46581d 100755
--- a/t/t9822-git-p4-path-encoding.sh
+++ b/t/t9822-git-p4-path-encoding.sh
@@ -7,6 +7,13 @@ test_description='Clone repositories with non ASCII paths'
 UTF8_ESCAPED="a-\303\244_o-\303\266_u-\303\274.txt"
 ISO8859_ESCAPED="a-\344_o-\366_u-\374.txt"
 
+ISO8859="$(printf "$ISO8859_ESCAPED")" &&
+echo content123 >"$ISO8859" &&
+rm "$ISO8859" || {
+	skip_all="fs does not accept ISO-8859-1 filenames"
+	test_done
+}
+
 test_expect_success 'start p4d' '
 	start_p4d
 '
-- 
gitgitgadget


```

## Johannes Schindelin via GitGitGadget, 2019-04-14 21:19

Subject: [PATCH v2 0/2] Prepare our git-p4 tests for running on APFS
Message-ID: <pull.179.v2.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/pull.179.v2.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.179.git.gitgitgadget@gmail.com>

```
Yesterday, the macOS agents of Azure Pipelines were upgraded to Mojave, and
since that does not support HFS+ anymore, everything will be upgraded to
APFS.

As I just found yesterday, we have one test that fails on that filesystem
(t9822, which is only run if Perforce's p4d is available).

The first patch adds a workaround, as I failed to find any way to finagle
APFS into accepting that ISO-8859-1 encoded file name.

The second patch is a fix to make things compile on Mojave again, apparently
Homebrew changed and the /usr/local/ directories need to be added to the
compiler and linker flags explicitly. Maybe this is a gcc-8 only thing, as
it seems to have affected only the osx-gcc job, not the osx-clang job.

Changes since v1:

 * Fix the tyop in the oneline of the first patch where it should talk about
   ISO-8859-1.

Johannes Schindelin (2):
  t9822: skip tests if file names cannot be ISO-8859-1 encoded
  macOS: make sure that gettext is found

 config.mak.uname                | 2 ++
 t/t9822-git-p4-path-encoding.sh | 7 +++++++
 2 files changed, 9 insertions(+)


base-commit: e35b8cb8e212e3557efc565157ceb5cbaaf0d87f
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-179%2Fdscho%2Fskip-t9822-on-apfs-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-179/dscho/skip-t9822-on-apfs-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/179

Range-diff vs v1:

 1:  52681aee0a ! 1:  6161c76702 t9822: skip tests if file names cannot be ISO-8895-1 encoded
     @@ -1,6 +1,6 @@
      Author: Johannes Schindelin <johannes.schindelin@gmx.de>
      
     -    t9822: skip tests if file names cannot be ISO-8895-1 encoded
     +    t9822: skip tests if file names cannot be ISO-8859-1 encoded
      
          Most notably, it seems that macOS' APFS does not allow that.
      
 2:  f006524f78 = 2:  25be67b1b7 macOS: make sure that gettext is found

-- 
gitgitgadget

```

## Johannes Schindelin via GitGitGadget, 2019-04-14 21:19

Subject: [PATCH v2 2/2] macOS: make sure that gettext is found
Message-ID: <25be67b1b74e585571213c9af1a314b95969090b.1555276767.git.gitgitgadget@gmail.com>
URL: https://gitlist.dev/e/25be67b1b74e585571213c9af1a314b95969090b.1555276767.git.gitgitgadget%40gmail.com
In-Reply-To: <pull.179.v2.git.gitgitgadget@gmail.com>

```
From: Johannes Schindelin <johannes.schindelin@gmx.de>

Due to reasons (some XCode versions seem to include gettext, some
don't?), Homebrew does not expose the libraries and headers in
/usr/local/ by default anymore.

Let's help find them again.

Note: for some reason, this is a change of behavior caused by the
upgrade to Mojave, identified in our Azure Pipeline; it seems that
Homebrew used to add the /usr/local/ directories to the include and link
search path before, but now it no longer does.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 config.mak.uname | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/config.mak.uname b/config.mak.uname
index 41e85fab1c..3605fead53 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -114,6 +114,8 @@ ifeq ($(uname_S),Darwin)
 	HAVE_BSD_SYSCTL = YesPlease
 	FREAD_READS_DIRECTORIES = UnfortunatelyYes
 	HAVE_NS_GET_EXECUTABLE_PATH = YesPlease
+	BASIC_CFLAGS += -I/usr/local/include
+	BASIC_LDFLAGS += -L/usr/local/lib
 endif
 ifeq ($(uname_S),SunOS)
 	NEEDS_SOCKET = YesPlease
-- 
gitgitgadget

```

## Johannes Schindelin, 2019-04-15 12:37

Subject: Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded
Message-ID: <nycvar.QRO.7.76.6.1904151434520.44@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1904151434520.44%40tvgsbejvaqbjf.bet
In-Reply-To: <6161c76702246ab34a520dae8104ad489b89b6a1.1555276767.git.gitgitgadget@gmail.com>

```
Hi Junio,

On Sun, 14 Apr 2019, Johannes Schindelin via GitGitGadget wrote:

> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> Most notably, it seems that macOS' APFS does not allow that.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

This is actually a quite important fix, really, as it makes *every* CI
build fail in the macOS part, meaning that I am swamped with false
positives until this is fixed.

It seems not to have made it into the js/macos-gettext-build branch,
though. Would you terribly mind picking it up, please?

Thanks,
Dscho

```

## Junio C Hamano, 2019-04-15 12:53

Subject: Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded
Message-ID: <CAPc5daVRq+tisZqpGVXTwHo7kgKUSfjB6dmjLTUQKqQ+Xh_5eg@mail.gmail.com>
URL: https://gitlist.dev/e/CAPc5daVRq%2BtisZqpGVXTwHo7kgKUSfjB6dmjLTUQKqQ%2BXh_5eg%40mail.gmail.com
In-Reply-To: <nycvar.QRO.7.76.6.1904151434520.44@tvgsbejvaqbjf.bet>

```
On Mon, Apr 15, 2019 at 9:37 PM Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
>
> It seems not to have made it into the js/macos-gettext-build branch,
> though. Would you terribly mind picking it up, please?

I think they are separately queued, so that they can graduate in any order,
even if/when one of them turns out to need rerolling.

```

## Johannes Schindelin, 2019-04-17 11:48

Subject: Re: [PATCH v2 1/2] t9822: skip tests if file names cannot be ISO-8859-1 encoded
Message-ID: <nycvar.QRO.7.76.6.1904171346550.46@tvgsbejvaqbjf.bet>
URL: https://gitlist.dev/e/nycvar.QRO.7.76.6.1904171346550.46%40tvgsbejvaqbjf.bet
In-Reply-To: <CAPc5daVRq+tisZqpGVXTwHo7kgKUSfjB6dmjLTUQKqQ+Xh_5eg@mail.gmail.com>

```
Hi Junio,

On Mon, 15 Apr 2019, Junio C Hamano wrote:

> On Mon, Apr 15, 2019 at 9:37 PM Johannes Schindelin
> <Johannes.Schindelin@gmx.de> wrote:
> >
> > It seems not to have made it into the js/macos-gettext-build branch,
> > though. Would you terribly mind picking it up, please?
>
> I think they are separately queued, so that they can graduate in any order,
> even if/when one of them turns out to need rerolling.

Okay.

Please note, though, that I had packaged them together because they *both*
need to advance to any branch in order to make it pass on Azure Pipelines
again. (And to be sure, they both fix real bugs in Git, they are not mere
workarounds necessary to make the CI builds "green" again.)

Ciao,
Dscho

```
