Hello everyone,
I wonder why there is no 'uninstall' option in the flashrom's Makefile? Is it just an oversight? Or do we have a reason for that?
The same question is related to the meson script.
-- Joursoir
Hi Joursoir,
the 'uninstall' should be performed by the package manager or 'rm'. Also the Makefile or other build scripts are not part of the flashrom installation.
To remove build artifacs you can run 'make clean' for Make or 'rm -r <build_dir> on Meson.
-- Thomas
On Mon, 2022-11-07 at 13:59 +0400, Joursoir wrote:
Hello everyone,
I wonder why there is no 'uninstall' option in the flashrom's Makefile? Is it just an oversight? Or do we have a reason for that?
The same question is related to the meson script.
-- Joursoir _______________________________________________ flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
Hello Thomas,
Of course, `uninstall`/`install` options should be performed by the package manager, but not limited to this. Otherwise, why do we need `install` option in the Makefile?
It's just strange, that a person can download flashrom sources, use `install` options and then find out that there's no `uninstall` option.
-- Joursoir
On Mon, 07 Nov 2022 14:20:34 +0000 Thomas Heijligen src@posteo.de wrote:
Hi Joursoir,
the 'uninstall' should be performed by the package manager or 'rm'. Also the Makefile or other build scripts are not part of the flashrom installation.
To remove build artifacs you can run 'make clean' for Make or 'rm -r <build_dir> on Meson.
-- Thomas
On Mon, 2022-11-07 at 13:59 +0400, Joursoir wrote:
Hello everyone,
I wonder why there is no 'uninstall' option in the flashrom's Makefile? Is it just an oversight? Or do we have a reason for that?
The same question is related to the meson script.
-- Joursoir _______________________________________________ flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
Do you know an other project providing a uninstall script? I know none. The install target is for copying all necessary files into the correct place in the filesystem hierarchy. After that the user, or a other program is responsible.
-- Thomas
On November 8, 2022 10:13:34 AM GMT+01:00, Joursoir chat@joursoir.net wrote:
Hello Thomas,
Of course, `uninstall`/`install` options should be performed by the package manager, but not limited to this. Otherwise, why do we need `install` option in the Makefile?
It's just strange, that a person can download flashrom sources, use `install` options and then find out that there's no `uninstall` option.
-- Joursoir
On Mon, 07 Nov 2022 14:20:34 +0000 Thomas Heijligen src@posteo.de wrote:
Hi Joursoir,
the 'uninstall' should be performed by the package manager or 'rm'. Also the Makefile or other build scripts are not part of the flashrom installation.
To remove build artifacs you can run 'make clean' for Make or 'rm -r <build_dir> on Meson.
-- Thomas
On Mon, 2022-11-07 at 13:59 +0400, Joursoir wrote:
Hello everyone,
I wonder why there is no 'uninstall' option in the flashrom's Makefile? Is it just an oversight? Or do we have a reason for that?
The same question is related to the meson script.
-- Joursoir _______________________________________________ flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
On 08.11.22 11:33, Thomas Heijligen wrote:
Do you know an other project providing a uninstall script? I know none.
For some projects `make uninstall` used to be as usual as `make install`. Maybe it's a GNUism, though, I don't know. It seems good practice nevertheless.
The install target is for copying all necessary files into the correct place in the filesystem hierarchy. After that the user, or a other program is responsible.
There's often no single program responsible for the whole filesystem. And if we'd want to make the user responsible, we should have it docu- mented what files are installed. I don't know if we have.
Nico
On Tue, 08 Nov 2022 10:33:50 +0000 Thomas Heijligen src@posteo.de wrote:
Do you know an other project providing a uninstall script? I know none.
Standard unix password manager (pass), MidnightCommander, Dovecot, claws and most of the GNU program. And these are just the programs that first came to my mind.
The install target is for copying all necessary files into the correct place in the filesystem hierarchy. After that the user, or a other program is responsible.
The uninstall target is for deleting all program's files from the correct place. Otherwise, a user will have to go through the Makefile, find out the values of variables that are used in install target and delete it by hand. A user will obviously not be grateful to us for this.
On Tue, 08 Nov 2022 10:47:32 +0000 Felix Singer felixsinger@posteo.net wrote:
However, an uninstall target doesn't make sense since there are way too many unknown variables and what not.
As far as we introduced install target, we take this responsibility and know the paths where all the necessary files are installed.
-- Joursoir
On Tue, 08 Nov 2022 10:33:50 +0000 Thomas Heijligen src@posteo.de wrote:
Do you know an other project providing a uninstall script? I know none. The install target is for copying all necessary files into the correct place in the filesystem hierarchy. After that the user, or a other program is responsible.
-- Thomas
On November 8, 2022 10:13:34 AM GMT+01:00, Joursoir chat@joursoir.net wrote:
Hello Thomas,
Of course, `uninstall`/`install` options should be performed by the package manager, but not limited to this. Otherwise, why do we need `install` option in the Makefile?
It's just strange, that a person can download flashrom sources, use `install` options and then find out that there's no `uninstall` option.
-- Joursoir
On Mon, 07 Nov 2022 14:20:34 +0000 Thomas Heijligen src@posteo.de wrote:
Hi Joursoir,
the 'uninstall' should be performed by the package manager or 'rm'. Also the Makefile or other build scripts are not part of the flashrom installation.
To remove build artifacs you can run 'make clean' for Make or 'rm -r <build_dir> on Meson.
-- Thomas
On Mon, 2022-11-07 at 13:59 +0400, Joursoir wrote:
Hello everyone,
I wonder why there is no 'uninstall' option in the flashrom's Makefile? Is it just an oversight? Or do we have a reason for that?
The same question is related to the meson script.
-- Joursoir _______________________________________________ flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
I think we can shorten the discussion with this:
The Make build system is going to be deprecated with the next release and it is going to be dropped with the release after that. It's contradictory to announce its deprecation on the one hand while adding new features on the other.
We discussed the Make build system in many meetings now and we all agreed that we won't add any more features to it. That means its current feature state is frozen and it doesn't get any additional functionality, just bug fixes, refactorings or adjustments as far as they are really necessary.
With the next release Meson becomes our primary build system, which even comes with an uninstall command as Richard mentioned, and users should be discouraged from using the Make build system. At this point it will be just kept for backwards compatibility and to give people the time migrating over. Further effort on this topic seems unproductive.
On Thu, 2022-11-10 at 15:38 +0400, Joursoir wrote:
On Tue, 08 Nov 2022 10:33:50 +0000 Thomas Heijligen src@posteo.de wrote:
Do you know an other project providing a uninstall script? I know none.
Standard unix password manager (pass), MidnightCommander, Dovecot, claws and most of the GNU program. And these are just the programs that first came to my mind.
I looked into these projects. I couldn't find an uninstall target except for pass, which is implemented by themselves. The other projects use additional build tools (autoconf, automake, not sure what else), which generate a Makefile based on your given configuration. I assume this will auto-generate an uninstall target as well, which is not possible for us since we don't use these tools.
The install target is for copying all necessary files into the correct place in the filesystem hierarchy. After that the user, or a other program is responsible.
The uninstall target is for deleting all program's files from the correct place. Otherwise, a user will have to go through the Makefile, find out the values of variables that are used in install target and delete it by hand. A user will obviously not be grateful to us for this.
Until this point, I didn't even know about an uninstall target. I have never heard or seen that anyone uses that. An "user" (who is the user here?) shouldn't even need to run make install ;)
What's the "correct place"? What if users think `make uninstall` is somehow hooked up to their package manager and it does the necessary steps? What if people start using it and brick their system? Again, the Makefile is not meant for users and we don't ship a "package" manager with our build system.
It might be different if we auto-generate the build configuration, as for example the other projects do you mentioned, since that configuration is specific to your system and generated out of the parameters and configuration you provided. This way you also don't have to maintain paths and files at two different places which makes is much less error-prone.
Our Make build system highly depends on given variables for every Make call and we don't auto-generate a build configuration for the underlying system.
On Tue, 08 Nov 2022 10:47:32 +0000 Felix Singer felixsinger@posteo.net wrote:
However, an uninstall target doesn't make sense since there are way too many unknown variables and what not.
As far as we introduced install target, we take this responsibility and know the paths where all the necessary files are installed.
What responsibility are you talking about? We are not responsible for anyones system nor do we know anything about them. Our Make build system does not come with a managing functionality.
// Felix
Ok, if you think this is usefull, and you can implement it in a reliable way, go ahead. Please be aware, that we want to deprecate the Makefile in the future.
Personally I think the uninstall target is just a relict form the old days and lost it's usefulness on modern system.
-- Thomas
On Thu, 2022-11-10 at 15:38 +0400, Joursoir wrote:
On Tue, 08 Nov 2022 10:33:50 +0000 Thomas Heijligen src@posteo.de wrote:
Do you know an other project providing a uninstall script? I know none.
Standard unix password manager (pass), MidnightCommander, Dovecot, claws and most of the GNU program. And these are just the programs that first came to my mind.
The install target is for copying all necessary files into the correct place in the filesystem hierarchy. After that the user, or a other program is responsible.
The uninstall target is for deleting all program's files from the correct place. Otherwise, a user will have to go through the Makefile, find out the values of variables that are used in install target and delete it by hand. A user will obviously not be grateful to us for this.
On Tue, 08 Nov 2022 10:47:32 +0000 Felix Singer felixsinger@posteo.net wrote:
However, an uninstall target doesn't make sense since there are way too many unknown variables and what not.
As far as we introduced install target, we take this responsibility and know the paths where all the necessary files are installed.
-- Joursoir
On Tue, 08 Nov 2022 10:33:50 +0000 Thomas Heijligen src@posteo.de wrote:
Do you know an other project providing a uninstall script? I know none. The install target is for copying all necessary files into the correct place in the filesystem hierarchy. After that the user, or a other program is responsible.
-- Thomas
On November 8, 2022 10:13:34 AM GMT+01:00, Joursoir chat@joursoir.net wrote:
Hello Thomas,
Of course, `uninstall`/`install` options should be performed by the package manager, but not limited to this. Otherwise, why do we need `install` option in the Makefile?
It's just strange, that a person can download flashrom sources, use `install` options and then find out that there's no `uninstall` option.
-- Joursoir
On Mon, 07 Nov 2022 14:20:34 +0000 Thomas Heijligen src@posteo.de wrote:
Hi Joursoir,
the 'uninstall' should be performed by the package manager or 'rm'. Also the Makefile or other build scripts are not part of the flashrom installation.
To remove build artifacs you can run 'make clean' for Make or 'rm -r <build_dir> on Meson.
-- Thomas
On Mon, 2022-11-07 at 13:59 +0400, Joursoir wrote:
Hello everyone,
I wonder why there is no 'uninstall' option in the flashrom's Makefile? Is it just an oversight? Or do we have a reason for that?
The same question is related to the meson script.
-- Joursoir _______________________________________________ flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
flashrom mailing list -- flashrom@flashrom.org To unsubscribe send an email to flashrom-leave@flashrom.org
On Tue, 2022-11-08 at 13:13 +0400, Joursoir wrote:
Of course, `uninstall`/`install` options should be performed by the package manager, but not limited to this. Otherwise, why do we need `install` option in the Makefile?
It's just strange, that a person can download flashrom sources, use `install` options and then find out that there's no `uninstall` option.
The install target is pretty much a standard in build systems. The "standard" user (even these who compile flashrom by themselves) usually doesn't use it though. People just run the software from that directory when it's self compiled. The install target is mostly meant for package maintainers or for people who know **exactly** what they do, since running these commands might damage your system or bring it into an undefined state. For example, if the software was installed through the package manager before then its own data and state about that package break and become inconsistent when you run the install target, which breaks the package manager. And to make it worse, maybe the other software installed on your system is not even compatible to your build.
In case of package maintainers, they mostly just specify the prefix [1], run `make install` which sets up everything and then the package is built out of it.
There are many operating systems out there and we don't know the users environment. We just can't guess their environment or what they intended their environment to be and so running any command with privileged rights is **always** a risk. That's not our responsibility.
There are surely other cases where the install target is useful as well. For example, when you want to build your system from scratch. Another case might be, you are a developer, you want to have that binary system-wide available for some reason and you want it in your path temporarily. So you could set the PREFIX variable to /usr/local, which is not managed by the package manager, do your thing and the other system directories stay untouched.
However, an uninstall target doesn't make sense since there are way too many unknown variables and what not.
// Felix
[1] https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/tools/misc/flashro...
Hi Felix,
On 08.11.22 11:47, Felix Singer wrote:
On Tue, 2022-11-08 at 13:13 +0400, Joursoir wrote: However, an uninstall target doesn't make sense since there are way too many unknown variables and what not.
I'm sorry (also for the short reply) but this is just not true. We generally expect the environment to follow some standards. The `make install` target is or at least was for everyone with root privileges. If nothing was broken, `make install` should install into the `/usr/local/` hierarchy (default prefix). From [2]
Resembles `/usr` in structure, but its subdirectories are used for additions not part of the operating system /local distribution, such as custom programs or files from a BSD Ports collection. Usually has subdirectories such as `/usr/local/lib` or `/usr/local/bin`.
Maybe it's been forgotten? but this is the simple mechanism that should prevent all the bad things that you seem to worry about.
Nico
Hi Joursoir,
On 07.11.22 10:59, Joursoir wrote:
I wonder why there is no 'uninstall' option in the flashrom's Makefile? Is it just an oversight? Or do we have a reason for that?
I assume it's more or less an oversight. It probably started with a single file, then two, now it's three files that get installed. Maybe it's just that nobody saw it necessary yet to add an `uninstall` target for the few files.
The same question is related to the meson script.
If Meson doesn't provide that yet, it might be something for the Meson project?
Nico
On Tue, 8 Nov 2022 at 10:54, Nico Huber nico.h@gmx.de wrote:
If Meson doesn't provide that yet, it might be something for the Meson project?
[hughsie@hughsie-work build (master %)]$ ninja install [0/1] Installing files. Installing libflashrom.so.1.0.0 to /home/hughsie/.root/lib64 Installing libflashrom.a to /home/hughsie/.root/lib64 Installing flashrom to /home/hughsie/.root/sbin Installing subprojects/cmocka-1.1.5/src/libcmocka.so.0.5.0 to /home/hughsie/.root/lib64 Installing /home/hughsie/Code/flashrom/include/libflashrom.h to /home/hughsie/.root/include/ Installing /home/hughsie/Code/flashrom/build/meson-private/flashrom.pc to /home/hughsie/.root/lib64/pkgconfig Installing /home/hughsie/Code/flashrom/build/flashrom.8 to /home/hughsie/.root/share/man/man8 Installing symlink pointing to libflashrom.so.1.0.0 to /home/hughsie/.root/lib64/libflashrom.so.1 Installing symlink pointing to libflashrom.so.1 to /home/hughsie/.root/lib64/libflashrom.so Installing symlink pointing to libcmocka.so.0.5.0 to /home/hughsie/.root/lib64/libcmocka.so.0 Installing symlink pointing to libcmocka.so.0 to /home/hughsie/.root/lib64/libcmocka.so [hughsie@hughsie-work build (master %)]$ ninja uninstall [0/1] /usr/bin/meson --internal uninstall Deleted: /home/hughsie/.root/lib64/libflashrom.so.1.0.0 Deleted: /home/hughsie/.root/lib64/libflashrom.a Deleted: /home/hughsie/.root/sbin/flashrom Deleted: /home/hughsie/.root/lib64/libcmocka.so.0.5.0 Deleted: /home/hughsie/.root/include/libflashrom.h Deleted: /home/hughsie/.root/lib64/pkgconfig/flashrom.pc Deleted: /home/hughsie/.root/share/man/man8/flashrom.8 Deleted: /home/hughsie/.root/lib64/libflashrom.so.1 Deleted: /home/hughsie/.root/lib64/libflashrom.so Deleted: /home/hughsie/.root/lib64/libcmocka.so.0 Deleted: /home/hughsie/.root/lib64/libcmocka.so Deleted: /home/hughsie/.root/share/man/man8 Deleted: /home/hughsie/.root/sbin Uninstall finished. Deleted: 13
Richard.
On Tue, 2022-11-08 at 11:22 +0000, Richard Hughes wrote:
On Tue, 8 Nov 2022 at 10:54, Nico Huber nico.h@gmx.de wrote:
If Meson doesn't provide that yet, it might be something for the Meson project?
[0/1] /usr/bin/meson --internal uninstall
Interesting.. That is not documented in the man page and in the help output.
// Felix