Commit 6e184d73 authored by Jérome Perrin's avatar Jérome Perrin

component/ca-certificate: simplify pre-make-hook

parent 5c150d68
......@@ -16,7 +16,7 @@ url = https://deb.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_
md5sum = fc1c3ec0067385f0be8ac7f6e670a0f8
patch-binary = ${patch:location}/bin/patch
patches =
${:_profile_base_location_}/ca-certificates-any-python.patch#a5817d1b7162f8f814960f72c747e3af
${:_profile_base_location_}/ca-certificates-any-python.patch#56ecfeb8f23ae00726191a611d08894e
${:_profile_base_location_}/ca-certificates-mkdir-p.patch#02ed8a6d60c39c4b088657888af345ef
${:_profile_base_location_}/ca-certificates-no-cryptography.patch#14ad1308623b0d15420906ae3d9b4867
patch-options = -p0
......@@ -25,4 +25,4 @@ make-targets = install DESTDIR=@@LOCATION@@ CERTSDIR=certs SBINDIR=sbin
environment =
PATH=${xz-utils:location}/bin:%(PATH)s
pre-make-hook =
${:_profile_base_location_}/ca-certificates-pre-make-hook.py#9e2f6f22d91ea7a089f0ea2c523b0c1e:pre_make_hook
${:_profile_base_location_}/ca-certificates-pre-make-hook.py#89d64d612e143638b7b264be4b129798:pre_make_hook
......@@ -9,14 +9,3 @@
in_multiline = False
continue
if line.startswith('CKA_CLASS'):
--- mozilla/Makefile 2015-12-20 10:49:23.000000000 +0100
+++ mozilla/Makefile 2016-01-05 20:19:11.006874271 +0100
@@ -3,7 +3,7 @@
#
all:
- python3 certdata2pem.py
+ SLAPOS_BUILDOUT_PYTHON certdata2pem.py
clean:
-rm -f *.crt
import pathlib
import sys
# Because ca-certificate is used very early in the bootstrap process,
# even before python is built, we can not use the software release python
# yet, because it would loop forever in slapos.rebootstrap.
# By using sys.executable in a hook like this, we can use python without
# buildout recording a dependency to python in the part options.
def pre_make_hook(options, buildout, environ):
makefile = pathlib.Path('mozilla/Makefile')
txt = makefile.read_text().replace('SLAPOS_BUILDOUT_PYTHON', sys.executable)
makefile.write_text(txt)
with open('mozilla/Makefile') as f:
makefile = f.read()
makefile = makefile.replace('python3 certdata2pem.py', '%s certdata2pem.py' % sys.executable)
with open('mozilla/Makefile', 'w') as f:
f.write(makefile)
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