Bug 173566 - [maintainer update] net/xrdp: change install-time behaviour to generate new RSA key pair
Summary: [maintainer update] net/xrdp: change install-time behaviour to generate new R...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-11 19:10 UTC by Koichiro Iwao
Modified: 2012-12-26 12:30 UTC (History)
0 users

See Also:


Attachments
file.diff (5.59 KB, patch)
2012-11-11 19:10 UTC, Koichiro Iwao
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Koichiro Iwao freebsd_committer 2012-11-11 19:10:00 UTC
- Change install-time bevaviour to generate new RSA key pair
- Update rc script in order to control daemons xrdp and xrdp-sesman separately
- Update WWW in pkg-descr
- Trim Makefile header

Fix: Patch attached with submission follows:
Comment 1 dfilter service freebsd_committer 2012-12-26 12:27:33 UTC
Author: rakuco
Date: Wed Dec 26 12:27:15 2012
New Revision: 309514
URL: http://svnweb.freebsd.org/changeset/ports/309514

Log:
  - Change install-time bevaviour to generate new RSA key pair
  - Update rc script in order to control daemons xrdp and xrdp-sesman separately
  - Update WWW in pkg-descr
  - Trim Makefile header
  
  PR:		ports/173566
  Submitted by:   Koichiro IWAO <meta+ports@vmeta.jp> (maintainer)

Modified:
  head/net/xrdp/Makefile
  head/net/xrdp/files/pkg-message.in
  head/net/xrdp/files/xrdp.in
  head/net/xrdp/pkg-descr
  head/net/xrdp/pkg-plist

Modified: head/net/xrdp/Makefile
==============================================================================
--- head/net/xrdp/Makefile	Wed Dec 26 10:39:17 2012	(r309513)
+++ head/net/xrdp/Makefile	Wed Dec 26 12:27:15 2012	(r309514)
@@ -1,12 +1,9 @@
-# New ports collection makefile for:	xrdp
-# Date created:				2007-02-19
-# Whom:					alepulver
-#
+# Created by: alepulver
 # $FreeBSD$
-#
 
 PORTNAME=	xrdp
 PORTVERSION=	0.6.0
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	SF/xrdp/xrdp/${PORTVERSION}
@@ -79,6 +76,8 @@ post-install:
 		${CP} -p ${PREFIX}/etc/xrdp/$f.sample ${PREFIX}/etc/xrdp/$f ; \
 	fi
 .endfor
+	@cmp -s ${PREFIX}/etc/xrdp/rsakeys.ini.sample ${PREFIX}/etc/xrdp/rsakeys.ini || \
+		${PREFIX}/bin/xrdp-keygen xrdp ${PREFIX}/etc/xrdp/rsakeys.ini
 	@${ECHO_CMD}; ${CAT} ${PKGMESSAGE}; ${ECHO_CMD}
 
 .include <bsd.port.mk>

Modified: head/net/xrdp/files/pkg-message.in
==============================================================================
--- head/net/xrdp/files/pkg-message.in	Wed Dec 26 10:39:17 2012	(r309513)
+++ head/net/xrdp/files/pkg-message.in	Wed Dec 26 12:27:15 2012	(r309514)
@@ -6,6 +6,7 @@ There is an rc.d script, so the service 
 in /etc/rc.conf:
 
 xrdp_enable="YES"
+xrdp_sesman_enable="YES" # if you want to run xrdp-sesman on the same machine
 
 Do not forget to edit the configuration files in "%%PREFIX%%/etc/xrdp"
 and the "%%PREFIX%%/etc/xrdp/startwm.sh" script.

Modified: head/net/xrdp/files/xrdp.in
==============================================================================
--- head/net/xrdp/files/xrdp.in	Wed Dec 26 10:39:17 2012	(r309513)
+++ head/net/xrdp/files/xrdp.in	Wed Dec 26 12:27:15 2012	(r309514)
@@ -3,19 +3,24 @@
 # $FreeBSD$
 #
 # REQUIRE: DAEMON
-# PROVIDE: xrdp sesman
+# PROVIDE: xrdp xrdp_sesman
 #
 
 . /etc/rc.subr
 
 name="xrdp"
 rcvar=xrdp_enable
-xrdp_daemons="xrdp xrdpsesman"
+xrdp_daemons="xrdp"
 
 # Read settings and set default values.
 load_rc_config "$name"
 : ${xrdp_enable="NO"}
 
+# Enable/disable dependent daemon.
+if [ -n "${rcvar}" ] && checkyesno "xrdp_sesman_enable"; then
+	xrdp_daemons="xrdp xrdp_sesman"
+fi
+
 # Commands.
 extra_commands="reload status"
 start_cmd="xrdp_cmd"
