Build lxc pacakges to /srv/build/lxc
This commit is contained in:
parent
204318ef44
commit
7df7428acf
@ -7,15 +7,16 @@ cd $(realpath $(dirname "${0}"))
|
|||||||
apk update
|
apk update
|
||||||
apk add alpine-sdk
|
apk add alpine-sdk
|
||||||
|
|
||||||
# Copy build toolchain
|
# Prepare build toolchain
|
||||||
adduser root abuild
|
adduser root abuild
|
||||||
cp etc/abuild.conf /etc/abuild.conf
|
cp etc/abuild.conf /etc/abuild.conf
|
||||||
cp usr/bin/abuild /usr/bin/abuild
|
cp usr/bin/abuild /usr/bin/abuild
|
||||||
cp usr/bin/fix-apk /usr/bin/fix-apk
|
cp usr/bin/fix-apk /usr/bin/fix-apk
|
||||||
cp usr/bin/lxc-build /usr/bin/lxc-build
|
cp usr/bin/lxc-build /usr/bin/lxc-build
|
||||||
cp usr/bin/lxc-pack /usr/bin/lxc-pack
|
cp usr/bin/lxc-pack /usr/bin/lxc-pack
|
||||||
mkdir /srv/build
|
mkdir -p /srv/build/lxc
|
||||||
# Supply /srv/build/repokey.rsa
|
# Supply /srv/build/repokey.rsa
|
||||||
|
# Supply /srv/build/packages.key
|
||||||
|
|
||||||
# Build native apps
|
# Build native apps
|
||||||
cd ../app-acme-sh
|
cd ../app-acme-sh
|
||||||
|
@ -11,7 +11,8 @@ from cryptography.hazmat.primitives import hashes
|
|||||||
from cryptography.hazmat.primitives.asymmetric import ec
|
from cryptography.hazmat.primitives.asymmetric import ec
|
||||||
from cryptography.hazmat.primitives.serialization import load_pem_private_key
|
from cryptography.hazmat.primitives.serialization import load_pem_private_key
|
||||||
|
|
||||||
BUILD_ROOT = '/root/buildroot'
|
BUILD_ROOT = '/srv/build/lxc'
|
||||||
|
PRIVATE_KEY = '/srv/build/packages.key'
|
||||||
LXC_ROOT = '/var/lib/lxc'
|
LXC_ROOT = '/var/lib/lxc'
|
||||||
|
|
||||||
def pack(pkg_file):
|
def pack(pkg_file):
|
||||||
@ -61,7 +62,7 @@ def pack(pkg_file):
|
|||||||
|
|
||||||
# Sign packages
|
# Sign packages
|
||||||
print('Signing packages')
|
print('Signing packages')
|
||||||
with open(os.path.join(BUILD_ROOT, 'packages.key'), 'rb') as f:
|
with open(PRIVATE_KEY, 'rb') as f:
|
||||||
priv_key = load_pem_private_key(f.read(), None, default_backend())
|
priv_key = load_pem_private_key(f.read(), None, default_backend())
|
||||||
with open(os.path.join(BUILD_ROOT, 'packages'), 'rb') as f:
|
with open(os.path.join(BUILD_ROOT, 'packages'), 'rb') as f:
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user