Skip to content

Commit 7131800

Browse files
committed
Tag omd/packages manual
These targets are not user-facing and some of them do not work out of the CI context. So let's exclude them from `//...`. Change mostly mechanical and automated with `buildozer`. We've now reached a state where ``` bazel cquery //... ``` doesn't immediately error. CMK-21274 Change-Id: I7320f6b7b50d63bfbcf8f412130a1f8a95077b71
1 parent 667c1c1 commit 7131800

43 files changed

Lines changed: 298 additions & 2 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

omd/BUILD

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pip_compile(
1717
name = "requirements_lock",
1818
requirements_in = ":requirements.txt",
1919
requirements_txt = ":requirements_lock.txt",
20+
tags = ["manual"],
2021
)
2122

2223
create_venv(
@@ -36,6 +37,7 @@ file_from_flag(
3637
"cmk_version": "//bazel/cmk/version",
3738
"cmk_edition": "//bazel/cmk/edition",
3839
},
40+
tags = ["manual"],
3941
)
4042

4143
[pkg_tar(
@@ -47,6 +49,7 @@ file_from_flag(
4749
],
4850
extension = "tar.xz",
4951
package_dir_file = ":omd_root_dir",
52+
tags = ["manual"],
5053
deps = [
5154
"//bin:pkg_tar",
5255
"//active_checks:pkg_tar",
@@ -123,6 +126,7 @@ file_from_flag(
123126
srcs = edition_skel_permissions[edition],
124127
outs = ["skel.permissions_" + edition],
125128
cmd = "cat $(SRCS) > $@",
129+
tags = ["manual"],
126130
) for edition in [
127131
"cre",
128132
"cce",
@@ -134,6 +138,7 @@ file_from_flag(
134138
py_binary(
135139
name = "generate_bom_csv_py",
136140
srcs = ["license_sources/generate_bom_csv.py"],
141+
tags = ["manual"],
137142
)
138143

139144
run_binary(
@@ -146,6 +151,7 @@ run_binary(
146151
"--out",
147152
"$(location bill-of-materials.csv)",
148153
],
154+
tags = ["manual"],
149155
tool = ":generate_bom_csv_py",
150156
)
151157

@@ -154,6 +160,7 @@ filegroup(
154160
srcs = glob([
155161
"license_sources/license_texts/*.txt",
156162
]),
163+
tags = ["manual"],
157164
)
158165

159166
py_binary(
@@ -164,6 +171,7 @@ py_binary(
164171
"license_sources/checkmk_logo.svg",
165172
":license_texts",
166173
],
174+
tags = ["manual"],
167175
deps = [
168176
requirement("reportlab"),
169177
requirement("svglib"),
@@ -180,6 +188,7 @@ run_binary(
180188
"--csv",
181189
"$(location :generate_bom_csv)",
182190
],
191+
tags = ["manual"],
183192
tool = ":build_bom_texts_pdf_py",
184193
)
185194

@@ -192,6 +201,7 @@ pkg_tar(
192201
],
193202
package_dir = "share/doc/",
194203
package_file_name = "license_info_archive.tar",
204+
tags = ["manual"],
195205
)
196206

197207
editions = {
@@ -207,6 +217,7 @@ editions = {
207217
architecture = "amd64",
208218
cmk_version = "//bazel/cmk/version",
209219
package = "check-mk-" + editions[edition],
220+
tags = ["manual"],
210221
version = select({
211222
"@//bazel/cmk/distro:almalinux-8": "el8-38",
212223
"@//bazel/cmk/distro:almalinux-9": "el9-38",
@@ -246,6 +257,7 @@ editions = {
246257
prerm = "//omd/debian:prerm",
247258
priority = "optional",
248259
section = "admin",
260+
tags = ["manual"],
249261
templates = "//omd/debian:templates",
250262
version_file = "//omd/distros:distro_version_file",
251263
) for edition in [

omd/packages/BUILD

Whitespace-only changes.

omd/packages/Python/BUILD

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ genrule(
9797
| grep ELF | cut -d ':' -f1 \\
9898
| xargs patchelf --force-rpath --set-rpath "\\$$ORIGIN/../lib"
9999
""",
100+
tags = ["manual"],
100101
)
101102

102103
pkg_files(
@@ -108,13 +109,15 @@ pkg_files(
108109
mode = "0755",
109110
),
110111
prefix = "bin",
112+
tags = ["manual"],
111113
)
112114

113115
make_deployable_dir(
114116
name = "python_lib_dynload_deployable",
115117
src = "@python//:gen_dir",
116118
input_dir = "lib/python%s/lib-dynload" % PYTHON_MAJOR_DOT_MINOR,
117119
rpath = "\\$ORIGIN/../..",
120+
tags = ["manual"],
118121
)
119122

120123
pkg_files(
@@ -124,11 +127,13 @@ pkg_files(
124127
mode = "0755",
125128
),
126129
prefix = "lib/python%s/" % PYTHON_MAJOR_DOT_MINOR,
130+
tags = ["manual"],
127131
)
128132

129133
[pkg_mklink(
130134
name = link_name,
131135
link_name = link_name,
136+
tags = ["manual"],
132137
target = target,
133138
) for link_name, target in symlinks]
134139

@@ -139,6 +144,7 @@ pkg_filegroup(
139144
for link_name, target in bin_symlinks
140145
],
141146
prefix = "bin",
147+
tags = ["manual"],
142148
)
143149

144150
pkg_filegroup(
@@ -148,6 +154,7 @@ pkg_filegroup(
148154
for link_name, target in lib_symlinks
149155
],
150156
prefix = "lib",
157+
tags = ["manual"],
151158
)
152159

153160
pkg_filegroup(
@@ -157,6 +164,7 @@ pkg_filegroup(
157164
for link_name, target in pkgconfig_symlinks
158165
],
159166
prefix = "lib/pkgconfig",
167+
tags = ["manual"],
160168
)
161169

162170
pkg_filegroup(
@@ -166,6 +174,7 @@ pkg_filegroup(
166174
for link_name, target in share_symlinks
167175
],
168176
prefix = "share/man/man1",
177+
tags = ["manual"],
169178
)
170179

171180
# List all files that are explicitly referenced somewhere else
@@ -184,6 +193,7 @@ exclude_from_filegroup(
184193
["lib/%s" % i[0] for i in lib_symlinks] +
185194
["lib/pkgconfig/%s" % i[0] for i in pkgconfig_symlinks] +
186195
["share/man/man1/%s" % i[0] for i in share_symlinks],
196+
tags = ["manual"],
187197
)
188198

189199
pkg_files(
@@ -192,6 +202,7 @@ pkg_files(
192202
":python_rest",
193203
],
194204
strip_prefix = "rest",
205+
tags = ["manual"],
195206
)
196207

197208
pkg_filegroup(
@@ -205,12 +216,14 @@ pkg_filegroup(
205216
":python_rest_pkg",
206217
":python_share_symlinks_pkg",
207218
],
219+
tags = ["manual"],
208220
visibility = ["//visibility:public"],
209221
)
210222

211223
pkg_tar(
212224
name = "python_tar",
213225
srcs = [":python_files_pkg"],
214226
package_file_name = "python.tar",
227+
tags = ["manual"],
215228
visibility = ["//visibility:public"],
216229
)

omd/packages/apache-omd/BUILD

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ genrule(
106106
)
107107
tar -czf $@ apache-omd
108108
""",
109+
tags = ["manual"],
109110
visibility = ["//visibility:public"],
110111
)
111112

@@ -115,11 +116,13 @@ pkg_files(
115116
include = ["skel/**/*"],
116117
),
117118
strip_prefix = strip_prefix.from_pkg(""),
119+
tags = ["manual"],
118120
)
119121

120122
pkg_mklink(
121123
name = "85-apache-symlink",
122124
link_name = "skel/etc/rc.d/85-apache",
125+
tags = ["manual"],
123126
target = "../init.d/apache",
124127
)
125128

@@ -132,5 +135,6 @@ pkg_tar(
132135
extension = "tar.gz",
133136
package_file_name = "apache-skel.tar.gz",
134137
strip_prefix = ".",
138+
tags = ["manual"],
135139
visibility = ["//visibility:public"],
136140
)

omd/packages/appliance/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ filegroup(
55
"post-install",
66
"webconf_snapin.py",
77
],
8+
tags = ["manual"],
89
)

omd/packages/changelog/BUILD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ write_file(
1111
"import runpy",
1212
"runpy.run_module('cmk.werks.utils', run_name=('__main__'))",
1313
],
14+
tags = ["manual"],
1415
)
1516

1617
py_binary(
1718
name = "werks_utils_binary",
1819
srcs = [":werks_utils.py"],
20+
tags = ["manual"],
1921
deps = ["//packages/cmk-werks"],
2022
)
2123

@@ -35,6 +37,7 @@ py_binary(
3537
edition,
3638
"$(location werks_precompiled_%s)" % edition,
3739
],
40+
tags = ["manual"],
3841
tool = ":werks_utils_binary",
3942
) for edition in [
4043
"cre",
@@ -53,6 +56,7 @@ py_binary(
5356
"$(location changelog_%s)" % edition,
5457
"$(location werks_precompiled_%s)" % edition,
5558
],
59+
tags = ["manual"],
5660
tool = ":werks_utils_binary",
5761
visibility = ["@@//omd:__subpackages__"],
5862
) for edition in [
@@ -68,6 +72,7 @@ py_binary(
6872
srcs = [":changelog_" + edition],
6973
prefix = "share/doc/check_mk" + postfix,
7074
renames = {":changelog_" + edition: "ChangeLog"},
75+
tags = ["manual"],
7176
) for (edition, postfix) in [
7277
("cre", ""),
7378
("cce", "_cloud"),
@@ -81,13 +86,15 @@ pkg_files(
8186
srcs = [":werks_precompiled_cre"],
8287
prefix = "share/check_mk/werks",
8388
renames = {":werks_precompiled_cre": "werks"},
89+
tags = ["manual"],
8490
)
8591

8692
[pkg_files(
8793
name = "werks_pkg_" + edition,
8894
srcs = [":werks_precompiled_" + edition],
8995
prefix = "share/check_mk/werks",
9096
renames = {":werks_precompiled_" + edition: "werks_" + edition},
97+
tags = ["manual"],
9198
) for edition in [
9299
"cce",
93100
"cee",
@@ -98,6 +105,7 @@ pkg_files(
98105
pkg_mklink(
99106
name = "changelog_link",
100107
link_name = "share/doc/ChangeLog",
108+
tags = ["manual"],
101109
target = "check_mk/ChangeLog",
102110
)
103111

@@ -126,5 +134,6 @@ pkg_tar(
126134
"werks_pkg_cse",
127135
],
128136
}),
137+
tags = ["manual"],
129138
visibility = ["@@//omd:__subpackages__"],
130139
)

omd/packages/check-cert/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ make_deployable_file(
77
src = "//packages/check-cert",
88
out = "check-cert",
99
rpath = "\\$ORIGIN/../../../lib",
10+
tags = ["manual"],
1011
)
1112

1213
pkg_files(
1314
name = "check-cert_pkg",
1415
srcs = [":deployable_check-cert"],
1516
attributes = pkg_attributes(mode = "0755"),
1617
renames = {":deployable_check-cert": "lib/nagios/plugins/check_cert"},
18+
tags = ["manual"],
1719
)
1820

1921
pkg_tar(
2022
name = "check-cert",
2123
srcs = [":check-cert_pkg"],
24+
tags = ["manual"],
2225
visibility = ["//visibility:public"],
2326
)

omd/packages/cpp-libs/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ pkg_files(
77
"@cpp_libs",
88
],
99
prefix = "lib",
10+
tags = ["manual"],
1011
)
1112

1213
pkg_tar(
1314
name = "cpp-libs",
1415
srcs = [
1516
"cpp-libs-pkg",
1617
],
18+
tags = ["manual"],
1719
visibility = ["//visibility:public"],
1820
)

0 commit comments

Comments
 (0)