Skip to content

Commit

Permalink
Revert "Clean up stunnel dependencies"
Browse files Browse the repository at this point in the history
This reverts commit d4c9c0f.

Breaks system tests (stunnel is not started anymore)
  • Loading branch information
LarsMichelsen committed Oct 24, 2024
1 parent 60b351e commit 30a10fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 46 deletions.
45 changes: 1 addition & 44 deletions omd/packages/stunnel/BUILD
Original file line number Diff line number Diff line change
@@ -1,44 +1 @@
load("@rules_pkg//pkg:mappings.bzl", "pkg_attributes", "pkg_files", "pkg_mklink", "strip_prefix")
load("@rules_pkg//pkg:tar.bzl", "pkg_tar")

pkg_files(
name = "stunnel",
srcs = [":skel/etc/init.d/stunnel"],
attributes = pkg_attributes(
mode = "0755",
),
prefix = "skel/etc/init.d",
)

pkg_mklink(
name = "stunnel-symlink",
link_name = "skel/etc/rc.d/85-stunnel",
target = "../init.d/stunnel",
)

pkg_files(
name = "skel_files",
srcs = glob(
include = ["skel/**/*"],
exclude = [
"skel/etc/rc.d/85-stunnel",
"skel/etc/init.d/stunnel",
"**/.gitignore",
],
) + [
],
strip_prefix = strip_prefix.from_pkg(""),
)

pkg_tar(
name = "skel_dir",
srcs = [
"skel_files",
"stunnel",
"stunnel-symlink",
],
extension = "tar.gz",
package_file_name = "stunnel-skel.tar.gz",
strip_prefix = ".",
visibility = ["//visibility:public"],
)
exports_files(["skel"])
1 change: 1 addition & 0 deletions omd/packages/stunnel/skel/etc/rc.d/85-stunnel
8 changes: 6 additions & 2 deletions omd/packages/stunnel/stunnel.make
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ STUNNEL_INSTALL := $(BUILD_HELPER_DIR)/$(STUNNEL)-install
.PHONY: $(STUNNEL_BUILD)
$(STUNNEL_BUILD):
$(BAZEL_CMD) build @$(STUNNEL)//:$(STUNNEL)
$(BAZEL_CMD) build //omd/packages/stunnel:skel_dir
$(BAZEL_CMD) build @$(STUNNEL)//:skel

.PHONY: $(STUNNEL_INSTALL)
$(STUNNEL_INSTALL): $(STUNNEL_BUILD)
$(RSYNC) --chmod=u+w $(BAZEL_BIN_EXT)/$(STUNNEL)/$(STUNNEL)/bin $(DESTDIR)$(OMD_ROOT)/
$(RSYNC) --chmod=u+w $(BAZEL_BIN_EXT)/$(STUNNEL)/$(STUNNEL)/lib $(DESTDIR)$(OMD_ROOT)/
$(RSYNC) --chmod=u+w $(BAZEL_BIN_EXT)/$(STUNNEL)/$(STUNNEL)/share/$(STUNNEL).bash $(DESTDIR)$(OMD_ROOT)/skel/etc/bash_completion.d/
tar -C $(DESTDIR)$(OMD_ROOT)/skel -xf $(BAZEL_BIN)/omd/packages/stunnel/stunnel-skel.tar.gz
$(RSYNC) --chmod=u+w $(BAZEL_BIN_EXT)/$(STUNNEL)/skel/ $(DESTDIR)$(OMD_ROOT)/skel
cd $(DESTDIR)$(OMD_ROOT)/skel/etc/rc.d/ && $(LN) -sf ../init.d/$(STUNNEL) 85-$(STUNNEL)
chmod 640 $(DESTDIR)$(OMD_ROOT)/skel/etc/logrotate.d/$(STUNNEL)
chmod 640 $(DESTDIR)$(OMD_ROOT)/skel/etc/$(STUNNEL)/server.conf
find $(DESTDIR)$(OMD_ROOT)/skel -name ".gitignore" -delete

0 comments on commit 30a10fc

Please sign in to comment.