Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 955979 - dev-util/clion installs /opt/clion/bin/clion without execution flag set
Summary: dev-util/clion installs /opt/clion/bin/clion without execution flag set
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Stefan Cristian Brindusa
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-15 06:44 UTC by Dustin Polke
Modified: 2025-05-16 06:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to set permission during install (clion-2025.1-r1.ebuild.patch,765 bytes, patch)
2025-05-15 06:44 UTC, Dustin Polke
Details | Diff
emerge --info (emerge.info,22.79 KB, text/plain)
2025-05-15 06:45 UTC, Dustin Polke
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dustin Polke 2025-05-15 06:44:10 UTC
Created attachment 928838 [details, diff]
Patch to set permission during install

After each update of clion, I need to manually set the execution flag of the /opt/clion/bin/clion binary. This is quite annoying. It would be nice if it is set directly when installing.

```
 # ll /opt/clion/bin/clion
-rw-r--r-- 1 root root 776528 May 14 09:53 /opt/clion/bin/clion
```

All that needs to be done is to add the clion executable to the fperm call during install.
Comment 1 Dustin Polke 2025-05-15 06:45:03 UTC
Created attachment 928839 [details]
emerge --info
Comment 2 Dustin Polke 2025-05-15 06:48:17 UTC
Probably, `remote-dev-server` should be added as well

```
 # file  /opt/clion/bin/remote-dev-server
/opt/clion/bin/remote-dev-server: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped

# ll  /opt/clion/bin/remote-dev-server
-rw-r--r-- 1 root root 776528 May 14 09:53 /opt/clion/bin/remote-dev-server
```
Comment 3 Stefan Cristian Brindusa 2025-05-15 15:33:14 UTC
(In reply to Dustin Polke from comment #0)
> Created attachment 928838 [details, diff] [details, diff]
> Patch to set permission during install
> 
> After each update of clion, I need to manually set the execution flag of the
> /opt/clion/bin/clion binary. This is quite annoying. It would be nice if it
> is set directly when installing.
> 
> ```
>  # ll /opt/clion/bin/clion
> -rw-r--r-- 1 root root 776528 May 14 09:53 /opt/clion/bin/clion
> ```
> 
> All that needs to be done is to add the clion executable to the fperm call
> during install.

I have not observed this due to the fact that clion is being launched via UI / desktop icon.
Thank you for reporting.

I understand you are using the executable via absolute path, and it should definitely be available as executable, I will push for a 2025.1-r2 today/tomorrow.

But the /usr/bin/clion (which executes /opt/clion/bin/clion) is executable:
localpc # ls -la /usr/bin/clion
-rwxr-xr-x 1 root root 44 Apr 29 22:24 /usr/bin/clion

Using it as simple user via /usr/bin/clion works on my side:

local@localpc ~ $ /usr/bin/clion
[0.002s][warning][cds] Archived non-system classes are disabled because the java.system.class.loader property is specified (value = "com.intellij.util.lang.PathClassLoader"). To use archived non-system classes, this property must not be set
2025-05-15 18:29:59,594 [    160]   WARN - sun.util.locale.provider.LocaleProviderAdapter - COMPAT locale provider will be removed in a future release
Installation home directory: file:////opt/clion
System directory: file:////home/local/.cache/JetBrains/CLion2025.1
Config directory: file:////home/local/.config/JetBrains/CLion2025.1
Log directory: file:////home/local/.cache/JetBrains/CLion2025.1/log
Debug | ByteBufferAsyncProcessor  | 44:DefaultDispatcher-worker-20 | PAUSE ('Socket not connected') :: {id = FrontendToBackend/Sender, state = 'Initialized'} 
Debug | Server                    | 74:FrontendToBackend | FrontendToBackend: listening /127.0.0.1:36835 
(...)

The installation of the /usr/bin/clion is being done by the ebuild.


The (In reply to Dustin Polke from comment #2)
> Probably, `remote-dev-server` should be added as well
> 
> ```
>  # file  /opt/clion/bin/remote-dev-server
> /opt/clion/bin/remote-dev-server: ELF 64-bit LSB pie executable, x86-64,
> version 1 (SYSV), dynamically linked, interpreter
> /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, stripped
> 
> # ll  /opt/clion/bin/remote-dev-server
> -rw-r--r-- 1 root root 776528 May 14 09:53 /opt/clion/bin/remote-dev-server
> ```

The remote-dev-server is being taken care of by the CLion itself, including the permissions.
Comment 4 Viorel Munteanu gentoo-dev 2025-05-15 15:36:06 UTC
/usr/bin/clion executes /opt/clion/bin/clion.sh, not /opt/clion/bin/clion

I don't know why they both exist or what is the difference.
Comment 5 Stefan Cristian Brindusa 2025-05-15 15:44:13 UTC
(In reply to Viorel Munteanu from comment #4)
> /usr/bin/clion executes /opt/clion/bin/clion.sh, not /opt/clion/bin/clion
> 
> I don't know why they both exist or what is the difference.

Apologies, I meant /opt/clion/bin/clion.sh. Yes.

Normally users can use /usr/bin/clion directly as executable either via desktop icon, or terminal via user, and they would pass through the clion.sh.

The clion.sh starts java engine with transparent settings, and does not use the /opt/clion/bin/clion directly (from what I remember and from what I saw). This provides some visibility on how settings are done.

But I would like to know why would we use the binary itself from /opt/clion/bin/clion, as well. Not that I would mind giving it executable permissions as well.
Comment 6 Dustin Polke 2025-05-16 06:33:39 UTC
The reason why I switch from using /usr/bin/clion which calls then the /opt/clion/bin/clion.sh is that you get a pop-up in the IDE after starting this way saying:
```
The IDE seems to be launched with a script launcher ('bin/clion.sh'). Please consider switching to a native launcher ('bin/clion') for better experience.
```

It has a button that redirects to the following url explaining what is the benefit from using not the script: https://youtrack.jetbrains.com/articles/SUPPORT-A-56/How-to-handle-Switch-to-a-native-launcher-notification