Commit 8ca32ca6 authored by Evangelos Ribeiro Tzaras's avatar Evangelos Ribeiro Tzaras
Browse files

Merge branch 'update_amber_0.3.2' into 'pureos/amber-phone'

Backport 0.3.2-1pureos1 into amber

See merge request !10
parents 8fdc46e3 e7274f0e
Pipeline #67239 passed with stages
in 8 minutes and 3 seconds
include:
- 'https://source.puri.sm/Librem5/librem5-ci/raw/master/librem5-pipeline-definitions.yml'
- 'https://source.puri.sm/Librem5/librem5-ci/raw/master/librem5-pipeline-byzantium-jobs.yml'
stages:
- build
......@@ -7,79 +8,54 @@ stages:
- package
- test-package
variables:
DEPS: build-essential git
WANT_BUILD_DEPS: "true"
IMAGE: debian:bullseye
COMMON_BUILD_OPTS: --werror
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y install $DEPS wget ca-certificates gnupg
- echo "deb http://ci.puri.sm/ bullseyeci main" > /etc/apt/sources.list.d/ci.list
- wget -O- https://ci.puri.sm/ci-repo.key | apt-key add -
- apt-get -y update
- apt-get -y build-dep .
- ulimit -c unlimited
.tags: &tags
tags:
- librem5
.build_step: &build_step
script:
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build
- ninja -C _build
build:native:
<<: *tags
image: $IMAGE
stage: build
artifacts:
paths:
- _build
variables:
BUILD_OPTS: -Dgtk_doc=true ${COMMON_BUILD_OPTS}
<<: *build_step
WANT_BUILD_DEPS: "true"
COMMON_BUILD_OPTS: --werror
except:
variables:
- $PKG_ONLY == "1"
image: pureos/byzantium
tags:
- librem5
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y build-dep .
- ulimit -c unlimited
script:
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build
- ninja -C _build
test:native:
<<: *tags
image: $IMAGE
extends: build:native
stage: test
dependencies:
- build:native
script:
- export LC_ALL=C.UTF-8
- xvfb-run ninja -C _build test
except:
variables:
- $PKG_ONLY == "1"
- xvfb-run -s -noreset ninja -C _build test
build-gtkdoc:
<<: *tags
image: $IMAGE
extends: build:native
stage: test
dependencies:
- build:native
<<: *build_step
script:
- ninja -C _build calls-doc
- mv _build/doc/html/ _reference/
artifacts:
paths:
- _reference
except:
variables:
- $PKG_ONLY == "1"
check-po:
<<: *tags
image: $IMAGE
extends: build:native
stage: test
dependencies:
- build:native
......@@ -92,25 +68,46 @@ check-po:
# in this case
- cd po/
- intltool-update -m 2>&1 | grep -qs '/.*\.c' && { intltool-update -m; exit 1; } || exit 0
except:
variables:
- $PKG_ONLY == "1"
package:deb-debian-buster:
extends: .l5-build-debian-package
package:deb-debian-buster:arm64:
# For some reason including https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml fails, therefore it's copied here
.flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
stage: 'package'
interruptible: true
tags:
- librem5:arm64
extends: .l5-build-debian-package
autopkgtest-debian-buster-package:
dependencies:
- package:deb-debian-buster
extends: .l5-autopkgtest-debian-package
- flatpak
script:
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
- flatpak-builder --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
# Generate a Flatpak bundle
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
- tar cf repo.tar repo/
lintian-debian-buster-package:
dependencies:
- package:deb-debian-buster
extends: .l5-lintian-debian-package
artifacts:
name: 'Flatpak artifacts'
expose_as: 'Get Flatpak bundle here'
when: 'always'
paths:
- "${BUNDLE}"
- 'repo.tar'
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt'
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/testlog.txt'
expire_in: 14 days
cache:
key: "$CI_JOB_NAME"
paths:
- '.flatpak-builder/downloads'
- '.flatpak-builder/git'
flatpak:master:
extends: .flatpak
stage: package
variables:
MANIFEST_PATH: "sm.puri.Calls.json"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
FLATPAK_MODULE: "calls"
# Make sure to keep this in sync with the Flatpak manifest, all arguments
# are passed except the config-args because we build it ourselves
MESON_ARGS: ""
APP_ID: "sm.puri.Calls"
BUNDLE: 'calls.flatpak'
Building
========
For build instructions see the README.md
Pull requests
=============
Before filing a pull request run the tests:
```sh
ninja -C _build test
```
Use descriptive commit messages, see
https://wiki.gnome.org/Git/CommitMessages
and check
https://wiki.openstack.org/wiki/GitCommitMessages
for good examples.
Coding Style
============
While much of the original codebase was written using [GNU's Coding Style][1],
please try to follow this document for newly written code.
For existing code you should probably try to not mix different code styles too much.
This coding style is heavily inspired/copied from [phosh's Coding Style][2]
which itself is mostly using [libhandy's Coding Style][3].
These are the differences:
- We're not picky about GTK+ style function argument indentation, that is
having multiple arguments on one line is also o.k.
- For callbacks we additionally allow for the `on_<action>` pattern e.g.
`on_feedback_ended ()` since this helps to keep the namespace
clean.
- Since we're not a library we usually use `G_DEFINE_TYPE` instead of
`G_DEFINE_TYPE_WITH_PRIVATE` (except when we need a deriveable
type) since it makes the rest of the code more compact.
Source file layout
------------------
We use one file per GObject. It should be named like the GObject with
the calls prefix, lowercase and '_' replaced by '-'. So a hypothetical
`CallsThing` would go to `src/calls-thing.c`. The
individual C files should be structured as (top to bottom of file):
- License boilerplate
```c
/*
* Copyright (C) year copyright holder
*
* SPDX-License-Identifier: GPL-3-or-later
* Author: you <youremail@example.com>
*/
```
- A log domain
```C
#define G_LOG_DOMAIN "CallsThing"
```
Usually just the GObject.
- `#include`s:
Calls ones go first, then glib/gtk, then generic C headers. These blocks
are separated by newline and each sorted alphabetically:
```
#define G_LOG_DOMAIN "CallsThing"
#include "calls-things.h"
#include "calls-other-things.h"
#include <gio/gdesktopappinfo.h>
#include <glib/glib.h>
#include <math.h>
```
This helps to detect missing headers in includes.
- docstring
- property enum
```c
enum {
PROP_0,
PROP_FOO,
PROP_BAR,,
LAST_PROP
};
static GParamSpec *props[LAST_PROP];
```
- signal enum
```c
enum {
FOO_HAPPENED,
BAR_TRIGGERED,
N_SIGNALS
};
static guint signals[N_SIGNALS] = { 0 };
```
- type definitions
```c
typedef struct _CallsThing {
GObject parent;
...
} CallsThing;
G_DEFINE_TYPE (CallsThing, calls_thing, G_TYPE_OBJECT)
```
- private methods and callbacks (these can also go at convenient
places above `calls_thing_constructed ()`
- `calls_thing_set_properties ()`
- `calls_thing_get_properties ()`
- `calls_thing_constructed ()`
- `calls_thing_dispose ()`
- `calls_thing_finalize ()`
- `calls_thing_class_init ()`
- `calls_thing_init ()`
- `calls_thing_new ()`
- Public methods, all starting with the object name(i.e. `calls_thing_`)
The reason public methods go at the bottom is that they have declarations in
the header file and can thus be referenced from anywhere else in the source
file.
Try to avoid forward declarations where possible.
[1]: https://www.gnu.org/prep/standards/standards.html#Formatting
[2]: https://source.puri.sm/Librem5/phosh/blob/master/HACKING.md#coding-style
[3]: https://source.puri.sm/Librem5/libhandy/blob/master/HACKING.md#coding-style
......@@ -36,6 +36,12 @@ If using ModemManager, Calls will wait for ModemManager to appear on
D-Bus and then wait for usable modems to appear. The UI will be
inactive and display a status message until a usable modem appears.
When running from the source tree you can use `CALLS_PLUGIN_DIR` environment
varible to specify the directroy from where plugins are loaded. To e.g. load
the dummy plugin from the source tree:
export CALLS_PLUGIN_DIR=_build/plugins/dummy/
_build/src/gnome-calls -p dummy
### oFono
There is also an oFono backend, "ofono". This was the first backend
......
......@@ -6,11 +6,11 @@ Comment=A phone dialer and call handler (daemon mode)
Keywords=Telephone;Call;Phone;Dial;Dialer;PSTN;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=sm.puri.Calls
TryExec=calls
Exec=calls --daemon
TryExec=gnome-calls
Exec=gnome-calls --daemon
Type=Application
StartupNotify=true
NoDisplay=true
Terminal=false
Categories=GNOME;GTK;Telephony;
Categories=Network;GNOME;GTK;Telephony;
X-GNOME-AutoRestart=true
......@@ -6,11 +6,11 @@ Comment=A phone dialer and call handler
Keywords=Telephone;Call;Phone;Dial;Dialer;PSTN;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=sm.puri.Calls
TryExec=calls
Exec=calls %u
TryExec=gnome-calls
Exec=gnome-calls %u
Type=Application
StartupNotify=true
Terminal=false
Categories=GNOME;GTK;Telephony;
Categories=Network;GNOME;GTK;Telephony;
MimeType=x-scheme-handler/tel
X-Purism-FormFactor=Workstation;Mobile;
/usr/share/gtk-doc/html/calls
/etc
/usr/bin
/usr/lib
/usr/share/applications
/usr/share/icons
/usr/share/locale
/usr/share/metainfo
mv_conffile /etc/xdg/autostart/sm.puri.Calls.desktop /etc/xdg/autostart/sm.puri.Calls-daemon.desktop 0.2.0~
gnome-calls (0.3.2-1pureos1~amber1) amber-phone; urgency=medium
* d/patches: Remove upstreamed patches
* d/control: Fix Uploaders field to follow pureOS
* d/control: Add gstreamer1.0-plugins-rtp
-- Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm> Mon, 26 Apr 2021 15:55:38 +0200
gnome-calls (0.3.2-1pureos1) byzantium; urgency=medium
* d/control: Update maintainer field, etc
* d/gbp.conf: Use default upstream-tag
-- Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm> Sat, 24 Apr 2021 00:27:12 +0200
gnome-calls (0.3.2-1) experimental; urgency=medium
* d/patches: Remove upstreamed patches
* d/control: Add gstreamer dependencies
* d/control: Add sofia dependency
* d/control: bump required libhandy to >=1.1.90
* d/salsa-ci.yml: Build against experimental
* d/patches: Don't use DNS lookups during tests
-- Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu> Fri, 23 Apr 2021 15:03:42 +0200
gnome-calls (0.3.0-2pureos2) byzantium; urgency=medium
* d/patches: hang up secondary calls
* Upload to byzantium
-- Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm> Thu, 18 Mar 2021 20:17:00 +0100
gnome-calls (0.3.0-2pureos1~amber1) amber-phone; urgency=medium
* Upload to amber-phone
* debian: Remove calls* files
-- Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm> Sat, 13 Mar 2021 02:54:54 +0100
gnome-calls (0.3.0-2pureos1) byzantium; urgency=medium
* Upload to byzantium
-- Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm> Tue, 16 Feb 2021 03:59:15 +0100
gnome-calls (0.3.0-2) experimental; urgency=medium
* d/patches: fix double free
-- Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu> Tue, 16 Feb 2021 03:35:42 +0100
gnome-calls (0.3.0-1pureos1) byzantium; urgency=medium
* d/gbp.conf: Use 'v%(version)s' upstream tags (debian imports tarballs)
* Upload to byzantium
-- Evangelos Ribeiro Tzaras <evangelos.tzaras@puri.sm> Sun, 14 Feb 2021 15:28:50 +0100
gnome-calls (0.3.0-1) experimental; urgency=medium
* d/gbp.conf: Use default upstream tag format
* d/patches: Remove upstreamed patches
* d: Adjust doc installation directory
-- Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu> Sat, 13 Feb 2021 10:54:04 +0100
gnome-calls (0.2.0-2pureos1~amber2) amber-phone; urgency=medium
* Upload to amber-phone
......
Source: gnome-calls
Section: comm
Priority: optional
Maintainer: DebianOnMobile Maintainers <debian-on-mobile-maintainers@alioth-lists.debian.net>
Uploaders:
Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu>,
Henry-Nicolas Tourneur <debian@nilux.be>,
Maintainer: PureOS Maintainers <pureos-project@lists.puri.sm>
XSBC-Maintainer: DebianOnMobile Maintainers <debian-on-mobile-maintainers@alioth-lists.debian.net>
Uploaders: Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu>, Henry-Nicolas Tourneur <debian@nilux.be>,
Build-Depends:
debhelper-compat (= 12),
desktop-file-utils,
gstreamer1.0-plugins-good,
gtk-doc-tools <!nodoc>,
help2man,
libcallaudio-dev (>= 0.0.5),
......@@ -16,11 +16,13 @@ Build-Depends:
libfolks-dev,
libgom-1.0-dev,
libgsound-dev,
libgstreamer1.0-dev,
libgtk-3-dev,
libgtk-3-doc <!nodoc>,
libhandy-1-dev,
libhandy-1-dev (>=1.1.90),
libmm-glib-dev (>= 1.12.0),
libpeas-dev,
libsofia-sip-ua-glib-dev,
meson,
modemmanager-dev,
pkg-config,
......@@ -31,6 +33,8 @@ Standards-Version: 4.5.1
Homepage: https://source.puri.sm/Librem5/calls
Vcs-Browser: https://source.puri.sm/Librem5/debs/pkg-calls
Vcs-Git: https://source.puri.sm/Librem5/debs/pkg-calls.git
XSBC-Original-Vcs-Browser: https://salsa.debian.org/DebianOnMobile-team/gnome-calls
XSBC-Original-Vcs: https://salsa.debian.org/DebianOnMobile-team/gnome-calls.git
Rules-Requires-Root: no
Package: gnome-calls
......@@ -39,6 +43,8 @@ Breaks: calls (<< 0.2.0)
Architecture: any
Depends:
callaudiod,
gstreamer1.0-plugins-good,
gstreamer1.0-plugins-rtp,
modemmanager,
${misc:Depends},
${shlibs:Depends},
......
......@@ -3,7 +3,7 @@ debian-branch = pureos/amber-phone
debian-tag = pureos/%(version)s
debian-tag-msg = %(pkg)s v%(version)s
upstream-branch = upstream/latest
upstream-tag = v%(version)s
[tag]
sign-tags = true
/usr/share/gtk-doc/html/gnome-calls
/usr/share/gtk-doc/html/calls
Subject: Fix missing main category from desktop file
From: Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu>
* data/sm.puri.Calls.desktop: Added Network main category
--- a/data/sm.puri.Calls-daemon.desktop.in
+++ b/data/sm.puri.Calls-daemon.desktop.in
@@ -12,5 +12,5 @@
StartupNotify=true
NoDisplay=true
Terminal=false
-Categories=GNOME;GTK;Telephony;
+Categories=Network;GNOME;GTK;Telephony;
X-GNOME-AutoRestart=true
--- a/data/sm.puri.Calls.desktop.in
+++ b/data/sm.puri.Calls.desktop.in
@@ -11,6 +11,6 @@
Type=Application
StartupNotify=true
Terminal=false
-Categories=GNOME;GTK;Telephony;
+Categories=Network;GNOME;GTK;Telephony;
MimeType=x-scheme-handler/tel
X-Purism-FormFactor=Workstation;Mobile;
From: Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu>
Subject: Do not use DNS lookups during tests
--- a/tests/test-sip.c
+++ b/tests/test-sip.c
@@ -263,13 +263,13 @@
g_object_get (fixture->origin_alice,
"local-port", &local_port_alice,
NULL);
- address_alice = g_strdup_printf ("sip:alice@localhost:%d",
+ address_alice = g_strdup_printf ("sip:alice@127.0.0.1:%d",
local_port_alice);
g_object_get (fixture->origin_bob,
"local-port", &local_port_bob,
NULL);
- address_bob = g_strdup_printf ("sip:bob@localhost:%d",
+ address_bob = g_strdup_printf ("sip:bob@127.0.0.1:%d",
local_port_bob);
/* Case 1: Bob calls Alice, Alice rejects call */
Subject: Rename binary from 'calls' to 'gnome-calls'
From: Evangelos Ribeiro Tzaras <devrtz-debian@fortysixandtwo.eu>
* src/meson.build: Renamed executable
* data/sm.puri.Calls.desktop: Changed Exec and TryExec to reflect the new name
--- a/src/meson.build
+++ b/src/meson.build
@@ -120,7 +120,7 @@
)
executable (
- 'calls',
+ 'gnome-calls',
calls_sources, calls_enum_sources, calls_resources,
wl_proto_sources, wayland_sources, 'main.c',
dependencies : calls_deps,
--- a/data/sm.puri.Calls.desktop.in
+++ b/data/sm.puri.Calls.desktop.in
@@ -6,8 +6,8 @@
Keywords=Telephone;Call;Phone;Dial;Dialer;PSTN;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=sm.puri.Calls
-TryExec=calls
-Exec=calls %u
+TryExec=gnome-calls
+Exec=gnome-calls %u
Type=Application
StartupNotify=true
Terminal=false
--- a/data/sm.puri.Calls-daemon.desktop.in
+++ b/data/sm.puri.Calls-daemon.desktop.in
@@ -6,8 +6,8 @@
Keywords=Telephone;Call;Phone;Dial;Dialer;PSTN;
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=sm.puri.Calls
-TryExec=calls
-Exec=calls --daemon
+TryExec=gnome-calls
+Exec=gnome-calls --daemon
Type=Application
StartupNotify=true
NoDisplay=true
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -41,7 +41,7 @@
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gi')),
'--extra-dir=@0@'.format(join_paths(glib_docpath, 'gtk3')),
],
- install_dir: 'calls',
+ install_dir: 'gnome-calls',
install: true)
endif
From eaed62151bd533a4021ba937a959464383ddc0cb Mon Sep 17 00:00:00 2001
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Date: Tue, 12 Jan 2021 18:40:12 +0100
Subject: [PATCH 1/2] call-display: update libcallaudio API calls
Upstream modified the async API, make sure we use it.
---
src/calls-call-display.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/calls-call-display.c b/src/calls-call-display.c
index 7d17772..2bfb8fc 100644
--- a/src/calls-call-display.c
+++ b/src/calls-call-display.c
@@ -211,7 +211,7 @@ stop_timeout (CallsCallDisplay *self)
static void
-select_mode_complete (gboolean success, GError *error)
+select_mode_complete (gboolean success, GError *error, gpointer data)
{
if (error)