mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH v3 2/2] binutils: add license information
Date: Mon, 12 Dec 2022 23:17:26 +0100	[thread overview]
Message-ID: <20221212221726.3643397-2-rhi@pengutronix.de> (raw)
In-Reply-To: <20221212221726.3643397-1-rhi@pengutronix.de>

Only readelf and objdump are installed to the target, but they are
statically linked to the bundled zlib, libbfd, libctf, libiberty, and
libopcodes, which don't have the same licenses. Try a divide-and-conquer
strategy here to keep the clarity.

libiberty includes an "unknown" portion in libiberty/xatexit.c, which
only carries the following lines:

    | /*
    |  * Copyright (c) 1990 Regents of the University of California.
    |  * All rights reserved.
    |  *
    |  * %sccs.include.redist.c%
    |  */

Reported-by: Felicitas Jung <f.jung@pengutronix.de>
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
---
PATCH v3:
 - unravel the sub-libs into clearly arranged license statements
 - this is the last patch that remained open from the original PULL v1.

PATCH v2: https://lore.ptxdist.org/ptxdist/20211205004208.2306245-13-rhi@pengutronix.de
 - use "custom-exception" instead of "unknown"
 - rebase to current master, review and adapt MD5 sums accordingly

PULL v1: https://lore.ptxdist.org/ptxdist/20200527112204.ll7ij44ahllid6ip@pengutronix.de
---
 rules/binutils.make | 56 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/rules/binutils.make b/rules/binutils.make
index 20bb5d60f700..aed4d9226b35 100644
--- a/rules/binutils.make
+++ b/rules/binutils.make
@@ -23,6 +23,62 @@ BINUTILS_URL		:= $(call ptx/mirror, GNU, binutils/$(BINUTILS).$(BINUTILS_SUFFIX)
 BINUTILS_SOURCE		:= $(SRCDIR)/$(BINUTILS).$(BINUTILS_SUFFIX)
 BINUTILS_DIR		:= $(BUILDDIR)/$(BINUTILS)
 
+# License statements are in the same order as the source files below.
+BINUTILS_BFD_LICENSE		:= GPL-3.0-or-later
+BINUTILS_BFD_LICENSE_FILES	:= \
+	file://bfd/bfd.c;startline=5;endline=15;md5=b7b581fedc11dc385067404eaeae9800 \
+	file://COPYING3;md5=d32239bcb673463ab874e80d47fae504
+
+BINUTILS_LIBCTF_LICENSE		:= GPL-3.0-or-later AND LGPL-2.1-or-later
+BINUTILS_LIBCTF_LICENSE_FILES	:= \
+	file://libctf/ctf-util.c;startline=6;endline=14;md5=38a5e03a16917995968d6d736de395db \
+	file://libctf/ctf-qsort_r.c;endline=13;md5=e149b8b69a7204f8ac2fe93ab123f31d \
+	file://COPYING3;md5=d32239bcb673463ab874e80d47fae504
+
+BINUTILS_LIBIBERTY_LICENSE	:= \
+	LGPL-2.0-or-later AND \
+	LGPL-2.1-or-later AND \
+	GPL-2.0-or-later AND \
+	GPL-2.0-or-later WITH custom-exception AND \
+	BSD-3-Clause AND \
+	unknown
+BINUTILS_LIBIBERTY_LICENSE_FILES := \
+	file://libiberty/argv.c;startline=5;endline=14;md5=08db703b891f91d3a8fc9999542179af \
+	file://libiberty/regex.c;startline=6;endline=17;md5=c72bdec9ed083f08c5b1bc8632a3e979 \
+	file://libiberty/lrealpath.c;startline=4;endline=16;md5=0aa876bb807f8967dccce7a9817f258e \
+	file://libiberty/stack-limit.c;startline=2;endline=24;md5=c60505f167a6feb04717588ba816be47 \
+	file://libiberty/bsearch_r.c;startline=2;endline=28;md5=5667e8fce08f09ba2e25add9e9a6e473 \
+	file://libiberty/xatexit.c;startline=2;endline=3;md5=41d62d5f9e9ca92a606810e6f166ff67 \
+	file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674 \
+	file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552
+	# note: no LGPL-2.1-or-later text is bundled with the tarball
+
+BINUTILS_LIBINTL_LICENSE	:= GPL-2.0-or-later
+BINUTILS_LIBINTL_LICENSE_FILES	:= \
+	file://intl/gettext.c;startline=2;endline=12;md5=8139932faceda74df576a94577fd3278 \
+	file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552
+
+BINUTILS_OPCODES_LICENSE	:= GPL-3.0-or-later
+BINUTILS_OPCODES_LICENSE_FILES	:= \
+	file://opcodes/disassemble.c;startline=4;endline=14;md5=0bc0a7deb30bb3bb26b635969252f69b \
+	file://COPYING3;md5=d32239bcb673463ab874e80d47fae504
+
+# note: currently only objdump and readelf (GPL-3.0-or-later) are installed
+BINUTILS_LICENSE		:= \
+	GPL-3.0-or-later AND \
+	($(BINUTILS_LIBCTF_LICENSE)) AND \
+	($(BINUTILS_LIBINTL_LICENSE)) AND \
+	($(BINUTILS_LIBIBERTY_LICENSE))
+# remove duplicates via $(sort)
+BINUTILS_LICENSE_FILES		:= \
+	file://binutils/readelf.c;startline=2;endline=17;md5=6648f535c93eb66f65b8f07e6682999f \
+	file://binutils/objdump.c;startline=2;endline=14;md5=6e71d2f00adf38566c920ff03e9b05c8 \
+	$(sort \
+		$(BINUTILS_LIBCTF_LICENSE_FILES) \
+		$(BINUTILS_LIBINTL_LICENSE_FILES) \
+		$(BINUTILS_LIBIBERTY_LICENSE_FILES) \
+	)
+
 # ----------------------------------------------------------------------------
 # Prepare
 # ----------------------------------------------------------------------------
-- 
2.30.2




  reply	other threads:[~2022-12-12 22:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 22:17 [ptxdist] [PATCH v3 1/2] binutils: build with system zlib Roland Hieber
2022-12-12 22:17 ` Roland Hieber [this message]
2022-12-12 22:26   ` [ptxdist] [PATCH v3 2/2] binutils: add license information Roland Hieber
2022-12-15  8:33     ` Michael Olbrich
2023-01-03 11:08 ` [ptxdist] [APPLIED] binutils: build with system zlib Michael Olbrich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221212221726.3643397-2-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox