Date   

Set DISTRO_VERSION using git describe

Justin Standring
 

Hi,

I'm working on a release process for a Dunfell-based distro, and I'd like to automatically set DISTRO_VERSION from `git describe` - ideally, from within Bitbake rather than a wrapper script.

I am using a Python function to set DISTRO_VERSION, and that function runs `git describe`. To avoid running `git describe` for every single recipe (during parsing) and then for each task during build, I am using a combination of bb.persist_data and DATETIME to cache the command result. Here is my code:

(pasted here if you prefer - https://pastebin.com/ikzCx52s)
# File: conf/distro/include/custom-distro-version.inc
# Required by: conf/distro/custom.conf

DISTRO_VERSION = "${@get_custom_distro_version(d)}"
 
def get_custom_distro_version(d):
    import os
    import bb
 
    datetime = d.getVar('DATETIME')
    persist = bb.persist_data.persist('custom', d)
    key = 'distro_version_git'
 
    # Check if we have a valid cached value
    if key in persist and ':' in persist[key]:
        cached_datetime, cached_ver = persist[key].split(':', maxsplit=1)
        if cached_datetime == datetime:
            return cached_ver
 
    srcdir = os.path.abspath(os.path.join(d.getVar('BBLAYERS_FETCH_DIR'), '..'))
 
    try:
        ver, _ = bb.process.run('git describe --tags --dirty --long 2>/dev/null', cwd=srcdir)
        ver = ver.strip()
    except bb.process.ExecutionError:
        bb.warn("Unable to set DISTRO_VERSION from git describe. Using '0.0'.")
        ver = '0.0'
 
    bb.warn(f"Caching DISTRO_VERSION='{ver}' for build date {datetime}")
    persist[key] = f"{datetime}:{ver}"
    return ver
 
# Do not include date/time in hash, since this is only used to detect different bitbake runs
get_custom_distro_version[vardepsexclude] = "DATETIME"
 

It is partially working, but it's not picking up changes to the value properly. On a fresh build, I see the `bb.warn` message twice - once during parsing, and once during the build (since the DATETIME changes between those phases?). The build (`bitbake custom-image`) succeeds with the correct DISTRO_VERSION.

When I coerce git describe to change its output (by modifying my README for example) and run bitbake again, Bitbake unfortunately does not detect any work to do (sstate 100% match, 100% complete). However, I do see the bb.warn message from include once (during build, not parsing because I assume that's all cached - I haven't changed any Yocto code). And, the 'Build Configuration' summary shows DISTRO_VERSION has the new value.

I tried inspecting the os-release do_compile task as a way to debug this (since it uses DISTRO_VERSION). The output `bitbake-dumpsig -t os-release do_compile` shows these lines (snipped for brevity):

Task dependencies: ['B', 'BBLAYERS_FETCH_DIR', 'BP', 'BPN', 'DISTRO', 'DISTRO_NAME', 'DISTRO_VERSION', 'ID', 'ID_LIKE', 'NAME', 'OS_RELEASE_FIELDS', 'OS_RELEASE_UNQUOTED_FIELDS', 'PN', 'PRETTY_NAME', 'PV', 'S', 'SPECIAL_PKGSUFFIX', 'VERSION', 'VERSION_ID', 'do_compile[umask]', 'get_custom_distro_version', 'sanitise_value']
List of dependencies for variable DISTRO_VERSION is {'get_custom_distro_version'}
List of dependencies for variable get_custom_distro_version is {'BBLAYERS_FETCH_DIR'}
Variable get_custom_distro_version value is def get_custom_distro_version(d):
... (function code is here)

To me, this shows that the recipe is correctly depending on the result of `def get_custom_distro_version(d)`, but when the result of that function is changing, the recipe is not re-built.

Can anyone help me explain what's going on here? Or, suggest an alternative way to do this?

Thanks,
Justin


M+ & H bugs with Milestone Movements WW41

Stephen Jolley
 

All,

YP M+ or high bugs which moved to a new milestone in WW41 are listed below:

Priority

Bug ID

Short Description

Changer

Owner

Was

Became

High

14074

kea recipe doesn't ship sysvinit scripts

randy.macleod@...

akuster@...

3.3 M4

3.2 M4

Medium+

11766

nobody group added by systemd sysusers.d

randy.macleod@...

yi.zhao@...

3.2 M3

3.2 M4

 

12760

CMake Toolchain File Has Wrong Module Path

randy.macleod@...

bluelightning@...

3.2 M3

3.2 M4

 

13071

Multiconfig builds may try to execute events that don't exist for them

randy.macleod@...

alejandro@...

3.2 M3

3.3 M1

 

13079

devtool documentation needs to mention oe-local-files

randy.macleod@...

bluelightning@...

3.2 M3

3.2 M4

 

13182

Inconsistency detected by ld.so: dl-open.c: 274: dl_open_worker: Assertion xxx failed

randy.macleod@...

Qi.Chen@...

3.3

3.3 M1

 

13190

RRS cannot handle multiple recipes with same PN

randy.macleod@...

bluelightning@...

3.2 M3

3.3 M1

 

13229

ttm_bo_vm_open kernel warning

randy.macleod@...

jon.mason@...

3.3

3.3 M1

 

13374

Determine 32bit guest support on arm64

randy.macleod@...

richard.purdie@...

3.2 M3

3.2 M4

 

13417

Development manual coverage of devtool

randy.macleod@...

bluelightning@...

3.2 M3

3.2 M4

 

13533

Devtool finish on _git package with SRCPV in PV points to wrong WORKDIR

randy.macleod@...

jaewon@...

3.2 M3

3.3 M1

 

13527

Add SPDX license headers to all source files for layerindex-web

timothy.t.orling@...

idadelm@...

3.2 M3

3.2 M4

 

13550

username/password specified to gitsm:// does not get propagated to submodules

randy.macleod@...

mark.hatle@...

3.2 M3

3.3 M1

 

13566

Write tests for multiconfig files in layers and document

randy.macleod@...

mostthingsweb@...

3.2 M3

3.2 M4

 

13625

test_devtool_add_library fails in multilib setups

randy.macleod@...

bluelightning@...

3.2 M3

3.3 M1

 

13722

Debugging With the GNU Project Debugger enhancements

randy.macleod@...

rpjday@...

3.2 M3

3.2 M4

 

13731

Cross canadian GCC fails to find header files when using tclibc-newlib

randy.macleod@...

alejandro@...

3.2 M3

3.3 M1

 

13738

devtool modify fails with file:// fetcher

randy.macleod@...

bluelightning@...

3.2 M3

3.2 M4

 

13732

eSDK: getting error "xmlcatalog: not found" installing SDK

randy.macleod@...

Qi.Chen@...

3.2 M3

3.2 M4

 

13742

HashEquiv server should have a read-only port or endpoint

randy.macleod@...

dl9pf@...

3.2 M3

3.3 M1

 

13748

bitbake doesn't detect changes in code to run do_compile when using devtool modify on recipe with destsuffix

randy.macleod@...

bluelightning@...

3.2 M3

3.3 M1

 

13808

do_task[noexec] = "" marks task noexec, which is inconsistent with docs

randy.macleod@...

mostthingsweb@...

3.2 M3

3.3 M1

 

13822

Easy to have misleading warnings if env script is executed instead of sourced

randy.macleod@...

ankur.tyagi85@...

3.2 M3

3.2 M4

 

13878

xserver-nodm-init: broken XDG_RUNTIME_DIR setup

randy.macleod@...

ross@...

3.2 M3

3.3 M1

 

13884

Numerous references to deprecated "distro_features_check" still in reference manual

randy.macleod@...

rpjday@...

3.2 M3

3.2 M4

 

13896

gtk-icon-cache.bbclass passes wrong parameter to update_gtk_icon_cache postinst intercept

randy.macleod@...

ross@...

3.2 M3

3.2 M4

 

13901

npm build error when the shrinkwrap file has no dependencies

timothy.t.orling@...

jeanmarie.lemetayer@...

3.2 M3

3.3 M1

 

13903

npmsw fetcher fails if multiple recipes have common npm packages

timothy.t.orling@...

jeanmarie.lemetayer@...

3.2 M3

3.3 M1

 

13933

Devtool does not work with multiconfig

randy.macleod@...

bluelightning@...

3.2 M3

3.3 M1

 

13934

Apparent duplication of libtirpc package causes failure in "bitbake linux-yocto -c menuconfig"

randy.macleod@...

hongxu.jia@...

3.1.3

3.1.4

 

13937

llvm-config does not work any more with multilib

randy.macleod@...

ydirson@...

3.2 M3

3.2 M4

 

13954

Invalid layerindex data causing backtrace in `bitbake-layers layerindex-fetch`

randy.macleod@...

bluelightning@...

3.2 M3

3.2 M4

 

13970

gobject-introspection-native-1.64.1-r0 do_install: Tries to access `~/.cache/g-ir-scanner/.cache-version`

randy.macleod@...

jpuhlman@...

3.2 M3

3.2 M4

 

13965

gRPC recipe not listed in master branch: layer index broken

randy.macleod@...

bluelightning@...

3.2 M3

3.2 M4

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Enhancements/Bugs closed WW41

Stephen Jolley
 

All,

The below were the owners of enhancements or bugs closed during the last week!

Who

Count

randy.macleod@...

4

richard.purdie@...

3

joe.slater@...

1

Grand Total

8

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Current Autobuilder Intermittent bugs by the WW created or closed.

Stephen Jolley
 

All,

Below are the lists of open and closed medium or higher Autobuilder Intermittent bugs by the WW created or closed.

WW Opened

WW Closed

Status

Count

2018WW48

2020WW26

Closed

1

2018WW49

2020WW28

Closed

1

2019WW26

2020WW31

Closed

1

2019WW43

2020WW30

Closed

1

2019WW47

2020WW41

Closed

1

2019WW51

2020WW30

Closed

1

2020WW13

2020WW30

Closed

1

2020WW21

2020WW30

Closed

1

2020WW21

2020WW33

Closed

1

2020WW23

2020WW27

Closed

1

2020WW8

 

Open

1

2020WW8

2020WW29

Closed

1

2020WW8

2020WW40

Closed

1

2020WW24

 

Open

1

2020WW24

2020WW34

Closed

1

2020WW25

 

Open

1

2020WW25

2020WW27

Closed

1

2020WW25

2020WW33

Closed

1

2020WW26

2020WW26

Closed

2

2020WW26

2020WW28

Closed

1

2020WW27

2020WW28

Closed

1

2020WW28

2020WW29

Closed

1

2020WW29

2020WW41

Closed

1

2020WW30

 

Open

1

2020WW31

 

Open

2

2020WW33

 

Open

5

2020WW33

2020WW34

Closed

2

2020WW33

2020WW35

Closed

1

2020WW34

 

Open

2

2020WW34

2020WW34

Closed

1

2020WW35

 

Open

2

2020WW35

2020WW39

Closed

1

2020WW36

 

Open

2

2020WW36

2020WW37

Closed

2

2020WW36

2020WW39

Closed

1

2020WW37

 

Open

1

2020WW38

2020WW39

Closed

1

2020WW39

 

Open

1

2020WW39

2020WW41

Closed

1

2020WW40

 

Open

1

2020WW41

 

Open

2

Grand Total

 

 

53

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Current high bug count owners for Yocto Project 3.2 & 3.3

Stephen Jolley
 

All,

Below is the list as of top 50 bug owners as of the end of WW41 of who have open medium or higher bugs and enhancements against YP 3.2 & 3.3.   There are 13 possible work days left until the final release candidates for YP 3.2 needs to be released.

Who

Count

richard.purdie@...

32

ross@...

21

david.reyna@...

21

bluelightning@...

19

bruce.ashfield@...

18

akuster808@...

18

sakib.sajal@...

11

timothy.t.orling@...

11

mark.morton@...

11

JPEWhacker@...

10

trevor.gamblin@...

9

kai.kang@...

9

Qi.Chen@...

7

stacy.gaikovaia@...

5

mostthingsweb@...

4

mingli.yu@...

4

raj.khem@...

4

rpjday@...

4

randy.macleod@...

4

hongxu.jia@...

3

yi.zhao@...

3

idadelm@...

3

jeanmarie.lemetayer@...

2

alejandro@...

2

ydirson@...

2

mark.hatle@...

2

jon.mason@...

2

jpuhlman@...

2

kergoth@...

2

matthewzmd@...

2

chee.yang.lee@...

2

michael@...

2

jaewon@...

2

shantanoo_desai@...

1

aehs29@...

1

kai.ruhnau@...

1

joe.slater@...

1

Martin.Jansa@...

1

akuster@...

1

jason.wessel@...

1

ankur.tyagi85@...

1

matt.ranostay@...

1

dl9pf@...

1

anuj.mittal@...

1

liu.ming50@...

1

saul.wold@...

1

kexin.hao@...

1

apoorvsangal@...

1

maxime.roussinbelanger@...

1

liezhi.yang@...

1

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Yocto Project Newcomer & Unassigned Bugs - Help Needed

Stephen Jolley
 

All,

 

The triage team is starting to try and collect up and classify bugs which a newcomer to the project would be able to work on in a way which means people can find them. They're being listed on the triage page under the appropriate heading:

https://wiki.yoctoproject.org/wiki/Bug_Triage#Newcomer_Bugs  Also please review: https://www.openembedded.org/wiki/How_to_submit_a_patch_to_OpenEmbedded and how to create a bugzilla account at: https://bugzilla.yoctoproject.org/createaccount.cgi

The idea is these bugs should be straight forward for a person to help work on who doesn't have deep experience with the project.  If anyone can help, please take ownership of the bug and send patches!  If anyone needs help/advice there are people on irc who can likely do so, or some of the more experienced contributors will likely be happy to help too.

 

Also, the triage team meets weekly and does its best to handle the bugs reported into the Bugzilla. The number of people attending that meeting has fallen, as have the number of people available to help fix bugs. One of the things we hear users report is they don't know how to help. We (the triage team) are therefore going to start reporting out the currently 334 unassigned or newcomer bugs.

 

We're hoping people may be able to spare some time now and again to help out with these.  Bugs are split into two types, "true bugs" where things don't work as they should and "enhancements" which are features we'd want to add to the system.  There are also roughly four different "priority" classes right now, “3.2”, “3.3, "3.99" and "Future", the more pressing/urgent issues being in "3.2" and then “3.3”.

 

Please review this link and if a bug is something you would be able to help with either take ownership of the bug, or send me (sjolley.yp.pm@...) an e-mail with the bug number you would like and I will assign it to you (please make sure you have a Bugzilla account).  The list is at: https://wiki.yoctoproject.org/wiki/Bug_Triage_Archive#Unassigned_or_Newcomer_Bugs

 

Thanks,

 

Stephen K. Jolley

Yocto Project Program Manager

(    Cell:                (208) 244-4460

* Email:              sjolley.yp.pm@...

 


Re: RFC: Changes to meta-kernel layer

 

On Thu, 17 Sep 2020 at 09:43, Paul Barker <pbarker@konsulko.com> wrote:

Hi folks,

After a bit of a break I'm looking again at the meta-kernel layer and I've got some changes planned. I'd like to get some feedback on these from anyone who has looked at or used the meta-kernel layer.

1) Change the name to meta-vanilla-kernel. This reflects the focus on providing a fast moving layer for vanilla kernel recipes, covering only what is available on kernel.org. Other common kernel recipes (e.g. Linaro or Android common kernels) will no longer be considered for acceptance into this layer. This clear focus should hopefully reduce some of the confusion about the goals of this layer.

2) The dunfell branch will no longer get new non-LTS kernel recipes. Providing non-LTS recipes on a stable branch has led to people depending on kernels which are now out of their support period - I'd like to drop the recipes for the 5.3.y and 5.6.y kernels but users are depending on them so I'll have to keep them. To avoid this proliferating, only LTS kernels and the bleeding edge mainline recipe will be updated on the stable branch from now on.

