Hello community,

here is the log from the commit of package kernel-firmware for openSUSE:Factory 
checked in at 2019-08-23 11:04:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kernel-firmware (Old)
 and      /work/SRC/openSUSE:Factory/.kernel-firmware.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kernel-firmware"

Fri Aug 23 11:04:16 2019 rev:127 rq:724953 version:20190815

Changes:
--------
--- /work/SRC/openSUSE:Factory/kernel-firmware/kernel-firmware.changes  
2019-07-21 11:32:42.244793925 +0200
+++ 
/work/SRC/openSUSE:Factory/.kernel-firmware.new.7948/kernel-firmware.changes    
    2019-08-23 11:04:39.386503094 +0200
@@ -1,0 +2,70 @@
+Wed Aug 21 07:15:38 UTC 2019 - [email protected]
+
+- Update to version 20190815 (git-commit 07b925b450bf):
+  * Install only listed firmware files
+  * rtw88: add a README file
+  * rtw88: RTL8822C: add WoW firmware v7.3
+  * rtw88: RTL8822C: update rtw8822c_fw.bin to v7.3
+  * ath10k: QCA9984 hw1.0: update board-2.bin
+  * ath10k: QCA9984 hw1.0: update firmware-5.bin to 10.4-3.9.0.2-00046
+  * ath10k: QCA988X hw2.0: update firmware-5.bin to 10.2.4-1.0-00045
+  * ath10k: QCA9888 hw2.0: update board-2.bin
+  * ath10k: QCA9888 hw2.0: update firmware-5.bin to 10.4-3.9.0.2-00040
+  * ath10k: QCA9887 hw1.0: update firmware-5.bin to 10.2.4-1.0-00045
+  * ath10k: QCA6174 hw3.0: update firmware-6.bin to 
WLAN.RM.4.4.1-00140-QCARMSWPZ-1
+  * ath10k: QCA4019 hw1.0: update board-2.bin
+  * cxgb4: update firmware to revision 1.24.3.0
+  * nfp: update Agilio SmartNIC flower firmware to rev AOTC-2.10.A.38
+  * nvidia: add missing entries in WHENCE
+  * linux-firmware: Update NXP Management Complex firmware to version 10.16.2
+  * iwlwifi: update -48 FWs for Qu and cc
+  * iwlwifi: update FWs for 3168, 7265D, 9000, 9260, 8000, 8265 and cc
+  * drm/i915/firmware: Add v33 of GuC for ICL
+  * drm/i915/firmware: Add v33 of GuC for KBL
+  * drm/i915/firmware: Add v33 of GuC for SKL
+  * drm/i915/firmware: Add v33 of GuC for GLK
+  * drm/i915/firmware: Add v33 of GuC for BXT
+- Drop iwlwifi revert patch, as the fix will go into 5.2.x kernel
+  (bsc#1142128):
+  WHENCE-iwlwifi-9xxx-46-revert.patch
+- Drop the deprecated upstream fix:
+  0001-nvidia-add-missing-entries-in-WHENCE.patch
+- Drop the local copy of copy-file.sh that is already included in
+  the latest linux-git tarball
+
+-------------------------------------------------------------------
+Mon Aug 19 17:30:06 CEST 2019 - [email protected]
+
+- Re-group some entries for USB hotpluggable network drivers into
+  kernel-firmware-usb-network subpackage, while moving ath10k and
+  mwifiex firmware into the own subpackage, too
+
+-------------------------------------------------------------------
+Thu Jul 25 07:28:47 CEST 2019 - [email protected]
+
+- Move documents and license texts into the proper section
+- Remove spurious non-firmware files
+- Restructure the packaging for reducing the storage footprint
+  (bsc#1143959):
+  the firmware files are split into several subpackages, so that user
+  doesn't need to install unnecessary files.  Each package has
+  supplements entries that are generated from the static list (that
+  was created from the current and old TW kernel binaries).
+  There is a catch-all package, kernel-firmware-all, and this
+  provides/obsoletes the former kernel-firmware package.  And each
+  firmware file is compressed in XZ format for the new kernel (5.3 or
+  later).
+
+  For the systems with older kernels, we still provide the old'n'good
+  kernel-firmware.rpm, containing everything in the raw format, too.
+  This kernel-firmware.rpm will be obsoleted once when
+  kernel-firmware-all above is installed.
+
+  The build of both flavors are done in the multibuild.  Without the
+  flavor, the raw kernel-firmware.rpm and ucode-amd.rpm are built,
+  while the new kernel firmware packages are built in "compressed"
+  flavor (-M compressed).
+- Upstream fix for missing WHENCE entries:
+  0001-nvidia-add-missing-entries-in-WHENCE.patch
+
+-------------------------------------------------------------------

Old:
----
  WHENCE-iwlwifi-9xxx-46-revert.patch
  iwlwifi-9000-pu-b0-jf-b0-46.ucode
  iwlwifi-9260-th-b0-jf-b0-46.ucode
  iwlwifi-sha1sum
  kernel-firmware-20190712.tar.xz

New:
----
  README.build
  _multibuild
  aliases.list
  check-topic.py
  extrawhence
  fwtopics.py
  get_supplements.sh
  install-split.sh
  kernel-firmware-20190815.tar.xz
  kernel-firmware.spec.in
  licenses.list
  list-license.sh
  makespec.sh
  topicdefs
  topicprovs
  topics.list
  update-aliases.py

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kernel-firmware.spec ++++++
++++ 5688 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/kernel-firmware/kernel-firmware.spec
++++ and 
/work/SRC/openSUSE:Factory/.kernel-firmware.new.7948/kernel-firmware.spec

++++++ README.build ++++++
FILES
=====

topicdefs:
        Definitions of each flavor (topic) and description;
        the description is filled into spec file

topicprovs:
        Additional Provides and Obsoletes of each topic

topics.list:
        Mapping between WHENCE entries and topics.
        Each line consists of two or more items.  The first column is
        the first word of the WHENCE "Driver:" entry line to match.
        The second column is the topic/flavor, and the rest columns
        are the module names.  If no module name is provided, the same
        word as the first column is used as the module name.

        The validity with the latest kernel binary packages can be
        checked with check-topic.py script below.

licenses.list:
        List of license files for each WHENCE entry.

aliases.list:
        List of module aliases for each module.
        This is updated by update-alises.py script below.

extrawhence:
        Additional WHENCE entries for the own firmware files.

kernel-firmware.spec.in:
        The spec file template.  Edit this and generate
        kernel-firmware.spec dynamically via makespec.sh script.

makespec.sh:
        A script to combine the spec template and other info into the
        final kernel-firmware.spec.

check-topic.py:
        A program to check the validity of topics.list.  Pass the
        latest WHENCE file and the kernel RPM files to verify.

update-aliases.py:
        A program to update aliases.list from the latest kernel RPM
        files.  Pass kernel RPM files as arguments.

copy-firmware.sh:
        A helper script to copy the all listed files in WHENCE to the
        destination directory.  Used for raw catch-all installation.

install-split.sh:
        A helper script to copy the files based on WHENCE like the
        above, but also to create a file list for each topic in
        files-$TOPIC file.  The installed files are compressed with
        xz, as well as symlinks.

list-license.sh:
        A helper script to add file list entries for the corresponding
        license files for each topic.  It parses licenses.list.

get_supplements.sh:
        A helper script to create Supplements entries for each topic
        from aliases.list above.


MAINTENANCE WORKS
=================

Upon the update of linux-firmware.git
-------------------------------------

update the kernel-firmware tarball as usual:

% cd linux-firmware
% git archive --format=tar --prefix=kernel-firmware-$version/ -v master ./ \
  | xz -9 -M 4G --check=crc32 -T 4 > /tmp/kernel-firmware-$version.tar.xz

Run check-topic.py to verify whether new entries are added:

% python3 ./check-topic.py /somewhere/WHENCE /rpms/kernel-default-*.rpm

Update topics.list accordingly if new entry was added or updated in
WHENCE:

If new modules are added, update aliases.list as well:

% python3 ./update-aliases.py /rpms/kernel-default-*.rpm

After the update of these files, recreate kernel-firmware.spec by
makespec.sh script:

% sh ./makespec.sh 20190712 < kernel-firmware.spec.in > kernel-firmware.spec

where the argument is the version of the kernel firmware package.

And, don't forget to update kernel-firmware.changes accordingly.


Upon the update of kernel binary rpms
-------------------------------------

Again, run check-topic.py and update-aliases.py for the new kernel RPM
files, and rebuild kernel-firmware.spec.


Adding own firmware binaries
----------------------------

The new packaging relies purely on WHENCE file for counting the
installed files.  You have to either patch WHENCE file or put your own
stuff into extrawhence file, at least with "Driver:" and "File"
entries.  The extrawhence file is concatenated to WHENCE file at
building a package.


Creating a new kernel-firmware subpackage flavor
------------------------------------------------

Edit topicdefs file and add the new entry, and update topics.list and
licenses.list accordingly (these have to be updated manually).
++++++ _multibuild ++++++
<multibuild>
  <package>compressed</package>
</multibuild>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.3XQege/_old  2019-08-23 11:04:43.826502371 +0200
+++ /var/tmp/diff_new_pack.3XQege/_new  2019-08-23 11:04:43.830502371 +0200
@@ -1,4 +1,4 @@
 <servicedata>
 <service name="tar_scm">
             <param 
name="url">https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git</param>
-          <param 
name="changesrevision">d52556e4592e64023157a83fb0f483661f23ac0e</param></service></servicedata>
\ No newline at end of file
+          <param 
name="changesrevision">07b925b450bfb4cf3e141c612ec5b104658cd020</param></service></servicedata>
\ No newline at end of file

++++++ aliases.list ++++++
++++ 4863 lines (skipped)


++++++ check-topic.py ++++++
#!/usr/bin/python3
#
# A program to check the validity of topics.list
#
# usage: check-topic.py WHENCE KERNEL-RPMs...
#

from sys import argv
from fwtopics import FWTopics

if __name__ == '__main__':
    fw = FWTopics()
    argv.pop(0)
    fw.parse_whence(argv.pop(0))
    for arg in argv:
        fw.scan_firmware(arg, fw.check_module())
++++++ extrawhence ++++++
--------------------------------------------------------------------------

Driver: ast - A-Speed graphics driver

Files: ast_dp501_fw.bin

Generated from header file of xf86-video-ast: MIT/X11 License

--------------------------------------------------------------------------

Driver: qla2xxx - QLogic firmware

Files: ql2600_fw.bin
Files: ql2700_fw.bin
Files: ql8300_fw.bin

++++++ fwtopics.py ++++++
#!/usr/bin/python3

import sys, string, os, re, subprocess, tempfile, fnmatch

class FWTopics(object):
    def __init__(self):
        self.topics = {}
        self.firmwares = {}
        self.aliases = {}
        self.modules = {}
        self.modmap = {}
        self.dirty = False
        self.read_topics()

    def kernel_binary_rpm(self, file):
        file = os.path.basename(file)
        if not fnmatch.fnmatch(file, 'kernel*.rpm'):
            return False
        blacklist = ( '*.noarch.rpm', '*.src.rpm', '*.nosrc.rpm',
                      '*-debuginfo*', '*-debugsource*',
                      '*-devel-*', '*-hmac-*',
                      'kernel-docs*', 'kernel-syms-*' )
        for p in blacklist:
            if fnmatch.fnmatch(file, p):
                return False
        return True

    def modinfo(self, ko, attr):
        return subprocess.check_output(['/usr/sbin/modinfo', '-F', attr, 
ko]).decode('utf-8').split('\n')
    
    def canon_module(self, name):
        return re.sub('-', '_', name)

    def read_topics(self):
        with open('topics.list', 'r') as f:
            for t in f.read().split('\n'):
                t.rstrip()
                if t == '':
                    continue
                if re.match('#', t):
                    continue
                l = t.split()
                first = re.sub(r':$', '', l.pop(0))
                topic = l.pop(0)
                self.topics[first] = topic
                if l == []:
                    m = self.canon_module(first)
                    self.modules[first] = [ m ]
                    self.modmap[m] = topic
                else:
                    self.modules[first] = []
                    for m in l:
                        m = self.canon_module(m)
                        self.modules[first].append(m)
                        self.modmap[m] = topic
                # print(first, topic, self.modules[first])

    def read_aliases(self):
        with open('aliases.list', 'r') as f:
            for t in f.read().split('\n'):
                t.rstrip()
                if t == '':
                    continue
                l = t.split()
                module = re.sub(r':$', '', l.pop(0))
                if self.aliases.get(module) == None:
                    self.aliases[module] = []
                self.aliases[module].append(l.pop(0))

    def write_aliases(self):
        if self.dirty:
            print('updating aliases...')
            with open('aliases.list', 'w') as f:
                for t in sorted(self.aliases.keys()):
                    for m in sorted(self.aliases[t]):
                        f.write(t + ': ' + m + '\n')
            self.dirty = False

    def parse_whence(self, file):
        with open(file, 'r') as f:
            for t in f.read().split('\n'):
                t.rstrip()
                if t == '':
                    continue
                if re.match('----', t):
                    first = None
                elif re.match('Driver:', t):
                    t = re.sub(r'^Driver: *', '', t)
                    first = t.split()[0]
                    first = re.sub(r':.*$', '', first)
                    if self.topics.get(first) == None:
                        print('No matching topic entry for:', t)
                        first = None
                    elif re.match(r'File:', t):
                        if first == None:
                            continue
                        t = re.sub(r'^File: *', '', t)
                        t = re.sub('"', '', t)
                        self.firmwares[t] = first
                    elif re.match(r'Link:', t):
                        if first == None:
                            continue
                        t = re.sub(r'^Link: *', '', t)
                        t = re.sub(r' ->.*$', '', t)
                        t = re.sub('"', '', t)
                        self.firmwares[t] = first

    def check_module(self):
        def __check_module(ko, name):
            for f in self.modinfo(ko, 'firmware'):
                if f == '':
                    continue
                first = self.firmwares.get(f)
                if first != None:
                    if self.topics[first] == 'SKIP':
                        continue
                    if not name in self.modules[first]:
                        print('Module', name, 'is missing for', first)
                        print('  firmware:', f)
        return __check_module

    def update_alias(self):
        def __update_alias(ko, name):
            if self.modmap.get(name) != None and self.modmap[name] != 'SKIP':
                for f in self.modinfo(ko, 'alias'):
                    if f == '':
                        continue
                    if self.aliases.get(name) == None:
                        self.aliases[name] = []
                    if not f in self.aliases[name]:
                        self.aliases[name].append(f)
                        self.dirty = True
                        print('adding alias', name, f)
        return __update_alias

    def scan_firmware_dir(self, dir, proc):
        for root, dirs, files in os.walk(dir):
            for p in files:
                ko = os.path.join(root, p)
                name = re.sub(r'\.xz$', '', p)
                if not fnmatch.fnmatch(name, '*.ko'):
                    continue
                name = re.sub(r'\.ko$', '', name)
                name = self.canon_module(name)
                proc(ko, name)

    def scan_firmware_rpm(self, rpm, proc):
        if not self.kernel_binary_rpm(rpm):
            return
        with tempfile.TemporaryDirectory() as dir:
            subprocess.call('rpm2cpio ' + rpm + ' | cpio -i --make-directories 
-D ' + dir,
                            shell=True)
            self.scan_firmware_dir(dir, proc)

    def scan_firmware(self, arg, proc):
        if os.path.isdir(arg):
            self.scan_firmware_dir(arg, proc)
        else:
            self.scan_firmware_rpm(arg, proc)
++++++ get_supplements.sh ++++++
#!/bin/sh
#
# Generate modalias Supplements lines for the given kernel-firmware topic
#

target=$1
modules=""

sorted_modules () {
    for m in $*; do
        m=$(echo $m | sed -e's/-/_/g')
        echo $m
    done | sort | uniq
}

while read first topic mods; do
    if [ "$topic" = "$target" ]; then
        first=${first%:}
        if [ -z "$mods" ]; then
            modules="$modules $first"
        else
            modules="$modules $mods"
        fi
    fi
done < topics.list

smodules=$(sorted_modules $modules)

for m in $smodules; do
    grep '^'$m':' aliases.list | sed -e's/^.*: \(.*\)$/Supplements:    
modalias(\1)/g'
done | sort | uniq

exit 0
++++++ install-split.sh ++++++
#!/bin/sh
#
# Read WHENCE from stdin and install the compressed firmware files into DESTDIR.
# The file list for each topic is created as well.
#
# usage: install-split.sh topics.list DESTDIR < WHENCE
# 

topics="$1"
DESTDIR="$2"
fwdir=/lib/firmware
dest=$DESTDIR/$fwdir

do_compress=1

if [ -n "$do_compress" ]; then
    cext=".xz"
else
    cext=""
fi

make_dirs () {
    local f="$1"
    mkdir -p $(dirname "$dest/$f")
    local d=$(dirname "$f")
    if [ "$d" != "." ]; then
        while true; do
            if ! grep -q '%dir '"$fwdir/$d"'$' files-$topic; then
                echo "%dir $fwdir/$d" >> files-$topic
            fi
            case "$d" in
                */*) d=${d%/*};;
                *) break;;
            esac
        done
    fi
}

copy_link () {
    local f="$1"
    test -f "$dest/$f$cext" && return
    local lf=$(readlink "$f")
    make_dirs "$f"
    ln -sf "$lf$cext" "$dest/$f$cext"
    echo "\"$fwdir/$f$cext\"" >> files-$topic
}

copy_file () {
    local f="$1"
    test -f "$dest/$f$cext" && return
    make_dirs "$f"
    install -c -m 0644 "$f" $(dirname "$dest/$f")
    test -n "$do_compress" && xz -f -C crc32 "$dest/$f"
    echo "\"$fwdir/$f$cext\"" >> files-$topic
}

sub="xxx"
while read l; do
    test -z "$l" && continue
    case "$l" in
        ----*)
            sub=""
            topic=""
            ;;
        Driver:*)
            test -n "$sub" && continue
            sub=$(echo "$l" | sed -e's/Driver: *//' -e's/[ :].*$//')
            m=$(grep -m1 "^$sub": "$topics" | sed -e's/^.*:[[:space:]]*//')
            test -z "$m" && continue
            set -- $m
            topic="$1"
            if [ "$topic" = "SKIP" ]; then
                continue
            fi
            if [ -n "$topic" ]; then
                if [ ! -s files-$topic ]; then
                    echo "%dir /lib/firmware" > files-$topic
                fi
            fi
            ;;
        File:*)
            test "$topic" = "SKIP" && continue
            if [ -z "$topic" ]; then
                echo "ERROR: no topic found for $l"
                exit 1
            fi
            f=$(echo "$l" | sed -e's/^File: *//' -e's/"//g')
            if [ -L "$f" ]; then
                copy_link "$f"
            else
                copy_file "$f"
            fi
            ;;
        Link:*)
            test "$topic" = "SKIP" && continue
            if [ -z "$topic" ]; then
                echo "ERROR: no topic found for $l"
                exit 1
            fi
            f=$(echo "$l" | sed -e's/^Link: *//' -e's/ ->.*$//')
            copy_link "$f"
            ;;
    esac
done
++++++ kernel-firmware-20190712.tar.xz -> kernel-firmware-20190815.tar.xz ++++++
/work/SRC/openSUSE:Factory/kernel-firmware/kernel-firmware-20190712.tar.xz 
/work/SRC/openSUSE:Factory/.kernel-firmware.new.7948/kernel-firmware-20190815.tar.xz
 differ: char 27, line 1

++++++ kernel-firmware.spec.in ++++++
#
# spec file for package kernel-firmware
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global flavor @BUILD_FLAVOR@%{nil}

%define __ksyms_path ^/lib/firmware
%define version_unconverted @@VERSION@@

Name:           kernel-firmware
Version:        @@VERSION@@
Release:        0
Summary:        Linux kernel firmware files
License:        SUSE-Firmware AND GPL-2.0-only AND GPL-2.0-or-later AND MIT
Group:          System/Kernel
URL:            
https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/
# Created with umask 022; cd /_tmp
# After git clone 
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
# cd linux-firmware
# git archive --format=tar --prefix=kernel-firmware-$version/ -v master ./ | xz 
-9 -M 4G --check=crc32 -T 4 > /tmp/kernel-firmware-$version.tar.xz
#
Source0:        kernel-firmware-%{version}.tar.xz
Source1:        extrawhence
Source2:        ast_dp501_fw.bin
Source8:        ql2600_fw.bin
Source9:        ql2700_fw.bin
Source10:       ql8300_fw.bin
Source99:       %{name}-rpmlintrc
# install / build infrastructure
Source1001:     install-split.sh
Source1002:     list-license.sh
Source1003:     get_supplements.sh
Source1004:     topics.list
Source1005:     licenses.list
Source1006:     aliases.list
Source1007:     topicdefs
Source1008:     topicprovs
Source1009:     kernel-firmware.spec.in
Source1010:     makespec.sh
Source1011:     fwtopics.py
Source1012:     check-topic.py
Source1013:     update-aliases.py
Source1014:     README.build
BuildRequires:  fdupes
BuildRequires:  suse-module-tools
Requires(post): coreutils
Requires(postun): coreutils
BuildArch:      noarch
@@ALLPROVS@@
Provides:       compat-wireless-firmware = 4.4
Obsoletes:      compat-wireless-firmware < 4.4

%description
This package contains the raw uncompressed firmware files for Linux kernel
drivers.  This package is provided only for compatibility with older kernels
that do not support the compressed format.

%package -n ucode-amd
Summary:        Microcode updates for AMD CPUs
Group:          System/Kernel
Requires(post): coreutils
Requires(postun): coreutils
# new style (after 3.12 kernel somewhen)
Supplements:    modalias(cpu:type%%3Ax86*ven0002*)
# old style (before 3.16 kernel)
Supplements:    
modalias(x86cpu:vendor%%3A0002%%3Afamily%%3A*%%3Amodel%%3A*%%3Afeature%%3A*)

%description -n ucode-amd
This package contains the microcode files used by AMD CPUs.

%package all
Summary:        Compatibility metapackage for kernel firmware files
Group:          System/Kernel
Requires(post): coreutils
Requires(postun): coreutils
Provides:       kernel-firmware = %{version}
Obsoletes:      kernel-firmware <= %{version}
Conflicts:      kernel < 5.3
Provides:       compat-wireless-firmware = 4.4
Obsoletes:      compat-wireless-firmware < 4.4
@@SUBPKGLIST@@

%description all
This package is a catch-all compatibility metapackage for providing
all files that have been provided by kernel-firmware package.

@@SUBPACKAGES@@

%prep
%setup -q
# additional firmwares
cat %{SOURCE1} >> WHENCE
cp %{SOURCE2} %{SOURCE8} %{SOURCE9} %{SOURCE10} .

%build
# nothing to do

%install
mkdir -p %{buildroot}/lib/firmware
%if "%flavor" != "compressed"
sh ./copy-firmware.sh %{buildroot}/lib/firmware
%else
sh %{_sourcedir}/install-split.sh %{_sourcedir}/topics.list %{buildroot} < 
WHENCE
sh %{_sourcedir}/list-license.sh < %{_sourcedir}/licenses.list
%endif
%fdupes %{buildroot}

%if "%flavor" != "compressed"
@@POST@@
@@POST@@ -n ucode-amd
%else
@@POST@@ all
@@SUBPKGPOSTS@@
%endif

%if "%flavor" != "compressed"
%files
%doc WHENCE README
%license GPL-2 GPL-3 LICEN[CS]E.*
/lib/firmware
%exclude /lib/firmware/amd-ucode
%exclude /lib/firmware/amd-ucode/*

%files -n ucode-amd
%license LICENSE.amd-ucode
%dir /lib/firmware
/lib/firmware/amd-ucode
%endif

%if "%flavor" == "compressed"
%files all
%doc WHENCE README

@@SUBPKGFILES@@
%endif

%changelog
++++++ licenses.list ++++++
# FIRSTWORD:    TOPIC           LICENSES
BCM-0bb4-0306:  brcm            LICENCE.cypress
ambassador:     network
snd-korg1212:   sound
snd-maestro3:   sound
snd-ymfpci:     sound
advansys:       platform
qla1280:        qlogic          LICENCE.qla1280
smctr:          network
kaweth:         network         LICENCE.kaweth
dvb-ttusb-budget: media
keyspan:        serial          GPL-2 GPL-3
keyspan_pda:    serial          GPL-2 GPL-3
emi26:          sound
emi62:          sound
ti_usb_3410_5052: serial
whiteheat:      serial
ip2:            serial
cpia2:          media
dabusb:         media
vicam:          media
io_edgeport:    serial
io_ti:          serial
dsp56k:         platform        GPL-2 GPL-3
snd-sb16-csp:   sound
qla2xxx:        qlogic          LICENCE.qla2xxx
orinoco:        network         LICENCE.agere
ar9170:         atheros         LICENCE.atheros_firmware
ath9k_htc:      atheros         LICENCE.atheros_firmware 
LICENCE.open-ath9k-htc-firmware
cassini:        platform
slicoss:        network
sxg:            network
cxgb3:          chelsio
cxgb4:          chelsio         LICENCE.chelsio_firmware
e100:           network         LICENCE.e100
acenic:         network
tg3:            network
starfire:       network
i2400m-usb:     intel           LICENCE.i2400m
libertas:       marvell         LICENCE.Marvell LICENCE.OLPC
mwl8k:          marvell         LICENCE.Marvell
mwifiex:        marvell         LICENCE.Marvell
iwlwifi:        iwlwifi         LICENCE.iwlwifi_firmware
ipu3-imgu:      intel           LICENSE.ipu3_firmware
cx231xx:        media
tehuti:         network
typhoon:        network
yam:            platform
3c359:          network
pcnet_cs:       platform
3c589_cs:       platform
3c574_cs:       platform
serial_cs:      platform        GPL-3
smc91c92_cs:    platform
cx23418:        media
cx23885:        media
cx23840:        media
qlogicpti:      qlogic
myri_sbus:      network
bnx2x:          bnx2
bnx2:           bnx2
netxen_nic:     network         LICENCE.phanfw
dvb-ttpci:      media
snd-wavefront:  sound
rt61pci:        network         LICENCE.ralink-firmware.txt
rt73usb:        network         LICENCE.ralink-firmware.txt
mt7601u:        mediatek        LICENCE.ralink_a_mediatek_company_firmware
rt2800pci:      realtek         LICENCE.ralink-firmware.txt
rt2860sta:      realtek         LICENCE.ralink-firmware.txt
rt2800usb:      realtek         LICENCE.ralink-firmware.txt
rt2870sta:      realtek         LICENCE.ralink-firmware.txt
usbdux/usbduxfast/usbduxsigma: platform 
xc4000:         media           LICENCE.xc4000
xc5000:         media           LICENCE.xc5000 LICENCE.xc5000c
dib0700:        media           LICENSE.dib0700
ath3k:          atheros
mga:            platform
r128:           platform
radeon:         radeon          LICENSE.radeon
amdgpu:         amdgpu          LICENSE.amdgpu
s2255drv:       platform
rtl8192e:       realtek
lgs8gxx:        media
ib_qib:         qlogic
qed:            qlogic
ueagle-atm:     ueagle          LICENCE.ueagle-atm4-firmware
vxge:           network
brcmsmac:       brcm            LICENCE.broadcom_bcm43xx
brcmfmac:       brcm            LICENCE.broadcom_bcm43xx LICENCE.cypress GPL-2
tda7706:        media           LICENCE.tda7706-firmware.txt
wl1251:         ti              LICENCE.wl1251
wl12xx:         ti              LICENCE.ti-connectivity
wl18xx:         ti              LICENCE.ti-connectivity
TI_ST:          ti              LICENCE.ti-connectivity
tlg2300:        media
r8712u:         realtek         LICENCE.rtlwifi_firmware.txt
rtl8192ce:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8192cu:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8192se:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8192de:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8723e:       realtek         LICENCE.rtlwifi_firmware.txt
rtl8723be:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8723de:      realtek         LICENCE.rtlwifi_firmware.txt
r8723au:        realtek         LICENCE.rtlwifi_firmware.txt
rtl8188ee:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8188eu:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8821ae:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8822be:      realtek         LICENCE.rtlwifi_firmware.txt
rtw88:          realtek         LICENCE.rtlwifi_firmware.txt rtw88/README
rtl8192ee:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8723bs:      realtek         LICENCE.rtlwifi_firmware.txt
rtl8xxxu:       realtek         LICENCE.rtlwifi_firmware.txt
r8169:          realtek
vt6656:         network         LICENCE.via_vt6656
DFU:            atheros         LICENCE.atheros_firmware 
LICENSE.QualcommAtheros_ar3k
Atheros:        atheros         LICENCE.atheros_firmware
ath6kl:         atheros         LICENCE.atheros_firmware
ath10k:         atheros         LICENCE.atheros_firmware 
LICENSE.QualcommAtheros_ath10k
myri10ge:       network         LICENCE.myri10ge_firmware
drxk:           media
ene-ub6250:     platform        LICENCE.ene_firmware
isci:           intel           GPL-2
ar5523:         atheros         LICENCE.atheros_firmware
s5p-mfc:        media
carl9170:       atheros         GPL-2
snd-hda-codec-ca0132: SKIP      LICENCE.ca0132
btusb:          bluetooth       LICENCE.ibt_firmware
btmtk_usb:      mediatek        LICENCE.mediatek
rp2:            serial
go7007:         platform        LICENCE.go7007
ccp:            platform        LICENSE.amd-sev
microcode_amd:  SKIP            LICENSE.amd-ucode
mxu11x0:        serial          LICENCE.moxa
mxuport:        serial          LICENCE.moxa
cw1200:         network         LICENCE.cw1200
BFA/BNA:        qlogic
qat:            intel           LICENCE.qat_firmware
rsi:            platform
xhci-rcar:      platform        LICENCE.r8a779x_usb3
snd_soc_sst_acpi: sound         LICENCE.IntcSST2
as102:          media           LICENCE.Abilis
it9135:         media           LICENCE.it913x
snd_intel_sst_core: sound       LICENCE.fw_sst_0f28
snd-soc-skl:    sound           LICENCE.adsp_sst
smsmdtv:        media           LICENCE.siano
xhci-tegra:     nvidia          LICENCE.nvidia
tegra-vic:      nvidia          LICENCE.nvidia
atusb:          network         GPL-2 GPL-3
qca:            bluetooth       LICENSE.QualcommAtheros_ath10k qca/NOTICE.txt
liquidio:       liquidio        LICENCE.cavium_liquidio
nitrox:         platform        LICENCE.cavium
i915:           i915            LICENSE.i915
nouveau:        nvidia          LICENCE.nvidia
wilc1000:       network         LICENSE.atmel
hfi1:           intel           LICENSE.hfi1_firmware
knav_qmss_queue: ti             LICENCE.ti-keystone
mwlwifi:        marvell         LICENCE.Marvell
mtk-vpu:        media
btmtk:          mediatek        LICENCE.mediatek
rk3399-dptx:    platform        LICENCE.rockchip
mt76x0:         mediatek        LICENCE.mediatek
mt76x2e:        mediatek        LICENCE.ralink_a_mediatek_company_firmware
mt76x2u:        mediatek        LICENCE.mediatek
mt7615e:        mediatek        LICENCE.mediatek
nfp:            nfp             LICENCE.Netronome
wil6210:        atheros         LICENSE.QualcommAtheros_ath10k
venus:          media           LICENSE.qcom
imx-sdma:       platform        LICENSE.sdma_firmware
adreno:         platform        LICENSE.qcom
mlxsw_spectrum: mellanox
cdns-mhdp:      platform        LICENCE.cadence
fsl-mc:         dpaa2           LICENSE.nxp_mc_firmware
mscc-phy:       platform        LICENCE.microchip
meson-vdec:     media           LICENSE.amlogic_vdec
++++++ list-license.sh ++++++
#!/bin/sh
#
# Generate license file lists for each kernel-firmware topic
#
# usage: list-license.sh < licenses.list
#

for f in files-*; do
    echo '%license WHENCE' >> $f
done

while read first topic licenses; do
    case "$first" in
        \#*) continue;;
    esac
    test -z "$licenses" && continue
    for l in $licenses; do
        echo $l >> files-$topic.license
    done
done

for l in files-*.license; do
    f=${l%.license}
    sort $l | uniq | sed -e's/^\(.*\)$/%license \1/g' >> $f
    rm -f $l
done
++++++ makespec.sh ++++++
#!/bin/sh
#
# makespec.sh VERSION < kernel-firmware.spec.in > kernel-firmware.spec
#

version="$1"

topics=$(awk '{print $1}' topicdefs)

define_subpackage () {
    local topic="$1"
    local desc=$(grep '^'"$topic"'[[:space:]]' topicdefs | sed 
-e's/^[a-zA-Z0-9-]*[[:space:]]*//')
    echo "%package $topic"
    echo "Summary:        Kernel firmware files for $desc"
    echo "Group:          System/Kernel"
    echo "Requires(post): coreutils"
    echo "Requires(postun): coreutils"
    echo "Conflicts:      kernel < 5.3"
    grep "^${topic}:" topicprovs | sed -e's/^[^ \t]*:[[:space:]]*//g'
    sh ./get_supplements.sh $topic
    echo
    echo "%description $topic"
    echo "This package contains compressed kernel firmware files for"
    echo "$desc."
    echo
}

