From nobody  Mon Mar 10 19:02:44 1997
Received: (from nobody@localhost)
          by freefall.freebsd.org (8.8.5/8.8.5) id TAA20949;
          Mon, 10 Mar 1997 19:02:44 -0800 (PST)
Message-Id: <199703110302.TAA20949@freefall.freebsd.org>
Date: Mon, 10 Mar 1997 19:02:44 -0800 (PST)
From: eivind@freebsd.org
To: freebsd-gnats-submit@freebsd.org
Subject: The teTeX port runs strup on /usr/local/bin
X-Send-Pr-Version: www-1.0

>Number:         2936
>Category:       ports
>Synopsis:       The teTeX port runs strup on /usr/local/bin
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    tg
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 10 19:10:02 PST 1997
>Closed-Date:    Mon Aug 4 23:57:18 PDT 1997
>Last-Modified:  Mon Aug  4 23:57:56 PDT 1997
>Originator:     Eivind Eklund
>Release:        -stable with -current ports collection
>Organization:
DiMaga Studios
>Environment:
FreeBSD sol.dimaga.com 2.1.7-RELEASE FreeBSD 2.1.7-RELEASE #0: Tue Feb 18 17:01:34 MET 1997     eivind@sol.dimaga.com:/usr/src/sys/compile/SOL  i386

