Bug 38602

Summary: x11-wm/tvtwm is confused about PREFIX
Product: Ports & Packages Reporter: parv <parv.0zero9+freebsd>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description parv 2002-05-27 10:20:02 UTC
x11-wm/tvtwm port creates plist w/ $PREFIX but does not install there...

===>  Installing for tvtwm-pl11
===>   tvtwm-pl11 depends on executable: mkhtmlindex - found
/usr/bin/install -c -s  tvtwm /usr/X11R6/bin/tvtwm
install in . done
+ /usr/bin/install -c -m 0444 tvtwm.1.html /usr/X11R6/lib/X11/doc/html/tvtwm.1.html
rm -f /usr/X11R6/man/man1/tvtwm.1*
/usr/bin/install -c -m 0444 tvtwm._man  /usr/X11R6/man/man1/tvtwm.1
gzip -n /usr/X11R6/man/man1/tvtwm.1
install.man in . done
===>   Generating temporary packing list
===>   Registering installation for tvtwm-pl11
===>  Building package for tvtwm-pl11
tar: can't add file man/man1/tvtwm.1.gz : No such file or directory
tar: can't add file lib/X11/doc/html/tvtwm.1.html : No such file or directory
tar: can't add file bin/tvtwm : No such file or directory
pkg_create: make_dist: tar command failed with code 256
Creating package /source/ports/x11-wm/tvtwm/tvtwm-pl11.tgz


i specified PREFIX=/usr/X11R6/wm/tvtwm...

#  pkg_info -L /var/db/pkg/tvtwm-pl11/+CONTENTS | fgrep /usr
/usr/X11R6/wm/tvtwm/man/man1/tvtwm.1.gz
/usr/X11R6/wm/tvtwm/lib/X11/doc/html/tvtwm.1.html
/usr/X11R6/wm/tvtwm/bin/tvtwm

#  pkg_info -L /var/db/pkg/tvtwm-pl11/+CONTENTS | fgrep /usr | xargs ls -l
ls: /usr/X11R6/wm/tvtwm/bin/tvtwm: No such file or directory
ls: /usr/X11R6/wm/tvtwm/lib/X11/doc/html/tvtwm.1.html: No such file or directory
ls: /usr/X11R6/wm/tvtwm/man/man1/tvtwm.1.gz: No such file or directory

#  pkg_info -L /var/db/pkg/tvtwm-pl11/+CONTENTS | fgrep /usr | sed 's#wm/tvtwm/##' | xargs ls -l
-rwxr-xr-x  1 root  wheel  181544 May 27 05:00 /usr/X11R6/bin/tvtwm
-r--r--r--  1 root  wheel   90744 May 27 05:00 /usr/X11R6/lib/X11/doc/html/tvtwm.1.html
-r--r--r--  1 root  wheel   22421 May 27 05:00 /usr/X11R6/man/man1/tvtwm.1.gz

How-To-Repeat: 
try to create package w/ PREFIX other than /usr/X11R6.  or, after
installing w/ alternative PREFIX, run the following command to see
error message like above...

pkg_info -L /var/db/pkg/tvtwm-pl11/+CONTENTS | \
fgrep /usr | xargs ls -l
Comment 1 Ying-Chieh Liao freebsd_committer freebsd_triage 2002-05-27 10:37:54 UTC
Responsible Changed
From-To: freebsd-ports->gpalmer

over to maintainer
Comment 2 dwcjr 2002-05-27 14:59:15 UTC
What happens if you mkdir /tmp/test
and make install into PREFIX=/tmp/test

I think don't PREFIX was setup quite for what you were trying to do 
in this pr.

-- 
David W. Chapman Jr.
dwcjr@inethouston.net	Raintree Network Services, Inc. <www.inethouston.net>
dwcjr@freebsd.org	FreeBSD Committer <www.FreeBSD.org>
Comment 3 parv 2002-05-27 20:31:49 UTC
in message <20020527135915.GH88906@leviathan.inethouston.net>,
wrote David W. Chapman Jr. thusly...
>
> What happens if you mkdir /tmp/test
> and make install into PREFIX=/tmp/test

same thing happens ... +CONTENTS gets the /tmp/test reference but
files are actually installed under /usr/X11R6.


> I think don't PREFIX was setup quite for what you were trying to do 
> in this pr.

