pop-os / launcher

Modular IPC-based desktop launcher service
Mozilla Public License 2.0
219 stars 42 forks source link

Why no install prefix without vendoring? #203

Open mcclure opened 6 months ago

mcclure commented 6 months ago

I would like to try out pop-os launcher/cosmic on my Ubuntu install. If I like them maybe I will switch to pop-os entirely.

As instructed by the README, I run just build-release. Then I run:

$ just prefix=/home/mcc/usr/cosmic install
error: Variable `prefix` overridden on the command line but not present in justfile

Because I am just experimenting with it, I would prefer not to install the launcher "globally". I would prefer to install it to some alternate location, such as /opt/pop or ~/usr, so that if it doesn't work out I can just delete it. Like you can in C projects with ./configure --prefix=/path/to.

The README does say that a sudo just rootdir=debian/tmp prefix=/usr install is supported if you build-vendored. But I am not vendoring, and it seems that vendoring could have unusual side effects for which dependencies the compiled app is allowed to link against. I just want to build a local copy and install it to a non-default location.

Could this be possible? I'm uncertain about trying to modify the build scripts myself as it seems some nontrivial things happen while installing and I've not used "just" before.

mmstick commented 6 months ago

There is no prefix variable in the justfile. The build vendored rule is the same as the build release rule, but with an offline flag.

mcclure commented 6 months ago

There is no prefix variable in the justfile. The build vendored rule is the same as the build release rule, but with an offline flag.

Thank you for explaining. As a note, it looks like build vendored also invokes a _vendor-extract rule, which is the one that was giving me my error.

Now that I understand better, it seems to me that the README has some issues that could be improved:

  1. The README is inaccurate. In the vendored case, the README says to use prefix= in addition to rootdir= when calling just install. But reading the source rootdir= appears to be used to establish install prefix for all installed files, and in my testing calling just prefix=/anything/here install— as the README recommends for packagers— causes an error.
  2. The README seems to me to imply that rootdir is specific to the vendor builds. ("Then you can specify a custom root directory and prefix.", but "then" could mean either "Afterward" or "Therefore".) It could be clearer that rootdir is available for all build types but intended for the vendor build case. Related to this:
  3. The "plugin directories" section lists three directories as potential installation points for pop-os-launcher plugins: The user-local install point (under ~/.local), the distribution install point (under /usr/lib/), and a system administrator install point (under /etc). I think you should clarify in this section that just install without rootdir= is installing into the user-install point and that just install with rootdir= is installing into the distribution point.

If it would be helpful, I could make a PR with suggested improved text for these three issues, but I do not think I can do this with problem (1) because I do not understand what the intent of the nonexistent prefix= variable was meant to be.