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

(Linux) Change installation path from /usr/local/bin to /usr/bin #57

Closed
TommyTran732 opened this issue Jul 10, 2021 · 13 comments
Closed
Assignees
Milestone

Comments

@TommyTran732
Copy link

Hi,

I am not sure whether I should create this issue under bug report or feature request, but I figured I would just use feature request because I am suggesting a change.

Feature request

Moving the installation path to /usr/bin instead of /usr/local/bin to support rpm-ostree systems (like Fedora Silverblue) and avoid breaking atomic updates/inconsistency on systems like openSUSE MicroOS or openSUSE Tumbleweed/Leap.

More information

On rpm-ostree based systems like Fedora Silverblue, they currently cannot work with packages that use /usr/local/bin due to a bug on their part: coreos/rpm-ostree#233. This practically make the IVPN app uninstallable on those systems :/

On openSUSE distros, /usr/local/bin belong to the BTRFS subvolume @/usr/local is not part of the root subvolume (@/.snapshots/X/snapshot), and thus do not get snapshotted and does not rollback with the rest of the system should the user choose to do so. This essentially make the MicroOS variant lose its atomic update and cause in consistency with the Tumbleweed/Leap variants. The package manager (zypper) will think that IVPN is rolled back to an older version along with the rest of the system, while in reality the executable on /usr/local/bin is the newer version.

And while I have not tested this on Ubuntu yet (I have on Fedora Silverblue and openSUSE), it seems like Ubuntu's ZFS partition layout also uses a seperate pool for /usr/local as well, and thus could probably lead to the same issue on openSUSE.

Accoding to the Linux filesystem heirachy, /usr/local is supposed to contain programs the user installed from source, while /usr is for programs installed using the package manager. IVPN is distributed as pre compiled packages, and thus it should not be installed in /usr/local/bin in the first place. The issue I described with openSUSE and potentially Ubuntu with ZFS looks to be more like an issue with the IVPN package than the way they setup their BTRFS subvolumes/ZFS pools. I also think that it is unlikely rpm-ostree will support /usr/local as well, since you cannot make install anything on the host OS's immutable filesystem.

Have you considered any alternative solutions or workarounds?

Yes I have, but it is practically not doable on rpm-ostree systems. However, I don't think IVPN should be installed at /usr/local/bin in the first place, since it is being distributed as a .deb, .rpm, and pacman package that is being installed by the package manager.

@Enteee
Copy link

Enteee commented Aug 3, 2021

Because of this issue ivpn can not be installed inside a Qubes OS fedora-* template. The reason being that /usr/local is a default Qubes OS bind-dir location.

I would also like to see this changed as suggested.

@stenya stenya added this to To Do in IVPN Desktop App Aug 3, 2021
@stenya stenya moved this from To Do to In Progress in IVPN Desktop App Aug 4, 2021
@stenya stenya self-assigned this Aug 4, 2021
@stenya stenya moved this from In Progress to Preparing for QA in IVPN Desktop App Aug 4, 2021
@stenya stenya moved this from Preparing for QA to In Review / QA in IVPN Desktop App Aug 4, 2021
@gorkapernas
Copy link
Member

Verified on version 3.3.21, tested on multiple Linux Systems, Fedora 33, Linux Mint, Ubuntu 20.04, CentOS 8, Linux MX, Debian, the installation path has been changed from /usr/local/bin to /usr/bin as suggested. No issues have been found during the installation process or while running IVPN.

Please be aware that when upgrading to a new IVPN version, if using the same terminal after the upgrade in order to run the IVPN CLI, the terminal will still search for the IVPN binary in the old path, which means that the IVPN commands are not reachable. Therefore a new terminal window has to be opened in order to use the CLI with the new binary path.
This is not the case on a fresh IVPN installation, only on upgrade.

@gorkapernas gorkapernas removed their assignment Aug 5, 2021
@gorkapernas gorkapernas moved this from In Review / QA to Deployable in IVPN Desktop App Aug 5, 2021
@Enteee
Copy link

Enteee commented Aug 7, 2021

Awesome @gorkapernas ! Thank you. Waiting for the 3.3.21 release then...

@Enteee
Copy link

Enteee commented Aug 25, 2021

@gorkapernas : This feature is currently blocking me in one of my projects. Is there a timeline on when this is expected to be released?

@stenya
Copy link
Member

stenya commented Aug 25, 2021

We will release it next week.

@Enteee
Copy link

Enteee commented Aug 25, 2021

thx for your swift response! @stenya

@stenya stenya added this to the 3.3.30 milestone Aug 30, 2021
@stenya stenya changed the title Change installation path from /usr/local/bin to /usr/bin (Linux) Change installation path from /usr/local/bin to /usr/bin Aug 30, 2021
stenya added a commit that referenced this issue Aug 30, 2021
@stenya stenya moved this from Deployable to In Review / QA in IVPN Desktop App Aug 30, 2021
@stenya
Copy link
Member

stenya commented Aug 30, 2021

@gorkapernas Due to new changes (fixes), it is necessary to re-check it again.
@Enteee We still planning to release it this week :)

@gorkapernas
Copy link
Member

Verified on version 3.3.30, different Linux distributions, the installation process works as expected after the last changes implemented in the installer (FYI, the new path had to be specified on certain instances).
This should be good to go.

@gorkapernas gorkapernas removed their assignment Aug 30, 2021
@gorkapernas gorkapernas moved this from In Review / QA to Deployable in IVPN Desktop App Aug 30, 2021
@stenya stenya moved this from Deployable to Done in IVPN Desktop App Aug 31, 2021
@stenya
Copy link
Member

stenya commented Aug 31, 2021

Released in v3.3.30

@stenya stenya closed this as completed Aug 31, 2021
@stenya stenya removed this from Done in IVPN Desktop App Aug 31, 2021
@Enteee
Copy link

Enteee commented Aug 31, 2021

Wow thx! Will give it a shot asap.

@TommyTran732
Copy link
Author

TommyTran732 commented Sep 2, 2021

Could you update the AUR package as well?
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ivpn
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ivpn-ui

These haven't been updated yet :(

@stenya
Copy link
Member

stenya commented Sep 2, 2021

@TommyTran732 Yes. I will do it next release.
Just one question: why do you need it? Are there any issues with the installation path on Arch Linux distributions?

@TommyTran732
Copy link
Author

TommyTran732 commented Sep 5, 2021

@TommyTran732 Yes. I will do it next release.
Just one question: why do you need it? Are there any issues with the installation path on Arch Linux distributions?

No, it works fine. I just prefer having consistency between my different Linux setups. Plus, I also wanna follow the file system heirachy :D

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

No branches or pull requests

4 participants