summaryrefslogtreecommitdiffstats
path: root/3rdparty
AgeCommit message (Expand)Author
2013-08-26change email adress in copyright headersBernhard Posselt
2013-07-01remove purifier testsBernhard Posselt
2013-06-16Optimize images using optipng and scourkondou
2013-05-04use html purifier for sanitationBernhard Posselt
2013-04-17move simplepie to appframeworkBernhard Posselt
2013-03-21removed moved libsBernhard Posselt
2013-02-12added angular ui for ui-if to not include audio elements everywhere and throw...Bernhard Posselt
2013-01-27merged the angularjs branchBernhard Posselt
2012-10-30[News] SimplePie library updated to 1.3.1Alessandro Cosentino
2012-10-13removed change that caused errorsBernhard Posselt
2012-09-07Remove empty lines at end of fileBart Visscher
2012-08-17workaround for SimplePie bugAlessandro Cosentino
2012-08-12opml icon in opening page: you know, Sunday jobs :PAlessandro Cosentino
2012-07-17simplepie licenseAlessandro Cosentino
2012-07-17replace simplepie-dev with simplepie-stableAlessandro Cosentino
2012-04-30included 3rdparty library SimplePie for parsing feedsAlessandro Cosentino
ght .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/env bash

# SPDX-License-Identifier: GPL-3.0-or-later

# shellcheck source=./packaging/installer/functions.sh
. "$(dirname "$0")"/../installer/functions.sh || exit 1

BUILDARCH="${1}"

set -e

case ${BUILDARCH} in
  x86_64) platform=linux/amd64 ;;
  armv7l) platform=linux/arm/v7 ;;
  aarch64) platform=linux/arm64/v8 ;;
  ppc64le) platform=linux/ppc64le ;;
  *)
    echo "Unknown target architecture '${BUILDARCH}'."
    exit 1
    ;;
esac

DOCKER_CONTAINER_NAME="netdata-package-${BUILDARCH}-static-alpine315"

if [ "${BUILDARCH}" != "$(uname -m)" ] && [ "$(uname -m)" = 'x86_64' ] && [ -z "${SKIP_EMULATION}" ]; then
    docker run --rm --privileged multiarch/qemu-user-static --reset -p yes || exit 1
fi

if ! docker inspect "${DOCKER_CONTAINER_NAME}" > /dev/null 2>&1; then
  # To run interactively:
  #   docker run -it netdata-package-x86_64-static /bin/sh
  # (add -v host-dir:guest-dir:rw arguments to mount volumes)
  #
  # To remove images in order to re-create:
  #   docker rm -v $(sudo docker ps -a -q -f status=exited)
  #   docker rmi netdata-package-x86_64-static
  #
  # This command maps the current directory to
  #   /usr/src/netdata.git
  # inside the container and runs the script install-alpine-packages.sh
  # (also inside the container)
  #
  if docker inspect alpine:3.15 > /dev/null 2>&1; then
    run docker image remove alpine:3.15
    run docker pull --platform=${platform}  alpine:3.15
  fi

  run docker run --platform=${platform} -v "$(pwd)":/usr/src/netdata.git:rw alpine:3.15 \
    /bin/sh /usr/src/netdata.git/packaging/makeself/install-alpine-packages.sh

  # save the changes made permanently
  id=$(docker ps -l -q)
  run docker commit "${id}" "${DOCKER_CONTAINER_NAME}"
fi

# Run the build script inside the container
if [ -t 1 ]; then
  run docker run -e BUILDARCH="${BUILDARCH}" -a stdin -a stdout -a stderr -i -t -v "$(pwd)":/usr/src/netdata.git:rw \
    "${DOCKER_CONTAINER_NAME}" \
    /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
else
  run docker run -e BUILDARCH="${BUILDARCH}" -v "$(pwd)":/usr/src/netdata.git:rw \
    -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" "${DOCKER_CONTAINER_NAME}" \
    /bin/sh /usr/src/netdata.git/packaging/makeself/build.sh "${@}"
fi

if [ "${USER}" ]; then
  sudo chown -R "${USER}" .
fi