>Description:
teTeX run strip on /usr/local/bin/* instead of using install -s.
This do (among other things) give anybody that have non-stripped suid
binaries in /usr/local/bin a very good scare.

>How-To-Repeat:
Install teTeX with non-stripped binaries in /usr/local/bin
>Fix:
Apply this patch to ports/print/patches/patch-aa  (This is NOT a
replacement patch - it is a patch to the patch.)

--- ../../patches/patch-aa      Mon Feb 17 22:37:30 1997
+++ /tmp/mkdiff Tue Mar 11 03:35:52 1997
@@ -1,5 +1,5 @@
 --- Makefile.orig      Sun Jan 19 22:49:55 1997
-+++ Makefile   Tue Jan 28 09:32:32 1997
++++ Makefile   Tue Mar 11 03:35:43 1997
 @@ -8,10 +8,10 @@
  #=========================================================================
  VERSION = 0.4
@@ -13,6 +13,15 @@
  
  # For "real" 64bit OS, e.g. Digital Unix 4.0. Irix6?, use:
  # CFLAGS += -DPOINTER_IS_NOT_INT
+@@ -21,7 +21,7 @@
+ 
+ # -s makes problems on some platforms. We run strip after "make install",
+ # so we really do not need -s here.
+-LDFLAGS       =
++LDFLAGS       = -s
+ 
+ # The shared libXmu from OpenWindows is buggy on some SunOS 4.1.3 systems.
+ # If you run into this problem (when linking xdvi), set BROKEN_SUNOS_LIBXMU
 @@ -70,24 +70,24 @@
  # set USE_DIALOG=false if compiling dialog causes trouble on your system
  # texconfig will still run in command-mode
@@ -42,20 +51,30 @@
  
  # change the true/false definition of FOIL, if you get an error with wchar_t
  FOIL          = false
-@@ -111,9 +111,9 @@
+@@ -110,10 +110,10 @@
+ SHELL         = /bin/sh
  platform      = $(shell ./config.guess | sed 's/-.*-/-/')
  CWD           := $(shell pwd)
- INSTALL               = $(CWD)/$(KPSEDIR)/bin/install -c
+-INSTALL               = $(CWD)/$(KPSEDIR)/bin/install -c
 -override prefix       = $(TETEXDIR)
 -override bindir       = $(prefix)/bin/$(platform)
 -override TEXMF        = $(TETEXDIR)/texmf
++INSTALL               = install -s -c
 +override prefix       = $(PREFIX)
 +override bindir       = $(PREFIX)/bin
 +override TEXMF        = $(PREFIX)/share/texmf
  override PATH := $(bindir):$(CWD)/bin-extra:$(CWD)/$(KPSEDIR)/bin:$(PATH)
  
  CONFDIRS   = $(KPSEDIR) $(TEXIDIR)
-@@ -259,16 +259,7 @@
+@@ -205,7 +205,6 @@
+       for i in $(SUBDIRS); do \
+         (set -x; cd $$i; $(MAKE) $(PASSENV) $@ || exit 1); \
+       done
+-      @strip $(bindir)/* >/dev/null 2>&1 || true
+ 
+ rmcache:
+       rm -f config.cache
+@@ -259,16 +258,7 @@

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: asami 
State-Changed-When: Tue Mar 11 02:46:44 PST 1997 
State-Changed-Why:  
Thanks, committed.  By the way, two things: your patch was mangled 
(why is it a patch from "patch-aa" to "/tmp/mkdiff"?) and the last 
hunk didn't apply, and I had to recreate it by myself.  Also, 
please don't do cut & paste from an unintelligent terminal 
emulator (like xterm), it causes patches to fail rather miserably. 

By the way, I ignored the first hunk; it was only changing the 
State-Changed-From-To: closed->open 
State-Changed-By: asami 
State-Changed-When: Tue Mar 11 03:12:50 PST 1997 
State-Changed-Why:  
D'oh!  This is what I get for committing a change without 
testing the patch. :( 

This patch completely breaks the installation.  Please fix and 
re-submit.  Don't be fooled by "make install" making it to the end, 
there are errors in the middle that will kill "make package".  (Actually 
that's another bug in teTeX, that an error in the middle doesn't kill 
the make process.) 

From: Eivind Eklund <eivind@dimaga.com>
To: freebsd-gnats-submit@freebsd.org,
        Satoshi Asami <asami@freefall.freebsd.org>
Cc: freebsd-ports@freefall.freebsd.org
Subject: Re: ports/2936: The teTeX port runs strup on /usr/local/bin
Date: Tue, 11 Mar 1997 14:13:23 +0100

 At 03:15 AM 3/11/97 -0800, Satoshi Asami wrote:
 >Synopsis: The teTeX port runs strup on /usr/local/bin
 >
 >State-Changed-From-To: closed->open
 >State-Changed-By: asami
 >State-Changed-When: Tue Mar 11 03:12:50 PST 1997
 >State-Changed-Why: 
 >D'oh!  This is what I get for committing a change without
 >testing the patch. :(
 >
 >This patch completely breaks the installation.  Please fix and
 >re-submit.  Don't be fooled by "make install" making it to the end,
 >there are errors in the middle that will kill "make package".  (Actually
 >that's another bug in teTeX, that an error in the middle doesn't kill
 >the make process.)
 
 At least on my machine, the same problems were present prior and after
 applying my patch.
 I just re-tested it - using the original port, and
 
 % make
 % su
 # make install
 # exit
 % make package
 
 I get errors for missing inimf, virmf, install-info, xdvi.bin, texinfo-12,
 web2c/mf.log, and web2c/mf.base.
 
 Replacing the old patch-aa with my new version (the one in /tmp/mktemp :)
 and doing
 % su
 # pkg_delete teTeX-0.4
 # make clean
 # exit
 % make
 % su
 # make install
 # exit
 % make package
 
 give me errors in the exact same files.
 
 Most of this seems due to -lXt missing during compile, which I assumed was
 a -stable problem. For some reason, this port does not accept
 LD_LIBRARY_PATH - but I assumed it worked under -current.
 
 All files but the ones listed above seems to be installed fine, with or
 without the patch.
 
 Did it package OK when you reverted?
 If it did, I have no clue what can be wrong - and there is no way for me to
 test it until I get my -current box up.
 
 
 Eivind Eklund perhaps@yes.no http://maybe.yes.no/perhaps/ eivind@freebsd.org

From: asami@vader.cs.berkeley.edu (Satoshi Asami)
To: eivind@dimaga.com
Cc: freebsd-gnats-submit@freebsd.org, freebsd-ports@freefall.freebsd.org
Subject: Re: ports/2936: The teTeX port runs strup on /usr/local/bin
Date: Tue, 11 Mar 1997 15:30:09 -0800 (PST)

  * I get errors for missing inimf, virmf, install-info, xdvi.bin, texinfo-12,
  * web2c/mf.log, and web2c/mf.base.
 
  * Did it package OK when you reverted?
 
 You are right -- I reverted the patch but I still can't build it.  I
 have the same problem with or without your patch.  However, the list
 of errors is different, I have a bunch of bin/* files missing.
 
 -------
 ===>  Building package for teTeX-0.4
 tar: can't add file bin/gftodvi : No such file or directory
 tar: can't add file bin/gftopk : No such file or directory
 tar: can't add file bin/mft : No such file or directory
 tar: can't add file bin/pktogf : No such file or directory
 tar: can't add file bin/pktype : No such file or directory
 tar: can't add file bin/vftovp : No such file or directory
 tar: can't add file bin/vptovf : No such file or directory
 tar: can't add file bin/gftype : No such file or directory
 tar: can't add file bin/pltotf : No such file or directory
 tar: can't add file bin/tftopl : No such file or directory
 tar command failed with code 256
 -------
 
 I put the log in
 
 ftp://han.cs.berkeley.edu/pub/tetex.log.gz
 
 If you can take a look, it will be appreciated.  My system is
 RELENG_2_2 (naturally, it's the packages-2.2 building machine).
 
 Satoshi

From: Eivind Eklund <eivind@dimaga.com>
To: asami@vader.cs.berkeley.edu (Satoshi Asami)
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: ports/2936: The teTeX port runs strup on /usr/local/bin
Date: Wed, 12 Mar 1997 23:48:11 +0100

 At 03:30 PM 3/11/97 -0800, Satoshi Asami wrote:
 > * I get errors for missing inimf, virmf, install-info, xdvi.bin, texinfo-12,
 > * web2c/mf.log, and web2c/mf.base.
 >
 > * Did it package OK when you reverted?
 >
 >You are right -- I reverted the patch but I still can't build it.  I
 >have the same problem with or without your patch.  However, the list
 >of errors is different, I have a bunch of bin/* files missing.
 >
 >-------
 >===>  Building package for teTeX-0.4
 >tar: can't add file bin/gftodvi : No such file or directory
 >tar: can't add file bin/gftopk : No such file or directory
 >tar: can't add file bin/mft : No such file or directory
 >tar: can't add file bin/pktogf : No such file or directory
 >tar: can't add file bin/pktype : No such file or directory
 >tar: can't add file bin/vftovp : No such file or directory
 >tar: can't add file bin/vptovf : No such file or directory
 >tar: can't add file bin/gftype : No such file or directory
 >tar: can't add file bin/pltotf : No such file or directory
 >tar: can't add file bin/tftopl : No such file or directory
 >tar command failed with code 256
 >-------
 >
 >I put the log in
 >
 >ftp://han.cs.berkeley.edu/pub/tetex.log.gz
 >
 >If you can take a look, it will be appreciated.  My system is
 >RELENG_2_2 (naturally, it's the packages-2.2 building machine).
 
 Compiler dying with signal 6.  There is something DEFINEATLY weird about
 this port; everything looks OK, it compiles on some machine but not others,
 and the EXACT SAME COMMANDS written in a shell will compile the things that
 fail consistently under gmake (at least on my box).  Can you try that for
 your errors?
 
 
 
 Eivind Eklund perhaps@yes.no http://maybe.yes.no/perhaps/ eivind@freebsd.org
Responsible-Changed-From-To: freebsd-ports->tg 
Responsible-Changed-By: tg 
Responsible-Changed-When: Mon Jun 16 23:38:42 PDT 1997 
Responsible-Changed-Why:  
I have all the other teTeX related PRs. 
State-Changed-From-To: open->closed 
State-Changed-By: tg 
State-Changed-When: Mon Aug 4 23:57:18 PDT 1997 
State-Changed-Why:  

Fixed in latest port update. 
>Unformatted:
