ports/116522: [update] x11/slim default config have paths containing non-expanded variables
Carl Johan Gustavsson
cjg at bsdmail.org
Fri Sep 21 20:30:20 UTC 2007
>Number: 116522
>Category: ports
>Synopsis: [update] x11/slim default config have paths containing non-expanded variables
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Sep 21 20:30:19 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Carl Johan Gustavsson
>Release: 6.2-STABLE
>Organization:
-
>Environment:
FreeBSD sleipner.home.swe 6.2-STABLE FreeBSD 6.2-STABLE #0: Sat Jul 28 18:20:37 CEST 2007 carl at sleipner.home.swe:/usr/obj/usr/src/sys/SLEIPNER_6 i386
>Description:
The default configuration file installed by x11/slim contains non-expanded variables ('$(LOCALBASE)'). Because of this, slim does not start with the default configuration file.
>How-To-Repeat:
Install slim and try to start it with the default config.
>Fix:
Apply attached patch with
cd /usr/ports/x11/slim
patch -p1 < patchfile
Patch attached with submission follows:
diff -ru slim.orig/Makefile slim/Makefile
--- slim.orig/Makefile 2007-09-21 22:03:24.000000000 +0200
+++ slim/Makefile 2007-09-21 20:16:54.000000000 +0200
@@ -30,6 +30,10 @@
.include <bsd.port.pre.mk>
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ ${WRKSRC}/${PORTNAME}.conf
+
do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin
@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample
@@ -41,7 +45,7 @@
post-install:
@if [ ! -f ${PREFIX}/etc/slim.conf ]; then \
- ${CP} -p ${PREFIX}/etc/slim.conf.sample ${PREFIX}/etc/slim.conf ; \
+ ${INSTALL_DATA} -p ${WRKSRC}/slim.conf ${PREFIX}/etc/slim.conf ; \
fi
@${ECHO_MSG} ""
@${CAT} ${PKGMESSAGE}
diff -ru slim.orig/files/patch-Makefile.freebsd slim/files/patch-Makefile.freebsd
--- slim.orig/files/patch-Makefile.freebsd 2007-09-21 22:03:24.000000000 +0200
+++ slim/files/patch-Makefile.freebsd 2007-09-21 20:16:54.000000000 +0200
@@ -10,8 +10,8 @@
-LDFLAGS=-L/usr/X11R6/lib -L/usr/local/lib -lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng -lz -lm -lcrypt -lXmu -lpng -ljpeg
+CXX?=/usr/bin/g++
+CC?=/usr/bin/gcc
-+CFLAGS+=-I$(LOCALBASE)/include `freetype-config --cflags` `libpng-config --cflags`
-+LDFLAGS=-L$(LOCALBASE)/lib `freetype-config --libs` `libpng-config --libs` -lXft -lX11 -lXrender -lfontconfig -lz -lm -lcrypt -lXmu -ljpeg
++CFLAGS+=-I${LOCALBASE}/include `freetype-config --cflags` `libpng-config --cflags`
++LDFLAGS=-L${LOCALBASE}/lib `freetype-config --libs` `libpng-config --libs` -lXft -lX11 -lXrender -lfontconfig -lz -lm -lcrypt -lXmu -ljpeg
CUSTOM=-DNEEDS_BASENAME
.ifdef(USE_PAM)
LDFLAGS+= -lpam
@@ -20,7 +20,7 @@
-PREFIX=/usr
-CFGDIR=/etc
-MANDIR=/usr/share/man
-+PREFIX?=$(LOCALBASE)
++PREFIX?=${LOCALBASE}
+CFGDIR=$(PREFIX)/etc
+MANDIR=$(MANPREFIX)/man
DESTDIR=
diff -ru slim.orig/files/patch-slim.conf slim/files/patch-slim.conf
--- slim.orig/files/patch-slim.conf 2007-09-21 22:03:24.000000000 +0200
+++ slim/files/patch-slim.conf 2007-09-21 21:24:55.000000000 +0200
@@ -6,8 +6,8 @@
-default_path ./:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
-default_xserver /usr/X11R6/bin/X
-#xserver_arguments -dpi 75
-+default_path ./:/bin:/usr/bin:$(LOCALBASE)/bin:$(LOCALBASE)/bin
-+default_xserver $(LOCALBASE)/bin/X
++default_path ./:/bin:/usr/bin:%%LOCALBASE%%/bin:%%LOCALBASE%%/bin
++default_xserver %%LOCALBASE%%/bin/X
+# The X server needs to be started on an unused virtual terminal,
+# for FreeBSD in a default configuration, the first one of those is #09
+xserver_arguments vt09
@@ -18,12 +18,12 @@
reboot_cmd /sbin/shutdown -r now
-console_cmd /usr/X11R6/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
-#suspend_cmd /usr/sbin/suspend
-+console_cmd $(LOCALBASE)/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/motd; exec /usr/bin/login"
++console_cmd %%LOCALBASE%%/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/motd; exec /usr/bin/login"
+suspend_cmd /usr/sbin/acpiconf -s 3
# Full path to the xauth binary
-xauth_path /usr/X11R6/bin/xauth
-+xauth_path $(LOCALBASE)/bin/xauth
++xauth_path %%LOCALBASE%%/bin/xauth
# Xauth file for server
authfile /var/run/slim.auth
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list