You are not logged in.

#1 2021-11-24 15:58:07

tethys
Member
Registered: 2019-08-13
Posts: 45

Installation package writes to home directory

Hello community,

I would like to write a PKGBUILD for an installation package that writes files to the home directory. In the Arch Package Guidelines I read however that packages should not write to the the home directory (well, not exactly that, see below).

How to solve this? And as we are here, why do the Package Guidelines say that "packages should not contain any of the following directories: ... /home ..."? Is it actually meant the home directory by "/home"?

Offline

#2 2021-11-24 16:05:14

loqs
Member
Registered: 2014-03-06
Posts: 14,282

Re: Installation package writes to home directory

Why does the package need to write to a users home directory?  Understanding the packages requirements will help with suggesting alternatives.

Offline

#3 2021-11-29 07:33:51

tethys
Member
Registered: 2019-08-13
Posts: 45

Re: Installation package writes to home directory

Thank you loqs for your reply. There were some directories left in the home directory, all related to Java runtime environment. It turned out I could just delete them without any problem. I think they were needed just by the installation program as they are not needed by the program itself.

I want to write for myself a pkgbuild from an installation package but I do not know how to proceed. If I run the installation program I can track where the files are installed - but of course I would like to avoid that and install the package through pacman. How should I proceed in this case? If I just run the installation package through the makepkg in the build() function and leave the package() function first empty, how would I know where to install/copy the files so that I can write the package() function? Whould the directory structure in the ${srcdir} be the same as the one produced by running the installation program directly?

Offline

#4 2021-11-29 08:30:23

Awebb
Member
Registered: 2010-05-06
Posts: 5,879

Re: Installation package writes to home directory

It would be easier if we knew what program your are talking about. This is a too general question that'll end up in the same wiki articles you've already.

Offline

#5 2021-11-30 07:07:05

tethys
Member
Registered: 2019-08-13
Posts: 45

Re: Installation package writes to home directory

Thank you Awebb for your reply. Of course I can tell what program I am trying to write a pkgbuild for; but I would prefer not to yet, because I am looking for a general outline for making pkgbuilds before going to any particular case. I cannot find good information on how to do this. I guess I will have to try myself what I described in the second paragraph of my second post.

Offline

#6 2021-11-30 10:49:08

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,596

Re: Installation package writes to home directory

thethys wrote:

I want to write for myself a pkgbuild from an installation package

There are many ways to create an installation package and converting them to pkgbuilds varies from easy to near impossible .

tethys wrote:

Whould the directory structure in the ${srcdir} be the same as the one produced by running the installation program directly?

That's impossible to answer without knowing how the installation package was created.


If this is about proprietary code, https://wiki.archlinux.org/title/Nonfre … guidelines may be helpful .

Incase the sourcecode of the application is available there are usually manual installation instructions.
Those tend to be a good guideline to create a PKGBUILD.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB