[nfs4-acl-tools] Build and package the GUI tool

Steve Dickson steved at fedoraproject.org
Wed Jul 16 17:13:28 UTC 2014


commit a13f36f56b054c46e29e23f40a9229bf3b56a387
Author: Nahum Shalman <nshalman-rpm at elys.com>
Date:   Wed Jul 16 13:11:19 2014 -0400

    Build and package the GUI tool
    
    Add patch to allow GUI tool to build correctly
    Package GUI tool in a child package
    
    Signed-off-by: Steve Dickson <steved at redhat.com>

 nfs4-acl-tools.spec                |   23 ++++++++++++++++++++++-
 nfs4acl-0.3.3-editor-strlcpy.patch |   12 ++++++++++++
 2 files changed, 34 insertions(+), 1 deletions(-)
---
diff --git a/nfs4-acl-tools.spec b/nfs4-acl-tools.spec
index 6ab3a68..1b4a8b9 100644
--- a/nfs4-acl-tools.spec
+++ b/nfs4-acl-tools.spec
@@ -1,6 +1,6 @@
 Name:           nfs4-acl-tools
 Version:        0.3.3
-Release:        12%{?dist}
+Release:        13%{?dist}
 Summary:        The nfs4 ACL tools
 Group:          Applications/System
 License:        BSD
@@ -11,9 +11,11 @@ Source0:        http://www.citi.umich.edu/projects/nfsv4/linux/nfs4-acl-tools/%{
 
 BuildRequires: libtool
 BuildRequires: libattr-devel
+BuildRequires: qt-devel
 
 Patch001: nfs4acl-0.3.3-ace.patch
 Patch002: nfs4acl-0.3.3-memleak.patch
+Patch003: nfs4acl-0.3.3-editor-strlcpy.patch
 
 Patch100: nfs4acl-0.2.0-compile.patch
 
@@ -26,6 +28,7 @@ NFSv4 client.
 
 %patch001 -p1
 %patch002 -p1
+%patch003 -p1
 
 %patch100 -p1
 
@@ -40,10 +43,15 @@ export LDFLAGS="-pie"
 %configure
 make %{?_smp_mflags}
 
+pushd GUI/nfs4-acl-editor
+qmake-qt4 nfs4-acl-editor.pro
+make %{?_smp_mflags}
+popd
 
 %install
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
+install -m 0755 GUI/nfs4-acl-editor/nfs4-acl-editor %{buildroot}/usr/bin/nfs4-acl-editor
 
 %clean
 rm -rf %{buildroot}
@@ -57,7 +65,20 @@ rm -rf %{buildroot}
 %{_mandir}/man1/*
 %{_mandir}/man5/*
 
+%package gui
+Summary:        The nfs4 ACL editing GUI
+
+%description gui
+This package contains GUI ACL utilities for the Linux NFSv4 client.
+
+%files gui
+%{_bindir}/nfs4-acl-editor
+
 %changelog
+* Tue Jul 15 2014 Nahum Shalman <nshalman-rpm at elys.com> 0.3.3-13
+- Add patch to allow GUI tool to build correctly
+- Package GUI tool in a child package
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.3.3-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 
diff --git a/nfs4acl-0.3.3-editor-strlcpy.patch b/nfs4acl-0.3.3-editor-strlcpy.patch
new file mode 100644
index 0000000..d4ed9c2
--- /dev/null
+++ b/nfs4acl-0.3.3-editor-strlcpy.patch
@@ -0,0 +1,12 @@
+diff -urN nfs4-acl-tools-0.3.3/GUI/nfs4-acl-editor/nfs4acleditor.cpp nfs4-acl-tools-0.3.3-fixed/GUI/nfs4-acl-editor/nfs4acleditor.cpp
+--- nfs4-acl-tools-0.3.3/GUI/nfs4-acl-editor/nfs4acleditor.cpp	2008-12-03 17:18:24.000000000 -0500
++++ nfs4-acl-tools-0.3.3-fixed/GUI/nfs4-acl-editor/nfs4acleditor.cpp	2010-09-08 13:23:49.000000000 -0400
+@@ -569,7 +569,7 @@
+ 		if (i > strlen(ace->who)) {
+ 			dprintf("syncWho(): fromlen %d  tolen %u\n", strlen(ace->who), i);
+ 		}
+-		strlcpy(ace->who, who, NFS4_MAX_PRINCIPALSIZE);
++		strncpy(ace->who, who, NFS4_MAX_PRINCIPALSIZE);
+ 	}
+ }
+ 


More information about the scm-commits mailing list