Skip to content

Commit

Permalink
Add arm64-glibc-217 recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
watson committed Jun 13, 2023
1 parent f848e8d commit 515d7b4
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 0 deletions.
32 changes: 32 additions & 0 deletions recipes/arm64-glibc-217/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM centos:7

ARG GID=1000
ARG UID=1000

RUN groupadd --gid $GID node \
&& adduser --gid $GID --uid $UID node

COPY cloudlinux.repo /etc/yum.repos.d/cloudlinux.repo

RUN yum install -y epel-release \
&& yum upgrade -y \
&& yum install -y \
git \
curl \
make \
python2 \
python3 \
ccache \
xz-utils \
devtoolset-9 \
glibc-devel

COPY --chown=node:node run.sh /home/node/run.sh

VOLUME /home/node/.ccache
VOLUME /out
VOLUME /home/node/node.tar.xz

USER node

ENTRYPOINT [ "/home/node/run.sh" ]
4 changes: 4 additions & 0 deletions recipes/arm64-glibc-217/cloudlinux.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[cloudlinux-sclo-devtoolset-9]
name=Cloudlinux devtoolset-9
baseurl=https://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/aarch64/
gpgcheck=0
37 changes: 37 additions & 0 deletions recipes/arm64-glibc-217/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env bash

set -e
set -x

release_urlbase="$1"
disttype="$2"
customtag="$3"
datestring="$4"
commit="$5"
fullversion="$6"
source_url="$7"
config_flags=""

cd /home/node

tar -xf node.tar.xz
cd "node-${fullversion}"

export CC="ccache gcc"
export CXX="ccache g++"
export MAJOR_VERSION=$(echo ${fullversion} | cut -d . -f 1 | tr --delete v)

. /opt/rh/devtoolset-9/enable

make -j$(getconf _NPROCESSORS_ONLN) binary V= \
DESTCPU="arm64" \
ARCH="arm64" \
VARIATION="glibc-217" \
DISTTYPE="$disttype" \
CUSTOMTAG="$customtag" \
DATESTRING="$datestring" \
COMMIT="$commit" \
RELEASE_URLBASE="$release_urlbase" \
CONFIG_FLAGS="$config_flags"

mv node-*.tar.?z /out/
10 changes: 10 additions & 0 deletions recipes/arm64-glibc-217/should-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -xe

__dirname=$1
fullversion=$2

. ${__dirname}/_decode_version.sh

decode "$fullversion"

test "$major" -ge "18"

0 comments on commit 515d7b4

Please sign in to comment.