You are not logged in.

#1 2008-09-27 17:27:11

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

A package that "patches" another package

I'd like to make a PKGBUILD for usb-rndis-lite v0.11. Usb-rndis-lite contains files that should replace some files from 'kernel26' package. Is it right when one package replaces files from another package? If so, what is the right way to do that?

The point is that USB RNDIS driver, included in current 2.6.26 kernel is either outdated or buggy, so sometimes it needs to be replaced by SynCE's usb-rndis-lite. Unfortunately that driver is a part of kernel26 package and cannot be separately removed.

Offline

#2 2008-09-27 17:44:07

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1,328

Re: A package that "patches" another package

No, it's not OK for two packages to own the same files; I think pacman doesn't let you do that.

Generally, you would create another package that replaces the whole previous one (in your case, you'd need to have the whole kernel package).

However, for patches to kernel drivers, there's another way. There's a special directory where you can put your patched/updated version of a driver, and then modprobe/insmod would load that new version, when the driver is requested. For details, see http://archlinux.org/pipermail/arch-dev … 05902.html

Offline

#3 2008-09-27 17:56:04

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 5,128
Website

Re: A package that "patches" another package

What would prevent him from creating a package that applies a patch in the install script without "owning" the files? (not sure if that can be undone when removing the package though, i.e. I don't know if pkgs have "uninstall" instructions)

Offline

#4 2008-09-27 18:12:31

Mr.Cat
Member
Registered: 2008-09-27
Posts: 79

Re: A package that "patches" another package

Nothing would prevent me from doing this, but that would be the "wrong way", I suppose. And you've mentioned one of the reasons - possible problems with correct package removal. Another problem I see - is that when kernel26 is updated - my package's files would be owerwritten.

UPD:

bender02 wrote:

There's a special directory where you can put your patched/updated version of a driver, and then modprobe/insmod would load that new version, when the driver is requested.

Thanks, worked for me.

UPD:
I've submitted a PKGBUILD for rndis-usb-lite (v0.11) to unsupported: http://aur.archlinux.org/packages.php?ID=20336.

Last edited by Mr.Cat (2008-09-27 19:32:39)

Offline

#5 2008-09-27 20:25:34

bender02
Member
From: Germany
Registered: 2007-02-04
Posts: 1,328

Re: A package that "patches" another package

Mr.Cat wrote:

Nothing would prevent me from doing this, but that would be the "wrong way", I suppose. And you've mentioned one of the reasons - possible problems with correct package removal. Another problem I see - is that when kernel26 is updated - my package's files would be owerwritten.

Exactly. Pretty ugly solution, although possible. In the install script, you can specify an uninstall function, so theoretically you can backup the original driver on install, and restore on uninstall, with a check if it hasn't been updated meanwhile.

UPD:

bender02 wrote:

There's a special directory where you can put your patched/updated version of a driver, and then modprobe/insmod would load that new version, when the driver is requested.

Thanks, worked for me.

UPD:
I've submitted a PKGBUILD for rndis-usb-lite (v0.11) to unsupported: http://aur.archlinux.org/packages.php?ID=20336.

I'm glad it worked.

Offline

Board footer

Powered by FluxBB