Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

How to list packages in Debian repositories containing firmware

$
0
0
Hello,

It would be interesting to get a list of packages in Debian repositories that contain firmware files with the detail of repository content and package name.

I haven't found a single command in existing packages to do this.

It would also be useful to know the repository section where they are stored, as this is an indirect indication of the licence they are distributed under.

Here is my 2 cents for a simple bash script to do this, based on existing commands:

Code:

#! /bin/sh## A simple script to list pacakges whose names contain the patter "firmware" ## It prints three columns (sorted alphabetically):#       1) repository component (main, contrib, non-free, non-free-frimware)#       2) repository section#       3) name of the package## All repository components must be configured in /etc/apt/sources to be scanned.apt list "*firmware*" | awk -F '/' '{print $1;}' |  \        while read F        do                apt show  $F | grep "APT-Sources:" | awk -F " " '{printf("%-30s\t\t", $3) ;}'                apt show  $F | grep "Section:"     | awk -F " " '{printf("%-30s\t\t", $2) ;}'                echo $F         done | \        sort
If it is named firmware.sh, it can be called this way:

Code:

./firmware.sh 2>/dev/null
I post it here for comments, suggestions and improvements.

Statistics: Posted by Aki — 2024-06-11 16:18 — Replies 0 — Views 29



Viewing all articles
Browse latest Browse all 3474

Trending Articles