Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'build' and 'uninstall' make targets #2

Closed
scabala opened this issue Aug 11, 2021 · 3 comments · Fixed by #5
Closed

Add 'build' and 'uninstall' make targets #2

scabala opened this issue Aug 11, 2021 · 3 comments · Fixed by #5

Comments

@scabala
Copy link
Contributor

scabala commented Aug 11, 2021

Right now, it is not straightforward how to uninstall application. Having special target in Makefile called 'uninstall' would help a ton.

Another thing is current state of 'install' target: it combines building app (Python egg/wheel, translations, etc.) with installing them in proper locations. Installing in system locations requires root access and building app with root privileges is not good thing. So it would be nice to separate them.

@otsaloma
Copy link
Owner

An uninstall target is not customary and would be problematic to implement correctly. And anyway, having distros package Catapult is a better way to solve (un)installation issues than some weird Makefile stuff that very few will use.

What's your need for a separate build target? There's already DESTDIR in the Makefile, which e.g. distro packages should be able to use, something like

make DESTDIR=pkg PREFIX=/usr install

@scabala
Copy link
Contributor Author

scabala commented Aug 19, 2021

Targeting catapult to be packaged by different distros seems good idea. Also uninstalling is not trivial as you said.
Having separate build target is more popular from my experience and is expected by different packaging systems - i.e. in RPM-based distro, there are separate steps build and install. Various programs use just make build and make install command in them. There are also predefined macros for that.

Another reason to have separate build target is that: as a user/packager, I would like to inspect what will be installed, like generated translation files, without performing actual installation.

Another reason is root privilege - roght now, to install Catapult I need to execute gettext command with root privileges since appropriate files are generated during install target. If there's some hypothetical vulnerability in gettext utility, it would be bad to execute it as root.

I created such new build target and can make a PR with it.

@otsaloma
Copy link
Owner

Yeah, go ahead, make a PR, we can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants