From eba21faa3b6195715127ea04d68722f1595da6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Oct 2025 14:36:25 +0200 Subject: [PATCH 1/4] meson: remove unnecessary meson.build file --- meson.build | 3 +-- src/meson.build | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 src/meson.build diff --git a/meson.build b/meson.build index 22c80da..137966d 100644 --- a/meson.build +++ b/meson.build @@ -18,5 +18,4 @@ common_c_args = [ '-DLIBSYSTEMD_VERSION=@0@'.format(libsystemd_dep.version()), ] -subdir('src') - +subdir('src/systemd') diff --git a/src/meson.build b/src/meson.build deleted file mode 100644 index 250e6d6..0000000 --- a/src/meson.build +++ /dev/null @@ -1 +0,0 @@ -subdir('systemd') From bce69f553cce7d13c3ec30d32d0c87b4260829f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Oct 2025 15:43:03 +0200 Subject: [PATCH 2/4] dir-locals.el: update emacs config to match meson style The config is copied from systemd. The existing config specified 4-space indent for C, but individual files override this and the files in fact use 8 spaces. The config for Python doesn't seem necessary anymore either. I think utf-8 is used everywhere by default. --- .dir-locals.el | 17 ++++++++++++++--- .gitattributes | 2 ++ src/systemd/__init__.py | 1 - src/systemd/_daemon.c | 1 - src/systemd/_journal.c | 1 - src/systemd/_reader.c | 1 - src/systemd/id128.c | 1 - src/systemd/journal.py | 1 - src/systemd/login.c | 1 - src/systemd/macro.h | 1 - src/systemd/meson.build | 7 ++++++- src/systemd/pyutil.c | 1 - src/systemd/pyutil.h | 1 - src/systemd/strv.c | 1 - src/systemd/strv.h | 1 - 15 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 .gitattributes diff --git a/.dir-locals.el b/.dir-locals.el index 8bccaf0..489230c 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -2,6 +2,17 @@ ; A list of (major-mode . ((var1 . value1) (var2 . value2))) ; Mode can be nil, which gives default values. -((nil . ((indent-tabs-mode . nil) - (c-basic-offset . 4))) -) +; NOTE: If you update this file make sure to update .editorconfig too. + +((c-mode . ((fill-column . 109) + (c-basic-offset . 8) + (eval . (c-set-offset 'substatement-open 0)) + (eval . (c-set-offset 'statement-case-open 0)) + (eval . (c-set-offset 'case-label 0)) + (eval . (c-set-offset 'arglist-intro '++)) + (eval . (c-set-offset 'arglist-close 0)) + (eval . (c-set-offset 'arglist-cont-nonempty '(c-lineup-gcc-asm-reg c-lineup-arglist))))) + (meson-mode . ((meson-indent-basic . 8))) + (nil . ((indent-tabs-mode . nil) + (tab-width . 8) + (fill-column . 79))) ) diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..95701d0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.[ch] whitespace=tab-in-indent,trailing-space +*.py whitespace=tab-in-indent,trailing-space diff --git a/src/systemd/__init__.py b/src/systemd/__init__.py index 3b5dbe1..f9c23dc 100644 --- a/src/systemd/__init__.py +++ b/src/systemd/__init__.py @@ -1,4 +1,3 @@ -# -*- Mode: python; indent-tabs-mode: nil -*- */ # # # Copyright 2012 David Strauss diff --git a/src/systemd/_daemon.c b/src/systemd/_daemon.c index 8369c0e..d5556d4 100644 --- a/src/systemd/_daemon.c +++ b/src/systemd/_daemon.c @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** diff --git a/src/systemd/_journal.c b/src/systemd/_journal.c index b698996..ab78f51 100644 --- a/src/systemd/_journal.c +++ b/src/systemd/_journal.c @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** diff --git a/src/systemd/_reader.c b/src/systemd/_reader.c index 333eb9a..e58783b 100644 --- a/src/systemd/_reader.c +++ b/src/systemd/_reader.c @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** diff --git a/src/systemd/id128.c b/src/systemd/id128.c index a887d43..f2f0d44 100644 --- a/src/systemd/id128.c +++ b/src/systemd/id128.c @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** diff --git a/src/systemd/journal.py b/src/systemd/journal.py index 0de5a7f..519a493 100644 --- a/src/systemd/journal.py +++ b/src/systemd/journal.py @@ -1,4 +1,3 @@ -# -*- Mode: python; coding:utf-8; indent-tabs-mode: nil -*- */ # # # Copyright 2012 David Strauss diff --git a/src/systemd/login.c b/src/systemd/login.c index 5a5bfb9..d4e0ee4 100644 --- a/src/systemd/login.c +++ b/src/systemd/login.c @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** diff --git a/src/systemd/macro.h b/src/systemd/macro.h index 1b0db1d..20035a4 100644 --- a/src/systemd/macro.h +++ b/src/systemd/macro.h @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ #pragma once diff --git a/src/systemd/meson.build b/src/systemd/meson.build index f39f8fb..6b577da 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -49,7 +49,12 @@ python.extension_module( ) # Install Python modules -python.install_sources('__init__.py', 'journal.py', 'daemon.py', subdir: 'systemd') +python.install_sources( + '__init__.py', + 'journal.py', + 'daemon.py', + subdir: 'systemd', +) # Install test modules python.install_sources( diff --git a/src/systemd/pyutil.c b/src/systemd/pyutil.c index 3526a25..6be4dee 100644 --- a/src/systemd/pyutil.c +++ b/src/systemd/pyutil.c @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** diff --git a/src/systemd/pyutil.h b/src/systemd/pyutil.h index e41794d..b349efc 100644 --- a/src/systemd/pyutil.h +++ b/src/systemd/pyutil.h @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ #pragma once diff --git a/src/systemd/strv.c b/src/systemd/strv.c index 0ba62a3..a9a8c2e 100644 --- a/src/systemd/strv.c +++ b/src/systemd/strv.c @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** diff --git a/src/systemd/strv.h b/src/systemd/strv.h index 3ce5505..a930448 100644 --- a/src/systemd/strv.h +++ b/src/systemd/strv.h @@ -1,4 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** From fd110775330f28178f8bbb4d5f31d829ca6a7241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Oct 2025 16:30:28 +0200 Subject: [PATCH 3/4] Drop some python2 remnants --- src/systemd/journal.py | 3 --- src/systemd/test/test_journal.py | 1 - src/systemd/test/test_login.py | 1 - 3 files changed, 5 deletions(-) diff --git a/src/systemd/journal.py b/src/systemd/journal.py index 519a493..fac8044 100644 --- a/src/systemd/journal.py +++ b/src/systemd/journal.py @@ -17,8 +17,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with python-systemd; If not, see . -from __future__ import division - import sys as _sys import datetime as _datetime import uuid as _uuid @@ -479,7 +477,6 @@ def stream(identifier=None, priority=LOG_INFO, level_prefix=False): This interface can be used conveniently with the print function: - >>> from __future__ import print_function >>> stream = journal.stream() # doctest: +SKIP >>> print('message...', file=stream) # doctest: +SKIP diff --git a/src/systemd/test/test_journal.py b/src/systemd/test/test_journal.py index dd733cf..2000d7a 100644 --- a/src/systemd/test/test_journal.py +++ b/src/systemd/test/test_journal.py @@ -1,4 +1,3 @@ -from __future__ import print_function import contextlib import datetime import errno diff --git a/src/systemd/test/test_login.py b/src/systemd/test/test_login.py index afb5f45..e628d8a 100644 --- a/src/systemd/test/test_login.py +++ b/src/systemd/test/test_login.py @@ -1,4 +1,3 @@ -from __future__ import print_function import select import contextlib import errno From 0677c4a2a5e03dfc045eff3e36def4de34a6720b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 3 Oct 2025 16:17:33 +0200 Subject: [PATCH 4/4] Use SPDX license tags instead of old-style license headers This matches the change that was done in the systemd repo a few years ago. --- Makefile | 2 ++ docs/conf.py | 2 ++ docs/daemon.rst | 2 ++ docs/id128.rst | 2 ++ docs/index.rst | 6 +++--- docs/journal.rst | 2 ++ docs/login.rst | 2 ++ meson.build | 2 ++ pyproject.toml | 2 ++ src/systemd/.gitattributes | 2 ++ src/systemd/__init__.py | 15 +-------------- src/systemd/_daemon.c | 15 +-------------- src/systemd/_journal.c | 15 +-------------- src/systemd/_reader.c | 15 +-------------- src/systemd/daemon.py | 2 ++ src/systemd/id128.c | 15 +-------------- src/systemd/journal.py | 15 +-------------- src/systemd/login.c | 15 +-------------- src/systemd/macro.h | 15 +-------------- src/systemd/meson.build | 2 ++ src/systemd/pyutil.c | 15 +-------------- src/systemd/pyutil.h | 15 +-------------- src/systemd/strv.c | 15 +-------------- src/systemd/strv.h | 15 +-------------- src/systemd/test/test_daemon.py | 2 ++ src/systemd/test/test_id128.py | 2 ++ src/systemd/test/test_journal.py | 2 ++ src/systemd/test/test_login.py | 2 ++ src/systemd/util.c | 16 +--------------- src/systemd/util.h | 17 ++--------------- update-constants.py | 2 ++ 31 files changed, 50 insertions(+), 201 deletions(-) create mode 100644 src/systemd/.gitattributes diff --git a/Makefile b/Makefile index 9a28097..6d055ca 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + PYTHON = python SED = sed ETAGS = etags diff --git a/docs/conf.py b/docs/conf.py index c4ca874..3329338 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + # -*- coding: utf-8 -*- # # python-systemd documentation build configuration file, created by diff --git a/docs/daemon.rst b/docs/daemon.rst index 0ad11ed..d6065e0 100644 --- a/docs/daemon.rst +++ b/docs/daemon.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: LGPL-2.1-or-later + `systemd.daemon` module ======================= diff --git a/docs/id128.rst b/docs/id128.rst index cd562d5..eb5e876 100644 --- a/docs/id128.rst +++ b/docs/id128.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: LGPL-2.1-or-later + `systemd.id128` module ====================== diff --git a/docs/index.rst b/docs/index.rst index 07b478a..396b4cb 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,7 @@ -.. python-systemd documentation master file, created by +.. SPDX-License-Identifier: LGPL-2.1-or-later + +.. python-systemd documentation main file, created by sphinx-quickstart on Sat Feb 9 13:49:42 2013. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. .. _index: diff --git a/docs/journal.rst b/docs/journal.rst index 49c07b1..a5846b7 100644 --- a/docs/journal.rst +++ b/docs/journal.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: LGPL-2.1-or-later + `systemd.journal` module ======================== diff --git a/docs/login.rst b/docs/login.rst index 23204e0..75e5252 100644 --- a/docs/login.rst +++ b/docs/login.rst @@ -1,3 +1,5 @@ +.. SPDX-License-Identifier: LGPL-2.1-or-later + `systemd.login` module ======================= diff --git a/meson.build b/meson.build index 137966d..590f929 100644 --- a/meson.build +++ b/meson.build @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + project( 'python-systemd', 'c', diff --git a/pyproject.toml b/pyproject.toml index cec5d80..f80df6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + [project] name = "systemd-python" dynamic = ["version"] diff --git a/src/systemd/.gitattributes b/src/systemd/.gitattributes new file mode 100644 index 0000000..442a3ba --- /dev/null +++ b/src/systemd/.gitattributes @@ -0,0 +1,2 @@ +id128-constants.h generated +id128-defines.h generated diff --git a/src/systemd/__init__.py b/src/systemd/__init__.py index f9c23dc..ad529f0 100644 --- a/src/systemd/__init__.py +++ b/src/systemd/__init__.py @@ -1,16 +1,3 @@ -# +# SPDX-License-Identifier: LGPL-2.1-or-later # # Copyright 2012 David Strauss -# -# python-systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# python-systemd is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with python-systemd; If not, see . diff --git a/src/systemd/_daemon.c b/src/systemd/_daemon.c index d5556d4..add1599 100644 --- a/src/systemd/_daemon.c +++ b/src/systemd/_daemon.c @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2013-2016 Zbigniew Jędrzejewski-Szmek - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #define PY_SSIZE_T_CLEAN diff --git a/src/systemd/_journal.c b/src/systemd/_journal.c index ab78f51..8820a37 100644 --- a/src/systemd/_journal.c +++ b/src/systemd/_journal.c @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2012 David Strauss - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #include diff --git a/src/systemd/_reader.c b/src/systemd/_reader.c index e58783b..3f642fc 100644 --- a/src/systemd/_reader.c +++ b/src/systemd/_reader.c @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2013 Steven Hiscocks, Zbigniew Jędrzejewski-Szmek - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #define PY_SSIZE_T_CLEAN diff --git a/src/systemd/daemon.py b/src/systemd/daemon.py index 168e55d..178680c 100644 --- a/src/systemd/daemon.py +++ b/src/systemd/daemon.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + from socket import AF_UNSPEC as _AF_UNSPEC from ._daemon import (__version__, diff --git a/src/systemd/id128.c b/src/systemd/id128.c index f2f0d44..a78d8be 100644 --- a/src/systemd/id128.c +++ b/src/systemd/id128.c @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2013 Zbigniew Jędrzejewski-Szmek - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #include diff --git a/src/systemd/journal.py b/src/systemd/journal.py index fac8044..ac02126 100644 --- a/src/systemd/journal.py +++ b/src/systemd/journal.py @@ -1,21 +1,8 @@ -# +# SPDX-License-Identifier: LGPL-2.1-or-later # # Copyright 2012 David Strauss # Copyright 2012 Zbigniew Jędrzejewski-Szmek # Copyright 2012 Marti Raudsepp -# -# python-systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# python-systemd is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with python-systemd; If not, see . import sys as _sys import datetime as _datetime diff --git a/src/systemd/login.c b/src/systemd/login.c index d4e0ee4..9f3347e 100644 --- a/src/systemd/login.c +++ b/src/systemd/login.c @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2013 Zbigniew Jędrzejewski-Szmek - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #define PY_SSIZE_T_CLEAN diff --git a/src/systemd/macro.h b/src/systemd/macro.h index 20035a4..71ae2db 100644 --- a/src/systemd/macro.h +++ b/src/systemd/macro.h @@ -1,22 +1,9 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once /*** - Copyright 2010 Lennart Poettering - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #define DISABLE_WARNING_MISSING_PROTOTYPES \ diff --git a/src/systemd/meson.build b/src/systemd/meson.build index 6b577da..6a10428 100644 --- a/src/systemd/meson.build +++ b/src/systemd/meson.build @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + # Build _journal extension module python.extension_module( '_journal', diff --git a/src/systemd/pyutil.c b/src/systemd/pyutil.c index 6be4dee..b2a2c36 100644 --- a/src/systemd/pyutil.c +++ b/src/systemd/pyutil.c @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2013 Zbigniew Jędrzejewski-Szmek - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #include diff --git a/src/systemd/pyutil.h b/src/systemd/pyutil.h index b349efc..306e087 100644 --- a/src/systemd/pyutil.h +++ b/src/systemd/pyutil.h @@ -1,22 +1,9 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ #pragma once /*** - Copyright 2013 Zbigniew Jędrzejewski-Szmek - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #ifndef Py_TYPE diff --git a/src/systemd/strv.c b/src/systemd/strv.c index a9a8c2e..f644839 100644 --- a/src/systemd/strv.c +++ b/src/systemd/strv.c @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2010 Lennart Poettering - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #include diff --git a/src/systemd/strv.h b/src/systemd/strv.h index a930448..ce50149 100644 --- a/src/systemd/strv.h +++ b/src/systemd/strv.h @@ -1,20 +1,7 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - Copyright 2010 Lennart Poettering - - python-systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - python-systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with python-systemd; If not, see . ***/ #include "macro.h" diff --git a/src/systemd/test/test_daemon.py b/src/systemd/test/test_daemon.py index 537e9c1..6076f25 100644 --- a/src/systemd/test/test_daemon.py +++ b/src/systemd/test/test_daemon.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + import sys import os import posix diff --git a/src/systemd/test/test_id128.py b/src/systemd/test/test_id128.py index e87b1cc..24da776 100644 --- a/src/systemd/test/test_id128.py +++ b/src/systemd/test/test_id128.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + import contextlib import errno import uuid diff --git a/src/systemd/test/test_journal.py b/src/systemd/test/test_journal.py index 2000d7a..8b47990 100644 --- a/src/systemd/test/test_journal.py +++ b/src/systemd/test/test_journal.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + import contextlib import datetime import errno diff --git a/src/systemd/test/test_login.py b/src/systemd/test/test_login.py index e628d8a..1e92a25 100644 --- a/src/systemd/test/test_login.py +++ b/src/systemd/test/test_login.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + import select import contextlib import errno diff --git a/src/systemd/util.c b/src/systemd/util.c index a8ca299..b16a20f 100644 --- a/src/systemd/util.c +++ b/src/systemd/util.c @@ -1,20 +1,6 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ /*** - This file is part of systemd. - Copyright 2010 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see . ***/ /* stuff imported from systemd without any changes */ diff --git a/src/systemd/util.h b/src/systemd/util.h index 337920c..2dd7612 100644 --- a/src/systemd/util.h +++ b/src/systemd/util.h @@ -1,22 +1,9 @@ +/* SPDX-License-Identifier: LGPL-2.1-or-later */ + #pragma once /*** - This file is part of systemd. - Copyright 2010 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see . ***/ #include diff --git a/update-constants.py b/update-constants.py index 2dcacda..3a91290 100644 --- a/update-constants.py +++ b/update-constants.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + import sys for file in sys.argv[1:]: