PKGBUILD Runs on Arch Linux, But Fails on AlarmPi

Ask questions about Arch Linux ARM. Please search before making a new topic.

PKGBUILD Runs on Arch Linux, But Fails on AlarmPi

Postby abcd567 » Sat Nov 17, 2018 6:38 am

I am a new user of Arch Linux and Alarm PI (only 2 weeks since first installed both)

I wanted to build and install Flightaware's dump1090-fa using source code available at Github
http://github.com/flightaware/dump1090

To do this, I wrote PKGBUILD and foo.install

When I tried it on Arch Linux x86_64, it built & installed dump1090-fa,
but when I tried it on AlarmPi, it failed.
What should I do?


NOTE: I have installed AlarmPi exactly as instructed on this page:
https://archlinuxarm.org/platforms/armv ... berry-pi-2

$this->bbcode_second_pass_code('', '
[alarm@alarmpi dump1090-fa-arch]$ makepkg -si
==> ERROR: Cannot find the strip binary required for object file stripping.
')



MY FILE PKGBUILD:
$this->bbcode_second_pass_code('', '
#Creater: abcd567
#Maintener: abcd567

pkgname=dump1090-fa
pkgver=latest
pkgrel=1
arch=('x86_64' 'armh6' 'armh7' 'armv6h' 'armv7h')
license=('GPL')

depends=('rtl-sdr' 'lighttpd' 'bladerf')
makedepends=(git)

conflicts=('dump1090'
'dump1090-mutability'
'dump1090-mutability-git'
'dump1090-fa-git'
'dump1090-git'
'dump1090_mr-git')

source=('dump1090::git+git://github.com/flightaware/dump1090')
md5sums=('SKIP')

install="foo.install"

build() {
cd ${srcdir}/dump1090
make
}

package() {

mkdir -p ${pkgdir}/usr/bin
cp ${srcdir}/dump1090/dump1090 ${pkgdir}/usr/bin/dump1090-fa

mkdir -p ${pkgdir}/usr/share/dump1090-fa/html
cp -r ${srcdir}/dump1090/public_html/* ${pkgdir}/usr/share/dump1090-fa/html/

mkdir -p ${pkgdir}/etc/default
cp ${srcdir}/dump1090/debian/dump1090-fa.default ${pkgdir}/etc/default/dump1090-fa

mkdir -p ${pkgdir}/usr/lib/systemd/system
cp ${srcdir}/dump1090/debian/dump1090-fa.service ${pkgdir}/usr/lib/systemd/system/dump1090-fa.service

cp -r ${srcdir}/dump1090/debian/lighttpd ${pkgdir}/lighttpd

}

')


MY FILE foo.install:

$this->bbcode_second_pass_code('', '
post_install () {
## ENABLE DUMP1090-FA SERVICE
systemctl enable dump1090-fa.service
useradd --system dump1090

## DUMP1090-FA INTEGRATION TO LIGHTTPD
mkdir -p /etc/lighttpd/conf.d
cp -r ${pkgdir}/lighttpd/* /etc/lighttpd/conf.d/
chmod 777 /etc/lighttpd/lighttpd.conf
echo "" >> /etc/lighttpd/lighttpd.conf
echo "server.modules += ( \"mod_alias\" )" >> /etc/lighttpd/lighttpd.conf
echo "include \"/etc/lighttpd/conf.d/*\"" >> /etc/lighttpd/lighttpd.conf
chmod 644 /etc/lighttpd/lighttpd.conf

systemctl enable lighttpd.service

## RESTART LIGHTTPD & DUMP1090-FA
systemctl restart lighttpd
systemctl restart dump1090-fa
echo ""
echo ""
echo "============================================"
echo " T H I N G - TO - DO "
echo "============================================"
echo ""
echo "IMPORTANT: REBOOT COMPUTER/RPi"
echo ""
echo "OTHERWISE DUMP1090-FA WILL FAIL TO START"
echo "AND A ROTATING WHEEL WILL APPEAR ON THE MAP, OR MAP WILL NOT SHOW"
echo ""
echo "To make SkyView Map show range rings, do following"
echo "(1) Open file for editing"
echo "sudo nano /etc/default/dump1090-fa "
echo ""
echo "(2) Go to following line"
echo "RECEIVER_OPTIONS=\"--device-index 0 --gain -10 --ppm 0 --net-bo-port 30005\""
echo "In above line, add your latitude and longitude, so the line becomes like below:"
echo "RECEIVER_OPTIONS=\"--device-index 0 --gain -10 --lat xx.xxxx --lon yy.yyyy --ppm 0 --net-bo-port 30005\""
echo "NOTE: Repalce xx.xxxx and yy.yyyy by your actual latitude and Longitude"
echo ""
echo "(3) Restart dump1090-fa "
echo "sudo systemctl restart dump1090-fa "
echo "(4) Clear browser cache and reload browser"
echo ""
echo ""

}

')
abcd567
 
Posts: 3
Joined: Fri Nov 16, 2018 11:22 pm

Re: PKGBUILD Runs on Arch Linux, But Fails on AlarmPi

Postby graysky » Sat Nov 17, 2018 3:25 pm

$this->bbcode_second_pass_quote('abcd567', '
')$this->bbcode_second_pass_code('', '
[alarm@alarmpi dump1090-fa-arch]$ makepkg -si
==> ERROR: Cannot find the strip binary required for object file stripping.
')


.... makepkg already answered your question.

https://wiki.archlinux.org/index.php/Makepkg#Usage
graysky
Developer
 
Posts: 1731
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: PKGBUILD Runs on Arch Linux, But Fails on AlarmPi

Postby abcd567 » Sun Nov 18, 2018 11:06 am

$this->bbcode_second_pass_quote('', '.')... makepkg already answered your question.

https://wiki.archlinux.org/index.php/Makepkg#Usage
My AUR packages • My zsh configs • Streamzap remote config

graysky


Hi graysky
Thanks for replying

Followed advise on the page you have linked, and installed base-devel by following command

$this->bbcode_second_pass_code('', '
[alarm@alarmpi ~]$ sudo pacman -Sy base-devel --needed
')

Rebooted RPi
Now I cannot access it anymore, it fails to SSH :(
What have I done wrong?

NOTE:
After first time this occurred, I formatted microSD card and re-installed AlarmPi.
Then again installed base-devel and again RPi failed to SSH after reboot. :(



NOTE: I have installed all by pressing Enter key when prompted Enter a selection (default=all):
$this->bbcode_second_pass_code('', '
:: There are 26 members in group base-devel:
:: Repository core
1) autoconf 2) automake 3) binutils 4) bison 5) fakeroot 6) file
7) findutils 8) flex 9) gawk 10) gcc 11) gettext 12) grep 13) groff
14) gzip 15) libtool 16) m4 17) make 18) pacman 19) patch 20) pkgconf
21) sed 22) sudo 23) systemd 24) texinfo 25) util-linux 26) which

Enter a selection (default=all):
')
abcd567
 
Posts: 3
Joined: Fri Nov 16, 2018 11:22 pm


Return to User Questions

Who is online

Users browsing this forum: No registered users and 17 guests