Skip to content

Commit

Permalink
Merge tag '24.02' into maint
Browse files Browse the repository at this point in the history
  • Loading branch information
sm0svx committed Feb 25, 2024
2 parents 94555de + 12c9d9b commit ae81b32
Show file tree
Hide file tree
Showing 351 changed files with 30,355 additions and 3,843 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master, maint ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '43 7 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

- run: |
sudo apt update
sudo apt install g++ cmake make libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl-dev libgcrypt20-dev libspeex-dev libasound2-dev libopus-dev librtlsdr-dev libjsoncpp-dev libcurl4-openssl-dev qtbase5-dev qttools5-dev qttools5-dev-tools
mkdir -p src/build
cd src/build
cmake ..
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ language: cpp

sudo: required

dist: trusty
dist: bionic

compiler: gcc

Expand All @@ -12,7 +12,7 @@ env:

install:
- sudo apt-get update -qq
- sudo apt-get install -y cmake doxygen groff libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl8.5-dev libgcrypt11-dev libspeex-dev libasound2-dev libopus-dev librtlsdr-dev $QT_PACKAGES
- sudo apt-get install -y cmake doxygen groff libsigc++-2.0-dev libgsm1-dev libpopt-dev tcl8.5-dev libgcrypt11-dev libspeex-dev libasound2-dev libopus-dev librtlsdr-dev libjsoncpp-dev $QT_PACKAGES

before_script:
- mkdir build
Expand Down
6 changes: 4 additions & 2 deletions INSTALL.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ or "-devel".
* *libgcrypt*: Cryptographic functions (Required)
* *libasound*: Alsa sound system support (Recommended)
* *libgsm*: GSM audio codec (Required)
* *libjsoncpp*: For json file support (Required)
* *libspeex*: The Speex audio codec (Optional)
* *librtlsdr*: Support for RTL2832U DVB-T/SDR USB dongles (Optional)
* *libgpiod*: More modern approach for GPIO support (Optional)
* *libqt*: Version 4. Framework for graphical applications (Optional)

There also are some runtime dependencies which normally is needed to run a
Expand Down Expand Up @@ -56,8 +58,8 @@ looks like this:
cmake ..
make
make doc
make install
ldconfig
sudo make install
sudo ldconfig

This will build SvxLink and install it under /usr/local. The first argument to
cmake point out the source directory so the build directory can be created
Expand Down
9 changes: 7 additions & 2 deletions distributions/fedora/svxlink.spec
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Summary: The QT EchoLink Client
Version: %{QTEL}
Release: %{QTEL_RPM_RELEASE}.%{dist}
Group: Applications/Ham Radio
Requires: libasync echolib
Requires: libasync echolib hicolor-icon-theme

%description -n qtel
This package contains Qtel, the Qt EchoLink client. It is an implementation of
Expand All @@ -183,8 +183,9 @@ want, install the svxlink-server package.
/usr/share/qtel/sounds/connect.raw
/usr/share/qtel/translations/qtel_sv.qm
%attr(755,root,root) %{_bindir}/qtel
/usr/share/icons/link.xpm
/usr/share/icons/hicolor/128x128/apps/qtel.png
/usr/share/applications/qtel.desktop
/usr/share/metainfo/org.svxlink.Qtel.metainfo.xml


%package -n echolib
Expand Down Expand Up @@ -303,6 +304,10 @@ The Async library development files
%{_libdir}/libasyncaudio.a

%changelog
* Fri Aug 04 2023 Daniel Rusek <[email protected]>
- Added AppStream metainfo into files.
- Added png icon into files.
- Removed xpm icon from files.
* Wed Jul 30 2008 Tobias Blomberg (SM0SVX) <[email protected]>
- Fixed a couple of things that rpmlint complained about.
- Making use of some directory macros (_libdir, _includedir, _bindir, _sbindir).
Expand Down
87 changes: 63 additions & 24 deletions docker/debian-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,56 +1,95 @@
# Build with:
# docker build --pull -t svxlink-debian-build .
#
# Run with:
# docker run -it --rm --hostname debian-build svxlink-debian-build
# Build container image with:
# podman build --pull -t svxlink-debian-build .
#
# Optional build arguments:
# --build-arg=FROM=<base image>
# --build-arg=SOUNDS_VER=<sound pack version>
# --build-arg=SOUNDS_LANG=<sound pack language>
# --build-arg=SOUNDS_VOICE=<sound pack voice>
# --build-arg=SOUNDS_RATE=<sound pack sample rate>
# --build-arg=SOUNDS_URL=<sound pack url>
# --build-arg=GIT_URL_DEFAULT=<git repo>
# --build-arg=GIT_SSL_NO_VERIFY_DEFAULT=<true/false>
# --build-arg=GIT_BRANCH_DEFAULT=<git branch>
# --build-arg=NUM_CORES_DEFAULT=<build with # cores>
#
# Run container with:
# podman run -it --rm --hostname debian-build --userns=keep-id svxlink-debian-build
#
# For using sound inside the docker container add:
# --privileged -v /dev/snd:/dev/snd
# -e HOSTAUDIO_GID=$(stat -c "%g" /dev/snd/timer)
# --privileged -v /dev/snd:/dev/snd
#
# To import your git config add (mileage may vary):
# -v ${HOME}/.gitconfig:/home/svxlink/.gitconfig:ro
# To import your git config add:
# -v ${HOME}/.gitconfig:/home/svxlink/.gitconfig:ro
#
# To use a specific git repositoty instead of the default one:
# -e [email protected]:/path/to/svxlink.git
# To use a specific git repository instead of the default one:
# -e [email protected]:/path/to/svxlink.git
# -e GIT_URL=https://your.repo.srv/path/to/svxlink.git
# -e GIT_SSL_NO_VERIFY=true
#
# To build another branch than master:
# -e GIT_BRANCH=the_branch
# -e GIT_BRANCH=the_branch
#
# To use the local workingcopy rather then cloning the repo in the container:
# -v $(pwd)/../..:/home/svxlink/svxlink:ro
#
# To use more than one CPU core when compiling:
# -e NUM_CORES=8
# -e NUM_CORES=8
#
# Build software with:
# ./build-svxlink.sh
#
# Run software with:
# svxlink

