Bug 44917 - Неработающий пример в комментариях файла postgresql.service
Summary: Неработающий пример в комментариях файла postgresql.service
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: postgresql14-server (show other bugs)
Version: unstable
Hardware: x86_64 Linux
: P5 normal
Assignee: Alexei Takaseev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-13 17:10 MSK by FelixZ
Modified: 2023-03-20 10:04 MSK (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FelixZ 2023-01-13 17:10:27 MSK
Обнаружен недочет в документации в пакете postgresql14-server
https://git.altlinux.org/gears/p/postgresql14.git?p=postgresql14.git;a=blob;f=altlinux/postgresql.service;h=dbd5326c8934615e9eda2b27416670afd3e95bfe;hb=9de2974a1e69a36cadb2cdfcdeebf638f5b5f76f
Если прописать так, как рекомендуется в файле:
.include /lib/systemd/system/postgresql.service

[Service]
# Location of database directory
Environment=PGDATA=/home/mydb/pgsql/data

и после запуска сервиса посмотреть его статус, получаем:

#systemctl status postgresql.service
Loaded: bad-settings (Reason: Unit postgresql.service has a bad unit file setting.)
Active: inactive (dead)
systemd[1]: /etc/systemd/system/postgresql.service:1: Assignment outside of section. Ignoring.
Для продолжения нажмите любую клавишу...

Как в примере - не получилось, потому что в Альте systemd больше не поддерживает директиву .include

Предлагаю удалить эти строки из файла, что бы не вводить в заблуждение пользователей пакета.
Comment 1 Repository Robot 2023-03-20 10:04:04 MSK
postgresql15-1C-15.2-alt2 -> sisyphus:

 Fri Mar 03 2023 Alexei Takaseev <taf@altlinux> 15.2-alt2
 - Cleanup postgresql.service (ALT #44917)
 - Set database locale different from system (ALT #43207)
 - Add /etc/sysconfig/postgresql with staring and initializating environment
 - Initialization databases with secure connection methods
 - Mandatory set password for superuser postgres