Index: head/net/xrdp-devel/Makefile =================================================================== --- head/net/xrdp-devel/Makefile (revision 463981) +++ head/net/xrdp-devel/Makefile (revision 463982) @@ -1,105 +1,106 @@ # Created by: alepulver # $FreeBSD$ PORTNAME= xrdp PORTVERSION= 0.9.5 DISTVERSIONPREFIX= v +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net PKGNAMESUFFIX= -devel DIST_SUBDIR?= ${PORTNAME} MAINTAINER= meta+ports@vmeta.jp COMMENT= Open source Remote Desktop Protocol (RDP) server LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/COPYING # pulseaudio's built source is required for audio redirection BUILD_DEPENDS= ${NONEXISTENT}:audio/pulseaudio:configure \ ${LOCALBASE}/bin/nasm:devel/nasm RUN_DEPENDS= ${LOCALBASE}/lib/xorg/modules/libxorgxrdp.so:x11-drivers/xorgxrdp USES= autoreconf:build jpeg localbase libtool pkgconfig ssl USE_XORG= ice pixman sm x11 xfixes xrandr GNU_CONFIGURE= yes USE_LDCONFIG= ${PREFIX}/lib/xrdp USE_GITHUB= yes GH_ACCOUNT= neutrinolabs GH_PROJECT= xrdp librfxcodec:librfxcodec libpainter:libpainter GH_TAGNAME= v0.1.4:librfxcodec v0.1.1:libpainter CONFIGURE_ARGS= --localstatedir=/var --enable-strict-locations \ --with-pkgconfigdir=${LOCALBASE}/libdata/pkgconfig \ --enable-jpeg --enable-pixman --enable-rfxcodec --enable-painter LDFLAGS+= -lssl CONFLICTS= xrdp-[0-9]* INSTALL_TARGET= install-strip SUB_FILES= pkg-install pkg-message SUB_LIST= OPENSSLBASE=${OPENSSLBASE} OPTIONS_DEFINE= DEBUG FUSE IPV6 OPTIONS_DEFAULT= FDKAAC MP3LAME OPUS OPTIONS_GROUP= AUDIO_CODEC OPTIONS_GROUP_AUDIO_CODEC= FDKAAC MP3LAME OPUS FDKAAC_DESC= Enable Fraunhofer FDK AAC for audio redirection FUSE_DESC= Enable drive redirection via FUSE (experimental) MP3LAME_DESC= Enable MP3 Lame for audio redirection OPUS_DESC= Enable Opus for audio redirection DEBUG_CONFIGURE_ENABLE= xrdpdebug FDKAAC_CONFIGURE_ENABLE= fdkaac FDKAAC_LIB_DEPENDS= libfdk-aac.so:audio/fdk-aac FUSE_CONFIGURE_ENABLE= fuse FUSE_USES= fuse IPV6_CONFIGURE_ENABLE= ipv6 MP3LAME_CONFIGURE_ENABLE= mp3lame MP3LAME_LIB_DEPENDS= libmp3lame.so:audio/lame OPUS_CONFIGURE_ENABLE= opus OPUS_LIB_DEPENDS= libopus.so:audio/opus # don't forget to increase PORTREVISION after pulseaudio update PULSE_VERSION= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VPORTVERSION PULSE_WRKSRC= ${MAKE} -C ${PORTSDIR}/audio/pulseaudio -VWRKSRC post-extract: # librfxcodec is provided as git submodule @${CP} -r ${WRKSRC_librfxcodec}/ ${WRKSRC}/librfxcodec/ @${CP} -r ${WRKSRC_libpainter}/ ${WRKSRC}/libpainter/ post-patch: @${REINPLACE_CMD} \ -e "s|^PULSE_SCRIPT=/etc/xrdp/pulse/default.pa|PULSE_SCRIPT=${PREFIX}/etc/xrdp/pulse/default.pa|" \ ${WRKSRC}/sesman/sesman.ini @${REINPLACE_CMD} \ -e "s|^PULSE_DIR = .*|PULSE_DIR = `${PULSE_WRKSRC}`|" \ -e "s|-Wall -O2|-Wall -O2 -I${LOCALBASE}/include|" \ ${WRKSRC}/sesman/chansrv/pulse/Makefile pre-configure: @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./bootstrap post-build: # build pulseaudio module @${CP} -r "`${PULSE_WRKSRC}`" ${WRKDIR} @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} -C sesman/chansrv/pulse post-install: # install pulseaudio module ${MKDIR} "${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" .for f in module-xrdp-sink.so module-xrdp-source.so ${INSTALL_LIB} -m 0755 ${WRKSRC}/sesman/chansrv/pulse/$f \ "${STAGEDIR}${PREFIX}/lib/pulse-`${PULSE_VERSION}`/modules/" .endfor # substitute pkg-plist not using PLIST_SUB ${REINPLACE_CMD} -e "s|%%PULSE_VERSION%%|`${PULSE_VERSION}`|g" ${TMPPLIST} post-stage: @${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/rsakeys.ini @${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/cert.pem @${RM} ${STAGEDIR}${PREFIX}/etc/xrdp/key.pem .for f in sesman.ini startwm.sh reconnectwm.sh xrdp.ini xrdp_keyboard.ini @${MV} ${STAGEDIR}${PREFIX}/etc/xrdp/$f ${STAGEDIR}${PREFIX}/etc/xrdp/$f.sample .endfor .include Index: head/net/xrdp-devel/files/patch-upstream-issue-1030 =================================================================== --- head/net/xrdp-devel/files/patch-upstream-issue-1030 (nonexistent) +++ head/net/xrdp-devel/files/patch-upstream-issue-1030 (revision 463982) @@ -0,0 +1,54 @@ +--- sesman/session.c.orig 2017-12-27 14:40:24 UTC ++++ sesman/session.c +@@ -484,22 +484,40 @@ session_start_fork(tbus data, tui8 type, + * $OpenBSD: session.c,v 1.252 2010/03/07 11:57:13 dtucker Exp $ + * with some ideas about BSD process grouping to xrdp + */ ++ pid_t bsdsespid = g_fork(); + +- /** +- * Create a new session and process group since the 4.4BSD +- * setlogin() affects the entire process group +- */ +- if (g_setsid() < 0) ++ if (bsdsespid == -1) + { +- log_message(LOG_LEVEL_ERROR, +- "setsid failed - pid %d", g_getpid()); ++ } ++ else if (bsdsespid == 0) /* BSD session leader */ ++ { ++ /** ++ * Create a new session and process group since the 4.4BSD ++ * setlogin() affects the entire process group ++ */ ++ if (g_setsid() < 0) ++ { ++ log_message(LOG_LEVEL_ERROR, ++ "setsid failed - pid %d", g_getpid()); ++ } ++ ++ if (g_setlogin(s->username) < 0) ++ { ++ log_message(LOG_LEVEL_ERROR, ++ "setlogin failed for user %s - pid %d", s->username, ++ g_getpid()); ++ } + } + +- if (g_setlogin(s->username) < 0) ++ g_waitpid(bsdsespid); ++ ++ if (bsdsespid > 0) + { +- log_message(LOG_LEVEL_ERROR, +- "setlogin failed for user %s - pid %d", s->username, +- g_getpid()); ++ g_exit(0); ++ /* ++ * intermediate sesman should exit here after WM exits. ++ * do not execure the following codes. ++ */ + } + #endif + window_manager_pid = g_fork(); /* parent becomes X, Property changes on: head/net/xrdp-devel/files/patch-upstream-issue-1030 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property