Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id BBBD3780DB0 for <~alpine/aports@lists.alpinelinux.org>; Sat, 25 Dec 2021 05:53:53 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpwn.com; s=key1; t=1640411631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=iuwAGekP8RR1GZ0Wkc77nmdzGqFi4ewz1XLV90QA1+A=; b=JQ1PE+i1Zz4R3ZEY6S4dWDBLXOTPWODw8fEL8CPpdx17+5u+apxZPhhVD6SahDNgvpdf4z VvMVC+34E0PhPmsvJz60NJIks1f5SRat2zVqPz7FwdzUvO24bBTIL0j3Vd2iiozVhGv0h/ H5Xd//3hRVxl1Nqmj3jK7NLEP/MKtoLuJEJM9kThbrlCCuW0JTR36tJIAsL7wIDhHLkuyi p3RsDysxq4cJs3JKFJGV1hVSJNLPJgHKiw+K6WY8qUjY6EV7W+I+FWgxs+2BUZjWjwtOhm xuZGLWM9AZp9a6RUAhzCTPMfUp5XMadRSrcyr9F69x+bpwIBNEaCNf9dSupJkQ== From: Drew DeVault To: ~alpine/aports@lists.alpinelinux.org Cc: Drew DeVault Subject: [PATCH v2] community/prometheus: overhaul APKBUILD Date: Sat, 25 Dec 2021 06:53:45 +0100 Message-Id: <20211225055345.28846-1-sir@cmpwn.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: cmpwn.com Upstream made some changes to their build process which I hadn't had time to address. This updates the build process to be more similar to what they use upstream. --- community/prometheus/APKBUILD | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/community/prometheus/APKBUILD b/community/prometheus/APKBUILD index 07d14f7350..e240556dcf 100644 --- a/community/prometheus/APKBUILD +++ b/community/prometheus/APKBUILD @@ -4,12 +4,11 @@ pkgver=2.32.1 pkgrel=0 pkgdesc="The Prometheus monitoring system and time series database" url="https://github.com/prometheus/prometheus" -# mips64 and riscv64 blocked by nodejs -> yarn -arch="all !mips64 !riscv64" +arch="all !riscv64" # npm license="Apache-2.0" -options="!check" # Broken by integrations we don't care about install="prometheus.pre-install" -makedepends="go npm yarn bash" +makedepends="go npm bash" +options="!check" subpackages="$pkgname-openrc" source="$pkgname-$pkgver.tar.gz::https://github.com/prometheus/prometheus/archive/v$pkgver.tar.gz prometheus.initd @@ -21,33 +20,24 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/prometheus/prometheus/archiv # - CVE-2021-29622 prepare() { - # Disable linter: https://github.com/prometheus/prometheus/issues/10020 - sed -i web/ui/react-app/package.json -e 's/eslint --fix/true/g' + cd web/ui + npm install + sed -i node_modules/codemirror-promql/package.json -e 's/lezer-generator/npx lezer-generator/g' } build() { - cd "$builddir"/web/ui/react-app - yarn --frozen-lockfile - yarn lint - cd "$builddir"/web/ui - npm run build - npm run build:module - go generate -x -v - cd "$builddir" - gofmt -w ./web/ui - GOLDFLAGS="-X github.com/prometheus/common/version.Version=$pkgver - -X github.com/prometheus/common/version.Revision=AlpineLinux - -X github.com/prometheus/common/version.Branch=master - -X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME - -X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH}) + -X github.com/prometheus/common/version.Revision=AlpineLinux + -X github.com/prometheus/common/version.Branch=master + -X github.com/prometheus/common/version.BuildUser=$USER@$HOSTNAME + -X github.com/prometheus/common/version.BuildDate=$(date -u "+%Y%m%d-%H:%M:%S" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH}) " - if [ -n "$LDFLAGS" ]; then # LDFLAGS (and only LDFLAGS) should be passed to -extldflags. GOLDFLAGS="$GOLDFLAGS -extldflags $LDFLAGS" fi + make assets go mod vendor go build \ -trimpath \ @@ -63,7 +53,7 @@ build() { } check() { - go test ./... + make test } package() { -- 2.34.1