Accepting request 1132777 from X11:RemoteDesktop

OBS-URL: https://build.opensuse.org/request/show/1132777
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xrdp?expand=0&rev=55
This commit is contained in:
Ana Guerrero 2023-12-13 17:35:21 +00:00 committed by Git OBS Bridge
commit 8bacb727d7
7 changed files with 135 additions and 190 deletions

View File

@ -1,7 +1,7 @@
Index: xrdp-0.9.15/configure.ac
Index: xrdp-0.9.23.1/configure.ac
===================================================================
--- xrdp-0.9.15.orig/configure.ac
+++ xrdp-0.9.15/configure.ac
--- xrdp-0.9.23.1.orig/configure.ac
+++ xrdp-0.9.23.1/configure.ac
@@ -9,6 +9,7 @@ AC_PROG_CC
AC_C_CONST
AC_PROG_LIBTOOL
@ -10,44 +10,39 @@ Index: xrdp-0.9.15/configure.ac
PKG_PROG_PKG_CONFIG
if test "x$PKG_CONFIG" = "x"; then
AC_MSG_ERROR([please install pkg-config])
Index: xrdp-0.9.15/xrdp/Makefile.am
Index: xrdp-0.9.23.1/xrdp/Makefile.am
===================================================================
--- xrdp-0.9.15.orig/xrdp/Makefile.am
+++ xrdp-0.9.15/xrdp/Makefile.am
@@ -12,7 +12,9 @@ AM_CPPFLAGS = \
-DXRDP_SOCKET_PATH=\"${socketdir}\" \
-I$(top_builddir) \
--- xrdp-0.9.23.1.orig/xrdp/Makefile.am
+++ xrdp-0.9.23.1/xrdp/Makefile.am
@@ -14,6 +14,7 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/common \
- -I$(top_srcdir)/libxrdp
+ -I$(top_srcdir)/libxrdp \
-I$(top_srcdir)/sesman/libscp \
-I$(top_srcdir)/libxrdp \
+ $(AVAHI_CFLAGS)
+
$(IMLIB2_CFLAGS)
XRDP_EXTRA_LIBS =
@@ -46,6 +48,7 @@ xrdp_SOURCES = \
@@ -44,6 +45,7 @@ xrdp_SOURCES = \
lang.c \
xrdp.c \
xrdp.h \
+ xrdp_avahi.c \
xrdp_bitmap.c \
xrdp_cache.c \
xrdp_encoder.c \
@@ -63,7 +66,8 @@ xrdp_SOURCES = \
xrdp_LDADD = \
$(top_builddir)/common/libcommon.la \
xrdp_bitmap_load.c \
xrdp_bitmap_common.c \
@@ -65,6 +67,7 @@ xrdp_LDADD = \
$(top_builddir)/sesman/libscp/libscp.la \
$(top_builddir)/libxrdp/libxrdp.la \
- $(XRDP_EXTRA_LIBS)
+ $(XRDP_EXTRA_LIBS) \
+ $(AVAHI_LIBS)
$(IMLIB2_LIBS) \
+ $(AVAHI_LIBS) \
$(XRDP_EXTRA_LIBS)
xrdpsysconfdir=$(sysconfdir)/xrdp
Index: xrdp-0.9.15/xrdp/xrdp.h
Index: xrdp-0.9.23.1/xrdp/xrdp.h
===================================================================
--- xrdp-0.9.15.orig/xrdp/xrdp.h
+++ xrdp-0.9.15/xrdp/xrdp.h
@@ -523,3 +523,10 @@ server_add_char_alpha(struct xrdp_mod* m
--- xrdp-0.9.23.1.orig/xrdp/xrdp.h
+++ xrdp-0.9.23.1/xrdp/xrdp.h
@@ -580,3 +580,10 @@ server_add_char_alpha(struct xrdp_mod *m
int
server_session_info(struct xrdp_mod *mod, const char *data, int data_bytes);
@ -58,11 +53,11 @@ Index: xrdp-0.9.15/xrdp/xrdp.h
+xrdp_avahi_fini(void);
+void
+xrdp_avahi_get_port(char *port);
Index: xrdp-0.9.15/xrdp/xrdp_avahi.c
Index: xrdp-0.9.23.1/xrdp/xrdp_avahi.c
===================================================================
--- /dev/null
+++ xrdp-0.9.15/xrdp/xrdp_avahi.c
@@ -0,0 +1,178 @@
+++ xrdp-0.9.23.1/xrdp/xrdp_avahi.c
@@ -0,0 +1,182 @@
+/*
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
@ -85,6 +80,10 @@ Index: xrdp-0.9.15/xrdp/xrdp_avahi.c
+
+*/
+
+#if defined(HAVE_CONFIG_H)
+#include <config_ac.h>
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+
@ -241,15 +240,14 @@ Index: xrdp-0.9.15/xrdp/xrdp_avahi.c
+ if (fd != -1)
+ g_file_close(fd);
+}
Index: xrdp-0.9.15/common/arch.h
Index: xrdp-0.9.23.1/common/arch.h
===================================================================
--- xrdp-0.9.15.orig/common/arch.h
+++ xrdp-0.9.15/common/arch.h
@@ -20,28 +20,7 @@
#define ARCH_H
--- xrdp-0.9.23.1.orig/common/arch.h
+++ xrdp-0.9.23.1/common/arch.h
@@ -22,27 +22,7 @@
#include <stdlib.h>
-
#include <string.h>
-#if defined(HAVE_STDINT_H)
#include <stdint.h>
-#else

View File

@ -1,133 +1,11 @@
Index: xrdp-0.9.14/sesman/startwm.sh
Index: xrdp-0.9.23.1/sesman/startwm.sh
===================================================================
--- xrdp-0.9.14.orig/sesman/startwm.sh
+++ xrdp-0.9.14/sesman/startwm.sh
@@ -7,34 +7,81 @@
# exec xterm
-# Execution sequence for interactive login shell - pseudocode
-#
-# IF /etc/profile is readable THEN
-# execute ~/.bash_profile
-# END IF
-# IF ~/.bash_profile is readable THEN
-# execute ~/.bash_profile
-# ELSE
-# IF ~/.bash_login is readable THEN
-# execute ~/.bash_login
-# ELSE
-# IF ~/.profile is readable THEN
-# execute ~/.profile
-# END IF
-# END IF
-# END IF
+#start the window manager
+wm_start()
+{
+ #To customize system-wise session, edit this file.
+ #To customize user specific session, copy this file to $HOME and edit it.
+ #Please refer to DefaultWindowManager and UserWindowManager in /etc/xrdp/sesman.ini for more details.
+
+ #The default session is gnome (GNOME Session)
+ #sle means SLE-Classic Session
+ SESSION="gnome"
+
+ case $SESSION in
+ sle)
+ if [ -r /usr/bin/gnome-session ]; then
+ export XDG_SESSION_TYPE=x11
+ export GNOME_SHELL_SESSION_MODE=sle-classic
+ /usr/bin/gnome-session --session gnome-classic
+ elif [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/icewm-session
+ fi
+ ;;
+ gnome)
+ if [ -r /usr/bin/gnome-session ]; then
+ export XDG_SESSION_TYPE=x11
+ /usr/bin/gnome-session
+ elif [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/icewm-session
+ fi
+ ;;
+ plasma)
+ if [ -r /usr/bin/startplasma-x11 ]; then
+ export XDG_SESSION_TYPE=x11
+ /usr/bin/startplasma-x11
+ elif [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/icewm-session
+ fi
+ ;;
+ icewm)
+ if [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/icewm-session
+ fi
+ ;;
+ esac
+}
+
+#Execution sequence for interactive login shell
+#Following pseudo code explains the sequence of execution of these files.
+#execute /etc/profile
+#IF ~/.bash_profile exists THEN
+# execute ~/.bash_profile
+#ELSE
+# IF ~/.bash_login exist THEN
+# execute ~/.bash_login
+# ELSE
+# IF ~/.profile exist THEN
+# execute ~/.profile
+# END IF
+# END IF
+#END IF
pre_start()
--- xrdp-0.9.23.1.orig/sesman/startwm.sh
+++ xrdp-0.9.23.1/sesman/startwm.sh
@@ -58,54 +58,54 @@ post_start()
#start the window manager
wm_start()
{
- if [ -r /etc/profile ]; then
+ if [ -f /etc/profile ]
+ then
. /etc/profile
fi
- if [ -r ~/.bash_profile ]; then
+ if [ -f ~/.bash_profile ]
+ then
. ~/.bash_profile
else
- if [ -r ~/.bash_login ]; then
+ if [ -f ~/.bash_login ]
+ then
. ~/.bash_login
else
- if [ -r ~/.profile ]; then
+ if [ -f ~/.profile ]
+ then
. ~/.profile
fi
fi
@@ -42,11 +89,11 @@ pre_start()
return 0
}
-# When loging out from the interactive shell, the execution sequence is:
-#
-# IF ~/.bash_logout exists THEN
-# execute ~/.bash_logout
-# END IF
+#When you logout of the interactive shell, following is the
+#sequence of execution:
+#IF ~/.bash_logout exists THEN
+# execute ~/.bash_logout
+#END IF
post_start()
{
if [ -r ~/.bash_logout ]; then
@@ -55,46 +102,6 @@ post_start()
return 0
}
-#start the window manager
-wm_start()
-{
- if [ -r /etc/default/locale ]; then
- . /etc/default/locale
- export LANG LANGUAGE
@ -141,6 +19,19 @@ Index: xrdp-0.9.14/sesman/startwm.sh
- exit 0
- fi
-
- # alpine
- # Don't use /etc/X11/xinit/Xsession - it doesn't work
- if [ -f /etc/alpine-release ]; then
- if [ -f /etc/X11/xinit/xinitrc ]; then
- pre_start
- /etc/X11/xinit/xinitrc
- post_start
- else
- echo "** xinit package isn't installed" >&2
- exit 1
- fi
- fi
-
- # el
- if [ -r /etc/X11/xinit/Xsession ]; then
- pre_start
@ -163,12 +54,58 @@ Index: xrdp-0.9.14/sesman/startwm.sh
- pre_start
- xterm
- post_start
-}
-
+ #To customize system-wise session, edit this file.
+ #To customize user specific session, copy this file to $HOME and edit it.
+ #Please refer to DefaultWindowManager and UserWindowManager in /etc/xrdp/sesman.ini for more details.
+
+ #The default session is gnome (GNOME Session)
+ #sle means SLE-Classic Session
+ SESSION="gnome"
+
+ case $SESSION in
+ sle)
+ if [ -r /usr/bin/gnome-session ]; then
+ export XDG_SESSION_TYPE=x11
+ export GNOME_SHELL_SESSION_MODE=sle-classic
+ /usr/bin/dbus-run-session /usr/bin/gnome-session --session gnome-classic
+ elif [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/icewm-session
+ fi
+ ;;
+ gnome)
+ if [ -r /usr/bin/gnome-session ]; then
+ export XDG_SESSION_TYPE=x11
+ /usr/bin/dbus-run-session /usr/bin/gnome-session
+ elif [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/dbus-run-session /usr/bin/icewm-session
+ fi
+ ;;
+ mate)
+ if [ -r /usr/bin/mate-session ]; then
+ export XDG_SESSION_TYPE=x11
+ /usr/bin/dbus-run-session /usr/bin/mate-session
+ elif [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/dbus-run-session /usr/bin/icewm-session
+ fi
+ ;;
+ plasma)
+ if [ -r /usr/bin/startplasma-x11 ]; then
+ export XDG_SESSION_TYPE=x11
+ /usr/bin/dbus-run-session /usr/bin/startplasma-x11
+ elif [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/dbus-run-session /usr/bin/icewm-session
+ fi
+ ;;
+ icewm)
+ if [ -r /usr/bin/icewm-session ]; then
+ /usr/bin/dbus-run-session /usr/bin/icewm-session
+ fi
+ ;;
+ esac
}
#. /etc/environment
#export PATH=$PATH
#export LANG=$LANG
@@ -109,6 +116,8 @@ wm_start()
@@ -122,6 +122,8 @@ wm_start()
# includes
# auth required pam_env.so readenv=1