well, i have installed both x11-wm/fvwm2 & x11-wm/fvwm-devel w/
PREFIX=/usr/X11R6/wm/fvwm-{stable,devel}, respectively, and
everything was installed as expected.  did i get lucky?


  - parv

--
Comment 4 parv 2002-05-27 20:35:53 UTC
in message <20020527135915.GH88906@leviathan.inethouston.net>, wrote
David W. Chapman Jr. thusly...
>
> I think don't PREFIX was setup quite for what you were trying to
> do in this pr.

if not, then how does one install a port in non standard location?


--
Comment 5 dwcjr 2002-05-27 20:57:16 UTC
> > What happens if you mkdir /tmp/test
> > and make install into PREFIX=/tmp/test
>
> same thing happens ... +CONTENTS gets the /tmp/test reference but
> files are actually installed under /usr/X11R6.

This may be a real problem then.  I've heard there are problems installing
under a prefix somewhere

like setting prefix to /usr/X11R6/somefile or /usr/local/bin/testprefix, but
setting the prefix to something like /tmp/test should work, if not then
there's something wrong with the port.

>
>
> > I think don't PREFIX was setup quite for what you were trying to do
> > in this pr.
>
> well, i have installed both x11-wm/fvwm2 & x11-wm/fvwm-devel w/
> PREFIX=/usr/X11R6/wm/fvwm-{stable,devel}, respectively, and
> everything was installed as expected.  did i get lucky?
>
Possibly.
Comment 6 Doug Barton freebsd_committer freebsd_triage 2003-03-15 06:04:35 UTC
Responsible Changed
From-To: gpalmer->freebsd-ports-bugs


gpalmer is no longer with us
Comment 7 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-07 00:45:50 UTC
State Changed
From-To: open->closed

It installs properly here with PREFIX set to /home/edwin/X11R6-5. 
THanks for your report!
Comment 8 parv 2003-04-07 09:09:39 UTC
(Re)sending to -gnats-submit as i forgot in the reply which went o Edwin
& -ports-bugs.


in message <200304062346.h36NkRbN052478@freefall.freebsd.org>,
wrote Edwin Groothuis thusly...
>
...
> State-Changed-From-To: open->closed
> State-Changed-By: edwin
> State-Changed-When: Sun Apr 6 16:45:50 PDT 2003
> State-Changed-Why: 
> It installs properly here with PREFIX set to /home/edwin/X11R6-5.
> THanks for your report!
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=38602

Problem is not solved yet.  USE_X_PREFIX seem to override PREFIX;
empty +CONTENTS is put in the /var/db/pkg/tvtwm-pl11.  Below is the
relevant output end of following commands...

  # ls -alF /tmp/test
  # make -d v install PREFIX=/tmp/test
  # ls -alF /tmp/test/bin
  # make deinstall
  # ls -alF /var/db/pkg/tvtwm-pl11/

