Skip to content

Commit 940fb13

Browse files
committed
pants: cleanup makself_archive def and add docs links
1 parent e6da569 commit 940fb13

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

pants-plugins/macros.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,32 +142,26 @@ def st2_pack_archive(**kwargs):
142142
root_output_directory=".",
143143
)
144144

145+
# https://www.pantsbuild.org/stable/docs/shell/self-extractable-archives
146+
# https://www.pantsbuild.org/stable/reference/targets/makeself_archive
145147
makeself_archive( # noqa: F821
146148
name="archive",
147149
label=f"{pack_name} StackStorm pack",
148150
files=[
149151
":files", # archive contents
150152
"//:license", # LICENSE file included in archive header, excluded from contents
151153
],
152-
# startup_script=["echo", "pack-archive"],
153-
args=(
154+
args=( # see: https://makeself.io/#usage
154155
# Makeself expects '--arg value' (space) not '--arg=value' (equals) for cmdline
155156
"--license",
156157
"__archive/LICENSE",
157158
"--target",
158159
f"/opt/stackstorm/packs/{pack_name}",
159160
# reproducibility flags:
160161
"--tar-extra", # extra tar args: '--arg=value' (equals delimited) space separated
161-
f"--owner=root:0 --group=root:0 --mtime={MTIME} --exclude=LICENSE", # TODO: include LICENSE file?
162+
f"--owner=root:0 --group=root:0 --mtime={MTIME} --exclude=LICENSE",
162163
"--packaging-date",
163-
MTIME, # TODO: maybe use release date instead of an epoch date?
164-
# compression/encryption flags:
165-
# "--gzip", # gzip is the default compressor
166-
# "--complevel", "9", # 9 is the default compression level
167-
# "--gpg-encrypt", # gpg (encrypt only) handles compression if selected
168-
# "--gpg-asymmetric-encrypt-sign", # gpg (encrypt and sign) handles compression if selected
169-
# "--gpg-extra", "...", # if using gpg, pass extra gpg args here
170-
# "--nocomp", # maybe use no compression to use rpm/deb's compression instead of gzip (default)?
164+
MTIME,
171165
),
172166
output_path=f"packaging/packs/{pack_name}.tgz.run",
173167
)

0 commit comments

Comments
 (0)