Skip to content

Commit 1a66cef

Browse files
committed
Packaging+pants: Add BUILD macros: ST2_PACKS_GROUP and ST2_SVC_USER
There is some legacy bits in st2-packages.git that attempt to pull the packs group and system user from /etc/st2/st2.conf. But, that code is not in use. Effectively, the user/group names have been hard-coded. Rather than preserve an unused install feature, the pants+nfpm based system package build will use hard-coded group/user names.
1 parent fb27686 commit 1a66cef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pants-plugins/macros.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ def st2_component_python_distribution(**kwargs):
116116
# https://github.com/pex-tool/pex/blob/v2.1.137/pex/common.py#L39-L45
117117
MTIME = "1980-01-01T00:00:00Z"
118118

119+
# These are used for system packages (rpm/deb)
120+
ST2_PACKS_GROUP = "st2packs"
121+
ST2_SVC_USER = "st2"
122+
119123

120124
def st2_pack_archive(**kwargs):
121125
"""Create a makeself_archive using files from the given dependencies.
@@ -159,7 +163,7 @@ def st2_pack_archive(**kwargs):
159163
f"/opt/stackstorm/packs/{pack_name}",
160164
# reproducibility flags:
161165
"--tar-extra", # extra tar args: '--arg=value' (equals delimited) space separated
162-
f"--owner=root:0 --group=root:0 --mtime={MTIME} --exclude=LICENSE",
166+
f"--owner=root --group={ST2_PACKS_GROUP} --mtime={MTIME} --exclude=LICENSE",
163167
"--packaging-date",
164168
MTIME,
165169
),

0 commit comments

Comments
 (0)