@@ -36,7 +41,7 @@ xrdp_cmd() {
     # Apply to all the daemons.
     for name in ${xrdp_daemons}; do
 	rcvar=${name}_enable
-	if [ "${name}" = "xrdpsesman" ]; then
+	if [ "${name}" = "xrdp_sesman" ]; then
 		command="%%PREFIX%%/sbin/xrdp-sesman"
 		pidfile="/var/run/xrdp-sesman.pid"
 	else

Modified: head/net/xrdp/pkg-descr
==============================================================================
--- head/net/xrdp/pkg-descr	Wed Dec 26 10:39:17 2012	(r309513)
+++ head/net/xrdp/pkg-descr	Wed Dec 26 12:27:15 2012	(r309514)
@@ -10,4 +10,4 @@ but an X window desktop to the user.
 
 Xrdp uses Xvnc or X11rdp to manage the X session.
 
-WWW: http://xrdp.sourceforge.net/
+WWW: http://www.xrdp.org/

Modified: head/net/xrdp/pkg-plist
==============================================================================
--- head/net/xrdp/pkg-plist	Wed Dec 26 10:39:17 2012	(r309513)
+++ head/net/xrdp/pkg-plist	Wed Dec 26 12:27:15 2012	(r309514)
@@ -5,30 +5,6 @@ bin/xrdp-keygen
 bin/xrdp-sesadmin
 bin/xrdp-sesrun
 bin/xrdp-sestest
-etc/pam.d/xrdp-sesman
-etc/xrdp/km-0407.ini
-etc/xrdp/km-0409.ini
-etc/xrdp/km-040c.ini
-etc/xrdp/km-0410.ini
-etc/xrdp/km-0419.ini
-etc/xrdp/km-041d.ini
-%%JP106%%etc/xrdp/km-0411.ini
-%%JP106%%etc/xrdp/km-e0200411.ini
-%%JP106%%etc/xrdp/km-e0010411.ini
-%%JP106%%etc/xrdp/km-e0210411.ini
-@unexec if cmp -s %D/etc/xrdp/rsakeys.ini.sample %D/etc/xrdp/rsakeys.ini; then rm -f %D/etc/xrdp/rsakeys.ini; fi
-@unexec if cmp -s %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini; then rm -f %D/etc/xrdp/sesman.ini; fi
-@unexec if cmp -s %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh; then rm -f %D/etc/xrdp/startwm.sh; fi
-@unexec if cmp -s %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini; then rm -f %D/etc/xrdp/xrdp.ini; fi
-etc/xrdp/rsakeys.ini.sample
-etc/xrdp/sesman.ini.sample
-etc/xrdp/startwm.sh.sample
-etc/xrdp/xrdp.ini.sample
-@exec [ -f %D/etc/xrdp/rsakeys.ini ] || cp -p %D/etc/xrdp/rsakeys.ini.sample %D/etc/xrdp/rsakeys.ini
-@exec [ -f %D/etc/xrdp/sesman.ini ] || cp -p %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini
-@exec [ -f %D/etc/xrdp/startwm.sh ] || cp -p %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh
-@exec [ -f %D/etc/xrdp/xrdp.ini ] || cp -p %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini
-etc/xrdp/xrdp.sh
 lib/xrdp/libcommon.a
 lib/xrdp/libcommon.la
 lib/xrdp/libcommon.so
@@ -57,6 +33,30 @@ lib/xrdp/libxup.a
 lib/xrdp/libxup.la
 lib/xrdp/libxup.so
 lib/xrdp/libxup.so.0
+etc/pam.d/xrdp-sesman
+etc/xrdp/km-0407.ini
+etc/xrdp/km-0409.ini
+etc/xrdp/km-040c.ini
+etc/xrdp/km-0410.ini
+etc/xrdp/km-0419.ini
+etc/xrdp/km-041d.ini
+%%JP106%%etc/xrdp/km-0411.ini
+%%JP106%%etc/xrdp/km-e0200411.ini
+%%JP106%%etc/xrdp/km-e0010411.ini
+%%JP106%%etc/xrdp/km-e0210411.ini
+@unexec if cmp -s %D/etc/xrdp/rsakeys.ini.sample %D/etc/xrdp/rsakeys.ini; then rm -f %D/etc/xrdp/rsakeys.ini; fi
+@unexec if cmp -s %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini; then rm -f %D/etc/xrdp/sesman.ini; fi
+@unexec if cmp -s %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh; then rm -f %D/etc/xrdp/startwm.sh; fi
+@unexec if cmp -s %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini; then rm -f %D/etc/xrdp/xrdp.ini; fi
+etc/xrdp/rsakeys.ini.sample
+etc/xrdp/sesman.ini.sample
+etc/xrdp/startwm.sh.sample
+etc/xrdp/xrdp.ini.sample
+@exec cmp -s %D/etc/xrdp/rsakeys.ini.sample %D/etc/xrdp/rsakeys.ini || %D/bin/xrdp-keygen xrdp %D/etc/xrdp/rsakeys.ini
+@exec [ -f %D/etc/xrdp/sesman.ini ] || cp -p %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini
+@exec [ -f %D/etc/xrdp/startwm.sh ] || cp -p %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh
+@exec [ -f %D/etc/xrdp/xrdp.ini ] || cp -p %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini
+etc/xrdp/xrdp.sh
 sbin/xrdp
 sbin/xrdp-chansrv
 sbin/xrdp-sesman
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 2 Raphael Kubo da Costa freebsd_committer 2012-12-26 12:27:41 UTC
State Changed
From-To: open->closed

Committed. Thanks!