Compare commits

..

No commits in common. "201705" and "cbc0de86f401cbc9c65450f20a9c5f122525c095" have entirely different histories.

68 changed files with 701 additions and 1071 deletions

View File

@ -3,54 +3,21 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = " \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
ALLOW_EMPTY_${PN} = "1"
PR = "r25"
PR = "r24"
RDEPENDS_${PN} = "\
task-sysmocom-tools \
task-sysmocom-debug \
task-sysmocom-legacy \
task-gprscore \
packagegroup-sysmobts-sob \
sysmocom-openvpn-config \
minicom \
vlan \
patch \
procps \
psmisc \
ppp \
rsync \
sed \
usbutils \
openvpn \
iperf \
lcr \
cronie \
iproute2 \
i2c-tools \
cu \
python-pyserial \
python-pexpect \
bridge-utils \
pciutils \
nfacct \
logrotate \
dnsmasq \
ifupdown \
logrotate \
python-jsonrpclib \
python-enum \
iputils \
rtl8169-eeprom \
autossh \
perl \
libdbd-sqlite-perl \
libdbi-perl \
libjson-perl \
netcat-openbsd \
perf \
lksctp-tools \
osmo-sip-connector \
osmo-sysmon \
osmo-pcap \
task-sysmocom-legacy \
minicom vlan patch procps psmisc \
ppp rsync sed usbutils openvpn iperf \
lcr cronie iproute2 i2c-tools cu \
python-pyserial python-pexpect bridge-utils \
pciutils nfacct logrotate dnsmasq ifupdown \
logrotate python-jsonrpclib python-enum iputils \
packagegroup-sysmobts-sob rtl8169-eeprom autossh \
perl libdbd-sqlite-perl libdbi-perl libjson-perl \
netcat-openbsd perf lksctp-tools task-gprscore \
osmo-sip-connector osmo-sysmon osmo-pcap \
nfs-utils \
"

View File

@ -3,7 +3,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = " \
file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
ALLOW_EMPTY_${PN} = "1"
PR = "r14"
PR = "r13"
RDEPENDS_${PN} = "\
lmsensors-scripts \

View File

@ -2,7 +2,7 @@ require barebox.inc
SRCREV = "ce8849b03a40718fdaa9d7fc30312eeeb0fafcac"
SRC_URI = " \
git://gitea.sysmocom.de/sysmo-bts/barebox.git;protocol=https;branch=v2015.06 \
git://git.sysmocom.de/barebox.git;branch=v2015.06 \
file://defconfig \
"

View File

@ -4,7 +4,7 @@ RDEPENDS_${PN} += "${PN}-mlo"
SRCREV = "ec82959f054af3e4a27267290905cfd895f75331"
SRC_URI = " \
git://gitea.sysmocom.de/sysmo-bts/barebox.git;protocol=https;branch=v2015.06 \
git://git.sysmocom.de/barebox.git;branch=v2015.06 \
file://0001-OWHW-HACK-hard-code-the-bootstate-backend-node.patch \
file://defconfig \
"

View File

@ -2,7 +2,7 @@ require barebox.inc
SRCREV = "d87c27d7ab143d58f358df5722be2b9675103d2e"
SRC_URI = " \
git://gitea.sysmocom.de/sysmo-bts/barebox.git;protocol=https;branch=v2015.06 \
git://git.sysmocom.de/barebox.git;branch=v2015.06 \
file://defconfig \
"

View File

@ -2,7 +2,7 @@ require barebox.inc
SRCREV = "34a48171a699560d8a41d00d2c07ed37a79c00d8"
SRC_URI = " \
git://gitea.sysmocom.de/sysmo-bts/barebox.git;protocol=https;branch=v2015.06 \
git://git.sysmocom.de/barebox.git;branch=v2015.06 \
file://defconfig \
"

View File

@ -4,7 +4,7 @@ RDEPENDS_${PN} += "${PN}-mlo"
SRCREV = "34a48171a699560d8a41d00d2c07ed37a79c00d8"
SRC_URI = " \
git://gitea.sysmocom.de/sysmo-bts/barebox.git;protocol=https;branch=v2015.06 \
git://git.sysmocom.de/barebox.git;branch=v2015.06 \
file://defconfig \
"

View File

@ -3,7 +3,7 @@ HOMEPAGE = "http://sourceforge.net/projects/b-o-s-s-a/"
LICENSE = "GPLv3"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=d32239bcb673463ab874e80d47fae504"
SRCREV = "05bfcc39bc0453c3028b1161175b95a81af7a901"
SRC_URI = "git://git.code.sf.net/p/b-o-s-s-a/code;protocol=https"
SRC_URI = "git://git.code.sf.net/p/b-o-s-s-a/code"
DEPENDS = "readline"
PV = "v0.0+git${SRCPV}"

View File

@ -4,7 +4,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=e6868d1ce8f058ecc5658ecebb086636"
SRCREV = "1103417819fe855d8d0d3e6a277870679ad01bd2"
SRC_URI = "git://github.com/mlaurijsse/linux-mpu9150;protocol=https"
SRC_URI = "git://github.com/mlaurijsse/linux-mpu9150.git"
PV = "v0.0+git${SRCPV}"
PR = "r1a"

View File

@ -18,7 +18,7 @@ SRCREV = "60c9ebbd1a683e8691223042a12958c5dc661feb"
PR = "r43"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRC_URI = "git://gitea.sysmocom.de/sysmo-bts/linux.git;protocol=https;branch=linux-3.10.84 \
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=linux-3.10.84 \
file://defconfig"
S = "${WORKDIR}/git"

View File

@ -14,7 +14,7 @@ PR = "r43"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRC_URI = " \
git://gitea.sysmocom.de/sysmo-bts/linux.git;protocol=https;branch=${BRANCH} \
git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=${BRANCH} \
file://mISDN_loop.patch;patch=1 \
file://defconfig"
S = "${WORKDIR}/git"

View File

@ -18,7 +18,7 @@ SRCREV = "27afed74546b4fa5546aeea26128eae2dcdc7c1f"
PR = "r6"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRC_URI = "git://gitea.sysmocom.de/sysmo-bts/linux.git;protocol=https;branch=tracking/linux-stable-4.9 \
SRC_URI = "git://git.sysmocom.de/sysmo-bts/linux.git;protocol=git;branch=tracking/linux-stable-4.9 \
file://defconfig"
S = "${WORKDIR}/git"

View File

@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
DEPENDS = "pciutils"
SRCREV = "2052514dc99575140af40b25e41c438c98eb9b48"
SRC_URI = "git://gitea.sysmocom.de/sysmocom/rtl8168-eeprom.git;protocol=https;branch=master"
SRC_URI = "git://git.sysmocom.de/rtl8168-eeprom;protocol=git;branch=master"
PV = "v0.0.1+git${SRCPV}"
PR = "r0"

View File

@ -1,12 +1,12 @@
#OpenVPN client conf
tls-client
client
remote-cert-tls server
ns-cert-type server
dev tun
proto udp
tun-mtu 1500
remote vpn.sysmocom.de
remote admin.sysmocom.de
remote 78.46.147.238
comp-lzo
pkcs12 sysmocom-client-cert.p12
cipher AES-256-CBC
nobind
cipher BF-CBC

View File

@ -5,12 +5,21 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
SRC_URI = "file://sysmocom-vpn.conf"
PR = "r7"
PR = "r4"
CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf"
CONFFILES_${PN} = "${sysconfdir}/openvpn/sysmocom-vpn.conf.off"
PACKAGE_ARCH = "all"
do_install() {
install -d ${D}${sysconfdir}/openvpn
install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn
install -m 0644 ${WORKDIR}/sysmocom-vpn.conf ${D}${sysconfdir}/openvpn/sysmocom-vpn.conf.off
}
# Always enable the OpenVPN service. This assumes that
# this package will never be inside the nornal sysmocom
# feed.
FILES_${PN} += "${systemd_unitdir}"
do_install_append() {
install -d ${D}${systemd_system_unitdir}/multi-user.target.wants/
ln -sf ../openvpn.service ${D}${systemd_system_unitdir}/multi-user.target.wants/
}

View File

@ -1,23 +0,0 @@
Subject: [PATCH 1/6] urandom-xauth-changes-to-options.h
Upstream-Status: Inappropriate [configuration]
---
default_options.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/default_options.h b/default_options.h
index 349338c..5ffac25 100644
--- a/default_options.h
+++ b/default_options.h
@@ -289,7 +289,7 @@ group1 in Dropbear server too */
/* The command to invoke for xauth when using X11 forwarding.
* "-q" for quiet */
-#define XAUTH_COMMAND "/usr/bin/xauth -q"
+#define XAUTH_COMMAND "xauth -q"
/* If you want to enable running an sftp server (such as the one included with
--
2.25.1

View File

@ -1,41 +0,0 @@
From b8cece92ba19aa77ac013ea161bfe4c7147747c9 Mon Sep 17 00:00:00 2001
From: Jussi Kukkonen <jussi.kukkonen@intel.com>
Date: Wed, 2 Dec 2015 11:36:02 +0200
Subject: Enable pam
We need modify file default_options.h besides enabling pam in
configure if we want dropbear to support pam.
Upstream-Status: Pending
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
---
default_options.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/default_options.h b/default_options.h
index 0e3d027..349338c 100644
--- a/default_options.h
+++ b/default_options.h
@@ -210,7 +210,7 @@ group1 in Dropbear server too */
/* Authentication Types - at least one required.
RFC Draft requires pubkey auth, and recommends password */
-#define DROPBEAR_SVR_PASSWORD_AUTH 1
+#define DROPBEAR_SVR_PASSWORD_AUTH 0
/* Note: PAM auth is quite simple and only works for PAM modules which just do
* a simple "Login: " "Password: " (you can edit the strings in svr-authpam.c).
@@ -218,7 +218,7 @@ group1 in Dropbear server too */
* but there's an interface via a PAM module. It won't work for more complex
* PAM challenge/response.
* You can't enable both PASSWORD and PAM. */
-#define DROPBEAR_SVR_PAM_AUTH 0
+#define DROPBEAR_SVR_PAM_AUTH 1
/* ~/.ssh/authorized_keys authentication.
* You must define DROPBEAR_SVR_PUBKEY_AUTH in order to use plugins. */
--
2.25.1

View File

@ -1,33 +0,0 @@
From e3a5db1b6d3f6382a15b2266458c26c645a10f18 Mon Sep 17 00:00:00 2001
From: Mingli Yu <Mingli.Yu@windriver.com>
Date: Thu, 6 Sep 2018 15:54:00 +0800
Subject: [PATCH] dropbear configuration file
dropbear: Change the path ("/etc/pam.d/sshd" as default) to find a pam configuration file \
to "/etc/pam.d/dropbear for dropbear when enabling pam supporting"
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Maxin B. John <maxin.john@enea.com>
Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
---
svr-authpam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/svr-authpam.c b/svr-authpam.c
index d201bc9..165ec5c 100644
--- a/svr-authpam.c
+++ b/svr-authpam.c
@@ -223,7 +223,7 @@ void svr_auth_pam(int valid_user) {
}
/* Init pam */
- if ((rc = pam_start("sshd", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
+ if ((rc = pam_start("dropbear", NULL, &pamConv, &pamHandlep)) != PAM_SUCCESS) {
dropbear_log(LOG_WARNING, "pam_start() failed, rc=%d, %s",
rc, pam_strerror(pamHandlep, rc));
goto cleanup;
--
2.7.4

View File

@ -1,4 +0,0 @@
#%PAM-1.0
auth include common-auth
account include common-account

View File

@ -1,31 +0,0 @@
From c347ece05a7fdbf50d76cb136b9ed45caed333f6 Mon Sep 17 00:00:00 2001
From: Joseph Reynolds <joseph.reynolds1@ibm.com>
Date: Thu, 20 Jun 2019 16:29:15 -0500
Subject: [PATCH] dropbear: new feature: disable-weak-ciphers
This feature disables all CBC, SHA1, and diffie-hellman group1 ciphers
in the dropbear ssh server and client since they're considered weak ciphers
and we want to support the stong algorithms.
Upstream-Status: Inappropriate [configuration]
Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.com>
---
default_options.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/default_options.h b/default_options.h
index d417588..bc5200f 100644
--- a/default_options.h
+++ b/default_options.h
@@ -180,7 +180,7 @@ IMPORTANT: Some options will require "make clean" after changes */
* Small systems should generally include either curve25519 or ecdh for performance.
* curve25519 is less widely supported but is faster
*/
-#define DROPBEAR_DH_GROUP14_SHA1 1
+#define DROPBEAR_DH_GROUP14_SHA1 0
#define DROPBEAR_DH_GROUP14_SHA256 1
#define DROPBEAR_DH_GROUP16 0
#define DROPBEAR_CURVE25519 1
--
2.25.1

View File

@ -1,2 +0,0 @@
# Disallow root logins by default
DROPBEAR_EXTRA_ARGS="-w"

View File

@ -1,10 +0,0 @@
[Unit]
Conflicts=dropbear.service
[Socket]
ListenStream=22
Accept=yes
[Install]
WantedBy=sockets.target
Also=dropbearkey.service

View File

@ -1,12 +0,0 @@
[Unit]
Description=SSH Per-Connection Server
Wants=dropbearkey.service
After=syslog.target dropbearkey.service
[Service]
Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
EnvironmentFile=-/etc/default/dropbear
ExecStart=-@SBINDIR@/dropbear -i -r ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key $DROPBEAR_EXTRA_ARGS
ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
StandardInput=socket
KillMode=process

View File

@ -1,14 +0,0 @@
[Unit]
Description=SSH Key Generation
RequiresMountsFor=/var /var/lib
ConditionPathExists=!/etc/dropbear/dropbear_rsa_host_key
ConditionPathExists=!/var/lib/dropbear/dropbear_rsa_host_key
[Service]
Environment="DROPBEAR_RSAKEY_DIR=/etc/dropbear"
EnvironmentFile=-/etc/default/dropbear
Type=oneshot
ExecStart=@BASE_BINDIR@/mkdir -p ${DROPBEAR_RSAKEY_DIR}
ExecStart=@SBINDIR@/dropbearkey -t rsa -f ${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key
RemainAfterExit=yes
Nice=10

View File

@ -1,79 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $remote_fs $syslog $networking
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Dropbear Secure Shell server
### END INIT INFO
#
# Do not configure this file. Edit /etc/default/dropbear instead!
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/dropbear
NAME=dropbear
DESC="Dropbear SSH server"
PIDFILE=/var/run/dropbear.pid
# These values may be replaced by those from /etc/default/dropbear
DROPBEAR_RSAKEY_DIR="/etc/dropbear"
DROPBEAR_PORT=22
DROPBEAR_EXTRA_ARGS=
DROPBEAR_RSAKEY_ARGS=
NO_START=0
set -e
test ! -r /etc/default/dropbear || . /etc/default/dropbear
test "$NO_START" = "0" || exit 0
test -x "$DAEMON" || exit 0
test ! -h /var/service/dropbear || exit 0
test -z "$DROPBEAR_BANNER" || \
DROPBEAR_EXTRA_ARGS="$DROPBEAR_EXTRA_ARGS -b $DROPBEAR_BANNER"
test -n "$DROPBEAR_RSAKEY" || \
DROPBEAR_RSAKEY="${DROPBEAR_RSAKEY_DIR}/dropbear_rsa_host_key"
gen_keys() {
if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then
rm $DROPBEAR_RSAKEY || true
fi
if [ ! -f "$DROPBEAR_RSAKEY" ]; then
mkdir -p ${DROPBEAR_RSAKEY%/*}
dropbearkey -t rsa -f $DROPBEAR_RSAKEY $DROPBEAR_RSAKEY_ARGS
fi
}
case "$1" in
start)
echo -n "Starting $DESC: "
gen_keys
start-stop-daemon -S -p $PIDFILE \
-x "$DAEMON" -- -r $DROPBEAR_RSAKEY \
-p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
sleep 1
start-stop-daemon -S -p $PIDFILE \
-x "$DAEMON" -- -r $DROPBEAR_RSAKEY \
-p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@ -1,11 +0,0 @@
# Not provided in our OE packages
DEPENDS_remove = "virtual/crypt"
# Install sftp-server so scp works with the SFTP protocol, which is the default
# in recent OpenSSH versions (SYS#6403)
RDEPENDS_${PN}_append = " sftp-server"
do_install_append() {
# Do not disable root login by default
echo "" > ${D}${sysconfdir}/default/dropbear
}

View File

@ -1,133 +0,0 @@
SUMMARY = "A lightweight SSH and SCP implementation"
HOMEPAGE = "http://matt.ucc.asn.au/dropbear/dropbear.html"
DESCRIPTION = "Dropbear is a relatively small SSH server and client. It runs on a variety of POSIX-based platforms. Dropbear is open source software, distributed under a MIT-style license. Dropbear is particularly useful for "embedded"-type Linux (or other Unix) systems, such as wireless routers."
SECTION = "console/network"
# some files are from other projects and have others license terms:
# public domain, OpenSSH 3.5p1, OpenSSH3.6.1p2, PuTTY
LICENSE = "MIT & BSD-3-Clause & BSD-2-Clause & PD"
LIC_FILES_CHKSUM = "file://LICENSE;md5=25cf44512b7bc8966a48b6b1a9b7605f"
DEPENDS = "zlib virtual/crypt"
RPROVIDES_${PN} = "ssh sshd"
RCONFLICTS_${PN} = "openssh-sshd openssh"
SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
file://0001-urandom-xauth-changes-to-options.h.patch \
file://init \
file://dropbearkey.service \
file://dropbear@.service \
file://dropbear.socket \
file://dropbear.default \
${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
"
SRC_URI[sha256sum] = "bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b"
PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
file://0006-dropbear-configuration-file.patch \
file://dropbear"
PAM_PLUGINS = "libpam-runtime \
pam-plugin-deny \
pam-plugin-permit \
pam-plugin-unix \
"
inherit autotools update-rc.d systemd
CVE_PRODUCT = "dropbear_ssh"
INITSCRIPT_NAME = "dropbear"
INITSCRIPT_PARAMS = "defaults 10"
SYSTEMD_SERVICE_${PN} = "dropbear.socket"
SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
PACKAGECONFIG ?= "disable-weak-ciphers ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
PACKAGECONFIG[disable-weak-ciphers] = ""
PACKAGECONFIG[enable-x11-forwarding] = ""
# This option appends to CFLAGS and LDFLAGS from OE
# This is causing [textrel] QA warning
EXTRA_OECONF += "--disable-harden"
# musl does not implement wtmp/logwtmp APIs
EXTRA_OECONF_append_libc-musl = " --disable-wtmp --disable-lastlog"
do_configure_append() {
echo "/* Dropbear features */" > ${B}/localoptions.h
if ${@bb.utils.contains('PACKAGECONFIG', 'enable-x11-forwarding', 'true', 'false', d)}; then
echo "#define DROPBEAR_X11FWD 1" >> ${B}/localoptions.h
fi
}
do_install() {
install -d ${D}${sysconfdir} \
${D}${sysconfdir}/init.d \
${D}${sysconfdir}/default \
${D}${sysconfdir}/dropbear \
${D}${bindir} \
${D}${sbindir} \
${D}${localstatedir}
install -m 0644 ${WORKDIR}/dropbear.default ${D}${sysconfdir}/default/dropbear
install -m 0755 dropbearmulti ${D}${sbindir}/
for i in ${BINCOMMANDS}
do
# ssh and scp symlinks are created by update-alternatives
if [ $i = ssh ] || [ $i = scp ]; then continue; fi
ln -s ${sbindir}/dropbearmulti ${D}${bindir}/$i
done
for i in ${SBINCOMMANDS}
do
ln -s ./dropbearmulti ${D}${sbindir}/$i
done
sed -e 's,/etc,${sysconfdir},g' \
-e 's,/usr/sbin,${sbindir},g' \
-e 's,/var,${localstatedir},g' \
-e 's,/usr/bin,${bindir},g' \
-e 's,/usr,${prefix},g' ${WORKDIR}/init > ${D}${sysconfdir}/init.d/dropbear
chmod 755 ${D}${sysconfdir}/init.d/dropbear
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
install -d ${D}${sysconfdir}/pam.d
install -m 0644 ${WORKDIR}/dropbear ${D}${sysconfdir}/pam.d/
fi
# deal with systemd unit files
install -d ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/dropbearkey.service ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/dropbear@.service ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/dropbear.socket ${D}${systemd_system_unitdir}
sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
-e 's,@BINDIR@,${bindir},g' \
-e 's,@SBINDIR@,${sbindir},g' \
${D}${systemd_system_unitdir}/dropbear.socket ${D}${systemd_system_unitdir}/*.service
}
inherit update-alternatives
ALTERNATIVE_PRIORITY = "20"
ALTERNATIVE_${PN} = "${@bb.utils.filter('BINCOMMANDS', 'scp ssh', d)}"
ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti"
pkg_postrm_${PN} () {
if [ -f "${sysconfdir}/dropbear/dropbear_rsa_host_key" ]; then
rm ${sysconfdir}/dropbear/dropbear_rsa_host_key
fi
if [ -f "${sysconfdir}/dropbear/dropbear_dss_host_key" ]; then
rm ${sysconfdir}/dropbear/dropbear_dss_host_key
fi
}
CONFFILES_${PN} = "${sysconfdir}/default/dropbear"
FILES_${PN} += "${bindir}"

View File

@ -12,7 +12,7 @@ COMPATIBLE_MACHINE = "ti33x|ti43x|omap-a15|omap4"
BRANCH ?= "master"
SRCREV = "a5dac6c5a65c672bd299b42ca495566a7cc137a4"
SRC_URI = "git://github.com/omapconf/omapconf.git;protocol=https;branch=${BRANCH}"
SRC_URI = "git://github.com/omapconf/omapconf.git;protocol=git;branch=${BRANCH}"
S = "${WORKDIR}/git"

View File

@ -8,7 +8,7 @@ PR = "r3"
SRCREV = "be3291a18c069ae23a124ffdc56d64a5ff0bbec7"
SRC_URI = "git://git.code.sf.net/p/atftp/code;protocol=https \
SRC_URI = "git://git.code.sf.net/p/atftp/code \
file://atftpd-0.7_circumvent_tftp_size_restrictions.patch \
file://atftpd-0.7_unprotected_assignments_crash.patch \
file://atftpd.init \

View File

@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=9ac2e7cff1ddaf48b6eab6028f23ef88"
PR = "r4"
SRC_URI = "\
git://git.pengutronix.de/git/tools/dt-utils.git;protocol=https \
git://git.pengutronix.de/git/tools/dt-utils.git \
file://0001-barebox-state-fix-typo.patch \
"

View File

@ -1,45 +0,0 @@
From c32d2e7154e242402f086b126dc439507813f173 Mon Sep 17 00:00:00 2001
From: Oliver Smith <osmith@sysmocom.de>
Date: Tue, 16 Nov 2021 08:38:47 +0100
Subject: [PATCH] Revert "update-ca-certificates: Replace deprecated mktemp -t
with mktemp --tmpdir"
This reverts commit 66951d3b45ffe24d182d36ec02d3ec7aee30ece7.
The busybox version we use doesn't support --tmpdir. Fix for:
root@sysmocom-alix:~# opkg upgrade
Not selecting udev 232 as installing it would break existing dependencies.
Configuring ca-certificates.
mktemp: unrecognized option '--tmpdir'
BusyBox v1.24.1 (2019-08-13 07:53:38 UTC) multi-call binary.
Usage: mktemp [-dt] [-p DIR] [TEMPLATE]
Collected errors:
* pkg_run_script: package "ca-certificates" postinst script returned status 1.
* opkg_configure: ca-certificates.postinst returned 1.
root@sysmocom-alix:~#
Related: SYS#5283
---
sbin/update-ca-certificates | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sbin/update-ca-certificates b/sbin/update-ca-certificates
index 9a876d7..40a3932 100755
--- a/sbin/update-ca-certificates
+++ b/sbin/update-ca-certificates
@@ -81,8 +81,8 @@ trap cleanup 0
# Helper files. (Some of them are not simple arrays because we spawn
# subshells later on.)
TEMPBUNDLE="${ETCCERTSDIR}/${CERTBUNDLE}.new"
-ADDED="$(mktemp --tmpdir "ca-certificates.tmp.XXXXXX")"
-REMOVED="$(mktemp --tmpdir "ca-certificates.tmp.XXXXXX")"
+ADDED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
+REMOVED="$(mktemp -t "ca-certificates.tmp.XXXXXX")"
# Adds a certificate to the list of trusted ones. This includes a symlink
# in /etc/ssl/certs to the certificate file and its inclusion into the
--
2.30.2

View File

@ -6,7 +6,6 @@ HOMEPAGE = "http://packages.debian.org/sid/ca-certificates"
SECTION = "misc"
LICENSE = "GPL-2.0+ & MPL-2.0"
LIC_FILES_CHKSUM = "file://debian/copyright;md5=ae5b36b514e3f12ce1aa8e2ee67f3d7e"
PR="r1"
# This is needed to ensure we can run the postinst at image creation time
DEPENDS = ""
@ -23,7 +22,6 @@ SRC_URI = "git://salsa.debian.org/debian/ca-certificates.git;protocol=https \
file://default-sysroot.patch \
file://0003-update-ca-certificates-use-relative-symlinks-from-ET.patch \
file://0001-Revert-mozilla-certdata2pem.py-print-a-warning-for-e.patch \
file://0004-Revert-update-ca-certificates-Replace-deprecated-mkt.patch \
"
UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+)"
@ -84,9 +82,8 @@ do_install_append_class-native () {
SYSROOT="${D}${base_prefix}" ${D}${sbindir}/update-ca-certificates
}
RDEPENDS_${PN} += "openssl"
#RDEPENDS_${PN}_append_class-target = " openssl-bin openssl"
#RDEPENDS_${PN}_append_class-native = " openssl-native"
#RDEPENDS_${PN}_append_class-nativesdk = " nativesdk-openssl-bin nativesdk-openssl"
RDEPENDS_${PN}_append_class-target = " openssl-bin openssl"
RDEPENDS_${PN}_append_class-native = " openssl-native"
RDEPENDS_${PN}_append_class-nativesdk = " nativesdk-openssl-bin nativesdk-openssl"
BBCLASSEXTEND = "native nativesdk"

View File

@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
PR = "r1"
SRCREV = "ec983ad90408b689408c2c89179bf8f7b35665a6"
SRC_URI = "git://git.samba.org/cifs-utils.git;protocol=https"
SRC_URI = "git://git.samba.org/cifs-utils.git"
S = "${WORKDIR}/git"

View File

@ -0,0 +1,46 @@
From ca1a781afbd68697ef2f573557f1f93ec7ab8d3c Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Sun, 29 Apr 2012 00:05:59 +0200
Subject: [PATCH] SConstruct: disable html and man docs building because
xmlto-native from OE is broken
It will try to load dtd and fail:
| xmlto man gpsctl.xml; mv `basename gpsctl.1` gpsctl.1
| xmlto: /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate (status 3)
| xmlto: Fix document syntax or use --skip-validation option
| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
| /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml:8: warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
| "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
| ^
| I/O error : Attempt to load network entity http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd
| warning: failed to load external entity "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
| validity error : Could not load the external subset "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"
| Document /var/lib/jenkins/jobs/shr-core-branches/workspace/shr-core/tmp-eglibc/work/armv4t-oe-linux-gnueabi/gpsd-3.4-r2/gpsd-3.4/gpsctl.xml does not validate
| mv: cannot stat `gpsctl.1': No such file or directory
| scons: *** [gpsctl.1] Error 1
| scons: building terminated because of errors.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
SConstruct | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: gpsd-3.10/SConstruct
===================================================================
--- gpsd-3.10.orig/SConstruct
+++ gpsd-3.10/SConstruct
@@ -704,12 +704,12 @@ size_t strlcpy(/*@out@*/char *dst, /*@in
manbuilder = mangenerator = htmlbuilder = None
if env['manbuild']:
- if config.CheckXsltproc():
+ if False and config.CheckXsltproc():
mangenerator = 'xsltproc'
build = "xsltproc --nonet %s $SOURCE >$TARGET"
htmlbuilder = build % docbook_html_uri
manbuilder = build % docbook_man_uri
- elif WhereIs("xmlto"):
+ elif False and WhereIs("xmlto"):
mangenerator = 'xmlto'
xmlto = "xmlto %s $SOURCE || mv `basename $TARGET` `dirname $TARGET`"
htmlbuilder = xmlto % "html-nochunks"

View File

@ -0,0 +1,72 @@
From dd3ca38b27cce93f7e932abaa27b41371234fa90 Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Tue, 24 Apr 2012 18:45:14 +0200
Subject: [PATCH] SConstruct: prefix includepy with sysroot and drop sysroot
from python_lib_dir
* without PYTHONPATH, distutil's sysconfig returns INCLUDEPY without sysroot prefix
and with PYTHONPATH from OE it's pointing to native python dir
$ export PYTHONPATH=/OE/shr-core/tmp-eglibc/sysroots/om-gta02/usr/lib/python2.7/
$ python
Python 2.7.2 (default, Apr 18 2012, 09:19:59)
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils import sysconfig
>>> sysconfig.get_config_vars('INCLUDEPY')
['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
>>>
$ unset PYTHONPATH
$ python
Python 2.7.2 (default, Apr 18 2012, 09:19:59)
[GCC 4.6.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from distutils import sysconfig
>>> sysconfig.get_config_vars('INCLUDEPY')
['/python2.7']
>>> import sysconfig
>>> sysconfig.get_config_vars('INCLUDEPY')
['/OE/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/include/python2.7']
* python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
returns path to target sysroot
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
SConstruct | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/SConstruct b/SConstruct
index 3c919fc..8478181 100644
--- a/SConstruct
+++ b/SConstruct
@@ -932,6 +932,12 @@ else:
if vars[i] is None:
vars[i] = []
(cc, cxx, opt, basecflags, ccshared, ldshared, so_ext, includepy, ldflags) = vars
+
+ if env['sysroot']:
+ print "Prefixing includepy '%s' with sysroot prefix" % includepy
+ includepy = os.path.normpath("%s/%s/%s/%s" % (env['sysroot'], env['prefix'], env['includedir'], includepy))
+ print "'%s'" % includepy
+
# in case CC/CXX was set to the scan-build wrapper,
# ensure that we build the python modules with scan-build, too
if env['CC'] is None or env['CC'].find('scan-build') < 0:
@@ -1165,11 +1171,14 @@ if not env['python']:
python_install = []
else:
python_lib_dir = sysconfig.get_python_lib(plat_specific=1)
+ python_lib_dir = python_lib_dir.replace(env['sysroot'], '')
python_module_dir = python_lib_dir + os.sep + 'gps'
python_extensions_install = python_env.Install( DESTDIR + python_module_dir,
python_built_extensions)
if not env['debug'] and not env['profiling'] and env['strip']:
python_env.AddPostAction(python_extensions_install, '$STRIP $TARGET')
+ env.AddPostAction(python_extensions_install, '$CHRPATH -r "%s" "$TARGET"' \
+ % (python_lib_dir, ))
python_modules_install = python_env.Install( DESTDIR + python_module_dir,
python_modules)
--
1.7.8.5

View File

@ -0,0 +1,140 @@
From 19a55075d4e60e07d03d49937cd2a4d9239d00a4 Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <hfreyther@sysmocom.de>
Date: Fri, 22 Aug 2014 09:55:19 +0200
Subject: [PATCH] gps2udp: Add a label, timestamp and mac address to each
report
---
gps2udp.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 60 insertions(+), 2 deletions(-)
diff --git a/gps2udp.c b/gps2udp.c
index 313ef36..e1bed05 100644
--- a/gps2udp.c
+++ b/gps2udp.c
@@ -38,6 +38,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#include <net/if.h>
+#include <sys/ioctl.h>
#endif /* S_SPLINT_S */
#define MAX_TIME_LEN 80
@@ -56,6 +58,9 @@ static struct fixsource_t gpsd_source;
static unsigned int flags;
static int debug = 0;
static bool aisonly = false;
+static const char *label;
+static const char *mac;
+static char *mac_string;
/*@-statictrans@*/
/*@observer@*/static char* time2string(void)
@@ -80,6 +85,7 @@ static bool aisonly = false;
static int send_udp (char *nmeastring, size_t ind)
{
+ char output[1024];
char message[255];
char *buffer;
int channel;
@@ -105,12 +111,23 @@ static int send_udp (char *nmeastring, size_t ind)
buffer[ind] = '\r'; ind++;
buffer[ind] = '\0';
+ /* copy once more for the label */
+ if (label)
+ snprintf(output, 1024, "%s,%llu,%s,%s",
+ label, (unsigned long long ) time(NULL), mac_string, buffer);
+ else
+ snprintf(output, 1024, "%s", buffer);
+
+ output[1023] = '\0';
+ ind = strlen(output);
+
+
/* send message on udp channel */
/*@-type@*/
for (channel=0; channel < udpchannel; channel ++) {
ssize_t status;
status = sendto(sock[channel],
- buffer,
+ output,
ind,
0,
&remote[channel],
@@ -182,6 +199,8 @@ static void usage(void)
"-c [count] exit after count packets.\n"
"-b Run in background as a daemon.\n"
"-d [0-2] 1 display sent packets, 2 ignored packets.\n"
+ "-l [NAME] A label to be used for the output\n"
+ "-m [IF_NAME] The interface to extract the mac from\n"
"-v Print version and exit.\n\n"
"You must specify one, or more, of -r, -R, or -w\n"
);
@@ -356,7 +375,7 @@ int main(int argc, char **argv)
char *udphostport[MAX_UDP_DEST];
flags = WATCH_ENABLE;
- while ((option = getopt(argc, argv, "?habnjcvl:u:d:")) != -1)
+ while ((option = getopt(argc, argv, "?habnjcvl:u:d:l:m:")) != -1)
{
switch (option) {
case 'd':
@@ -390,6 +409,12 @@ int main(int argc, char **argv)
udphostport[udpchannel++] = optarg;
}
break;
+ case 'l':
+ label = optarg;
+ break;
+ case 'm':
+ mac = optarg;
+ break;
case 'v':
(void)fprintf(stderr, "%s: %s (revision %s)\n",
argv[0], VERSION, REVISION);
@@ -402,6 +427,39 @@ int main(int argc, char **argv)
}
}
+ if (label && !mac) {
+ fprintf(stderr, "Need to specify the ethernet device to find the mac.\n");
+ exit(EXIT_FAILURE);
+ }
+ if (mac && strlen(mac) >= IFNAMSIZ) {
+ fprintf(stderr, "Interface name is too long.\n");
+ exit(EXIT_FAILURE);
+ } else if (mac) {
+ struct ifreq addr = { };
+ int fd, rc;
+ fd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (fd < 0) {
+ fprintf(stderr, "Failed to open socket.\n");
+ exit(EXIT_FAILURE);
+ }
+ memcpy(&addr.ifr_name, mac, strlen(mac));
+ rc = ioctl(fd, SIOCGIFHWADDR, &addr);
+ close(fd);
+ if (rc < 0) {
+ fprintf(stderr, "Failed to query address.\n");
+ exit(EXIT_FAILURE);
+ }
+ mac_string = malloc(40 * sizeof(char));
+ snprintf(mac_string, 40,
+ "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
+ addr.ifr_hwaddr.sa_data[0] & 0xff,
+ addr.ifr_hwaddr.sa_data[1] & 0xff,
+ addr.ifr_hwaddr.sa_data[2] & 0xff,
+ addr.ifr_hwaddr.sa_data[3] & 0xff,
+ addr.ifr_hwaddr.sa_data[4] & 0xff,
+ addr.ifr_hwaddr.sa_data[5] & 0xff);
+ }
+
/* Grok the server, port, and device. */
if (optind < argc)
gpsd_source_spec(argv[optind], &gpsd_source);
--
1.7.10.4

View File

@ -0,0 +1,27 @@
From f5f262be8ae54bd0c0f52802f2007ec89163756f Mon Sep 17 00:00:00 2001
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Tue, 24 Apr 2012 11:52:35 +0200
Subject: [PATCH 1/2] SConstruct: respect sysroot also in SPLINTOPTS
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org>
---
SConstruct | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
Index: gpsd-3.10/SConstruct
===================================================================
--- gpsd-3.10.orig/SConstruct
+++ gpsd-3.10/SConstruct
@@ -1414,7 +1414,10 @@ def Utility(target, source, action):
# Report splint warnings
# Note: test_bits.c is unsplintable because of the PRI64 macros.
# If you get preprocessor or fatal errors, add +showscan.
-splintopts = "-I/usr/include/libusb-1.0 +quiet"
+if not env['sysroot']:
+ splintopts = "-I/usr/include/libusb-1.0 +quiet"
+else:
+ splintopts = "-I%s/usr/include/libusb-1.0 +quiet" % env['sysroot']
# splint does not know about multi-arch, work around that
ma_status, ma = _getstatusoutput('dpkg-architecture -qDEB_HOST_MULTIARCH')
if ma_status == 0:

View File

@ -0,0 +1,28 @@
Index: gpsd-3.10/driver_tsip.c
===================================================================
--- gpsd-3.10.orig/driver_tsip.c
+++ gpsd-3.10/driver_tsip.c
@@ -1201,6 +1201,23 @@ void configuration_packets_generic(struc
/* Request Navigation Configuration */
putbyte(buf, 0, 0x03);
(void)tsip_write(session, 0xbb, buf, 1);
+
+ gpsd_report(session->context->debug,
+ LOG_PROG, "Configuring + Enabling 1PPS\n");
+ /* enable 1pps */
+ putbyte(buf, 0, 0x4a);
+ putbyte(buf, 1, 0x01);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
+ /* request PPS only if at least one sat is visible */
+ putbyte(buf, 0, 0x4e);
+ putbyte(buf, 1, 0x03);
+ (void)tsip_write(session, 0x8e, buf, 2);
+
+ /* request PPS and TSIP to use UTC time, not GPS */
+ putbyte(buf, 0, 0xa2);
+ putbyte(buf, 1, 0x03);
+ (void)tsip_write(session, 0x8e, buf, 2);
}
void configuration_packets_accutime_gold(struct gps_device_t *session)

View File

@ -0,0 +1,31 @@
Index: gpsd-3.10/gps2udp.c
===================================================================
--- gpsd-3.10.orig/gps2udp.c
+++ gpsd-3.10/gps2udp.c
@@ -353,6 +353,7 @@ int main(int argc, char **argv)
bool daemonize = false;
long count = -1;
int option;
+ int i;
char *udphostport[MAX_UDP_DEST];
flags = WATCH_ENABLE;
@@ -387,7 +388,7 @@ int main(int argc, char **argv)
"gps2udp: too many UDP destinations (max=%d)\n",
MAX_UDP_DEST);
} else {
- udphostport[udpchannel++] = optarg;
+ udphostport[udpchannel++] = strdup(optarg);
}
break;
case 'v':
@@ -490,6 +491,9 @@ int main(int argc, char **argv)
} // end count
} // end len > 3
} // end for (;;)
+
+ for (i = 0; i < udpchannel; ++i)
+ free(udphostport[i]);
// This is an infinite loop, should never be here
/*@-unreachable@*/

View File

@ -0,0 +1,12 @@
Index: gpsd-3.9/SConstruct
===================================================================
--- gpsd-3.9.orig/SConstruct
+++ gpsd-3.9/SConstruct
@@ -223,6 +223,7 @@ env['PYTHON'] = sys.executable
env['STRIP'] = "strip"
env['PKG_CONFIG'] = "pkg-config"
env['CHRPATH'] = 'chrpath'
+env['_RPATH'] = ''
for i in ["AR", "ARFLAGS", "CCFLAGS", "CFLAGS", "CC", "CXX", "CXXFLAGS", "STRIP", "PKG_CONFIG", "CHRPATH", "LD", "TAR"]:
if os.environ.has_key(i):
j = i

View File

@ -1,156 +0,0 @@
From cd89f0b340764e73de76f5297217caf61b3d3283 Mon Sep 17 00:00:00 2001
From: Oliver Smith <osmith@sysmocom.de>
Date: Tue, 13 Dec 2022 16:05:00 +0100
Subject: [PATCH] gps2udp: Add a label, timestamp and mac address to each
report
Rebase of 0001-gps2udp-Add-a-label-timestamp-and-mac-address-to-eac.patch
we have been carrying:
From 19a55075d4e60e07d03d49937cd2a4d9239d00a4 Mon Sep 17 00:00:00 2001
From: Holger Hans Peter Freyther <hfreyther@sysmocom.de>
Date: Fri, 22 Aug 2014 09:55:19 +0200
Subject: [PATCH] gps2udp: Add a label, timestamp and mac address to each
report
---
clients/gps2udp.c | 61 +++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 59 insertions(+), 2 deletions(-)
diff --git a/clients/gps2udp.c b/clients/gps2udp.c
index 2d9c6033d..d27814f24 100644
--- a/clients/gps2udp.c
+++ b/clients/gps2udp.c
@@ -22,6 +22,7 @@
#include <getopt.h> // for getopt_long()
#endif
#include <netdb.h> /* for gethostbyname() */
+#include <net/if.h>
#include <netinet/in.h>
#include <stdbool.h>
#include <stdio.h>
@@ -29,6 +30,7 @@
// do not use strsep() it is not POSIX
#include <string.h> /* for strlcpy(), strtok(), etc. */
#include <strings.h>
+#include <sys/ioctl.h>
#include <sys/select.h>
#include <sys/socket.h>
#include <sys/stat.h>
@@ -60,6 +62,9 @@ static unsigned int flags;
static unsigned int debug = 0;
static bool aisonly = false;
static bool tpvonly = false;
+static const char *label;
+static const char *mac;
+static char *mac_string;
// return local time hh:mm:ss
static char* time2string(void)
@@ -82,6 +87,7 @@ static char* time2string(void)
static int send_udp(char *nmeastring, size_t ind)
{
+ char output[1024];
char message[MAX_PACKET_LENGTH];
char *buffer;
int channel;
@@ -108,6 +114,16 @@ static int send_udp(char *nmeastring, size_t ind)
buffer[ind] = '\n'; ind++;
buffer[ind] = '\0';
+ /* copy once more for the label */
+ if (label)
+ snprintf(output, 1024, "%s,%llu,%s,%s",
+ label, (unsigned long long ) time(NULL), mac_string, buffer);
+ else
+ snprintf(output, 1024, "%s", buffer);
+
+ output[1023] = '\0';
+ ind = strlen(output);
+
if (0 == (flags & WATCH_JSON) &&
'{' == buffer[0]) {
// do not send JSON when not configured to do so
@@ -129,7 +145,7 @@ static int send_udp(char *nmeastring, size_t ind)
// send message on udp channel
for (channel=0; channel < udpchannel; channel ++) {
ssize_t status = sendto(sock[channel],
- buffer,
+ output,
ind,
0,
(struct sockaddr *)&remote[channel],
@@ -225,6 +241,8 @@ static void usage(void)
" -c COUNT Exit after count packets.\n"
" -d [0-2] 1 display sent packets, "
"2 display ignored packets.\n"
+ " -l [NAME] A label to be used for the output\n"
+ " -m [IF_NAME] The interface to extract the mac from\n"
" -h Show this help.\n"
" -j Feed JSON.\n"
" -n Feed NMEA.\n"
@@ -421,7 +439,7 @@ int main(int argc, char **argv)
bool daemonize = false;
long count = -1;
char *udphostport[MAX_UDP_DEST];
- const char *optstring = "?abc:d:hjntu:V";
+ const char *optstring = "?abc:d:l:m:hjntu:V";
#ifdef HAVE_GETOPT_LONG
int option_index = 0;
static struct option long_options[] = {
@@ -478,6 +496,12 @@ int main(int argc, char **argv)
if (0 < debug)
(void)fprintf(stdout, "Debug %u selected\n", debug);
break;
+ case 'l':
+ label = optarg;
+ break;
+ case 'm':
+ mac = optarg;
+ break;
case 'j':
if (0 < debug)
(void)fprintf(stdout, "JSON selected\n");
@@ -520,6 +544,39 @@ int main(int argc, char **argv)
}
}
+ if (label && !mac) {
+ fprintf(stderr, "Need to specify the ethernet device to find the mac.\n");
+ exit(EXIT_FAILURE);
+ }
+ if (mac && strlen(mac) >= IFNAMSIZ) {
+ fprintf(stderr, "Interface name is too long.\n");
+ exit(EXIT_FAILURE);
+ } else if (mac) {
+ struct ifreq addr = { };
+ int fd, rc;
+ fd = socket(AF_INET, SOCK_DGRAM, 0);
+ if (fd < 0) {
+ fprintf(stderr, "Failed to open socket.\n");
+ exit(EXIT_FAILURE);
+ }
+ memcpy(&addr.ifr_name, mac, strlen(mac));
+ rc = ioctl(fd, SIOCGIFHWADDR, &addr);
+ close(fd);
+ if (rc < 0) {
+ fprintf(stderr, "Failed to query address.\n");
+ exit(EXIT_FAILURE);
+ }
+ mac_string = malloc(40 * sizeof(char));
+ snprintf(mac_string, 40,
+ "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",
+ addr.ifr_hwaddr.sa_data[0] & 0xff,
+ addr.ifr_hwaddr.sa_data[1] & 0xff,
+ addr.ifr_hwaddr.sa_data[2] & 0xff,
+ addr.ifr_hwaddr.sa_data[3] & 0xff,
+ addr.ifr_hwaddr.sa_data[4] & 0xff,
+ addr.ifr_hwaddr.sa_data[5] & 0xff);
+ }
+
// Grok the server, port, and device.
if (optind < argc) {
gpsd_source_spec(argv[optind], &gpsd_source);
--
2.34.1

View File

@ -1,58 +0,0 @@
From 901b3f9b6747eca8893ecaae824be396a6a4b5db Mon Sep 17 00:00:00 2001
From: Oliver Smith <osmith@sysmocom.de>
Date: Tue, 13 Dec 2022 15:37:15 +0100
Subject: [PATCH] gps2udp: leave argv untouched
Rebase of leave-argv-untouched.patch we carried. Doesn't seem important,
but to keep the behavior consistent. Originally added with the following
commit message to meta-sysmocom-bsp.git:
commit 26d74189eb2023ce14af8dd41b36cd388ab8bebb
Author: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Date: Tue Jul 15 08:28:42 2014 +0200
gpsd: Do not mess with the argv of the process
Henning got really confused that the "a.b.c:1234" he passed to
gps2udp showed up as "a.b.c 1234" in the kernel cmdline. Use
strdup to take a copy of it.
Fixes: SYS#424
---
clients/gps2udp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/clients/gps2udp.c b/clients/gps2udp.c
index d27814f24..81d141fa2 100644
--- a/clients/gps2udp.c
+++ b/clients/gps2udp.c
@@ -436,6 +436,7 @@ static unsigned int AISGetInt(unsigned char *bitbytes, unsigned int sp,
int main(int argc, char **argv)
{
+ int i;
bool daemonize = false;
long count = -1;
char *udphostport[MAX_UDP_DEST];
@@ -526,7 +527,7 @@ int main(int argc, char **argv)
"gps2udp: too many UDP destinations (max=%d).\n",
MAX_UDP_DEST);
} else {
- udphostport[udpchannel++] = optarg;
+ udphostport[udpchannel++] = strdup(optarg);
if (0 < debug) {
(void)fprintf(stdout, "UDP %s added.\n", optarg);
}
@@ -686,6 +687,9 @@ int main(int argc, char **argv)
} // end len > 3
} // end for (;;)
+ for (i = 0; i < udpchannel; ++i)
+ free(udphostport[i]);
+
// This is an infinite loop, should never be here
(void)fprintf (stderr, "gpsd2udp ERROR abnormal exit\n");
exit (-1);
--
2.34.1

View File

@ -1,49 +0,0 @@
From 9b12594ed0ce769d923a3b4f4d42c3b25caa87d3 Mon Sep 17 00:00:00 2001
From: Oliver Smith <osmith@sysmocom.de>
Date: Tue, 13 Dec 2022 15:25:52 +0100
Subject: [PATCH] tsip: configure and enable 1PPS
Rebase of gpsd-tsip-pps.patch we have been carrying:
From www/time-service-intro.adoc:
> GPS enables receivers to generate a pulse-per-second
> signal ("1PPS" or just "PPS") accurate to the top of the current
> UTC second within 50 ns.
---
drivers/driver_tsip.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/drivers/driver_tsip.c b/drivers/driver_tsip.c
index 57b97513c..673bbef7e 100644
--- a/drivers/driver_tsip.c
+++ b/drivers/driver_tsip.c
@@ -4288,6 +4288,26 @@ void configuration_packets_generic(struct gps_device_t *session)
/* Primary Receiver Configuration Parameters Request (0xbb-00)
* returns Primary Receiver Configuration Block (0xbb-00) */
(void)tsip_write1(session, "\xbb\x00", 2);
+
+ GPSD_LOG(LOG_PROG, &session->context->errout,
+ "Configuring + Enabling 1PPS\n");
+ /* enable 1pps */
+ putbyte(buf, 0, 0x8e);
+ putbyte(buf, 1, 0x4a);
+ putbyte(buf, 2, 0x01);
+ (void)tsip_write1(session, buf, 3);
+
+ /* request PPS only if at least one sat is visible */
+ putbyte(buf, 0, 0x8e);
+ putbyte(buf, 1, 0x4e);
+ putbyte(buf, 2, 0x03);
+ (void)tsip_write1(session, buf, 3);
+
+ /* request PPS and TSIP to use UTC time, not GPS */
+ putbyte(buf, 0, 0x8e);
+ putbyte(buf, 1, 0xa2);
+ putbyte(buf, 2, 0x03);
+ (void)tsip_write1(session, buf, 3);
}
/* configure Acutime Gold to a known state */
--
2.34.1

View File

@ -1,38 +0,0 @@
From 221681eeebd621287bd7587475da27d4e7dd17fc Mon Sep 17 00:00:00 2001
From: Oliver Smith <osmith@sysmocom.de>
Date: Tue, 13 Dec 2022 17:53:41 +0100
Subject: [PATCH] SConscript: force use of -pthread
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With gpsd 3.24, the build system fails to properly detect that our GCC
supports -pthread. When attempting to build without it, the build fails
as follows.
…/ld: gpsd-3.24/libgpsd.a(ppsthread.o): undefined reference to symbol 'pthread_create@@GLIBC_2.4'
…/tmp/ERROR: scons build execution failed.
…/gpsd/3.24-r0/recipe-sysroot/lib/libpthread.so.0: error adding symbols: DSO missing from command line
| collect2: error: ld returned 1 exit status
---
SConscript | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/SConscript b/SConscript
index ddffe068d..ec660c458 100644
--- a/SConscript
+++ b/SConscript
@@ -942,9 +942,7 @@ if not cleaning and not helping:
if not config.CheckCC():
announce("ERROR: CC doesn't work")
- if ((config.CheckCompilerOption("-pthread") and
- not config.env['target_platform'].startswith('darwin'))):
- config.env.MergeFlags("-pthread")
+ config.env.MergeFlags("-pthread")
confdefs = ["/* gpsd_config.h generated by scons, do not hand-hack. */\n"]
--
2.34.1

View File

@ -22,26 +22,26 @@
SUBSYSTEM!="tty", GOTO="gpsd_rules_end"
# Prolific Technology, Inc. PL2303 Serial Port
ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="067b", ATTR{idProduct}=="2303", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# ATEN International Co., Ltd UC-232A Serial Port [pl2303]
ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="0557", ATTR{idProduct}=="2008", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# FTDI 8U232AM
ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# Cypress M8/CY7C64013 (DeLorme uses these)
ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="1163", ATTR{idProduct}=="0100", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# PS-360 OEM (Microsoft GPS sold with Street and Trips 2005)
ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="067b", ATTR{idProduct}=="aaa0", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# Garmin International GPSmap, various models (tested with Garmin GPS 18 USB)
ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241)
ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="10c4", ATTR{idProduct}=="ea60", SYMLINK+="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# u-blox AG, u-blox 5 (tested with Navilock NL-402U)
ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="1546", ATTR{idProduct}=="01a5", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# FTDI FT232
ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="0403", ATTR{idProduct}=="6001", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
# u-blox 4
ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug"
ATTR{idVendor}=="1546", ATTR{idProduct}=="01a4", SYMLINK="gps%n", RUN+="/lib/udev/gpsd.hotplug.wrapper"
ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug"
ACTION=="remove", RUN+="/lib/udev/gpsd.hotplug.wrapper"
LABEL="gpsd_rules_end"

View File

@ -0,0 +1,17 @@
https://bugs.gentoo.org/391299
split up linking flags into multiple arguments
Index: gpsd-3.10/SConstruct
===================================================================
--- gpsd-3.10.orig/SConstruct 2017-03-28 23:47:02.815665786 +0200
+++ gpsd-3.10/SConstruct 2017-03-28 23:47:40.463666285 +0200
@@ -250,7 +250,7 @@
env.Replace(**{j: os.getenv(i)})
for flag in ["LDFLAGS", "LINKFLAGS", "SHLINKFLAGS", "CPPFLAGS"]:
if os.environ.has_key(flag):
- env.MergeFlags({flag : [os.getenv(flag)]})
+ env.MergeFlags({flag : Split(os.getenv(flag))})
# Keep scan-build options in the environment

View File

@ -1,25 +1,28 @@
SUMMARY = "A TCP/IP Daemon simplifying the communication with GPS devices"
SECTION = "console/network"
LICENSE = "BSD-2-Clause"
LIC_FILES_CHKSUM = "file://COPYING;md5=7a5d174db44ec45f9638b2c747806821"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=d217a23f408e91c94359447735bc1800"
DEPENDS = "ncurses python"
PROVIDES = "virtual/gpsd"
PR = "r1"
PR = "r3.20"
SRC_URI = "http://download.savannah.gnu.org/releases/${PN}/${P}.tar.gz \
file://0002-SConstruct-respect-sysroot-also-in-SPLINTOPTS.patch \
file://0001-SConstruct-disable-html-and-man-docs-building-becaus.patch \
file://gpsd-3.3-ldflags.patch \
file://no-rpath-please.patch \
file://gpsd-tsip-pps.patch \
file://leave-argv-untouched.patch \
file://0001-gps2udp-Add-a-label-timestamp-and-mac-address-to-eac.patch \
file://0002-gps2udp-leave-argv-untouched.patch \
file://0003-tsip-configure-and-enable-1PPS.patch \
file://0004-SConscript-force-use-of-pthread.patch \
file://gpsd-default \
file://gpsd \
file://60-gpsd.rules \
file://gpsd.service \
file://gpsd.service \
"
SRC_URI[md5sum] = "c4e743a507a137c00fdb28ef35b145d0"
SRC_URI[sha256sum] = "00ee13f615655284874a661be13553abe66128e6deb5cd648af9bc0cb345fe5c"
SRC_URI[md5sum] = "fc5b03aae38b9b5b6880b31924d0ace3"
SRC_URI[sha256sum] = "706fc2c1cf3dfbf87c941f543381bccc9c4dc9f8240eec407dcbf2f70b854320"
inherit scons update-rc.d systemd
@ -61,10 +64,9 @@ EXTRA_OESCONS = " \
tripmate='false' \
usb='false' \
chrpath='false' \
systemd='${SYSTEMD_OESCONS}' \
libdir='${libdir}' \
manbuild='false' \
${PACKAGECONFIG_CONFARGS} \
systemd='${SYSTEMD_OESCONS}' \
libdir='${libdir}' \
${PACKAGECONFIG_CONFARGS} \
"
# this cannot be used, because then chrpath is not found and only static lib is built
# target=${HOST_SYS}
@ -107,7 +109,7 @@ do_install_append() {
#support for systemd
install -d ${D}${systemd_system_unitdir}/
install -m 0644 ${WORKDIR}/${BPN}.service ${D}${systemd_system_unitdir}/${BPN}.service
install -m 0644 ${BPN}-${PV}/systemd/${BPN}.socket ${D}${systemd_system_unitdir}/${BPN}.socket
install -m 0644 ${S}/systemd/${BPN}.socket ${D}${systemd_system_unitdir}/${BPN}.socket
}
pkg_postinst_${PN}-conf() {

View File

@ -6,13 +6,13 @@ DEPENDS = "gpsd"
RDEPENDS_${PN} = "libgps"
PE = "1"
PR = "r0"
PV = "0.3+git${SRCPV}"
PR = "r14"
PV = "0.2+git${SRCPV}"
SRC_URI = "git://gitea.sysmocom.de/sysmocom/gpsdate.git;branch=master;protocol=https \
SRC_URI = "git://git.sysmocom.de/gpsdate.git;branch=master \
file://gpsdate.default \
"
SRCREV = "68bcf620b4dc37eefae009175b3edb7ef10a5f0a"
SRCREV = "cd7b77ef311f317aac7a067308a94e46811a20f2"
S = "${WORKDIR}/git"
INITSCRIPT_NAME = "gpsdate"

View File

@ -7,7 +7,7 @@ PR = "r0"
DEPENDS = "libmnl"
SRC_URI = "git://git.netfilter.org/libnetfilter_acct;protocol=https;branch=master \
SRC_URI = "git://git.netfilter.org/libnetfilter_acct;branch=master \
file://0001-add-JSON-output-format.patch \
"
SRCREV = "a9fea38024e6bde9118cc12bc8417b207ffc4da9"

View File

@ -8,7 +8,7 @@ RRECOMMENDS_${PN} = "kernel-module-tun"
PR="r3"
SRC_URI = "git://github.com/ntop/n2n.git;protocol=https;branch=master \
SRC_URI = "git://github.com/ntop/n2n.git;branch=master \
file://edge.sh \
file://n2n-edge@.service \
file://0001-Makefile-Allow-cross-compilation-environment-to-spec.patch"

View File

@ -8,7 +8,7 @@ PR="r1"
DEPENDS = "libmnl libnetfilter-acct"
SRC_URI = "git://git.netfilter.org/nfacct;protocol=https;branch=master \
SRC_URI = "git://git.netfilter.org/nfacct;branch=master \
file://0001-Add-JSON-output-formatting-to-nfacct-utility.patch \
"
SRCREV = "4437682babe86de7435d4fc839437f99e998b79c"

View File

@ -1,48 +0,0 @@
From ea179d83b0aa62719d90748cd1fb260f40055f15 Mon Sep 17 00:00:00 2001
From: Yi Zhao <yi.zhao@windriver.com>
Date: Mon, 13 Jun 2022 22:44:28 +0800
Subject: [PATCH] configure.ac: eliminate build path from openvpn --version
option
Before the patch:
$ openvpn --version
OpenVPN 2.5.7 x86_64-poky-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL]
[snip]
Compile time defines: enable_async_push=no enable_comp_stub=no
[snip]
with_crypto_library=openssl with_gnu_ld=yes
with_libtool_sysroot=/buildarea/build/tmp/work/core2-64-poky-linux/openvpn/2.5.7-r0/recipe-sysroot
with_mem_check=no with_openssl_engine=auto
After the patch:
$ openvpn --version
OpenVPN 2.5.7 x86_64-poky-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL]
[snip]
Compile time defines: enable_async_push=no enable_comp_stub=no
[snip]
with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no
with_openssl_engine=auto
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 2f5f6bc..eddcbc5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1377,7 +1377,7 @@ if test "${enable_async_push}" = "yes"; then
esac
fi
-CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*='`"
+CONFIGURE_DEFINES="`set | grep '^enable_.*=' ; set | grep '^with_.*=' | grep -v 'libtool_sysroot'`"
AC_DEFINE_UNQUOTED([CONFIGURE_DEFINES], ["`echo ${CONFIGURE_DEFINES}`"], [Configuration settings])
TAP_WIN_COMPONENT_ID="PRODUCT_TAP_WIN_COMPONENT_ID"
--
2.25.1

View File

@ -1,40 +1,32 @@
#!/bin/sh -e
#
#
# Original version by Robert Leslie
# <rob@mars.org>, edited by iwj and cs
# Modified for openvpn by Alberto Gonzalez Iniesta <agi@agi.as>
# Modified for restarting / starting / stopping single tunnels by Richard Mueller <mueller@teamix.net>
# Modified for respecting pid file on service start by Fabian Klemp <fabian.klemp@axino-group.com>
test $DEBIAN_SCRIPT_DEBUG && set -v -x
DAEMON=/usr/sbin/openvpn
CONFIG_DIR=/etc/openvpn
test -x $DAEMON || exit 0
test -d $CONFIG_DIR || exit 0
start_vpn () {
modprobe tun >/dev/null 2>&1 || true
start-stop-daemon --start --quiet --pidfile /var/run/openvpn.$NAME.pid \
--exec $DAEMON -- \
--daemon --writepid /var/run/openvpn.$NAME.pid \
--config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || rc="$?"
case $rc in
1) echo -n " ALREADY STARTED->";;
3) echo -n " FAILED->";;
esac
$DAEMON --daemon --writepid /var/run/openvpn.$NAME.pid \
--config $CONFIG_DIR/$NAME.conf --cd $CONFIG_DIR || echo -n " FAILED->"
echo -n " $NAME"
}
}
stop_vpn () {
kill `cat $PIDFILE` || true
rm $PIDFILE
}
}
case "$1" in
start)
echo -n "Starting openvpn:"
if test -z $2 ; then
for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
NAME=${CONFIG%%.conf}
@ -49,11 +41,11 @@ start)
fi
fi
echo "."
;;
stop)
echo -n "Stopping openvpn:"
if test -z $2 ; then
for PIDFILE in `ls /var/run/openvpn.*.pid 2> /dev/null`; do
NAME=`echo $PIDFILE | cut -c18-`
@ -95,7 +87,7 @@ reload|force-reload)
done
echo "."
;;
restart)
$0 stop $2
sleep 1

View File

@ -0,0 +1,40 @@
#!/bin/sh
# This systemd generator creates dependency symlinks that make all OpenVPN
# tunnels listed in /etc/default/openvpn's AUTOSTART be started/stopped/reloaded
# when openvpn.service is started/stopped/reloaded.
set -eu
GENDIR="$1"
WANTDIR="$1/openvpn.service.wants"
SERVICEFILE="/lib/systemd/system/openvpn@.service"
AUTOSTART="all"
CONFIG_DIR=/etc/openvpn
mkdir -p "$WANTDIR"
if test -e /etc/default/openvpn ; then
. /etc/default/openvpn
fi
# No VPNs automatically started
if test "x$AUTOSTART" = "xnone" ; then
exit 0
fi
if test "x$AUTOSTART" = "xall" -o -z "$AUTOSTART" ; then
for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
NAME=${CONFIG%%.conf}
ln -s "$SERVICEFILE" "$WANTDIR/openvpn@$NAME.service"
done
else
for NAME in $AUTOSTART ; do
if test -e $CONFIG_DIR/$NAME.conf ; then
ln -s "$SERVICEFILE" "$WANTDIR/openvpn@$NAME.service"
fi
done
fi
exit 0

View File

@ -0,0 +1,63 @@
SUMMARY = "A full-featured SSL VPN solution via tun device."
HOMEPAGE = "http://openvpn.sourceforge.net"
SECTION = "console/network"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=5aac200199fde47501876cba7263cb0c"
DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
inherit autotools
PR = "r3"
SRC_URI = "http://swupdate.openvpn.org/community/releases/openvpn-${PV}.tar.gz \
file://openvpn \
file://openvpn-generator \
file://openvpn@.service \
file://openvpn.service"
SRC_URI[md5sum] = "6ca03fe0fd093e0d01601abee808835c"
SRC_URI[sha256sum] = "7baed2ff39c12e1a1a289ec0b46fcc49ff094ca58b8d8d5f29b36ac649ee5b26"
CFLAGS += "-fno-inline"
# I want openvpn to be able to read password from file (hrw)
EXTRA_OECONF += "--enable-password-save --enable-iproute2"
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
EXTRA_OECONF += "IPROUTE=/sbin/ip"
do_install_append() {
install -d ${D}/${sysconfdir}/init.d
install -d ${D}/${sysconfdir}/openvpn
install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
# systemd files
install -d ${D}${systemd_system_unitdir}
install -d ${D}${systemd_unitdir}/system-generators
install -m 0644 ${WORKDIR}/openvpn.service ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/openvpn@.service ${D}${systemd_system_unitdir}
install -m 0755 ${WORKDIR}/openvpn-generator ${D}${systemd_unitdir}/system-generators
}
RDEPENDS_${PN} += "update-rc.d"
RRECOMMENDS_${PN} = "kernel-module-tun"
FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
# Don't go through the systemd.bbclass as we do not want magic to happen
# during install and upgrade. Simply ship the files.
FILES_${PN} += "${systemd_unitdir}"
pkg_postinst_${PN} () {
if [ "x$D" != "x" ]; then
exit 1
fi
if [ -L /etc/rc2.d/S*openvpn ]; then
update-rc.d -f openvpn remove
if [ ! -L /etc/systemd/system/multi-user.target.wants/openvpn.service ]; then
ln -s '/lib/systemd/system/openvpn.service' '/etc/systemd/system/multi-user.target.wants/openvpn.service'
fi
fi
}

