You are not logged in.

#1 2024-12-02 06:46:51

nibazshab
Member
Registered: 2022-08-25
Posts: 60

[Solved] How to build pkg that can be install in the home directory ?

I notice https://wiki.archlinux.org/title/Systemd/User say that

~/.local/share/systemd/user/    -   where units of packages that have been installed in the home directory belong.

so how to build packages that can be install in the home directory ?

Last edited by nibazshab (2024-12-02 06:56:00)

Offline

#2 2024-12-02 06:50:08

cryptearth
Member
Registered: 2024-02-03
Posts: 2,165

Re: [Solved] How to build pkg that can be install in the home directory ?

you don't/can't
by definition pacman/packages are meant to not touch /home at all

Offline

#3 2024-12-02 06:54:58

nibazshab
Member
Registered: 2022-08-25
Posts: 60

Re: [Solved] How to build pkg that can be install in the home directory ?

cryptearth wrote:

you don't/can't
by definition pacman/packages are meant to not touch /home at all

ok thanks

Offline

#4 2024-12-02 07:54:45

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved] How to build pkg that can be install in the home directory ?

User units for systemd should be installed under /usr/lib/systemd/user/, which is the location given next in your wiki link.

Packages that require modifications in $HOME usually leave a message in the postinstall script to tell the user what needs to be done.


Jin, Jîyan, Azadî

Offline

#5 2024-12-03 11:02:16

nibazshab
Member
Registered: 2022-08-25
Posts: 60

Re: [Solved] How to build pkg that can be install in the home directory ?

I see it.

/usr/lib/systemd/user/ work with units of packages
/etc/systemd/user/ , ~/.config/systemd/user/ work with custom units.

I think that Wiki tell me ~/.local/share/systemd/user/ also work with units of packages not custom units, so maybe have some way can build a package just install into $HOME ?

That's what I think.

Last edited by nibazshab (2024-12-03 11:06:38)

Offline

#6 2024-12-03 11:20:31

cryptearth
Member
Registered: 2024-02-03
Posts: 2,165

Re: [Solved] How to build pkg that can be install in the home directory ?

nibazshab wrote:

maybe have some way can build a package just install into $HOME ?

NO! full stop!
packages are meant to NOT affect /home un ANY way at all!
have a look at citrix icaclient: after setup it tells you "please copy these files from /usr/... to /home/..."

Offline

#7 2024-12-03 11:29:06

loqs
Member
Registered: 2014-03-06
Posts: 18,887

Re: [Solved] How to build pkg that can be install in the home directory ?

nibazshab wrote:

so how to build packages that can be install in the home directory ?

What do you mean by a package that can be installed in the home directory?

Offline

#8 2024-12-05 11:54:42

nibazshab
Member
Registered: 2022-08-25
Posts: 60

Re: [Solved] How to build pkg that can be install in the home directory ?

loqs wrote:

What do you mean by a package that can be installed in the home directory?

Mean that since ~/.local/share/systemd/user/ can be save Systemd Units, so a foo.pkg.tar.zst also can insall to $HOME like ~/.local/bin/, ~/.local/share/, ~/.local/etc/foo/foo.conf ....

Last edited by nibazshab (2024-12-05 11:58:57)

Offline

#9 2024-12-05 11:55:35

nibazshab
Member
Registered: 2022-08-25
Posts: 60

Re: [Solved] How to build pkg that can be install in the home directory ?

cryptearth wrote:

NO! full stop!
packages are meant to NOT affect /home un ANY way at all!
have a look at citrix icaclient: after setup it tells you "please copy these files from /usr/... to /home/..."

Yes, I already know about it.

Offline

#10 2024-12-05 12:08:13

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,045

Re: [Solved] How to build pkg that can be install in the home directory ?

Mean that since ~/.local/share/systemd/user/ can be save Systemd Units, so a foo.pkg.tar.zst also can insall to $HOME like ~/.local/bin/, ~/.local/share/, ~/.config/foo/foo.conf ....

Any package that does that violates arch packaging guidelines.

If you want to manage user services under /home/user , look for other methods then a package.
https://wiki.archlinux.org/title/Dotfiles should give you some ideas.


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

#11 2024-12-05 19:14:59

loqs
Member
Registered: 2014-03-06
Posts: 18,887

Re: [Solved] How to build pkg that can be install in the home directory ?

nibazshab wrote:

Mean that since ~/.local/share/systemd/user/ can be save Systemd Units, so a foo.pkg.tar.zst also can insall to $HOME like ~/.local/bin/, ~/.local/share/, ~/.local/etc/foo/foo.conf ....

$HOME and ~ would be taken from the user running makepkg which locks that built package to being usable by that user on that system. It also makes assumptions about when $HOME is mounted.

Offline

Board footer

Powered by FluxBB