k8s: Fix build compatibility with old versions and RHEL.
After pip version 23, it's mandatory use --break-system-packages when you don't use a virtual env.
So, in this change I did a change in Makefile to adapt this situation in older and newer versions of pip.
× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.11/README.venv for more information.
note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
So I needed include '--break-system-packages' to manage the EXTERNALLY-MANAGED python.
Alain Spineux [Mon, 26 Jun 2023 09:45:32 +0000 (11:45 +0200)]
fix ifdef logic in fs_get_free_space()
- this
#if defined(HAVE_WIN32)
#elif defined(HAVE_SYS_STATVFS_H) || !defined(HAVE_WIN32)
#endif
is equivalent to
#if defined(HAVE_WIN32)
#else
#endif
as the HAVE_WIN32 are in the if and the elif
- there is no reason to "care" about "statvfs()" as the fallback is to use
statfs (see the line above, that I reproduce here):
#ifdef HAVE_SYS_STATVFS_H
#include <sys/statvfs.h>
#else
#define statvfs statfs
#endif
- the other commits related to this piece of code are c8d10999f1789b88f9f93d29b512e7af10fd009d 33b01b743fa5629828f61fa1300234785c999afa db82b457bf1dede1225a53c37e60d2d30af84b3b
Alain Spineux [Wed, 7 Jun 2023 10:05:54 +0000 (12:05 +0200)]
win32: tweak fix some warning
Z:w
ScsiDeviceList.h:100:22: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘long unsigned int’ [-Wformat=]
100 | _T("%d:%d:%d:%d"),
| ^~~~~~~~~~~~~
In file included from scsilist.cpp:48:
ScsiDeviceList.h:100:24: note: format string is defined here
100 | _T("%d:%d:%d:%d"),
| ~^
| |
| int
| %ld
home/bac/workspace/bee/bacula/src/tools/fstype.c: In function ‘void print_mtab_item(void*, stat*, const char*, const char*, const char*, const char*)’:
/home/bac/workspace/bee/bacula/src/tools/fstype.c:66:8: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
66 | ((void *)st->st_dev), fstype, mountpoint, mntopts);
| ^~~~~~~~~~~~~~~~~~
/home/bac/workspace/bee/bacula/src/tools/fstype.c: In function ‘int main(int, char* const*)’:
/home/bac/workspace/bee/bacula/src/tools/fstype.c:138:39: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘u_int64_t’ {aka ‘long long unsigned int’} [-Wformat=]
138 | fprintf(stderr, "Found dev=%lx fstype=%s\n", item->dev, item->fstype);
| ~~^ ~~~~~~~~~
| | |
| long unsigned int u_int64_t {aka long long unsigned int}
| %llx
Alain Spineux [Wed, 7 Jun 2023 09:48:40 +0000 (11:48 +0200)]
win32: tweak fix warning
- sendit() already handle the final '\O' no need to include it in the len
- fir warning:
In file included from /home/bac/workspace/bee/bacula/src/stored/status.c:30:
In function ‘void sendit(const char*, int, STATUS_PKT*)’,
inlined from ‘void list_one_device(char*, DEVICE*, STATUS_PKT*, OutputWriter*)’ at /home/bac/workspace/bee/bacula/src/stored/status.c:407:24,
inlined from ‘void list_devices(STATUS_PKT*, char*)’ at /home/bac/workspace/bee/bacula/src/stored/status.c:498:25:
/home/bac/workspace/bee/bacula/src/lib/status.h:46:13: warning: ‘void* memcpy(void*, const void*, size_t)’ forming offset 4 is out of the bounds [0, 4] [-Warray-bounds]
46 | memcpy(user->msg, msg, len+1);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Alain Spineux [Tue, 6 Jun 2023 12:58:52 +0000 (14:58 +0200)]
tweak fix warning
../plugins/fd/fd_common.h:528:32: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t’ {aka ‘long int’} [-Wformat=]
528 | l = fprintf(fp, "time=%lld level=%c key=%s name=%s vollen=%d vol=%s\n",
../plugins/fd/fd_common.h:528:66: warning: format ‘%d’ expects argument of type ‘int’, but argument 7 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
528 | l = fprintf(fp, "time=%lld level=%c key=%s name=%s vollen=%d vol=%s\n",
Alain Spineux [Wed, 17 May 2023 16:11:26 +0000 (18:11 +0200)]
fix #10137 Volume XXX in unavailable now.
- I put my "case" in the middle of a "fall through" cascade of "case"
- I moved it up above the "cascade"
- I'm not able to reproduce the problem with volumes on disk
- 100% sure that this will change the behavior at the customer level
Fix #10086: Going backward in BSR because of 2 jobs running in //
- modify the split_bsr_loop() code to handle this situation:
This can happens when two incremental jobs run in //
As the BSR is written job by job the split is enough, no need to reorganize
the BSR an move all the parts of the first job before the second one
Alain Spineux [Thu, 9 Mar 2023 13:57:14 +0000 (14:57 +0100)]
k8s: Fix #9935 name 'response' is not defined in get_pods()
- the previous fix #9727 was buggy, I fixed get_pvcs() but
broke the "weak" get_pods()
- the problem is that __execute() wrapper intercept exceptions
and return and error dict() or the expected response when no
exception are generated
Alain Spineux [Thu, 16 Feb 2023 10:50:56 +0000 (11:50 +0100)]
win32: cleanup VSSClient constructor
- VSSClient is a pure class that has virtual methods, using a
memset() to initialize the class is not appropriate because the object
include a VPTR that is initialized by the constructor
- gcc 11.3 complains about that
- initializing the class the right way cannot be wrong
- Using C++11 in-member class initializers (we are not building win32 on
centos 5 anymore but on modern platforms :-)
Alain Spineux [Fri, 10 Feb 2023 09:26:05 +0000 (10:26 +0100)]
win32: add helper function
- add win32_to_unix_slash() to compat.cpp
simply replace any '\\' into '/'
- add remove_win32_trailing_slash() to compat.cpp
- add dump_name_list() to find.c for debuging fileset
Alain Spineux [Wed, 8 Feb 2023 10:30:36 +0000 (11:30 +0100)]
regress: in compare_backup_content ignore strange files in Microsoft/Search
- Files in C:/ProgramData/Microsoft/Search/Data/Applications/Windows
don't show up in snapshot, they look like Reparse point
only the windows explorers show that the file is a reparse point
command line tools don't
as estimate don't use VSS, this make a diff between both
- reset "nb" to zero to always show the 10 first files that are in
the backup but not in estimate