View File

@ -1,87 +0,0 @@
SUMMARY = "A full-featured SSL VPN solution via tun device."
HOMEPAGE = "https://openvpn.net/"
SECTION = "net"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=b76abd82c14ee01cc34c4ff5e3627b89"
DEPENDS = "lzo openssl iproute2 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
inherit autotools systemd update-rc.d pkgconfig
PR = "r2"
SRC_URI = "http://swupdate.openvpn.org/community/releases/${BP}.tar.gz \
file://0001-configure.ac-eliminate-build-path-from-openvpn-versi.patch \
file://openvpn \
file://openvpn@.service \
file://openvpn.service \
"
UPSTREAM_CHECK_URI = "https://openvpn.net/community-downloads"
SRC_URI[sha256sum] = "a6f315b7231d44527e65901ff646f87d7f07862c87f33531daa109fb48c53db2"
# CVE-2020-7224 and CVE-2020-27569 are for Aviatrix OpenVPN client, not for openvpn.
CVE_CHECK_IGNORE += "CVE-2020-7224 CVE-2020-27569"
INITSCRIPT_PACKAGES = "${PN}"
INITSCRIPT_NAME_${PN} = "openvpn"
INITSCRIPT_PARAMS_${PN} = "start 10 2 3 4 5 . stop 70 0 1 6 ."
CFLAGS += "-fno-inline"
# I want openvpn to be able to read password from file (hrw)
EXTRA_OECONF += "--enable-iproute2"
EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', '', '--disable-plugin-auth-pam', d)}"
# Explicitly specify IPROUTE to bypass the configure-time check for /sbin/ip on the host.
EXTRA_OECONF += "IPROUTE=${base_sbindir}/ip"
EXTRA_OECONF += "SYSTEMD_UNIT_DIR=${systemd_system_unitdir} \
TMPFILES_DIR=${nonarch_libdir}/tmpfiles.d \
"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
"
PACKAGECONFIG[systemd] = "--enable-systemd,--disable-systemd,systemd"
PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux"
do_install_append() {
install -d ${D}/${sysconfdir}/init.d
install -m 755 ${WORKDIR}/openvpn ${D}/${sysconfdir}/init.d
install -d ${D}/${sysconfdir}/openvpn
install -d ${D}/${sysconfdir}/openvpn/server
install -d ${D}/${sysconfdir}/openvpn/client
install -d ${D}/${sysconfdir}/openvpn/sample
install -m 644 ${S}/sample/sample-config-files/loopback-server ${D}${sysconfdir}/openvpn/sample/loopback-server.conf
install -m 644 ${S}/sample/sample-config-files/loopback-client ${D}${sysconfdir}/openvpn/sample/loopback-client.conf
install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-config-files
install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-keys
install -dm 755 ${D}${sysconfdir}/openvpn/sample/sample-scripts
install -m 644 ${S}/sample/sample-config-files/* ${D}${sysconfdir}/openvpn/sample/sample-config-files
install -m 644 ${S}/sample/sample-keys/* ${D}${sysconfdir}/openvpn/sample/sample-keys
install -m 644 ${S}/sample/sample-scripts/* ${D}${sysconfdir}/openvpn/sample/sample-scripts
install -d -m 710 ${D}/${localstatedir}/lib/openvpn
# Keep openvpn@.service, openvpn.service to match manuals (SYS#6303)
install -m 0644 ${WORKDIR}/openvpn@.service ${D}${systemd_system_unitdir}
install -m 0644 ${WORKDIR}/openvpn.service ${D}${systemd_system_unitdir}
}
PACKAGES =+ " ${PN}-sample "
RRECOMMENDS_${PN} = "kernel-module-tun"
FILES_${PN}-dbg += "${libdir}/openvpn/plugins/.debug"
FILES_${PN} += "${systemd_system_unitdir}/openvpn-server@.service \
${systemd_system_unitdir}/openvpn-client@.service \
${systemd_system_unitdir}/openvpn@.service \
${systemd_system_unitdir}/openvpn.service \
${nonarch_libdir}/tmpfiles.d \
"
FILES_${PN}-sample = "${sysconfdir}/openvpn/sample/ \
"

View File

@ -7,7 +7,7 @@ PR = "r0"
SRCREV = "b59217c971603a30648b041c84f85159afb2ec31"
SRC_URI = "git://github.com/joshmarshall/jsonrpclib.git;protocol=https"
SRC_URI = "git://github.com/joshmarshall/jsonrpclib.git"
S = "${WORKDIR}/git"
inherit distutils

View File

@ -1,30 +0,0 @@
# Package OpenSSH's sftp server, so the openssh client finds it and doesn't
# need to be run with a flag to use the legacy SCP protocol (SYS#6403)
SUMMARY = "OpenSSH's sftp-server"
DESCRIPTION = "OpenSSH's sftp-server, to be used with dropbear"
HOMEPAGE = "http://www.openssh.com/"
SECTION = "console/network"
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENCE;md5=072979064e691d342002f43cd89c0394"
DEPENDS = ""
SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz"
SRC_URI[md5sum] = "3430d5e6e71419e28f440a42563cb553"
SRC_URI[sha256sum] = "e9baba7701a76a51f3d85a62c383a3c9dcd97fa900b859bc7db114c1868af8a8"
inherit autotools
EXTRA_OECONF += "--without-openssl --without-zlib"
S = "${WORKDIR}/openssh-${PV}"
do_compile() {
oe_runmake sftp-server
}
do_install() {
install -Dm755 "${B}"/sftp-server \
-t "${D}"/usr/libexec/
}
FILES_${PN} = "/usr/libexec/sftp-server"

View File

@ -0,0 +1,4 @@
THISDIR := "${@os.path.dirname(d.getVar('FILE', True))}"
FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:"
PRINC="4"

View File

@ -0,0 +1,113 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: sshd
# Required-Start: $remote_fs $syslog $networking
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 1
# Short-Description: Dropbear Secure Shell server
### END INIT INFO
#
# Do not configure this file. Edit /etc/default/dropbear instead!
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/dropbear
NAME=dropbear
DESC="Dropbear SSH server"
PIDFILE=/var/run/dropbear.pid
DROPBEAR_PORT=22
DROPBEAR_EXTRA_ARGS=
NO_START=0
set -e
test ! -r /etc/default/dropbear || . /etc/default/dropbear
test "$NO_START" = "0" || exit 0
test -x "$DAEMON" || exit 0
test ! -h /var/service/dropbear || exit 0
readonly_rootfs=0
for flag in `awk '{ if ($2 == "/") { split($4,FLAGS,",") } }; END { for (f in FLAGS) print FLAGS[f] }' </proc/mounts`; do
case $flag in
ro)
readonly_rootfs=1
;;
esac
done
if [ $readonly_rootfs = "1" ]; then
mkdir -p /var/lib/dropbear
DROPBEAR_RSAKEY_DEFAULT="/var/lib/dropbear/dropbear_rsa_host_key"
DROPBEAR_DSSKEY_DEFAULT="/var/lib/dropbear/dropbear_dss_host_key"
else
DROPBEAR_RSAKEY_DEFAULT="/etc/dropbear/dropbear_rsa_host_key"
DROPBEAR_DSSKEY_DEFAULT="/etc/dropbear/dropbear_dss_host_key"
fi
test -z "$DROPBEAR_BANNER" || \
DROPBEAR_EXTRA_ARGS="$DROPBEAR_EXTRA_ARGS -b $DROPBEAR_BANNER"
test -n "$DROPBEAR_RSAKEY" || \
DROPBEAR_RSAKEY=$DROPBEAR_RSAKEY_DEFAULT
test -n "$DROPBEAR_DSSKEY" || \
DROPBEAR_DSSKEY=$DROPBEAR_DSSKEY_DEFAULT
test -n "$DROPBEAR_KEYTYPES" || \
DROPBEAR_KEYTYPES="rsa"
gen_keys() {
for t in $DROPBEAR_KEYTYPES; do
case $t in
rsa)
if [ -f "$DROPBEAR_RSAKEY" -a ! -s "$DROPBEAR_RSAKEY" ]; then
rm $DROPBEAR_RSAKEY
fi
test -f $DROPBEAR_RSAKEY || dropbearkey -t rsa -f $DROPBEAR_RSAKEY
;;
dsa)
if [ -f "$DROPBEAR_DSSKEY" -a ! -s "$DROPBEAR_DSSKEY" ]; then
rm $DROPBEAR_DSSKEY
fi
test -f $DROPBEAR_DSSKEY || dropbearkey -t dss -f $DROPBEAR_DSSKEY
;;
esac
done
}
case "$1" in
start)
echo -n "Starting $DESC: "
gen_keys
KEY_ARGS=""
test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d $DROPBEAR_DSSKEY"
test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY"
start-stop-daemon -S -p $PIDFILE \
-x "$DAEMON" -- $KEY_ARGS \
-p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
sleep 1
KEY_ARGS=""
test -f $DROPBEAR_DSSKEY && KEY_ARGS="$KEY_ARGS -d $DROPBEAR_DSSKEY"
test -f $DROPBEAR_RSAKEY && KEY_ARGS="$KEY_ARGS -r $DROPBEAR_RSAKEY"
start-stop-daemon -S -p $PIDFILE \
-x "$DAEMON" -- $KEY_ARGS \
-p "$DROPBEAR_PORT" $DROPBEAR_EXTRA_ARGS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0

View File

@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PV = "0.0.0+git${SRCPV}"
SRCREV = "0deb9c7e135e9380a6d09e9d2e938a146bb698c8"
SRC_URI = "git://github.com/ago/pps-tools.git;protocol=https"
SRC_URI = "git://github.com/ago/pps-tools.git"
S = "${WORKDIR}/git"

View File

@ -4,7 +4,7 @@ LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://src/main.c;beginline=1;endline=20;md5=f2b40a2eb5162af4c3cb20428e72f921"
SRCREV = "095c1cb55757c1f542370e5ba33de663c5d68ba4"
SRC_URI = "git://gitea.sysmocom.de/sysmo-bts/dvnixload.git;protocol=https;branch=master"
SRC_URI = "git://git.sysmocom.de/sysmo-bts/dvnixload;protocol=git;branch=master"
PV = "v0.2.6+git${SRCPV}"
PR = "r1"
S = "${WORKDIR}/git"

View File

@ -2,7 +2,7 @@ DESCRIPTION = "sysmoBTS Layer1 API header files"
SECTION = "kernel"
LICENSE = "CLOSED"
SRC_URI = "git://gitea.sysmocom.de/sysmo-bts/layer1-api.git;protocol=https;branch=master"
SRC_URI = "git://git.sysmocom.de/sysmo-bts/layer1-api.git;protocol=git;branch=master"
SRCREV = "superfemto_v2.4"
PV = "2.4"
PR = "r1"

View File

@ -2,7 +2,7 @@ DESCRIPTION = "sysmoBTS Layer1 API header files"
SECTION = "kernel"
LICENSE = "CLOSED"
SRC_URI = "git://gitea.sysmocom.de/sysmo-bts/layer1-api.git;protocol=https;branch=master"
SRC_URI = "git://git.sysmocom.de/sysmo-bts/layer1-api.git;protocol=git;branch=master"
SRCREV = "84e0cf46511f256ef84c0211f3f39a642acceb33"
SRCREV_sysmobts-v2 = "7f0d5697b85340877b127a25e0c8f2a5f5fe66d7"
PV = "${SRCREV}+git${SRCPV}"

View File

@ -2,13 +2,13 @@ DESCRIPTION = "sysmocom OsmoBTS"
LICENSE = "AGPLv3"
LIC_FILES_CHKSUM = "file://COPYING;md5=73f1eb20517c55bf9493b7dd6e480788"
SRCREV = "1.7.2"
SRC_URI = "git://gerrit.osmocom.org/osmo-bts;protocol=https;destsuffix=git;tag=${SRCREV};nobranch=1"
PV = "${SRCREV}+git${SRCPV}"
SRC_URI = "git://git.osmocom.org/osmo-bts.git;protocol=git;destsuffix=git"
SRCREV = "0436fe7fcaaa95f01a619da31d43c02324afc8f5"
PV = "1.3.0+git${SRCPV}"
PR = "r0.${META_TELEPHONY_OSMO_INC}"
S = "${WORKDIR}/git"
DEPENDS = "libosmocore libosmo-abis libosmo-netif femtobts-api gpsd"
DEPENDS = "libosmocore libosmo-abis femtobts-api gpsd"
DEPENDS_append_sysmobts-v2 = " femtobts-api"
DEPENDS_append_sysmobts2100 = " lc15-firmware"
DEPENDS_append_oc2g = " oc2g-firmware systemd"
@ -32,26 +32,6 @@ PACKAGECONFIG ??= "\
"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir"
# StateDirectory requires systemd >= v235, but poky pyro ships with v232 (SYS#6340):
do_install_append_sysmobts-v2() {
sed -i '/^StateDirectory=/d' ${D}${systemd_system_unitdir}/osmo-bts-sysmo.service
sed -i '/^WorkingDirectory=/d' ${D}${systemd_system_unitdir}/osmo-bts-sysmo.service
sed -i '/^StateDirectory=/d' ${D}${systemd_system_unitdir}/sysmobts-mgr.service
sed -i '/^WorkingDirectory=/d' ${D}${systemd_system_unitdir}/sysmobts-mgr.service
}
do_install_append_sysmobts2100() {
sed -i '/^StateDirectory=/d' ${D}${systemd_system_unitdir}/osmo-bts-lc15.service
sed -i '/^WorkingDirectory=/d' ${D}${systemd_system_unitdir}/osmo-bts-lc15.service
sed -i '/^StateDirectory=/d' ${D}${systemd_system_unitdir}/lc15bts-mgr.service
sed -i '/^WorkingDirectory=/d' ${D}${systemd_system_unitdir}/lc15bts-mgr.service
}
do_install_append_oc2g() {
sed -i '/^StateDirectory=/d' ${D}${systemd_system_unitdir}/osmo-bts-oc2g.service
sed -i '/^WorkingDirectory=/d' ${D}${systemd_system_unitdir}/osmo-bts-oc2g.service
sed -i '/^StateDirectory=/d' ${D}${systemd_system_unitdir}/oc2gbts-mgr.service
sed -i '/^WorkingDirectory=/d' ${D}${systemd_system_unitdir}/oc2gbts-mgr.service
}
SYSTEMD_PACKAGES = "${PN} osmo-bts-virtual"
SYSTEMD_AUTO_ENABLE_${PN}="enable"

View File

@ -2,9 +2,9 @@ DESCRIPTION = "Osmocom PCU for sysmoBTS"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SRCREV = "1.4.0"
SRC_URI = "git://gerrit.osmocom.org/osmo-pcu;protocol=https;branch=master;nobranch=1"
PV = "${SRCREV}+git${SRCPV}"
SRC_URI = "git://git.osmocom.org/osmo-pcu.git;protocol=git;branch=master"
SRCREV = "50aa492b8527df0724876ed80165cbdeedccb22b"
PV = "0.9.0+git${SRCPV}"
PR = "r0.${META_TELEPHONY_OSMO_INC}"
S = "${WORKDIR}/git"
@ -29,12 +29,6 @@ PACKAGECONFIG ??= "\
"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir"
do_install_append() {
# StateDirectory requires systemd >= v235, but poky pyro ships with v232 (SYS#6340):
sed -i '/^StateDirectory=/d' ${D}${systemd_system_unitdir}/osmo-pcu.service
sed -i '/^WorkingDirectory=/d' ${D}${systemd_system_unitdir}/osmo-pcu.service
}
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_AUTO_ENABLE_${PN}="enable"
SYSTEMD_SERVICE_${PN} = "osmo-pcu.service"

View File

@ -6,7 +6,7 @@ PRIORITY = "optional"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://ubl.c;beginline=1;endline=22;md5=806283bb3c475d9082e41f09020373ff"
SRC_URI = "git://gitea.sysmocom.de/sysmo-bts/ubl.git;protocol=https;branch=master"
SRC_URI = "git://git.sysmocom.de/sysmo-bts/ubl;protocol=git;branch=master"
SRCREV = "77aac3693b45df7154ada64341fd67e41f990f22"
PV = "v0.2.11+git${SRCPV}"
PR = "r3"

View File

@ -1,4 +1,4 @@
SRC_URI = "git://gitea.sysmocom.de/sysmo-bts/u-boot.git;branch=tracking/upstream-next;protocol=https"
SRC_URI = "git://git.sysmocom.de/sysmo-bts/u-boot;branch=tracking/upstream-next;protocol=git"
SRCREV = "64b07727fbb268bd19bacfed6711bdb060effcfa"
PV = "v2017.03+git${SRCPV}"
S = "${WORKDIR}/git"