Commit 7bbc021d authored by Guido Gunther's avatar Guido Gunther
Browse files

Merge remote-tracking branch 'origin/debian/master' into debian/master

parents 97fa808e 76fec3d1
......@@ -7,6 +7,7 @@ vgdump
*~
\#*#
.\#*
/subprojects/glib
/subprojects/libhandy
.vscode/
*.gcov
......
......@@ -5,22 +5,22 @@ stages:
- build
- test+docs
- package
- deploy
variables:
DEPS: build-essential git wget gcovr
EXP_DEPS: libhandy-1-dev/experimental libhandy-1-0/experimental gir1.2-handy-1/experimental libgladeui-common/experimental
WANT_BUILD_DEPS: "true"
DEBIAN_IMAGE: $CI_REGISTRY/world/phosh/phosh/debian:v0.0.20210803
DEBIAN_CROSS_IMAGE: $CI_REGISTRY/world/phosh/phosh/debian-cross:v0.0.20210803
XVFB_RUN: xvfb-run -a -s -noreset
COMMON_BUILD_OPTS: -Db_coverage=true --werror
ALPINE_EDGE_DEPS: alpine-sdk elogind-dev feedbackd-dev gcr-dev git glib-dev gnome-desktop-dev
gtk+3.0-dev libhandy1-dev gcr-dev libsecret-dev gcovr linux-pam-dev
ALPINE_EDGE_DEPS: alpine-sdk callaudiod-dev elogind-dev feedbackd-dev gcr-dev git glib-dev gnome-desktop-dev
gtk+3.0-dev libgudev-dev libhandy1-dev gcr-dev libsecret-dev gcovr linux-pam-dev
meson musl-dev networkmanager-dev ninja polkit-elogind-dev pulseaudio-dev
upower-dev wayland-dev wayland-protocols
.bullseye_vars: &bullseye_vars
variables:
DIST: bullseye
BUILD_OPTS: -Dphoc_tests=enabled -Dgtk_doc=true ${COMMON_BUILD_OPTS}
BUILD_OPTS: -Dphoc_tests=enabled -Dg_tests=true ${COMMON_BUILD_OPTS}
.build_step: &build_step
script:
......@@ -35,43 +35,9 @@ variables:
- ${XVFB_RUN} ninja -C _build test
- ninja -C _build coverage
# For the smoke tests we also want debug packages, phoc,
# weston-info, gdb, valgrind, ...
.smoketest_vars:
variables: &smoketest_vars
DIST: bullseye
DEPS: phoc wget gnome-session-bin gdb weston valgrind
libhandy-1-0-dbgsym libgtk-3-0-dbgsym libglib2.0-0-dbgsym
dconf-gsettings-backend-dbgsym libfeedback-0.0-0-dbgsym
xvfb imagemagick
EXP_DEPS: libhandy-1-0-dbgsym/experimental-debug libhandy-1-0/experimental
WANT_BUILD_DEPS: "false"
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y install wget ca-certificates gnupg eatmydata
- echo "deb http://debug.mirrors.debian.org/debian-debug/ ${DIST}-debug main" > /etc/apt/sources.list.d/debug.list
- echo "deb http://debug.mirrors.debian.org/debian-debug/ experimental-debug main" >> /etc/apt/sources.list.d/debug.list
- echo "deb http://deb.debian.org/debian/ experimental main" > /etc/apt/sources.list.d/exp.list
- eatmydata apt-get -y update
- eatmydata apt-get -y install $EXP_DEPS
- '[ "$WANT_BUILD_DEPS" != "true" ] || eatmydata apt-get -y build-dep .'
- eatmydata apt-get -y install $DEPS
# Forecully drop lcov so gcovr is used
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818
- eatmydata dpkg --force-depends --remove lcov
- ulimit -c unlimited
.tags: &tags
tags:
- librem5
build:native-debian-bullseye:
<<: *tags
stage: build
image: debian:bullseye
image: ${DEBIAN_IMAGE}
<<: *bullseye_vars
<<: *build_step
artifacts:
......@@ -81,29 +47,16 @@ build:native-debian-bullseye:
variables:
- $PKG_ONLY == "1"
# Build for 32bit architecture to catch common errors
build:cross-debian-bullseye:i386:
<<: *tags
stage: build
image: debian:bullseye
image: "${DEBIAN_CROSS_IMAGE}"
allow_failure: true
variables:
EXP_DEPS: libhandy-1-dev:i386/experimental libhandy-1-0:i386/experimental gir1.2-handy-1:i386/experimental
before_script:
- export DEBIAN_FRONTEND=noninteractive
- echo "deb [arch=i386] http://deb.debian.org/debian/ testing main" > /etc/apt/sources.list.d/i386.list
- echo "deb [arch=amd64 arch=i386] http://deb.debian.org/debian/ experimental main" >> /etc/apt/sources.list.d/exp.list
- apt-get -y update
- apt-get -y install eatmydata
- dpkg --add-architecture i386
- eatmydata apt-get -y update
- eatmydata apt-get -y -o APT::Immediate-Configure=false install $EXP_DEPS
- DEB_BUILD_PROFILES=nodoc,nocheck eatmydata apt-get -y -a i386 -o APT::Immediate-Configure=false build-dep .
- eatmydata apt-get -y install $DEPS crossbuild-essential-i386
script:
- git submodule update --recursive
- 'echo "Build opts: ${BUILD_OPTS}"'
- 'echo "Build opts: ${COMMON_BUILD_OPTS}"'
- /usr/share/meson/debcrossgen --arch i386 -o cross-i386.txt
- meson ${BUILD_OPTS} . _build --cross-file cross-i386.txt
- meson ${COMMON_BUILD_OPTS} . _build --cross-file cross-i386.txt
- ninja -C _build
artifacts:
paths:
......@@ -113,9 +66,8 @@ build:cross-debian-bullseye:i386:
- $PKG_ONLY == "1"
unit-test:native-debian-bullseye:
<<: *tags
stage: test+docs
image: debian:bullseye
image: ${DEBIAN_IMAGE}
needs:
- build:native-debian-bullseye
<<: *bullseye_vars
......@@ -130,13 +82,16 @@ unit-test:native-debian-bullseye:
- $PKG_ONLY == "1"
build-gtkdoc:
<<: *tags
image: debian:bullseye
stage: test+docs
needs:
- build:native-debian-bullseye
<<: *bullseye_vars
image: ${DEBIAN_IMAGE}
variables:
DIST: bullseye
BUILD_OPTS: -Dgtk_doc=true ${COMMON_BUILD_OPTS}
script:
- git clean -dfx
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build
- ninja -C _build
- tools/doc-check
- mv _build/docs/html/ _reference/
artifacts:
......@@ -147,14 +102,14 @@ build-gtkdoc:
- $PKG_ONLY == "1"
check-po:
<<: *tags
stage: test+docs
image: debian:bullseye
needs:
- build:native-debian-bullseye
image: ${DEBIAN_IMAGE}
before_script:
- apt-get -y update
- apt-get -y install intltool gettext
- eatmydata apt-get -y -f install
- eatmydata apt-get -y update
- eatmydata apt-get -y install intltool gettext
<<: *bullseye_vars
script:
- tools/check-po
......@@ -163,11 +118,10 @@ check-po:
- $PKG_ONLY == "1"
check-license-headers:
<<: *tags
stage: test+docs
image: debian:bullseye
needs:
- build:native-debian-bullseye
image: ${DEBIAN_IMAGE}
<<: *bullseye_vars
script:
# Checks .c and .h files begin with a license header as
......@@ -178,7 +132,6 @@ check-license-headers:
- $PKG_ONLY == "1"
build:native-alpinelinux-edge:
<<: *tags
stage: build
image: alpine:edge
allow_failure: true
......@@ -197,7 +150,6 @@ build:native-alpinelinux-edge:
- $PKG_ONLY == "1"
unit-test:native-alpinelinux-edge:
<<: *tags
stage: test+docs
image: alpine:edge
allow_failure: true
......@@ -218,10 +170,22 @@ unit-test:native-alpinelinux-edge:
- $PKG_ONLY == "1"
package:deb-pureos-byzantium:arm64:
tags:
- librem5:arm64
before_script: []
variables:
L5_DOCKER_IMAGE: pureos/byzantium
DEB_BUILD_PROFILES: nodoc
extends: .l5-build-debian-package
tags:
- aarch64
pages:
stage: deploy
needs:
- build-gtkdoc
script:
- mv _reference/ public/
artifacts:
paths:
- public
only:
- main
### Checklist for Updating the Docker Images
- [ ] Update the `${image}.Dockerfile` file with the dependencies
- [ ] Run `./run-docker.sh build --base ${image} --version ${number}`
- [ ] Run `./run-docker.sh push --base ${image} --version ${number}`
once the Docker image is built; you may need to log in by using
`docker login` or `podman login` like
podman login -u <user> -p <token> https://registry.gitlab.gnome.org/guidog/phosh
See https://docs.gitlab.com/ee/user/packages/container_registry/
- [ ] Update the `image` keys in the `.gitlab-ci.yml` file with the new
image tag
- [ ] Open a merge request with your changes and let it run
FROM debian:bullseye-slim
RUN export DEBIAN_FRONTEND=noninteractive \
&& dpkg --add-architecture i386 \
&& echo "deb [arch=i386] http://deb.debian.org/debian/ testing main" > /etc/apt/sources.list.d/i386.list \
&& echo "deb [arch=amd64 arch=i386] http://deb.debian.org/debian/ experimental main" >> /etc/apt/sources.list.d/exp.list \
&& apt-get -y update \
&& apt-get -y install --no-install-recommends eatmydata \
&& eatmydata apt-get -y -o APT::Immediate-Configure=false install libhandy-1-dev:i386/experimental libhandy-1-0:i386/experimental gir1.2-handy-1:i386/experimental libgladeui-common/experimental \
&& cd /home/user/app \
&& DEB_BUILD_PROFILES=nodoc,nocheck eatmydata apt-get -y --no-install-recommends -a i386 -o APT::Immediate-Configure=false build-dep . \
&& eatmydata apt-get -y install --no-install-recommends git wget crossbuild-essential-i386 \
&& eatmydata apt-get clean \
&& rm -rf /var/lib/apt/lists/*
FROM debian:bullseye-slim
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y update \
&& apt-get -y install --no-install-recommends wget ca-certificates gnupg eatmydata \
&& echo "deb http://deb.debian.org/debian/ experimental main" > /etc/apt/sources.list.d/exp.list \
&& eatmydata apt-get -y update \
&& eatmydata apt-get --no-install-recommends -y install libhandy-1-dev/experimental libhandy-1-0/experimental gir1.2-handy-1/experimental libgladeui-common/experimental \
&& cd /home/user/app \
&& eatmydata apt-get --no-install-recommends -y build-dep . \
&& eatmydata apt-get --no-install-recommends -y install build-essential git wget gcovr \
&& eatmydata apt-get clean \
&& eatmydata dpkg --force-depends --remove lcov
#!/bin/bash
read_arg() {
# $1 = arg name
# $2 = arg value
# $3 = arg parameter
local rematch='^[^=]*=(.*)$'
if [[ $2 =~ $rematch ]]; then
read "$1" <<< "${BASH_REMATCH[1]}"
else
read "$1" <<< "$3"
# There is no way to shift our callers args, so
# return 1 to indicate they should do it instead.
return 1
fi
}
set -e
build=0
run=0
push=0
list=0
print_help=0
no_login=0
while (($# > 0)); do
case "${1%%=*}" in
build) build=1;;
run) run=1;;
push) push=1;;
list) list=1;;
help) print_help=1;;
--base|-b) read_arg base "$@" || shift;;
--version|-v) read_arg base_version "$@" || shift;;
--no-login) no_login=1;;
*) echo -e "\e[1;31mERROR\e[0m: Unknown option '$1'"; exit 1;;
esac
shift
done
if [ $print_help == 1 ]; then
echo "$0 - Build and run Docker images"
echo ""
echo "Usage: $0 <command> [options] [basename]"
echo ""
echo "Available commands"
echo ""
echo " build --base=<BASENAME> - Build Docker image <BASENAME>.Dockerfile"
echo " run --base=<BASENAME> - Run Docker image <BASENAME>"
echo " push --base=<BASENAME> - Push Docker image <BASENAME> to the registry"
echo " list - List available images"
echo " help - This help message"
echo ""
exit 0
fi
cd "$(dirname "$0")"
if [ $list == 1 ]; then
echo "Available Docker images:"
for f in *.Dockerfile; do
filename=$( basename -- "$f" )
basename="${filename%.*}"
echo -e " \e[1;39m$basename\e[0m"
done
exit 0
fi
# All commands after this require --base to be set
if [ -z $base ]; then
echo "Usage: $0 <command>"
exit 1
fi
if [ ! -f "$base.Dockerfile" ]; then
echo -e "\e[1;31mERROR\e[0m: Dockerfile for '$base' not found"
exit 1
fi
if [ -z $base_version ]; then
base_version="latest"
elif [ $base_version != "latest" ]; then
base_version="v$base_version"
fi
if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
# Docker is actually implemented by podman, and its OCI output
# is incompatible with some of the dockerd instances on GitLab
# CI runners.
echo "Using: Podman"
format="--format docker"
CMD="podman"
else
echo "Using: Docker"
format=""
CMD="sudo docker"
fi
REGISTRY="registry.gitlab.gnome.org"
REPO="world/phosh/phosh"
TAG="${REGISTRY}/${REPO}/${base}:${base_version}"
if [ $build == 1 ]; then
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
${CMD} build \
${format} \
--volume "$(pwd)/..:/home/user/app" \
--build-arg HOST_USER_ID="$UID" \
--tag "${TAG}" \
--file "${base}.Dockerfile" .
exit $?
fi
if [ $push == 1 ]; then
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
if [ $no_login == 0 ]; then
${CMD} login ${REGISTRY}
fi
${CMD} push ${TAG}
exit $?
fi
if [ $run == 1 ]; then
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
${CMD} run \
--rm \
--volume "$(pwd)/..:/home/user/app" \
--workdir "/home/user/app" \
--tty \
--interactive "${TAG}" \
bash
exit $?
fi
[submodule "subprojects/gvc"]
path = subprojects/gvc
url = https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
[submodule "subprojects/libcall-ui"]
path = subprojects/libcall-ui
url = https://gitlab.gnome.org/guidog/libcall-ui.git
......@@ -120,4 +120,33 @@ individual C files should be structured as (top to bottom of file):
the header file and can thus be referenced from anywhere else in the source
file.
[1]: https://source.puri.sm/Librem5/libhandy/blob/master/HACKING.md#coding-style
CSS Theming
===========
For custom widget always set the css name using `gtk_widget_class_set_css_name ()`.
There's no need set an (additional) style class in the ui file.
*Good*:
```c
static void
phosh_lockscreen_class_init (PhoshLockscreenClass *klass)
{
gtk_widget_class_set_css_name (widget_class, "phosh-lockscreen");
}
```
*Bad*:
```xml
<template class="PhoshLockscreen" parent="…">
<style>
<class name="phosh-lockscreen"/>
</style>
</template>
```
[1]: https://gitlab.gnome.org/GNOME/libhandy/blob/master/HACKING.md#coding-style
phosh 0.13.0
------------
Released: August 2021
* torch: Use logind for torch brightness. This obsoletes any upower changes.
(Arnaud Ferraris)
* Support hight contrast mode (David Hamner, Guido Günther)
* ci: Use prebuilt docker images in CI to speedup builds and save resources
(Guido Günther)
* lockscreen: Handle incoming phone calls (Guido Günther)
* backrounds: Handle fractional scaling (Guido Günther)
* notifications: Look at category for notification feedback
* lockscreen: Display notification summary and handle global
"show-in-lock-screen" toggle (Guido Günther)
* panel: Fix power menu close on tap (Mohammed Sadiq)
* quick settings: Cycle through all feedback settings instead of only
full / silent (Pablo Correa Gomez)
* Migrate to GNOME World (Guido Günther)
* UI translations:
Anders Jonsson (sv)
Efstathios Iosifidis (el)
Rafael Fontenelle (pt_BR)
Vittorio Monti (it)
Yuri Chornoivan (uk)
Мирослав Николић (sr)
phosh 0.12.1
------------
Released: July 2021
* Fix defaults for favorites
* Append 'Phosh' to XDG_CURRENT_DESKOP for the system unit too so overrides get
applied even when not using a display manager
* Bring search bar closer to designs again
* Simplify tests and test calls-manager. Fix leaks spotted by those.
* Don't claim accelerometer when rotation lock is on reducing iio-sensor-proxy
wakeups considerably
* i18n updates: uk, it, sv
phosh 0.12.0
------------
Released: June 2021
......
......@@ -9,7 +9,7 @@ phosh is licensed under the GPLv3+.
## Getting the source
```sh
git clone https://source.puri.sm/Librem5/phosh
git clone https://gitlab.gnome.org/World/Phosh/phosh
cd phosh
```
......@@ -26,7 +26,7 @@ On a Debian based system run
For an explicit list of dependencies check the `Build-Depends` entry in the
[debian/control][] file.
If your distro doesn't ship [libhandy](https://source.puri.sm/Librem5/libhandy)
If your distro doesn't ship [libhandy](https://gitlab.gnome.org/GNOME/libhandy)
you need to build that from source. More details are in the [gitlab-ci.yml][]
file.
......@@ -102,13 +102,17 @@ This is handled via GNOMEs infra, see
<https://l10n.gnome.org/module/phosh/>.
# Getting in Touch
* Issue tracker: https://source.puri.sm/Librem5/phosh
* Issue tracker: https://gitlab.gnome.org/World/Phosh/phosh/issues
* Mailing list: https://lists.community.puri.sm/listinfo/librem-5-dev
* Matrix: https://im.puri.sm/#/room/#phosh:talk.puri.sm
* XMPP: phosh@conference.sigxcpu.org
For details see the [developer documentation](https://developer.puri.sm/Contact.html).
[gitlab-ci.yml]: https://source.puri.sm/Librem5/phosh/blob/master/.gitlab-ci.yml
[debian/control]: https://source.puri.sm/Librem5/phosh/blob/master/debian/control
[phoc]: https://source.puri.sm/Librem5/phoc
### Development Documentation
API documentation is at https://world.pages.gitlab.gnome.org/Phosh/phosh
[gitlab-ci.yml]: https://gitlab.gnome.org/World/Phosh/phosh/blob/master/.gitlab-ci.yml
[debian/control]: https://gitlab.gnome.org/World/Phosh/phosh/blob/master/debian/control
[phoc]: https://gitlab.gnome.org/World/Phosh/phoc
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="16"
height="16"
version="1.1"
id="svg8"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs12" />
<path
style="color:#000000;display:inline;fill:#2e3436;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:26.4;-inkscape-stroke:none;enable-background:new"
d="M 6,1 C 4.909298,1 4,1.90929 4,3 v 10 c 0,1.0907 0.909298,2 2,2 h 4 c 1.090701,0 2,-0.9093 2,-2 V 3 C 12,1.90929 11.090701,1 10,1 Z m 0,2 h 4 V 13 H 6 Z"
id="rect20347" />
<path
style="color:#000000;display:inline;fill:#2e3436;enable-background:new"
d="m 2,4 v 8 H 3 V 4 Z"
id="path20466" />
<path
style="color:#000000;display:inline;fill:#2e3436;enable-background:new"
d="m 0,6 v 4 H 1 V 6 Z"
id="path20584" />
<path
style="color:#000000;display:inline;fill:#2e3436;enable-background:new"
d="m 15,6 v 4 h 1 V 6 Z"
id="path21875" />
<path
style="color:#000000;display:inline;fill:#2e3436;enable-background:new"
d="m 13,4 v 8 h 1 V 4 Z"
id="path21877" />
</svg>
[Unit]
Description=Phosh, a shell for mobile phones
Documentation=https://source.puri.sm/Librem5/phosh
Documentation=https://gitlab.gnome.org/World/Phosh/phosh
# Make sure we are started after logins are permitted.
After=systemd-user-sessions.service
......@@ -26,7 +26,7 @@ ConditionPathExists=/dev/tty0
[Service]
Environment=LANG=C.UTF-8
Environment=XDG_CURRENT_DESKTOP=GNOME
Environment=XDG_CURRENT_DESKTOP=GNOME:Phosh
Environment=XDG_SESSION_DESKTOP=phosh
Environment=XDG_SESSION_TYPE=wayland
ExecStart=/usr/bin/phosh
......
......@@ -2,9 +2,10 @@
<schema id="sm.puri.phosh"
path="/sm/puri/phosh/">
<key name="favorites" type="as">
<default>[ 'gnome-control-center.desktop',
'org.gnome.zbrown.KingsCross.desktop',
'org.postmarketos.Megapixels.desktop'
<default>[ 'org.gnome.Calls.desktop',
'sm.puri.Chatty.desktop',
'org.gnome.Epiphany.desktop',
'org.gnome.Contacts.desktop'
]</default>
<summary>List of desktop file IDs for favorite applications</summary>
<description>
......
......@@ -2,7 +2,7 @@
[Unit]
Description=Phosh, a shell for mobile phones
Documentation=https://source.puri.sm/Librem5/phosh
Documentation=https://gitlab.gnome.org/World/Phosh/phosh
After=gnome-session-manager.target
......
phosh (0.13.0-1) UNRELEASED; urgency=medium
[ Guido Günther ]
* debian: Add breaks relationship on older calls.
This makes sure calls we don't try to run against a calls without
the DBus interface.
* d/control: Bump phoc recommends.
Recommend a version that allows us to bind all the interesting
keys.
* d/control: Bump breaks on gnome-calls.
Not strictly necessary but makes missing deps easier to detect.
[ Arnaud Ferraris ]
* New upstream version 0.13.0
* d/control: add build dependency on libgudev.
This is required by the new torch manager implementation.
* d/control: drop duplicate Homepage field
* d/control: drop Build-Depends on linux-libc-dev.
This is a downstream change, causing the arm64 build to fail on Debian
as our most recent kernel is 5.10.x.
* d/watch: update to reflect migration to GNOME infrastructure
-- Arnaud Ferraris <arnaud.ferraris@collabora.com> Tue, 10 Aug 2021 11:17:12 +0200
phosh (0.12.0-1) experimental; urgency=medium
* New usptream version 0.12.0
......
......@@ -6,6 +6,7 @@ Uploaders: Arnaud Ferraris <arnaud.ferraris@gmail.com>
Build-Depends:
debhelper-compat (= 13),
gtk-doc-tools <!nodoc>,
libcallaudio-dev,
libsecret-1-dev,
libsystemd-dev,
libfeedback-dev,
......@@ -14,6 +15,7 @@ Build-Depends:
libgnome-desktop-3-dev,
libgtk-3-dev,
libgt