View File

@ -10,11 +10,11 @@ Xvnc drops support for 8 bpp since 1.4.0. Trying to launch Xvnc in
vnc/vnc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: b/vnc/vnc.c
Index: xrdp-0.9.23.1/vnc/vnc.c
===================================================================
--- a/vnc/vnc.c 2020-09-14 13:20:01.611135290 +0800
+++ b/vnc/vnc.c 2020-09-14 13:24:50.515034607 +0800
@@ -1914,13 +1914,16 @@ lib_mod_connect(struct vnc *v)
--- xrdp-0.9.23.1.orig/vnc/vnc.c 2023-11-30 21:35:40.981861400 +0100
+++ xrdp-0.9.23.1/vnc/vnc.c 2023-11-30 21:35:40.977861398 +0100
@@ -1656,13 +1656,16 @@
switch (v->server_bpp)
{
case 8:

View File

@ -7,11 +7,11 @@ Subject: [PATCH] xrdp filter tab from mstsc on focus change
xrdp/xrdp_wm.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/xrdp/xrdp_wm.c b/xrdp/xrdp_wm.c
index 362d0d0..9a2e013 100644
--- a/xrdp/xrdp_wm.c
+++ b/xrdp/xrdp_wm.c
@@ -1427,6 +1427,7 @@ xrdp_wm_key(struct xrdp_wm *self, int device_flags, int scan_code)
Index: xrdp-0.9.23.1/xrdp/xrdp_wm.c
===================================================================
--- xrdp-0.9.23.1.orig/xrdp/xrdp_wm.c
+++ xrdp-0.9.23.1/xrdp/xrdp_wm.c
@@ -1506,6 +1506,7 @@ xrdp_wm_key(struct xrdp_wm *self, int de
{
int msg;
struct xrdp_key_info *ki;
@ -19,7 +19,7 @@ index 362d0d0..9a2e013 100644
/*g_printf("count %d\n", self->key_down_list->count);*/
scan_code = scan_code % 128;
@@ -1472,7 +1473,12 @@ xrdp_wm_key(struct xrdp_wm *self, int device_flags, int scan_code)
@@ -1558,7 +1559,12 @@ xrdp_wm_key(struct xrdp_wm *self, int de
if (ki != 0)
{
@ -33,7 +33,7 @@ index 362d0d0..9a2e013 100644
scan_code, device_flags);
}
}
@@ -1483,6 +1489,7 @@ xrdp_wm_key(struct xrdp_wm *self, int device_flags, int scan_code)
@@ -1569,6 +1575,7 @@ xrdp_wm_key(struct xrdp_wm *self, int de
msg, scan_code, device_flags);
}
@ -41,6 +41,3 @@ index 362d0d0..9a2e013 100644
return 0;
}
--
2.6.6

