Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjusted package_method to allow package names with whitespace in the middle #5523

Draft
wants to merge 7,235 commits into
base: master
Choose a base branch
from

Conversation

craigcomstock
Copy link
Contributor

On Windows with winget package names often have spaces.

The previous implementation used sscanf to grab the first space-delimited token as the name.

This change uses libntech string_lib TrimWhitespace() to only remove leading and trailing whitespace.

Ticket: CFE-4397
Changelog: title

amousset and others added 30 commits September 13, 2023 16:53
The function cache only used the args values, which in some cases could
lead to mixing results from different functions with the same arguments.

Ticket: CFE-4244
Changelog: Cashed policy function results now take into account number of arguments and function name.
Signed-off-by: Lars Erik Wik <[email protected]>
Co-authored-by: Alexis Mousset <[email protected]>
Two reasons for this:
 1. CONTRIBUTING.md says to do this at the top
 2. the `ctx` argument was actually used before the assert

Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <[email protected]>
CFE-4244: Add the function name to the result cache key
Ticket: ENT-10470

Issue was that these failures were visible in Jenkins,
turning build "unstable".
With fixed headers not including <config.h>.
With libntech's headers no longer pulling in platform.h, we need
to add it together with some other headers to some places in the
codebase.
…_cleanup_fixes

Add missing #include's previously pulled in by libntech
Change suppress fail to soft fail on known failing tests
in bodies having local parameters.

This also prevents a memory corruption when
an attribute contains external vars but no
local vars.

Ticket: CFE-4254
Changelog: Bodies can now inherit attributes containing global variables

Signed-off-by: Alexis Mousset <[email protected]>
CFE-4254: Allow inheriting attributes using global variables in bodies having local parameters
We require OpenSSL 1.0.0 or newer so we don't need this
compatibility code for older versions.
With libcrypto-compat code removed.
…crypto_compat

Do not #include libcrypto-compat
cfengine/nova@8b8726e
changed cf-hub behavior for ENT-9825

This change fixes an issue with hubs that have SELinux set to enforce.
Hubs which do not have SELinux set to enforce are unaffected by this issue.

Ticket: ENT-10696
Changelog: title
ENT-10696: Added selinux policy to allow cf-hub to initiate scheduled reports
…d in kerenl.core_pattern

It's possible for coredumpctl to be present yet the system not correctly
configured to use systemd-coredump which results in coredumpctl not being able
to find core files. This change restricts the use of coredumpctl for when
systemd-coredump is present in sysctl kernel.core_pattern.

Ticket: ENT-9985
Changelog: Title
ENT-9985: Made cf-support use coredumpctl for core analysis only when configured in kerenl.core_pattern
Bumps [libntech](https://github.com/cfengine/libntech) from `49cd554` to `8545ebb`.
- [Commits](NorthernTechHQ/libntech@49cd554...8545ebb)

---
updated-dependencies:
- dependency-name: libntech
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
Updated links to libntech after move
- cf-agent.exe is not always installed "in-time" ENT-10699
- job uses latest nightly instead of building the PR code ENT-10754

Ticket: none
Changelog: none
LANG is not sufficient to guard against odd environment vars, LC_ALL is a master override so prefer that.

Ticket: ENT-10753
Changelog: title
rhel needs fakeroot for make check
debian seems to include fakeroot in existing deps in INSTALL file
both need libxml2 development package to pass make check
Ticket: none
Changelog: none
Their first run they change an original/source file and so on subsequent runs
the tests failed due to the original being incorrect.

Ticket: ENT-10761
Changelog: none
…tance

Disable win-acceptance tests for now due to two issues
ENT-10761: Fixed two acceptance tests which could only run once before failing
vpodzime and others added 19 commits May 3, 2024 15:20
To prevent multiple processes from opening/closing the DB at the
same time. From what we have seen, the *Invalid argument* issues
only happen when multiple processes try to work with the DB,
multiple threads inside a single process don't seem to hit the
trigger.

Also, we have seen that the issues happen when LMDB tries to use
a robust (shared inter-process) mutex that was already destroyed.

Ticket: ENT-11543
Changelog: CFEngine processes no longer suffer from the "Invalid
           argument" issues when working with LMDB
…file

Try to acquire file lock when closing DB
…ginning of every minute

This could fix issues if things are slow and agent runs end up
getting skipped if cf-execd wakes up too late.

Changelog: Title
Ticket: ENT-11765
Signed-off-by: Ole Herman Schumacher Elgesem <[email protected]>
Ticket: ENT-10699
Changelog: none
ENT-10699: Fixed windows acceptance test workflow
ENT-11765: Changed cf-execd's sleep behavior so it attempts to wake up at the beginning of every minute
We need to take care of the newly required checks in configure.ac
because we are responsible for producing config.h usable for both
us and libntech.

Ticket: CFE-4380
Changelog: File copying now uses more efficient implementation on
           Linux platforms
Copying should respect holes in sparse files, but if the original
file is not sparse, it's not a goal of the copy code to create a
sparse copy. So to test respecting holes in sparse files during
copying, we need to create the source files as sparse files.

Ticket: CFE-4380
Changelog: None
20.04 has an older version of valgrind that doesn't support the
`FICLONE` `ioctl()`.

Ticket: CFE-4380
Changelog: None
…ent_data_copying

Support libntech's new efficient file/data copying
There was an issue with 3.18.x version of this job which required this change.

Ticket: ENT-11771
Changelog: none
updated-dependencies:
- dependency-name: libntech
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
ENT-11771: Adjust windows acceptance test job workflow to use only C: partition
To make the windows acceptance workflow go faster I tested only one failing test.

This change wasn't noticed when committing the fix for using only C: partition.

Ticket: ENT-11771
Changelog: none
…libntech-1450dcb

Bump libntech from `5f195b2` to `1450dcb`
… middle

On Windows with winget package names often have spaces.

The previous implementation used sscanf to grab the first space-delimited token as the name.

This change uses libntech string_lib TrimWhitespace() to only remove leading and trailing whitespace.

Ticket: CFE-4397
Changelog: title
@craigcomstock
Copy link
Contributor Author

will see how bad this goes, the code is completely untested Build Status

@craigcomstock
Copy link
Contributor Author

retry after fixing code :) Build Status

@craigcomstock craigcomstock marked this pull request as draft May 29, 2024 15:23
@craigcomstock
Copy link
Contributor Author

more places name needs to be properly trimmed, retry Build Status

@CLAassistant
Copy link

CLAassistant commented Jul 24, 2024

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 3 committers have signed the CLA.

✅ craigcomstock
✅ larsewi
❌ dependabot[bot]
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

9 participants