total 4
drwxr-xr-x  2 root  wheel  512 Apr  7 03:40 ./
drwxrwxrwt  4 root  wheel  512 Apr  7 03:33 ../
...
Applying :S to ""
Result is ""
Applying :S to "/usr2/local/lib/perl5/site_perl/5.8.0"
Result is "lib/perl5/site_perl/5.8.0"
Applying :S to "/tmp/test/share/doc/tvtwm"
Result is "share/doc/tvtwm"
Applying :S to "/tmp/test/share/examples/tvtwm"
Result is "share/examples/tvtwm"
Applying :S to "/tmp/test/share/tvtwm"
Result is "share/tvtwm"
Applying :S to "OSREL=4.8 PREFIX=%D LOCALBASE=/usr2/local X11BASE=/usr2/X11R6 PORTDOCS="" PORTOBJFORMAT=elf XAWVER=7 PERL_VERSION=5.8.0  PERL_VER=5.8.0  PERL_ARCH=mach  SITE_PERL=lib/perl5/site_perl/5.8.0 DOCSDIR="share/doc/tvtwm"  EXAMPLESDIR="share/examples/tvtwm"  DATADIR="share/tvtwm""
Result is "OSREL=4.8!g PREFIX=%D!g LOCALBASE=/usr2/local!g X11BASE=/usr2/X11R6!g PORTDOCS=""!g PORTOBJFORMAT=elf!g XAWVER=7!g PERL_VERSION=5.8.0!g PERL_VER=5.8.0!g PERL_ARCH=mach!g SITE_PERL=lib/perl5/site_perl/5.8.0!g DOCSDIR="share/doc/tvtwm"!g EXAMPLESDIR="share/examples/tvtwm"!g DATADIR="share/tvtwm"!g"
Applying :S to "OSREL=4.8!g PREFIX=%D!g LOCALBASE=/usr2/local!g X11BASE=/usr2/X11R6!g PORTDOCS=""!g PORTOBJFORMAT=elf!g XAWVER=7!g PERL_VERSION=5.8.0!g PERL_VER=5.8.0!g PERL_ARCH=mach!g SITE_PERL=lib/perl5/site_perl/5.8.0!g DOCSDIR="share/doc/tvtwm"!g EXAMPLESDIR="share/examples/tvtwm"!g DATADIR="share/tvtwm"!g"
Result is " -e s!%%OSREL=4.8!g  -e s!%%PREFIX=%D!g  -e s!%%LOCALBASE=/usr2/local!g  -e s!%%X11BASE=/usr2/X11R6!g  -e s!%%PORTDOCS=""!g  -e s!%%PORTOBJFORMAT=elf!g  -e s!%%XAWVER=7!g  -e s!%%PERL_VERSION=5.8.0!g  -e s!%%PERL_VER=5.8.0!g  -e s!%%PERL_ARCH=mach!g  -e s!%%SITE_PERL=lib/perl5/site_perl/5.8.0!g  -e s!%%DOCSDIR="share/doc/tvtwm"!g  -e s!%%EXAMPLESDIR="share/examples/tvtwm"!g  -e s!%%DATADIR="share/tvtwm"!g"
Applying :S to " -e s!%%OSREL=4.8!g  -e s!%%PREFIX=%D!g  -e s!%%LOCALBASE=/usr2/local!g  -e s!%%X11BASE=/usr2/X11R6!g  -e s!%%PORTDOCS=""!g  -e s!%%PORTOBJFORMAT=elf!g  -e s!%%XAWVER=7!g  -e s!%%PERL_VERSION=5.8.0!g  -e s!%%PERL_VER=5.8.0!g  -e s!%%PERL_ARCH=mach!g  -e s!%%SITE_PERL=lib/perl5/site_perl/5.8.0!g  -e s!%%DOCSDIR="share/doc/tvtwm"!g  -e s!%%EXAMPLESDIR="share/examples/tvtwm"!g  -e s!%%DATADIR="share/tvtwm"!g"
Result is "-e s!%%OSREL%%!4.8!g -e s!%%PREFIX%%!%D!g -e s!%%LOCALBASE%%!/usr2/local!g -e s!%%X11BASE%%!/usr2/X11R6!g -e s!%%PORTDOCS%%!""!g -e s!%%PORTOBJFORMAT%%!elf!g -e s!%%XAWVER%%!7!g -e s!%%PERL_VERSION%%!5.8.0!g -e s!%%PERL_VER%%!5.8.0!g -e s!%%PERL_ARCH%%!mach!g -e s!%%SITE_PERL%%!lib/perl5/site_perl/5.8.0!g -e s!%%DOCSDIR%%!"share/doc/tvtwm"!g -e s!%%EXAMPLESDIR%%!"share/examples/tvtwm"!g -e s!%%DATADIR%%!"share/tvtwm"!g"
post-install:@ = post-install
post-install:* = post-install
post-install:? = 
post-install:> = 
post-install-script:@ = post-install-script
post-install-script:* = post-install-script
post-install-script:? = 
post-install-script:> = 
Applying :S to "post-install-script"
Result is "post-install"
Applying :S to "post-install-script"
Result is "post-install"
compress-man:@ = compress-man
compress-man:* = compress-man
compress-man:? = 
compress-man:> = 
run-ldconfig:@ = run-ldconfig
run-ldconfig:* = run-ldconfig
run-ldconfig:? = 
run-ldconfig:> = 
fake-pkg:@ = fake-pkg
fake-pkg:* = fake-pkg
generate-commentfile:@ = generate-commentfile
generate-commentfile:* = generate-commentfile
generate-commentfile:? = 
generate-commentfile:> = 
Applying :Q to "Twm with a virtual desktop"
Result is "Twm\ with\ a\ virtual\ desktop"
fake-pkg:> = generate-commentfile
fake-pkg:? = generate-commentfile
*** Error code 2

