Bug 1465

Summary: bad XPROJECTROOT (Xprint)
Product: xorg Reporter: Grzegorz Dąbrowski <gdx>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high CC: roland.mainz
Version: 6.8.1   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
proposed patch none

Description Grzegorz Dąbrowski 2004-09-25 00:54:53 UTC
I have X11 installed in /usr (defined ProjectRoot=/usr) and /etc/init.d/xprint
don't know about it but should :). I propose patch:

diff -urN xc.orig/programs/Xserver/Xprint/etc/init.d/Imakefile
xc/programs/Xserver/Xprint/etc/init.d/Imakefile
--- xc.orig/programs/Xserver/Xprint/etc/init.d/Imakefile	2004-09-25
08:21:48.311566424 +0000
+++ xc/programs/Xserver/Xprint/etc/init.d/Imakefile	2004-09-25
08:28:02.899620384 +0000
@@ -29,8 +29,9 @@
 #endif
 
 ETCDIR = EtcDir
+PROJECTROOT = ProjectRoot
 
-MakeScriptFromCpp(xprint, -DDEF_XPCUSTOMGLUE=$(XPCUSTOMGLUE) $(OS_DEFINES))
+MakeScriptFromCpp(xprint, -DDEF_XPCUSTOMGLUE=$(XPCUSTOMGLUE) $(OS_DEFINES)
-DProjectRoot=$(PROJECTROOT))
 
 #if defined(FreeBSDArchitecture)
 InstallNamedProg(xprint,xprint,$(PROJECTROOT)/etc/rc.d)
diff -urN xc.orig/programs/Xserver/Xprint/etc/init.d/xprint.cpp
xc/programs/Xserver/Xprint/etc/init.d/xprint.cpp
--- xc.orig/programs/Xserver/Xprint/etc/init.d/xprint.cpp	2004-09-25
08:21:48.322564752 +0000
+++ xc/programs/Xserver/Xprint/etc/init.d/xprint.cpp	2004-09-25
08:26:40.179195800 +0000
@@ -176,9 +176,13 @@
 #elif defined(OS_AIX)
 XPROJECTROOT=/usr/lpp/X11
 #else
+#if defined(ProjectRoot)
+XPROJECTROOT=ProjectRoot
+#else
 [ -d /usr/X11/bin ]     && XPROJECTROOT=/usr/X11
 [ -d /usr/X11R6/bin ]   && XPROJECTROOT=/usr/X11R6
 #endif
+#endif
 XPCUSTOMGLUE=DEF_XPCUSTOMGLUE # This is used for customizing this script
 export XPROJECTROOT XPCUSTOMGLUE
Comment 1 Grzegorz Dąbrowski 2004-09-25 00:56:40 UTC
Created attachment 967 [details] [review]
proposed patch
Comment 2 Alan Coopersmith 2005-10-02 15:18:24 UTC
Checked into CVS head.

CVSROOT:	/cvs/xorg
Module name:	xc
Changes by:	alanc@gabe.freedesktop.org	05/10/02 15:17:39

Log message:
  2005-10-02  Alan Coopersmith  <alan.coopersmith@sun.com>
  
  	* programs/Xserver/Xprint/etc/init.d/Imakefile:
  	* programs/Xserver/Xprint/etc/init.d/xprint.cpp:
  	Bug #1465  <https://bugs.freedesktop.org/show_bug.cgi?id=1465>
  	/etc/init.d/Xprint should use PROJECTROOT from build
  	(Grzegorz DÄ?browski)

Modified files:
      ./:
        ChangeLog 
      xc/programs/Xserver/Xprint/etc/init.d/:
        Imakefile xprint.cpp 
  
  Revision      Changes    Path
  1.1368        +8 -0      xc/ChangeLog
  http://cvs.freedesktop.org/xorg/xc/ChangeLog
  1.8           +1 -1      xc/programs/Xserver/Xprint/etc/init.d/Imakefile
  http://cvs.freedesktop.org/xorg/xc/programs/Xserver/Xprint/etc/init.d/Imakefile
  1.4           +3 -0      xc/programs/Xserver/Xprint/etc/init.d/xprint.cpp
  http://cvs.freedesktop.org/xorg/xc/programs/Xserver/Xprint/etc/init.d/xprint.cpp

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.