3) Aggressively drop end-of-life kernels on the master branch.

4) Drop all non-LTS kernel recipes in the gatesgarth branch when it is created.
I saw that meta-kernel was used in the M3 build so I'm not going to
drop recipes or rename the layer right now. I'll implement these
changes after the Yocto 3.2 release.

--
Paul Barker
Konsulko Group


Re: Bug 13807 - add support for elfutils debuginfod #yocto

Ross Burton
 

Hi Dorina,

On Sat, 10 Oct 2020 at 02:30, Dorinda <dorindabassey@gmail.com> wrote:
I am an Outreachy internship applicant, and I would love to assist on this bug #13807 - add support for elfutils debug info server.
I would like some more detailed information about this bug, and what's needed to get started on this task.
The first comment on the bug gives a brief overview:

1) Enable debuginfod in elfutils. This should be a PACKAGECONFIG, and
the build needs some extra dependencies (libmicrohttpd curl sqlite3
libarchive). Initially disabled by default. This should be
relatively straightforward once you understand how a recipe is written
and how PACKAGECONFIG works. All of those extra dependencies are in
oe-core already apart from libmicrohttpd which is part of meta-oe, so
you'll need to add that layer to your build configuration.

2) Add support for ipkg to the debuginfod scanner. 0.178 only supports
RPM but the next release (and git master) can also scan .debs, and as
ipkgs are binary-compatible with dpkg then this is a trivial addition
to the filename matching. This is literally a two line patch to
elfutils.

3) Verify that running debuginfod manually over $DEPLOY_DIR and
setting DEBUGINFOD_URLS correctly works. Test case: debuginfod-find
source hexcode /bin/bash.

4) Determine final integration. Straw man proposal: a class that turns
on debuginfod for elfutils and sets DEBUGINFOD_URLS in the image, and
a script that runs the elfutils-native debuginfod on DEPLOY_DIR.

The first step is critical so start with the Yocto Project
documentation and understand how a recipe is written.

Regards,
Ross


Re: Cleanup populate_sdk artefacts

Richard Purdie
 

On Fri, 2020-10-09 at 17:16 +0200, Arthur COURTEL wrote:
Hi all,

I'm working with a yocto Dunfell (3.1) on my embedded system.
I successfully built the SDK install script for my image recipe
with: bitbake my-image -c populate_sdk
However, the other day when I stopped the SDK generation before
completing (CTRL-C) and resumed it a couple of minutes after, bitbake
was not able to finish generating the SDK, saying:

Exception: FileNotFoundError: [Errno 2] No such file or directory:
'/home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-
gnueabi/my-image/1.0-r1/sdk/image/opt/machine-fb/5.0.0-devel-
20200924080856+build.0/sysroots/x86_64-tdxsdk-linux/usr/lib/locale'

I was able to determine that bitbake uses the variable DISTRO_VERSION
for building some paths during the generation.
My DISTRO_VERSION changes for each generation because it is built on
starting time generation.
I had to remove all my work folder in order for bitbake to restart
the SDK generation from scratch... Which takes some time...

Do you know if there is a way to cleanup the SDK generation properly
in case of a halt in the middle of the generation ?

Thank you for your time, have a great day!
bitbake <target name> -c clean

should clean up that kind of issue and allow it to continue.

Cheers,

Richard


Bug 13807 - add support for elfutils debuginfod #yocto

Dorinda
 

Hello Everyone,
I am an Outreachy internship applicant, and I would love to assist on this bug #13807 - add support for elfutils debug info server.
I would like some more detailed information about this bug, and what's needed to get started on this task.
Thanks.


[prelink-cross][PATCH v5] Add SPDX license headers to all source files

Meh Mbeh Ida Delphine
 

Added SPDX headers in all source files except src/makecrc.c since it is not copyrighted.
Skipped Makefile.am as well.
Also cleared redundant license text.
Updated README file with correct email addresses.

