Community Packages

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#71332 - Incorrect and incomplete licence information for *-binutils

Attached to Project: Community Packages
Opened by Repentinus (Repentinus) - Tuesday, 22 June 2021, 07:16 GMT
Last edited by Morten Linderud (Foxboron) - Thursday, 24 June 2021, 08:57 GMT
Task Type Bug Report
Category Packages
Status Assigned
Assigned To Jakob Gruber (schuay)
Anatol Pomozov (anatolik)
Felix Yan (felixonmars)
Eli Schwartz (eschwartz)
Filipe Laíns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


# Description

All binutils packages declare themselves to be under the GPL-2.0-or-later ('GPL' in the PKGBUILD). This is incorrect as all the binaries in these package identify their licenses as the GPL-3.0-or-later ('GPL3').

This is also incomplete for all these packages as
* all the documentation appears to be licensed under the GFDL-1.3-no-invariants-or-later ('FDL1.3');
* and a bunch of script files in all the packages are licensed under an old version of the [FSF All Permissive License]( without a warranty disclaimer.

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

The affected packages are:

* aarch64-linux-gnu-binutils-2.36.1-1
* arm-none-eabi-binutils-2.36.1-2
* avr-binutils-2.36.1-2
* lm32-elf-binutils-2.36.1-2
* mingw-w64-binutils-2.36.1-1
* nds32le-elf-binutils-2.36.1-2
* or1k-elf-binutils-2.36.1-2
* ppc64le-elf-binutils-2.36.1-2
* riscv32-elf-binutils-2.36.1-2
* riscv64-elf-binutils-2.36.1-2
* riscv64-linux-gnu-binutils-2.36.1-1
* sh2-elf-binutils-2.36.1-2
* sh4-elf-binutils-2.36.1-2

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

# Extract the FSF All Permissive License
# <>
# 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 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/gnu_triplet/lib/ldscripts/` to verify they are licensed under the GNU All Permissive License.

The attached `` 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 all the packages is attached to the bug report. Variations in structure mean that 'avr-binutils-2.36.1-2' and 'mingw-w64-binutils-2.36.1-1' require manual inspection of the package contents to confirm my claims.

# Additional information

binutils in core is [also affected](, but the license array for that package should have more entries than here.
This task depends upon