From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Mar 30 19:00:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECD131065673 for ; Sun, 30 Mar 2008 19:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B88508FC22 for ; Sun, 30 Mar 2008 19:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m2UJ01IM079727 for ; Sun, 30 Mar 2008 19:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m2UJ01va079726; Sun, 30 Mar 2008 19:00:01 GMT (envelope-from gnats) Resent-Date: Sun, 30 Mar 2008 19:00:01 GMT Resent-Message-Id: <200803301900.m2UJ01va079726@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stefan Sperling Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C056106564A for ; Sun, 30 Mar 2008 18:55:17 +0000 (UTC) (envelope-from stsp@stsp.name) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by mx1.freebsd.org (Postfix) with ESMTP id C29E78FC22 for ; Sun, 30 Mar 2008 18:55:16 +0000 (UTC) (envelope-from stsp@stsp.name) Received: from stsp.name (ted.stsp.name [217.197.84.186]) (authenticated bits=128) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id m2UItEXd031828 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Sun, 30 Mar 2008 20:55:14 +0200 Received: from ted.stsp.name (localhost [127.0.0.1]) by stsp.name (8.14.2/8.14.2) with ESMTP id m2UItDug024418 for ; Sun, 30 Mar 2008 20:55:13 +0200 (CEST) (envelope-from stsp@ted.stsp.name) Received: (from stsp@localhost) by ted.stsp.name (8.14.2/8.14.2/Submit) id m2UItCtn024417; Sun, 30 Mar 2008 20:55:12 +0200 (CEST) (envelope-from stsp) Message-Id: <200803301855.m2UItCtn024417@ted.stsp.name> Date: Sun, 30 Mar 2008 20:55:12 +0200 (CEST) From: Stefan Sperling To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/122268: graphics/graphviz creates symlinks in $HOME during installation X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stefan Sperling List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Mar 2008 19:00:02 -0000 >Number: 122268 >Category: ports >Synopsis: graphics/graphviz creates symlinks in $HOME during installation >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Mar 30 19:00:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Stefan Sperling >Release: FreeBSD 7.0-RELEASE i386 >Organization: >Environment: System: FreeBSD ted.stsp.name 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Sat Mar 29 23:54:21 CET 2008 stsp@ted.stsp.name:/usr/obj/home/stsp/src/freebsd-7.0/sys/TED i386 >Description: While reinstalling all my ports after upgrading from 6.3 to 7.0, I noticed that I suddenly had two symlinks in my home directory called gv.pm and gv.so: /home/stsp/gv.pm -> /usr/local/lib/graphviz/perl/gv.pm /home/stsp/gv.so -> /usr/local/lib/graphviz/perl/libgv_perl.so >How-To-Repeat: Note that I build ports as normal user, with SU_CMD=/home/stsp/bin/sucmd.sh That script contains: ---------------------------------------------------------------------- #!/bin/sh if [ -x /usr/local/bin/sudo ] then /usr/local/bin/sudo /bin/sh -c "$*" else /usr/bin/su root -c "$*" fi ---------------------------------------------------------------------- I also use WRKDIRPREFIX=/usr/obj To find out why the links were created I made them immutable: $ ls -lo ~/gv* lr-xr-xr-x 1 root stsp schg 34 Mar 30 20:18 /home/stsp/gv.pm -> /usr/local/lib/graphviz/perl/gv.pm lr-xr-xr-x 1 root stsp schg 42 Mar 30 20:18 /home/stsp/gv.so -> /usr/local/lib/graphviz/perl/libgv_perl.so and ran 'make deinstall reinstall' in the port's directory. Then I got this: ---------------------------------------------------------------------- gmake[4]: Entering directory `/usr/obj/usr/ports/graphics/graphviz/work/graphviz-2.18/tclpkg' mkdir -p ; usage: mkdir [-pv] [-m mode] directory_name ... gmake[4]: [install-data-hook] Error 64 (ignored) if test -w ; then \ (cd ; \ ln -s -f /usr/local/lib/graphviz/perl/libgv_perl.so gv.s o; \ ln -s -f /usr/local/lib/graphviz/perl/gv.pm gv.pm;) \ else \ echo "Warning: is not writable."; \ echo "Skipping system installation of perl binding."; \ fi ln: gv.so: Operation not permitted ln: gv.pm: Operation not permitted gmake[4]: *** [install-data-hook] Error 1 ---------------------------------------------------------------------- This happens even if TCL support is disabled. This is the configuration I set for this port: ---------------------------------------------------------------------- ===> The following configuration options are available for graphviz-2.18: ICONV=on "Build with ICONV support" XPM=on "Build with XPM support" DIGCOLA=off "DIGCOLA features in neato layout engine" IPSEPCOLA=off "IPSEPCOLA features in neato layout engine" NLS=on "Build with gettext support" TK=off "Build with TK support" PANGOCAIRO=on "build with pangocairo support" GTK=on "build with gtk plugin" GDK_PIXBUF=on "build with gdk pixbuf support" GNOMEUI=off "build with libgnomeui support" MING=off "Build with ming plugin" PERL=off "Perl bindings (swig)" PHP=off "PHP bindings (swig)" PYTHON=off "Python bindings (swig)" RUBY=off "Ruby bindings (swig)" LUA=off "Lua bindings (swig)" TCL=off "TCL bindings (swig)" GUILE=off "Guile bindings (swig)" ===> Use 'make config' to modify these settings ---------------------------------------------------------------------- >Fix: Looking at /usr/obj/usr/ports/graphics/graphviz/work/graphviz-2.18/tclpkg/Makefile, it seems like the section creating these links can be safely patched out (see below). Note that most of it is already commented, anyway. I have no idea why DESTDIR isn't set while the port runs 'make install' -- in the make error above you can see that DESTDIR is empty. This is probably what made the symlinks end up in my home directory. This is the relevant section of the Makefile. It should be commented out or removed altogether. ---------------------------------------------------------------------- # Installation of softlinks into non-owned directories is done as a # separate step, with soft failures, so that a developer can do: # ./configure --prefix=$HOME/graphviz; make; make install # without root priviledges. install-data-hook: -mkdir -p $(DESTDIR); if test -w $(DESTDIR); then \ (cd $(DESTDIR); \ $(LN_S) -f $(pkgperldir)/libgv_perl.so gv.so; \ $(LN_S) -f $(pkgperldir)/gv.pm gv.pm;) \ else \ echo "Warning: is not writable."; \ echo "Skipping system installation of perl binding."; \ fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR); then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgphpdir)/libgv_php.so gv.so;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of php binding."; \ # fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR); then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgphpdir)/gv.php gv.php;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of php binding."; \ # fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR); then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgpythondir)/libgv_python.so _gv.so; \ # $(LN_S) -f $(pkgpythondir)/gv.py gv.py;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of python binding."; \ # fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR); then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgpython23dir)/libgv_python23.so _gv.so; \ # $(LN_S) -f $(pkgpython23dir)/gv.py gv.py;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of python23 binding."; \ # fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR); then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgpython24dir)/libgv_python24.so _gv.so; \ # $(LN_S) -f $(pkgpython24dir)/gv.py gv.py;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of python24 binding."; \ # fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR); then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgpython25dir)/libgv_python25.so _gv.so; \ # $(LN_S) -f $(pkgpython25dir)/gv.py gv.py;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of python25 binding."; \ # fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR); then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgrubydir)/libgv_ruby.so gv.so;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of ruby binding."; \ # fi # -mkdir -p $(DESTDIR); # if test -w $(DESTDIR)/; then \ # (cd $(DESTDIR); \ # $(LN_S) -f $(pkgtcldir) graphviz-2.18;) \ # else \ # echo "Warning: is not writable."; \ # echo "Skipping system installation of tcl bindings."; \ # fi ---------------------------------------------------------------------- >Release-Note: >Audit-Trail: >Unformatted: