You are not logged in.

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

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

[SOLVED] 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"?

Last edited by tethys (2021-12-08 18:13:49)

Offline

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

loqs
Member
Registered: 2014-03-06
Posts: 17,194

Re: [SOLVED] 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: 94

Re: [SOLVED] 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: 6,272

Re: [SOLVED] 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: 94

Re: [SOLVED] 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: 11,868

Re: [SOLVED] 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.


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

Offline

#7 2021-12-08 18:39:03

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

Re: [SOLVED] Installation package writes to home directory

Thank you Lone_Wolf for your reply. I will mark this thread as solved, because the issue raised in the title was clarified in post #3.

Concening the other topic - how to write a pkgbuild from an installer - I came to the same conclusion mentioned by the experienced members of this forum in the replies to this thread: that there is no general rule. However, I think that running the installer through the makepkg's inbuilt fakeroot (as described in #3) and seeing what files are written in the $srcdir can give crucial hints about how to proceed. Some installers have a quiet mode that doesn't require user interaction- And in some very fortunate cases all that's required to do would be to copy the content of the $srcdir to $pkgdir.

Offline

Board footer

Powered by FluxBB