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

ENT-11988: Atomic copy_from in files promise (3.24.x) #5613

Merged
merged 4 commits into from
Oct 11, 2024

Conversation

larsewi
Copy link
Contributor

@larsewi larsewi commented Oct 10, 2024

Changes to files promise in copy_from attribute:

  • The new file (i.e., <FILENAME>.cfnew) is now created with correct
    permission during remote copy. Previously it would be created with
    default permissions.
  • The destination file (i.e., <FILENAME>) is no longer deleted on
    backup during file copy. Previously it would be renamed to
    <FILENAME>.cfsaved, causing the original file to dissappear. Now an
    actual copy of the original file with the same permissions is created
    instead.

As a result, there will no longer be a brief moment where the original
file is inaccessible.

Back-ported from #5611

Changes to `files` promise in `copy_from` attribute:

- The new file (i.e., `<FILENAME>.cfnew`) is now created with correct
  permission during remote copy. Previously it would be created with
  default permissions.
- The destination file (i.e., `<FILENAME>`) is no longer deleted on
  backup during file copy.  Previously it would be renamed to
  `<FILENAME>.cfsaved`, causing the original file to dissappear. Now an
  actual copy of the original file with the same permissions is created
  instead.

As a result, there will no longer be a brief moment where the original
file is inaccessible.

Ticket: ENT-11988
Changelog: Commit
Signed-off-by: Lars Erik Wik <[email protected]>
(cherry picked from commit 224ccc3)
@larsewi
Copy link
Contributor Author

larsewi commented Oct 10, 2024

@cf-bottom Jenkins please :)

@cf-bottom
Copy link

vpodzime and others added 3 commits October 11, 2024 13:28
When running cppcheck in static checks, we use `-i
libpromises/cf3lex.c` in order to make cppcheck ignore the
generated cf3lex.c file. However, the new version of cppcheck
ignores this option and fails on issues found in the file.

However, we don't want this file or any other generated files
except for bootstrap.inc which contains the bootstrap policy. So
we can run `make clean` and `make -C libpromise/ boostrap.inc`
before running cppcheck to get a cleaner environment.

(cherry picked from commit e9cfa41)
Signed-off-by: Lars Erik Wik <[email protected]>
```
error: externally-managed-environment
```

Since this is a container, it should be OK to potentially break system
packages.

Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <[email protected]>
(cherry picked from commit 0195e21)
libncurses5 was not available in the noble repository, but maybe
libncurses6 will work.

```
E: Unable to locate package libncurses5
```

Ticket: None
Changelog: None
Signed-off-by: Lars Erik Wik <[email protected]>
(cherry picked from commit 4d1944a)
@larsewi larsewi merged commit 85eaa8e into cfengine:3.24.x Oct 11, 2024
10 checks passed
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.

3 participants