summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Novosyolov <m.novosyolov@rosalinux.ru>2020-01-25 01:11:12 +0300
committerPavel Shilovsky <pshilov@microsoft.com>2020-09-03 10:35:18 -0700
commita00e84378d9c5e63272ff69ca18fd0e872b384d3 (patch)
tree8eec4be64d3bc33166c138c1f0ab469612aafc80
parentb9d94cdbcee72024623ef61425c4de30512efc3f (diff)
downloadcifs-utils-a00e84378d9c5e63272ff69ca18fd0e872b384d3.tar.gz
cifs-utils-a00e84378d9c5e63272ff69ca18fd0e872b384d3.tar.bz2
cifs-utils-a00e84378d9c5e63272ff69ca18fd0e872b384d3.zip
cifs-utils: Respect DESTDIR when installing smb3 stuff
When make install is run during package building, DESTDIR parameter is passed, e.g.: $ rpm --eval %makeinstall_std make DESTDIR=/root/rpmbuild/BUILDROOT/%{name}-%{version}-%{release}-rosa2016.1.x86_64-buildroot install Without DESTDIR build scripts tried to create symlinks outside of the build root: make[3]: Entering directory '/tmp/abf/rpmbuild/BUILD/cifs-utils-6.10' (cd /sbin && ln -sf mount.cifs mount.smb3) ln: failed to create symbolic link 'mount.smb3': Permission denied The same fix was introduced in Arch Linux package when updating from 6.9 to 6.10: https://git.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/cifs-utils&id=c75b246a762ea9b90db404dfebc6d35d5b16972f
-rw-r--r--Makefile.am8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index 8e376be..a2bb611 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -118,11 +118,11 @@ endif
SUBDIRS = contrib
install-exec-hook:
- (cd $(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
+ (cd $(DESTDIR)$(ROOTSBINDIR) && ln -sf mount.cifs mount.smb3)
install-data-hook:
- (cd $(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
+ (cd $(DESTDIR)$(man8dir) && ln -sf mount.cifs.8 mount.smb3.8)
uninstall-hook:
- (cd $(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3)
- (cd $(man8dir) && rm -f $(man8dir)/mount.smb3.8)
+ (cd $(DESTDIR)$(ROOTSBINDIR) && rm -f $(ROOTSBINDIR)/mount.smb3)
+ (cd $(DESTDIR)$(man8dir) && rm -f $(DESTDIR)$(man8dir)/mount.smb3.8)