Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2013 20:40:01 GMT
From:      Kevin Zheng <kevinz5000@gmail.com>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/177857: [patch] Update x11/slim to 1.3.5
Message-ID:  <201305142040.r4EKe1mP033735@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/177857; it has been noted by GNATS.

From: Kevin Zheng <kevinz5000@gmail.com>
To: bug-followup@FreeBSD.org
Cc: Henry Hu <henry.hu.sh@gmail.com>, 
 Raphael Kubo da Costa <rakuco@FreeBSD.org>
Subject: Re: ports/177857: [patch] Update x11/slim to 1.3.5
Date: Tue, 14 May 2013 15:36:27 -0500

 This is a multi-part message in MIME format.
 --------------050803070606020108090806
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 Oops, it looks like I forgot to send the latest patch to GNATS. You can
 find it attached here now.
 
 You can apply this patch using `svn patch <file>`. If for some reason
 you want a 'normal' patch, please send me a reply.
 
 Thanks,
 Kevin Zheng
 
 --------------050803070606020108090806
 Content-Type: text/plain; charset=UTF-8;
  name="patch-slim.diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
  filename="patch-slim.diff"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 318199)
 +++ Makefile	(working copy)
 @@ -2,29 +2,30 @@
  # $FreeBSD$
  
  PORTNAME=	slim
 -PORTVERSION=	1.3.4
 -PORTREVISION=	5
 +PORTVERSION=	1.3.5
  CATEGORIES=	x11
 -MASTER_SITES=	http://slim.berlios.de/releases/
 +MASTER_SITES=	ftp://ftp.berlios.de/pub/slim/ \
 +		SF/slim.berlios
  
  MAINTAINER=	henry.hu.sh@gmail.com
  COMMENT=	Graphical login manager for X11, derived from Login.app
  
  LICENSE=	GPLv2
 +LICENSE_FILE=	${WRKSRC}/COPYING
  
 -LIB_DEPENDS=	dbus-1:${PORTSDIR}/devel/dbus \
 -		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
 +LIB_DEPENDS=	ck-connector:${PORTSDIR}/sysutils/consolekit \
 +		dbus-1:${PORTSDIR}/devel/dbus \
 +		expat:${PORTSDIR}/textproc/expat2 \
 +		fontconfig:${PORTSDIR}/x11-fonts/fontconfig \
 +		freetype:${PORTSDIR}/print/freetype2 \
  		jpeg:${PORTSDIR}/graphics/jpeg \
  		png15:${PORTSDIR}/graphics/png \
 -		freetype:${PORTSDIR}/print/freetype2 \
 -		ck-connector:${PORTSDIR}/sysutils/consolekit \
 -		expat:${PORTSDIR}/textproc/expat2 \
 -		xcb:${PORTSDIR}/x11/libxcb \
 -		fontconfig:${PORTSDIR}/x11-fonts/fontconfig
 +		pthread-stubs:${PORTSDIR}/devel/libpthread-stubs \
 +		xcb:${PORTSDIR}/x11/libxcb
  
  USES=		cmake pkgconfig
 +USE_RC_SUBR=	slim
  USE_XORG=	ice sm x11 xau xdmcp xext xft xmu xorg-server xrender xt
 -USE_RC_SUBR=	slim
  SUB_FILES=	pkg-message
  
  CMAKE_ARGS=	-DUSE_CONSOLEKIT=yes
 @@ -44,26 +45,22 @@
  .endif
  
  post-patch:
 -	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/${PORTNAME}.conf
 -	@${REINPLACE_CMD} -e 's|"/etc"|"${PREFIX}/etc"|' \
 -	    -e 's|slim.conf|slim.conf.sample|' \
 -	    -e 's|set(MANDIR "$${CMAKE_INSTALL_PREFIX}/share/man")|set(MANDIR "${PREFIX}/man")|' \
 -	    ${WRKSRC}/CMakeLists.txt
 -	@${MV} ${WRKSRC}/slim.conf ${WRKSRC}/slim.conf.sample
 -	@${REINPLACE_CMD} -e 's|std::snprintf|snprintf|' ${WRKSRC}/Ck.cpp
 +	@${CP} ${WRKSRC}/slim.conf ${WRKSRC}/slim.conf.sample
 +	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 +		${WRKSRC}/slim.conf.sample
 +	@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|' \
 +		-e 's|/etc|${PREFIX}/etc|' \
 +		-e 's|share/man|man|' \
 +		-e 's|slim.conf|slim.conf.sample|' \
 +		-e '/systemd/d' \
 +		${WRKSRC}/CMakeLists.txt
  
 -# Fix a previous bad install - Ok to remove at version 1.3.5 or later
 -pre-install:
 -	@${RM} -f ${LOCALBASE}/share/man/man1/slim.1
 -	@${RMDIR} ${LOCALBASE}/share/man/man1 2>/dev/null || true
 -	@${RMDIR} ${LOCALBASE}/share/man 2>/dev/null || true
 -
  post-install:
 -	@${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1 ${MAN1PREFIX}/man/man1
  	@if [ ! -f ${PREFIX}/etc/slim.conf ]; then \
  		${CP} ${PREFIX}/etc/slim.conf.sample ${PREFIX}/etc/slim.conf ; \
  	fi
  .	if ${PORT_OPTIONS:MPAM}
 +	@${MKDIR} ${PREFIX}/etc/pam.d
  	@${INSTALL_DATA} ${FILESDIR}/pam.conf ${PREFIX}/etc/pam.d/slim.default
  	@if [ ! -f ${PREFIX}/etc/pam.d/slim ]; then \
  		${CP} ${PREFIX}/etc/pam.d/slim.default ${PREFIX}/etc/pam.d/slim ; \
 Index: distinfo
 ===================================================================
 --- distinfo	(revision 318199)
 +++ distinfo	(working copy)
 @@ -1,2 +1,2 @@
 -SHA256 (slim-1.3.4.tar.gz) = 155c26460c98b9f0925624028b4254afc0de4fda33300f3ac45606b2c5cbd501
 -SIZE (slim-1.3.4.tar.gz) = 227197
 +SHA256 (slim-1.3.5.tar.gz) = 818d209f51e2fa8d5b94ef75ce90a7415be48b45e796d66f8083a9532b655629
 +SIZE (slim-1.3.5.tar.gz) = 226413
 Index: files/patch-Ck.cpp
 ===================================================================
 --- files/patch-Ck.cpp	(revision 318199)
 +++ files/patch-Ck.cpp	(working copy)
 @@ -1,11 +1,11 @@
 ---- Ck.cpp.orig	2012-02-22 03:59:52.000000000 +0400
 -+++ Ck.cpp	2012-07-19 00:03:34.000000000 +0400
 +--- ./Ck.cpp.orig	2012-12-31 07:03:42.000000000 -0600
 ++++ ./Ck.cpp	2013-03-23 14:10:35.000000000 -0500
  @@ -91,7 +91,7 @@
   
 -     vt = *((long *)return_value);
 + 	vt = *((long *)return_value);
   
 --    std::snprintf(device, 32, "/dev/tty%ld", vt);
 -+    std::snprintf(device, 32, "/dev/ttyv%ld", vt - 1);
 +-	std::snprintf(device, 32, "/dev/tty%ld", vt);
 ++	snprintf(device, 32, "/dev/ttyv%ld", vt - 1);
   
 -     if(return_value)
 -       XFree(return_value);
 + 	if(return_value)
 + 	  XFree(return_value);
 Index: files/patch-PAM.cpp
 ===================================================================
 --- files/patch-PAM.cpp	(revision 318199)
 +++ files/patch-PAM.cpp	(working copy)
 @@ -1,10 +1,10 @@
 ---- PAM.cpp.orig	2012-06-26 12:20:14.000000000 +0400
 -+++ PAM.cpp	2012-12-16 16:05:09.000000000 +0400
 -@@ -128,6 +128,7 @@
 -             case PAM_MAXTRIES:
 -             case PAM_CRED_INSUFFICIENT:
 -             case PAM_AUTH_ERR:
 -+            case PAM_CONV_ERR:
 -                 throw Auth_Exception(pam_handle, "pam_authentication()", last_result);
 +--- ./PAM.cpp.orig	2012-12-31 07:03:42.000000000 -0600
 ++++ ./PAM.cpp	2013-03-23 14:10:35.000000000 -0500
 +@@ -127,6 +127,7 @@
 + 			case PAM_MAXTRIES:
 + 			case PAM_CRED_INSUFFICIENT:
 + 			case PAM_AUTH_ERR:
 ++			case PAM_CONV_ERR:
 + 				throw Auth_Exception(pam_handle, "pam_authentication()", last_result);
   
 -             case PAM_SUCCESS:
 + 			case PAM_SUCCESS:
 Index: files/patch-app.cpp
 ===================================================================
 --- files/patch-app.cpp	(revision 318199)
 +++ files/patch-app.cpp	(working copy)
 @@ -1,11 +1,11 @@
 ---- app.cpp.orig	2008-10-04 13:45:58.000000000 +0200
 -+++ app.cpp	2008-10-04 13:46:07.000000000 +0200
 -@@ -887,7 +887,7 @@
 -     }
 +--- ./app.cpp.orig	2012-12-31 07:03:42.000000000 -0600
 ++++ ./app.cpp	2013-03-23 14:10:35.000000000 -0500
 +@@ -931,7 +931,7 @@
 + 	}
   
 -     if (!hasVtSet && daemonmode) {
 --        server[argc++] = (char*)"vt07";
 -+        server[argc++] = (char*)"vt09";
 -     }
 -     server[argc] = NULL;
 + 	if (!hasVtSet && daemonmode) {
 +-		server[argc++] = (char*)"vt07";
 ++		server[argc++] = (char*)"vt09";
 + 	}
 + 	server[argc] = NULL;
   
 Index: files/patch-libpng-setjmp-image.cpp
 ===================================================================
 --- files/patch-libpng-setjmp-image.cpp	(revision 318199)
 +++ files/patch-libpng-setjmp-image.cpp	(working copy)
 @@ -1,33 +0,0 @@
 ---- image.cpp.orig	2012-07-05 11:54:10.000000000 +0400
 -+++ image.cpp	2012-07-05 12:20:08.000000000 +0400
 -@@ -746,6 +746,10 @@
 -     return(ret);
 - }
 - 
 -+#if (PNG_LIBPNG_VER_MAJOR == 1 && PNG_LIBPNG_VER_MINOR >= 5) || PNG_LIBPNG_VER_MAJOR > 1
 -+#define PNG_NEW_SETJMP_API
 -+#endif
 -+
 - int
 - Image::readPng(const char *filename, int *width, int *height,
 -                unsigned char **rgb, unsigned char **alpha)
 -@@ -781,7 +785,13 @@
 -                                 (png_infopp) NULL);
 -     }
 - 
 --    if (setjmp(png_ptr->jmpbuf)) {
 -+    if (setjmp(
 -+#ifdef PNG_NEW_SETJMP_API
 -+(png_jmpbuf(png_ptr))
 -+#else
 -+png_ptr->jmpbuf
 -+#endif
 -+    )) {
 -         goto png_destroy;
 -     }
 - 
 -@@ -894,3 +904,4 @@
 -     fclose(infile);
 -     return(ret);
 - }
 -+#undef PNG_NEW_SETJMP_API
 Index: files/patch-log.h
 ===================================================================
 --- files/patch-log.h	(revision 318199)
 +++ files/patch-log.h	(working copy)
 @@ -1,15 +0,0 @@
 ---- log.h.orig	2012-06-26 10:20:14.000000000 +0200
 -+++ log.h	2012-11-25 20:00:39.294546666 +0100
 -@@ -1,6 +1,12 @@
 - #ifndef _LOG_H_
 - #define _LOG_H_
 - 
 -+#ifdef USE_CONSOLEKIT
 -+#include "Ck.h"
 -+#endif
 -+#ifdef USE_CONSOLEKIT
 -+#include "PAM.h"
 -+#endif
 - #include "const.h"
 - #include <fstream>
 - 
 Index: files/patch-slim.conf
 ===================================================================
 --- files/patch-slim.conf	(revision 318199)
 +++ files/patch-slim.conf	(working copy)
 @@ -1,5 +1,5 @@
 ---- slim.conf.orig	2008-10-04 13:49:03.000000000 +0200
 -+++ slim.conf	2008-10-04 13:52:44.000000000 +0200
 +--- ./slim.conf.orig	2012-12-31 07:03:42.000000000 -0600
 ++++ ./slim.conf	2013-03-23 14:10:35.000000000 -0500
  @@ -1,17 +1,19 @@
   # Path, X server and arguments (if needed)
   # Note: -xauth $authfile is automatically appended
 Index: files/patch-switchuser.cpp
 ===================================================================
 --- files/patch-switchuser.cpp	(revision 318199)
 +++ files/patch-switchuser.cpp	(working copy)
 @@ -1,13 +1,11 @@
 ---- switchuser.cpp	2009-10-14 16:28:20.000000000 +0800
 -+++ switchuser.cpp	2009-10-14 16:34:23.000000000 +0800
 -@@ -38,6 +38,8 @@
 +--- ./switchuser.cpp.orig	2012-12-31 07:03:42.000000000 -0600
 ++++ ./switchuser.cpp	2013-03-23 14:10:35.000000000 -0500
 +@@ -36,6 +36,8 @@
   
   void SwitchUser::SetUserId() {
 -     if( (Pw == 0) ||
 -+            (setsid() == -1) ||
 -+            (setlogin(Pw->pw_name) != 0) ||
 -             (initgroups(Pw->pw_name, Pw->pw_gid) != 0) ||
 -             (setgid(Pw->pw_gid) != 0) ||
 -             (setuid(Pw->pw_uid) != 0) ) {
 -
 -
 + 	if( (Pw == 0) ||
 ++			(setsid() == -1) ||
 ++			(setlogin(Pw->pw_name) != 0) ||
 + 			(initgroups(Pw->pw_name, Pw->pw_gid) != 0) ||
 + 			(setgid(Pw->pw_gid) != 0) ||
 + 			(setuid(Pw->pw_uid) != 0) ) {
 Index: files/patch-themes__default__slim.theme
 ===================================================================
 --- files/patch-themes__default__slim.theme	(revision 318199)
 +++ files/patch-themes__default__slim.theme	(working copy)
 @@ -1,5 +1,5 @@
 ---- themes/default/slim.theme.orig	2012-02-21 15:59:52.000000000 -0800
 -+++ themes/default/slim.theme	2012-06-02 23:23:10.000000000 -0700
 +--- ./themes/default/slim.theme.orig	2012-12-31 07:03:42.000000000 -0600
 ++++ ./themes/default/slim.theme	2013-03-23 14:10:35.000000000 -0500
  @@ -1,9 +1,10 @@
   # text04 theme for SLiM
   # by Johannes Winkelmann
 Index: files/slim.in
 ===================================================================
 --- files/slim.in	(revision 318199)
 +++ files/slim.in	(working copy)
 @@ -6,9 +6,8 @@
  # REQUIRE: LOGIN dbus hald
  # KEYWORD: shutdown
  #
 -# Add the following lines to /etc/rc.conf to enable slim:
 -# slim_enable (bool):      Set to "NO" by default.
 -#                          Set it to "YES" to enable slim
 +# Add the following line to /etc/rc.conf to enable slim:
 +# slim_enable="YES"
  #
  # Alternatively, edit /etc/ttys and change the line below
  #   ttyv8   "/usr/X11R6/bin/xdm -nodaemon"  xterm   off secure
 
 --------------050803070606020108090806--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305142040.r4EKe1mP033735>