From 74282e856cb09c18460dd81ae2e5cac8cc531d51 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 16 Jan 2022 12:46:06 -0800 Subject: [PATCH 1/2] gitlab CI: add a basic build test Signed-off-by: Alan Coopersmith --- .gitlab-ci.yml | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a39b7da --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,98 @@ +# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0 filetype=yaml: +# +# This CI uses the freedesktop.org ci-templates. +# Please see the ci-templates documentation for details: +# https://freedesktop.pages.freedesktop.org/ci-templates/ + +.templates_sha: &template_sha 34f4ade99434043f88e164933f570301fd18b125 # see https://docs.gitlab.com/ee/ci/yaml/#includefile + + +include: + # Arch container builder template + - project: 'freedesktop/ci-templates' + ref: *template_sha + file: '/templates/arch.yml' + - project: 'freedesktop/ci-templates' + ref: *template_sha + file: '/templates/ci-fairy.yml' + - template: Security/SAST.gitlab-ci.yml + + +stages: + - prep # prep work like rebuilding the container images if there is a change + - build # for actually building and testing things in a container + - test + - deploy + + +variables: + FDO_UPSTREAM_REPO: 'xorg/driver/xf86-input-synaptics' + # The tag should be updated each time the list of packages is updated. + # Changing a tag forces the associated image to be rebuilt. + # Note: the tag has no meaning, we use a date format purely for readability + FDO_DISTRIBUTION_TAG: '2022-01-16.0' + FDO_DISTRIBUTION_PACKAGES: 'git gcc pkgconf autoconf automake make xorg-util-macros xorgproto xorg-server-devel pixman libevdev libx11 libxi libxtst' + + +# +# Verify that commit messages are as expected, signed-off, etc. +# +check-commits: + extends: + - .fdo.ci-fairy + stage: prep + script: + - ci-fairy check-commits --signed-off-by --junit-xml=results.xml + except: + - master@xorg/driver/xf86-input-synaptics + variables: + GIT_DEPTH: 100 + artifacts: + reports: + junit: results.xml + +# +# Verify that the merge request has the allow-collaboration checkbox ticked +# +check-merge-request: + extends: + - .fdo.ci-fairy + stage: deploy + script: + - ci-fairy check-merge-request --require-allow-collaboration --junit-xml=results.xml + artifacts: + when: on_failure + reports: + junit: results.xml + allow_failure: true + + +# +# Build a container with the given tag and the packages pre-installed. +# This only happens if the tag changes, otherwise the existing image is +# re-used. +# +container-prep: + extends: + - .fdo.container-build@arch + stage: prep + variables: + GIT_STRATEGY: none + + +# +# The default build, runs on the image built above. +# +build: + stage: build + extends: + - .fdo.distribution-image@arch + script: + - autoreconf -ivf + - mkdir _builddir + - pushd _builddir > /dev/null + - ../configure --disable-silent-rules + - make + - make check + - make distcheck + - popd > /dev/null -- GitLab From ae160fc87bd2d52e0ab807b31dc2682beb3db772 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 16 Jan 2022 13:04:35 -0800 Subject: [PATCH 2/2] Convert remaining source files from ISO-8859-1 to UTF-8 Most were already converted. Fixes error raised by FlawFinder in CI: Error: encoding error in ./src/synaptics.c 'utf-8' codec can't decode byte 0xa9 in position 16: invalid start byte Signed-off-by: Alan Coopersmith --- src/ps2comm.c | 10 +++++----- src/psmcomm.c | 12 ++++++------ src/synaptics.c | 34 +++++++++++++++++----------------- src/synproto.c | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/ps2comm.c b/src/ps2comm.c index c474c07..887e2e0 100644 --- a/src/ps2comm.c +++ b/src/ps2comm.c @@ -1,9 +1,9 @@ /* - * Copyright © 1997 C. Scott Ananian - * Copyright © 1998-2000 Bruce Kalk - * Copyright © 2001 Stefan Gmeiner - * Copyright © 2002 Linuxcare Inc. David Kennedy - * Copyright © 2003 Fred Hucht + * Copyright © 1997 C. Scott Ananian + * Copyright © 1998-2000 Bruce Kalk + * Copyright © 2001 Stefan Gmeiner + * Copyright © 2002 Linuxcare Inc. David Kennedy + * Copyright © 2003 Fred Hucht * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without diff --git a/src/psmcomm.c b/src/psmcomm.c index 4086aba..0bf9877 100644 --- a/src/psmcomm.c +++ b/src/psmcomm.c @@ -1,10 +1,10 @@ /* - * Copyright © 1997 C. Scott Ananian - * Copyright © 1998-2000 Bruce Kalk - * Copyright © 2001 Stefan Gmeiner - * Copyright © 2002 Linuxcare Inc. David Kennedy - * Copyright © 2003 Fred Hucht - * Copyright © 2004 Arne Schwabe + * Copyright © 1997 C. Scott Ananian + * Copyright © 1998-2000 Bruce Kalk + * Copyright © 2001 Stefan Gmeiner + * Copyright © 2002 Linuxcare Inc. David Kennedy + * Copyright © 2003 Fred Hucht + * Copyright © 2004 Arne Schwabe * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without diff --git a/src/synaptics.c b/src/synaptics.c index 93ec74c..d29ba19 100644 --- a/src/synaptics.c +++ b/src/synaptics.c @@ -1,20 +1,20 @@ /* - * Copyright © 1999 Henry Davies - * Copyright © 2001 Stefan Gmeiner - * Copyright © 2002 S. Lehner - * Copyright © 2002 Peter Osterlund - * Copyright © 2002 Linuxcare Inc. David Kennedy - * Copyright © 2003 Hartwig Felger - * Copyright © 2003 Jörg Bösner - * Copyright © 2003 Fred Hucht - * Copyright © 2004 Alexei Gilchrist - * Copyright © 2004 Matthias Ihmig - * Copyright © 2006 Stefan Bethge - * Copyright © 2006 Christian Thaeter - * Copyright © 2007 Joseph P. Skudlarek - * Copyright © 2008 Fedor P. Goncharov - * Copyright © 2008-2012 Red Hat, Inc. - * Copyright © 2011 The Chromium OS Authors + * Copyright © 1999 Henry Davies + * Copyright © 2001 Stefan Gmeiner + * Copyright © 2002 S. Lehner + * Copyright © 2002 Peter Osterlund + * Copyright © 2002 Linuxcare Inc. David Kennedy + * Copyright © 2003 Hartwig Felger + * Copyright © 2003 Jörg Bösner + * Copyright © 2003 Fred Hucht + * Copyright © 2004 Alexei Gilchrist + * Copyright © 2004 Matthias Ihmig + * Copyright © 2006 Stefan Bethge + * Copyright © 2006 Christian Thaeter + * Copyright © 2007 Joseph P. Skudlarek + * Copyright © 2008 Fedor P. Goncharov + * Copyright © 2008-2012 Red Hat, Inc. + * Copyright © 2011 The Chromium OS Authors * * Permission to use, copy, modify, distribute, and sell this software * and its documentation for any purpose is hereby granted without @@ -41,7 +41,7 @@ * Stefan Bethge * Matthias Ihmig * Alexei Gilchrist - * Jörg Bösner + * Jörg Bösner * Hartwig Felger * Peter Osterlund * S. Lehner diff --git a/src/synproto.c b/src/synproto.c index 91e20e6..143160c 100644 --- a/src/synproto.c +++ b/src/synproto.c @@ -1,5 +1,5 @@ /* - * Copyright © 2012 Canonical, Ltd. + * Copyright © 2012 Canonical, Ltd. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), -- GitLab