Skip to content

Commit

Permalink
Merge pull request #1663 from greenbone/mergify/bp/master/pr-1662
Browse files Browse the repository at this point in the history
Use better defaults for installation directories (backport #1662)
  • Loading branch information
bjoernricks authored Aug 5, 2021
2 parents 6065650 + 0274fad commit 19c2a5b
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 42 deletions.
35 changes: 29 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

[Unreleased]: https://github.com/greenbone/gvmd/compare/gvmd-21.04...master

## [21.4.3] (Unreleased)
## [21.4.4] (unreleased)
### Added
### Changed
### Deprecated
### Removed
### Fixed

[Unreleased]: https://github.com/greenbone/gvmd/compare/v21.4.3...HEAD


## [21.4.3] - 2021-08-03
### Fixed
- Fix sending prefs for whole, growing VT families [#1603](https://github.com/greenbone/gvmd/pull/1603)
- Add trash columns for target "elevate" credential [#1636](https://github.com/greenbone/gvmd/pull/1636)

[Unreleased]: https://github.com/greenbone/gvmd/compare/v21.4.2...gvmd-21.04
[21.4.3]: https://github.com/greenbone/gvmd/compare/v21.4.2...gvmd-21.04

## [21.4.2] - 2021-06-28
### Fixed
Expand Down Expand Up @@ -115,15 +121,32 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

[21.4.0]: https://github.com/greenbone/gvmd/compare/gvmd-20.08...v21.4.0

## [20.8.3] (Unreleased)
## [20.8.4] - Unreleased
### Added
### Changed
* Changed defaults for installation locations [#1662](https://github.com/greenbone/gvmd/pull/1662)
* SYSCONFDIR is /etc by default now
* LOCALSTATEDIR is /var by default now
* GVM_RUN_DIR is /run/gvm by default now
* OPENVAS_DEFAULT_SOCKET is /run/ospd/ospd-openvas.sock by default now
* SYSTEMD_SERVICE_DIR is /lib/systemd/system by default now
* Removed gvmd.default file and adjusted gvmd.service file accordingly

### Deprecated
### Removed
### Fixed

[20.8.4]: https://github.com/greenbone/gvmd/compare/v20.8.3...gvmd-20.08


## [20.8.3] - 2021-08-03

### Added
- Add --optimize add-/cleanup-feed-permissions [#1612](https://github.com/greenbone/gvmd/pull/1612)

### Changed
- Use less report cache SQL when adding results [#1618](https://github.com/greenbone/gvmd/pull/1618)

### Deprecated
### Removed
### Fixed
- Solved a performance problem when filtering results by tags [#1579](https://github.com/greenbone/gvmd/pull/1579)
- Fix VTs hash check and add --dump-vt-verification
Expand All @@ -137,7 +160,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Sort the "host" column by IPv4 address if possible [#1637](https://github.com/greenbone/gvmd/pull/1637)
- Fix for parse_iso_time_tz error with musl library [#1644](https://github.com/greenbone/gvmd/pull/1644)

[Unreleased]: https://github.com/greenbone/gvmd/compare/v20.8.2...gvmd-20.08
[20.8.3]: https://github.com/greenbone/gvmd/compare/v20.8.2...gvmd-20.08

## [20.8.2] - 2021-06-23

Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ if (SYSCONF_INSTALL_DIR)
endif (SYSCONF_INSTALL_DIR)

if (NOT SYSCONFDIR)
set (SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc")
set (SYSCONFDIR "/etc")
endif (NOT SYSCONFDIR)

if (NOT EXEC_PREFIX)
Expand All @@ -130,7 +130,7 @@ if (NOT LIBDIR)
endif (NOT LIBDIR)

if (NOT LOCALSTATEDIR)
set (LOCALSTATEDIR "${CMAKE_INSTALL_PREFIX}/var")
set (LOCALSTATEDIR "/var")
endif (NOT LOCALSTATEDIR)

if (NOT DATADIR)
Expand Down Expand Up @@ -181,7 +181,7 @@ set (GVM_CLIENT_KEY "${GVM_STATE_DIR}/private/CA/clientkey.pem")
set (GVM_CA_CERTIFICATE "${GVM_STATE_DIR}/CA/cacert.pem")

if (NOT GVM_RUN_DIR)
set (GVM_RUN_DIR "${LOCALSTATEDIR}/run")
set (GVM_RUN_DIR "/run/gvm")
endif (NOT GVM_RUN_DIR)

if (NOT GVM_FEED_LOCK_PATH)
Expand All @@ -190,7 +190,7 @@ endif (NOT GVM_FEED_LOCK_PATH)
add_definitions (-DGVM_FEED_LOCK_PATH="${GVM_FEED_LOCK_PATH}")

if (NOT OPENVAS_DEFAULT_SOCKET)
set (OPENVAS_DEFAULT_SOCKET "/var/run/ospd/ospd.sock")
set (OPENVAS_DEFAULT_SOCKET "/run/ospd/ospd-openvas.sock")
endif (NOT OPENVAS_DEFAULT_SOCKET)
add_definitions (-DOPENVAS_DEFAULT_SOCKET="${OPENVAS_DEFAULT_SOCKET}")

Expand Down
12 changes: 2 additions & 10 deletions config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,18 @@


if (NOT SYSTEMD_SERVICE_DIR)
set (SYSTEMD_SERVICE_DIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system")
set (SYSTEMD_SERVICE_DIR "/lib/systemd/system")
endif (NOT SYSTEMD_SERVICE_DIR)

if (NOT DEFAULT_CONFIG_DIR)
set (DEFAULT_CONFIG_DIR "${CMAKE_INSTALL_PREFIX}/etc/default")
endif (NOT DEFAULT_CONFIG_DIR)

if (NOT LOGROTATE_DIR)
set (LOGROTATE_DIR "${CMAKE_INSTALL_PREFIX}/etc/logrotate.d")
set (LOGROTATE_DIR "${SYSCONFDIR}/logrotate.d")
endif (NOT LOGROTATE_DIR)

configure_file (gvmd.service.in gvmd.service)
configure_file (gvmd.logrotate.in gvmd.logrotate)
configure_file (gvmd.default.in gvmd.default)

install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gvmd.service
DESTINATION ${SYSTEMD_SERVICE_DIR}/)

install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gvmd.default
DESTINATION ${DEFAULT_CONFIG_DIR}/ RENAME gvmd)

install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gvmd.logrotate
DESTINATION ${LOGROTATE_DIR}/ RENAME gvmd)
19 changes: 0 additions & 19 deletions config/gvmd.default.in

This file was deleted.

8 changes: 5 additions & 3 deletions config/gvmd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ ConditionKernelCommandLine=!recovery

[Service]
Type=forking
User=$GVMD_USER
Group=$GVMD_GROUP
User=gvm
Group=gvm
PIDFile=${GVM_RUN_DIR}/gvmd.pid
RuntimeDirectory=gvm
RuntimeDirectoryMode=2775
EnvironmentFile=${DEFAULT_CONFIG_DIR}/gvmd
ExecStart=${SBINDIR}/gvmd --osp-vt-update=$OSP_VT_UPDATE $OPTIONS
ExecStart=${SBINDIR}/gvmd --osp-vt-update=/run/ospd/ospd-openvas.sock --listen-group=gvm
Restart=always
TimeoutStopSec=10

Expand Down

0 comments on commit 19c2a5b

Please sign in to comment.