[arch-general] PKGBUILD inheritance
Hi I want to make PKGBUILD for kernel in AUR with enabled options that I need. I did #ABSROOT=. abs core/linux fixed config and I'm good, but to keep it updated with core/linux I need to do it all the time (load latest core/linux, fix the config, rebuild). Is there some tools/mechanisms to make a PKGBUILD that will do it automatically? Thanks
On 29 April 2015 at 22:48, Roman Rader <antigluk@gmail.com> wrote:
Hi
I want to make PKGBUILD for kernel in AUR with enabled options that I need. I did #ABSROOT=. abs core/linux fixed config and I'm good, but to keep it updated with core/linux I need to do it all the time (load latest core/linux, fix the config, rebuild). Is there some tools/mechanisms to make a PKGBUILD that will do it automatically?
PKGBUILDs are just bash scripts, so you can do pretty much anything in them. If you can automate updating the config, then you could stick that in the prepare() function of the PKGBUILD and you should be set I think. Regards, Maarten
Well yes, basically what I want to do is to download the PKGBUILD in the prepare function and do makepkg inside my build function. I can then unpack content of resulting package and put it to destination directory to pack it again, but it's hacky and doesn't look nice. I'm looking for the proper way to do it. Thanks, Roman Пт, 1 трав. 2015 13:06 Maarten de Vries <maarten@de-vri.es> пише: On 29 April 2015 at 22:48, Roman Rader <antigluk@gmail.com> wrote:
Hi
I want to make PKGBUILD for kernel in AUR with enabled options that I need. I did #ABSROOT=. abs core/linux fixed config and I'm good, but to keep it updated with core/linux I need to do it all the time (load latest core/linux, fix the config, rebuild). Is there some tools/mechanisms to make a PKGBUILD that will do it automatically?
PKGBUILDs are just bash scripts, so you can do pretty much anything in them. If you can automate updating the config, then you could stick that in the prepare() function of the PKGBUILD and you should be set I think.
Regards, Maarten
Well yes, basically what I want to do is to download the PKGBUILD in the prepare function and do makepkg inside my build function. I can then unpack content of resulting package and put it to destination directory to pack it again, but it's hacky and doesn't look nice. I'm looking for the proper way to do it. Thanks, Roman Пт, 1 трав. 2015 13:06 Maarten de Vries <maarten@de-vri.es> пише:
On 29 April 2015 at 22:48, Roman Rader <antigluk@gmail.com> wrote:
Hi
I want to make PKGBUILD for kernel in AUR with enabled options that I need. I did #ABSROOT=. abs core/linux fixed config and I'm good, but to keep it updated with core/linux I need to do it all the time (load latest core/linux, fix the config, rebuild). Is there some tools/mechanisms to make a PKGBUILD that will do it automatically?
PKGBUILDs are just bash scripts, so you can do pretty much anything in them. If you can automate updating the config, then you could stick that in the prepare() function of the PKGBUILD and you should be set I think.
Regards, Maarten
On 1 May 2015 at 14:13, Roman Rader <antigluk@gmail.com> wrote:
Well yes, basically what I want to do is to download the PKGBUILD in the prepare function and do makepkg inside my build function. I can then unpack content of resulting package and put it to destination directory to pack it again, but it's hacky and doesn't look nice. I'm looking for the proper way to do it.
Indeed, that doesn't sound very nice. But running makepkg on the original package seems wasteful anyway if you're going to compile again in the build stage. It would seem more logical to use the same sources array plus a patch or script to modify some files and apply those in the prepare() function. I'm not certain what exactly you're trying to do though. If you only want to modify an upstream PKGBUILD it might be easier to just write a script to do what you do manually now. Regards, Maarten
I want to be in sync with official kernel config. Script is good idea but universal PKGBUILD based on core/linux will keep me from updating the package manually every time kernel is updated. Пт, 1 трав. 2015 15:53 Maarten de Vries <maarten@de-vri.es> пише:
On 1 May 2015 at 14:13, Roman Rader <antigluk@gmail.com> wrote:
Well yes, basically what I want to do is to download the PKGBUILD in the prepare function and do makepkg inside my build function. I can then unpack content of resulting package and put it to destination directory to pack it again, but it's hacky and doesn't look nice. I'm looking for the proper way to do it.
Indeed, that doesn't sound very nice. But running makepkg on the original package seems wasteful anyway if you're going to compile again in the build stage. It would seem more logical to use the same sources array plus a patch or script to modify some files and apply those in the prepare() function.
I'm not certain what exactly you're trying to do though. If you only want to modify an upstream PKGBUILD it might be easier to just write a script to do what you do manually now.
Regards, Maarten
On Friday, May 01, 2015 01:27:58 PM Roman Rader wrote:
I want to be in sync with official kernel config. Script is good idea but universal PKGBUILD based on core/linux will keep me from updating the package manually every time kernel is updated.
If you want to be in sync with the official arch kernel config, use git rebase in the PKGBUILD. I'm not sure if it's a wise idea to have PKGBUILD that's updating against kernel releases but not updating its pkgver variable. It would mean different under the hood kernels, and the pkgver variable only reflects the static changes you make on top of the kernel. In other words: <mypackage>-1.0 /= <mypackage>-1.0 since it's pulling in the kernel config branch. Regards, Mark
I think you're right, pkgver should be updated anyway. Will stick to script then. Thanks everyone. On Sat, May 2, 2015 at 1:02 AM Mark Lee <mark@markelee.com> wrote:
On Friday, May 01, 2015 01:27:58 PM Roman Rader wrote:
I want to be in sync with official kernel config. Script is good idea but universal PKGBUILD based on core/linux will keep me from updating the package manually every time kernel is updated.
If you want to be in sync with the official arch kernel config, use git rebase in the PKGBUILD.
I'm not sure if it's a wise idea to have PKGBUILD that's updating against kernel releases but not updating its pkgver variable. It would mean different under the hood kernels, and the pkgver variable only reflects the static changes you make on top of the kernel. In other words: <mypackage>-1.0 /= <mypackage>-1.0 since it's pulling in the kernel config branch.
Regards, Mark
participants (4)
-
Maarten de Vries
-
Mark Lee
-
Roman Rader
-
Roman Rader