Bug 53487

Summary: Ошибка 'JAVA_HOME is not set' при установке пакета linstor-controller
Product: Sisyphus Reporter: Alexander Makeenkov <amakeenk>
Component: linstor-controllerAssignee: xeno <xeno>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: andy, antohami, cas, shaba
Version: unstable   
Hardware: x86_64   
OS: Linux   

Description Alexander Makeenkov 2025-03-17 15:20:03 MSK
- Версия пакета:
1.30.4-alt3

- Шаги воспроизведения:
# apt-get install linstor-controller

- Получаемый результат:
11: linstor-controller-1.30.4-alt3
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Завершено.

- Примечание:
На дальнейшую работу пакета ошибка не влияет.
Comment 1 Repository Robot 2025-03-17 16:22:49 MSK
linstor-1.30.4-alt4 -> sisyphus:

 Mon Mar 17 2025 Andrey Cherepanov <cas@altlinux> 1.30.4-alt4
 - use java-21-openjdk for linstore-controller (ALT #53487).
Comment 2 Alexander Makeenkov 2025-03-18 09:33:52 MSK
(Ответ для Repository Robot на комментарий #1)
> linstor-1.30.4-alt4 -> sisyphus:
> 
>  Mon Mar 17 2025 Andrey Cherepanov <cas@altlinux> 1.30.4-alt4
>  - use java-21-openjdk for linstore-controller (ALT #53487).

Ошибка актуальна:

15: linstor-controller-1.30.4-alt4
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Завершено.
Comment 3 Andrey Cherepanov 2025-03-19 12:26:52 MSK
# unset JAVA_HOME
# . /etc/profile.d/javahome.sh 
# echo $JAVA_HOME
/usr/lib/jvm/java
# $JAVA_HOME/bin/java -version
Comment 4 Alexander Makeenkov 2025-06-16 12:38:34 MSK
Ошибка всё ещё актуальна:

15: linstor-controller-1.31.1-alt2
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Завершено.
Comment 5 Repository Robot 2025-06-26 21:27:26 MSK
linstor-1.31.1-alt3 -> sisyphus:

 Wed Jun 25 2025 Ivan Khanas <xeno@altlinux> 1.31.1-alt3
 - Set JAVA_HOME variable after installing controller. (Closes: 53487)
Comment 6 Alexander Makeenkov 2025-06-27 10:37:39 MSK
24: linstor-controller-1.31.1-alt3                                                                                                                                 

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Завершено.
Comment 7 Антон Мидюков 2025-12-22 10:00:10 MSK
(Ответ для Alexander Makeenkov на комментарий #6)
> 24: linstor-controller-1.31.1-alt3                                          
> 
> 
> ERROR: JAVA_HOME is not set and no 'java' command could be found in your
> PATH.
> 
> Please set the JAVA_HOME variable in your environment to match the
> location of your Java installation.
> 
> Завершено.

По информации из redmine:
"Если перед этим установлен linstor-common, то пакет так же успешно устанавливается."

То есть у пакета linstor-controller нужно исправить следующее:
-Requires: linstor-common = %EVR
+Requires(post): linstor-common = %EVR
Comment 8 Repository Robot 2025-12-22 11:52:09 MSK
linstor-1.33.0-alt2 -> sisyphus:

Mon Dec 22 2025 Anton Midyukov <antohami@altlinux> 1.33.0-alt2
- NMU: linstor-controller: Requires(post): linstor-common (Closes: 53487).
Comment 9 Антон Мидюков 2025-12-23 13:51:12 MSK
(Ответ для Антон Мидюков на комментарий #7)
> (Ответ для Alexander Makeenkov на комментарий #6)
> > 24: linstor-controller-1.31.1-alt3                                          
> > 
> > 
> > ERROR: JAVA_HOME is not set and no 'java' command could be found in your
> > PATH.
> > 
> > Please set the JAVA_HOME variable in your environment to match the
> > location of your Java installation.
> > 
> > Завершено.
> 
> По информации из redmine:
> "Если перед этим установлен linstor-common, то пакет так же успешно
> устанавливается."
> 
> То есть у пакета linstor-controller нужно исправить следующее:
> -Requires: linstor-common = %EVR
> +Requires(post): linstor-common = %EVR

Не помогло это. В hasher продолжает воспроизводиться.
Должна быть java предварительно установлена, тогда ок.
linstor-common её ставит, потому и ок. Но

Requires(post): linstor-common

не помогает решить проблему.
Comment 10 Repository Robot 2025-12-23 17:52:14 MSK
linstor-1.33.0-alt3 -> sisyphus:

Tue Dec 23 2025 Andrey Cherepanov <cas@altlinux> 1.33.0-alt3
- NMU: linstor-controller: update alternatives in %post (Closes: 53487).
- Used systemd macros for systemd services.