Fixes: [YOCTO #13529]

Signed-off-by: Meh Mbeh Ida Delphine <idadelm@gmail.com>
---

Changes in V5:
* None(Address review comments)

Changes in V4:
* Add [YOCTO #13529] tag to git commit log instead of subject line
* Updated the README file with right email addresses

Changes in V3:
* Address review comments
* Change subject line to reflect what the patch is trying to do

Changes in V2:
* Address review comments

README | 4 ++--
src/arch-alpha.c | 15 ++-------------
src/arch-arm.c | 15 ++-------------
src/arch-cris.c | 15 ++-------------
src/arch-i386.c | 15 ++-------------
src/arch-ia64.c | 15 ++-------------
src/arch-mips.c | 16 ++--------------
src/arch-ppc.c | 15 ++-------------
src/arch-ppc64.c | 15 ++-------------
src/arch-s390.c | 15 ++-------------
src/arch-s390x.c | 15 ++-------------
src/arch-sh.c | 15 ++-------------
src/arch-sparc.c | 16 +++-------------
src/arch-sparc64.c | 15 ++-------------
src/arch-x86_64.c | 15 ++-------------
src/cache.c | 15 ++-------------
src/canonicalize.c | 16 ++--------------
src/checksum.c | 15 ++-------------
src/conflict.c | 15 ++-------------
src/crc32.c | 15 ++-------------
src/cxx.c | 15 ++-------------
src/data.c | 15 ++-------------
src/doit.c | 15 ++-------------
src/dso.c | 15 ++-------------
src/dwarf2.c | 15 ++-------------
src/dwarf2.h | 15 ++-------------
src/exec.c | 15 ++-------------
src/execle_open.c | 15 ++-------------
src/execstack.c | 15 ++-------------
src/fptr.c | 15 ++-------------
src/fptr.h | 15 ++-------------
src/gather.c | 15 ++-------------
src/get.c | 15 ++-------------
src/hashtab.c | 17 ++---------------
src/hashtab.h | 16 +++-------------
src/layout.c | 15 ++-------------
src/layout.h | 15 ++-------------
src/main.c | 15 ++-------------
src/md5.c | 16 ++--------------
src/md5.h | 15 ++-------------
src/mdebug.c | 15 ++-------------
src/prelink.c | 15 ++-------------
src/prelink.h | 15 ++-------------
src/prelinktab.h | 15 ++-------------
src/reloc-info.c | 15 ++-------------
src/reloc-info.h | 15 ++-------------
src/reloc.c | 15 ++-------------
src/reloc.h | 15 ++-------------
src/sha.c | 4 ++++
src/sha.h | 4 ++++
src/space.c | 15 ++-------------
src/space.h | 15 ++-------------
src/stabs.c | 15 ++-------------
src/undo.c | 15 ++-------------
src/undoall.c | 15 ++-------------
src/verify.c | 15 ++-------------
56 files changed, 118 insertions(+), 696 deletions(-)

diff --git a/README b/README
index 2d8893b..5f91fab 100644
--- a/README
+++ b/README
@@ -13,8 +13,8 @@ Patch submission
When submitting patches to the cross-prelink project, please do the
following:

-To: mark.hatle@windriver.com
-Cc: yocto@yoctoproject.org
+To: mark.hatle@kernel.crashing.org
+Cc: yocto@lists.yoctoproject.org

Subject: [prelink-cross] ....

diff --git a/src/arch-alpha.c b/src/arch-alpha.c
index 7802a3e..bc5c192 100644
--- a/src/arch-alpha.c
+++ b/src/arch-alpha.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-arm.c b/src/arch-arm.c
index eec7c57..b5ea886 100644
--- a/src/arch-arm.c
+++ b/src/arch-arm.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2004, 2009, 2011, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-cris.c b/src/arch-cris.c
index 3272779..634bf9f 100644
--- a/src/arch-cris.c
+++ b/src/arch-cris.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-i386.c b/src/arch-i386.c
index a1e0fcc..5a0b2ca 100644
--- a/src/arch-i386.c
+++ b/src/arch-i386.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-ia64.c b/src/arch-ia64.c
index 6039115..56196de 100644
--- a/src/arch-ia64.c
+++ b/src/arch-ia64.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-mips.c b/src/arch-mips.c
index 02c608f..2875ec3 100644
--- a/src/arch-mips.c
+++ b/src/arch-mips.c
@@ -2,20 +2,8 @@
Written by Richard Sandiford <richard@codesourcery.com>, 2006
Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
/* GENERAL NOTES

The psABI defines R_MIPS_REL32 as A - EA + S, where the value of EA
diff --git a/src/arch-ppc.c b/src/arch-ppc.c
index e22e5d5..e296d79 100644
--- a/src/arch-ppc.c
+++ b/src/arch-ppc.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-ppc64.c b/src/arch-ppc64.c
index a764b99..3f2c375 100644
--- a/src/arch-ppc64.c
+++ b/src/arch-ppc64.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-s390.c b/src/arch-s390.c
index e5fe130..1a65f5c 100644
--- a/src/arch-s390.c
+++ b/src/arch-s390.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-s390x.c b/src/arch-s390x.c
index e4d82f7..926cfa2 100644
--- a/src/arch-s390x.c
+++ b/src/arch-s390x.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-sh.c b/src/arch-sh.c
index 1b11312..a852266 100644
--- a/src/arch-sh.c
+++ b/src/arch-sh.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-sparc.c b/src/arch-sparc.c
index e016a79..41b297d 100644
--- a/src/arch-sparc.c
+++ b/src/arch-sparc.c
@@ -1,19 +1,9 @@
/* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+/*
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-sparc64.c b/src/arch-sparc64.c
index aee4601..c6a1027 100644
--- a/src/arch-sparc64.c
+++ b/src/arch-sparc64.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c
index 2f6c551..249661a 100644
--- a/src/arch-x86_64.c
+++ b/src/arch-x86_64.c
@@ -3,19 +3,8 @@
Copyright (C) 2011 Wind River Systems, Inc.
x32 support by Mark Hatle <mark.hatle@windriver.com>

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/cache.c b/src/cache.c
index 1cc3217..b476581 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/canonicalize.c b/src/canonicalize.c
index 79df44e..e94ec06 100644
--- a/src/canonicalize.c
+++ b/src/canonicalize.c
@@ -2,20 +2,8 @@
Copyright (C) 1996-2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.

- The GNU C Library 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.
-
- The GNU C Library 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 the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <assert.h>
#include <stdlib.h>
diff --git a/src/checksum.c b/src/checksum.c
index 20a23a0..5c80fc5 100644
--- a/src/checksum.c
+++ b/src/checksum.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/conflict.c b/src/conflict.c
index 5613ace..83713c5 100644
--- a/src/conflict.c
+++ b/src/conflict.c
@@ -3,19 +3,8 @@
Written by Jakub Jelinek <jakub@redhat.com>, 2001.
Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/crc32.c b/src/crc32.c
index f36abb5..81e990b 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <stdint.h>
diff --git a/src/cxx.c b/src/cxx.c
index 4391ebe..4b911a9 100644
--- a/src/cxx.c
+++ b/src/cxx.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2007, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/data.c b/src/data.c
index 751f96f..d648744 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include "prelink.h"
diff --git a/src/doit.c b/src/doit.c
index 3784866..42e6819 100644
--- a/src/doit.c
+++ b/src/doit.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2003, 2004, 2005, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/dso.c b/src/dso.c
index 949abf9..9cce846 100644
--- a/src/dso.c
+++ b/src/dso.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/dwarf2.c b/src/dwarf2.c
index b9588b1..d230bb7 100644
--- a/src/dwarf2.c
+++ b/src/dwarf2.c
@@ -2,19 +2,8 @@
Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/dwarf2.h b/src/dwarf2.h
index b0c80b6..888f2c7 100644
--- a/src/dwarf2.h
+++ b/src/dwarf2.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2009, 2010, 2011, 2012 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#define DW_TAG_padding 0x00
#define DW_TAG_array_type 0x01
diff --git a/src/exec.c b/src/exec.c
index ca7fd14..431690e 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/execle_open.c b/src/execle_open.c
index 2ee5cbc..0d4bef5 100644
--- a/src/execle_open.c
+++ b/src/execle_open.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <errno.h>
diff --git a/src/execstack.c b/src/execstack.c
index 97fb453..fe044c5 100644
--- a/src/execstack.c
+++ b/src/execstack.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2003, 2005, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2003.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <errno.h>
diff --git a/src/fptr.c b/src/fptr.c
index cfe3aed..65a2804 100644
--- a/src/fptr.c
+++ b/src/fptr.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/fptr.h b/src/fptr.h
index 36ef7c6..c4ce3f7 100644
--- a/src/fptr.h
+++ b/src/fptr.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef FPTR_H
#define FPTR_H
diff --git a/src/gather.c b/src/gather.c
index 277f1b5..0d1e7c4 100644
--- a/src/gather.c
+++ b/src/gather.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/get.c b/src/get.c
index 0659962..bb58b1e 100644
--- a/src/get.c
+++ b/src/get.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/hashtab.c b/src/hashtab.c
index fa27446..7dc389d 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -2,21 +2,8 @@
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).

-This file is part of the libiberty library.
-Libiberty is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-Libiberty 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

/* This package implements basic hash table functionality. It is possible
to search for an entry, create an entry and destroy an entry.
diff --git a/src/hashtab.h b/src/hashtab.h
index 31e63e0..d3f297f 100644
--- a/src/hashtab.h
+++ b/src/hashtab.h
@@ -2,19 +2,8 @@
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).

-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

/* This package implements basic hash table functionality. It is possible
to search for an entry, create an entry and destroy an entry.
@@ -29,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
expanded by creation of new hash table and transferring elements from
the old table to the new table. */

+
#ifndef __HASHTAB_H__
#define __HASHTAB_H__

diff --git a/src/layout.c b/src/layout.c
index 859ab66..29be7a3 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/layout.h b/src/layout.h
index f481d22..1b10bc0 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2004, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef LAYOUT_H
#define LAYOUT_H
diff --git a/src/main.c b/src/main.c
index 6ba89d5..39e44ad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <errno.h>
diff --git a/src/md5.c b/src/md5.c
index 0d2fdef..19a8e0b 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -4,21 +4,9 @@
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.

- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.

- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <sys/types.h>
#include <stdlib.h>
diff --git a/src/md5.h b/src/md5.h
index 55f6195..eb0b85e 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -4,19 +4,8 @@
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.

- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef _MD5_H
#define _MD5_H 1
diff --git a/src/mdebug.c b/src/mdebug.c
index 4c22d2f..eb6d1b5 100644
--- a/src/mdebug.c
+++ b/src/mdebug.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/prelink.c b/src/prelink.c
index 64c4fea..bf774c9 100644
--- a/src/prelink.c
+++ b/src/prelink.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/prelink.h b/src/prelink.h
index 39c4390..4c4c243 100644
--- a/src/prelink.h
+++ b/src/prelink.h
@@ -4,19 +4,8 @@
Written by Jakub Jelinek <jakub@redhat.com>, 2001.
Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef PRELINK_H
#define PRELINK_H
diff --git a/src/prelinktab.h b/src/prelinktab.h
index f41c79c..a404292 100644
--- a/src/prelinktab.h
+++ b/src/prelinktab.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef PRELINKTAB_H
#define PRELINKTAB_H
diff --git a/src/reloc-info.c b/src/reloc-info.c
index 4ce333c..d51cfc1 100644
--- a/src/reloc-info.c
+++ b/src/reloc-info.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2008 CodeSourcery
Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>

diff --git a/src/reloc-info.h b/src/reloc-info.h
index a8f8b7c..592a92c 100644
--- a/src/reloc-info.h
+++ b/src/reloc-info.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2008 CodeSourcery
Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef RELOC_INFO_H
#define RELOC_INFO_H
diff --git a/src/reloc.c b/src/reloc.c
index deb0abe..9883dc7 100644
--- a/src/reloc.c
+++ b/src/reloc.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2005 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/reloc.h b/src/reloc.h
index a2ceff9..ee91f7e 100644
--- a/src/reloc.h
+++ b/src/reloc.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef RELOC_H
#define RELOC_H
diff --git a/src/sha.c b/src/sha.c
index cfbc956..f979bc4 100644
--- a/src/sha.c
+++ b/src/sha.c
@@ -1,3 +1,7 @@
+/*
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
+
/* sha.c - Functions to compute the SHA1 hash (message-digest) of files
or blocks of memory. Complies to the NIST specification FIPS-180-1.

diff --git a/src/sha.h b/src/sha.h
index 13583e3..810072b 100644
--- a/src/sha.h
+++ b/src/sha.h
@@ -1,3 +1,7 @@
+/*
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
+
/* sha.h - Declaration of functions and datatypes for SHA1 sum computing
library functions.

diff --git a/src/space.c b/src/space.c
index 4bd4760..8223daf 100644
--- a/src/space.c
+++ b/src/space.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/space.h b/src/space.h
index 5c9f725..59d087c 100644
--- a/src/space.h
+++ b/src/space.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2004 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef SPACE_H
#define SPACE_H
diff --git a/src/stabs.c b/src/stabs.c
index c0a5a6a..fd0ca28 100644
--- a/src/stabs.c
+++ b/src/stabs.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2005, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/undo.c b/src/undo.c
index 4c38dab..e6cfae3 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2005, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/undoall.c b/src/undoall.c
index 55d2a0b..44a0b4e 100644
--- a/src/undoall.c
+++ b/src/undoall.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/verify.c b/src/verify.c
index 7f530c0..991794a 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2002, 2003, 2006, 2007, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
--
2.17.1


Re: Bug 10699 - Ensure consistency in repository URLs #yocto #python

Paul Eggleton
 

Hi folks

my replies inline below

On Saturday, 10 October 2020 04:25:29 NZDT Randy MacLeod wrote:
On 2020-10-08 4:13 p.m., akhilathota499@gmail.com wrote:
Hi,
I would like to work on #10699 -- Ensure consistency in repository URLs
bug. Kindly help me to move forward by providing more information on
this issue(like where I can find more URL's mentioned in the request)
Hi Akhila,

This bug is about the data in the recipes in oe-core and all layers.

There is a layer tracking system called 'the layer index':
https://layers.openembedded.org
where you can search by various keys such as recipe name, layer name, etc.

If you go to the bottom of that page, you can find:
https://layers.openembedded.org/layerindex/about
and that page has a link to the source code:
http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/

git clone git://git.yoctoproject.org/layerindex-web

I don't work on this code so if you have questions, hopefully Paul
(bluelightning) or someone else will help out. My take is that:

"we'll probably need to have a table (possibly in the database)
that we can populate with mappings for known URLs."
so you'll need to find where the SRC_URI such as line 8 here:

http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/pa
tch/patch.inc?h=master#n8

is stored in the layerindex code and add each SRC_URI to a table or
some other data structure.
Actually for this issue we're not concerned with SRC_URI, just the repo URL at
the layer level - the database is normalised so that the latter is mostly in
one place.

Then, when a new layer is added the layerindex would use this table
to ensure that there are no duplicates that differ only by
the transport, i.e. "https://"; vs "git://", as mentioned in the bug:
"The mapping would be done when the entry is submitted."
I would have thought that we'd just need to have some code that can turn one
URL into its variant in the other protocol, then we can apply that both at
layer submission time and potentially as a process across the layers in the
database if needed. Happy to take suggestions though.

Thanks for looking into this Akhila!

Cheers,
Paul


Re: KeyError: 'getpwuid(): uid not found: 1000' during package nativesdk-glibc-locale #yocto #raspberrypi

Catalin Crenguta <catalin.crenguta@...>
 

Hi,

You should try a clean-up and then retry to build the package.
I wrongly thought that that this error: ```Exception: KeyError: 'getpwuid(): uid not found: 1000'```
was due to the fact that I was working in a rootless container environment (podman).


This worked in my case:
```
bitbake -c cleanall nativesdk-glibc-locale
bitbake nativesdk-glibc-locale
```

C Crenguta


Re: Bug 10699 - Ensure consistency in repository URLs #yocto #python

Randy MacLeod
 

On 2020-10-08 4:13 p.m., akhilathota499@gmail.com wrote:
Hi,
I would like to work on #10699 -- Ensure consistency in repository URLs bug. Kindly help me to move forward by providing more information on this issue(like where I can find more URL's mentioned in the request)

Hi Akhila,

This bug is about the data in the recipes in oe-core and all layers.

There is a layer tracking system called 'the layer index':
https://layers.openembedded.org
where you can search by various keys such as recipe name, layer name, etc.

If you go to the bottom of that page, you can find:
https://layers.openembedded.org/layerindex/about
and that page has a link to the source code:
http://git.yoctoproject.org/cgit/cgit.cgi/layerindex-web/

git clone git://git.yoctoproject.org/layerindex-web

I don't work on this code so if you have questions, hopefully Paul (bluelightning) or someone else will help out. My take is that:

"we'll probably need to have a table (possibly in the database)
that we can populate with mappings for known URLs."
so you'll need to find where the SRC_URI such as line 8 here:

http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/patch/patch.inc?h=master#n8

is stored in the layerindex code and add each SRC_URI to a table or
some other data structure.

Then, when a new layer is added the layerindex would use this table
to ensure that there are no duplicates that differ only by
the transport, i.e. "https://"; vs "git://", as mentioned in the bug:
"The mapping would be done when the entry is submitted."

Also, there are no fixed rules here in Yocto land but you are free to
ask about things either on the list to a wide audience or in the
Bugzilla comments (once you have an account!).

and kindly assign it to me.
If you create an account in the bugzilla:
https://bugzilla.yoctoproject.org/createaccount.cgi
you should be able to assign the defect to yourself.
Let us know if that doesn't work.

Thanks for looking into this bug.

../Randy



--
# Randy MacLeod
# Wind River Linux


Cleanup populate_sdk artefacts

Arthur COURTEL
 

Hi all,

I'm working with a yocto Dunfell (3.1) on my embedded system.
I successfully built the SDK install script for my image recipe with: bitbake my-image -c populate_sdk
However, the other day when I stopped the SDK generation before completing (CTRL-C) and resumed it a couple of minutes after, bitbake was not able to finish generating the SDK, saying:

Exception: FileNotFoundError: [Errno 2] No such file or directory: '/home/yoctouser/build/tmp/work/colibri_imx7_emmc-tdx-linux-gnueabi/my-image/1.0-r1/sdk/image/opt/machine-fb/5.0.0-devel-20200924080856+build.0/sysroots/x86_64-tdxsdk-linux/usr/lib/locale'

I was able to determine that bitbake uses the variable DISTRO_VERSION for building some paths during the generation.
My DISTRO_VERSION changes for each generation because it is built on starting time generation.
I had to remove all my work folder in order for bitbake to restart the SDK generation from scratch... Which takes some time...

Do you know if there is a way to cleanup the SDK generation properly in case of a halt in the middle of the generation ?

Thank you for your time, have a great day!

Arthur Courtel


Re: [prelink-cross][PATCH v4] Add SPDX license headers to all source files

Randy MacLeod
 

On 2020-10-08 11:25 p.m., Meh Mbeh Ida Delphine wrote:
Fixes: [YOCTO #13529]

Signed-off-by: Meh Mbeh Ida Delphine <idadelm@...>
---

Changes in V4:
 * Add [YOCTO #13529] tag to git commit log instead of subject line
 * Updated the README file with right email addresses

Changes in V3:
 * Address review comments
 * Change subject line to reflect what the patch is trying to do

Changes in V2:
 * Address review comments

 README             |  4 ++--
 src/arch-alpha.c   | 15 ++-------------
 src/arch-arm.c     | 15 ++-------------
 src/arch-cris.c    | 15 ++-------------
 src/arch-i386.c    | 15 ++-------------
 src/arch-ia64.c    | 15 ++-------------
 src/arch-mips.c    | 16 ++--------------
 src/arch-ppc.c     | 15 ++-------------
 src/arch-ppc64.c   | 15 ++-------------
 src/arch-s390.c    | 15 ++-------------
 src/arch-s390x.c   | 15 ++-------------
 src/arch-sh.c      | 15 ++-------------
 src/arch-sparc.c   | 16 +++-------------
 src/arch-sparc64.c | 15 ++-------------
 src/arch-x86_64.c  | 15 ++-------------
 src/cache.c        | 15 ++-------------
 src/canonicalize.c | 16 ++--------------
 src/checksum.c     | 15 ++-------------
 src/conflict.c     | 15 ++-------------
 src/crc32.c        | 15 ++-------------
 src/cxx.c          | 15 ++-------------
 src/data.c         | 15 ++-------------
 src/doit.c         | 15 ++-------------
 src/dso.c          | 15 ++-------------
 src/dwarf2.c       | 15 ++-------------
 src/dwarf2.h       | 15 ++-------------
 src/exec.c         | 15 ++-------------
 src/execle_open.c  | 15 ++-------------
 src/execstack.c    | 15 ++-------------
 src/fptr.c         | 15 ++-------------
 src/fptr.h         | 15 ++-------------
 src/gather.c       | 15 ++-------------
 src/get.c          | 15 ++-------------
 src/hashtab.c      | 17 ++---------------
 src/hashtab.h      | 16 +++-------------
 src/layout.c       | 15 ++-------------
 src/layout.h       | 15 ++-------------
 src/main.c         | 15 ++-------------
 src/md5.c          | 16 ++--------------
 src/md5.h          | 15 ++-------------
 src/mdebug.c       | 15 ++-------------
 src/prelink.c      | 15 ++-------------
 src/prelink.h      | 15 ++-------------
 src/prelinktab.h   | 15 ++-------------
 src/reloc-info.c   | 15 ++-------------
 src/reloc-info.h   | 15 ++-------------
 src/reloc.c        | 15 ++-------------
 src/reloc.h        | 15 ++-------------
 src/sha.c          |  4 ++++
 src/sha.h          |  4 ++++
 src/space.c        | 15 ++-------------
 src/space.h        | 15 ++-------------
 src/stabs.c        | 15 ++-------------
 src/undo.c         | 15 ++-------------
 src/undoall.c      | 15 ++-------------
 src/verify.c       | 15 ++-------------
 56 files changed, 118 insertions(+), 696 deletions(-)

diff --git a/README b/README
index 2d8893b..5f91fab 100644
--- a/README
+++ b/README
@@ -13,8 +13,8 @@ Patch submission
 When submitting patches to the cross-prelink project, please do the
 following:
 
-To: mark.hatle@...
-Cc: yocto@...
+To: mark.hatle@...
+Cc: yocto@...
 
 Subject: [prelink-cross] ....
 
diff --git a/src/arch-alpha.c b/src/arch-alpha.c
index 7802a3e..bc5c192 100644
--- a/src/arch-alpha.c
+++ b/src/arch-alpha.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/


Hi Ida,

You don't need to revert the previous patch since
I don't think that it has been merged so please send a v5 please.
Hopefully that will be merged. :)

../Randy
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-arm.c b/src/arch-arm.c
index eec7c57..b5ea886 100644
--- a/src/arch-arm.c
+++ b/src/arch-arm.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009, 2011, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-cris.c b/src/arch-cris.c
index 3272779..634bf9f 100644
--- a/src/arch-cris.c
+++ b/src/arch-cris.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-i386.c b/src/arch-i386.c
index a1e0fcc..5a0b2ca 100644
--- a/src/arch-i386.c
+++ b/src/arch-i386.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-ia64.c b/src/arch-ia64.c
index 6039115..56196de 100644
--- a/src/arch-ia64.c
+++ b/src/arch-ia64.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-mips.c b/src/arch-mips.c
index 02c608f..2875ec3 100644
--- a/src/arch-mips.c
+++ b/src/arch-mips.c
@@ -2,20 +2,8 @@
    Written by Richard Sandiford <richard@...>, 2006
    Updated by Maciej W. Rozycki <macro@...>, 2008.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 /* GENERAL NOTES
 
    The psABI defines R_MIPS_REL32 as A - EA + S, where the value of EA
diff --git a/src/arch-ppc.c b/src/arch-ppc.c
index e22e5d5..e296d79 100644
--- a/src/arch-ppc.c
+++ b/src/arch-ppc.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-ppc64.c b/src/arch-ppc64.c
index a764b99..3f2c375 100644
--- a/src/arch-ppc64.c
+++ b/src/arch-ppc64.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2002.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-s390.c b/src/arch-s390.c
index e5fe130..1a65f5c 100644
--- a/src/arch-s390.c
+++ b/src/arch-s390.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-s390x.c b/src/arch-s390x.c
index e4d82f7..926cfa2 100644
--- a/src/arch-s390x.c
+++ b/src/arch-s390x.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-sh.c b/src/arch-sh.c
index 1b11312..a852266 100644
--- a/src/arch-sh.c
+++ b/src/arch-sh.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-sparc.c b/src/arch-sparc.c
index e016a79..41b297d 100644
--- a/src/arch-sparc.c
+++ b/src/arch-sparc.c
@@ -1,19 +1,9 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+/*
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-sparc64.c b/src/arch-sparc64.c
index aee4601..c6a1027 100644
--- a/src/arch-sparc64.c
+++ b/src/arch-sparc64.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c
index 2f6c551..249661a 100644
--- a/src/arch-x86_64.c
+++ b/src/arch-x86_64.c
@@ -3,19 +3,8 @@
    Copyright (C) 2011 Wind River Systems, Inc.
    x32 support by Mark Hatle <mark.hatle@...>
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/cache.c b/src/cache.c
index 1cc3217..b476581 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2013 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/canonicalize.c b/src/canonicalize.c
index 79df44e..e94ec06 100644
--- a/src/canonicalize.c
+++ b/src/canonicalize.c
@@ -2,20 +2,8 @@
    Copyright (C) 1996-2002, 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
-   The GNU C Library 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.
-
-   The GNU C Library 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 the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <assert.h>
 #include <stdlib.h>
diff --git a/src/checksum.c b/src/checksum.c
index 20a23a0..5c80fc5 100644
--- a/src/checksum.c
+++ b/src/checksum.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/conflict.c b/src/conflict.c
index 5613ace..83713c5 100644
--- a/src/conflict.c
+++ b/src/conflict.c
@@ -3,19 +3,8 @@
    Written by Jakub Jelinek <jakub@...>, 2001.
    Updated by Maciej W. Rozycki <macro@...>, 2008.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/crc32.c b/src/crc32.c
index f36abb5..81e990b 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <stdint.h>
diff --git a/src/cxx.c b/src/cxx.c
index 4391ebe..4b911a9 100644
--- a/src/cxx.c
+++ b/src/cxx.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2007, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <alloca.h>
diff --git a/src/data.c b/src/data.c
index 751f96f..d648744 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include "prelink.h"
diff --git a/src/doit.c b/src/doit.c
index 3784866..42e6819 100644
--- a/src/doit.c
+++ b/src/doit.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2003, 2004, 2005, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <alloca.h>
diff --git a/src/dso.c b/src/dso.c
index 949abf9..9cce846 100644
--- a/src/dso.c
+++ b/src/dso.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/dwarf2.c b/src/dwarf2.c
index b9588b1..d230bb7 100644
--- a/src/dwarf2.c
+++ b/src/dwarf2.c
@@ -2,19 +2,8 @@
    Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/dwarf2.h b/src/dwarf2.h
index b0c80b6..888f2c7 100644
--- a/src/dwarf2.h
+++ b/src/dwarf2.h
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2009, 2010, 2011, 2012 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #define DW_TAG_padding			0x00
 #define DW_TAG_array_type		0x01
diff --git a/src/exec.c b/src/exec.c
index ca7fd14..431690e 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/execle_open.c b/src/execle_open.c
index 2ee5cbc..0d4bef5 100644
--- a/src/execle_open.c
+++ b/src/execle_open.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <errno.h>
diff --git a/src/execstack.c b/src/execstack.c
index 97fb453..fe044c5 100644
--- a/src/execstack.c
+++ b/src/execstack.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2003, 2005, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2003.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <errno.h>
diff --git a/src/fptr.c b/src/fptr.c
index cfe3aed..65a2804 100644
--- a/src/fptr.c
+++ b/src/fptr.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/fptr.h b/src/fptr.h
index 36ef7c6..c4ce3f7 100644
--- a/src/fptr.h
+++ b/src/fptr.h
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef FPTR_H
 #define FPTR_H
diff --git a/src/gather.c b/src/gather.c
index 277f1b5..0d1e7c4 100644
--- a/src/gather.c
+++ b/src/gather.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/get.c b/src/get.c
index 0659962..bb58b1e 100644
--- a/src/get.c
+++ b/src/get.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/hashtab.c b/src/hashtab.c
index fa27446..7dc389d 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -2,21 +2,8 @@
    Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@...).
 
-This file is part of the libiberty library.
-Libiberty is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-Libiberty 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with libiberty; see the file COPYING.LIB.  If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 /* This package implements basic hash table functionality.  It is possible
    to search for an entry, create an entry and destroy an entry.
diff --git a/src/hashtab.h b/src/hashtab.h
index 31e63e0..d3f297f 100644
--- a/src/hashtab.h
+++ b/src/hashtab.h
@@ -2,19 +2,8 @@
    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
    Contributed by Vladimir Makarov (vmakarov@...).
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 /* This package implements basic hash table functionality.  It is possible
    to search for an entry, create an entry and destroy an entry.
@@ -29,6 +18,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
    expanded by creation of new hash table and transferring elements from
    the old table to the new table.  */
 
+
 #ifndef __HASHTAB_H__
 #define __HASHTAB_H__
 
diff --git a/src/layout.c b/src/layout.c
index 859ab66..29be7a3 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <alloca.h>
diff --git a/src/layout.h b/src/layout.h
index f481d22..1b10bc0 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2004, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef LAYOUT_H
 #define LAYOUT_H
diff --git a/src/main.c b/src/main.c
index 6ba89d5..39e44ad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <errno.h>
diff --git a/src/md5.c b/src/md5.c
index 0d2fdef..19a8e0b 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -4,21 +4,9 @@
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@....
 
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any
-   later version.
 
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* Written by Ulrich Drepper <drepper@...>, 1995.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <sys/types.h>
 #include <stdlib.h>
diff --git a/src/md5.h b/src/md5.h
index 55f6195..eb0b85e 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -4,19 +4,8 @@
    NOTE: The canonical source of this file is maintained with the GNU C
    Library.  Bugs can be reported to bug-glibc@....
 
-   This program is free software; you can redistribute it and/or modify it
-   under the terms of the GNU General Public License as published by the
-   Free Software Foundation; either version 2, or (at your option) any
-   later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef _MD5_H
 #define _MD5_H 1
diff --git a/src/mdebug.c b/src/mdebug.c
index 4c22d2f..eb6d1b5 100644
--- a/src/mdebug.c
+++ b/src/mdebug.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/prelink.c b/src/prelink.c
index 64c4fea..bf774c9 100644
--- a/src/prelink.c
+++ b/src/prelink.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/prelink.h b/src/prelink.h
index 39c4390..4c4c243 100644
--- a/src/prelink.h
+++ b/src/prelink.h
@@ -4,19 +4,8 @@
    Written by Jakub Jelinek <jakub@...>, 2001.
    Updated by Maciej W. Rozycki <macro@...>, 2008.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef PRELINK_H
 #define PRELINK_H
diff --git a/src/prelinktab.h b/src/prelinktab.h
index f41c79c..a404292 100644
--- a/src/prelinktab.h
+++ b/src/prelinktab.h
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef PRELINKTAB_H
 #define PRELINKTAB_H
diff --git a/src/reloc-info.c b/src/reloc-info.c
index 4ce333c..d51cfc1 100644
--- a/src/reloc-info.c
+++ b/src/reloc-info.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2008 CodeSourcery
    Written by Maciej W. Rozycki <macro@...>, 2008.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 
diff --git a/src/reloc-info.h b/src/reloc-info.h
index a8f8b7c..592a92c 100644
--- a/src/reloc-info.h
+++ b/src/reloc-info.h
@@ -1,19 +1,8 @@
 /* Copyright (C) 2008 CodeSourcery
    Written by Maciej W. Rozycki <macro@...>, 2008.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef RELOC_INFO_H
 #define RELOC_INFO_H
diff --git a/src/reloc.c b/src/reloc.c
index deb0abe..9883dc7 100644
--- a/src/reloc.c
+++ b/src/reloc.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2005 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/reloc.h b/src/reloc.h
index a2ceff9..ee91f7e 100644
--- a/src/reloc.h
+++ b/src/reloc.h
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef RELOC_H
 #define RELOC_H
diff --git a/src/sha.c b/src/sha.c
index cfbc956..f979bc4 100644
--- a/src/sha.c
+++ b/src/sha.c
@@ -1,3 +1,7 @@
+/*
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
+
 /* sha.c - Functions to compute the SHA1 hash (message-digest) of files
    or blocks of memory.  Complies to the NIST specification FIPS-180-1.
 
diff --git a/src/sha.h b/src/sha.h
index 13583e3..810072b 100644
--- a/src/sha.h
+++ b/src/sha.h
@@ -1,3 +1,7 @@
+/*
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
+
 /* sha.h - Declaration of functions and datatypes for SHA1 sum computing
    library functions.
 
diff --git a/src/space.c b/src/space.c
index 4bd4760..8223daf 100644
--- a/src/space.c
+++ b/src/space.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/space.h b/src/space.h
index 5c9f725..59d087c 100644
--- a/src/space.h
+++ b/src/space.h
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2004 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #ifndef SPACE_H
 #define SPACE_H
diff --git a/src/stabs.c b/src/stabs.c
index c0a5a6a..fd0ca28 100644
--- a/src/stabs.c
+++ b/src/stabs.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2005, 2006 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/undo.c b/src/undo.c
index 4c38dab..e6cfae3 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2001, 2002, 2003, 2005, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2001.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>
diff --git a/src/undoall.c b/src/undoall.c
index 55d2a0b..44a0b4e 100644
--- a/src/undoall.c
+++ b/src/undoall.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2002, 2005 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2002.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <alloca.h>
diff --git a/src/verify.c b/src/verify.c
index 7f530c0..991794a 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -1,19 +1,8 @@
 /* Copyright (C) 2002, 2003, 2006, 2007, 2010 Red Hat, Inc.
    Written by Jakub Jelinek <jakub@...>, 2002.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program 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 General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
 
 #include <config.h>
 #include <assert.h>




-- 
# Randy MacLeod
# Wind River Linux


Re: [prelink-cross] Added SPDX license headers to all .c and .h source files

Randy MacLeod
 

On 2020-10-08 8:12 a.m., Paul Barker wrote:
On Thu, 8 Oct 2020 at 13:04, Meh Mbeh Ida Delphine <idadelm@gmail.com> wrote:

Signed-off-by: Meh Mbeh Ida Delphine <idadelm@gmail.com>
---
src/arch-alpha.c | 15 ++-------
src/arch-arm.c | 15 ++-------
src/arch-cris.c | 15 ++-------
src/arch-i386.c | 15 ++-------
src/arch-ia64.c | 15 ++-------
src/arch-mips.c | 77 ++--------------------------------------------
src/arch-ppc.c | 15 ++-------
src/arch-ppc64.c | 15 ++-------
src/arch-s390.c | 15 ++-------
src/arch-s390x.c | 15 ++-------
src/arch-sh.c | 15 ++-------
src/arch-sparc.c | 15 ++-------
src/arch-sparc64.c | 15 ++-------
src/arch-x86_64.c | 15 ++-------
src/cache.c | 15 ++-------
src/canonicalize.c | 16 ++--------
src/checksum.c | 15 ++-------
src/conflict.c | 15 ++-------
src/crc32.c | 15 ++-------
src/cxx.c | 15 ++-------
src/data.c | 15 ++-------
src/doit.c | 15 ++-------
src/dso.c | 15 ++-------
src/dwarf2.c | 15 ++-------
src/dwarf2.h | 15 ++-------
src/exec.c | 15 ++-------
src/execle_open.c | 15 ++-------
src/execstack.c | 15 ++-------
src/fptr.c | 15 ++-------
src/fptr.h | 15 ++-------
src/gather.c | 15 ++-------
src/get.c | 15 ++-------
src/hashtab.c | 30 ++----------------
src/hashtab.h | 28 ++---------------
src/layout.c | 15 ++-------
src/layout.h | 15 ++-------
src/main.c | 15 ++-------
src/md5.c | 15 ++-------
src/md5.h | 15 ++-------
src/mdebug.c | 15 ++-------
src/prelink.c | 15 ++-------
src/prelink.h | 15 ++-------
src/prelinktab.h | 15 ++-------
src/reloc-info.c | 15 ++-------
src/reloc-info.h | 15 ++-------
src/reloc.c | 15 ++-------
src/reloc.h | 15 ++-------
src/sha.c | 2 ++
src/sha.h | 2 ++
src/space.c | 15 ++-------
src/space.h | 15 ++-------
src/stabs.c | 15 ++-------
src/undo.c | 15 ++-------
src/undoall.c | 15 ++-------
src/verify.c | 15 ++-------
55 files changed, 110 insertions(+), 780 deletions(-)

diff --git a/src/arch-alpha.c b/src/arch-alpha.c
index 7802a3e..bc5c192 100644
--- a/src/arch-alpha.c
+++ b/src/arch-alpha.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-arm.c b/src/arch-arm.c
index eec7c57..b5ea886 100644
--- a/src/arch-arm.c
+++ b/src/arch-arm.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2004, 2009, 2011, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-cris.c b/src/arch-cris.c
index 3272779..634bf9f 100644
--- a/src/arch-cris.c
+++ b/src/arch-cris.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-i386.c b/src/arch-i386.c
index a1e0fcc..5a0b2ca 100644
--- a/src/arch-i386.c
+++ b/src/arch-i386.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-ia64.c b/src/arch-ia64.c
index 6039115..56196de 100644
--- a/src/arch-ia64.c
+++ b/src/arch-ia64.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-mips.c b/src/arch-mips.c
index 02c608f..d0e69d4 100644
--- a/src/arch-mips.c
+++ b/src/arch-mips.c
@@ -2,81 +2,8 @@
Written by Richard Sandiford <richard@codesourcery.com>, 2006
Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* GENERAL NOTES
-
- The psABI defines R_MIPS_REL32 as A - EA + S, where the value of EA
- depends on the symbol index. If the index is less than DT_MIPS_GOTSYM,
- EA is the symbol's st_value "plus displacement". If the index is greater
- than or equal to DT_MIPS_GOTSYM, EA is the original value of the
- associated GOT entry.
-
- However, glibc's dynamic linker implements a different definition.
- If the index is less than DT_MIPS_GOTSYM, the dynamic linker adds the
- symbol's st_value and the base address to the addend. If the index
- is greater than or equal to DT_MIPS_GOTSYM, the dynamic linker adds
- the final symbol value to the addend.
-
- MIPS GOTs are divided into three parts:
-
- - Reserved entries (of which GNU objects have 2)
- - Local entries
- - Global entries
-
- DT_MIPS_LOCAL_GOTNO gives the total number of reserved and local
- entries. The local entries all hold virtual addresses and the
- dynamic linker will add the base address to each one.
-
- Unlike most other architectures, the MIPS ABI does not use
- relocations to initialize the global GOT entries. Instead, global
- GOT entry X is mapped to dynamic symbol DT_MIPS_GOTSYM + X, and there
- are a total of DT_MIPS_SYMTABNO - DT_MIPS_GOTSYM global GOT entries.
-
- The interpretation of a global GOT entry depends on the symbol entry
- and the initial GOT contents. The psABI lists the following cases:
-
- st_shndx st_type st_value initial GOT value
- -------- ------- -------- -----------------
- A: SHN_UNDEF STT_FUNC 0 st_value (== 0) / QS
- B: SHN_UNDEF STT_FUNC stub address st_value / QS
- C: SHN_UNDEF all others 0 st_value (== 0) / QS
- D: SHN_COMMON any alignment 0 / QS
- E: all others STT_FUNC value st_value / stub address
- F: all others all others value st_value
-
- (wording slightly modified from the psABI table). Here, QS denotes
- Quickstart values.
-
- The dynamic linker treats each case as follows:
-
- - [A, B when not binding lazily, C, D, E when not binding lazily, F]
- Resolve the symbol and store its value in the GOT.
-
- - [B when binding lazily] Set the GOT entry to the st_value plus
- the base address.
-
- - [E when binding lazily] If the GOT entry is different from the st_value,
- add the base addreess to the GOT entry. Otherwise resolve the symbol
- and store its value in the GOT (as for A, C, etc).
-
- As the table shows, we can install Quickstart values for types A-D.
- Installing Quickstart values for type F should be a no-op, because the
- GOT should already hold the desired value. Installing Quickstart values
- for type E would either be a no-op (if the GOT entry already contains
- st_value) or would lose the address of the lazy binding stub. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/
It looks like you've removed an important comment there along with the
old license header. I think there are a few other instances of this as
well. Could you re-check this?
Hi Ida,

To make it really clear, here's an SPDX example showing that we just
need the SPDX identifier added:

http://git.yoctoproject.org/cgit/cgit.cgi/ptest-runner2/commit/?id=63d097cc46142157931682fed076b5407757a0bd

Thanks,
../Randy



#include <config.h>
#include <assert.h>
diff --git a/src/arch-ppc.c b/src/arch-ppc.c
index e22e5d5..e296d79 100644
--- a/src/arch-ppc.c
+++ b/src/arch-ppc.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2009, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-ppc64.c b/src/arch-ppc64.c
index a764b99..3f2c375 100644
--- a/src/arch-ppc64.c
+++ b/src/arch-ppc64.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-s390.c b/src/arch-s390.c
index e5fe130..1a65f5c 100644
--- a/src/arch-s390.c
+++ b/src/arch-s390.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-s390x.c b/src/arch-s390x.c
index e4d82f7..926cfa2 100644
--- a/src/arch-s390x.c
+++ b/src/arch-s390x.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-sh.c b/src/arch-sh.c
index 1b11312..a852266 100644
--- a/src/arch-sh.c
+++ b/src/arch-sh.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-sparc.c b/src/arch-sparc.c
index e016a79..d841a28 100644
--- a/src/arch-sparc.c
+++ b/src/arch-sparc.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-sparc64.c b/src/arch-sparc64.c
index aee4601..c6a1027 100644
--- a/src/arch-sparc64.c
+++ b/src/arch-sparc64.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2004, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/arch-x86_64.c b/src/arch-x86_64.c
index 2f6c551..249661a 100644
--- a/src/arch-x86_64.c
+++ b/src/arch-x86_64.c
@@ -3,19 +3,8 @@
Copyright (C) 2011 Wind River Systems, Inc.
x32 support by Mark Hatle <mark.hatle@windriver.com>

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/cache.c b/src/cache.c
index 1cc3217..b476581 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2013 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/canonicalize.c b/src/canonicalize.c
index 79df44e..e94ec06 100644
--- a/src/canonicalize.c
+++ b/src/canonicalize.c
@@ -2,20 +2,8 @@
Copyright (C) 1996-2002, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.

- The GNU C Library 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.
-
- The GNU C Library 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 the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <assert.h>
#include <stdlib.h>
diff --git a/src/checksum.c b/src/checksum.c
index 20a23a0..5c80fc5 100644
--- a/src/checksum.c
+++ b/src/checksum.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/conflict.c b/src/conflict.c
index 5613ace..83713c5 100644
--- a/src/conflict.c
+++ b/src/conflict.c
@@ -3,19 +3,8 @@
Written by Jakub Jelinek <jakub@redhat.com>, 2001.
Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/crc32.c b/src/crc32.c
index f36abb5..81e990b 100644
--- a/src/crc32.c
+++ b/src/crc32.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <stdint.h>
diff --git a/src/cxx.c b/src/cxx.c
index 4391ebe..4b911a9 100644
--- a/src/cxx.c
+++ b/src/cxx.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2007, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/data.c b/src/data.c
index 751f96f..d648744 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include "prelink.h"
diff --git a/src/doit.c b/src/doit.c
index 3784866..42e6819 100644
--- a/src/doit.c
+++ b/src/doit.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2003, 2004, 2005, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/dso.c b/src/dso.c
index 949abf9..9cce846 100644
--- a/src/dso.c
+++ b/src/dso.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/dwarf2.c b/src/dwarf2.c
index b9588b1..d230bb7 100644
--- a/src/dwarf2.c
+++ b/src/dwarf2.c
@@ -2,19 +2,8 @@
Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/dwarf2.h b/src/dwarf2.h
index b0c80b6..888f2c7 100644
--- a/src/dwarf2.h
+++ b/src/dwarf2.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2009, 2010, 2011, 2012 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#define DW_TAG_padding 0x00
#define DW_TAG_array_type 0x01
diff --git a/src/exec.c b/src/exec.c
index ca7fd14..431690e 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/execle_open.c b/src/execle_open.c
index 2ee5cbc..0d4bef5 100644
--- a/src/execle_open.c
+++ b/src/execle_open.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <errno.h>
diff --git a/src/execstack.c b/src/execstack.c
index 97fb453..fe044c5 100644
--- a/src/execstack.c
+++ b/src/execstack.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2003, 2005, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2003.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <errno.h>
diff --git a/src/fptr.c b/src/fptr.c
index cfe3aed..65a2804 100644
--- a/src/fptr.c
+++ b/src/fptr.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/fptr.h b/src/fptr.h
index 36ef7c6..c4ce3f7 100644
--- a/src/fptr.h
+++ b/src/fptr.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef FPTR_H
#define FPTR_H
diff --git a/src/gather.c b/src/gather.c
index 277f1b5..0e6876b 100644
--- a/src/gather.c
+++ b/src/gather.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*//

#include <config.h>
#include <assert.h>
diff --git a/src/get.c b/src/get.c
index 0659962..bb58b1e 100644
--- a/src/get.c
+++ b/src/get.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2009 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/hashtab.c b/src/hashtab.c
index fa27446..99a656d 100644
--- a/src/hashtab.c
+++ b/src/hashtab.c
@@ -2,34 +2,8 @@
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).

-This file is part of the libiberty library.
-Libiberty is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public
-License as published by the Free Software Foundation; either
-version 2 of the License, or (at your option) any later version.
-
-Libiberty 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
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with libiberty; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-/* This package implements basic hash table functionality. It is possible
- to search for an entry, create an entry and destroy an entry.
-
- Elements in the table are generic pointers.
-
- The size of the table is not fixed; if the occupancy of the table
- grows too high the hash table will be expanded.
-
- The abstract data implementation is based on generalized Algorithm D
- from Knuth's book "The art of computer programming". Hash table is
- expanded by creation of new hash table and transferring elements from
- the old table to the new table. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <sys/types.h>
diff --git a/src/hashtab.h b/src/hashtab.h
index 31e63e0..dfbe410 100644
--- a/src/hashtab.h
+++ b/src/hashtab.h
@@ -2,32 +2,8 @@
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).

-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program 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 General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/* This package implements basic hash table functionality. It is possible
- to search for an entry, create an entry and destroy an entry.
-
- Elements in the table are generic pointers.
-
- The size of the table is not fixed; if the occupancy of the table
- grows too high the hash table will be expanded.
-
- The abstract data implementation is based on generalized Algorithm D
- from Knuth's book "The art of computer programming". Hash table is
- expanded by creation of new hash table and transferring elements from
- the old table to the new table. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef __HASHTAB_H__
#define __HASHTAB_H__
diff --git a/src/layout.c b/src/layout.c
index 859ab66..29be7a3 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/layout.h b/src/layout.h
index f481d22..1b10bc0 100644
--- a/src/layout.h
+++ b/src/layout.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2004, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef LAYOUT_H
#define LAYOUT_H
diff --git a/src/main.c b/src/main.c
index 6ba89d5..39e44ad 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <errno.h>
diff --git a/src/md5.c b/src/md5.c
index 0d2fdef..f465bfd 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -4,19 +4,8 @@
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.

- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

/* Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. */

diff --git a/src/md5.h b/src/md5.h
index 55f6195..eb0b85e 100644
--- a/src/md5.h
+++ b/src/md5.h
@@ -4,19 +4,8 @@
NOTE: The canonical source of this file is maintained with the GNU C
Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.

- This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; either version 2, or (at your option) any
- later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef _MD5_H
#define _MD5_H 1
diff --git a/src/mdebug.c b/src/mdebug.c
index 4c22d2f..eb6d1b5 100644
--- a/src/mdebug.c
+++ b/src/mdebug.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/prelink.c b/src/prelink.c
index 64c4fea..bf774c9 100644
--- a/src/prelink.c
+++ b/src/prelink.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/prelink.h b/src/prelink.h
index 39c4390..4c4c243 100644
--- a/src/prelink.h
+++ b/src/prelink.h
@@ -4,19 +4,8 @@
Written by Jakub Jelinek <jakub@redhat.com>, 2001.
Updated by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef PRELINK_H
#define PRELINK_H
diff --git a/src/prelinktab.h b/src/prelinktab.h
index f41c79c..a404292 100644
--- a/src/prelinktab.h
+++ b/src/prelinktab.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef PRELINKTAB_H
#define PRELINKTAB_H
diff --git a/src/reloc-info.c b/src/reloc-info.c
index 4ce333c..d51cfc1 100644
--- a/src/reloc-info.c
+++ b/src/reloc-info.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2008 CodeSourcery
Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>

diff --git a/src/reloc-info.h b/src/reloc-info.h
index a8f8b7c..592a92c 100644
--- a/src/reloc-info.h
+++ b/src/reloc-info.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2008 CodeSourcery
Written by Maciej W. Rozycki <macro@codesourcery.com>, 2008.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef RELOC_INFO_H
#define RELOC_INFO_H
diff --git a/src/reloc.c b/src/reloc.c
index deb0abe..9883dc7 100644
--- a/src/reloc.c
+++ b/src/reloc.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2005 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/reloc.h b/src/reloc.h
index a2ceff9..ee91f7e 100644
--- a/src/reloc.h
+++ b/src/reloc.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef RELOC_H
#define RELOC_H
diff --git a/src/sha.c b/src/sha.c
index cfbc956..fb31a9e 100644
--- a/src/sha.c
+++ b/src/sha.c
@@ -6,6 +6,8 @@
Credits:
Robert Klep <robert@ilse.nl> -- Expansion function fix
NOTE: The canonical source of this file is maintained in GNU coreutils.
+
+* SPDX-License-Identifier: GPL-2.0-or-later
*/

#include <sys/types.h>
diff --git a/src/sha.h b/src/sha.h
index 13583e3..b101b1f 100644
--- a/src/sha.h
+++ b/src/sha.h
@@ -2,6 +2,8 @@
library functions.

Copyright (C) 1999, Scott G. Miller
+
+* SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef _SHA_H
diff --git a/src/space.c b/src/space.c
index 4bd4760..8223daf 100644
--- a/src/space.c
+++ b/src/space.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/space.h b/src/space.h
index 5c9f725..59d087c 100644
--- a/src/space.h
+++ b/src/space.h
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2004 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#ifndef SPACE_H
#define SPACE_H
diff --git a/src/stabs.c b/src/stabs.c
index c0a5a6a..fd0ca28 100644
--- a/src/stabs.c
+++ b/src/stabs.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2005, 2006 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/undo.c b/src/undo.c
index 4c38dab..e6cfae3 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2001, 2002, 2003, 2005, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
diff --git a/src/undoall.c b/src/undoall.c
index 55d2a0b..44a0b4e 100644
--- a/src/undoall.c
+++ b/src/undoall.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2002, 2005 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <alloca.h>
diff --git a/src/verify.c b/src/verify.c
index 7f530c0..991794a 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -1,19 +1,8 @@
/* Copyright (C) 2002, 2003, 2006, 2007, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2002.

- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+* SPDX-License-Identifier: GPL-2.0-or-later
+*/

#include <config.h>
#include <assert.h>
--
2.17.1




--
# Randy MacLeod
# Wind River Linux


Re: [meta-security][zeus][PATCH 1/1] clamav: add INSTALL_CLAMAV_CVD flag to do_install

akuster
 

On 10/6/20 6:20 PM, Charlie Davies wrote:
Recipe provides INSTALL_CLAMAV_CVD flag to bypass clamav
cvd db creation. During do_install this flag should be
used to conditionally skip install of cvd db if needed.

Signed-off-by: Charlie Davies <charles.davies@whitetree.xyz>
merged.

thanks
---
recipes-security/clamav/clamav_0.99.4.bb | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/recipes-security/clamav/clamav_0.99.4.bb b/recipes-security/clamav/clamav_0.99.4.bb
index a340b48..1ee3f58 100644
--- a/recipes-security/clamav/clamav_0.99.4.bb
+++ b/recipes-security/clamav/clamav_0.99.4.bb
@@ -102,7 +102,10 @@ do_install_append_class-target () {
install -m 0644 ${WORKDIR}/volatiles.03_clamav ${D}${sysconfdir}/default/volatiles/volatiles.03_clamav
sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/libclamav.pc
rm ${D}/${libdir}/libclamav.so
- install -m 666 ${S}/clamav_db/* ${D}/${localstatedir}/lib/clamav/.
+ if [ "${INSTALL_CLAMAV_CVD}" = "1" ]; then
+ bbnote "CLAMAV installing cvd"
+ install -m 666 ${S}/clamav_db/* ${D}/${localstatedir}/lib/clamav/.
+ fi
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)};then
install -D -m 0644 ${WORKDIR}/clamav.service ${D}${systemd_unitdir}/system/clamav.service
install -d ${D}${sysconfdir}/tmpfiles.d



Re: [meta-security][PATCH 5/7] sssd: update to latest ltm 1.16.5

akuster
 

this needs "musl-nscd" which was submitted to meta-oe if you plan on
building for musl

On 10/9/20 7:08 AM, akuster via lists.yoctoproject.org wrote:
fix musl support

Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
...defines-which-otherwise-are-availabl.patch | 32 +++++++++++++++++++
.../sssd/{sssd_1.16.4.bb => sssd_1.16.5.bb} | 8 +++--
2 files changed, 37 insertions(+), 3 deletions(-)
create mode 100644 recipes-security/sssd/files/0002-Provide-missing-defines-which-otherwise-are-availabl.patch
rename recipes-security/sssd/{sssd_1.16.4.bb => sssd_1.16.5.bb} (94%)

diff --git a/recipes-security/sssd/files/0002-Provide-missing-defines-which-otherwise-are-availabl.patch b/recipes-security/sssd/files/0002-Provide-missing-defines-which-otherwise-are-availabl.patch
new file mode 100644
index 0000000..1a22332
--- /dev/null
+++ b/recipes-security/sssd/files/0002-Provide-missing-defines-which-otherwise-are-availabl.patch
@@ -0,0 +1,32 @@
+From 37a0999e5a9f54e1c61a02a7fbab6fcd04738b3c Mon Sep 17 00:00:00 2001
+From: Armin Kuster <akuster808@gmail.com>
+Date: Thu, 8 Oct 2020 05:54:13 -0700
+Subject: [PATCH] Provide missing defines which otherwise are available on
+ glibc system headers
+
+Signed-off-by: Armin Kuster <akuster808@gmail.com>
+
+Upsteam-Status: Pending
+
+---
+ src/util/util.h | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/util/util.h b/src/util/util.h
+index 8a754dbfd..6e55b4bdc 100644
+--- a/src/util/util.h
++++ b/src/util/util.h
+@@ -76,6 +76,10 @@
+ #define MAX(a, b) (((a) > (b)) ? (a) : (b))
+ #endif
+
++#ifndef ALLPERMS
++# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
++#endif
++
+ #define SSSD_MAIN_OPTS SSSD_DEBUG_OPTS
+
+ #define SSSD_SERVER_OPTS(uid, gid) \
+--
+2.17.1
+
diff --git a/recipes-security/sssd/sssd_1.16.4.bb b/recipes-security/sssd/sssd_1.16.5.bb
similarity index 94%
rename from recipes-security/sssd/sssd_1.16.4.bb
rename to recipes-security/sssd/sssd_1.16.5.bb
index e54fa98..9784ec7 100644
--- a/recipes-security/sssd/sssd_1.16.4.bb
+++ b/recipes-security/sssd/sssd_1.16.5.bb
@@ -6,7 +6,9 @@ LICENSE = "GPLv3+"
LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"

DEPENDS = "openldap cyrus-sasl libtdb ding-libs libpam c-ares krb5 autoconf-archive"
-DEPENDS += "libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent"
+DEPENDS_append = " libldb dbus libtalloc libpcre glib-2.0 popt e2fsprogs libtevent"
+
+DEPENDS_append_libc-musl = " musl-nscd"

# If no crypto has been selected, default to DEPEND on nss, since that's what
# sssd will pick if no active choice is made during configure
@@ -19,10 +21,10 @@ SRC_URI = "https://releases.pagure.org/SSSD/${BPN}/${BP}.tar.gz \
file://fix-ldblibdir.patch \
file://0001-build-Don-t-use-AC_CHECK_FILE-when-building-manpages.patch \
file://0001-nss-Collision-with-external-nss-symbol.patch \
+ file://0002-Provide-missing-defines-which-otherwise-are-availabl.patch \
"

-SRC_URI[md5sum] = "757bbb6f15409d8d075f4f06cb678d50"
-SRC_URI[sha256sum] = "6bb212cd6b75b918e945c24e7c3f95a486fb54d7f7d489a9334cfa1a1f3bf959"
+SRC_URI[sha256sum] = "2e1a7bf036b583f686d35164f2d79bdf4857b98f51fe8b0d17aa0fa756e4d0c0"

inherit autotools pkgconfig gettext python3-dir features_check systemd




Re: [meta-security][PATCH 1/3] initramfs-framework/dmverity: add retry loop for slow boot devices

akuster
 

On 10/1/20 7:53 PM, Naveen Saini wrote:
Detection of USB devices by the kernel is slow enough. We need to
keep trying for a while (default: 5s seconds, controlled by roottimeout=<seconds>)
and sleep between each attempt (default: one second, rootdelay=<seconds>).

Fix is based on https://git.yoctoproject.org/cgit.cgi/poky/commit/meta/recipes-core/initrdscripts/initramfs-framework/rootfs?id=ee6a6c3461694ce09789bf4d852cea2e22fc95e4

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
.../initramfs-framework/dmverity | 64 +++++++++++--------
1 file changed, 37 insertions(+), 27 deletions(-)
series merge.

thanks

diff --git a/recipes-core/initrdscripts/initramfs-framework/dmverity b/recipes-core/initrdscripts/initramfs-framework/dmverity
index bb07aab..888052c 100644
--- a/recipes-core/initrdscripts/initramfs-framework/dmverity
+++ b/recipes-core/initrdscripts/initramfs-framework/dmverity
@@ -10,33 +10,43 @@ dmverity_run() {

. /usr/share/misc/dm-verity.env

- case "${bootparam_root}" in
- ID=*)
- RDEV="$(realpath /dev/disk/by-id/${bootparam_root#ID=})"
- ;;
- LABEL=*)
- RDEV="$(realpath /dev/disk/by-label/${bootparam_root#LABEL=})"
- ;;
- PARTLABEL=*)
- RDEV="$(realpath /dev/disk/by-partlabel/${bootparam_root#PARTLABEL=})"
- ;;
- PARTUUID=*)
- RDEV="$(realpath /dev/disk/by-partuuid/${bootparam_root#PARTUUID=})"
- ;;
- PATH=*)
- RDEV="$(realpath /dev/disk/by-path/${bootparam_root#PATH=})"
- ;;
- UUID=*)
- RDEV="$(realpath /dev/disk/by-uuid/${bootparam_root#UUID=})"
- ;;
- *)
- RDEV="${bootparam_root}"
- esac
-
- if ! [ -b "${RDEV}" ]; then
- echo "Root device resolution failed"
- exit 1
- fi
+ C=0
+ delay=${bootparam_rootdelay:-1}
+ timeout=${bootparam_roottimeout:-5}
+ RDEV="$(realpath /dev/disk/by-partuuid/${bootparam_root#PARTUUID=})"
+ while [ ! -b "${RDEV}" ]; do
+ if [ $(( $C * $delay )) -gt $timeout ]; then
+ fatal "Root device resolution failed"
+ exit 1
+ fi
+
+ case "${bootparam_root}" in
+ ID=*)
+ RDEV="$(realpath /dev/disk/by-id/${bootparam_root#ID=})"
+ ;;
+ LABEL=*)
+ RDEV="$(realpath /dev/disk/by-label/${bootparam_root#LABEL=})"
+ ;;
+ PARTLABEL=*)
+ RDEV="$(realpath /dev/disk/by-partlabel/${bootparam_root#PARTLABEL=})"
+ ;;
+ PARTUUID=*)
+ RDEV="$(realpath /dev/disk/by-partuuid/${bootparam_root#PARTUUID=})"
+ ;;
+ PATH=*)
+ RDEV="$(realpath /dev/disk/by-path/${bootparam_root#PATH=})"
+ ;;
+ UUID=*)
+ RDEV="$(realpath /dev/disk/by-uuid/${bootparam_root#UUID=})"
+ ;;
+ *)
+ RDEV="${bootparam_root}"
+ esac
+ debug "Sleeping for $delay second(s) to wait root to settle..."
+ sleep $delay
+ C=$(( $C + 1 ))
+
+ done

veritysetup \
--data-block-size=1024 \


1561 - 1580 of 52544