Workaround for (EL6.4) rdesktop-1.6.0-10 Woe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



rdesktop has been spewing error messages since the update to CentOS 6.4.
Aside from the continuous stream of errors in the terminal window from
which it was launched, there are a number of usability issues in the
remote session. The pointer does not change shape when moving over
various window components such as column separators, window borders,
etc. The background doesn't refresh within scroll bars, making it
difficult to tell where the scroll handle is. We've also found that MS
Visio will crash and hang the remote system if run within rdesktop.
Other strange phenomenon are also manifest in various applications. In
short, rdesktop 1.6.0-10 is buggy and unstable. See this upstream bug
report for more:

Bug 914279 - regression in 1.6.0-10.el6: Mousepointer and selections not
drawn properly
https://bugzilla.redhat.com/show_bug.cgi?id=914279

We've been putting up with it, hoping that an update would be published
upstream. Even though this issue is affecting customers upstream, as
evidenced in the bugzilla report, a bug-fix update doesn't appear to be
imminent. I decided to rebuild the Fedora 19 SRPM on CentOS to resolve
the issue. It appears from the bugzilla remarks that others have done
this trivially. With a few simple precautions, we've done just that. I'm
sharing our work-around in the hope that it will benefit others in
similar circumstances.

This process assumes you have a build machine properly setup with an
rpmbuild environment. If you don't, see this article:

Set Up an RPM Build Environment under CentOS
http://wiki.centos.org/HowTos/SetupRpmBuildEnvironment

Note: Watch for line-wrap below.

Best Regards,

--Cal Webster



=============[Rdesktop Workaround]=============

##>> Retrieve and install the CentOS source RPM:

rpm -iv
http://vault.centos.org/6.4/os/Source/SPackages/rdesktop-1.6.0-10.el6.src.rpm

##>> Set aside the sources:

[iseo@jato ~]$ cd rpmbuild/SOURCES/
[iseo@jato SOURCES]$ mkdir rdesktop-1.6.0-10
[iseo@jato SOURCES]$ mv *.patch rdesktop-1.6.0.tar.gz rdesktop-1.6.0-10/

##>> Rename the CentOS spec file:

[iseo@jato SOURCES]$ cd ../SPECS/
[iseo@jato SPECS]$ mv rdesktop.spec rdesktop.spec.centos

##>> Retrieve and install the Fedora source RPM from your favorite
mirror:
(watch for line-wrap in URL)

rpm -iv
http://mirror.linux.duke.edu/pub/fedora/linux/releases/19/Everything/source/SRPMS/r/rdesktop-1.7.1-2.fc19.src.rpm

##>> Rename the Fedora spec file then use the CentOS spec file:

[iseo@jato SPECS]$ mv rdesktop.spec rdesktop.spec.fc19
[iseo@jato SPECS]$ cp rdesktop.spec.centos rdesktop.spec

##>> Edit the CentOS spec file:

Change version and release to reflect FC19 package
Add version suffix to designate local RPM
Remove original CentOS patch references and replace with those from FC19
Add comments in change log

[iseo@jato SPECS]$ vi rdesktop.spec
-----------------------------------
Version:        1.7.1
Release:        2%{?dist}.1.iseo
...
Patch0:         %{name}-libao.patch
...
%prep
%setup -q
%patch0 -p1 -b .ao
...
%changelog
* Fri Nov  1 2013 Cal Webster <cwebster@xxxxxxxxxxxx> 1.7.1-2
- Latest version not available upstream
- This version from FC19
- Fixes regression errors (NOT IMPLEMENTED RDP5 opcodes, get cursor,
etc)
- Fixes mouse cursor not changing and background showing through
- Fixes freeze on remote system
- See https://bugzilla.redhat.com/show_bug.cgi?id=914279
-----------------------------------

##>> You might need to install pcsc-lite-devel if you get a build
dependency error. It's not installed by default.

[root@jato ~]# yum install pcsc-lite-devel
...
Installed:
  pcsc-lite-devel.x86_64
0:1.5.2-13.el6_4                                       

Complete!
[root@jato ~]# 

##>> You will also need to modify /usr/include/ao/ao.h to overcome this
build error:

------------------------------------------------------
[iseo@jato rpmbuild]$ rpmbuild -ba --sign --clean SPECS/rdesktop.spec
...
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
-fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall
-I/usr/include   -pthread -I/usr/include/PCSC       -DPACKAGE_NAME=
\"rdesktop\" -DPACKAGE_TARNAME=\"rdesktop\" -DPACKAGE_VERSION=\"1.7.1\"
-DPACKAGE_STRING=\"rdesktop\ 1.7.1\" -DPACKAGE_BUGREPORT=\"\"
-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DL_ENDIAN=1 -DHAVE_SYS_SELECT_H=1
-DHAVE_LOCALE_H=1 -DHAVE_LANGINFO_H=1 -DHAVE_SYSEXITS_H=1 -Dssldir=
\"/usr\" -DHAVE_XRANDR=1 -DWITH_SCARD=1 -DEGD_SOCKET=\"/var/run/egd-pool
\" -DWITH_RDPSND=1 -DRDPSND_LIBAO=1 -DHAVE_DIRENT_H=1 -DHAVE_DIRFD=1
-DHAVE_DECL_DIRFD=1 -DHAVE_ICONV_H=1 -DHAVE_ICONV=1 -DICONV_CONST=
-DHAVE_SYS_VFS_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_STATFS_H=1
-DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MOUNT_H=1 -DSTAT_STATVFS=1
-DHAVE_STRUCT_STATVFS_F_NAMEMAX=1 -DHAVE_STRUCT_STATFS_F_NAMELEN=1
-DHAVE_MNTENT_H=1 -DHAVE_SETMNTENT=1 -DIPv6=1 -DKEYMAP_PATH=
\"/usr/share/rdesktop/keymaps/\" -o orders.o -c orders.c
rdpsnd_libao.c: In function 'libao_open':
rdpsnd_libao.c:78: error: 'ao_sample_format' has no member named
'matrix'
rdpsnd_libao.c: In function 'libao_set_format':
rdpsnd_libao.c:117: error: 'ao_sample_format' has no member named
'matrix'
make: *** [rdpsnd_libao.o] Error 1
make: *** Waiting for unfinished jobs....
error: Bad exit status from /var/tmp/rpm-tmp.wkIC6X (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.wkIC6X (%build)
[iseo@jato rpmbuild]$ 
------------------------------------------------------

##>> Make a backup copy of ao.h:

cp /usr/include/ao/ao.h /usr/include/ao/ao.h.orig

##>> Open ao.h in vi editor and search for the ao_sample_format type
definition. Then add the "matrix" line at the bottom.

vi /usr/include/ao/ao.h
-----------------------
typedef struct ao_sample_format {
	int bits; /* bits per sample */
	int rate; /* samples per second (in a single channel) */
	int channels; /* number of audio channels */
	int byte_format; /* Byte ordering in sample, see constants below */
	char *matrix; /* channel input matrix */
} ao_sample_format;
-----------------------

##>> Make a copy of the modified ao.h in case it gets overwritten later:

cp /usr/include/ao/ao.h /usr/include/ao/ao.h.withMatrix


##>> The build should now complete without incident:

----------------------------------------------------
[iseo@jato rpmbuild]$ rpmbuild -ba --sign --clean SPECS/rdesktop.spec
...
Generating signature: 1005
Wrote: /home/iseo/rpmbuild/SRPMS/rdesktop-1.7.1-2.el6.1.iseo.src.rpm
Generating signature: 1005
Wrote: /home/iseo/rpmbuild/RPMS/x86_64/rdesktop-1.7.1-2.el6.1.iseo.x86_64.rpm
Generating signature: 1005
Wrote: /home/iseo/rpmbuild/RPMS/x86_64/rdesktop-debuginfo-1.7.1-2.el6.1.iseo.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.JeWQeP
+ umask 022
+ cd /home/iseo/rpmbuild/BUILD
+ cd rdesktop-1.7.1
+ rm
-rf /home/iseo/rpmbuild/BUILDROOT/rdesktop-1.7.1-2.el6.1.iseo.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.wRDJyS
+ umask 022
+ cd /home/iseo/rpmbuild/BUILD
+ rm -rf rdesktop-1.7.1
+ exit 0
[iseo@jato rpmbuild]$ 
----------------------------------------------------

Your install RPM is in ~/rpmbuild/RPMS/{i386,x86_64}/
You can now copy the RPM to any CentOS 6.4 machine of the same
architecture and update rdesktop.

yum localupdate rdesktop-1.7.1-2.el6.1.iseo.x86_64.rpm

-or-

If you maintain a local, custom repo like we do just copy the rpm there
and update your repo metadata so it'll be installed during the next
update cycle.

[root@pegasus ~]# yum list rdesktop
Loaded plugins: downloadonly, fastestmirror, priorities,
refresh-packagekit,
              : security
Loading mirror speeds from cached hostfile
 * base: ftpserver
56 packages excluded due to repository priority protections
Installed Packages
rdesktop.i686                  1.6.0-10.el6
@base       
Available Packages
rdesktop.i686                  1.7.1-2.el6.1.iseo
localupdates
[root@pegasus ~]# 


=============[/Rdesktop Workaround]=============


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos




[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux