Commit ce23512d authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Changes in platform detection for buildout.

The multiarch strings (GNU target triplets) used currently for platform
detection are different in Suse, as they include the "vendor" ("suse" or
"pc" depending on the GCC version) and the OS part is just "linux"
instead of "linux-gnu".

This changes platform detection to use the constants available in
buildout for detecting the operating system and the `platform` module
for detecting the machine, instead of these multiarch strings.

See merge request nexedi/slapos!1648
parent 81985a28
......@@ -75,6 +75,6 @@ library =
${nss:location}/lib
${pcre2:location}/lib
[chromedriver-download:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[chromedriver-download:linux and platform.machine() == "x86_64"]
url = https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${:revision-x86_64}%2Fchromedriver_linux64.zip?generation=${:generation-x86_64}&alt=media
md5sum = ${:md5sum-x86_64}
......@@ -145,6 +145,6 @@ library =
path =
${fontconfig:location}/bin
[chromium-download:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[chromium-download:linux and platform.machine() == "x86_64"]
url = https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F${:revision-x86_64}%2Fchrome-linux.zip?generation=${:generation-x86_64}&alt=media
md5sum = ${:md5sum-x86_64}
......@@ -8,10 +8,10 @@ shared = true
version = 0.8.3
url = https://releases.hashicorp.com/consul/${:version}/consul_${:version}_${:_url}.zip
[consul:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
[consul:linux and platform.machine() == "i386"]
_url = linux_386
md5sum = dfdc0eedd79baab7e6bc56c1582fd02e
[consul:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[consul:linux and platform.machine() == "x86_64"]
_url = linux_amd64
md5sum = d6bc0898ea37ae2198370a9e1978d1bb
......@@ -159,11 +159,11 @@ install =
${:post-install}
post-install =
[firefox-download:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
[firefox-download:linux and platform.machine() == "i386"]
_url = linux-i686
md5sum = ${:i686-md5sum}
[firefox-download:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[firefox-download:linux and platform.machine() == "x86_64"]
_url = linux-x86_64
md5sum = ${:x86_64-md5sum}
......@@ -188,10 +188,10 @@ install =
extract_dir = self.extract(self.download(options['url'], options['md5sum']))
shutil.copy(os.path.join(extract_dir, 'geckodriver'), location)
[geckodriver-base:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
[geckodriver-base:linux and platform.machine() == "i386"]
_url = linux32
md5sum = ${:i686-md5sum}
[geckodriver-base:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[geckodriver-base:linux and platform.machine() == "x86_64"]
_url = linux64
md5sum = ${:x86_64-md5sum}
......@@ -38,14 +38,14 @@ install =
cpio = ${cpio:location}/bin/cpio
rpm2cpio = ${rpm2cpio:target}
[libreoffice-bin:getattr(sys,'_multiarch',None)!='x86_64-linux-gnu']
[libreoffice-bin:not (linux and platform.machine() == "x86_64")]
recipe = plone.recipe.command
command =
echo unsupported architecture
false
stop-on-error = true
[libreoffice-bin:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[libreoffice-bin:linux and platform.machine() == "x86_64"]
_url1 = x86_64
_url2 = Linux_x86-64
md5sum = efb0351ac9ebd954c43f77d59632bd28
......@@ -8,10 +8,10 @@ shared = true
version = 0.7.5
url = https://releases.hashicorp.com/packer/${:version}/packer_${:version}_${:_url}.zip
[packer:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
[packer:linux and platform.machine() == "i386"]
_url = linux_386
md5sum = a545108a0ccfde7c1e74de6c4e6fdded
[packer:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[packer:linux and platform.machine() == "x86_64"]
_url = linux_amd64
md5sum = f343d709b84db494e8d6ec38259aa4a6
......@@ -33,10 +33,10 @@ library =
path =
${fontconfig:location}/bin
[phantomjs:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
[phantomjs:linux and platform.machine() == "i386"]
_url = linux-i686
md5sum = 9c1426eef5b04679d65198b1bdd6ef88
[phantomjs:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[phantomjs:linux and platform.machine() == "x86_64"]
_url = linux-x86_64
md5sum = f278996c3edd0e8d8ec4893807f27d71
......@@ -42,10 +42,10 @@ library =
path =
${fontconfig:location}/bin
[wkhtmltopdf:getattr(sys,'_multiarch',None)=='i386-linux-gnu']
[wkhtmltopdf:linux and platform.machine() == "i386"]
_url = linux-generic-i386
md5sum = ce1a2c0b2cf786ccc5d5828c42c99ddd
[wkhtmltopdf:getattr(sys,'_multiarch',None)=='x86_64-linux-gnu']
[wkhtmltopdf:linux and platform.machine() == "x86_64"]
_url = linux-generic-amd64
md5sum = 96b7306cebb9e65355f69f7ab63df68b
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