Move to go version to 1.21 (1.22 is still early and 1.21 has a long
chain of stable releases).
Also update dependencies to latest their versions.
Signed-off-by: William Douglas <william.douglas@intel.com>
Don't download the linter unless a special CI env setting is set. Also
use a different cache to avoid permissions issues with the rootfs in
CI.
Signed-off-by: William Douglas <william.douglas@intel.com>
Add cases for optimization prefixes being changed and directories with
optimizations being skipped.
Signed-off-by: William Douglas <william.douglas@intel.com>
When considering delta peer matches, skip any directory with an
optimization prefix for consideration. The the directories are not
intended to be different between optimization versions.
Signed-off-by: William Douglas <william.douglas@intel.com>
The optimized prefix doesn't set Misc flags until the last moment
during manifest writing so ignore the flags when testing for peers
when a prefix is in place.
Also improve some comments and test cases.
Signed-off-by: William Douglas <william.douglas@intel.com>
As other mixer processes might use the manifests after they are
written, reset the path to include the prefix once the manifest write
is complete.
Signed-off-by: William Douglas <william.douglas@intel.com>
If the modifiers of a file indicate it came from a chroot path, reset
the filename to use the chroot path when reading the file information
from a manifest.
Also ensure the only case files are marked as deleted is when it is
the SSE file. Other optimized files marked as deleted will be skipped
from being output in the manifest (and if the delete is new, the other
files with the same post processed path will be marked as new in the
version being built to ensure the deleted file is replaced).
Signed-off-by: William Douglas <william.douglas@intel.com>
The codebase uses sortFilesVersionName prior to writing out manifests
and that should be used in setupModifiers as well.
Signed-off-by: William Douglas <william.douglas@intel.com>
This change allows for a chroot with specific versioned content with
matching optimization levels to be added and accounted for. The paths
will be stripped of a version prefix (currently /V3 or /V4) and the
file's Modifier will be setup accordingly. The modifier will then be
updated to reflect the optimization level of the file and the total
optimization of any file with the same path.
With this change the previous Modifier setting has been revamped and
the old 'C', 'b' and 's' fields will be ignored. The 'b' posed a
slight problem that needed to be accounted for with how ghosted files
are detected and this has been done through looking only at the files
path.
Signed-off-by: William Douglas <william.douglas@intel.com>
Sometimes (like hex coded license files) there's value in not only ignoring digits
for detecting renames, but also ignoring a-f to deal with hex mismatches
in https://github.com/clearlinux/mixer-tools/issues/782 a funky issue is found where
we do not use the right versions for delta files in some cases.
A full fix is complicated, but the client IGNORES the versions! so we can just hardcode
the versions to anything (10 and 20 here) and it'll suddenly resolve itself
we need to not return "nil" if a delta file is missing, because that causes the caller
to not use the fallback option (which would include the full file)...
and we need the fallback option to have a complete pack
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
When mixer's -c/--config option was used, the referenced config was read
too late to set a default log location. As a result, the log location
was always set to the empty string (disabling logging), that is, unless
--log VALUE was specified, or if mixer's current working directory
contained a builder.conf with LOG defined.
The root cause of this bug is an order-of-operations issue with cobra
integration; fix the issue by setting the log location in
PersistentPreRunE() instead of init(), ensuring that the command line
arguments have been processed, with `configFile` being set to the
-c/--config value if specified.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This reverts commit 4c115e5a3e.
With content changes so that the /usr/bin and /usr/lib64 files should
still exist even using optimized libs this is no longer needed.
Signed-off-by: William Douglas <william.douglas@intel.com>
This change has proven to cause unnecessary churn for the bundle
tracking files when their contents ended up not being consumed by any
tools.
This reverts commit 6f840d712e.
Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>