Here is my PKGBUILD (some parts are similar to another package that was not deleted):
Which package? The TUs don't automatically know everything that happens on the AUR but isn't reported.
]]>You see, the problem is that pip and pacman are not compatible. So keeping a python install system wide and installing something there via pip is usually a bad idea. So, it's always better to do systemwide install with pacman and AUR
pip is recommended to install stuff in Python virtual environments
If you really want a system wide install of the python package, creating a AUR is the way to go. But again, avoiding the pip install step.
The other stuff, the dependecies, the semantics of the script, etc, are fixable. The main issue is mixing pip and pacman. Too many cooks. You will end up with files written by pip than python can't upgrade or remove, and viceversa.
]]>Wrong assumption.
Do you actually have detailed knowledge of the authors intention or is this just something you say boldy because then it's right by definition?
Since we're exclusively talking about the explicitly distinct "SERVER_MODE" here, the idea that pgadmin4 is run by Joe S. Desktopuser seems a bit far fetched?
Why wouldn't J. Some Desktopuser use the desktop mode which utilizes their $HOME instead of a system path?
Maybe the PKGBUILD could create a system service.
A *system* service can chown the paths because it runs as root, it can then su into a specified user and it can also be socket activated (ie. when you open the url in the browser)
chown'ing a system path to a random user is however such a massively huge red flag, that I'd double and triple and quadruple check whether you're actually using pgadmin4 the way it's intended before chasing that goose.
I would assume that there is no more than one user a time using a DE.
https://wiki.archlinux.org/title/Xorg_multiseat
Also the "desktop" aspect is only introduced by your pgadmin4.desktop - it's not inherent to the use of pgadmin4 itself.
and I *assume* that "$USER" relates to the UID of the web/postgresserver - not some joe user clicking on an icon.
Wrong assumption. I would assume that there is no more than one user a time using a DE. I understand that pgadmin instructions are a bit difficult to put into a package safely.
It seems that it is quite impossible to bend the python package to a level of safety.
Maybe the PKGBUILD could create a system service. Then, just the browser would be launched. But that still does not solve the chowning of the system dirs. And the server would be running even when not required. Unless other sudos are used.
A Python package is available for those wishing to run pgAdmin as a web application in a Python environment. Note that the packages do not include the Desktop Runtime.
And
Note that pgAdmin will run in server mode, using system-wide paths so you may need to create them first:
what leads them to
$ sudo mkdir /var/lib/pgadmin
$ sudo mkdir /var/log/pgadmin
$ sudo chown $USER /var/lib/pgadmin
$ sudo chown $USER /var/log/pgadmin
and I *assume* that "$USER" relates to the UID of the web/postgresserver - not some joe user clicking on an icon.
]]>aquilarubra what is in /var/lib/pgadmin on your system? Which I assume uses your script to create that directory.
Sessions are recorded there. Every pgadmin4 installation looks there. So, it ensures that you don't have to retype all your data. My script only checks that the path exists and chowns it for current user.
]]>So, some degree of freedom is assumed. Some may like something, some may not.
It has nothing to do with what you like. It is about correctness. What you are attempting to do is not subjectively unlikable, it is objectively wrong. So you aren't being censored, you are being sanctioned. There is a difference.
]]>Ultimately, what you're looking to do can be done w/o certainly kdesu (if you follow the PIP remarks in the wiki and this is local approach anyway) or xterm (any TE - you can either store the daemons PID or pkill it and offer yet another desktop entry for that)
Where's your updated script?
]]>The upstream instructions you are basing this off are https://www.pgadmin.org/download/pgadmin-4-python/ ?
Yes.
I followed pip instructions for Arch and I think I am compliant now. I don't know what else is the problem. I forgot to put kdesu in depends, good find.
AUR was never supposed to be the official repository. So, some degree of freedom is assumed. Some may like something, some may not. Some may contribute to make a script better. So, what's the problem?
Frankly, censorship is a bigger problem. I maintain some important packages and I am rethinking to contribute to Arch now.
]]>Are you saying the instructions on the pgadmin website are terrible?
idk whether that's actually on their webpage, but if so, then yes: that's terrible.
What if kdesu isn't installed?
Relying on a specific TE is even more moronic than using one here itfp - the lan is to run a daemon in a minimized window so you can kill it by closing the window?.
And again: this is a terrible way to use pip - read the link I posted.