FS#71331 - Incorrect and incomplete licence information for binutils

Attached to Project: Arch Linux
Opened by Repentinus (Repentinus) - Tuesday, 22 June 2021, 06:09 GMT
Last edited by freswa (frederik) - Sunday, 20 February 2022, 21:04 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Giancarlo Razzolini (grazzolini)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

# Description

binutils-2.36.1-3 declares itself to be under the GPL-2.0-or-later ('GPL' in the PKGBUILD). This is incorrect as all the binaries in this package identify their licenses as the GPL-3.0-or-later ('GPL3').

It is also incomplete, as
* there are a couple of header files in this build that are licensed under the GPL-2.0-or-later;
* all the documentation appears to be licensed under the GFDL-1.3-no-invariants-or-later ('FDL1.3');
* and a bunch of script files are licensed under an old version of the [FSF All Permissive License](https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html) without a warranty disclaimer.

So the proper array should be something like `license=('GPL3' 'GPL' 'FDL1.3' 'custom:FSFAP-no-warranty-disclaimer')`.

The FSF All Permissive License can be extracted in `build()` like this:

```
# Extract the FSF All Permissive License
# <https://www.gnu.org/prep/maintain/html_node/License-Notices-for-Other-Files.html>
# used for some linker scripts.
tail -n 5 ../ld/scripttempl/README > FSFAP-no-warranty-disclaimer
```

In `package()` it can then be installed like this:

```
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" FSFAP-no-warranty-disclaimer
```

# Steps to reproduce

* Run all the binaries as `./binary --version` to confirm they are licensed under the GPL-3.0-or-later.
* Inspect `usr/include/{ansidecl.h,symcat.h}` to confirm these two files are licensed under the GPL-2.0-or-later.
* Inspect man and info pages in `usr/share/{man,info}/` to confirm these are licensed under the GFDL-1.3-no-invariants-or-later.
* Inspect anything in `usr/lib/ldscripts/` to verify they are licensed under the GNU All Permissive License.

The attached `collect.sh` takes the package archive as its sole argument, untars it, collects the relevant copyright statements to "$1.copyrights", and removes the unpacked `usr/` tree. Output for this package is also attached to the bug report.

# Additional information

Every binutils package in community is also affected. I will run my script and also open a bug report on the right bug tracker for those as it is possible that they lack the GPL-2.0-or-later code.
This task depends upon

Closed by  freswa (frederik)
Sunday, 20 February 2022, 21:04 GMT
Reason for closing:  Implemented
Additional comments about closing:  revision 437821
Comment by Repentinus (Repentinus) - Tuesday, 22 June 2021, 07:22 GMT
`tail -n 5 ../ld/scripttempl/README > FSFAP-no-warranty-disclaimer` should likely be `tail -n 5 "$srcdir/ld/scripttempl/README" > FSFAP-no-warranty-disclaimer`.

Loading...