diff --git a/appimage-template/docker/qt59/Dockerfile b/appimage-template/docker/qt59/Dockerfile index 4bb6951..60027bd 100644 --- a/appimage-template/docker/qt59/Dockerfile +++ b/appimage-template/docker/qt59/Dockerfile @@ -1,226 +1,227 @@ FROM ubuntu:14.04 RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb-src http://ca.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb http://ca.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb-src http://ca.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse" >> /etc/apt/sources.list RUN echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main" >> /etc/apt/sources.list RUN echo "deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.8 main" >> /etc/apt/sources.list RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list #link to bash RUN rm /bin/sh && ln -s /bin/bash /bin/sh RUN ln -s -f /bin/true /usr/bin/chfn RUN apt-get update && apt-get -y install wget RUN wget -q -O- https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - RUN apt-get update && apt-get -y upgrade && apt-get -y build-dep libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev python3-dev RUN apt-get update && apt-get -y --force-yes install \ '^libxcb.*-dev' \ bison \ bzr \ chrpath \ clang-3.8 \ festival \ festival-dev \ firebird-dev \ flex \ freeglut3-dev \ freetds-dev \ gdb \ git \ gperf \ guile-2.0-dev \ intltool \ libasound2-dev \ libassuan-dev \ libatkmm-1.6-dev \ libatomic-ops-dev \ libatspi2.0-dev \ libboost-all-dev \ libcap-dev \ libclang-3.8-dev \ libdouble-conversion-dev \ libfontconfig1-dev \ libfreetype6-dev \ libgbm-dev \ libgit2-dev \ libgl1-mesa-dev \ libgles2-mesa-dev \ libglew-dev \ libglib2.0-dev \ libglm-dev \ libglu1-mesa-dev \ libgtk-3-dev \ libharfbuzz-dev \ libicu-dev \ libjpeg-dev \ libmtdev-dev \ libmysqlclient-dev \ libopus-dev \ libpcre3-dev \ libpng-dev \ libpq-dev \ libproxy-dev \ libreadline-dev \ libsndfile1-dev \ libspeex-dev \ libsqlite3-dev \ libssl-dev \ libsystemd-journal-dev \ libudev-dev \ libunistring-dev \ libunwind8-dev \ libvorbis-dev \ libwayland-client0 \ libwayland-dev \ libwayland-egl1-mesa \ libwayland-server0 \ libwebp-dev \ libx11-xcb-dev \ libxcomposite-dev \ libxext-dev \ libxi-dev \ libxkbcommon-dev \ libxkbcommon-x11-dev \ libxml2-dev \ libxrender-dev \ libxslt1-dev \ lldb-3.8 \ llvm-3.8 \ llvm-3.8-dev \ nasm \ mesa-common-dev \ ml-lex \ openssh-server \ pkg-config \ postgresql-9.4 \ postgresql-contrib-9.4 \ postgresql-server-dev-9.4 \ publicsuffix \ python-dev \ software-properties-common \ subversion \ texinfo \ unixodbc-dev \ wget \ x11proto-dri3-dev \ x11proto-present-dev \ yasm \ zlib1g-dev \ zsync ## Rebuild pam to allow su # Rebuild pam with --disable-audit flag # Fixes: https://github.com/docker/docker/issues/5899 ## RUN apt-get -y build-dep pam \ && cd /tmp/ \ && export CONFIGURE_OPTS=--disable-audit \ && apt-get -b source pam \ && dpkg -i libpam-doc*.deb libpam-modules*.deb libpam-runtime*.deb libpam0g*.deb \ && rm -rf /tmp/* \ && unset CONFIGURE_OPTS #Oddballs from ppas RUN add-apt-repository -y ppa:wayland.admin/daily-builds && sudo apt-get update && sudo apt-get -y install libinput-dev libwayland-dev \ libwayland-server0 libwayland0 && add-apt-repository -y -r ppa:wayland.admin/daily-builds RUN add-apt-repository -y ppa:jonathonf/mysql && sudo apt-get update && apt-get -y install mysql-server-core-5.7 mysql-client-5.7 && add-apt-repository -y -r ppa:jonathonf/mysql RUN add-apt-repository -y ppa:george-edison55/cmake-3.x && sudo apt-get update && apt-get -y install cmake RUN add-apt-repository -y ppa:openjdk-r/ppa && apt-get update && apt-get -y install openjdk-8-jdk # Set up for GCC options ( try gcc6 ) RUN add-apt-repository -y ppa:ubuntu-toolchain-r/test && apt-get update && apt-get -y install gcc-4.9 g++-4.9 gcc-5 g++-5 gcc-6 g++-6 && \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 10 && \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 && \ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 30 && \ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.9 10 && \ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20 && \ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 30 && \ update-alternatives --set gcc "/usr/bin/gcc-5" && \ update-alternatives --set g++ "/usr/bin/g++-5" && \ update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 40 && \ update-alternatives --set cc /usr/bin/gcc && \ update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 40 && \ update-alternatives --set c++ /usr/bin/g++ && \ gcc --version && \ cc --version && \ g++ --version && apt-get -y upgrade #Set ENV ENV LD_LIBRARY_PATH /opt/usr/lib:/opt/usr/lib/gstreamer-1.0:/opt/usr/lib/x86_64-linux-gnu:/usr/lib:/usr/lib64:/lib ENV PATH /opt/usr/bin:/home/jenkins/.rbenv/bin:/home/jenkins/.rbenv/shims:$PATH ENV PKG_CONFIG_PATH /opt/usr/lib/pkgconfig:/opt/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig ENV CXXFLAGS -std=c++11 ENV CPATH /opt/usr/include/gstreamer-1.0:/opt/usr/include:/opt/usr/include/dbus-1.0:$CPATH ENV SOURCES / ENV ACLOCAL_PATH = /opt/usr/share/aclocal:/usr/share/aclocal # Create jenkins user RUN groupadd -g 1000 jenkins RUN useradd -m -u 1000 -g 1000 -d /home/jenkins jenkins RUN mkdir -p /{appimages,app.Dir,source} RUN chown jenkins.jenkins /appimages && chown jenkins.jenkins /app.Dir && chown jenkins.jenkins /source && chown jenkins.jenkins /opt RUN echo 'jenkins:1234' | chpasswd #changeme RUN adduser jenkins sudo RUN echo 'eval "$(rbenv init -)"' >> /etc/profile # Cpan perl lib needed by kf5 RUN cd $SOURCES && cpan URI::Escape RUN echo jenkins ALL=NOPASSWD: ALL >> "/etc/sudoers" RUN mkdir /var/run/sshd # Everythin else as jenkins user USER jenkins #Set ENV ENV LD_LIBRARY_PATH /opt/usr/lib:/opt/usr/lib/gstreamer-1.0:/opt/usr/lib/x86_64-linux-gnu:/usr/lib:/usr/lib64:/lib ENV PATH /opt/usr/bin:/home/jenkins/.rbenv/bin:/home/jenkins/.rbenv/shims:$PATH ENV PKG_CONFIG_PATH /opt/usr/lib/pkgconfig:/opt/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig ENV CXXFLAGS -std=c++11 -fPIC ENV CPATH /opt/usr/include/gstreamer-1.0:/opt/usr/include:/opt/usr/include/python3.5:$CPATH ENV SOURCES /source ENV QMAKE_CFLAGS_ISYSTEM '' ENV PYTHONPATH /opt/usr/lib/python3.5/site-packages:$PYTHONPATH # Install rbenv and ruby-build RUN echo 'gem: --no-rdoc --no-ri' >> ~/.gemrc RUN git clone https://github.com/sstephenson/rbenv.git ~/.rbenv RUN git clone https://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build RUN rbenv install 2.4.1 RUN echo 'eval "$(rbenv init -)"' >> ~/.bashrc && rbenv init - ADD Gemfile /home/jenkins/ RUN cd ~ && ls && rbenv local 2.4.1 && gem install bundler && bundle install --binstubs && bundle show rspec ADD deps.sh / RUN /bin/bash -x deps.sh # # Build Qt5 from git and install to /opt/usr ( developer buid ) RUN sudo apt-get -y remove 'qt.*' ADD qt5.sh / RUN /bin/bash -x qt5.sh ADD webkit.sh / #RUN /bin/bash -x webkit.sh # # Various external Qt relelated modules addons RUN cd /source && git clone git://code.qt.io/qt/qtdeclarative.git && cd /source/qtdeclarative && git checkout 5.9 && \ cd /source/qtdeclarative && qmake PREFIX=/opt/usr . && make && sudo make install && rm -rfv /source/qtdeclarative RUN cd /source && wget https://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtscript-opensource-src-5.9.1.tar.xz && \ tar -xvf qtscript-opensource-src-5.9.1.tar.xz && cd qtscript-opensource-src-5.9.1 && qmake PREFIX=/opt/usr . && make && sudo make install && rm -rfv /source/* RUN cd /source && wget https://download.qt.io/archive/qt/5.9/5.9.1/submodules/qtx11extras-opensource-src-5.9.1.tar.xz && \ tar -xvf qtx11extras-opensource-src-5.9.1.tar.xz && cd qtx11extras-opensource-src-5.9.1 && qmake PREFIX=/opt/usr . && make && sudo make install && rm -rfv /source/* RUN cd $SOURCES && git clone https://code.qt.io/cgit/qt/qtquick1.git && \ cd $SOURCES/qtquick1 && qmake PREFIX=/opt/usr . && make && sudo make install && rm -rfv $SOURCES/qtquick1 RUN cd /source && git clone git://code.qt.io/qt/qtwebchannel.git && cd /source/qtwebchannel && git checkout 5.9 && \ cd /source/qtwebchannel && git submodule update --init && qmake PREFIX=/opt/usr . && make && sudo make install && rm -rfv /source/qtwebchannel RUN cd /source && git clone git://code.qt.io/qt/qtwebengine.git && cd /source/qtwebengine && git checkout 5.9 && \ cd /source/qtwebengine && git submodule update --init && qmake PREFIX=/opt/usr . && make && sudo make install && rm -rfv /source/qtwebengine RUN cd $SOURCES && git clone http://code.qt.io/qt/qtstyleplugins.git && \ cd $SOURCES/qtstyleplugins && qmake PREFIX=/opt/usr . && make && sudo make install && rm -rfv $SOURCES/qtstyleplugins RUN cd $SOURCES && git clone https://github.com/flavio/qjson && \ cd $SOURCES/qjson && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX:PATH=/opt/usr && make && sudo make install && rm -rfv $SOURCES/qjson ADD qt5deps.sh / RUN /bin/bash -x qt5deps.sh RUN strip -g $(find . -type f -executable) || true USER root +RUN mkdir -p /app/src && chown -R jenkins.jenkins /app/src EXPOSE 22 CMD ["/usr/sbin/sshd", "-D"] diff --git a/appimage-template/docker/qt59/kf5/Dockerfile b/appimage-template/docker/qt59/kf5/Dockerfile index 3466410..0aea5d8 100644 --- a/appimage-template/docker/qt59/kf5/Dockerfile +++ b/appimage-template/docker/qt59/kf5/Dockerfile @@ -1,15 +1,17 @@ FROM sgclark/trusty-qt59 # KF5 USER jenkins -RUN sudo apt-get update && sudo apt-get -y install liblzma-dev libhttp-parser-dev libssh2-1-dev libcurl4-openssl-dev libfam-dev libopenexr-dev libaspell-dev hspell libhunspell-dev \ -libvoikko-dev libqrencode-dev libdmtx-dev libutempter-dev media-player-info libgssapi3-heimdal libacl1-dev libepoxy-dev libgif-dev libpolkit-agent-1-dev libpolkit-gobject-1-dev \ -libgpgme11-dev -RUN wget http://archive.ubuntu.com/ubuntu/pool/main/libd/libdbusmenu-qt/libdbusmenu-qt_0.9.3+16.04.20160218.orig.tar.gz && tar -zxvf libdbusmenu-qt_0.9.3+16.04.20160218.orig.tar.gz && cd libdbusmenu-qt-0.9.3+16.04.20160218/ && \ +RUN sudo apt-get update && sudo apt-get -y install liblzma-dev libhttp-parser-dev libssh2-1-dev libcurl4-openssl-dev libfam-dev libopenexr-dev libaspell-dev \ + hspell libhunspell-dev libvoikko-dev libqrencode-dev libdmtx-dev libutempter-dev media-player-info libgssapi3-heimdal libacl1-dev libepoxy-dev \ + libgif-dev libpolkit-agent-1-dev libpolkit-gobject-1-dev libgpgme11-dev +RUN cd $SOURCES && wget http://archive.ubuntu.com/ubuntu/pool/main/libd/libdbusmenu-qt/libdbusmenu-qt_0.9.3+16.04.20160218.orig.tar.gz \ +&& tar -zxvf libdbusmenu-qt_0.9.3+16.04.20160218.orig.tar.gz && cd libdbusmenu-qt-0.9.3+16.04.20160218/ && \ mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX:PATH=/opt/usr -DCMAKE_INSTALL_LIBDIR=/opt/usr/lib \ --DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF -DUSE_QT5=ON -DCMAKE_INCLUDE_CURRENT_DIR=ON -Wno-dev .. && make && make install && rm -rfv /libdbusmenu-qt +-DCMAKE_BUILD_TYPE=Release -DWITH_DOC=OFF -DUSE_QT5=ON -DCMAKE_INCLUDE_CURRENT_DIR=ON -Wno-dev .. && make \ +&& sudo make install && rm -rfv /libdbusmenu-qt ADD kf5.sh / RUN /bin/bash -x kf5.sh RUN rm kf5.sh USER root EXPOSE 22 CMD ["/usr/sbin/sshd", "-D"] diff --git a/appimage-template/libs/sources.rb b/appimage-template/libs/sources.rb index ddbcd26..6f540be 100644 --- a/appimage-template/libs/sources.rb +++ b/appimage-template/libs/sources.rb @@ -1,212 +1,208 @@ #!/usr/bin/env ruby # frozen_string_literal: true # # Copyright (C) 2016 Scarlett Clark # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) version 3, or any # later version accepted by the membership of KDE e.V. (or its # successor approved by the membership of KDE e.V.), which shall # act as a proxy defined in Section 6 of version 3 of the license. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library. If not, see . require 'yaml' require 'fileutils' class Sources attr_accessor :name def initialize() - Dir.chdir('/') - unless Dir.exist?("/app/src") - FileUtils.mkdir_p("/app/src") - end Dir.chdir('/app/src/') end def get_source(name, type, url, branch='master') case "#{type}" when 'git' Dir.chdir('/app/src/') unless Dir.exist?("/app/src/#{name}") system( "git clone #{url}") unless branch == 'master' Dir.chdir("/app/src/#{name}") system("git checkout #{branch}") end end when 'xz' Dir.chdir('/app/src/') unless Dir.exist?("/app/src/#{name}") system("wget #{url}") system("tar -xvf #{name}*.tar.xz") end when 'gz' Dir.chdir('/app/src/') unless Dir.exist?("/app/src/#{name}") system("wget #{url}") system("tar -zxvf #{name}*.tar.gz") end when 'bz2' Dir.chdir('/app/src/') unless Dir.exist?("/app/src/#{name}") system("wget #{url}") system("tar -jxvf #{name}.tar.bz2") end when 'mercurial' Dir.chdir('/app/src') unless Dir.exist?("/app/src/#{name}") system("hg clone #{url}") end when 'bzr' Dir.chdir('/app/src') unless Dir.exist?("/app/src/#{name}") system("bzr branch #{url}") end when 'zip' Dir.chdir('/app/src') unless Dir.exist?("/app/src/#{name}") system("wget #{url}") system("unzip #{name}.zip") end when 'svn' Dir.chdir('/app/src') unless Dir.exist?("/app/src/#{name}") system("svn export #{url}") end when 'none' Dir.chdir('/app/src') unless Dir.exist?("/app/src/#{name}") Dir.mkdir "#{name}" p "No sources configured" end else "You gave me #{type} -- I have no idea what to do with that." end $?.exitstatus end def run_build(name, buildsystem, options, path, autoreconf=false, insource=false) ENV['PATH']='/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' ENV['LD_LIBRARY_PATH']='/opt/usr/lib:/opt/usr/lib/x86_64-linux-gnu:/usr/lib:/usr/lib/x86_64-linux-gnu:/usr/lib64:/usr/lib:/lib:/lib64' ENV['CPLUS_INCLUDE_PATH']='/opt/usr:/opt/usr/include:/usr/include' ENV['CFLAGS']="-g -O2 -fPIC" ENV['CXXFLAGS']='-std=c++11' ENV['PKG_CONFIG_PATH']='/opt/usr/lib/pkgconfig:/opt/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig' ENV['ACLOCAL_PATH']='/opt/usr/share/aclocal:/usr/share/aclocal' ENV['XDG_DATA_DIRS']='/opt/usr/share:/opt/share:/usr/local/share/:/usr/share:/share' ENV.fetch('PATH') ENV.fetch('LD_LIBRARY_PATH') ENV.fetch('CFLAGS') ENV.fetch('CXXFLAGS') ENV.fetch('PKG_CONFIG_PATH') ENV.fetch('ACLOCAL_PATH') ENV.fetch('CPLUS_INCLUDE_PATH') ENV.fetch('XDG_DATA_DIRS') system( "echo $PATH" ) system( "echo $LD_LIBRARY_PATH" ) system( "echo $CFLAGS" ) system( "echo $CXXFLAGS" ) system( "echo $PKG_CONFIG_PATH" ) system( "echo $ACLOCAL_PATH" ) system( "echo $CPLUS_INCLUDE_PATH" ) system( "echo $XDG_DATA_DIRS" ) case "#{buildsystem}" when 'make' Dir.chdir("#{path}") do unless "#{autoreconf}" == true unless "#{insource}" == true cmd = "mkdir #{name}-builddir && cd #{name}-builddir && ../configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install" end if "#{insource}" == true cmd = "cd #{name} && ../configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install" end p "Running " + cmd system(cmd) system("rm -rfv #{name}-builddir") end if "#{autoreconf}" == true p "Running " + cmd unless "#{insource}" == true cmd = "autoreconf --force --install && mkdir #{name}-builddir && cd #{name}-builddir && ../configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install prefix=/opt/usr" end if "#{insource}" == true cmd = "autoreconf --force --install && cd #{name} && ../configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install prefix=/opt/usr" end system(cmd) system("rm -rfv #{name}-builddir") end end $?.exitstatus when 'autogen' Dir.chdir("#{path}") do unless "#{autoreconf}" == true unless "#{insource}" == true cmd = "mkdir #{name}-builddir && cd #{name}-builddir && ../autogen && ../configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install" end if "#{insource}" == true cmd = "cd #{name} && ./autogen && ./configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install" end p "Running " + cmd system(cmd) system("rm -rfv #{name}-builddir") end if "#{autoreconf}" == true p "Running " + cmd unless "#{insource}" == true cmd = "autoreconf --force --install && mkdir #{name}-builddir && cd #{name}-builddir && ../configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install prefix=/opt/usr" end if "#{insource}" == true cmd = "autoreconf --force --install && cd #{name} && ../configure --prefix=/opt/usr #{options} && make VERBOSE=1 -j 8 && make install prefix=/opt/usr" end system(cmd) system("rm -rfv #{name}-builddir") end end $?.exitstatus when 'cmake' Dir.chdir(path) do p "running cmake #{options}" system("mkdir #{name}-builddir && cd #{name}-builddir && cmake #{options} ../ && make VERBOSE=1 -j 8 && make install") end $?.exitstatus when 'custom' unless "#{name}" == 'cpan' Dir.chdir("#{path}") do p "running #{options}" system("#{options}") end end if "#{name}" == 'cpan' p "running #{options}" system("#{options}") end $?.exitstatus when 'qmake' Dir.chdir("#{path}") do p "running qmake #{options}" system('echo $PATH') system("#{options}") system('make VERBOSE=1 -j 8 && make install') end $?.exitstatus when 'bootstrap' Dir.chdir(path) do p "running ./bootstrap #{options}" system("./bootstrap #{options}") system('make VERBOSE=1 -j 8 && make install') end $?.exitstatus else "You gave me #{buildsystem} -- I have no idea what to do with that." end end end