Skip to content
Commits on Source (200)
......@@ -2,10 +2,10 @@
#
# This is a bit complicated for two reasons:
# - we really want to run dnf/apt/... only once, updating on the test runner for
# each job takes forever. So we create a docker image for each distribution
# tested, then run the tests on this docker image.
# each job takes forever. So we create a container image for each distribution
# tested, then run the tests on this container image.
#
# Creating a docker image is time-consuming, so we only do so for pushes to
# Creating a container image is time-consuming, so we only do so for pushes to
# libinput directly (not merge requests) and if the current image is 'old'.
#
# - GitLab only allows one script: set per job but we have a bunch of commands
......@@ -24,11 +24,25 @@
# <distribution>:<version>@activity:
# e.g. fedora:29@build-default
include:
# Arch container builder template
- project: 'wayland/ci-templates'
ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
file: '/templates/arch.yml'
# Fedora container builder template
- project: 'wayland/ci-templates'
ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
file: '/templates/fedora.yml'
# Ubuntu container builder template
- project: 'wayland/ci-templates'
ref: c73dae8b84697ef18e2dbbf4fed7386d9652b0cd # see https://docs.gitlab.com/ee/ci/yaml/#includefile
file: '/templates/ubuntu.yml'
stages:
- docker_check # check if the current docker images are up to date
- docker_prep # rebuild the docker images if previous step failed
- container_prep # rebuild the container images if there is a change
- build # for actually building things
- deploy # trigger wayland's website generation
- container_clean # clean up unused container images
variables:
###############################################################################
......@@ -41,24 +55,39 @@ variables:
# See the documentation here: #
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
###############################################################################
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark valgrind libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
UBUNTU_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme valgrind libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark valgrind libwacom gtk3 mtdev '
FEDORA_RPMS: 'git gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark libwacom-devel cairo-devel gtk3-devel glib2-devel mtdev-devel'
UBUNTU_CUSTOM_DEBS: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
ARCH_PKGS: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark python-sphinx_rtd_theme libwacom gtk3 mtdev diffutils'
FREEBSD_BUILD_PKGS: 'meson'
FREEBSD_PKGS: 'libepoll-shim libudev-devd libevdev libwacom gtk3 libmtdev '
############################ end of package lists #############################
# these tags should be updated each time the list of packages is updated
# changing these will force rebuilding the associated image
# Note: these tags have no meaning and are not tied to a particular
# libinput version
FEDORA_TAG: '2019-03-15.0'
UBUNTU_TAG: '2019-03-15.0'
ARCH_TAG: '2019-04-14.0'
FREEBSD_TAG: '2019-03-15.0'
UBUNTU_EXEC: "bash .gitlab-ci/ubuntu_install.sh $UBUNTU_CUSTOM_DEBS"
UPSTREAM_REPO: libinput/libinput
BUILDAH_IMAGE: $CI_REGISTRY/wayland/ci-templates/buildah:latest
FEDORA_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/fedora/$FEDORA_VERSION:$FEDORA_TAG
UBUNTU_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/ubuntu/$UBUNTU_VERSION:$UBUNTU_TAG
ARCH_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/archlinux/rolling:$ARCH_TAG
FREEBSD_CONTAINER_IMAGE: $CI_REGISTRY_IMAGE/freebsd/11.2:$FREEBSD_TAG
MESON_BUILDDIR: "build dir"
NINJA_ARGS: 'test'
MESON_ARGS: ''
FEDORA_DOCKER_IMAGE: $CI_REGISTRY/libinput/$CI_PROJECT_NAME/fedora/$FEDORA_VERSION
UBUNTU_DOCKER_IMAGE: $CI_REGISTRY/libinput/$CI_PROJECT_NAME/ubuntu/$UBUNTU_VERSION
ARCH_DOCKER_IMAGE: $CI_REGISTRY/libinput/$CI_PROJECT_NAME/arch/rolling
FREEBSD_DOCKER_IMAGE: $CI_REGISTRY/libinput/$CI_PROJECT_NAME/freebsd/11.2
# Until we have a VM with full access, we cannot run the test suite runner
SKIP_LIBINPUT_TEST_SUITE_RUNNER: 1
# When using docker-in-docker (dind), it's wise to use the overlayfs driver
# for improved performance.
DOCKER_DRIVER: overlay2
# udev isn't available/working properly in the containers
UDEV_NOT_AVAILABLE: 1
GIT_DEPTH: 1
.default_artifacts: &default_artifacts
......@@ -77,374 +106,148 @@ variables:
- meson configure "$MESON_BUILDDIR"
- ninja -C "$MESON_BUILDDIR" $NINJA_ARGS
# special rule to not expose the docker creation runners to other users
# than those who have set up the CI to push on the registry.
# Users who have write access to libinput/libinput will have write
# access to the registry, so the libinput/libinput is a catch-all for
# our core developers.
#
# we can add as many users as we want by adding a new line like:
# - $GITLAB_USER_LOGIN == "someone"
.restrict_docker_creation: &restrict_docker_creation
only:
variables:
# Note: this is a set of logical OR, not AND
- $CI_PROJECT_PATH == "libinput/libinput"
#################################################################
# #
# docker check stage #
# #
#################################################################
# we need a minimalist image capable of skopeo, curl, jq, date and
# test. Instead of using a full fedora and install the dependencies,
# we can build an alpine container through buildah with the following
# script:
# -----
# #!/bin/bash
#
# # build container
#
# buildcntr1=$(buildah from golang:alpine)
# buildmnt1=$(buildah mount $buildcntr1)
#
# buildah run $buildcntr1 apk add --update \
# --no-cache \
# --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
# --allow-untrusted \
# git make gcc musl-dev glib-dev ostree-dev \
# gpgme-dev linux-headers btrfs-progs-dev \
# libselinux-dev lvm2-dev
# buildah run $buildcntr1 git clone https://github.com/projectatomic/skopeo.git /go/src/skopeo
# buildah config --workingdir /go/src/skopeo $buildcntr1
# buildah run $buildcntr1 go get -d -v ./...
# buildah run $buildcntr1 make binary-local
#
#
# buildcntr2=$(buildah from alpine:latest)
# buildmnt2=$(buildah mount $buildcntr2)
# buildah run $buildcntr2 apk add --update \
# --no-cache \
# --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ \
# --allow-untrusted \
# jq curl glib gpgme ostree lvm2 libselinux
# cp $buildmnt1/go/src/skopeo/skopeo $buildmnt2/usr/bin/skopeo
#
# buildah unmount $buildcntr2
# buildah commit $buildcntr2 docker://registry.freedesktop.org/libinput/libinput/skopeo:latest
#
# #clean up build
#
# buildah rm $buildcntr1 $buildcntr2
# -----
.docker-check: &docker_check
stage: docker_check
image: registry.freedesktop.org/libinput/libinput/skopeo:latest
script:
# get the full docker image name (CURRENT_DOCKER_IMAGE still has indirections)
- DOCKER_IMAGE=$(eval echo "$CURRENT_DOCKER_IMAGE")
# get the date of the current image
- IMG_DATE=$(skopeo inspect docker://$DOCKER_IMAGE | jq -r '.Created' | cut -dT -f1)
- TODAY_SECS=$(date -u +%s)
- IMG_SECS=$(date -u --date="$IMG_DATE" +%s)
- echo "today $TODAY_SECS, image $IMG_SECS"
- echo "image age $(($TODAY_SECS - $IMG_SECS))s"
# check if image is less than a week old
- test $(($IMG_SECS + 604800)) -gt $TODAY_SECS
# export an artefact telling the next stage that the image is valid
- touch .img_ready
artifacts:
name: image-$CURRENT_DOCKER_IMAGE-check
expire_in: 6 hrs
paths:
- .img_ready
allow_failure: true
<<: *restrict_docker_creation
# TODO: check that the RPMS/DEBS are all in the current images
fedora:28@docker-check:
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 28
CURRENT_DOCKER_IMAGE: $FEDORA_DOCKER_IMAGE:latest
<<: *docker_check
fedora:29@docker-check:
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 29
CURRENT_DOCKER_IMAGE: $FEDORA_DOCKER_IMAGE:latest
<<: *docker_check
ubuntu:17.10@docker-check:
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "17.10"
CURRENT_DOCKER_IMAGE: $UBUNTU_DOCKER_IMAGE:latest
<<: *docker_check
ubuntu:18.04@docker-check:
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "18.04"
CURRENT_DOCKER_IMAGE: $UBUNTU_DOCKER_IMAGE:latest
<<: *docker_check
arch:rolling@docker-check:
variables:
GIT_STRATEGY: none
CURRENT_DOCKER_IMAGE: $ARCH_DOCKER_IMAGE:latest
<<: *docker_check
freebsd:11.2@docker-check:
variables:
GIT_STRATEGY: none
CURRENT_DOCKER_IMAGE: $FREEBSD_DOCKER_IMAGE:latest
<<: *docker_check
#################################################################
# #
# docker prep stage #
# container prep stage #
# #
#################################################################
#
# This stage will recreate the docker images only if the previous
# stage had a build failure, i.e. the image is too old or if it is
# missing some dependencies.
# This stage will recreate the container images only if the image
# is too old or if it is missing some dependencies.
#
.fedora@docker-prep: &fedora_docker_prep
stage: docker_prep
image: docker:stable
services:
- docker:dind
script:
# if the check was successful, we just skip recreating the docker image
- test -e .img_ready && exit 0
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
.pull_upstream_or_rebuild: &pull_upstream_or_rebuild
before_script:
# log in to the registry
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# create a Dockerfile with our dependencies
- echo "FROM fedora:$FEDORA_VERSION" > Dockerfile
- echo "WORKDIR /app" >> Dockerfile
- echo "RUN dnf upgrade -y ; dnf clean all" >> Dockerfile
- echo "RUN dnf install -y $FEDORA_RPMS ; dnf clean all" >> Dockerfile
# get the full container image name (DISTRIB_VERSION still has indirections)
- IMAGE=$(eval echo "$DISTRIB_FLAVOR/$DISTRIB_VERSION:$TAG")
# create the docker image
- docker build --tag $FEDORA_DOCKER_IMAGE:latest --tag $FEDORA_DOCKER_IMAGE:$CI_JOB_ID .
- |
# force rebuild if schedule, reuse otherwise
if [[ $CI_PIPELINE_SOURCE != "schedule" ]] ;
then
# pull the latest upstream image if it exists
skopeo copy docker://$CI_REGISTRY/$UPSTREAM_REPO/$IMAGE \
docker://$CI_REGISTRY_IMAGE/$IMAGE && exit 0 || true ;
# push the docker image to the libinput registry
- docker push $FEDORA_DOCKER_IMAGE:latest
- docker push $FEDORA_DOCKER_IMAGE:$CI_JOB_ID
<<: *restrict_docker_creation
# check if our image is already in the current registry
skopeo inspect docker://$CI_REGISTRY_IMAGE/$IMAGE > /dev/null && exit 0 || true ;
fi
fedora:28@docker-prep:
fedora:28@container-prep:
extends: .fedora@container-build
stage: container_prep
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 28
<<: *fedora_docker_prep
dependencies:
# Note: we can not use $FEDORA_VERSION here
- fedora:28@docker-check
DISTRIB_FLAVOR: fedora
DISTRIB_VERSION: $FEDORA_VERSION
TAG: $FEDORA_TAG
<<: *pull_upstream_or_rebuild
fedora:29@docker-prep:
fedora:29@container-prep:
extends: .fedora@container-build
stage: container_prep
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 29
<<: *fedora_docker_prep
dependencies:
# Note: we can not use $FEDORA_VERSION here
- fedora:29@docker-check
# FIXME: we should clean up the apt cache between each run
.ubuntu@docker-prep: &ubuntu_docker_prep
stage: docker_prep
image: docker:stable
services:
- docker:dind
script:
# if the check was successful, we just skip recreating the docker image
- test -e .img_ready && exit 0
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
DISTRIB_FLAVOR: fedora
DISTRIB_VERSION: $FEDORA_VERSION
TAG: $FEDORA_TAG
<<: *pull_upstream_or_rebuild
# create a Dockerfile with our dependencies
- echo "FROM ubuntu:$UBUNTU_VERSION" > Dockerfile
- echo "WORKDIR /app" >> Dockerfile
- echo "RUN DEBIAN_FRONTEND=noninteractive apt-get update" >> Dockerfile
- echo "RUN DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common" >> Dockerfile
- echo "RUN DEBIAN_FRONTEND=noninteractive add-apt-repository universe" >> Dockerfile
- echo "RUN DEBIAN_FRONTEND=noninteractive apt-get update" >> Dockerfile
- echo "RUN DEBIAN_FRONTEND=noninteractive apt-get install -y $UBUNTU_DEBS" >> Dockerfile
# create the docker image
- docker build --tag $UBUNTU_DOCKER_IMAGE:latest --tag $UBUNTU_DOCKER_IMAGE:$CI_JOB_ID .
# push the docker image to the libinput registry
- docker push $UBUNTU_DOCKER_IMAGE:latest
- docker push $UBUNTU_DOCKER_IMAGE:$CI_JOB_ID
<<: *restrict_docker_creation
ubuntu:17.10@docker-prep:
ubuntu:18.10@container-prep:
extends: .ubuntu@container-build
stage: container_prep
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "17.10"
<<: *ubuntu_docker_prep
dependencies:
# Note: we can not use $UBUNTU_VERSION here
- ubuntu:17.10@docker-check
UBUNTU_VERSION: "18.10"
DISTRIB_FLAVOR: ubuntu
DISTRIB_VERSION: $UBUNTU_VERSION
TAG: $UBUNTU_TAG
<<: *pull_upstream_or_rebuild
ubuntu:18.04@docker-prep:
ubuntu:18.04@container-prep:
extends: .ubuntu@container-build
stage: container_prep
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "18.04"
<<: *ubuntu_docker_prep
dependencies:
# Note: we can not use $UBUNTU_VERSION here
- ubuntu:18.04@docker-check
.arch@docker-prep: &arch_docker_prep
stage: docker_prep
image: docker:stable
services:
- docker:dind
script:
# if the check was successful, we just skip recreating the docker image
- test -e .img_ready && exit 0
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
DISTRIB_FLAVOR: ubuntu
DISTRIB_VERSION: $UBUNTU_VERSION
TAG: $UBUNTU_TAG
<<: *pull_upstream_or_rebuild
# create a Dockerfile with our dependencies
- echo "FROM base/archlinux" > Dockerfile
- echo "WORKDIR /app" >> Dockerfile
- echo "RUN pacman -S --refresh; pacman -S --sysupgrade --noconfirm; pacman -S --clean --noconfirm" >> Dockerfile
- echo "RUN pacman -S --noconfirm $ARCH_PKGS; pacman -S --clean --noconfirm" >> Dockerfile
# create the docker image
- docker build --tag $ARCH_DOCKER_IMAGE:latest --tag $ARCH_DOCKER_IMAGE:$CI_JOB_ID .
# push the docker image to the libinput registry
- docker push $ARCH_DOCKER_IMAGE:latest
- docker push $ARCH_DOCKER_IMAGE:$CI_JOB_ID
<<: *restrict_docker_creation
arch:rolling@docker-prep:
arch:rolling@container-prep:
extends: .arch@container-build
stage: container_prep
variables:
GIT_STRATEGY: none
<<: *arch_docker_prep
dependencies:
- arch:rolling@docker-check
.freebsd@docker-prep: &freebsd_docker_prep
stage: docker_prep
image: docker:stable
services:
- docker:dind
ARCH_VERSION: rolling
DISTRIB_FLAVOR: archlinux
DISTRIB_VERSION: $ARCH_VERSION
TAG: $ARCH_TAG
<<: *pull_upstream_or_rebuild
.freebsd@container-prep:
stage: container_prep
image: $BUILDAH_IMAGE
<<: *pull_upstream_or_rebuild
script:
# if the check was successful, we just skip recreating the docker image
- test -e .img_ready && exit 0
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# create a Dockerfile with our dependencies
- echo "FROM myfreeweb/freebsd-cross:latest" > Dockerfile
- echo "WORKDIR /app" >> Dockerfile
- echo "RUN apk add --no-cache $FREEBSD_BUILD_PKGS" >> Dockerfile
- echo "RUN pkg -r /freebsd update -f" >> Dockerfile
- echo "RUN pkg -r /freebsd install -y $FREEBSD_PKGS" >> Dockerfile
# create the docker image
- docker build --tag $FREEBSD_DOCKER_IMAGE:latest --tag $FREEBSD_DOCKER_IMAGE:$CI_JOB_ID .
# push the docker image to the libinput registry
- docker push $FREEBSD_DOCKER_IMAGE:latest
- docker push $FREEBSD_DOCKER_IMAGE:$CI_JOB_ID
<<: *restrict_docker_creation
freebsd:11.2@docker-prep:
variables:
GIT_STRATEGY: none
<<: *freebsd_docker_prep
dependencies:
# Note: we can not use $FREEBSD_VERSION here
- freebsd:11.2@docker-check
# Add some manual runners to be able to recreate the cache on a day
# the list of the rpms changed
fedora:28@force-docker-prep:
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 28
<<: *fedora_docker_prep
when: manual
dependencies: []
fedora:29@force-docker-prep:
- buildcntr=$(buildah from --quiet myfreeweb/freebsd-cross:latest)
- buildah run $buildcntr apk add --no-cache $FREEBSD_BUILD_PKGS
- buildah run $buildcntr pkg -r /freebsd update -f
- buildah run $buildcntr pkg -r /freebsd install -y $FREEBSD_PKGS
- buildah config --workingdir /app $buildcntr
# tag the current container
- buildah commit --quiet $buildcntr $FREEBSD_CONTAINER_IMAGE
# clean up the working container
- buildah rm $buildcntr
# push the container image to the libinput registry
- podman push --quiet $FREEBSD_CONTAINER_IMAGE
- skopeo copy docker://$FREEBSD_CONTAINER_IMAGE docker://$CI_REGISTRY_IMAGE/freebsd/$FREEBSD_VERSION:$CI_JOB_ID
freebsd:11.2@container-prep:
extends: .freebsd@container-prep
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 29
<<: *fedora_docker_prep
when: manual
dependencies: []
FREEBSD_VERSION: "11.2"
DISTRIB_FLAVOR: freebsd
DISTRIB_VERSION: $FREEBSD_VERSION
TAG: $FREEBSD_TAG
ubuntu:17.10@force-docker-prep:
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "17.10"
<<: *ubuntu_docker_prep
when: manual
dependencies: []
ubuntu:18.04@force-docker-prep:
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "18.04"
<<: *ubuntu_docker_prep
when: manual
dependencies: []
arch:rolling@force-docker-prep:
variables:
GIT_STRATEGY: none
<<: *arch_docker_prep
when: manual
dependencies: []
freebsd:11.2@force-docker-prep:
variables:
GIT_STRATEGY: none
<<: *freebsd_docker_prep
when: manual
dependencies: []
#################################################################
# #
# docker clean stage #
# run during the check stage #
# container clean stage #
# run during the clean stage #
# #
#################################################################
#
# This stage will look for the docker images we currently have in
# the registry and will remove any that are not tagged as 'latest'
# This stage will look for the container images we currently have in
# the registry and will remove any that are not tagged with the provided
# $container_image:$tag
#
.docker-clean: &docker_clean
stage: docker_check
image: registry.freedesktop.org/libinput/libinput/skopeo:latest
.container-clean:
stage: container_clean
image: $BUILDAH_IMAGE
script:
# get the full docker image name (CURRENT_DOCKER_IMAGE still has indirections)
- DOCKER_IMAGE=$(eval echo "$CURRENT_DOCKER_IMAGE")
- REPOSITORY=$(echo $DOCKER_IMAGE | cut -f2- -d/)
- IMAGE_PATH=$(echo $DOCKER_IMAGE | cut -f1 -d:)
# get the full container image name (CURRENT_CONTAINER_IMAGE still has indirections)
- CONTAINER_IMAGE=$(eval echo "$CURRENT_CONTAINER_IMAGE")
- GITLAB=$(echo $CI_PROJECT_URL | cut -f3 -d/)
- REPOSITORY=$(echo $CONTAINER_IMAGE | cut -f2- -d/ | cut -f1 -d:)
- IMAGE_PATH=$(echo $CONTAINER_IMAGE | cut -f1 -d:)
- LATEST_TAG=$(echo $CONTAINER_IMAGE | cut -f2 -d:)
# log in to the registry (read only)
- podman login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
# get the r/w token from the settings to access the registry
#
......@@ -455,7 +258,7 @@ freebsd:11.2@force-docker-prep:
- token=$(eval echo "\$$tokenname")
# request a token for the registry API
- REGISTRY_TOKEN=$(curl https://gitlab.freedesktop.org/jwt/auth --get
- REGISTRY_TOKEN=$(curl https://$GITLAB/jwt/auth --get
--silent --show-error
-d client_id=docker
-d offline_token=true
......@@ -466,10 +269,14 @@ freebsd:11.2@force-docker-prep:
| sed -r 's/(\{"token":"|"\})//g')
# get the digest of the latest image
- LATEST_MANIFEST=$(skopeo inspect docker://$IMAGE_PATH:latest | jq -r '.Digest')
- LATEST_MANIFEST=$(skopeo inspect docker://$IMAGE_PATH:$LATEST_TAG | jq -r '.Digest')
# get the list of tags
- TAGS=$(skopeo inspect docker://$IMAGE_PATH | jq -r '.RepoTags[]')
- TAGS=$(skopeo inspect docker://$IMAGE_PATH:$LATEST_TAG | jq -r '.RepoTags[]')
# FIXME: is the above command working properly? If not, use below:
# - TAGS=$(curl -X GET -H "accept:application/vnd.docker.distribution.manifest.v2+json"
# -H "authorization:Bearer $REGISTRY_TOKEN"
# https://$CI_REGISTRY/v2/$REPOSITORY/tags/list | jq -r '.tags[]')
# iterate over the tags
- for tag in $TAGS;
......@@ -481,52 +288,53 @@ freebsd:11.2@force-docker-prep:
curl https://$CI_REGISTRY/v2/$REPOSITORY/manifests/$MANIFEST --silent
-H "accept:application/vnd.docker.distribution.manifest.v2+json"
-H "authorization:Bearer $REGISTRY_TOKEN"
--fail --show-error -X DELETE
--fail --show-error -X DELETE || true
;fi
;done
dependencies: []
allow_failure: true
<<: *restrict_docker_creation
only:
- schedules
fedora:28@docker-clean:
fedora:28@container-clean:
extends: .container-clean
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 28
CURRENT_DOCKER_IMAGE: $FEDORA_DOCKER_IMAGE
<<: *docker_clean
CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE
fedora:29@docker-clean:
fedora:29@container-clean:
extends: .container-clean
variables:
GIT_STRATEGY: none
FEDORA_VERSION: 29
CURRENT_DOCKER_IMAGE: $FEDORA_DOCKER_IMAGE
<<: *docker_clean
CURRENT_CONTAINER_IMAGE: $FEDORA_CONTAINER_IMAGE
ubuntu:17.10@docker-clean:
ubuntu:18.10@container-clean:
extends: .container-clean
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "17.10"
CURRENT_DOCKER_IMAGE: $UBUNTU_DOCKER_IMAGE
<<: *docker_clean
UBUNTU_VERSION: "18.10"
CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE
ubuntu:18.04@docker-clean:
ubuntu:18.04@container-clean:
extends: .container-clean
variables:
GIT_STRATEGY: none
UBUNTU_VERSION: "18.04"
CURRENT_DOCKER_IMAGE: $UBUNTU_DOCKER_IMAGE
<<: *docker_clean
CURRENT_CONTAINER_IMAGE: $UBUNTU_CONTAINER_IMAGE
arch:rolling@docker-clean:
arch:rolling@container-clean:
extends: .container-clean
variables:
GIT_STRATEGY: none
CURRENT_DOCKER_IMAGE: $ARCH_DOCKER_IMAGE
<<: *docker_clean
CURRENT_CONTAINER_IMAGE: $ARCH_CONTAINER_IMAGE
freebsd:11.2@docker-clean:
freebsd:11.2@container-clean:
extends: .container-clean
variables:
GIT_STRATEGY: none
CURRENT_DOCKER_IMAGE: $FREEBSD_DOCKER_IMAGE
<<: *docker_clean
CURRENT_CONTAINER_IMAGE: $FREEBSD_CONTAINER_IMAGE
#################################################################
# #
......@@ -534,42 +342,39 @@ freebsd:11.2@docker-clean:
# #
#################################################################
.build@template:
stage: build
<<: *default_artifacts
<<: *default_build
dependencies: []
#
# Fedora
#
.fedora@template: &fedora_template
stage: build
image: $FEDORA_DOCKER_IMAGE:latest
<<: *default_artifacts
dependencies: []
.fedora-build@template:
extends: .build@template
image: $FEDORA_CONTAINER_IMAGE
fedora:28@default-build:
extends: .fedora-build@template
variables:
FEDORA_VERSION: 28
<<: *fedora_template
<<: *default_build
.fedora:29@template: &fedora_29_template
fedora:29@default-build:
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
<<: *fedora_template
fedora:29@default-build:
<<: *fedora_29_template
<<: *default_build
fedora:29@default-build-release:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Dbuildtype=release"
CFLAGS: "-Werror"
fedora:29@scan-build:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
NINJA_ARGS: scan-build
......@@ -586,15 +391,13 @@ fedora:29@scan-build:
# when they succeed on another.
fedora:29@build-no-libwacom:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Dlibwacom=false"
fedora:29@build-no-libwacom-nodeps:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Dlibwacom=false"
......@@ -602,15 +405,13 @@ fedora:29@build-no-libwacom-nodeps:
- dnf remove -y libwacom libwacom-devel
fedora:29@build-no-docs:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Ddocumentation=false"
fedora:29@build-no-docs-nodeps:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Ddocumentation=false"
......@@ -618,15 +419,13 @@ fedora:29@build-no-docs-nodeps:
- dnf remove -y doxygen graphviz
fedora:29@build-no-debuggui:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Ddebug-gui=false"
fedora:29@build-no-debuggui-nodeps:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Ddebug-gui=false"
......@@ -634,15 +433,13 @@ fedora:29@build-no-debuggui-nodeps:
- dnf remove -y gtk3-devel
fedora:29@build-no-tests:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Dtests=false"
fedora:29@build-no-tests-nodeps:
<<: *fedora_29_template
<<: *default_build
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
MESON_ARGS: "-Dtests=false"
......@@ -650,9 +447,12 @@ fedora:29@build-no-tests-nodeps:
- dnf remove -y check-devel
fedora:29@valgrind:
<<: *fedora_29_template
extends: .fedora-build@template
variables:
FEDORA_VERSION: 29
before_script:
- dnf install -y valgrind
# note: we override the default_build here by providing a new script
script:
- rm -rf "$MESON_BUILDDIR"
- meson "$MESON_BUILDDIR" $MESON_ARGS
......@@ -663,60 +463,50 @@ fedora:29@valgrind:
# Ubuntu
#
.ubuntu@template: &ubuntu_template
stage: build
image: $UBUNTU_DOCKER_IMAGE:latest
<<: *default_artifacts
dependencies: []
.ubuntu@template:
extends: .build@template
image: $UBUNTU_CONTAINER_IMAGE
ubuntu:17.10@default-build:
ubuntu:18.10@default-build:
extends: .ubuntu@template
variables:
UBUNTU_VERSION: "17.10"
<<: *ubuntu_template
<<: *default_build
UBUNTU_VERSION: "18.10"
ubuntu:18.04@default-build:
extends: .ubuntu@template
variables:
UBUNTU_VERSION: "17.10"
<<: *ubuntu_template
<<: *default_build
UBUNTU_VERSION: "18.04"
#
# Arch
#
.arch@template: &arch_template
stage: build
image: $ARCH_DOCKER_IMAGE:latest
<<: *default_artifacts
dependencies: []
.arch@template:
extends: .build@template
image: $ARCH_CONTAINER_IMAGE
arch:rolling@default-build:
<<: *arch_template
<<: *default_build
extends: .arch@template
#
# FreeBSD
#
.freebsd@template: &freebsd_template
stage: build
image: $FREEBSD_DOCKER_IMAGE:latest
.freebsd@template:
extends: .build@template
image: $FREEBSD_CONTAINER_IMAGE
variables:
MESON_ARGS: '--cross-file freebsd -Ddocumentation=false -Dtests=false -Depoll-dir=/freebsd/usr/local/'
# Can't run FreeBSD tests on Linux machine, so NINJA_ARGS shouldn't be "test"
NINJA_ARGS: ''
<<: *default_artifacts
dependencies: []
freebsd:11.2@default-build:
<<: *freebsd_template
<<: *default_build
extends: .freebsd@template
#
# deploy
#
wayland-web:
image: registry.freedesktop.org/libinput/libinput/jq:latest
image: $BUILDAH_IMAGE
stage: deploy
script:
- curl --request POST
......
#!/bin/bash
set -e
set -x
export DEBIAN_FRONTEND=noninteractive
apt-get install -y software-properties-common
add-apt-repository universe
apt-get update
apt-get -y upgrade
apt-get install -y $@
......@@ -28,4 +28,4 @@ please reproduce with a current version instead -->
console output, logs, and code as it's very hard to read otherwise.) -->
/label ~bug ~needs-investigation
/label ~bug ~"needs triage"
......@@ -29,4 +29,4 @@ to provide as many details as possible -->
/label ~RFE ~needs-investigation
/label ~enhancement ~"needs triage"
......@@ -5,8 +5,8 @@ libinput is a library that provides a full input stack for display servers
and other applications that need to handle input devices provided by the
kernel.
libinput provides device detection, event handling and abstraction so
minimize the amount of custom input code the user of libinput need to
libinput provides device detection, event handling and abstraction to
minimize the amount of custom input code the user of libinput needs to
provide the common set of functionality that users expect. Input event
processing includes scaling touch coordinates, generating
relative pointer events from touchpads, pointer acceleration, etc.
......
libinput (1.13.4-1) unstable; urgency=medium
* New upstream release.
* source: Update diff-ignore.
* control: Bump policy to 4.4.
* rules: Use dh_missing.
* compat, control: Bump debhelper to 12.
* tools.install: Updated.
-- Timo Aaltonen <tjaalton@debian.org> Mon, 08 Jul 2019 14:27:40 +0300
libinput (1.12.6-2) unstable; urgency=medium
* Ship /usr/share/libinput in the udeb, since that's now needed by the
......
......@@ -4,14 +4,14 @@ Priority: optional
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: Emilio Pozuelo Monfort <pochu@debian.org>, Héctor Orón Martínez <zumbi@debian.org>
Build-Depends:
debhelper (>= 10.3),
debhelper (>= 12),
meson,
pkg-config,
libmtdev-dev (>= 1.1.0),
libudev-dev,
libevdev-dev (>= 0.4),
libwacom-dev (>= 0.20),
Standards-Version: 4.1.1
Standards-Version: 4.4.0
Vcs-Git: https://salsa.debian.org/xorg-team/lib/libinput.git
Vcs-Browser: https://salsa.debian.org/xorg-team/lib/libinput
Homepage: http://www.freedesktop.org/wiki/Software/libinput/
......
usr/bin/*
usr/lib/*/libinput/*
usr/libexec/libinput/*
usr/share/man/man1/*
......@@ -9,7 +9,10 @@ override_dh_auto_configure:
override_dh_install:
find debian/tmp -name '*.la' -delete
dh_install --fail-missing
dh_install
override_dh_missing:
dh_missing --fail-missing
override_dh_makeshlibs:
dh_makeshlibs -plibinput10 -V --add-udeb="libinput10-udeb" -- -c4
......
extend-diff-ignore = "(^|/)(.vimdir|CODING_STYLE|autogen.sh|circle.yml|doc/*|test/50-litest.conf|tools/publish-doc)"
extend-diff-ignore = test/generate-gcov-report.sh
extend-diff-ignore = .gitlab-ci.yml|.gitlab/issue_templates
extend-diff-ignore = .gitlab-ci.yml|.gitlab/issue_templates|.gitlab-ci/ubuntu_install.sh
@import url("https://fonts.googleapis.com/css?family=Roboto+Mono");
dd {
margin-left: 30px;
}
.title {
font-size: 400%;
font-weight: 200;
font-size: 200%;
font-weight: bold;
}
.title .ingroups {
font-size: 50%;
}
h1 {
font-size: 300%;
font-size: 150%;
color: #354C7B;
background: none;
border-bottom: 1px solid #879ECB;
font-size: 150%;
font-weight: normal;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 0px;
width: 100%;
}
h2 {
font-size: 200%;
font-size: 120%;
color: #354C7B;
background: none;
border-bottom: 1px solid #879ECB;
font-size: 150%;
font-weight: normal;
padding-top: 8px;
padding-bottom: 8px;
padding-left: 0px;
width: 100%;
}
.sm-dox li {
......@@ -45,3 +69,52 @@ h2 {
#main-menu li ul {
display: none;
}
.paramname {
padding-right: 10px;
}
.memtitle {
background-image: none;
background-color: #F0F0F0;
}
.memproto {
background-color: #F0F0F0;
}
.headertitle {
background-image: none;
background-color: #F0F0F0;
}
div.header {
border: none;
}
td.fieldname {
font-family: 'Roboto Mono', monospace;
}
.fieldtable th {
background-image: none;
background-color: #F0F0F0;
}
body {
letter-spacing: 0px;
}
.mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams {
background-color: #F0F0F0;
}
a {
color: #2873b0;
}
.navpath ul {
background-image: none;
background-color: #F0F0F0;
}
This diff is collapsed.
......@@ -41,7 +41,7 @@ When running libinput versions 1.11.x or earlier, you must run
::
$> sudo udevadm hwdb --update
$> sudo systemd-hwdb update
Additional options may also be specified. For example:
......
......@@ -234,7 +234,7 @@ that update causes a hwdb change).
To update the binary file on-disk, run: ::
sudo udevadm hwdb --update
sudo systemd-hwdb update
Then, to trigger a reload of all properties on your device, run: ::
......
......@@ -144,6 +144,8 @@ ModelTouchpadVisibleMarker
ModelTabletModeNoSuspend
Indicates that the device does not need to be
suspended in :ref:`switches_tablet_mode`.
ModelTabletModeSwitchUnreliable
Indicates that this tablet mode switch's state cannot be relied upon.
ModelTrackball
Reserved for trackballs
ModelBouncingKeys
......@@ -181,3 +183,6 @@ AttrEventCodeDisable=EV_ABS;BTN_STYLUS;EV_KEY:0x123;
Disables the evdev event type/code tuples on the device. Entries may be
a named event type, or a named event code, or a named event type with a
hexadecimal event code, separated by a single colon.
AttrPointingStickIntegration=internal|external
Indicates the integration of the pointing stick. This is a string enum.
Only needed for external pointing sticks. These are rare.
......@@ -14,7 +14,7 @@ https://gitlab.freedesktop.org/libinput/libinput/issues/new
When reporting bugs against libinput, you will need:
- a reliable :ref:`reproducer <reporting_bugs_reproducer>` for the bug
- an :ref:`evemu recording <evemu>` of the device while the bug is reproduced
- a :ref:`recording <libinput-record>` of the device while the bug is reproduced
- device-specific information, see
- :ref:`reporting_bugs_touchpad`
......
......@@ -5,9 +5,13 @@ libinput test suite
==============================================================================
libinput ships with a number of tests all run automatically on ``ninja test``.
The primary test suite is the ``libinput-test-suite-runner``. When testing,
the ``libinput-test-suite-runner`` should always be invoked to check for
behavior changes.
The primary test suite is the ``libinput-test-suite``. When testing,
the ``libinput-test-suite`` should always be invoked to check for
behavior changes. The test suite relies on the kernel and udev to function
correctly. It is not suitable for running inside containers.
.. note:: ``ninja test`` runs more than just the test suite, you **must**
run all tests for full coverage.
The test suite runner uses
`Check <http://check.sourceforge.net/doc/check_html/>`_ underneath the hood
......@@ -62,7 +66,7 @@ run for a device.
::
$ ./test/libinput-test-suite-runner --list
$ ./builddir/libinput-test-suite --list
...
pointer:left-handed:
pointer_left_handed_during_click_multiple_buttons:
......@@ -117,7 +121,7 @@ basic shell-style function name matching. For example:
::
$ ./test/libinput-test-suite-runner --filter-test="*1fg_tap*"
$ ./builddir/libinput-test-suite --filter-test="*1fg_tap*"
The ``--filter-device`` argument enables selective running of tests through
......@@ -127,7 +131,7 @@ litest-specific shortnames, see the output of ``--list``. For example:
::
$ ./test/libinput-test-suite-runner --filter-device="synaptics*"
$ ./builddir/libinput-test-suite --filter-device="synaptics*"
The ``--filter-group`` argument enables selective running of test groups
......@@ -137,7 +141,7 @@ litest-specific test groups, see the output of ``--list``. For example:
::
$ ./test/libinput-test-suite-runner --filter-group="touchpad:*hover*"
$ ./builddir/libinput-test-suite --filter-group="touchpad:*hover*"
The ``--filter-device`` and ``--filter-group`` arguments can be combined with
......@@ -156,5 +160,33 @@ environment variable, if set, also enables verbose mode.
::
$ ./test/libinput-test-suite-runner --verbose
$ ./builddir/libinput-test-suite --verbose
$ LITEST_VERBOSE=1 ninja test
.. _test-installed:
------------------------------------------------------------------------------
Installing the test suite
------------------------------------------------------------------------------
If libinput is configured to install the tests, the test suite is available
as the ``libinput test-suite`` command. When run as installed binary, the
behavior of the test suite changes:
- the ``libinput.so`` used is the one in the library lookup paths
- no system-wide quirks are installed by the test suite, only those specific
to the test devices
- test device-specific quirks are installed in the system-wide quirks
directory, usually ``/usr/share/libinput/``.
It is not advisable to run ``libinput test-suite`` on a production machine.
Data loss may occur. The primary use-case for the installed test suite is
verification of distribution composes.
.. note:: The ``prefix`` is still used by the test suite. For verification
of a system package, the test suite must be configured with the same prefix.
To configure libinput to install the tests, use the ``-Dinstall-tests=true``
meson option::
$ meson builddir -Dtests=true -Dinstall-tests=true <other options>
......@@ -24,7 +24,7 @@ The most common tools used are:
- ``libinput quirks``: show quirks assigned to a device, see
:ref:`here <libinput-quirks>`
Most the tools must be run as root to have access to the kernel's
Most of the tools must be run as root to have access to the kernel's
``/dev/input/event*`` device files.
.. _libinput-list-devices:
......@@ -69,7 +69,7 @@ The above listing shows example output for a touchpad. The
default configuration for this device, for options that have more than a
binary state all available options are listed, with the default one prefixed
with an asterisk (``*``). In the example above, the default click method is
button-areas but clickinger is available.
button-areas but clickfinger is available.
.. note:: This tool is intended for human-consumption and may change its output
at any time.
......
......@@ -16,7 +16,7 @@ the text **"Touch jump detected and discarded."** and a link to this page.
In most cases, this is a bug in the kernel driver and to libinput it appears
that the touch point moves from its previous position. The pointer jump can
usually be seen in the evemu-record output for the device:
usually be seen in the :ref:`libinput record <libinput-record>` output for the device:
::
......@@ -53,6 +53,6 @@ represent a physical move of almost 50mm. libinput detects some of these
jumps and discards the movement but otherwise continues as usual. However,
the bug should be fixed at the kernel level.
When you encounter the warning in the log, please generate an evemu
recording of your touchpad and file a bug. See :ref:`reporting_bugs` for more
details.
When you encounter the warning in the log, please generate a recording of
your touchpad with :ref:`libinput record <libinput-record>` and file a bug.
See :ref:`reporting_bugs` for more details.