You are not logged in.

#1 2022-11-25 12:43:22

cmsigler
Member
Registered: 2013-11-18
Posts: 35

[SOLVED] bash script for clean chroot building (for AUR pkg maints)

Hi all,

I'm posting to see if anyone is interested in a tool I use regularly.  I have created a bash script for automatic building in a clean chroot.  I use it to maintain my AUR pkgs when I update them.  I've found it saves me time and screwing around.

This script (more or less) performs the steps outlined in the DeveloperWiki page Building in a Clean Chroot -- Classic Way.

If this is of general interest I am happy to share it on the wiki, perhaps under that DeveloperWiki page?  Thanks for your feedback smile

Clemmitt Sigler

Last edited by cmsigler (2022-11-29 13:15:33)

Offline

#2 2022-11-25 12:53:32

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

What advantages does your script have over simply running extra-x86_64-build from the devtools package?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-11-25 13:21:55

cmsigler
Member
Registered: 2013-11-18
Posts: 35

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

Slithery wrote:

What advantages does your script have over simply running extra-x86_64-build from the devtools package?

Good question!  Perhaps none.  When reading that DeveloperWiki page I didn't try extra-x86_64-build because I got the impression it wouldn't work for an AUR pkg.  I thought it was just for pkgs in the extra repository.  Let me look at this....

OK, I will play with extra-x86_64-build to see if it does exactly the same thing.  Thank you for the heads-up! smile

Clemmitt

Offline

#4 2022-11-25 13:42:45

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 507

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

I was also surprised when I learned this could be used for other packages not in extra, but I have been using it for buildtesting packages and it works with any PKGBUILD.

Offline

#5 2022-11-26 17:51:33

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,977

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

icar wrote:

it works with any PKGBUILD.

Not exactly, try building a lib32-* package with extra-x86_64-build .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#6 2022-11-26 22:34:17

icar
Member
From: Catalunya
Registered: 2020-07-31
Posts: 507

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

Lone_Wolf wrote:
icar wrote:

it works with any PKGBUILD.

Not exactly, try building a lib32-* package with extra-x86_64-build .

Ok, let's pretend 32 bit packages don't exist ?

Offline

#7 2022-11-29 13:12:59

cmsigler
Member
Registered: 2013-11-18
Posts: 35

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

Slithery wrote:

What advantages does your script have over simply running extra-x86_64-build from the devtools package?

This morning I finally made time to test a good use case for building an AUR pkg in a clean chroot.  This PKGBUILD requires a separate AUR pkg as a depend, which means a pre-built pkg must be specified as a '-I pkg-name-1.2-3-x86_64.pkg.tar.zst' argument.

And, indeed, using extra-x86_64-build works!!!  For this case, do something like the following:

$ mkdir ~/my_AUR_dir/tmp
$ mkdir ~/my_AUR_dir/AUR_deps
$ cp ~/some_dir/pkg-name-1.2-3-x86_64.pkg.tar.zst ~/my_AUR_dir/AUR_deps/
$ cp ~/some_other_dir/PKGBUILD ~/my_AUR_dir/tmp/
$ cd ~/my_AUR_dir/tmp/
$ extra-x86_64-build -c -r ~/my_AUR_dir/tmp/ -- -I ~/my_AUR_dir/AUR_deps/pkg-name-1.2-3-x86_64.pkg.tar.zst

@Slithery, thank you for the tip! big_smile

Offline

#8 2022-11-29 14:19:29

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,645
Website

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2022-11-29 15:17:11

cmsigler
Member
Registered: 2013-11-18
Posts: 35

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

... I did not know about this pkg yikes

@graysky Thank you for this heads-up! big_smile

Clemmitt

Offline

#10 2022-11-30 13:49:28

cmsigler
Member
Registered: 2013-11-18
Posts: 35

Re: [SOLVED] bash script for clean chroot building (for AUR pkg maints)

Hi again,

Well, I have tilted at the windmills of posting a note about using extra-x86_64-build for AUR pkgs, both on the AUR and the DeveloperWiki Building in a clean chroot wiki pages.  I have been reverted or rejected by maintainers twice.  Fair enough.  So, given the power of modern search engines, I say...

AUR MAINTAINERS!!!  Hear, ye!!!  Use extra-x86_64-build from the devtools pkg to test build your pkgs in a clean chroot!!!  DON'T REINVENT THE WHEEL LIKE I DID!!!

wink (Humor FULLY intended!)

Clemmitt

Offline

Board footer

Powered by FluxBB