Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AUR - how the hell? #43

Open
phunni opened this issue Dec 20, 2019 · 17 comments
Open

AUR - how the hell? #43

phunni opened this issue Dec 20, 2019 · 17 comments

Comments

@phunni
Copy link

phunni commented Dec 20, 2019

Having now managed to get a basic build running I'm now trying to work on some further images intended for other computers, but I'm banging my head against a brick wall when it comes to aur packages.
I don't really care too much about build times, so I don't want to bother with maintaining and hosting my own pacman repository, but, whenever I try and build a packge in a script, I run into the issue that trizen/makepkg cannot be run as root, but pacman must be. I have pacman enabled via sudo, but, because the script itself is run as root, this then causes other issues.
Is anyone else building packages during image builds? How do you handle it?

@pauldotknopf
Copy link
Member

Ah, yes, the makepkg issue. They added that after Darch was built, which annoys the shit out of me.

When I was doing Arch builds, I had to run a makepkg.patch file against /usr/bin/makepkg to just remove the check for root. It's harmless.

Check this: pauldotknopf/darch-recipes@2945b2d#diff-844c94b0e5d70e755e1d75768823c931

@pauldotknopf
Copy link
Member

@phunni
Copy link
Author

phunni commented Dec 20, 2019

Looks like there's been a quite a few changes to makepkg since this - the patch won'y apply as is. Sigh - this is so much harder/more work than it should be - they really should provide an option to allow running as root...

I did try and get trizen to build the package and then install it via pacman, but that just caused other headaches due to write permissions problems among other things...

@phunni
Copy link
Author

phunni commented Dec 20, 2019

Might have got it working with a super simple patch that just removes the root check. It's running now and it certainly runs as root, so, unless there are some build implications I'm unaware of, it's looking good.

@phunni phunni closed this as completed Dec 20, 2019
@pauldotknopf
Copy link
Member

they really should provide an option to allow running as root...

Absolutely. I suggested to make it overridable via environment variables, and the maintainers basically said fuck you.

I really hate the Arch community and their collective attitude.

I recommend Ubuntu! :)

@phunni
Copy link
Author

phunni commented Dec 21, 2019

Ubuntu would certainly be easier, but it makes too many choices for me that I don't like. That's what I love about Arch - I can set up the system pretty much exactly how I want it.
Except when it comes to building things as root apparently... :-/

@phunni
Copy link
Author

phunni commented Dec 21, 2019

It seems that whatever I've did to makepkg (literally just removed the root check - or so I thought...) has now caused damage to my system. To be fair, they did warn me... :-( I'm going to reopen this because, even if I never get past it, it's still likely to affect other users.
Really frustrated - just about ready to give up with darch. It's a brilliant tool and I really want to have all my systems based on immutable, stateless images, but it's proving too difficult if I also want arch. Which I do.
/me sobs quietly into his drink...

@phunni phunni reopened this Dec 21, 2019
@pauldotknopf
Copy link
Member

Details on what happened?

@phunni
Copy link
Author

phunni commented Dec 21, 2019

I started getting issues with files no longer owned by packages ( which then caused problems with installing/upgrading packages because the files were already there...), or files not being found that should've been. All the problems went away as soon as I booted an image - which you'd expect, but they started to appear again when I ran trizen - which in turn ran my patched makepkg.
So, presumably, if I used a vanilla makepkg then I wouldn't have these problems, but then I'd be right back to square one with the issues with makepkg and root...

@pauldotknopf
Copy link
Member

Another option is to create a dummy user to build the packages in Darch, using gosu or something.

@phunni
Copy link
Author

phunni commented Dec 21, 2019

You can see the script I'm using for the commonly used "common"here
Running makepkg as nobody is what the arch wiki recommends - directing you to this page - which is where I got some of my script from.
I'm now failing with

==> ERROR: You do not have write permission for the directory $BUILDDIR (/).

which is completely baffling me - why on earth is the BUILDDIR being set to /? nobody definitely has write permissions on /home/build/trizen

I'm sure this is much harder than it needs to be...

@pauldotknopf
Copy link
Member

Lol.

Just use Ubuntu and never have a problem again! ;)

@phunni
Copy link
Author

phunni commented Dec 21, 2019

And never have my system how I like it again either 😜

@pauldotknopf
Copy link
Member

Honestly, out of curiosity, I'd love to see a detailed breakdown of what customizations you can do in arch that you can't do in Ubuntu.

@shadowrylander
Copy link

Ubuntu with Bedrock Linux? 😹

@phunni
Copy link
Author

phunni commented May 15, 2020

As far as I'm aware Ubuntu won't ever give me a super basic setup after the installation and will always try and install a bunch of packages I don't want.

@pauldotknopf
Copy link
Member

Ubuntu will only install a bunch of packages when you install ubuntu-desktop.

You can blacklist then though, like I do here: https://github.com/pauldotknopf/darch-recipes/blob/master/recipes/desktop/blacklist-packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants