Skip to contentSkip to conversation

cifs-utils: rewrite hardcoded paths in manpages

PATCH In review Jeff Layton 1 participant 2 messages Dec 9, 2010 – Dec 13, 2010 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cifs-utils: rewrite hardcoded paths in manpages

Currently the manpages (particularly cifs.upcall.8) have hardcoded paths in them that need to be manually adjusted. Replace those paths with @sbindir@ and add a makefile target that will use sed to replace those paths with the ones set by autoconf.

---
 Makefile.am                       |    6 ++++++
 cifs.upcall.8 => cifs.upcall.8.in |    4 ++--
 configure.ac                      |    1 +
 3 files changed, 9 insertions(+), 2 deletions(-)
 rename cifs.upcall.8 => cifs.upcall.8.in (97%)
Makefile.am +6 -0
index 38a16fe..cbfa846 100644
@@ -13,6 +13,12 @@ sbin_PROGRAMS = cifs.upcall
 cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c util.c
 cifs_upcall_LDADD = -ltalloc -lkeyutils $(KRB5_LDADD)
 man_MANS += cifs.upcall.8
+
+cifs.upcall.8: cifs.upcall.8.in
+	sed 's,\@sbindir\@,$(sbindir),' < $(srcdir)/cifs.upcall.8.in > cifs.upcall.8
+
+clean-local:
+	rm -f cifs.upcall.8
 endif
 
 if CONFIG_CIFSCREDS
cifs.upcall.8.in renamed from cifs.upcall.8 +2 -2
similarity index 97%
rename from cifs.upcall.8
rename to cifs.upcall.8.in
index 3207f6f..bef1ee6 100644
@@ -78,8 +78,8 @@ To make this program useful for CIFS, you\'ll need to set up entries for them in
 .nf
 #OPERATION  TYPE           D C PROGRAM ARG1 ARG2\&.\&.\&.
 #=========  =============  = = ================================
-create      cifs\&.spnego    * * /usr/local/sbin/cifs\&.upcall %k
-create      dns_resolver   * * /usr/local/sbin/cifs\&.upcall %k
+create      cifs\&.spnego    * * @sbindir@/cifs\&.upcall %k
+create      dns_resolver   * * @sbindir@/cifs\&.upcall %k
 .fi
 .if n \{\
 .RE
configure.ac +1 -0
index a04596c..093b48d 100644
@@ -24,6 +24,7 @@ AC_ARG_ENABLE(cifscreds,
 
 # Checks for programs.
 AC_PROG_CC
+AC_PROG_SED
 AC_GNU_SOURCE
 
 # Checks for header files.
Signature · 1 line
1.7.3.2

A message that is not in the archive (sent off-list or not yet received): 1291905440-12866-1-git-send-email-jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org

author Applied
#2 lore raw
Quoted 53 lines · On Thu, 9 Dec 2010 09:37:20 -0500 Jeff Layton…

Currently the manpages (particularly cifs.upcall.8) have hardcoded paths in them that need to be manually adjusted. Replace those paths with @sbindir@ and add a makefile target that will use sed to replace those paths with the ones set by autoconf.

---
 Makefile.am                       |    6 ++++++
 cifs.upcall.8 => cifs.upcall.8.in |    4 ++--
 configure.ac                      |    1 +
 3 files changed, 9 insertions(+), 2 deletions(-)
 rename cifs.upcall.8 => cifs.upcall.8.in (97%)
Makefile.am +6 -0
index 38a16fe..cbfa846 100644
@@ -13,6 +13,12 @@ sbin_PROGRAMS = cifs.upcall
 cifs_upcall_SOURCES = cifs.upcall.c data_blob.c asn1.c spnego.c util.c
 cifs_upcall_LDADD = -ltalloc -lkeyutils $(KRB5_LDADD)
 man_MANS += cifs.upcall.8
+
+cifs.upcall.8: cifs.upcall.8.in
+	sed 's,\@sbindir\@,$(sbindir),' < $(srcdir)/cifs.upcall.8.in > cifs.upcall.8
+
+clean-local:
+	rm -f cifs.upcall.8
 endif
 
 if CONFIG_CIFSCREDS
cifs.upcall.8.in renamed from cifs.upcall.8 +2 -2
similarity index 97%
rename from cifs.upcall.8
rename to cifs.upcall.8.in
index 3207f6f..bef1ee6 100644
@@ -78,8 +78,8 @@ To make this program useful for CIFS, you\'ll need to set up entries for them in
 .nf
 #OPERATION  TYPE           D C PROGRAM ARG1 ARG2\&.\&.\&.
 #=========  =============  = = ================================
-create      cifs\&.spnego    * * /usr/local/sbin/cifs\&.upcall %k
-create      dns_resolver   * * /usr/local/sbin/cifs\&.upcall %k
+create      cifs\&.spnego    * * @sbindir@/cifs\&.upcall %k
+create      dns_resolver   * * @sbindir@/cifs\&.upcall %k
 .fi
 .if n \{\
 .RE
configure.ac +0 -0
index a04596c..093b48d 100644

configure.ac AC_ARG_ENABLE(cifscreds, · line 30

Quoted 7 lines
configure.ac +1 -0
@@ -24,6 +24,7 @@ AC_ARG_ENABLE(cifscreds,
 
 # Checks for programs.
 AC_PROG_CC
+AC_PROG_SED
 AC_GNU_SOURCE
 
 # Checks for header files.

Pushed to cifs-utils master branch.

Signature · 1 line
Jeff Layton <[email protected]>