ยง2023-08-15
[alexlai@n2Mnjaro-01 src]$ wget https://aur.archlinux.org/cgit/aur.git/snapshot/mongodb-tools.tar.gz && cd ..
$ tar xvf src/mongodb-tools.tar.gz && $ cd mongodb-tools/
$ cp -v PKGBUILD PKGBUILD.ori
'PKGBUILD' -> 'PKGBUILD.ori'
$ nano PKGBUILD
$ diff PKGBUILD.ori PKGBUILD
12c12
< arch=('x86_64')
---
> arch=('x86_64' 'aarch64')
$ sudo pacman -S go
$ makepkg -s
==> Making package: mongodb-tools 1:100.7.5-1 (Tue 15 Aug 2023 08:30:20 AM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Installing missing dependencies...
resolving dependencies...
looking for conflicting packages...
Packages (1) go-2:1.20.5-1
Total Download Size: 35.72 MiB
Total Installed Size: 193.17 MiB
:: Proceed with installation? [Y/n] y
:: Retrieving packages...
go-2:1.20.5-1-aarch64
- when build on n2Mnjaro.yushei.net, failed with
panic: ubuntu1804 platform name changed
goroutine 1 [running]:
github.com/mongodb/mongo-tools/release/platform.DetectLocal()
github.com/mongodb/mongo-tools/release/platform/platform.go:127 +0x408
github.com/mongodb/mongo-tools/buildscript.getPlatform()
github.com/mongodb/mongo-tools/buildscript/build.go:269 +0xe4
github.com/mongodb/mongo-tools/buildscript.buildToolBinary(0x4000170e80, {0xaaaae9552b15, 0x8}, {0xaaaae95513f7, 0x3})
github.com/mongodb/mongo-tools/buildscript/build.go:102 +0x54
github.com/mongodb/mongo-tools/buildscript.BuildTools(0xaaaae9816458?)
github.com/mongodb/mongo-tools/buildscript/build.go:65 +0xcc
github.com/craiggwilson/goke/task.Run(0x4000040728?, {0x4000126010?, 0x4000040768?, 0xaaaae931ad00?})
github.com/craiggwilson/goke@v0.0.0-20220110201909-adb8bfb05d58/task/run.go:68 +0x4e8
main.main()
./build.go:32 +0x5c
exit status 2
==> ERROR: A failure occurred in build().
Aborting...