I have been having issues building 7.50.0. Interestingly, I get different errors when I try to build in a clean chroot than when building on my regular system. For the clean chroot build to work at all, I had to modify the custom function:
From cd68cdfeb007ce2d41ddf67fbf505833c086ef71 Mon Sep 17 00:00:00 2001
From: Joey Dumont <joey.dumont@gmail.com>
Date: Fri, 5 Mar 2021 22:20:51 -0500
Subject: [PATCH 1/1] Fix clean chroot build
---
PKGBUILD | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
index ce263b9..da471e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@ arch=('any')
url="https://devcenter.heroku.com/articles/heroku-cli"
license=('custom' 'ISC')
depends=('nodejs')
-makedepends=('npm' 'yarn' 'perl')
+makedepends=('npm' 'yarn' 'perl' 'git')
optdepends=('git: Deploying to Heroku')
conflicts=('heroku-cli-bin' 'heroku-client-standalone' 'heroku-toolbelt' 'ruby-heroku')
source=("https://github.com/heroku/cli/archive/v$pkgver.tar.gz")
@@ -20,7 +20,7 @@ sha512sums=('d5d80ba4439407b75efa7dffff031a4112336de4bab953141ee399e1861275d8b8b
options=('!strip')
provides=('heroku' 'heroku-cli')
-append_path() {
+_append_path() {
case ":$PATH:" in
*:"$1":*)
;;
@@ -33,9 +33,9 @@ prepare() {
# Set path to perl scriptdirs if they exist
# https://wiki.archlinux.org/index.php/Perl_Policy#Binaries_and_scripts
# Added /usr/bin/*_perl dirs for scripts
- [ -d /usr/bin/site_perl ] && append_path '/usr/bin/site_perl'
- [ -d /usr/bin/vendor_perl ] && append_path '/usr/bin/vendor_perl'
- [ -d /usr/bin/core_perl ] && append_path '/usr/bin/core_perl'
+ [ -d /usr/bin/site_perl ] && _append_path '/usr/bin/site_perl'
+ [ -d /usr/bin/vendor_perl ] && _append_path '/usr/bin/vendor_perl'
+ [ -d /usr/bin/core_perl ] && _append_path '/usr/bin/core_perl'
export PATH
--
2.30.1
A regular makepkg -Cfs
yields:
$ makepkg -Cfs
==> Making package: heroku-cli 7.50.0-1 (Fri 05 Mar 2021 10:28:30 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Found v7.50.0.tar.gz
==> Validating source files with sha256sums...
v7.50.0.tar.gz ... Passed
==> Validating source files with sha512sums...
v7.50.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
-> Extracting v7.50.0.tar.gz with bsdtar
==> Starting prepare()...
~/build/heroku-cli/src ~/build/heroku-cli/src
~/build/heroku-cli/src/cli-7.50.0 ~/build/heroku-cli/src ~/build/heroku-cli/src
yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning "workspace-aggregator-038f5b6b-fe5e-49e0-bad1-bb8c9a27a8fa > @heroku-cli/plugin-addons-v5 > @oclif/plugin-legacy > @oclif/command@1.8.0" has unmet peer dependency "@oclif/config@^1".
[5/5] Building fresh packages...
Done in 43.88s.
~/build/heroku-cli/src/cli-7.50.0/packages/cli ~/build/heroku-cli/src/cli-7.50.0 ~/build/heroku-cli/src ~/build/heroku-cli/src
npm WARN deprecated @types/write-json-file@3.2.1: This is a stub types definition. write-json-file provides its own type definitions, so you do not need this installed.
npm WARN deprecated strip-eof@2.0.0: Renamed to `strip-final-newline` to better represent its functionality.
npm ERR! semver.simplifyRange is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! /home/valandil/.npm/_logs/2021-03-06T03_29_39_399Z-debug.log
==> ERROR: A failure occurred in prepare().
Aborting...
Not sure if the error comes from semver. Maybe the version is too recent? (I'm kind of a n00b at npm packaging.)
However, when trying to build in a clean chroot:
==> Starting prepare()...
~/heroku-cli/src ~/heroku-cli/src
~/heroku-cli/src/cli-7.50.0 ~/heroku-cli/src ~/heroku-cli/src
yarn install v1.22.10
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning "workspace-aggregator-653c8e20-0ece-412a-9081-7b661e8d6fe4 > @heroku-cli/plugin-addons-v5 > @oclif/plugin-legacy > @oclif/command@1.8.0" has unmet peer dependency "@oclif/config@^1".
[5/5] Building fresh packages...
Done in 60.71s.
~/heroku-cli/src/cli-7.50.0/packages/cli ~/heroku-cli/src/cli-7.50.0 ~/heroku-cli/src ~/heroku-cli/src
npm WARN deprecated strip-eof@2.0.0: Renamed to `strip-final-newline` to better represent its functionality.
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated @types/write-json-file@3.2.1: This is a stub types definition. write-json-file provides its own type definitions, so you do not need this installed.
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)
added 859 packages, removed 3 packages, changed 4 packages, and audited 939 packages in 37s
38 packages are looking for funding
run `npm fund` for details
8 vulnerabilities (3 low, 2 moderate, 3 high)
To address all issues possible (including breaking changes), run:
npm audit fix --force
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
fatal: not a git repository (or any of the parent directories): .git
Error: Command failed: git rev-parse --short HEAD
null
Code: 128
==> ERROR: A failure occurred in prepare().
Aborting...
==> ERROR: Build failed, check /var/lib/archbuild/extra-x86_64/valandil/build
Any ideas on how to fix either of these issues? Am I the only one with these issues?
Pinned Comments
sampsoncrowley commented on 2019-12-06 05:22
Pull Requests welcome @ https://github.com/SampsonCrowley/arch_packages