You are not logged in.

#1 2024-11-18 22:03:24

maximilliangreat
Member
Registered: 2024-11-18
Posts: 5

pacman NoExtract vs firmware

I needed to prevent the Linux kernel from loading one specific firmware. The best way I found is to not unpack this firmware with pacman.
As things have changed over time, my pacman.conf now looks like:


NoExtract   =/usr/lib/firmware/somefirmware.bin 
NoExtract   =/usr/lib/firmware/somefirmware.bin.xz
NoExtract   =/usr/lib/firmware/somefirmware.bin.zst
NoExtract   =/usr/lib/firmware/somefirmware.bin.*

big_smile

And now (for some long time) it is't working. (I need manually delete firmware after upgrade)

What is the best way to do it once and for all?

Offline

#2 2024-11-18 22:36:51

xerxes_
Member
Registered: 2018-04-29
Posts: 776

Re: pacman NoExtract vs firmware

I don't know if it's the best option, but you can unpack that firmware files, remove all attributes to all users for these files, so no one can read/write/execute it and set immutable bit on these files by chattr.

Offline

#3 2024-11-18 22:46:51

maximilliangreat
Member
Registered: 2024-11-18
Posts: 5

Re: pacman NoExtract vs firmware

xerxes_ wrote:

I don't know if it's the best option, but you can unpack that firmware files, remove all attributes to all users for these files, so no one can read/write/execute it and set immutable bit on these files by chattr.

Or I can make dir with the same name as firmware file. BUT there will be error every time, when firmware  package updated. So I'm looking for  other options.

Offline

#4 2024-11-18 22:55:48

maximilliangreat
Member
Registered: 2024-11-18
Posts: 5

Re: pacman NoExtract vs firmware

I also wonder why bin.zst and bin.* not working roll
zst beeing the latest format for firmware afaik.

Offline

#5 2024-11-18 22:56:11

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,170

Re: pacman NoExtract vs firmware

NoExtract will work, the provided example would be invalid since you shouldn't include the leading slash, nor is there a firmware called somefirmware. Help could be given better if actual real details of the real config and the real plan are devulged.

Offline

#6 2024-11-18 23:20:17

maximilliangreat
Member
Registered: 2024-11-18
Posts: 5

Re: pacman NoExtract vs firmware

Well... Why I should not include leading slash? I don't get it. roll
It worked fine with this lines

NoExtract   =/usr/lib/firmware/somefirmware.bin 
NoExtract   =/usr/lib/firmware/somefirmware.bin.xz

when firmware were in .bin and .bin.xz format.
But not workinkg with current .bin.zst

I'm not providing actual firmware name, becouse it specific just to me, 99.99% would run it with firmware and  I don't want advices about hardware )))

Offline

#7 2024-11-19 01:35:01

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 262

Re: pacman NoExtract vs firmware

maximilliangreat wrote:

Well... Why I should not include leading slash?

Because:

These files refer to files in the package archive, so do not include the leading slash (the RootDir) when specifying them.

But have you considered to blacklist the driver which loads undesirable firmware?

Last edited by dimich (2024-11-19 01:36:58)

Offline

#8 2024-11-19 07:11:48

seth
Member
Registered: 2012-09-03
Posts: 58,659

Re: pacman NoExtract vs firmware

I'm not providing actual firmware name, becouse [sic] [made up bullshit reasons]

V1del wrote:

Help could be given better if actual real details of the real config and the real plan are devulged.

Post your pacman config, the samples you post cannot and will not have worked and then elaborate on the actual problem.
Whatever you think, if you identified a problem w/ a specific firmware (version) there's a good chance that either others will benefit from that knowledge or your premise is wrong (esp. w/ the bogus NoExtract suggestions)

Online

#9 2024-11-19 23:09:40

maximilliangreat
Member
Registered: 2024-11-18
Posts: 5

Re: pacman NoExtract vs firmware

Post your pacman config, the samples you post cannot and will not have worked and then elaborate on the actual problem.
Whatever you think, if you identified a problem w/ a specific firmware (version) there's a good chance that either others will benefit from that knowledge or your premise is wrong (esp. w/ the bogus NoExtract suggestions)

I need that driver without any firmware, old, new, past, future, any. It just my thing.
But if you wish config, its pretty default, except NoExtract
https://pastebin.com/xt9XnBuL

But have you considered to blacklist the driver which loads undesirable firmware?

Nope. I need driver, but without firmware.

These files refer to files in the package archive, so do not include the leading slash (the RootDir) when specifying them.

Oh... Thanks, I'll try without slash.
Odd, but the first two lines worked, when firmware was .bin, and later .bin.xz roll Maybe some changes in pacman?

Offline

#10 2024-11-19 23:45:20

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,472
Website

Re: pacman NoExtract vs firmware

maximilliangreat wrote:

Odd, but the first two lines worked, when firmware was .bin, and later .bin.xz roll Maybe some changes in pacman?

This has been how pacman has functioned since the feature was implemented more than a decade ago.

Offline

#11 Yesterday 08:07:10

seth
Member
Registered: 2012-09-03
Posts: 58,659

Re: pacman NoExtract vs firmware

So you're trying to break your BT? Or does it actually work w/o the FW? Or do you use an alternative module or dongle?
You should probably open a new thread about the underlying issue.

For this thread, try to prevent the extraction using the correct syntax and see whether that does what you want and then consider the option that your previous approach has simply never worked, esp. since

The OP wrote:

And now (for some long time) it is't working. (I need manually delete firmware after upgrade)

Online

Board footer

Powered by FluxBB