#!/bin/bash #=========================== # UMVIRT LINUX FROM SCRATCH #=========================== # Compilation script. # Network mode. #=========================== # Release: 0.2.2 # Package: webkitgtk3 #=========================== # DB commit: 48bb9ee31306c82c48dfaaad707eb4f6a926eb8a # APP commit: 1ca4178aea919e4c9e869e3d650ff8af9678bd6f #=========================== echo "ULFS Package installation start" echo "===============================" echo "Package: webkitgtk3" echo "Release: 0.2.2" echo "checking config file" if [ -f $ULFS_CONFIG_FILE ] then echo "loading config file $ULFS_CONFIG_FILE..." . $ULFS_CONFIG_FILE fi #Creating log directory mkdir -p /var/log/ulfs-packages/webkitgtk3/ #Saving start timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/start.time #Going to source directory... cd /sources #Checking dependances... #Checking icu... if [ ! -f /var/cache/ulfs-packages/icu ]; then echo "Dependance \"icu\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/icu/install -O - | bash if [ ! -f /var/cache/ulfs-packages/icu ]; then echo "Dependance \"icu\" is not installed. Exiting..." exit fi fi #Checking libtasn1... if [ ! -f /var/cache/ulfs-packages/libtasn1 ]; then echo "Dependance \"libtasn1\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libtasn1/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libtasn1 ]; then echo "Dependance \"libtasn1\" is not installed. Exiting..." exit fi fi #Checking gobject-introspection... if [ ! -f /var/cache/ulfs-packages/gobject-introspection ]; then echo "Dependance \"gobject-introspection\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/gobject-introspection/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gobject-introspection ]; then echo "Dependance \"gobject-introspection\" is not installed. Exiting..." exit fi fi #Checking cmake... if [ ! -f /var/cache/ulfs-packages/cmake ]; then echo "Dependance \"cmake\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/cmake/install -O - | bash if [ ! -f /var/cache/ulfs-packages/cmake ]; then echo "Dependance \"cmake\" is not installed. Exiting..." exit fi fi #Checking mesa... if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/mesa/install -O - | bash if [ ! -f /var/cache/ulfs-packages/mesa ]; then echo "Dependance \"mesa\" is not installed. Exiting..." exit fi fi #Checking cairo... if [ ! -f /var/cache/ulfs-packages/cairo ]; then echo "Dependance \"cairo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/cairo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/cairo ]; then echo "Dependance \"cairo\" is not installed. Exiting..." exit fi fi #Checking hicolor-icon-theme... if [ ! -f /var/cache/ulfs-packages/hicolor-icon-theme ]; then echo "Dependance \"hicolor-icon-theme\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/hicolor-icon-theme/install -O - | bash if [ ! -f /var/cache/ulfs-packages/hicolor-icon-theme ]; then echo "Dependance \"hicolor-icon-theme\" is not installed. Exiting..." exit fi fi #Checking sqlite... if [ ! -f /var/cache/ulfs-packages/sqlite ]; then echo "Dependance \"sqlite\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/sqlite/install -O - | bash if [ ! -f /var/cache/ulfs-packages/sqlite ]; then echo "Dependance \"sqlite\" is not installed. Exiting..." exit fi fi #Checking gtk3... if [ ! -f /var/cache/ulfs-packages/gtk3 ]; then echo "Dependance \"gtk3\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/gtk3/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gtk3 ]; then echo "Dependance \"gtk3\" is not installed. Exiting..." exit fi fi #Checking libsecret... if [ ! -f /var/cache/ulfs-packages/libsecret ]; then echo "Dependance \"libsecret\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libsecret/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libsecret ]; then echo "Dependance \"libsecret\" is not installed. Exiting..." exit fi fi #Checking libsoup3... if [ ! -f /var/cache/ulfs-packages/libsoup3 ]; then echo "Dependance \"libsoup3\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libsoup3/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libsoup3 ]; then echo "Dependance \"libsoup3\" is not installed. Exiting..." exit fi fi #Checking bubblewrap... if [ ! -f /var/cache/ulfs-packages/bubblewrap ]; then echo "Dependance \"bubblewrap\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/bubblewrap/install -O - | bash if [ ! -f /var/cache/ulfs-packages/bubblewrap ]; then echo "Dependance \"bubblewrap\" is not installed. Exiting..." exit fi fi #Checking libgudev... if [ ! -f /var/cache/ulfs-packages/libgudev ]; then echo "Dependance \"libgudev\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libgudev/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libgudev ]; then echo "Dependance \"libgudev\" is not installed. Exiting..." exit fi fi #Checking gst-plugins-base... if [ ! -f /var/cache/ulfs-packages/gst-plugins-base ]; then echo "Dependance \"gst-plugins-base\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/gst-plugins-base/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gst-plugins-base ]; then echo "Dependance \"gst-plugins-base\" is not installed. Exiting..." exit fi fi #Checking gst-plugins-bad... if [ ! -f /var/cache/ulfs-packages/gst-plugins-bad ]; then echo "Dependance \"gst-plugins-bad\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/gst-plugins-bad/install -O - | bash if [ ! -f /var/cache/ulfs-packages/gst-plugins-bad ]; then echo "Dependance \"gst-plugins-bad\" is not installed. Exiting..." exit fi fi #Checking libwebp... if [ ! -f /var/cache/ulfs-packages/libwebp ]; then echo "Dependance \"libwebp\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libwebp/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libwebp ]; then echo "Dependance \"libwebp\" is not installed. Exiting..." exit fi fi #Checking openjpeg... if [ ! -f /var/cache/ulfs-packages/openjpeg ]; then echo "Dependance \"openjpeg\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/openjpeg/install -O - | bash if [ ! -f /var/cache/ulfs-packages/openjpeg ]; then echo "Dependance \"openjpeg\" is not installed. Exiting..." exit fi fi #Checking lcms2... if [ ! -f /var/cache/ulfs-packages/lcms2 ]; then echo "Dependance \"lcms2\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/lcms2/install -O - | bash if [ ! -f /var/cache/ulfs-packages/lcms2 ]; then echo "Dependance \"lcms2\" is not installed. Exiting..." exit fi fi #Checking ruby... if [ ! -f /var/cache/ulfs-packages/ruby ]; then echo "Dependance \"ruby\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/ruby/install -O - | bash if [ ! -f /var/cache/ulfs-packages/ruby ]; then echo "Dependance \"ruby\" is not installed. Exiting..." exit fi fi #Checking unifdef... if [ ! -f /var/cache/ulfs-packages/unifdef ]; then echo "Dependance \"unifdef\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/unifdef/install -O - | bash if [ ! -f /var/cache/ulfs-packages/unifdef ]; then echo "Dependance \"unifdef\" is not installed. Exiting..." exit fi fi #Checking which... if [ ! -f /var/cache/ulfs-packages/which ]; then echo "Dependance \"which\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/which/install -O - | bash if [ ! -f /var/cache/ulfs-packages/which ]; then echo "Dependance \"which\" is not installed. Exiting..." exit fi fi #Checking wpebackend-fdo... if [ ! -f /var/cache/ulfs-packages/wpebackend-fdo ]; then echo "Dependance \"wpebackend-fdo\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/wpebackend-fdo/install -O - | bash if [ ! -f /var/cache/ulfs-packages/wpebackend-fdo ]; then echo "Dependance \"wpebackend-fdo\" is not installed. Exiting..." exit fi fi #Checking enchant... if [ ! -f /var/cache/ulfs-packages/enchant ]; then echo "Dependance \"enchant\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/enchant/install -O - | bash if [ ! -f /var/cache/ulfs-packages/enchant ]; then echo "Dependance \"enchant\" is not installed. Exiting..." exit fi fi #Checking geoclue... if [ ! -f /var/cache/ulfs-packages/geoclue ]; then echo "Dependance \"geoclue\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/geoclue/install -O - | bash if [ ! -f /var/cache/ulfs-packages/geoclue ]; then echo "Dependance \"geoclue\" is not installed. Exiting..." exit fi fi #Checking libavif... if [ ! -f /var/cache/ulfs-packages/libavif ]; then echo "Dependance \"libavif\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/libavif/install -O - | bash if [ ! -f /var/cache/ulfs-packages/libavif ]; then echo "Dependance \"libavif\" is not installed. Exiting..." exit fi fi #Checking xdg-dbus-proxy... if [ ! -f /var/cache/ulfs-packages/xdg-dbus-proxy ]; then echo "Dependance \"xdg-dbus-proxy\" not found. Trying to install..."; wget --no-check-certificate https://umvirt.com/linux/packages//0.2.2/xdg-dbus-proxy/install -O - | bash if [ ! -f /var/cache/ulfs-packages/xdg-dbus-proxy ]; then echo "Dependance \"xdg-dbus-proxy\" is not installed. Exiting..." exit fi fi #Saving downloading timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/download.time #Downloading source package archive... wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.2.2/packages/w/webkitgtk-2.44.3.tar.xz.md5sum wget --no-check-certificate -nc https://umvirt.com/linux/downloads/0.2.2/packages/w/webkitgtk-2.44.3.tar.xz #Checking source package file existance if [ ! -f webkitgtk-2.44.3.tar.xz ]; then echo "Error: Can't find webkitgtk-2.44.3.tar.xz. Exiting!" exit fi #Checking source package file checksum if [ -f webkitgtk-2.44.3.tar.xz.md5sum ]; then MD5=`LANG=C md5sum -c webkitgtk-2.44.3.tar.xz.md5sum | grep OK` if [ "$MD5" == "" ] ; then echo "Error: Checksum of webkitgtk-2.44.3.tar.xz is wrong. Exiting!" exit fi fi #Saving cleanup timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/cleanup.time rm -rfv /sources/webkitgtk-2.44.3/ #Saving extracting timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/unpack.time #Extracting tar source package archive with default parameters... tar -xf webkitgtk-2.44.3.tar.xz #Checking package directory size after unpack... du -s webkitgtk-2.44.3 | awk 'NR==1 {print $1}' > /var/log/ulfs-packages/webkitgtk3/unpack.size #Going to source package directory... cd webkitgtk-2.44.3 #Saving configuration timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/configure.time #Sleep 1 second sleep 1 if [[ "$ULFS_PKG_DATERESET" == "YES" ]] then #Changing all files creation time (except build configuration files) in source directory to find them after installation find /sources/webkitgtk-2.44.3 \! -path "*/configure*" \! -path "*/Makefile*" \! -path "*.make" \! -path "*.m4" \! -path "*.am" \! -path "*.mk" \! -path "*.stamp" \! -path "*gentpl.py" -exec touch -m {} + fi #Running configuration script... echo "checking config file" if [ -f $ULFS_CONFIG_FILE ] then echo "loading config file $ULFS_CONFIG_FILE..." . $ULFS_CONFIG_FILE fi cat > ulfs_configure.sh << EOIS echo "Initializing distributed build environment... " if [[ "\$ULFS_ICECC" == "YES" ]] then export PATH="\$ULFS_ICECC_PATH:\$PATH" echo "ICECC" fi echo "Environment debug..." echo "PATH: \$PATH" echo "MAKEFLAGS: \$MAKEFLAGS" echo "NINJAJOBS: \$NINJAJOBS" env | grep ULFS sed '/returnLocation.isStackArgument/,/returnLocation = canonicalLocation/d'\\ -i Source/JavaScriptCore/wasm/WasmBBQJIT.cpp mkdir -vp build && cd build && cmake -D CMAKE_BUILD_TYPE=Release \\ -D CMAKE_INSTALL_PREFIX=/usr \\ -D CMAKE_SKIP_INSTALL_RPATH=ON \\ -D PORT=GTK \\ -D LIB_INSTALL_DIR=/usr/lib \\ -D USE_LIBBACKTRACE=OFF \\ -D USE_LIBHYPHEN=OFF \\ -D ENABLE_GAMEPAD=OFF \\ -D ENABLE_MINIBROWSER=ON \\ -D ENABLE_DOCUMENTATION=OFF \\ -D ENABLE_WEBDRIVER=OFF \\ -D USE_WOFF2=OFF \\ -D USE_GTK4=OFF \\ -D ENABLE_BUBBLEWRAP_SANDBOX=ON \\ -W no-dev -G Ninja .. EOIS cat ulfs_configure.sh | bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk3/configure.log #Saving build timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/build.time #Running build script... echo "checking config file" if [ -f $ULFS_CONFIG_FILE ] then echo "loading config file $ULFS_CONFIG_FILE..." . $ULFS_CONFIG_FILE fi cat > ulfs_build.sh << EOIS echo "Initializing distributed build environment... " if [[ "\$ULFS_ICECC" == "YES" ]] then export PATH="\$ULFS_ICECC_PATH:\$PATH" echo "ICECC" fi echo "Environment debug..." echo "PATH: \$PATH" echo "MAKEFLAGS: \$MAKEFLAGS" echo "NINJAJOBS: \$NINJAJOBS" env | grep ULFS cd build && ninja EOIS cat ulfs_build.sh | bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk3/build.log #Saving install timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/install.time #Running install script... cat > ulfs_install.sh << EOIS cd build && ninja install EOIS USER=`whoami` if [ "$USER" == "root" ] ; then cat ulfs_install.sh | bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk3/install.log else cat ulfs_install.sh | sudo bash 2>&1 | tee /var/log/ulfs-packages/webkitgtk3/install.log fi #Saving finish timestamp date +%s > /var/log/ulfs-packages/webkitgtk3/finish.time #Checking package directory size after unpack... cd /sources du -s webkitgtk-2.44.3 | awk 'NR==1 {print $1}' > /var/log/ulfs-packages/webkitgtk3/install.size echo "ULFS package installation completed." #Producing files list echo "Looking for installed files..." if [ -f /var/log/ulfs-packages/webkitgtk3/files.txt ]; then rm /var/log/ulfs-packages/webkitgtk3/files.txt fi USER=`whoami` if [ "$USER" == "root" ] ; then find /bin -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt find /sbin -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt find /usr -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt find /etc -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt find /opt -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt find /lib -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt find /lib64 -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt find /var -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time \! -path "/var/log/ulfs-packages/webkitgtk3/*" >> /var/log/ulfs-packages/webkitgtk3/files.txt else sudo find /bin -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt sudo find /sbin -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt sudo find /usr -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt sudo find /etc -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt sudo find /opt -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt sudo find /lib -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt sudo find /lib64 -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time >> /var/log/ulfs-packages/webkitgtk3/files.txt sudo find /var -type f -newer /var/log/ulfs-packages/webkitgtk3/configure.time \! -newer /var/log/ulfs-packages/webkitgtk3/finish.time \! -path "/var/log/ulfs-packages/webkitgtk3/*" >> /var/log/ulfs-packages/webkitgtk3/files.txt fi #Marking package as installed... mkdir -p /var/cache/ulfs-packages USER=`whoami` if [ "$USER" == "root" ] ; then touch /var/cache/ulfs-packages/webkitgtk3 else sudo touch /var/cache/ulfs-packages/webkitgtk3 fi #Calculate delta size a=`cat /var/log/ulfs-packages/webkitgtk3/unpack.size` b=`cat /var/log/ulfs-packages/webkitgtk3/install.size` c=$(($b-$a)) echo $c > /var/log/ulfs-packages/webkitgtk3/delta.size #Calculate prepare time a=`cat /var/log/ulfs-packages/webkitgtk3/start.time` b=`cat /var/log/ulfs-packages/webkitgtk3/configure.time` dp=$(($b-$a)) #Calculate download time a=`cat /var/log/ulfs-packages/webkitgtk3/download.time` b=`cat /var/log/ulfs-packages/webkitgtk3/unpack.time` dd=$(($b-$a)) #Calculate delta time a=`cat /var/log/ulfs-packages/webkitgtk3/configure.time` b=`cat /var/log/ulfs-packages/webkitgtk3/finish.time` db=$(($b-$a)) echo $db > /var/log/ulfs-packages/webkitgtk3/delta.time #Report echo "" echo "ULFS Package installation report" echo "================================" echo "Package: webkitgtk3" echo "Release: 0.2.2" echo "Build size: $c" echo "Prepare time: $dp sec." echo "Download time: $dd sec." echo "Build time: $db sec." #End of script