groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] INSTALL_DATA in contrib/groffer/Makefile.sub


From: Ingo Schwarze
Subject: [Groff] INSTALL_DATA in contrib/groffer/Makefile.sub
Date: Sun, 16 Oct 2011 13:24:59 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Hi,

i just noticed that, when i last looked at our groff port,
the most important mail slipped (which is embarrassing, sorry).

Three unrelated issues are discussed in that mail, so i'm addressing
them separately - better late than never:


Werner LEMBERG wrote on Wed, Mar 30, 2011 at 09:31:02PM +0200:

> This patch I don't understand, inspite of reading the comment.

I have included the patch below for easy reference.

> Can you please explain what's bad about INSTALL_DATA and INSTALL_SCRIPT?

The code patched below is part of the "groffer" target,
and that target is called by the "all" target, i.e.
during the build phase.  The OpenBSD ports system is running
the build phase as a regular user, not as root.

In the top level Makefile.in, we have address@hidden@;
after the top level configure, we end up in the top level config.log
with "INSTALL_DATA='install -c -o root -g bin -m 444'" which indeed
makes sense, because ultimately you *want* to install stuff as root.

However, trying to use that during the build phase fails with
"permission denied" because you would need root for "install -o root".
What groffer/Makefile.sub does is abuse of INSTALL_* anyway
because it's not installing anything at that point; it's just
copying files around locally, within in the build directories.

Yours,
  Ingo


$OpenBSD: patch-contrib_groffer_Makefile_sub,v 1.1 2011/03/19 16:48:53 schwarze 
Exp $
# Do not attempt "install -o root" during the build phase, or you get:
#   install: roff2dvi: chown/chgrp: Operation not permitted
#   Build for all aborted
--- contrib/groffer/Makefile.sub.orig   Fri Jan  9 07:25:52 2009
+++ contrib/groffer/Makefile.sub        Sat Dec 25 13:32:11 2010
@@ -78,9 +78,9 @@ groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
            -e "s|@VERSION@|$(version)$(revision)|g" \
            -e "$(SH_SCRIPT_SED_CMD)" \
            $(srcdir)/perl/groffer.pl >$@; \
-         $(INSTALL_DATA) $(srcdir)/perl/groffer.man groffer.man; \
+         cp $(srcdir)/perl/groffer.man groffer.man; \
          for f in $(ROFF2PROGS); do \
-           $(INSTALL_SCRIPT) $(srcdir)/perl/roff2.pl $$f; \
+           cp $(srcdir)/perl/roff2.pl $$f; \
          done; \
        else \
          : >HAVE_SHELL; \
@@ -92,9 +92,9 @@ groffer: $(GROFFER_PERL) $(GROFFER_SHELL) \
            -e "s|@VERSION@|$(version)$(revision)|g" \
            -e "$(SH_SCRIPT_SED_CMD)" \
             $(srcdir)/shell/groffer.sh >$@; \
-         $(INSTALL_DATA) $(srcdir)/shell/groffer.man groffer.man; \
+         cp $(srcdir)/shell/groffer.man groffer.man; \
          for f in $(ROFF2PROGS); do \
-           $(INSTALL_SCRIPT) $(srcdir)/shell/roff2.sh $$f; \
+           cp $(srcdir)/shell/roff2.sh $$f; \
          done; \
        fi
        chmod +x $@




reply via email to

[Prev in Thread] Current Thread [Next in Thread]