FROM debian
ARG FROM=debian:latest

FROM ${FROM}
MAINTAINER Tobias Blomberg <[email protected]>

# Install required packages and set up the svxlink user
RUN apt-get update && \
apt-get -y install git cmake g++ make libsigc++-2.0-dev libgsm1-dev \
libpopt-dev tcl8.6-dev libgcrypt20-dev libspeex-dev \
libasound2-dev alsa-utils vorbis-tools libqt4-dev \
libopus-dev librtlsdr-dev libcurl4-openssl-dev curl sudo
libasound2-dev alsa-utils vorbis-tools qtbase5-dev \
qttools5-dev qttools5-dev-tools libopus-dev \
librtlsdr-dev libjsoncpp-dev libcurl4-openssl-dev \
libgpiod-dev libogg-dev ladspa-sdk curl sudo
#RUN apt-get -y install groff doxygen

ARG SOUNDS_VER="19.09.99.3"
ARG SOUNDS_LANG="en_US"
ARG SOUNDS_VOICE="heather"
ARG SOUNDS_RATE="16k"
ARG SOUNDS_URL="https://github.com/sm0svx/svxlink-sounds-${SOUNDS_LANG}-${SOUNDS_VOICE}/releases/download/${SOUNDS_VER}/svxlink-sounds-${SOUNDS_LANG}-${SOUNDS_VOICE}-${SOUNDS_RATE}-${SOUNDS_VER}.tar.bz2"

# Install svxlink audio files
RUN mkdir -p /usr/share/svxlink/sounds && \
cd /usr/share/svxlink/sounds && \
curl -LO https://github.com/sm0svx/svxlink-sounds-en_US-heather/releases/download/14.08/svxlink-sounds-en_US-heather-16k-13.12.tar.bz2 && \
curl -LO ${SOUNDS_URL} && \
tar xvaf svxlink-sounds-* && \
ln -s en_US-heather-16k en_US && \
ln -s ${SOUNDS_LANG}-${SOUNDS_VOICE}-${SOUNDS_RATE} ${SOUNDS_LANG} && \
rm svxlink-sounds-*

# Set up password less sudo for user svxlink
# Set up password-less sudo for user svxlink
ADD sudoers-svxlink /etc/sudoers.d/svxlink
RUN chmod 0440 /etc/sudoers.d/svxlink

ENV GIT_URL=https://github.com/sm0svx/svxlink.git \
GIT_BRANCH=master \
NUM_CORES=1
ARG GIT_URL_DEFAULT="https://github.com/sm0svx/svxlink.git"
ARG GIT_SSL_NO_VERIFY_DEFAULT="false"
ARG GIT_BRANCH_DEFAULT="master"
ARG NUM_CORES_DEFAULT="1"

ENV GIT_URL=${GIT_URL_DEFAULT} \
GIT_SSL_NO_VERIFY=${GIT_SSL_NO_VERIFY_DEFAULT} \
GIT_BRANCH=${GIT_BRANCH_DEFAULT} \
NUM_CORES=${NUM_CORES_DEFAULT}

RUN useradd -s /bin/bash svxlink
ADD build-svxlink.sh /home/svxlink/
RUN chown -R svxlink.svxlink /home/svxlink
RUN chown -R svxlink:svxlink /home/svxlink

ADD entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
WORKDIR /home/svxlink
USER svxlink:svxlink
ENTRYPOINT ["/bin/bash"]
37 changes: 22 additions & 15 deletions docker/debian-build/build-svxlink.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
#!/bin/bash -xe
#!/bin/bash -x

set -euo pipefail

GIT_BRANCH=${GIT_BRANCH:-master}

# Make sure that we are in the home directory
cd

# Clone or update the repo
if [[ ! -d svxlink ]]; then
git clone $GIT_URL svxlink
git clone --branch=$GIT_BRANCH $GIT_URL svxlink
cd svxlink
else
cd svxlink
git fetch
git checkout master
git reset --hard origin/master
fi

# Checkout the wanted branch
if [ -n "$GIT_BRANCH" ]; then
git checkout $GIT_BRANCH
if [[ -w . ]]; then
git fetch
git checkout $GIT_BRANCH
git reset --hard origin/$GIT_BRANCH
fi
fi

# Find out how many cores we've got
# How many cores to use during the build
num_cores=${NUM_CORES:-1}

# Create a build directory and build svxlink
cd
[[ -d build ]] && rm -rf build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_SYSCONFDIR=/etc \
cmake -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_BUILD_TYPE=Release ../svxlink/src
-DCPACK_GENERATOR=DEB \
-DCMAKE_BUILD_TYPE=Release \
../svxlink/src
make -j$num_cores
sudo make install
sudo ldconfig
rm -f *.deb
make package
sudo dpkg -i *.deb
#sudo make install
#sudo ldconfig
Loading

0 comments on commit ae81b32

Please sign in to comment.