On Tue, 2015-03-24 at 13:51 +0100, Lukas Slebodnik wrote:
On (23/03/15 14:49), Simo Sorce wrote:
On Mon, 2015-03-23 at 12:03 -0400, Simo Sorce wrote:
On Mon, 2015-03-23 at 16:28 +0100, Lukas Slebodnik wrote:
On (23/03/15 11:04), Simo Sorce wrote:
For some reason gss-proxy started to fail configure step.
This patch fixes it for me.
-- Simo Sorce * Red Hat, Inc * New York
From 4efb5ab5686d7bfe00e2a387ba66de4e43ddf317 Mon Sep 17 00:00:00 2001 From: Simo Sorce simo@redhat.com Date: Sun, 22 Mar 2015 16:53:50 -0400 Subject: [PATCH] Fix Makefile issues raise by latest autotools
proxy/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxy/Makefile.am b/proxy/Makefile.am index 63cada6ae67e69c726c34503ef23a19b5750aa63..2dcd5519e09f4de994a4046172464fe5ceb12966 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -242,7 +242,7 @@ replace_script = \ $(edit_cmd) $${srcdir}$@.in >$@.tmp; \ mv $@.tmp $@
-EXTRA_DIST += \ +EXTRA_DIST = \ systemd/gssproxy.service.in \ examples/gssproxy.conf.in \ examples/mech.in
I cannot see any occurence of automake variable "EXTRA_DIST" in proxy/Makefile.am. (git HEAD)
sh$ git grep -n EXTRA_DIST proxy/man/Makefile.am:17:EXTRA_DIST = $(man_MANS:%=%.xml) $(wildcard $(srcdir)/include/*.xml) proxy/man/Makefile.am:66:#EXTRA_DIST += \
The bug is in patch "[PATCH] Fix variable replacement in non config files" and is not related to the latest autotools.
BTW patch is right, because you cannot append values unless automake variable vas defined.
Ahh right I had forgotten I introduced that change in a recent patch, as the patch had been laying there for months.
I retire this patch and I pushed to my review branch a modified "[PATCH] Fix variable replacement in non config files" patch.
I am dealing with an make rpms problem now, once I have a fix for that I will do a few testa dn then push the lot to master and clear all related tickets.
Thank you all for the reviews.
Turned out I had to change the original patch quite a bit, and add a patch to fix the contrib spec file.
Here they are.
Simo.
-- Simo Sorce * Red Hat, Inc * New York
From 41ede96d17905387160b0ec83176b7d78c0bd8fa Mon Sep 17 00:00:00 2001 From: Simo Sorce simo@redhat.com Date: Fri, 9 Jan 2015 14:56:44 -0500 Subject: [PATCH 2/2] Fix variable replacement in non config files
Fixes: #132
Signed-off-by: Simo Sorce simo@redhat.com
proxy/Makefile.am | 38 +++++++++++++++++++++++++++++++++----- proxy/configure.ac | 4 ++-- 2 files changed, 35 insertions(+), 7 deletions(-)
diff --git a/proxy/Makefile.am b/proxy/Makefile.am index 4ba129d92a211607164ca27e866ef277bbcd31d7..9675aeb3a3213f5e6d4efbd8c4024a960ffb554d 100644 --- a/proxy/Makefile.am +++ b/proxy/Makefile.am @@ -23,6 +23,7 @@ localedir = @localedir@ ccpath = @ccpath@ initdir = @initdir@ systemdunitdir = @systemdunitdir@ +examplesdir= @datarootdir@/examples
This variable is not used, but may be after my proposal. (We will see :-)
But it would be better to install examples in gss-proxy subdirectory (/usr/share/gss-proxy/examples) instead of directly in datarootdir (/usr/share/examples)
I do not install them at all now I think.
logpath = @logpath@ pubconfpath = @pubconfpath@ pkgconfigdir = $(libdir)/pkgconfig @@ -221,11 +222,33 @@ endif #######################
dist_init_SCRIPTS = -dist_systemdunit_DATA = -if HAVE_SYSTEMD_UNIT
- dist_systemdunit_DATA += \
systemd/gssproxy.service
-endif
+edit_cmd = $(SED) \
- -e 's|@sbindir[@]|$(sbindir)|g' \
- -e 's|@localstatedir[@]|$(localstatedir)|g' \
- -e 's|@libdir[@]|$(libdir)|g' \
- -e 's|@gpstatedir[@]|$(prefix)|g'
+replace_script = \
- @rm -f $@ $@.tmp; \
- srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit_cmd) $${srcdir}$@.in >$@.tmp; \
- mv $@.tmp $@
+EXTRA_DIST = \
- systemd/gssproxy.service.in \
- examples/gssproxy.conf.in \
- examples/mech.in
+systemd/gssproxy.service: systemd/gssproxy.service.in Makefile
- $(replace_script)
If the configure script is not running from $(srcdir) then directory systemd does not exist. => make distcheck fails
Previously the directory was created by autotools.
I removed it as it was using MKDIR_P macro and I've seen some version of autotools do not export it by default anymore, I can add it back.
+examples/gssproxy.conf: examples/gssproxy.conf.in Makefile
- $(replace_script)
+examples/mech: examples/mech.in Makefile
- $(replace_script)
The same problem here.
installgsspdirs:: mkdir -p \ @@ -257,6 +280,11 @@ else mkdir -p $(DESTDIR)$(initdir) endif
+install-data-hook: systemd/gssproxy.service examples/mech examples/gssproxy.conf +if HAVE_SYSTEMD_UNIT
- cp systemd/gssproxy.service $(DESTDIR)$(systemdunitdir)
+endif
It's better to let automake install service file instead of install-data-hook.
I couldn't figure out a way to do so, automake is not my strong suit.
If the service is added to automake variable "systemdunit_DATA" then automake will install it and uninstall it.
I just removed it because it was copying the file generated before make dist and that one had the wrong paths. Because the file was copied the makefile found it there and never regenerated it.
The only difference is that you replace "dist_systemdunit_DATA" with "systemdunit_DATA" otherwise generated file "gssproxy.service" would be included in tarball. We want to include template intarball (and it's done with adding files to EXTRA_DIST)
Ahh this is the trick! Thanks a lot, I can revise the patch now.
From 9fb8248d1c4e203ebe1008ecb226164a989e25bc Mon Sep 17 00:00:00 2001 From: Simo Sorce simo@redhat.com Date: Mon, 23 Mar 2015 14:21:01 -0400 Subject: [PATCH 1/2] Default to systemd initscript in rpm spec file
proxy/contrib/gssproxy.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/proxy/contrib/gssproxy.spec.in b/proxy/contrib/gssproxy.spec.in index 3bc4df8262e9dc1954212c7f876de50818e95313..8f9f823fea4958d62074ece85cf1cdf5bdd5fac3 100644 --- a/proxy/contrib/gssproxy.spec.in +++ b/proxy/contrib/gssproxy.spec.in @@ -59,7 +59,7 @@ A proxy for GSSAPI credential handling autoreconf -f -i %configure \ --with-pubconf-path=%{pubconfpath} \
- --with-init-dir=%{_initrddir} \
- --with-initscript=systemd \ --disable-static \ --disable-rpath
ACK
I'm attaching few patches which could simplify fixing problems. If you like them feel free to squash them into your patch.
The last two patches are two alternatives for example files. a) examples_v1
- instal data directly to etc with "make install"
- it's not probably the best idea because you would overwrite these files
with each invocation of "make istall"
- I just wanted to simplify spec file
b) examples_v2
- install data to /usr/share/gss-proxy/examples
- this version is not complete because files from that directory are not packaged in spec file. ( you can also remove then in "%install" section.
c) 3rd alternative is to use your version with "install-data-hook:"
- there can be probelm with make uninstall => make distcheck may fail (I did not test it.
I need to think how to install configuration files in the rpm. Can't leave the rpm package w/o conf files, so I'll work on that.
Would it be ok to coalesce all your patches into one and mark you as the author ? I think I do not want to touch the original patch again, and rather have your name on a new one I lay on top.
Simo.