summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJimmy Xu2019-11-22 17:17:41 +0000
committerJimmy Xu2019-11-22 17:17:41 +0000
commit59d387658e12a55fd56febf67adc7f03bbf3d060 (patch)
tree8234f546a5311981fbd61d733df8bf832d85539f
parent592f6862d18f236113c57f5d73e0aed25889a156 (diff)
downloadaur-59d387658e12a55fd56febf67adc7f03bbf3d060.tar.gz
flightradar24: Get rid of the `hostname: invalid option' warning
-rw-r--r--.SRCINFO6
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD14
-rw-r--r--fr24feed.service1
-rw-r--r--hostname17
5 files changed, 36 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 01bb221d7a3..5378a7f6808 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = flightradar24
pkgdesc = Feeder software for Flightradar24.com (fr24feed)
pkgver = 1.0.24
- pkgrel = 7
+ pkgrel = 8
url = https://www.flightradar24.com/share-your-data
install = flightradar24.install
arch = x86_64
@@ -14,9 +14,11 @@ pkgbase = flightradar24
source = fr24feed.service
source = flightradar24.tmpfiles
source = flightradar24.sysusers
- sha256sums = 7c0d1a5508917851789477b035cd91eafb84f8706c3214babea7125f8a82a0d2
+ source = hostname
+ sha256sums = 5cdf6942b28d59bb06ceebce2eb2062f77723b2127065070278b52a2e1f8db68
sha256sums = 32f6f289efe8e3e303767239b2a276405b2d7c0fcbbde8ed9473ee6889b676ff
sha256sums = 7e5e1a28769559a2e2e1312894a1f9d315c4812bb34e2f1c45b2f877e4f4eeb0
+ sha256sums = 32ae61984ae0123690fea0bf67f2b5f1ee1155f6a2b3a9d0ff7c5431d902ddee
source_x86_64 = https://repo-feed.flightradar24.com/linux_x86_64_binaries/fr24feed_1.0.24-5_amd64.tgz
sha256sums_x86_64 = cc88150f753e734327bf35574f6de5b11d8f989ddb1186514a4ce02e6e61600b
source_i686 = https://repo-feed.flightradar24.com/linux_x86_binaries/fr24feed_1.0.24-5_i386.tgz
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..c2773e28e62
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg
+/src
+*.pkg.*
+*.tgz
diff --git a/PKGBUILD b/PKGBUILD
index 81ec1b18beb..ab23c83595c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
pkgname=flightradar24
_pkgname=fr24feed
pkgver=1.0.24
-pkgrel=7
+pkgrel=8
_pkgver=1.0.24-5
_pkgverarm=1.0.24-7
pkgdesc='Feeder software for Flightradar24.com (fr24feed)'
@@ -18,15 +18,17 @@ backup=(etc/fr24feed.ini)
install=flightradar24.install
source=('fr24feed.service'
'flightradar24.tmpfiles'
- 'flightradar24.sysusers')
+ 'flightradar24.sysusers'
+ 'hostname')
source_x86_64=("https://repo-feed.flightradar24.com/linux_x86_64_binaries/${_pkgname}_${_pkgver}_amd64.tgz")
source_i686=("https://repo-feed.flightradar24.com/linux_x86_binaries/${_pkgname}_${_pkgver}_i386.tgz")
source_armv6h=("https://repo-feed.flightradar24.com/rpi_binaries/${_pkgname}_${_pkgverarm}_armhf.tgz")
source_armv7h=("https://repo-feed.flightradar24.com/rpi_binaries/${_pkgname}_${_pkgverarm}_armhf.tgz")
-sha256sums=('7c0d1a5508917851789477b035cd91eafb84f8706c3214babea7125f8a82a0d2'
+sha256sums=('5cdf6942b28d59bb06ceebce2eb2062f77723b2127065070278b52a2e1f8db68'
'32f6f289efe8e3e303767239b2a276405b2d7c0fcbbde8ed9473ee6889b676ff'
- '7e5e1a28769559a2e2e1312894a1f9d315c4812bb34e2f1c45b2f877e4f4eeb0')
+ '7e5e1a28769559a2e2e1312894a1f9d315c4812bb34e2f1c45b2f877e4f4eeb0'
+ '32ae61984ae0123690fea0bf67f2b5f1ee1155f6a2b3a9d0ff7c5431d902ddee')
sha256sums_x86_64=('cc88150f753e734327bf35574f6de5b11d8f989ddb1186514a4ce02e6e61600b')
sha256sums_i686=('68dc31cf7f085074d1c639fe8bf383dc614704a0c526d98a6ab52a32f1833f9d')
sha256sums_armv6h=('5f83f65a0a87b464455ce42d508bd0ad61fb605786b5d0d6bd46d45f8747644e')
@@ -52,6 +54,10 @@ package() {
install -Dm644 -t "$pkgdir/usr/lib/systemd/system" fr24feed.service
install -Dm644 flightradar24.tmpfiles "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
install -Dm644 flightradar24.sysusers "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+
+ # hostname: invalid option -- 'I'
+ # Try 'hostname --help' or 'hostname --usage' for more information.
+ install -Dm755 -t "$pkgdir/usr/lib/$pkgname" hostname
}
# vim:set ts=2 sw=2 et:
diff --git a/fr24feed.service b/fr24feed.service
index 14c8ee43527..9066dbedc5e 100644
--- a/fr24feed.service
+++ b/fr24feed.service
@@ -9,6 +9,7 @@ ProtectSystem=full
ProtectHome=true
RuntimeDirectory=fr24feed
ExecStart=/usr/bin/fr24feed --config-file=/etc/fr24feed.ini --logfile=/var/log/fr24feed.log
+Environment=PATH=/usr/lib/flightradar24:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
[Install]
WantedBy=network.target
diff --git a/hostname b/hostname
new file mode 100644
index 00000000000..c4c4a02cedc
--- /dev/null
+++ b/hostname
@@ -0,0 +1,17 @@
+#!/bin/sh -
+
+# Any copyright is dedicated to the Public Domain.
+# https://creativecommons.org/publicdomain/zero/1.0/
+
+# Helper for dealing with incompatibility with Debian hostname:
+# hostname: invalid option -- 'I'
+
+# -I, --all-ip-addresses all addresses for the host
+
+if [ x"$1" = x"-I" ]; then
+ ip -o address show up scope global | \
+ grep -Po '(?<=inet |inet6 )[^/]+' | \
+ xargs echo
+else
+ exec /usr/bin/hostname "$@"
+fi