Skip to content

Commit

Permalink
Always install the gss module configuration
Browse files Browse the repository at this point in the history
This changes the example file name from "mech" to proxymech.conf
and always installs this file. Downstreams have been already doing
this for a long time, might as well do it upstream as well.

Also tidy up install dirs when only the gss module is built.

Signed-off-by: Simo Sorce <simo@redhat.com>
  • Loading branch information
simo5 committed May 16, 2022
1 parent 1af7fc4 commit 3d8601e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
20 changes: 11 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ systemduserunitdir = @systemduserunitdir@
examplesdir= @datarootdir@/examples
logpath = @logpath@
pubconfpath = @pubconfpath@
gssconfdir = @gssconfpath@
pkgconfigdir = $(libdir)/pkgconfig

gpstatedir = @gpstatedir@
Expand Down Expand Up @@ -255,6 +256,8 @@ endif
# Installation Extras #
#######################

gssconf_DATA = examples/proxymech.conf

if BUILD_PROXY
systemdunit_DATA =
systemduserunit_DATA =
Expand All @@ -274,8 +277,7 @@ noinst_DATA = \
examples/gssproxy.conf \
examples/24-nfs-server.conf \
examples/80-httpd.conf \
examples/99-network-fs-clients.conf \
examples/mech
examples/99-network-fs-clients.conf


edit_cmd = $(SED) \
Expand All @@ -299,7 +301,7 @@ EXTRA_DIST = \
examples/24-nfs-server.conf.in \
examples/80-httpd.conf.in \
examples/99-network-fs-clients.conf.in \
examples/mech.in
examples/proxymech.conf.in

systemd/gssproxy.service: systemd/gssproxy.service.in Makefile
@$(MKDIR_P) systemd/
Expand All @@ -317,14 +319,13 @@ examples/%.conf: examples/%.conf.in Makefile
@$(MKDIR_P) examples/
$(replace_script)

examples/mech: examples/mech.in Makefile
@$(MKDIR_P) examples/
$(replace_script)

installgsspdirs::
mkdir -p \
$(DESTDIR)$(includedir) \
$(DESTDIR)$(libdir) \
$(DESTDIR)$(gssconfdir)
if BUILD_PROXY
mkdir -p \
$(DESTDIR)$(includedir) \
$(DESTDIR)$(sbindir) \
$(DESTDIR)$(mandir) \
$(DESTDIR)$(gsspconfdir) \
Expand All @@ -333,6 +334,7 @@ installgsspdirs::
$(DESTDIR)$(gpstatedir) \
$(DESTDIR)$(gpclidir) \
$(DESTDIR)$(pubconfpath)
endif

if HAVE_DOXYGEN
docs:
Expand All @@ -357,7 +359,7 @@ clean-local:
rm -Rf testdir

CLEANFILES = *.X */*.X */*/*.X \
examples/mech \
examples/proxymech.conf \
examples/gssproxy.conf \
examples/24-nfs-server.conf \
examples/80-httpd.conf \
Expand Down
17 changes: 17 additions & 0 deletions conf_macros.m4
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ AC_DEFUN([WITH_PUBCONF_PATH],
AC_DEFINE_UNQUOTED(PUBCONF_PATH, "$config_pubconfpath", [Where to store pubconf files for gssproxy])
])

AC_DEFUN([WITH_GSSCONF_PATH],
[ AC_ARG_WITH([gssconf-path],
[AC_HELP_STRING([--with-gssconf-path=PATH],
[Where to store gss mech config [/etc/gss/mech.d]]
)
]
)
config_gssconfpath="\"SYSCONFDIR\"/gss/mech.d"
gssconfpath="${sysconfdir}/gss/mech.d"
if test x"$with_gssconf_path" != x; then
config_gssconfpath=$with_gssconf_path
gssconfpath=$with_gssconf_path
fi
AC_SUBST(gssconfpath)
AC_DEFINE_UNQUOTED(GSSCONF_PATH, "$config_gssconfpath", [Where to store gss mech config])
])

AC_DEFUN([WITH_SOCKET_NAME],
[ AC_ARG_WITH([socket-name],
[AC_HELP_STRING([--with-socket-name=PATH],
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ WITH_DISTRO_VERSION
WITH_CC_PATH
WITH_LOG_PATH
WITH_PUBCONF_PATH
WITH_GSSCONF_PATH
WITH_SOCKET_NAME
WITH_PID_FILE
WITH_TEST_DIR
Expand Down
6 changes: 3 additions & 3 deletions contrib/gssproxy.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ install -d -m755 %{buildroot}%{_sysconfdir}/gssproxy
install -m644 examples/gssproxy.conf %{buildroot}%{_sysconfdir}/gssproxy/gssproxy.conf
install -m644 examples/24-nfs-server.conf %{buildroot}%{_sysconfdir}/gssproxy/24-nfs-server.conf
install -m644 examples/99-network-fs-clients.conf %{buildroot}%{_sysconfdir}/gssproxy/99-network-fs-clients.conf
mkdir -p %{buildroot}%{_sysconfdir}/gss/mech.d
install -m644 examples/mech %{buildroot}%{_sysconfdir}/gss/mech.d/gssproxy.conf
install -d -m755 %{buildroot}%{_sysconfdir}/gss/mech.d
install -m644 examples/proxymech.conf %{buildroot}%{_sysconfdir}/gss/mech.d/proxymech.conf
mkdir -p %{buildroot}%{gpstatedir}/rcache

%clean
Expand All @@ -94,7 +94,7 @@ rm -rf %{buildroot}
%attr(0600,root,root) %config(noreplace) /%{_sysconfdir}/gssproxy/gssproxy.conf
%attr(0600,root,root) %config(noreplace) /%{_sysconfdir}/gssproxy/24-nfs-server.conf
%attr(0600,root,root) %config(noreplace) /%{_sysconfdir}/gssproxy/99-network-fs-clients.conf
%attr(0644,root,root) %config(noreplace) /%{_sysconfdir}/gss/mech.d/gssproxy.conf
%attr(0644,root,root) %config(noreplace) /%{_sysconfdir}/gss/mech.d/proxymech.conf
%{_libdir}/gssproxy/proxymech.so
%{_mandir}/man5/gssproxy.conf.5*
%{_mandir}/man8/gssproxy.8*
Expand Down
File renamed without changes.

0 comments on commit 3d8601e

Please sign in to comment.