Merge branch 'revert-custom-aria2c' into 'master'

Revert custom aria2c

See merge request fablab/labsync!21
This commit is contained in:
Simon Bruder 2018-05-19 13:02:10 +00:00
commit 8c85f9f2c3
3 changed files with 17 additions and 70 deletions

View file

@ -10,75 +10,25 @@ variables:
stages:
- prepare
- build
- torrent
services:
- docker:dind
before_script:
- docker info
- apk add --no-cache make openssh-client
dockerimage:
stage: prepare
before_script:
- docker info
- apk add --no-cache make openssh-client
script:
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker pull $DOCKER_IMAGE || true
- make dockerimg
- docker push $DOCKER_IMAGE
tags:
- fablab
aria2c:
stage: prepare
image: debian:stretch-slim
script:
- apt-get update
- apt-get -y install clang automake autoconf git make autopoint libtool pkg-config ccache wget jq
- aria2_tag="$(wget -q -O- https://api.github.com/repos/aria2/aria2/releases/latest|jq -r '.tag_name')"
- git clone -q -b "$aria2_tag" --depth 1 https://github.com/aria2/aria2 aria2
- export CCACHE_DIR=${PWD}/ccache
- cd aria2
- mkdir -p ccache
- export CCACHE_BASEDIR=${PWD}
- autoreconf -i
- automake
- autoconf
- export CXX="clang++ -Qunused-arguments -Wl,-s" CC="clang -Qunused-arguments -Wl,-s"
- >
./configure
--disable-ssl
--disable-metalink
--disable-websocket
--disable-epoll
--disable-largefile
--disable-nls
--disable-rpath
--without-libnettle
--without-libgmp
--without-libgcrypt
--without-openssl
--without-sqlite3
--without-libxml3
--without-libexpat
--without-libcares
--without-libz
--without-libssh2
ARIA2_STATIC=yes
- make CC="ccache $CC" CXX="ccache $CXX"
- mv src/aria2c ..
cache:
paths:
- ccache
artifacts:
paths:
- aria2c
expire_in: 2 weeks
tags:
- fablab
.squashfs_template: &squashfs_template
before_script:
- docker info
- apk add --no-cache make openssh-client
stage: build
script:
- make images/debian-stretch.squashfs

View file

@ -34,11 +34,6 @@
}
],
"provisioners": [
{
"type": "file",
"source": "aria2c",
"destination": "/usr/local/bin/aria2c"
},
{
"type": "shell",
"inline": [ "mkdir -p /etc/initramfs-tools/scripts/local-premount/" ]
@ -48,11 +43,6 @@
"source": "initramfs/labsync",
"destination": "/etc/initramfs-tools/scripts/"
},
{
"type": "file",
"source": "initramfs/labsync-prereqs",
"destination": "/etc/initramfs-tools/scripts/local-premount/"
},
{
"type": "shell",
"inline": [
@ -62,10 +52,18 @@
"echo \"LABSYNC_COMMIT_REF_NAME='{{user `ci_commit_ref_name`}}'\" >> /etc/environment",
"echo \"LABSYNC_COMMIT_REF_SLUG='{{user `ci_commit_ref_slug`}}'\" >> /etc/environment",
"echo \"LABSYNC_PROJECT_URL='{{user `ci_project_url`}}'\" >> /etc/environment",
"sed -i 's#@@PROJECT_URL@@#{{user `ci_project_url`}}#' /etc/initramfs-tools/scripts/labsync"
]
},
{
"type": "file",
"source": "initramfs/labsync-prereqs",
"destination": "/etc/initramfs-tools/scripts/local-premount/"
},
{
"type": "shell",
"inline": [
"set -x",
"sed -i 's#@@PROJECT_URL@@#{{user `ci_project_url`}}#' /etc/initramfs-tools/scripts/labsync",
"if ! [ -d /usr/local/bin/aria2c ]; then aria2c=/usr/local/bin/aria2c; else aria2c=/usr/bin/aria2c; fi",
"sed -i \"s#@@ARIA2C@@#$aria2c#\" /etc/initramfs-tools/scripts/local-premount/labsync-prereqs",
"apt-get update",
"apt-get -y dist-upgrade",
"rmdir /boot && ln -s /usr/local/boot /boot",
@ -101,7 +99,6 @@
"echo '/etc/resolv.conf' >> /tmp/ignore_files",
"echo '/etc/hostname' >> /tmp/ignore_files",
"echo '/etc/hosts' >> /tmp/ignore_files",
"echo '/usr/local/bin/aria2c' >> /tmp/ignore_files",
"mkdir -p /tmp/extra/tmp /tmp/extra/proc /tmp/extra/sys /tmp/extra/etc"
]
},

View file

@ -8,7 +8,7 @@ case $1 in
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/mke2fs
copy_exec /sbin/e2fsck
copy_exec @@ARIA2C@@
copy_exec /usr/bin/aria2c
copy_exec /sbin/sfdisk
copy_file cert /etc/ssl/certs/ca-certificates.crt
exit 0