You are not logged in.

#1 2017-09-15 07:53:17

zebulon
Member
Registered: 2008-10-20
Posts: 358

linux-lts-headers do not provide linux-headers?

I maintain a few kernel drivers on AUR and was asked to add linux-lts-headers as a makedepends. I already have linux-headers, which is a provide for more alternate Arch kernels (such as linux-ck-headers or linux-zen-headers). Is it on purpose that it not the case for linux-lts-headers? Thanks.

Offline

#2 2017-09-15 13:00:27

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: linux-lts-headers do not provide linux-headers?

I would say that the AUR packages in question are doing the wrong thing. Also, drivers are built against one specific kernel *only*, unless the package is a dkms package in which case it is built against nothing and makedepends will do nothing (but dkms itself optdepends against a number of headers packages).

Also I think linux-ck is wrong for doing that, and linuz-zen does not in fact do that.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2017-09-15 13:23:33

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: linux-lts-headers do not provide linux-headers?

While I'd defer to Eschwartz on whether or not linux and variants such as linux-ck could share the same headers, it is not blindingly obvious to me that they couldn't.  It is however blindingly obvious to me that linux and linux-lts definitely couldn't (which was your initial question).

What's the difference between linux (version X.Y.Z) and linux-ck (version X.Y.Z)?  They both have the same source code and the same headers, but the latter has a couple patches to the source code and a change to the kernel config.  This does not seem to require a different kernel headers package as those remain unchanged.

What's the difference between linux (version X.Y.Z) and linux-lts (version A.B.C)?  Well, hopefully the phrasing of the question makes it obvious: they are completely different versions!  They have difference source code, different headers, etc.  So no, linux and linux-lts cannot share headers.

Note: There may be exceptions where some modules would build just fine if you manually changed the path name to the headers to be for a different kernel version - but this would be a very bad idea overall, and some builds would certainly fail.

EDIT: to your actual problem, there will be times where the same driver would not be able to be built against linux and linux-lts.  If yours is one that is (currently) compatible with either kernel, that's great, but there is no assurance that it will continue to be (unless it is a commitment of the upstream source).  So if you are packaging a linux driver, linux-headers go in the makedepends.  Someone else can package a linux-lts driver, or if they are confident it will work, they can just edit the makedepends in the PKGBUILD and go with that.

Last edited by Trilby (2017-09-15 13:26:54)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2017-09-15 13:35:35

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: linux-lts-headers do not provide linux-headers?

Trilby, different headers will get installed to e.g. /usr/lib/modules/4.12.12-1-ck/build/ instead of /usr/lib/modules/4.13.2-1-ARCH/build/ and given that it 1) requires different `make` parameters for SYSSRC/KDIR/KERNELRELEASE or whatever, and 2) I am pretty sure kernel modules contain the `uname -r` for the kernel they are meant for, they will end up building e.g. the "nvidia" package which has the contents of the "nvidia-ck" package.

This is on top of the fact that linux-ck and linux are not guaranteed to have the same version, rarely do when a new -ck kernel is available on the AUR and the linux kernel is still in [testing], and often get held back in the AUR until the patchsets can be ported to the next minor kernel version (Patchlevel version updates are easy though.)

Last edited by eschwartz (2017-09-15 13:38:38)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB