Update chromium part to properly download archive to linux or mac and chmod it

parent ef8deaff
[buildout] [buildout]
extends =
../dbus/buildout.cfg
../fontconfig/buildout.cfg
../glib/buildout.cfg
../gtk-2/buildout.cfg
../libpng/buildout.cfg
../xorg/buildout.cfg
parts = parts =
chromium chromium
...@@ -7,30 +14,34 @@ parts = ...@@ -7,30 +14,34 @@ parts =
recipe = slapos.recipe.build recipe = slapos.recipe.build
slapos_promise = slapos_promise =
file:chrome file:chrome
file:chrome-wrapper
file:chrome-slapos
#chromium zip files for linux seem to be corrupted : rights are not correctly #chromium zip files for linux seem to be corrupted : rights are not correctly
#set (+x) when unzipping using python, but it works when doing "unzip chromium.zip" #set (+x) when unzipping using python, but it works when doing "unzip chromium.zip"
#AND it works when unzipping any other archive with python. #AND it works when unzipping any other archive with python.
#Conclusion : Google, please, learn how to make zip files. #Conclusion : Google, please, learn how to make zip files.
x86 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/98589/chrome-linux.zip 8ba6c022849b2a882b6e65163c147eb9 linux_x86 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Linux/109696/chrome-linux.zip 8ba6c022849b2a882b6e65163c147eb9
x86-64 = http://build.chromium.org/f/chromium/snapshots/Linux_x64/100161/chrome-linux.zip 95b8f49090ff4390f517bfaa4a7f77c1 linux_x86-64 = http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/109696/chrome-linux.zip a3ed3feb285ecfe7c722576db80d5099
#mac-x86-64 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/100142/chrome-mac.zip cb3a76b8a1a93be94df2f500fb621131 mac_x86-64 = http://commondatastorage.googleapis.com/chromium-browser-continuous/Mac/100142/chrome-mac.zip cb3a76b8a1a93be94df2f500fb621131
script = script =
#If part directory already exist, will just throw an error. #If part directory already exist, will just throw an error.
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ') import sys
platform = '%%s_%%s' %% (guessOperatingSystem(), guessPlatform())
if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[platform].split(' ')
extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum'))) extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
workdir = guessworkdir(extract_dir) workdir = guessworkdir(extract_dir)
self.copyTree(workdir, "%(location)s") self.copyTree(workdir, "%(location)s")
wrapper = open(os.path.join("%(location)s", "chrome-slapos"), 'w') wrapper_location = os.path.join("%(location)s", "chrome-slapos")
wrapper = open(wrapper_location, 'w')
wrapper.write("""#!/bin/sh wrapper.write("""#!/bin/sh
export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng:location}/lib:%(location)s export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${gtk-2:location}/lib:${libpng:location}/lib:%(location)s
%(location)s/chrome""") %(location)s/chrome""")
wrapper.flush() wrapper.flush()
wrapper.close() wrapper.close()
os.chmod(wrapper, 0766) os.chmod(wrapper_location, 0766)
os.chmod(os.path.join("%(location)s", chrome), 0766) os.chmod(os.path.join("%(location)s", 'chrome'), 0766)
os.chmod(os.path.join("%(location)s", chrome-wrapper), 0766) os.chmod(os.path.join("%(location)s", 'chrome-wrapper'), 0766)
os.chmod(wrapper, 0766)
# requirements : libXrender1 libxss1 x11-common # requirements : libXrender1 libxss1 x11-common
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment