You are not logged in.

#1 2018-11-14 22:13:05

abcd567
Member
Registered: 2018-11-11
Posts: 9

Request for review & comment on PKGBUILD for dump1090-fa

I have started using Arch linux only two weeks ago, and installed it on my x64 intel Desktop and Raspberry Pi Model2 alarmpi).

I needed to build dump1090-fa package from source code of Flightaware on GitHub. This is my first attempt to make a package, and I did succeed in building packiage and installing a working dump1090-fa on both x64 desktop and RPi arm.

Although my code has successfully done the job, I want it to be reviewed by senior and experienced members, and give suggestions to improve it. Thanks in advance.

File 1 of 3 - PKGBUILD

#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') 
conflicts=('dump1090' 'dump1090-mutability' 'dump1090-mutability-git' 'dump1090-fa-git' 'dump1090-git' 'dump1090_mr-git') 

function checkPkg { 
  echo "" 
  echo "CHECKING TOOLS NEEDED TO BUILD THE PACKAGE ....." 
echo "" 
  if [[ ! `pacman -Qqe $1` ]] 
    then 
       echo ".... Installing" $1; 
       yes | sudo pacman -Sy $1; 

  else 
     echo $1 "is already installed ......."; 
  fi 
} 

checkPkg git 
checkPkg make 
checkPkg pkgconf 
checkPkg binutils 
checkPkg gcc 
checkPkg fakeroot 

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 }

File 2 of 3 - foo.install

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 "" 
}

File 3 of 3 - README

#dump1090-fa-arch dump1090-fa (AUR) for Arch Linux 

Enter cloned directory. It contains following three files
 - PKGBUILD
 - foo.install
 - README.md 

Give command `makepkg -si `
Above command will run the PKGBUILD script which will: 
1. Check for conflicts with existing other versions of dump1090 
2. Check Build tools (git, make, gcc, pkgconf, binutils, and fakeroot) and will install any missing tools 
3. Install dependencies rtl-sdr, lighttpd, and bladerf 
4. Will build package `dump1090-fa-latest-*-*.pkg.tar.xz` 
5. Offer to install the above package[yes/no] 

The above package can be install later also by following command: 

cd dump1090-fa-arch sudo pacman -U dump1090-fa-latest-*-*.pkg.tar.xz 

### IMPORTANT: AFTER INSTALLATION, REBOOT COMPUTER / RPI. 

**To check status:** 
sudo systemctl status dump1090-fa 

**To restart:** 
sudo systemctl restart dump1090-fa 

############################################################ ##
 T H I N G S - TO - DO (AFTER INSTALLATION IS COMPLETED) 
############################################################ 

IMPORTANT: REBOOT COMPUTER/RPi 
OTHERWISE DUMP1090-FA WILL FAIL TO START 
AND A ROTATING WHEEL WILL APPEARS ON THE MAP, OR MAP WILL NOT SHOW 


To make SkyView Map show range rings, do following: 

1. Open file "dump1090-fa" for editing sudo nano /etc/default/dump1090-fa 

2. In the opened file, go to following line: RECEIVER_OPTIONS="--device-index 0 --gain -10 --ppm 0 --net-bo-port 30005" In above line, add your latitude and longitude, so the line becomes like below: RECEIVER_OPTIONS="--device-index 0 --gain -10 --lat xx.xxxx --lon yy.yyyy --ppm 0 --net-bo-port 30005" NOTE: Repalce xx.xxxx and yy.yyyy by your actual latitude and Longitude 

3. Restart dump1090-fa `sudo systemctl restart dump1090-fa ` 

4. Clear browser cache and reload browser

Last edited by abcd567 (2018-11-14 22:20:50)

Offline

#2 2018-11-14 22:33:08

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,535

Re: Request for review & comment on PKGBUILD for dump1090-fa

That checkPkg function will at best get your package deleted with extreme prejudice, and at worst, your account banned.

Also from a cursory reading, every aspect of your install script is wrong.

Also there's no such thing as READMEs for the AUR.

Also there's a -git package in the AUR already which does a decent job as far as I can tell, and your PKGBUILD is running from git master, which means it is a duplicate of the existing one.

Last edited by eschwartz (2018-11-14 22:37:54)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2018-11-14 22:35:27

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,996

Re: Request for review & comment on PKGBUILD for dump1090-fa

Welcome back abcd567 smile

I was hoping you'd post this to get some feedback, please don't take any of the following posts too harshly.

That isn't a valid pkgver. As you're pulling from git master you need to read VCS package guidelines and write an approprite pkgver function.

Get rid of the whole checkPkg function. This is already automatically handled by makepkg using it's -s flag.

Packaging - does this softwares makefile support a make install target? If so then all of your current package() function can be replaced with a couple of lines.

The .install file - Get rid of it altogether. Seriously. Nearly everything that it does goes against Arch packaging standards. You should never enable services or edit files belonging to another package.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2018-11-14 22:45:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,437
Website

Re: Request for review & comment on PKGBUILD for dump1090-fa

To elaborate on the elimination of the checkPkg function, those packages should likely just be listed in the 'makedepends' array.  See the wiki:
https://wiki.archlinux.org/index.php/PKGBUILD

But also note that there is no need to list any of those packages that are already in the base-devel group (which is all of them except for git, so just add `makedepends=(git)`).

On a tangential note, never ever use `pacman -Sy $packagename`.  The attempt to automate the use of such a command on other people's systems is likely a major contributor to the above-mentioned ban-worthiness.  It's certainly unintentional on your part, but you should take time to learn why that would be such an offense.

Please see example or existing PKGBUILDs in the AUR to see how things are done.  Most of what you have done is well meaning, but quite inappropriate.

Last edited by Trilby (2018-11-14 22:47:16)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2018-11-14 22:57:57

abcd567
Member
Registered: 2018-11-11
Posts: 9

Re: Request for review & comment on PKGBUILD for dump1090-fa

Thanks eschwartz, Slithery, and Trilby for your valuable comments and suggestions. Any way I have not yet posted it in AUR repository, and I do not intend to post it there.

I have posted it here to get feedback and suggestions.

Last edited by abcd567 (2018-11-14 23:02:08)

Offline

#6 2018-11-14 23:17:48

abcd567
Member
Registered: 2018-11-11
Posts: 9

Re: Request for review & comment on PKGBUILD for dump1090-fa

One more point:
In the Arch linux x64_86 on my Desktop, I have base-devel, but in alarmpi on Raspberry Pi, there is no base-devel. It is basically for AlarmPi that I had to add function  "checkPackage".

I will now try replacing "checkPackage" by "makedepends"

Last edited by abcd567 (2018-11-14 23:19:59)

Offline

#7 2018-11-14 23:40:20

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,535

Re: Request for review & comment on PKGBUILD for dump1090-fa

abcd567 wrote:

but in alarmpi on Raspberry Pi, there is no base-devel. It is basically for AlarmPi that I had to add function  "checkPackage".

You are incorrect. archlinuxarm uses the same PKGBUILDs we do, and only changes things when it is needed to compile -- and then, they track our package to reduce deviations. The package group definitively exists. Their forum has lots of discussion about building packages, and lots of mentioning base-devel.

I will now try replacing "checkPackage" by "makedepends"

It is wrong to have base-devel packages in makedepends.
There are recent cases (the pkg-config to pkgconf migration) where this has resulted in packages that were impossible to build. (pkgconf provides pkg-config, but it doesn't provide a *versioned* pkg-config, and there were silly packages that not only makedepends on pkg-config, but on a *versioned* makedepends of it!)
Similarly, gcc-multilib is often used by packages that are lib32, but this is wrong and users should install multilib-devel... because it is now a "provides" for the core/gcc package which does *not* allow you to build 32-bit ABI code, but its optional dependency "lib32-gcc-libs" does.

People should *not* try to outsmart the base-devel system.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2018-11-14 23:48:07

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,996

Re: Request for review & comment on PKGBUILD for dump1090-fa

abcd567 wrote:

In the Arch linux x64_86 on my Desktop, I have base-devel, but in alarmpi on Raspberry Pi, there is no base-devel. It is basically for AlarmPi that I had to add function  "checkPackage".

Unfortunately we can't help you with that here. These forums are for Arch Linux support only - Arch Linux ARM is a different project run by different people.

Their forums have some just as knowledgeable folk as us (sometimes even the same people) that can help you with that issue


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#9 2018-11-15 19:28:40

abcd567
Member
Registered: 2018-11-11
Posts: 9

Re: Request for review & comment on PKGBUILD for dump1090-fa

Done Today:
(1) Formatted Hard Drive and did a fresh install of Arch Linux with base and base-devel.
(2) From my PKGBUILD file:
   (a) Removed function checkPkg and all  checkPkg $pkg.
   (b) Added makedepends=(git)
(3) Ran command makepkg -si.
   (a) It installed following packages (with their dependencies):
       lighttpd  rtl-sdr bladerf git
   (b) Made x86_64.pkg.tar.xz package
   (c) Installed dump1090-fa

NEXT TO DO
(a) Format microSD card and fresh install of Alarm Pi
(b) Test modified PKGBUILD on RPi


MODIFIED PKGBUILD

#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

}

File foo.install (not modified, same as before)

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 "" 

}

Offline

#10 2018-11-15 19:50:59

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,996

Re: Request for review & comment on PKGBUILD for dump1090-fa

That's a good start smile

But please take a look at the following as well...

Slithery wrote:

That isn't a valid pkgver. As you're pulling from git master you need to read the VCS package guidelines and write an appropriate pkgver function.

The .install file - Get rid of it altogether. Seriously. Nearly everything that it does goes against Arch packaging standards. You should never enable services or edit files belonging to another package.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#11 2018-11-16 18:39:45

abcd567
Member
Registered: 2018-11-11
Posts: 9

Re: Request for review & comment on PKGBUILD for dump1090-fa

Slithery wrote:

That's a good start smile

But please take a look at the following as well...

Slithery wrote:

That isn't a valid pkgver. As you're pulling from git master you need to read the VCS package guidelines and write an appropriate pkgver function.

The .install file - Get rid of it altogether. Seriously. Nearly everything that it does goes against Arch packaging standards. You should never enable services or edit files belonging to another package.

Thanks Slithery for guidance.
I will try to incorporate your advise this weekend.

About foo.install file:
(1) I can remove systemctl enable lighttpd, as it is already enabled and this step is not needed.

(2) I can also remove systemctrl enable dump1090-fa and let it to be manually enabled by the user. In my opinion, if someone installs a custom package, he does this with an intention to use it, and will sure enable it if it is not automatically enabled. So why not to include enabling with installation? or are there user who will install a custom package, but wont enable and wont use it?

(3) The dump1090-fa map display in a browser depends on its integration to lighttpd. The Map display fails if this integration is not done.
     To do this integration, following is required to be done:
     (a) Create a directory /etc/lighttpd/conf.d and copy dump1090-fa config files from source to this folder.
     (b) Add following two lines to lighttpd.config
         server.modules += ( "mod_alias" )
         include "/etc/lighttpd/conf.d/*"

I tried to do (a) and (b) inside package() {  }, but did not succeed, and had do it in foo.install.

I will comeback and report after i attempt to incorporate your advises.

Regards

Last edited by abcd567 (2018-11-16 18:41:57)

Offline

#12 2018-11-16 19:00:45

abcd567
Member
Registered: 2018-11-11
Posts: 9

Re: Request for review & comment on PKGBUILD for dump1090-fa

AlarmPI Update

Formatted microSD card, created new partitions, and installed AlarmPi,slipped microSd card in Raspberry Pi and powered-up.

Tried modified PKGBUILD (one without checkPackage funtion) on AlarmPi.

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

This problem is caused by the fact that AlarmPi does not have binutils.
Looks like AlarmPi has only base, and NOT base-devel

Edited file PKGBUILD and added binutils to makedepends

sudo nano PKGBUILD
#added 'binutils' to 'makedepends'
makedepends=('git' 'binutils')

Re-run makepkg -si

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

So including 'binutils' in makedepends did not help.
How can I make PKGBUILD to install binutils right at start? Any suggestions?

Thanks in advance.

Regards

Last edited by abcd567 (2018-11-16 19:03:56)

Offline

#13 2018-11-16 19:15:03

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 8,404
Website

Re: Request for review & comment on PKGBUILD for dump1090-fa

As has been pointed out to you, you are incorrect in your assertation that there is no base-devel group in Arch Linux ARM. You are also incorrect in stating that it doesn't have binutils. Installing base-devel would fix all your issues, but in order to understand why you are unable to do so is not an Arch Linux question, and as such you should ask about your issue on the Arch Linux ARM support channels, as you have already been directed to.

Closing.

EDIT: It has been pointed out that you are making an effort and improving your PKGBUILD implementing the community's advice, so I will re-open this thread for the time being. However, any further attempts to solicit support for your Arch Linux ARM build problems will result in the closure being reapplied.

Last edited by WorMzy (2018-11-16 19:36:51)


Sakura:-
Mobo: MSI X299 TOMAHAWK ARCTIC // Processor: Intel Core i7-7820X 3.6GHz // GFX: nVidia GeForce GTX 970 // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 5x 1TB HDD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#14 2018-11-16 19:50:59

Slithery
Forum Moderator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 2,996

Re: Request for review & comment on PKGBUILD for dump1090-fa

abcd567 wrote:

About foo.install file:
(2) I can also remove systemctrl enable dump1090-fa and let it to be manually enabled by the user. In my opinion, if someone installs a custom package, he does this with an intention to use it, and will sure enable it if it is not automatically enabled. So why not to include enabling with installation? or are there user who will install a custom package, but wont enable and wont use it?

All Arch users have services that aren't enabled, have you enabled all of the service files for all of the packages installed on your system? I very much doubt it but if you don't believe me then try...

systemctl list-unit-files --type=service --state=disabled

and post the output. If you want the service files to be automatically enabled for every package that you install then Arch is the wrong distro, you should be using Ubuntu instead.

(3) The dump1090-fa map display in a browser depends on its integration to lighttpd. The Map display fails if this integration is not done.

I very much doubt that the entire package depends on lighttpd, more likely if you want to use the map functionality then you need to have any web server properly configured.  I use nginx for all of my web-servers, why should you force me to install and configure lighttpd if it's unneeded on my system?

To do this integration, following is required to be done:
     (a) Create a directory /etc/lighttpd/conf.d and copy dump1090-fa config files from source to this folder.

If you wish to install a config drop-in for lighttpd then that's fine, but it should be done as part of the package() function instead of an install script.

(b) Add following two lines to lighttpd.config
         server.modules += ( "mod_alias" )
         include "/etc/lighttpd/conf.d/*"

You should never ever alter files owned by another package.

Seriously, get rid of your install script.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#15 2018-11-16 20:42:55

loqs
Member
Registered: 2014-03-06
Posts: 6,375

Re: Request for review & comment on PKGBUILD for dump1090-fa

There is dump1090-fa.service which uses the dump1090 user.  dump1090-fa.service does contain any dependency on lighttpd.service and the reverse is also true.
If the two service files are correct the services can operate independently.
Edit:
Minor point in the package function you could swap the mkdir and cp calls to install.

Last edited by loqs (2018-11-16 21:16:40)

Offline

#16 2018-11-16 21:57:55

abcd567
Member
Registered: 2018-11-11
Posts: 9

Re: Request for review & comment on PKGBUILD for dump1090-fa

Thanks everybody for your participation and comments/advises.

I will attempt to modify my code according to your comments/advises during weekend.

Regards

Offline

#17 2018-11-18 20:09:45

abcd567
Member
Registered: 2018-11-11
Posts: 9

Re: Request for review & comment on PKGBUILD for dump1090-fa

Thanks everyone for your participation, comments and advises.
Unfortunately this weekend I did not find time to modify the code according to your advises/comments. I will do it when I get time, possibly next weekend.

Slithery wrote:

All Arch users have services that aren't enabled

Agreed. I will remove "systemctl enable dump1090-fa" and "systemctl enable lighttpd" from foo.install, and leave this to be done by user manually.


Slithery wrote:

I very much doubt that the entire package depends on lighttpd, more likely if you want to use the map functionality then you need to have any web server properly configured.  I use nginx for all of my web-servers, why should you force me to install and configure lighttpd if it's unneeded on my system?

You are right. The dump1090-fa package does NOT depend on lighttpd or any other webserver. It performs (1) receiver, (2) decoder, and (3) map generator function independently.
Only when it's generated map is required to be served in a browser, it depends on a web server like lighttpd.

The installation of lighttpd has been chosen by the author of the dump1090-fa source code as a "dependency", and he has included in source code, the files to be added to lighttpd config by adding following line:
include "/path/to/dump1090-fa configuration files"


loqs wrote:

There is dump1090-fa.service which uses the dump1090 user.  dump1090-fa.service does contain any dependency on lighttpd.service and the reverse is also true.
If the two service files are correct the services can operate independently.

This is right. The two services run independently of each other, except when it comes to serving dump1090-fa's map to a browser.
The dump1090-fa has 3 functions:
(1) 1090 Mhz Receiver Software SDR (Software Defined Radio)
(2) Decoder of ADS-B RF Signals received from airplanes.
(3) Map Generator (plotting airplanes on Openstreet map)

All these functions are independent of lighttpd or any web server, but to display the generated map in a browser, it requires lighttpd. This is where webserver's config is to be modified for dump1090-fa.


loqs wrote:

Minor point in the package function you could swap the mkdir and cp calls to install.

Good point. Will do it. This will bring the code in line with standard practice.

Thank you all,
Regards

Offline

Board footer

Powered by FluxBB