View File

@ -1,8 +1,8 @@
Index: b/sesman/session.c
Index: xrdp-0.9.23.1/sesman/session.c
===================================================================
--- a/sesman/session.c 2018-08-10 20:47:37.977842303 +0800
+++ b/sesman/session.c 2018-08-10 20:50:06.203134988 +0800
@@ -732,6 +729,16 @@ session_start_fork(tbus data, tui8 type,
--- xrdp-0.9.23.1.orig/sesman/session.c 2023-11-30 21:35:45.365863285 +0100
+++ xrdp-0.9.23.1/sesman/session.c 2023-11-30 21:35:45.361863283 +0100
@@ -825,6 +825,16 @@
g_free(passwd_file);

View File

@ -1,3 +1,16 @@
Thu Nov 30 20:47:32 UTC 2023 - Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
-------------------------------------------------------------------
- Trivial rebase of xrdp-disable-8-bpp-vnc-support.patch.
- Trivial rebase of xrdp-support-KillDisconnected-for-Xvnc.patch.
- Rebase xrdp-avahi.diff.
- Rebase xrdp-bsc965647-allow-admin-choose-desktop.patch. Add MATE Desktop
support. Launch all desktop session in a dbus-run-session context to
avoid violent interference with simultaneously running local sessions.
- Trivial rebase of xrdp-filter-tab-from-mstsc-on-focus-change.patch.
- Disable xrdp-fate318398-change-expired-password.patch. It does not apply
cleanly since xrdp 0.9.18. Reconsider its usage.
-------------------------------------------------------------------
Wed Oct 18 09:23:35 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@ -52,7 +52,7 @@ Patch1001: xrdp-avahi.diff
Patch1002: xrdp-filter-tab-from-mstsc-on-focus-change.patch
# PATCH-FIX-SLE xrdp-bsc965647-allow-admin-choose-desktop.patch bsc#965647 - fezhang@suse.com -- Allow administrator choose the desktop displayed
Patch1003: xrdp-bsc965647-allow-admin-choose-desktop.patch
# PATCH-FEATURE-SLE xrdp-fate318398-change-expired-password.patch fate#318398 - fezhang@suse.com -- enable user to update expired password via PAM
# PATCH-NEEDS-REBASE xrdp-fate318398-change-expired-password.patch fate#318398 - fezhang@suse.com -- enable user to update expired password via PAM. Was: PATCH-FEATURE-SLE
Patch1004: xrdp-fate318398-change-expired-password.patch
BuildRequires: autoconf
@ -110,7 +110,7 @@ This package contains libraries for the JPEG2000 codec for RDP.
%patch1001 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
#%patch1004 -p1
%endif
%build