From 44323d8588509a4235f656711b7b3e4cc28d17a6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 17 Apr 2026 13:13:21 +0200 Subject: [PATCH] contributing: require DCO DCO requires contributors to certify that they have the right to submit their patches under the project's open-source license. This establishes a clear chain of responsibility for the copyright status of the code. The rise of generative AI use is the main driver for this change: the copyright situation is still unclear and there is no reliable way to tell apart contributions made (in part) with generative AI. Note, DCO had some legal upsides even before generative AIs existed. A new CI step has been added to check that all commits contain at least one Signed-off-by trailer. --- .builds/alpine.yml | 11 +++++++++++ CONTRIBUTING.md | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/.builds/alpine.yml b/.builds/alpine.yml index f8d75d8b1..0df721a06 100644 --- a/.builds/alpine.yml +++ b/.builds/alpine.yml @@ -58,3 +58,14 @@ tasks: -o public \ "$include_dir/wlr/" zip -r ~/public.zip public/ + - check-dco: | + set +x + cd wlroots + [ "${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-}" = "" ] && exit + git rev-list "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME".. | while read -r rev; do + sob=$(git log -1 --pretty='%(trailers:key=Signed-off-by,separator= )') + if [ "$sob" = "" ]; then + echo "Commit $rev is missing a Signed-off-by trailer" + exit 1 + fi + done diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9c49f7c2..03b91fe47 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,6 +101,17 @@ message as well. See [How to Write a Git Commit Message] for more details. +## Developer Certificate of Origin + +All commits must include a `Signed-off-by` trailer with your preferred name and +email address which indicates that you agree to the [Developer Certificate of +Origin]. If part of the patch has been authored by someone else, you should +also gather `Signed-off-by` trailers from them in addition to your own trailer. +These trailers certify that the commit can be submitted under the project's +open-source license. + +The trailer can be added with `git commit -s`. + ## Code Review When your changes are submitted for review, one or more core committers will @@ -473,6 +484,7 @@ static void subsurface_handle_surface_destroy(struct wl_listener *listener, [freedesktop wiki]: https://gitlab.freedesktop.org/freedesktop/freedesktop/-/wikis/home [linear, "recipe" style]: https://www.bitsnbites.eu/git-history-work-log-vs-recipe/ [git-rebase.io]: https://git-rebase.io/ +[Developer Certificate of Origin]: https://developercertificate.org/ [reference issues]: https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically [Code of Conduct]: https://www.freedesktop.org/wiki/CodeOfConduct/ [How to Write a Git Commit Message]: https://chris.beams.io/posts/git-commit/