{"thread":{"id":"35312","subject":"[PATCH] git-remote-mediawiki: do not remove installed files in \"clean\" target","startedAt":"2013-11-09T02:22:39Z","lastAt":"2013-11-11T21:26:13Z","messageCount":7,"participants":["Jonathan Nieder","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"230264","messageId":"20131109022239.GI10302@google.com","threadId":"35312","inReplyTo":null,"subject":"[PATCH] git-remote-mediawiki: do not remove installed files in \"clean\" target","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-09T02:22:39Z","receivedAt":"2013-11-09T02:22:39Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Running \"make clean\" after a successful \"make install\" should not\nresult in a broken mediawiki remote helper.\n\nReported-by: Thorsten Glaser <t.glaser@tarent.de>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nThanks for the very pleasant mediawiki remote helper.\n\n contrib/mw-to-git/Makefile | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile\nindex f206f96..c5547f9 100644\n--- a/contrib/mw-to-git/Makefile\n+++ b/contrib/mw-to-git/Makefile\n@@ -43,7 +43,6 @@ install: install_pm\n clean:\n \t$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=\"$(SCRIPT_PERL_FULL)\" \\\n                 clean-perl-script\n-\trm $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)\n \n perlcritic:\n \tperlcritic -5 $(SCRIPT_PERL)\n-- \n1.8.4.1\n"},{"id":"230355","messageId":"vpqli0xstcw.fsf@anie.imag.fr","threadId":"35312","inReplyTo":"20131109022239.GI10302@google.com","subject":"Re: [PATCH] git-remote-mediawiki: do not remove installed files in \"clean\" target","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-09T11:32:47Z","receivedAt":"2013-11-09T11:32:47Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Running \"make clean\" after a successful \"make install\" should not\n> result in a broken mediawiki remote helper.\n\nAcked-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n\nIdeally, there could be a \"make uninstall\" removing the installed file.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"230427","messageId":"20131111204504.GM10302@google.com","threadId":"35312","inReplyTo":"vpqli0xstcw.fsf@anie.imag.fr","subject":"Re: [PATCH] git-remote-mediawiki: do not remove installed files in \"clean\" target","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-11T20:45:04Z","receivedAt":"2013-11-11T20:45:04Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Matthieu Moy wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n\n>> Running \"make clean\" after a successful \"make install\" should not\n>> result in a broken mediawiki remote helper.\n>\n> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n\nThanks for looking it over.  Here are a few more makefile tweaks on\ntop of that one.\n\nJonathan Nieder (3):\n  git-remote-mediawiki: honor DESTDIR in \"make install\"\n  git-remote-mediawiki build: make 'install' command configurable\n  git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace\n\n contrib/mw-to-git/Makefile | 8 +++++++-\n 1 file changed, 7 insertions(+), 1 deletion(-)\n"},{"id":"230428","messageId":"20131111204529.GN10302@google.com","threadId":"35312","inReplyTo":"20131111204504.GM10302@google.com","subject":"[PATCH 1/3] git-remote-mediawiki: honor DESTDIR in \"make install\"","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-11T20:45:29Z","receivedAt":"2013-11-11T20:45:29Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"So now you can run\n\n\tDESTDIR=$(pwd)/tmp make -Ccontrib/mw-to-git install\n\nto install the mediawiki remote helper, git-mw tool, and Git::Mediawiki\nperl module under tmp/ as preparation for zipping it up and extracting\non another machine.\n\nWhile at it, make sure the directory that should contain Git::Mediawiki\nexists before putting a file there.  Without this patch, the makefile\nuses DESTDIR when installing git-mw and git-remote-mediawiki but not\nthe perl module, resulting in errors from \"make install\" if the\n$(INSTLIBDIR)/Git directory does not exist:\n\n install: cannot create regular file \\\n '/usr/share/perl/5.18.1/Git/Mediawiki.pm': No such file or directory\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n contrib/mw-to-git/Makefile | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile\nindex c5547f9..ee78fda 100644\n--- a/contrib/mw-to-git/Makefile\n+++ b/contrib/mw-to-git/Makefile\n@@ -30,7 +30,9 @@ test: all\n check: perlcritic test\n \n install_pm:\n-\tinstall $(GIT_MEDIAWIKI_PM) $(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)\n+\tinstall -d -m 755 $(DESTDIR)$(INSTLIBDIR)/Git\n+\tinstall -m 644 $(GIT_MEDIAWIKI_PM) \\\n+\t\t$(DESTDIR)$(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)\n \n build:\n \t$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=\"$(SCRIPT_PERL_FULL)\" \\\n-- \n1.8.4.1\n"},{"id":"230429","messageId":"20131111204550.GO10302@google.com","threadId":"35312","inReplyTo":"20131111204504.GM10302@google.com","subject":"[PATCH 2/3] git-remote-mediawiki build: make 'install' command configurable","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-11T20:45:50Z","receivedAt":"2013-11-11T20:45:50Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"On some machines, the most usable 'install' tool is named\n'ginstall'.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n contrib/mw-to-git/Makefile | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile\nindex ee78fda..e685dad 100644\n--- a/contrib/mw-to-git/Makefile\n+++ b/contrib/mw-to-git/Makefile\n@@ -18,6 +18,8 @@ SCRIPT_PERL+=git-mw.perl\n GIT_ROOT_DIR=../..\n HERE=contrib/mw-to-git/\n \n+INSTALL = install\n+\n SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))\n INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \\\n                 -s --no-print-directory instlibdir)\n@@ -30,8 +32,8 @@ test: all\n check: perlcritic test\n \n install_pm:\n-\tinstall -d -m 755 $(DESTDIR)$(INSTLIBDIR)/Git\n-\tinstall -m 644 $(GIT_MEDIAWIKI_PM) \\\n+\t$(INSTALL) -d -m 755 $(DESTDIR)$(INSTLIBDIR)/Git\n+\t$(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \\\n \t\t$(DESTDIR)$(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)\n \n build:\n-- \n1.8.4.1\n"},{"id":"230430","messageId":"20131111204612.GP10302@google.com","threadId":"35312","inReplyTo":"20131111204504.GM10302@google.com","subject":"[PATCH 3/3] git-remote-mediawiki build: handle DESTDIR/INSTLIBDIR with whitespace","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2013-11-11T20:46:12Z","receivedAt":"2013-11-11T20:46:12Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Quote DESTDIR and INSTLIBDIR for the shell in the same way as is done in\nthe toplevel Makefile to avoid confusion in case they contain shell\nmetacharacters.\n\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\n contrib/mw-to-git/Makefile | 6 ++++--\n 1 file changed, 4 insertions(+), 2 deletions(-)\n\ndiff --git a/contrib/mw-to-git/Makefile b/contrib/mw-to-git/Makefile\nindex e685dad..a4b6f7a 100644\n--- a/contrib/mw-to-git/Makefile\n+++ b/contrib/mw-to-git/Makefile\n@@ -23,6 +23,8 @@ INSTALL = install\n SCRIPT_PERL_FULL=$(patsubst %,$(HERE)/%,$(SCRIPT_PERL))\n INSTLIBDIR=$(shell $(MAKE) -C $(GIT_ROOT_DIR)/perl \\\n                 -s --no-print-directory instlibdir)\n+DESTDIR_SQ = $(subst ','\\'',$(DESTDIR))\n+INSTLIBDIR_SQ = $(subst ','\\'',$(INSTLIBDIR))\n \n all: build\n \n@@ -32,9 +34,9 @@ test: all\n check: perlcritic test\n \n install_pm:\n-\t$(INSTALL) -d -m 755 $(DESTDIR)$(INSTLIBDIR)/Git\n+\t$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/Git'\n \t$(INSTALL) -m 644 $(GIT_MEDIAWIKI_PM) \\\n-\t\t$(DESTDIR)$(INSTLIBDIR)/$(GIT_MEDIAWIKI_PM)\n+\t\t'$(DESTDIR_SQ)$(INSTLIBDIR_SQ)/$(GIT_MEDIAWIKI_PM)'\n \n build:\n \t$(MAKE) -C $(GIT_ROOT_DIR) SCRIPT_PERL=\"$(SCRIPT_PERL_FULL)\" \\\n-- \n1.8.4.1\n"},{"id":"230438","messageId":"vpq4n7ieikq.fsf@anie.imag.fr","threadId":"35312","inReplyTo":"20131111204504.GM10302@google.com","subject":"Re: [PATCH] git-remote-mediawiki: do not remove installed files in \"clean\" target","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-11-11T21:26:13Z","receivedAt":"2013-11-11T21:26:13Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> Matthieu Moy wrote:\n>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>>> Running \"make clean\" after a successful \"make install\" should not\n>>> result in a broken mediawiki remote helper.\n>>\n>> Acked-by: Matthieu Moy <Matthieu.Moy@imag.fr>\n>\n> Thanks for looking it over.  Here are a few more makefile tweaks on\n> top of that one.\n\nAll look good to me. Is it intentional that you didn't Cc Junio?\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"}]}