Stop in /usr3/ports/x11-wm/tvtwm.
total 4
drwxr-xr-x   2 root  wheel  512 Apr  7 03:42 ./
drwxr-xr-x  11 root  wheel  512 Apr  7 03:42 ../
===>  Deinstalling for tvtwm-pl11
pkg_delete: package 'tvtwm-pl11' doesn't have a prefix
*** Error code 1

Stop in /usr3/ports/x11-wm/tvtwm.
total 8.0k
-rw-r--r--   1 root     wheel           0 Apr  7 03:42 +CONTENTS
drwxr-xr-x   2 root     wheel         512 Apr  7 03:42 ./
drwxr-xr-x 227 root     wheel        6.0k Apr  7 03:42 ../


  - parv

--
Comment 9 parv 2003-04-09 18:10:03 UTC
in message <20030407075136.GA1778@moo.holy.cow>,
wrote parv thusly...
>
> in message <200304062346.h36NkRbN052478@freefall.freebsd.org>,
> wrote Edwin Groothuis thusly...
> >
> > State-Changed-From-To: open->closed
...
> > State-Changed-When: Sun Apr 6 16:45:50 PDT 2003
> > State-Changed-Why: 
> > It installs properly here with PREFIX set to /home/edwin/X11R6-5.
> 
> Problem is not solved yet.  USE_X_PREFIX seem to override PREFIX;
> empty +CONTENTS is put in the /var/db/pkg/tvtwm-pl11.  Below is the
> relevant output end of following commands...

Could somebody please reopen this PR as this PR seemed to be
steam-rolled over in order to close it.

Problem still exists & i can reproduce on demand.  If somebody need
some form of debugging data not already submitted, i am more than
willing to do that; just let me know what i need to do to generate
that data.


  - parv

--
Comment 10 Edwin Groothuis freebsd_committer freebsd_triage 2003-04-10 00:12:06 UTC
State Changed
From-To: closed->open

reopnend on maintainer request.
Comment 11 Will Andrews freebsd_committer freebsd_triage 2003-06-12 03:41:34 UTC
State Changed
From-To: open->feedback

This problem is caused by the fact the project uses imake.  Imake is 
known to be rather inflexible when it comes to differing between build 
and install time variables.  I gave it a shot, but I don't see an easy 
way to make this port PREFIX-safe.  We could always just use our own 
install target if that would suit you.  What do you think?
Comment 12 Kris Kennaway freebsd_committer freebsd_triage 2003-11-01 03:12:06 UTC
State Changed
From-To: feedback->closed

Feedback timeout
Comment 13 parv 2003-11-01 03:42:05 UTC
in message <200311010312.hA13CE7c034780@freefall.freebsd.org>,
wrote Kris Kennaway thusly...
>
> Synopsis: x11-wm/tvtwm is confused about PREFIX
> 
> State-Changed-From-To: feedback->closed
> State-Changed-By: kris
> State-Changed-When: Fri Oct 31 19:12:06 PST 2003
> State-Changed-Why: 
> Feedback timeout
> 
> http://www.freebsd.org/cgi/query-pr.cgi?pr=38602

Argh, sorry about that.

It seems that my exchange w/ Will Andrews, will@freebsd, on
-ports-bugs list, during Jun 11-12 2003, did not make to the PR
database. Message IDs were...

  <200306120243.h5C2huqK041071@freefall.freebsd.org>
  <20030612074916.GB62097@moo.holy.cow>
  <20030612140846.GK6610@procyon.firepipe.net>


...This time i have explicitly added -gnats-submit list as
one of the recipients.

Essentially, i agreed w/ Will A's suggestion.  Could it be possible
to file this message as feedback, and reopen this PR?


  - Parv

--
Comment 14 Kris Kennaway freebsd_committer freebsd_triage 2003-11-01 03:51:10 UTC
State Changed
From-To: closed->open

Reopening after feedback from submitter
Comment 15 Mark Linimon freebsd_committer freebsd_triage 2003-12-29 02:39:01 UTC
State Changed
From-To: open->suspended

Mark as suspended until/unless someone wants to come up 
with a patch to implement Will's suggestion.
Comment 16 Pete Fritchman freebsd_committer freebsd_triage 2004-05-02 20:46:42 UTC
State Changed
From-To: suspended->closed

I added a do-install target to the tvtwm makefile and I can install to 
PREFIX=/tmp/test and deinstall successfully.