You are not logged in.

#1 2020-06-23 19:30:55

starquake
Member
Registered: 2013-05-03
Posts: 13

thelounge PKGBUILD puts other files like sqlite databases in /etc

I have been using thelounge for quite a while before I stopped using it for about a year. It's an amazing piece of software.

When I wanted to install it again I found there was an AUR package now. I installed it but I saw it creating all kinds of files in /etc like sqlite databases and other stuff that doesn't belong there.

This is the AUR package I'm talking about: https://aur.archlinux.org/packages/thelounge/

I saw comments about it on the AUR package but no solutions. Someone mentioned creating an issue. So I did. I also contributed a possible solution.

This is the issue:
https://github.com/thelounge/thelounge- … /issues/18

TL;DR: I want no sqlite database in my etc as the Arch package guidelines suggest. Upstream does not agree. At least not yet as of writing.

Any suggestions what I should do?

  • Stop moaning because it is okay as it is

  • Post an alternative PKGBUILD

  • Something else?

Suggestions welcome!

Offline

#2 2020-06-23 19:49:16

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

Re: thelounge PKGBUILD puts other files like sqlite databases in /etc

They say they want to keep it consistent across distros?  But they shouldn't use /etc like that in *any* distro.  This is not an archlinux thing, it's a linux filesystem thing.

Anyhow, it looks very easy to configure - just modify one line in the PKGBUILD and one in the service file.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2020-06-23 20:02:09

starquake
Member
Registered: 2013-05-03
Posts: 13

Re: thelounge PKGBUILD puts other files like sqlite databases in /etc

The issue was reopened so I'm very happy! Let's get to work!

You can see in my version of the PKGBUILD I already fixed it. https://github.com/starquake/thelounge-archlinux

So now comes my next question: What should I do with the sqlite files (among others) that are left when I move the files using the change in the PKGBUILD?

If people upgrade old files remain in the old location. I have no idea how to fix it and searching did not yet leave me with an answer.

Last edited by starquake (2020-06-23 20:03:24)

Offline

#4 2020-06-23 20:09:49

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

Re: thelounge PKGBUILD puts other files like sqlite databases in /etc

You can have a post install message suggesting users move the files.  But other than that, this is not the responsibility of a packager.  Every package leaves behind files that have been created by running the software.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2020-06-23 21:01:10

starquake
Member
Registered: 2013-05-03
Posts: 13

Re: thelounge PKGBUILD puts other files like sqlite databases in /etc

Thanks, that seems a possible solution.

Offline

#6 2020-06-24 13:39:31

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: thelounge PKGBUILD puts other files like sqlite databases in /etc

You could mv them in post_upgrade(), since they used to only belong in one place and now only belong in one different place. But would this work if thelounge is still running?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2020-06-24 13:55:17

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

Re: thelounge PKGBUILD puts other files like sqlite databases in /etc

eschwartz, that seems problematic to me.  I really don't think a package should move files that do not belong to it.

User's might already be interacting with the file in it's current location.  Perhaps it's part of their system backups, or dot-file respository, etc.  This is why I'd advocate for informing the user, and letting them move the files as desired.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2020-06-24 14:02:48

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: thelounge PKGBUILD puts other files like sqlite databases in /etc

You could message the user and do it automatically; if they are using etckeeper here, then logfiles aren't exactly appropriate there and were probably manually gitignored. tongue

I'm more concerned that it cannot be done robustly, therefore should not be done. (Again, running instances. This is usually the reason Arch doesn't move unpackaged data around, or run db migrations for possibly-running services.)
Not that it could be done but shouldn't because they might prefer a broken package that no longer looks in /etc for data.

Last edited by eschwartz (2020-06-24 14:04:17)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB