From 31ea8b9649d0ba2dca56c218edcfd39530181c3e Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <ofourdan@redhat.com>
Date: Thu, 23 Feb 2023 09:09:36 +0100
Subject: [PATCH] Fix xvfb-run script with --listen-tcp

---
 xorg-x11-server.spec | 5 ++++-
 xvfb-run.sh          | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec
index 5c4ddfd..cfd9c76 100644
--- a/xorg-x11-server.spec
+++ b/xorg-x11-server.spec
@@ -46,7 +46,7 @@
 Summary:   X.Org X11 X server
 Name:      xorg-x11-server
 Version:   1.20.14
-Release:   19%{?gitdate:.%{gitdate}}%{?dist}
+Release:   20%{?gitdate:.%{gitdate}}%{?dist}
 URL:       http://www.x.org
 License:   MIT
 
@@ -554,6 +554,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete
 
 
 %changelog
+* Thu Feb 23 2023 Olivier Fourdan <ofourdan@redhat.com> - 1.20.14-20
+- Fix xvfb-run script with --listen-tcp
+
 * Thu Feb 09 2023 Iker Pedrosa <ipedrosa@redhat.com> - 1.20.14-19
 - Remove pam_console from service file (#1822209)
 
diff --git a/xvfb-run.sh b/xvfb-run.sh
index 9d088c1..5d4447b 100644
--- a/xvfb-run.sh
+++ b/xvfb-run.sh
@@ -120,7 +120,7 @@ while :; do
         -f|--auth-file) AUTHFILE="$2"; shift ;;
         -h|--help) SHOWHELP="yes" ;;
         -n|--server-num) SERVERNUM="$2"; shift ;;
-        -l|--listen-tcp) LISTENTCP="" ;;
+        -l|--listen-tcp) LISTENTCP="-listen tcp" ;;
         -p|--xauth-protocol) XAUTHPROTO="$2"; shift ;;
         -s|--server-args) XVFBARGS="$2"; shift ;;
         -w|--wait) STARTWAIT="$2"; shift ;;