cfengine/0001-Set-sys.bindir-to-usr-sbin-expect-cf-components-ther.patch
Klaus Kämpf 883fe94c4f - Update to 3.12.0 (LTS)
New Features:
  - Add a --key-type option to specify RSA key size to cf-key
  - New hash_to_int policy function (CFE-2733)
  - Issue a warning on ignored locking attributes (CFE-2748)
  - Add IPv6 hard classes with the "ipv6_" prefix (CFE-2310)
  - Introduce "missing_ok" attribute in body copy_from
    This allows to ignore missing sources in file copy operations
    (CFE-2365)
  - Enable Xen hypervisor detection on all x86 platforms (CFE-2203)
  - Add sys.policy_entry variables (CFE-2572)
  - Added inline_mustache template method (CFE-1846)
  - New component cf-net (cf-net is a CLI for the CFEngine network
    protocol, useful for debugging, testing etc) and accompanying
    policy variable sys.cf_net containing path to cf-net binary
  - Added --log-level option to all components
    This allows you to specify any log level (info, verbose, debug
    etc.).
    It is also less strict, allowing different spelling. As an example,
    --log-level i, --log-level INFO, --log-level inform are all the same.
  - Added special behavior for bundles named __main__
    If the bundle is defined in the entry policy it will be defined as
    main.
    If the bundle is defined elsewhere, it will be removed.
    This makes it easy to make importable library policy which can also
    be executed directly.
- See https://github.com/cfengine/core/blob/3.12.x/ChangeLog for other
  changes and bug fixes
- drop 0003-CFE-2629-Openssl-1.1-compatibility.patch (upstream)
  drop reproducible.patch (upstream)

OBS-URL: https://build.opensuse.org/package/show/systemsmanagement/cfengine?expand=0&rev=174
2018-07-03 08:05:49 +00:00

50 lines
2.3 KiB
Diff

From 7f0daf6cd3b6018c882c553ce0a3da51d47fec83 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
Date: Thu, 30 Jul 2015 10:48:47 +0200
Subject: [PATCH 1/3] Set sys.bindir to /usr/sbin, expect cf-*components there
That's where the /var/cfengine/bin/* symlinks point to and where
the systemd .service files expect the daemons.
This path is used in 'processes' of
masterfiles/update/update_processes.cf:enable_cfengine_agents
---
libenv/sysinfo.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/libenv/sysinfo.c b/libenv/sysinfo.c
index 5447659da5e1..5715d9acc7b7 100644
--- a/libenv/sysinfo.c
+++ b/libenv/sysinfo.c
@@ -589,8 +589,7 @@ static void GetNameInfo3(EvalContext *ctx)
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "masterdir", GetMasterDir(), CF_DATA_TYPE_STRING, "source=agent");
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "inputdir", GetInputDir(), CF_DATA_TYPE_STRING, "source=agent");
- snprintf(workbuf, CF_BUFSIZE, "%s%cbin", workdir, FILE_SEPARATOR);
- EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "bindir", workbuf, CF_DATA_TYPE_STRING, "source=agent");
+ EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "bindir", "/usr/sbin", CF_DATA_TYPE_STRING, "source=agent");
snprintf(workbuf, CF_BUFSIZE, "%s%cfailsafe.cf", GetInputDir(), FILE_SEPARATOR);
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "failsafe_policy_path", workbuf, CF_DATA_TYPE_STRING, "source=agent");
@@ -635,7 +634,7 @@ static void GetNameInfo3(EvalContext *ctx)
components[i]);
}
#else
- snprintf(name, CF_MAXVARSIZE - 1, "%s%cbin%c%s", workdir, FILE_SEPARATOR, FILE_SEPARATOR, components[i]);
+ snprintf(name, CF_MAXVARSIZE - 1, "/usr/sbin/%s", components[i]);
#endif
have_component[i] = false;
@@ -660,7 +659,7 @@ static void GetNameInfo3(EvalContext *ctx)
snprintf(name, CF_MAXVARSIZE - 1, "%s%cbin%c%s.exe", workdir, FILE_SEPARATOR, FILE_SEPARATOR,
components[1]);
#else
- snprintf(name, CF_MAXVARSIZE - 1, "%s%cbin%c%s", workdir, FILE_SEPARATOR, FILE_SEPARATOR, components[1]);
+ snprintf(name, CF_MAXVARSIZE - 1, "/usr/sbin/%s", components[1]);
#endif
if (stat(name, &sb) != -1)
--
2.17.1