nfs-ganesha: fix patch for debian/rules
authorDan Mick <dmick@redhat.com>
Fri, 9 Apr 2021 02:40:24 +0000 (19:40 -0700)
committerDan Mick <dmick@redhat.com>
Fri, 9 Apr 2021 03:15:53 +0000 (20:15 -0700)
Some branches of nfs-ganesha-debian don't have the right format for
the patch file to work (Cmake features can be turned on or off
with various words, ON/OFF, YES/NO, etc.).  Use sed instead to be
more resilient to such chicanery.

Signed-off-by: Dan Mick <dmick@redhat.com>
nfs-ganesha/build/build_deb

index 3dfffbc90ef1d7d07cd3988e8afbaab26712b621..3744006e299a6b1cdf7cbf08a79cb6db986ab8b4 100644 (file)
@@ -85,16 +85,9 @@ cd $WORKSPACE/nfs-ganesha
 # add debian directory next to src
 mv $WORKSPACE/nfs-ganesha-debian/debian $WORKSPACE/nfs-ganesha/
 
-# create and apply a patch to disable LizardFS FSAL see
+# disable LizardFS FSAL see
 # https://review.gerrithub.io/c/ffilz/nfs-ganesha/+/475437
-echo "LS0tIGEvZGViaWFuL3J1bGVzCisrKyBiL2RlYmlhbi9ydWxlcwpAQCAtMjgsNiArMjgsNyBAQCBv
-dmVycmlkZV9kaF9hdXRvX2NvbmZpZ3VyZToKIAkJLURVU0VfRlNBTF9YRlM9T0ZGIFwKIAkJLURV
-U0VfRlNBTF9DRVBIPU9OIFwKIAkJLURVU0VfRlNBTF9SR1c9T04gXAorCQktRFVTRV9GU0FMX0xJ
-WkFSREZTPU9GRiBcCiAJCS1EVVNFX0ZTQUxfR1BGUz1PRkYgXAogCQktRFVTRV9GU0FMX1BBTkZT
-PU9GRiBcCiAJCS1EVVNFX0ZTQUxfR0xVU1RFUj1PRkYgXAo="|base64 -d > disable-lizardfs-fsal.patch
-
-patch -p1 < disable-lizardfs-fsal.patch
-rm -f disable-lizardfs-fsal.patch
+sed -i '/-DUSE_FSAL_RGW=/a\                    -DUSE_FSAL_LIZARDFS=NO \\' debian/rules
 
 ## Get some basic information about the system and the repository
 DEB_ARCH=$(dpkg-architecture -qDEB_BUILD_ARCH)