Skip to content

Commit 18f4429

Browse files
committed
CDRIVER-1864, CDRIVER-1865 fix Debian package build in Evergreen, 2
1 parent 9ea9162 commit 18f4429

File tree

2 files changed

+30
-14
lines changed

2 files changed

+30
-14
lines changed

.evergreen/config.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,15 +1557,23 @@ tasks:
15571557
set -o errexit
15581558
if [ "${is_patch}" = "true" ]; then
15591559
cd mongoc
1560-
git diff HEAD > ../evergreen.patch
1560+
git diff HEAD -- . ':!debian' > ../upstream.patch
1561+
git diff HEAD -- debian > ../debian.patch
15611562
git clean -fdx
15621563
git reset --hard HEAD
1563-
[ -d debian/patches ] || mkdir debian/patches
1564-
mv ../evergreen.patch debian/patches/
1565-
echo evergreen.patch >> debian/patches/series
1566-
git add debian/patches/*
1567-
git commit -m 'Evergreen patch build'
1568-
git log -n1 -p
1564+
if [ -s ../upstream.patch ]; then
1565+
[ -d debian/patches ] || mkdir debian/patches
1566+
mv ../upstream.patch debian/patches/
1567+
echo upstream.patch >> debian/patches/series
1568+
git add debian/patches/*
1569+
git commit -m 'Evergreen patch build - upstream changes'
1570+
git log -n1 -p
1571+
fi
1572+
if [ -s ../debian.patch ]; then
1573+
git apply --index ../debian.patch
1574+
git commit -m 'Evergreen patch build - Debian packaging changes'
1575+
git log -n1 -p
1576+
fi
15691577
cd ..
15701578
fi
15711579
git clone https://salsa.debian.org/installer-team/debootstrap.git debootstrap.git

build/config.yml.template

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,15 +1560,23 @@ tasks:
15601560
set -o errexit
15611561
if [ "${is_patch}" = "true" ]; then
15621562
cd mongoc
1563-
git diff HEAD > ../evergreen.patch
1563+
git diff HEAD -- . ':!debian' > ../upstream.patch
1564+
git diff HEAD -- debian > ../debian.patch
15641565
git clean -fdx
15651566
git reset --hard HEAD
1566-
[ -d debian/patches ] || mkdir debian/patches
1567-
mv ../evergreen.patch debian/patches/
1568-
echo evergreen.patch >> debian/patches/series
1569-
git add debian/patches/*
1570-
git commit -m 'Evergreen patch build'
1571-
git log -n1 -p
1567+
if [ -s ../upstream.patch ]; then
1568+
[ -d debian/patches ] || mkdir debian/patches
1569+
mv ../upstream.patch debian/patches/
1570+
echo upstream.patch >> debian/patches/series
1571+
git add debian/patches/*
1572+
git commit -m 'Evergreen patch build - upstream changes'
1573+
git log -n1 -p
1574+
fi
1575+
if [ -s ../debian.patch ]; then
1576+
git apply --index ../debian.patch
1577+
git commit -m 'Evergreen patch build - Debian packaging changes'
1578+
git log -n1 -p
1579+
fi
15721580
cd ..
15731581
fi
15741582
git clone https://salsa.debian.org/installer-team/debootstrap.git debootstrap.git

0 commit comments

Comments
 (0)