define_post () {
    local l="$*"
    test -n "$l" && l=" $l"
    echo "%post$l"
    echo "%{?regenerate_initrd_post}"
    echo "%postun$l"
    echo "%{?regenerate_initrd_post}"
    echo "%posttrans$l"
    echo "%{?regenerate_initrd_posttrans}"
}

sed -e"s/@@VERSION@@/$version/g" | while read line; do
    if [ "$line" = "@@ALLPROVS@@" ]; then
        sed -e's/^[^ \t]*:[[:space:]]*//g' topicprovs
        continue
    fi
    if [ "$line" = "@@SUBPKGLIST@@" ]; then
        for t in $topics; do
            echo "Requires:       %{name}-$t = %{version}"
        done
        continue
    fi
    if [ "$line" = "@@SUBPACKAGES@@" ]; then
        for t in $topics; do
            define_subpackage $t
        done
        continue
    fi
    case "$line" in
        @@POST@@*)
            define_post $(echo "$line" | sed -e's/^@@POST@@ *//')
            continue;;
    esac
    if [ "$line" = "@@SUBPKGPOSTS@@" ]; then
        for t in $topics; do
            define_post $t
        done
        continue
    fi
    if [ "$line" = "@@SUBPKGFILES@@" ]; then
        for t in $topics; do
            echo "%files -f files-$t $t"
        done
        continue
    fi
    echo "$line"
done

exit 0



++++++ topicdefs ++++++
amdgpu          AMDGPU graphics driver
atheros         Atheros wireless drivers
ath10k          Atheros QCA988x WiFi drivers
bluetooth       various Bluetooth drivers
bnx2            Broadcom network drivers
brcm            Broadcom wireless drivers
chelsio         Chelsio network drivers
dpaa2           NXP Management Complex bus driver
i915            Intel i915 graphics driver
intel           Intel-platform device drivers
iwlwifi         Intel wireless drivers
liquidio        Cavium LiquidIO driver
marvell         Marvell network drivers
media           various Video4Linux drivers
mediatek        Mediatek network drivers
mellanox        Mellanox Spectrum switch driver
mwifiex         Marvell WiFi fullmac drivers
network         various network drivers
nfp             Netronome Flow Processor driver
nvidia          Nvidia Tegra and graphics drivers
platform        various platform drivers
qlogic          QLogic network drivers
radeon          Radeon graphics driver
realtek         Realtek wireless drivers
serial          various serial drivers
sound           various sound drivers
ti              Texas Instruments wireless drivers
ueagle          Eagle IV USB ADSL modem driver
usb-network     various USB WiFi / Ethernet drivers
++++++ topicprovs ++++++
atheros:        Provides:       ath3k-firmware
atheros:        Obsoletes:      ath3k-firmware
brcm:           Provides:       
bcm43xx-firmware:/lib/firmware/brcm/brcmfmac43430-sdio.bin
chelsio:        Provides:       cxgb3-firmware
chelsio:        Obsoletes:      cxgb3-firmware
iwlwifi:        Provides:       iwl1000-ucode
iwlwifi:        Obsoletes:      iwl1000-ucode
iwlwifi:        Provides:       iwl3945-ucode
iwlwifi:        Obsoletes:      iwl3945-ucode
iwlwifi:        Provides:       iwl4965-ucode
iwlwifi:        Obsoletes:      iwl4965-ucode
iwlwifi:        Provides:       iwl5000-ucode
iwlwifi:        Obsoletes:      iwl5000-ucode
iwlwifi:        Provides:       iwl5150-ucode
iwlwifi:        Obsoletes:      iwl5150-ucode
iwlwifi:        Provides:       iwl100-ucode
iwlwifi:        Obsoletes:      iwl100-ucode
iwlwifi:        Provides:       iwl6000-ucode
iwlwifi:        Obsoletes:      iwl6000-ucode
iwlwifi:        Provides:       iwl6050-ucode
iwlwifi:        Obsoletes:      iwl6050-ucode
iwlwifi:        Provides:       iwl6000g2-ucode
iwlwifi:        Obsoletes:      iwl6000g2-ucode
mediatek:       Provides:       ralink-firmware
mediatek:       Obsoletes:      ralink-firmware
qlogic:         Provides:       qlogic-firmware
qlogic:         Obsoletes:      qlogic-firmware
++++++ topics.list ++++++
# FIRSTWORD:    TOPIC           MODULES...
BCM-0bb4-0306:  brcm            btbcm
ambassador:     network
snd-korg1212:   sound
snd-maestro3:   sound
snd-ymfpci:     sound
advansys:       platform
qla1280:        qlogic
smctr:          network
kaweth:         usb-network
dvb-ttusb-budget: media
keyspan:        serial
keyspan_pda:    serial
emi26:          sound
emi62:          sound
ti_usb_3410_5052: serial
whiteheat:      serial
ip2:            serial
cpia2:          media
dabusb:         media
vicam:          media           gspca_vicam vicam
io_edgeport:    serial
io_ti:          serial
dsp56k:         platform
snd-sb16-csp:   sound
qla2xxx:        qlogic
orinoco:        network
ar9170:         atheros
ath9k_htc:      atheros
cassini:        platform
slicoss:        network
sxg:            network
cxgb3:          chelsio
cxgb4:          chelsio         cxgb4 csiostor
e100:           network
acenic:         network
tg3:            network
starfire:       network
i2400m-usb:     intel
libertas:       marvell         libertas_tf_usb libertas_sdio libertas_cs 
usb8xxx btmrvl_sdio
mwl8k:          marvell
mwifiex:        mwifiex         mwifiex mwifiex_pcie mwifiex_usb mwifiex_sdio 
btmrvl_sdio
iwlwifi:        iwlwifi         iwlwifi iwl4965 iwl3945
ipu3-imgu:      intel
cx231xx:        media           cx25840
tehuti:         network
typhoon:        network
yam:            platform
3c359:          network
pcnet_cs:       platform        pcnet_cs serial_cs
3c589_cs:       platform        serial_cs
3c574_cs:       platform        serial_cs
serial_cs:      platform
smc91c92_cs:    platform
cx23418:        media           cx18
cx23885:        media           cx25840
cx23840:        media           cx25840
qlogicpti:      qlogic
myri_sbus:      network
bnx2x:          bnx2
bnx2:           bnx2
netxen_nic:     network         netxen_nic qlcnic
dvb-ttpci:      media
snd-wavefront:  sound
rt61pci:        network
rt73usb:        usb-network
mt7601u:        mediatek
rt2800pci:      realtek
rt2860sta:      realtek
rt2800usb:      realtek
rt2870sta:      realtek
usbdux/usbduxfast/usbduxsigma: platform usbdux usbduxfast usbduxsigma
xc4000:         media
xc5000:         media
dib0700:        media           dvb_usb_dib0700
ath3k:          atheros
mga:            platform
r128:           platform
radeon:         radeon          radeon amdgpu
amdgpu:         amdgpu
s2255drv:       platform
rtl8192e:       realtek         r8192e_pci
lgs8gxx:        media
ib_qib:         qlogic
qed:            qlogic
ueagle-atm:     ueagle
vxge:           network
brcmsmac:       brcm
brcmfmac:       brcm
tda7706:        media
wl1251:         ti
wl12xx:         ti              wl12xx wl12xx_sdio wl12xx_spi
wl18xx:         ti              wl18xx wlcore
TI_ST:          ti
tlg2300:        media           poseidon
r8712u:         realtek
rtl8192ce:      realtek
rtl8192cu:      realtek         rtl8192cu rtl8xxxu
rtl8192se:      realtek
rtl8192de:      realtek
rtl8723e:       realtek
rtl8723be:      realtek
rtl8723de:      realtek
r8723au:        realtek
rtl8188ee:      realtek
rtl8188eu:      realtek         rtl8188eu r8188eu
rtl8821ae:      realtek
rtl8822be:      realtek         rtl8822be r8822be
rtw88:          realtek
rtl8192ee:      realtek
rtl8723bs:      realtek
rtl8xxxu:       realtek
r8169:          realtek
vt6656:         usb-network             vt6656_stage
DFU:            atheros         ar3k
Atheros:        atheros         ar3k
ath6kl:         atheros         ath6kl_sdio ath6kl_usb
ath10k:         ath10k          ath10k_pci ath10k_sdio ath10k_usb
myri10ge:       network
drxk:           media
ene-ub6250:     platform        ums_eneub6250
isci:           intel
ar5523:         atheros
s5p-mfc:        media
carl9170:       atheros
snd-hda-codec-ca0132: SKIP
btusb:          bluetooth       btusb btintel btrtl
btmtk_usb:      mediatek
rp2:            serial
go7007:         platform        go7007 saa7134-go7007 go7007-loader
ccp:            platform
microcode_amd:  SKIP
mxu11x0:        serial          ti_usb_3410_5052
mxuport:        serial
cw1200:         network
BFA/BNA:        qlogic          bfa bna
qat:            intel           qat_dh895xcc qat_c3xxx qat_c62x
rsi:            usb-network     rsi rsi_usb rsi_sdio
xhci-rcar:      platform
snd_soc_sst_acpi: sound
as102:          media
it9135:         media           dvb_usb_af9035
snd_intel_sst_core: sound
snd-soc-skl:    sound
smsmdtv:        media
xhci-tegra:     nvidia
tegra-vic:      nvidia          tegra_drm
atusb:          usb-network
qca:            bluetooth       btqca
liquidio:       liquidio
nitrox:         platform        n5pf
i915:           i915
nouveau:        nvidia          nouveau
wilc1000:       network
hfi1:           intel
knav_qmss_queue: ti
mwlwifi:        marvell
mtk-vpu:        media
btmtk:          mediatek        btmtk btmtkuart btmtksdio
rk3399-dptx:    platform
mt76x0:         mediatek        mt76x0u mt76x0e
mt76x2e:        mediatek        mt76x2e mt76x2u
mt76x2u:        mediatek
mt7615e:        mediatek
nfp:            nfp
wil6210:        atheros
venus:          media
imx-sdma:       platform
adreno:         platform        msm
mlxsw_spectrum: mellanox
cdns-mhdp:      platform
fsl-mc:         dpaa2
mscc-phy:       platform
meson-vdec:     media
ast             platform
++++++ update-aliases.py ++++++
#!/usr/bin/python3
#
# A program to update aliases.list from the given kernel binary rpms
#
# usage: update-aliases.py KERNEL-RPMs...
#

from sys import argv
from fwtopics import FWTopics

if __name__ == '__main__':
    fw = FWTopics()
    fw.read_aliases()
    argv.pop(0)
    for arg in argv:
        fw.scan_firmware(arg, fw.update_alias())
    fw.write_aliases()

Reply via email to