Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildbot switch to docker #2040

Closed
totaam opened this issue Nov 15, 2018 · 16 comments
Closed

buildbot switch to docker #2040

totaam opened this issue Nov 15, 2018 · 16 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Nov 15, 2018

Based on #2028, we can have a base image with the main build dependencies for each distro supported.
ie for centos7, here's a list of packages, not just xpra but also the build dependencies for some of the other packages we have to provide:

xorg-x11-server-devel sudo epel-release krb5-devel python-devel rpm-build pkgconfig which
#gstreamer plugin:
gstreamer1-devel gstreamer1-plugins-base-devel
#(py)gtkgl:
gtk2-devel libGLU-devel libXmu-devel libXt-devel pangox-compat-devel
ncurses-devel libXinerama-devel
pango-devel pygtk2-devel
#pycuda:
numpy python-distribute boost-devel
openssl-devel python-setuptools
#python-uinput:
libudev-devel
python-six
xmlto 
#python-pillow:
tkinter tk-devel libjpeg-devel lcms2-devel PyQt4

Not sure if all the dependencies should be in the base image, or only added when we build the package that requires them. (so many packages..)

Then we have to install the packages we build for the next step:

  • pangox-compat
  • gtkglext
  • pygtkglext
    or:
  • lz4
  • python-lz4

So some form of scripting is likely to be needed to manage those dependencies.

Other distros may not need to build some packages (ie: python-pillow is in the Fedora repository).

This can then be used to build the master image for building xpra.

@totaam
Copy link
Collaborator Author

totaam commented Nov 16, 2018

See also el7 vs el7_6 in #2028#comment:13

@totaam
Copy link
Collaborator Author

totaam commented Jan 10, 2019

Example of something difficult to handle: http://winswitch.org/trac/ticket/307#comment:6 : we need to build lz4 on centos, except on centos 7.4 and later..

@totaam
Copy link
Collaborator Author

totaam commented Jan 10, 2019

Another problem: mock 1.4.2-1.el7 fails to build el6 packages and systemd-nspawn cannot change user with EL6 chroot.

I was getting getent initgroups failed with error code 1., worked around that by using nspawn as root and running su -l buildbot from there..

@totaam
Copy link
Collaborator Author

totaam commented Jan 10, 2019

And another: we need a recent version of nasm to build x264, r21315 adds a spec file so we can package the latest release. But on centos6, it does not build:

configure.ac:3: error: Autoconf version 2.69 or higher is required
...

@totaam
Copy link
Collaborator Author

totaam commented Jan 13, 2019

more:

  • pycuda 2014.1 is the last version that can be built against the version of numpy found in the centos6 repos, and the specfile for 2014.1 is found in our 0.15.x release!
  • cuda 7.5 is the last release suported by pycuda 2014 / centos6

And installing older versions of CUDA on fedora is not easy because we're missing [/attachment/ticket/2040/InstallUtils.pm]... so run it like so:

INSTALLER_DIR=/opt/cuda-5.5-installer
INSTALL_DIR=/opt/cuda-5.5
sh cuda_5.5.22_linux_64.run -verbose -override -extract $INSTALLER_DIR
cd $INSTALLER_DIR
wget https://xpra.org/trac/raw-attachment/ticket/2040/InstallUtils.pm
PERL5LIB=. ./cuda-linux64-rel-5.5.22-16488124.run --prefix=$INSTALL_DIR -noprompt

@totaam
Copy link
Collaborator Author

totaam commented Jan 13, 2019

2019-01-13 11:15:18: antoine uploaded file InstallUtils.pm (2.7 KiB)

missing perl module

@totaam
Copy link
Collaborator Author

totaam commented Jan 14, 2019

Another issue similar to comment:2 is when the distro ships a broken package (ie: either out of date version or buggy packaging): in this case we want to ship a working package, but stop doing so if and when the distro fixes things.

Example: python-uinput broken in Fedora 24 to Fedora 29! (~3 years without a fix!)

@totaam
Copy link
Collaborator Author

totaam commented Jan 16, 2019

Out of the 40+ builds, one slipped through with the wrong ffmpeg dependency: Error: Package: ffmpeg-xpra-4.1-1.el7_6.x86_64 (Xpra)..

@totaam
Copy link
Collaborator Author

totaam commented Feb 6, 2019

new constraint: some versions may require a package (ie: versions before 2.5 require websockify and python-websocket-client - see #2121), but not after. Yet we need to keep the RPM specfile updated and update the repository from that branch - until the distribution ships it / updates that version.

@totaam
Copy link
Collaborator Author

totaam commented Feb 8, 2019

See also #1910 and #1830

@totaam
Copy link
Collaborator Author

totaam commented Mar 7, 2019

Just when you think that things can't possibly get more interesting: Ubuntu ships two incompatible versions of Xorg for the same distro version, see #2190

@totaam
Copy link
Collaborator Author

totaam commented Apr 1, 2019

Another one that should have been spotted: #2240, xpra 1.0.13 builds for centos 6.9 are MIA.

@totaam
Copy link
Collaborator Author

totaam commented Jun 6, 2019

New one: rencode needs a newer cython version on centos.

@totaam
Copy link
Collaborator Author

totaam commented Jun 13, 2019

Some dockerfiles and build scripts added by smo in r22880 + r22881.
@smo: can you add details here?

@totaam
Copy link
Collaborator Author

totaam commented Aug 1, 2019

2019-08-01 12:55:35: smo commented

Yes I've been working on a few instances of docker to build these. I have committed the stuff that I was working on for centos 7.6 which works mostly well.

I'm not too happy with the results as every time I build I have to go through all the packages that I need and build them in the correct order.

This has a few issues.

  1. No caching of source tarballs which is quite wasteful
  2. Rebuilding all rpms even when we don't need to

Should probably change this so we can call the shell script with a name of spec file to build that way we can do one offs.

That doesn't solve the problem completely but at least we can built each one 1 at a time.

The problem is that some things need to be installed in the docker container for building other things. Which is possible but do we want to install all these every time we build 1 rpm that would be costly for time.

@totaam totaam added the v2.4.x label Jan 22, 2021
@totaam totaam added this to the 4.1 milestone Jan 23, 2021
@totaam totaam mentioned this issue Jan 23, 2021
@totaam
Copy link
Collaborator Author

totaam commented May 18, 2021

Not actually using docker itself, but containers using buildah.
All the files are here: https://github.com/Xpra-org/xpra/tree/master/packaging/buildah

@totaam totaam closed this as completed May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant