Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Added
to pants' use of PEX lockfiles. This is not a user-facing addition.
#6118 #6141 #6133 #6120 #6181 #6183 #6200 #6237 #6229 #6240 #6241 #6244 #6251 #6253
#6254 #6258 #6259 #6260 #6269 #6275 #6279 #6278 #6282 #6283 #6273 #6287 #6306 #6307
#6311 #6314 #6315 #6317 #6319 #6312 #6320 #6321 #6323 #6324 #6325
#6311 #6314 #6315 #6317 #6319 #6312 #6320 #6321 #6323 #6324 #6325 #6326
Contributed by @cognifloyd
* Build of ST2 EL9 packages #6153
Contributed by @amanda11
Expand Down
4 changes: 4 additions & 0 deletions packaging/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ nfpm_deb_package(
name="st2.deb",
dependencies=[
"./deb/scripts",
"./deb/systemd:services",
"./common/systemd:generators",
],
scripts=dict(
preinstall="deb/scripts/pre-install.sh",
Expand Down Expand Up @@ -62,6 +64,8 @@ nfpm_rpm_package(
name="st2.rpm",
dependencies=[
"./rpm/scripts",
"./rpm/systemd:services",
"./common/systemd:generators",
],
scripts=dict(
preinstall="rpm/scripts/pre-install.sh",
Expand Down
20 changes: 20 additions & 0 deletions packaging/common/systemd/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
_generators = (
"st2api-generator",
"st2auth-generator",
"st2stream-generator",
)

python_sources(
name="generator_files",
sources=_generators,
)

nfpm_content_files(
name="generators",
description="systemd service generator files for nfpm packages",
dependencies=[":generator_files"],
files=[(gen, f"/usr/lib/systemd/system-generators/{gen}") for gen in _generators],
file_owner="root",
file_group="root",
file_mode="rwxr-xr-x",
)
14 changes: 14 additions & 0 deletions packaging/common/systemd/st2api-generator
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
#!/usr/bin/env python3
# Copyright 2021 The StackStorm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import configparser
import logging
import time
Expand Down
20 changes: 17 additions & 3 deletions packaging/common/systemd/st2auth-generator
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
#!/usr/bin/env python3
# Copyright 2021 The StackStorm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import configparser
import logging
import time
import sys

ST2SVC="st2auth"
DEFAULT_IP="127.0.0.1"
DEFAULT_PORT="9100"
ST2SVC = "st2auth"
DEFAULT_IP = "127.0.0.1"
DEFAULT_PORT = "9100"
ST2CFG = "/etc/st2/st2.conf"

# Systemd passes 3 paths to a generator, normal_dir, early_dir, late_dir.
Expand Down
20 changes: 17 additions & 3 deletions packaging/common/systemd/st2stream-generator
Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
#!/usr/bin/env python3
# Copyright 2021 The StackStorm Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import configparser
import logging
import time
import sys

ST2SVC="st2stream"
DEFAULT_IP="127.0.0.1"
DEFAULT_PORT="9102"
ST2SVC = "st2stream"
DEFAULT_IP = "127.0.0.1"
DEFAULT_PORT = "9102"
ST2CFG = "/etc/st2/st2.conf"

# Systemd passes 3 paths to a generator, normal_dir, early_dir, late_dir.
Expand Down
29 changes: 29 additions & 0 deletions packaging/deb/systemd/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
_services = (
"st2actionrunner.service",
"st2actionrunner@.service",
"st2api.service",
"st2auth.service",
"st2garbagecollector.service",
"st2notifier.service",
"st2rulesengine.service",
"st2scheduler.service",
"st2sensorcontainer.service",
"st2stream.service",
"st2timersengine.service",
"st2workflowengine.service",
)

files(
name="service_files",
sources=_services,
)

nfpm_content_files(
name="services",
description="systemd service files for nfpm deb packages",
dependencies=[":service_files"],
files=[(svc, f"/usr/lib/systemd/system/{svc}") for svc in _services],
file_owner="root",
file_group="root",
file_mode="rw-r--r--",
)
29 changes: 29 additions & 0 deletions packaging/rpm/systemd/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
_services = (
"st2actionrunner.service",
"st2actionrunner@.service",
"st2api.service",
"st2auth.service",
"st2garbagecollector.service",
"st2notifier.service",
"st2rulesengine.service",
"st2scheduler.service",
"st2sensorcontainer.service",
"st2stream.service",
"st2timersengine.service",
"st2workflowengine.service",
)

files(
name="service_files",
sources=_services,
)

nfpm_content_files(
name="services",
description="systemd service files for nfpm rpm packages",
dependencies=[":service_files"],
files=[(svc, f"/usr/lib/systemd/system/{svc}") for svc in _services],
file_owner="root",
file_group="root",
file_mode="rw-r--r--",
)
Loading