You are not logged in.

#1 2024-05-13 13:53:18

lainlover
Member
Registered: 2024-04-01
Posts: 13

[SOLVED] How to compile AUR packages in tmpfs

I'm recently thinking of ways to reduce IO write usage on my SSD, and this is an idea I've heard thrown around by other users here, although without many implementation details.
The desired outcome would be something where I could run yay -Sy <package_name> and automatically have it create an ephemeral fixed-size tmpfs in RAM for the package to build in from source. The tmpfs should be discarded afterwards.
Is there some way of doing this out-of-the-box with package manager hooks / env vars? Or am I looking for something in diy territory? Advise me, elders.

Last edited by lainlover (2024-05-20 16:42:31)

Offline

#2 2024-05-13 14:44:05

tekstryder
Member
Registered: 2013-02-14
Posts: 143

Re: [SOLVED] How to compile AUR packages in tmpfs

Can't answer to the yay aspect, as I've never used it, but I do perform all of my builds in a clean chroot which resides in "an ephemeral fixed-size tmpfs".

https://wiki.archlinux.org/title/Develo … ean_chroot

I'm in DIY territory I guess.

Offline

#3 2024-05-13 15:19:16

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 12,163
Website

Re: [SOLVED] How to compile AUR packages in tmpfs

Side note: I'm not familiar with yay, but if that `-Sy` is passed to pacman, you're performing a partial upgrade, don't do that.

Mod note: moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2024-05-13 15:26:29

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

Re: [SOLVED] How to compile AUR packages in tmpfs

Just build in /tmp.

And don't use yay.

These points are unrelated - you can set yay to build in /tmp (read the man page) - but still you shouldn't use yay.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2024-05-13 15:55:04

cloverskull
Member
Registered: 2018-09-30
Posts: 185

Re: [SOLVED] How to compile AUR packages in tmpfs

Trilby wrote:

Just build in /tmp.

And don't use yay.

These points are unrelated - you can set yay to build in /tmp (read the man page) - but still you shouldn't use yay.

Skewing OT here, but...why do you recommend against yay? And what is preferred?

Offline

#6 2024-05-13 16:14:45

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

Re: [SOLVED] How to compile AUR packages in tmpfs

Yay primarily maintains user ignorance.  What is preferred is knowledge.

I used to be more 'political' about it and note that new users should avoid AUR helpers like yay, but if knowledgeable and experienced users chose to use it for convenience that could be reasonable.  But really, with only extremely rare exception, knowledgeable and experienced users wouldn't use yay.  It's very nearly exclusively used by users who have no idea what they are doing - and in such cases it provides them only a great disservice.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2024-05-13 17:35:49

seth
Member
Registered: 2012-09-03
Posts: 54,562

Re: [SOLVED] How to compile AUR packages in tmpfs

As constructive addition, see https://wiki.archlinux.org/title/AUR_he … son_tables - the things in the first two tables are reasonable.
The last table might be convenient but can conveniently screw you as well.

When it comes to yay specifically, this here is disqualifying for any software: https://bbs.archlinux.org/viewtopic.php … 2#p2137392
(And afaiu the resolution in https://github.com/Jguer/yay/issues/2241 , nothing has been "fixed", but just declared as "yeah, that's expected, notabug, you're holding it wrongly")

Offline

#8 2024-05-14 01:26:11

cloverskull
Member
Registered: 2018-09-30
Posts: 185

Re: [SOLVED] How to compile AUR packages in tmpfs

Gotcha, thanks. I appreciate the insight. I'm happy building things from source but love the convenience offered by yay, and so far it hasn't screwed me over with unwanted pacman flags or anything, so for now (at least) I'm going to stick with it smile

Offline

#9 2024-05-20 16:41:50

lainlover
Member
Registered: 2024-04-01
Posts: 13

Re: [SOLVED] How to compile AUR packages in tmpfs

Marking this issue as closed for the time being, despite not being fully satisfied with the answers.
I guess this is just the limit of yay, these kinds of setups seem to be more suited to a manual case-by-case basis. Going with the arch wiki approach for now, even if it is a bit hacky.

Offline

Board footer

Powered by FluxBB