cifs-utils: make fails if keyutils isn't installed
Subsystems (2)
I moved from cifs-utils 5.0 to 5.2. I didn't have keyutils installed and the compilation failed because configure checks for its presence, but doesn't abort if it's missing, and make tries to link to it.
...
checking keyutils.h usability... no
checking keyutils.h presence... no
checking for keyutils.h... no
configure: WARNING: keyutils.h not found, consider installing keyutils-libs-devel. Disabling cifs.upcall.
configure: WARNING: keyutils.h not found, consider installing keyutils-libs-devel. Disabling cifs.idmap.
...
Makefile.in:
@CONFIG_CIFSACL_TRUE@getcifsacl_LDADD = -lkeyutils $(WINB_LDADD) @CONFIG_CIFSACL_TRUE@setcifsacl_LDADD = -lkeyutils $(WINB_LDADD)
Apparently, getcifsacl and setcifsacl don't use keyutils at all, but cifs-utils links to it ?
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 20120109124038.581218c9-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org
Shirish Pargaonkar
Acked-by2012/1/9 Jeff Layton <[email protected]>:
Quoted 58 lines
Quoted 14 lines · On Mon, 9 Jan 2012 14:00:15 -0200 Frédéric L. W. Meunier…
I moved from cifs-utils 5.0 to 5.2. I didn't have keyutils installed and the compilation failed because configure checks for its presence, but doesn't abort if it's missing, and make tries to link to it.
...
checkingkeyutils.husability... no
checkingkeyutils.hpresence... no
checking forkeyutils.h... no
configure: WARNING:keyutils.hnot found, consider installing keyutils-libs-devel. Disabling cifs.upcall.
configure: WARNING:keyutils.hnot found, consider installing keyutils-libs-devel. Disabling cifs.idmap.
...Quoted 7 lines
Makefile.in:
@CONFIG_CIFSACL_TRUE@getcifsacl_LDADD = -lkeyutils $(WINB_LDADD) @CONFIG_CIFSACL_TRUE@setcifsacl_LDADD = -lkeyutils $(WINB_LDADD)
Apparently, getcifsacl and setcifsacl don't use keyutils at all, but cifs-utils links to it ?
Good catch. Does this patch fix it?
----------------------[snip]--------------------
[PATCH] get/setcifsacl: don't link in -lkeyutils
These binaries don't use keys API at all. There's no need to link in the keys library.
Signed-off-by Jeff Layton <[email protected]>---
Makefile.am | 4 ++--1 files changed, 2 insertions(+), 2 deletions(-)Makefile.am +0
-0@@ -55,12 +55,12 @@ endifif
CONFIG_CIFSACL
bin_PROGRAMS += getcifsacl
getcifsacl_SOURCES =getcifsacl.cMakefile.am +1
-1-getcifsacl_LDADD = -lkeyutils $(WINB_LDADD) +getcifsacl_LDADD = $(WINB_LDADD)man_MANS += getcifsacl.1
bin_PROGRAMS += setcifsacl
setcifsacl_SOURCES =setcifsacl.cMakefile.am +1
-1-setcifsacl_LDADD = -lkeyutils $(WINB_LDADD) +setcifsacl_LDADD = $(WINB_LDADD)man_MANS += setcifsacl.1
Quoted 4 lines
endif
--
1.7.7.4
Should have never listed keyutils library on the link line in the first place.