diff --git a/fontconfig-fix-make-check.patch b/fontconfig-fix-make-check.patch new file mode 100644 index 0000000..e8a73dc --- /dev/null +++ b/fontconfig-fix-make-check.patch @@ -0,0 +1,119 @@ +From 01e4f088bf467738d6cd547d4dea0e2bfe5eca57 Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Wed, 31 Jul 2019 13:18:51 +0000 +Subject: [PATCH] Fix the fails of make check when SOURCE_DATE_EPOCH is set + +Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/172 +--- + test/run-test.sh | 33 +++++++++++++++++++++++++++++++++ + 1 file changed, 33 insertions(+) + +diff --git a/test/run-test.sh b/test/run-test.sh +index 12198ff6..2e00f795 100644 +--- a/test/run-test.sh ++++ b/test/run-test.sh +@@ -82,11 +82,17 @@ export FONTCONFIG_FILE + dotest "Basic check" + prep + cp $FONT1 $FONT2 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + check + + dotest "With a subdir" + prep + cp $FONT1 $FONT2 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + $FCCACHE $FONTDIR + check + +@@ -94,6 +100,9 @@ dotest "Subdir with a cache file" + prep + mkdir $FONTDIR/a + cp $FONT1 $FONT2 $FONTDIR/a ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a ++fi + $FCCACHE $FONTDIR/a + check + +@@ -104,7 +113,13 @@ mkdir $FONTDIR/a/a + mkdir $FONTDIR/b + mkdir $FONTDIR/b/a + cp $FONT1 $FONTDIR/a ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/a ++fi + cp $FONT2 $FONTDIR/b/a ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/b/a ++fi + check + + dotest "Subdir with an out-of-date cache file" +@@ -141,6 +156,9 @@ if [ x"$BWRAP" != "x" -a "x$EXEEXT" = "x" ]; then + dotest "Basic functionality with the bind-mounted cache dir" + prep + cp $FONT1 $FONT2 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + $FCCACHE $FONTDIR + sleep 1 + ls -l $CACHEDIR > out1 +@@ -180,6 +198,9 @@ rm -rf $TESTTMPDIR out1 out2 xxx flist1 flist2 bind-fonts.conf + dotest "Different directory content between host and sandbox" + prep + cp $FONT1 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + $FCCACHE $FONTDIR + sleep 1 + ls -1 --color=no $CACHEDIR/*cache*> out1 +@@ -187,6 +208,9 @@ stat -c '%n %s %y %z' `cat out1` > stat1 + TESTTMPDIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` + TESTTMP2DIR=`mktemp -d /tmp/fontconfig.XXXXXXXX` + cp $FONT2 $TESTTMP2DIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $TESTTMP2DIR ++fi + sed "s!@FONTDIR@!$TESTTMPDIR/fonts$FONTDIR! + s!@REMAPDIR@!$TESTTMPDIR/fonts! + s!@CACHEDIR@!$TESTTMPDIR/cache.dir!" < $TESTDIR/fonts.conf.in > bind-fonts.conf +@@ -227,6 +251,9 @@ dotest "Check consistency of MD5 in cache name" + prep + mkdir -p $FONTDIR/sub + cp $FONT1 $FONTDIR/sub ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR/sub ++fi + $FCCACHE $FONTDIR + sleep 1 + (cd $CACHEDIR; ls -1 --color=no *cache*) > out1 +@@ -251,6 +278,9 @@ rm -rf $TESTTMPDIR out1 out2 bind-fonts.conf + dotest "Fallback to uuid" + prep + cp $FONT1 $FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $FONTDIR ++fi + touch -d @`stat -c %Y $FONTDIR` $FONTDIR + $FCCACHE $FONTDIR + sleep 1 +@@ -291,6 +321,9 @@ mkdir -p $MyPWD/sysroot/$FONTDIR + mkdir -p $MyPWD/sysroot/$CACHEDIR + mkdir -p $MyPWD/sysroot/$MyPWD + cp $FONT1 $MyPWD/sysroot/$FONTDIR ++if [ -n ${SOURCE_DATE_EPOCH:-} ]; then ++ touch -m -t "`date -d \"@${SOURCE_DATE_EPOCH}\" +%y%m%d%H%M.%S`" $MyPWD/sysroot/$FONTDIR ++fi + cp $MyPWD/fonts.conf $MyPWD/sysroot/$MyPWD/fonts.conf + $FCCACHE -y $MyPWD/sysroot + +-- +2.22.0 + diff --git a/fontconfig.spec b/fontconfig.spec index 4635444..28e492c 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -5,7 +5,7 @@ Summary: Font configuration and customization library Name: fontconfig Version: 2.13.91 -Release: 3%{?dist} +Release: 4%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code # fc-case/CaseFolding.txt is in the UCD @@ -19,6 +19,7 @@ Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch Patch1: %{name}-required-freetype-version.patch +Patch2: %{name}-fix-make-check.patch BuildRequires: expat-devel BuildRequires: freetype-devel >= %{freetype_version} @@ -160,6 +161,9 @@ HOME=/root /usr/bin/fc-cache -s %doc fontconfig-devel.txt fontconfig-devel %changelog +* Wed Jul 31 2019 Akira TAGOH - 2.13.91-4 +- Fix make check fails. + * Thu Jul 25 2019 Fedora Release Engineering - 2.13.91-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild