From nobody@FreeBSD.org  Mon Sep 10 10:06:27 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id E53D037B407
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 10 Sep 2001 10:06:26 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f8AH6QY85588;
	Mon, 10 Sep 2001 10:06:26 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200109101706.f8AH6QY85588@freefall.freebsd.org>
Date: Mon, 10 Sep 2001 10:06:26 -0700 (PDT)
From: david quattlebaum <david.quattlebaum@sas.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: zephyr DATADIR descrepancy
X-Send-Pr-Version: www-1.0

>Number:         30491
>Category:       ports
>Synopsis:       zephyr DATADIR descrepancy
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    jwd
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Sep 10 10:10:01 PDT 2001
>Closed-Date:    Sun Nov 25 15:55:14 PST 2001
>Last-Modified:  Sun Nov 25 16:10:03 PST 2001
>Originator:     david quattlebaum
>Release:        4.3-STABLE-20010625
>Organization:
sas institute, inc.
>Environment:
FreeBSD gamecock.unx.sas.com 4.3-STABLE-20010625
FreeBSD 4.3-STABLE-20010625 #3: Tue Jul 10 13:20:33 EDT 2001
toor@gamecock.unx.sas.com:/usr/src/sys/compile/GAMECOCK  i386
>Description:
zwgc and xzwrite are looking for system files in the wrong place.

DATADIR is set to: /usr/local/share/zephyr during configure and so
"make install" puts the files there.

zwgc and xzwrite look for the system files in:
/usr/local/share/zephyr/zephyr (one too many zephyr's in path).

the following patch will correct the problem.

>How-To-Repeat:
install zephyr and try to zwgc from a user that has NO .zwgc.desc
>Fix:
--- zwgc/main.c.orig Fri Jan 22 18:20:22 1999
+++ zwgc/main.c      Fri Sep  7 09:52:01 2001
@@ -141,7 +141,7 @@

 /*    var_clear_all_variables(); <<<>>> */

-    sprintf(defdesc, "%s/zephyr/%s", DATADIR, DEFDESC);
+    sprintf(defdesc, "%s/%s", DATADIR, DEFDESC);
     input_file = locate_file(description_filename_override, USRDESC,
defdesc);
     if (input_file)
       program = parse_file(input_file);
--- zwgc/X_driver.c.orig     Fri Jan 22 18:20:06 1999
+++ zwgc/X_driver.c  Fri Sep  7 09:52:27 2001
@@ -264,7 +264,7 @@
       return(1);

     /* Read in our application-specific resources: */
-    sprintf(dbasename, "%s/zephyr/zwgc_resources", DATADIR);
+    sprintf(dbasename, "%s/zwgc_resources", DATADIR);
     temp_db1 = XrmGetFileDatabase(dbasename);

     /*
--- clients/xzwrite/interface.c.orig    Thu Apr 30 16:03:32 1998
+++ clients/xzwrite/interface.c Fri Sep  7 09:56:56 2001
@@ -140,11 +140,11 @@
                                  strlen(DATADIR) + 12);
          if (path2 != NULL) {
 #ifdef HAVE_PUTENV
-              sprintf(path2, "XFILESEARCHPATH=%s:%s/zephyr/%%N", path1,
+              sprintf(path2, "XFILESEARCHPATH=%s:%s/%%N", path1,
                       DATADIR);
               putenv(path2);
 #else
-              sprintf(path2, "%s:%s/zephyr/%%N", path1, DATADIR);
+              sprintf(path2, "%s:%s/%%N", path1, DATADIR);
               setenv("XFILESEARCHPATH", path2, 1);
               free(path2);
 #endif

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->jwd 
Responsible-Changed-By: jwd 
Responsible-Changed-When: Wed Sep 26 17:46:40 PDT 2001 
Responsible-Changed-Why:  
I'll follow up with david about this patch. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30491 
State-Changed-From-To: open->feedback 
State-Changed-By: jwd 
State-Changed-When: Tue Nov 20 22:06:34 PST 2001 
State-Changed-Why:  
Patch committed. Wait on test & acknowledgement. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30491 
State-Changed-From-To: feedback->closed 
State-Changed-By: jwd 
State-Changed-When: Sun Nov 25 15:55:14 PST 2001 
State-Changed-Why:  


http://www.FreeBSD.org/cgi/query-pr.cgi?pr=30491 
>Unformatted:
