[Slackbuilds-users] suggestion: modify buildscript for chromium to build and bundle chromedriver too

James Bond evanton at tut.by
Sun Sep 29 05:44:03 UTC 2013


chromedriver is a standalone server that is needed to use chrome/chromium
browser for automated tests with selenium (seleniumhq.org) testing framework

cons: chromedriver isn't required for using chromium for regular web
browsing, having it in the chromium package will bloat the package a bit

pros:

- chromedriver is available as precompiled binaries from
http://code.google.com/p/chromedriver/downloads/list, yet there are misc
issues like it not working on systems with a different glibc version (this
is true for debian wheezy, not related to slackware, but provided for
context), or incompatibility with chromium due to version mismatches (the
latest chromedriver official linux binary doesn't work with chromium
package from SBo because that version of chromium is too old, yet an older
version official linux binary works). having a chromedriver binary compiled
from the same source (since its source code is part of chromium) and
bundled it in the slackware package will exclude all those problems

- there will be no need to recompile a lot of sources (chromium is heavier
than the average application) for building chromedriver as another package

- changes needed to be made to the SBo buildscript for chromium aren't big
(this worked for me in Slackware64-14.0)

---- snip ----
--- chromium.SlackBuild.old    2013-09-28 14:57:39.739962762 +0300
+++ chromium.SlackBuild    2013-09-28 21:15:47.397401614 +0300
@@ -112,7 +112,7 @@
  -Drelease_extra_cflags="$CFLAGS" \
  $DDSSE

-make chrome chrome_sandbox BUILDTYPE=Release V=1
+make chrome chrome_sandbox chromedriver BUILDTYPE=Release V=1

 # Creating the package
 cd out/Release/
@@ -120,6 +120,7 @@
   mkdir -p $PKG/usr/bin
   install -m 0755 -D chrome $PKG/usr/lib${LIBDIRSUFFIX}/chromium
   install -m 4555 -o root -g root -D chrome_sandbox
$PKG/usr/lib${LIBDIRSUFFIX}/chromium
+  install -m 0755 -D chromedriver $PKG/usr/lib${LIBDIRSUFFIX}/chromium
   install -m 0755 -D libffmpegsumo.so $PKG/usr/lib${LIBDIRSUFFIX}/chromium
   cp *.pak $PKG/usr/lib${LIBDIRSUFFIX}/chromium
   cp -a locales/ $PKG/usr/lib${LIBDIRSUFFIX}/chromium
@@ -146,6 +147,7 @@
 cd $PKG
   ln -s /usr/lib${LIBDIRSUFFIX}/chromium/chrome $PKG/usr/bin/chrome
   ln -s /usr/lib${LIBDIRSUFFIX}/chromium/chrome_sandbox
$PKG/usr/bin/chrome_sandbox
+  ln -s /usr/lib${LIBDIRSUFFIX}/chromium/chromedriver
$PKG/usr/bin/chromedriver

 cat $CWD/$PRGNAM.SlackBuild >
$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
---- snip ----

This is not a request of taking ownership over the chromium slackbuild (the
email address of the current maintainer seems to be invalid, so there are
chances the buildscript is abandoned). I am just providing feedback after
struggling for a few days with getting chromedriver to work painlessly in
Slackware, hoping it may be useful to others.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.slackbuilds.org/pipermail/slackbuilds-users/attachments/20130929/4daa5ed3/attachment.html>


More information about the SlackBuilds-users mailing list