937 Commits
Author SHA1 Message Date
William Douglas b86b34be29 Version bump v6.2.7 2022-08-08 16:28:54 -07:00
Patrick McCarty d9bad0621d Revert "builder: Add a bundle's packages as the content to the tracking file"
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>
2022-08-08 16:08:46 -07:00
Patrick McCarty 436d5188c4 Merge tag 'refs/tags/v6.2.6' 2022-08-08 17:48:59 +00:00
Arjan van de Ven 4c115e5a3e skip delta files for /usr/bin and /usr/lib64 due to our avx2 fallout v6.2.6 2021-11-04 16:36:14 +00:00
Arjan van de Ven 3aa920aac4 skip delta files for /usr/bin and /usr/lib64 due to our avx2 fallout 2021-11-04 09:23:49 -07:00
William Douglas a471a64111 Update helloworld test release version to current
Signed-off-by: William Douglas <william.douglas@intel.com>
2021-10-15 11:04:17 -07:00
William Douglas 6f840d712e builder: Add a bundle's packages as the content to the tracking file
Add the packages found in a bundle to the bundle tracking file. This
will be handy when trying to figure out client side what packages are
installed on the system.

Signed-off-by: William Douglas <william.douglas@intel.com>
2021-10-15 11:04:17 -07:00
Reagan Lopez 6aab549a0c Release v6.2.4
This release includes minor bug fixes and enhancements.

- Fix generated warning for delta packs.
- Show upstream-format command in help.
- Remove delta file in case bspatch test fails.
- Update warning message for missing state file.
- Update to GitHub Actions v2.1.0

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
v6.2.4
2020-05-27 14:17:17 -07:00
Reagan Lopez fa36662aac Update to GitHub Actions v2.1.0
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-05-18 12:56:08 -07:00
Reagan Lopez a9cac40219 Update warning message for missing state file
To avoid misleading info, indicate the correct warning message for
missing state file. Write the details of the default state values as
debug messages.

Fixes #491, #532

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-05-18 10:54:45 -07:00
Reagan Lopez 3c0c3b63d9 Remove delta file in case bspatch test fails
Fixes the remaining part of #759

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-05-18 10:22:07 -07:00
Reagan Lopez 9bd384f1ae Show upstream-format command in help
Fixes #751

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-05-18 09:38:36 -07:00
Ashlesha Atrey 5ca50d0873 Fix generated warning for delta packs
While creating delta packs, only possible delta files are found.
If delta file is not found, log the error in debug mode instead
of generating warning, as delta might not have been
created for valid reason.

fixes #628
Signed-off-by: Ashlesha Atrey ashlesha.atrey@intel.com
2020-05-06 10:07:03 -07:00
Reagan Lopez 24abcb0551 Release v6.2.3
This release includes minor bug fixes along with implementation of
logging.

Enhancements:
- Implement the logging package for mixer.
  A common log file can be set for all the mixer commands in the
  builder.conf. E.g. `mixer config set Mixer.LOG <filepath>`.
  The log file and level can also be set for individual mixer
  commands using the `--log` and `--log-level` flags respectively.
  The various log levels are:
  ERROR (1), WARNING (2), INFO (3), DEBUG (4) and VERBOSE (5).
  Default log level is 4.

Other Changes:
- Remove the --no-publish flag.
  Mixer will now always update the LAST_VER file after `build update`.
- Update github actions to v2 to handle CI re-runs.
- Update Makefile to build man pages as a prerequisite for the
  `build` target.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
v6.2.3
2020-05-03 23:11:08 -07:00
Reagan Lopez 62c7d6cbba Log command tags only for external applications
Reduce cluttering the logs by logging command tags only for the external
applications used within Mixer.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-05-03 23:12:54 -07:00
Reagan Lopez eda20b16a8 Log bsdiff errors at Debug level
To avoid cluttering stdout with bsdiff errors, log them at Debug level
instead of Warning level.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-05-01 16:48:19 -07:00
Reagan Lopez 0c913eec00 Refactor logging for consistent messages
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-05-01 16:48:19 -07:00
Ashlesha Atrey f6dcd44f21 Implement logging for mixer
Implement the logging package for mixer.

A common log file can be set for all the mixer commands in the
builder.conf. E.g. `mixer config set Mixer.LOG <filepath>`

The log file and level can also be set for individual mixer
commands using the `--log` and `--log-level` flags respectively.

The various log levels are:
ERROR (1), WARNING (2), INFO (3), DEBUG (4) and VERBOSE (5).
Default log level is 4.

Fixes #666

Signed-off-by: Ashlesha Atrey ashlesha.atrey@intel.com
2020-04-30 13:57:58 -07:00
Reagan Lopez fc222fdb05 Update man page
Update man page to include `format` flag.

Also, update Makefile to build man pages as a prerequisite for the
`build` target.

Fixes #557

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-27 09:55:02 -07:00
Reagan Lopez bbeee932be Remove the --no-publish flag
Mixer will now always update the LAST_VER file after `build update`.
This file is used by `build validate` (MCA) to determine whether
the version in comparison is a +10.

Fixes #735

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-20 10:15:37 -07:00
Reagan Lopez 27cccb2eb0 Update github actions to v2
Update github actions to v2 to handle re-runs.
Also, introduce a timeout of 30 mins for each job.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-19 22:21:36 -07:00
Reagan Lopez b57dea23b6 Release v6.2.2
This release includes performance improvements, minor bug fixes and
removal of the Mixin feature.

Changes:
- Remove the Mixin feature as Mixer now supports creation of 3rd party content.
- Calculate the hash for each file just once.
- Parallelize bundle processing.
- Parallelize bundle file resolving.
- Update mix variables when crossing upstream formats.
- Fix MCA bundle deletion during format bump.
- Add more debug messages for DNF errors.
- Fix permission issue in bat test.
- Replace Travis CI with GitHub Actions.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
v6.2.2
2020-04-06 18:43:45 -07:00
Reagan Lopez 710c4486a4 Remove the mixin feature
Now mixer has the ability to support 3rd party content, which makes the
need for mixin obsolete.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-06 15:22:14 -07:00
Reagan Lopez f134dfda2b Update README to indicate CI status
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-06 05:00:54 -07:00
Reagan Lopez 56f9f42084 Update package version in bat test
Update the version of the helloworld package used in one of the bat
tests.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-06 04:29:46 -07:00
Reagan Lopez c983a6ea8f CI: Replace Travis with GitHub Actions
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-06 04:06:32 -07:00
Reagan Lopez ecbdbc0009 Fix lint issue from previous commit
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-04-03 11:12:53 -07:00
Patrick McCarty a66a129b29 Make sure all DNF errors are printed
In addition to printing a summary of unresolvable package names whenever
DNF fails, also print error messages for any "unknown" DNF error, and
finally print the full stdout/stderr from failed DNF commands for later
inspection.

Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
2020-04-02 18:31:54 -07:00
Reagan Lopez 75b4def4d2 Fix permission issue in bat test
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-03-27 16:29:53 -07:00
Ashlesha Atrey 361570bf10 Fix MCA bundle deletion during format bump
When bundle is deleted in a mix, bundle info file is not generated for that
bundle. When parsing the manifest, if bundle info is empty, consider that
bundle to be deleted in the mix and do not resolve packages for that
bundle during the MCA process.

Fixes #743

Signed-off-by: Ashlesha Atrey <ashlesha.atrey@intel.com>
2020-03-21 01:56:10 +00:00
John Akre dc79e60eab Parallelize bundle file resolving
By creating a separate installroot for each package resolving goroutine,
dnf can run in parallel without contention on the lock file when
accessing the dnf cache. Now, package and file resolution occurs within
the same installroot so that the dnf cache that was fetched when resolving
packages can be re-used when resolving files.

Fixes #730

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-03-16 00:11:30 -07:00
John Akre fc1be19d4c Update mix variables when crossing upstream formats
When a downstream mix crossed multiple upstream format bumps, the
upstreamversion and mix state variables were updated in the workspace,
but the changes were not updated in memory. This change reloads the
upstreamversion when it is staged/unstaged and reloads the mix state
after crossing each format boundary. Additionally, this change
increments the format number for each upstream format that the
downstream mix crosses.

Fixes #688

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-03-11 21:27:14 -07:00
Ashlesha Atrey 40132af80c Improve performance of process bundles
Improve the performance of processing bundles by parallelizing readIncludes()
and detectManifestChanges() operations.

Fixes #725

Signed-off-by: Ashlesha Atrey <ashlesha.atrey@intel.com>
2020-03-10 16:14:30 -07:00
Ashlesha Atrey 301fb7e0c4 Calculate file hashes once
Currently, mixer build update performs multiple hash calculations for each file in the chroot.
Every manifest file entry and subtracted file will have their hashes calculated.
It would be a significant performance improvement to calculate the hash one time for each file and re-use it.

fixes #585

Signed-off-by: Ashlesha Atrey <ashlesha.atrey@intel.com>
2020-03-09 14:08:33 -07:00
Reagan Lopez 4ebf421ab4 Release v6.2.1
This release includes minor enhancements and bug fixes.

Enhancements:
- Initialize local yum repo even when its empty as newer versions of
  DNF requires that yum repos be initialized.
- Install special case files in the end so that they will not create
  directories with potentially conflicting permissions.
  The order of installation is now packages, contents and then special
  case files.

Bug Fixes:
- Set file permissions in the chroot after creating it and setting the
  file owner. This is necessary because umask can prevent newly created
  files from acquiring the source file's permissions.
- Don't follow symlinks when comparing files between content and full
  chroot.
- Skip format bump check in MCA.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
v6.2.1
2020-03-08 11:37:11 -07:00
John Akre 50fd3928d8 Install special case files last
When adding special case files to the full chroot, they will create
missing directories in their path with permissions that may conflict
with content that will be added at a later point. By adding special case
files last, they will not create directories with potentially
conflicting permissions.

Fixes #738

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-03-06 14:30:23 -08:00
John Akre db7d44e3b6 Don't follow symlinks when comparing content/full chroots
When comparing files between content and full chroots, do not follow
symlinks so that the links can be compared.

Fixes #739

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-03-05 15:12:36 -08:00
John Akre a3e96f8cc6 MCA: Skip format bump check
Fixes #736

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-03-03 16:24:50 -08:00
John Akre bfc02ef322 Set file perms after creating the dest file
When calling the copyFileWithFlags function with the preserveSrc flag
set, file permissions must be set after creating the destination file
and setting the file owner. This is necessary because umask can prevent
newly created files from acquiring the source file's permissions and
file ownership changes can impact the setuid/setgid permissions.

Similarly directory permissions are set after creating the directory to
avoid unexpected permission behavior caused by umask.

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-03-03 16:23:41 -08:00
John Akre af8d355a9c Initialize local yum repo
Newer versions of DNF require that yum repos are initialized, so Mixer
must initialize the local repo, even when it's empty.

Fixes #731

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-03-03 15:28:34 -08:00
Reagan Lopez 11c7d23425 Release v6.2.0
This release includes support for building 3rd party content along with
other enhancements and bug fixes.

New features (beta) for 3rd party support:
- Create a minimal mix using just an os-core bundle that can be empty.
- Add BUILD_ID field in os-release file that specifies the upstream
  version from which the mix is created.
- Build bundles from contents by providing the content path using a new
  keyword "content()" in the bundle definition.
- Introduce a new export flag "x" in bundle manifests to indicate exportable
  files in "/bin/", "/usr/bin/" and "/usr/local/bin/".
  The user can override this flag by specifying the files using a new
  keyword "un-export()" in the bundle definition.

Other changes:
- Fix error to handle bundles that contain only optional bundles.
- Fix build errors due to stale dnf cache by cleaning the dnf cache before using it.
- Clean mix workspace before building bundles.
- Add --local flag for bundle creation that skips the upstream check and
  creates empty local bundles.
- Improve performance by writing mixbundles file just once for the resolved bundle set.
- Make bundle messages consistent.
- Print delta pack results together to prevent interleaved results.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
v6.2.0
2020-02-28 16:22:03 -08:00
John Akre 60dcf63ce2 Preserve file ownership when using content chroots
When using content chroots, file uid/gid values should be preserved when
copying them to the full chroot.

Fixes #727

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-02-25 17:29:39 -08:00
John Akre fa62440e85 Write mixbundles file once for resolved bundle set
When resolving the full mix bundle set, the mixbundles file is now
updated once with the finalized set of bundles. Previously, the
mixbundles file was written many times with intermediate results which
scaled poorly when building with many bundles.

Fixes #724

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-02-25 14:30:14 -08:00
John Akre 514bf24cd9 Clean dnf cache before using it
When building a mix with a version of a package repo that contains
existing cache contents, dnf may resolve incorrect results.

For instance, Mixer does not version the local package repo, so when
incrementally building a mix with local content, dnf will continue to
re-use the same cache for the local repo. This was problematic when the
version of an rpm in the local repo was updated. In this case, the stale
cache metadata was used to incorrectly resolve files for the package.

Cleaning the dnf cache before using it prevents old cache metadata from
impacting dnf results.

Fixes #719

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-02-21 13:26:07 -08:00
Reagan Lopez 1cb0a99126 Introduce new export flag in bundle manifests
By default, files with the prefix "/bin/", "/usr/bin/" and "/usr/local/bin/"
will have a new export flag "x" in the 4th byte of the flag section of the
bundle Manifest.

The user can override this by using a new keyword "un-export()" in
the bundle definition file.
E.g. un-export(/usr/bin/file2)

Note: The export flag is at a bundle-file level and hence does not get
written to the Full manifest.

Fixes #708

Includes bat tests for the export flag feature.
Also, adds an entry for the content-chroot tests to Travis.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-02-21 11:15:17 -08:00
Reagan Lopez 1ba623f78c Change RenameFlag to MiscFlag
Change RenameFlag to MiscFlag since "rename" has been deprecated and
this flag will be used as a placeholder for various other flags.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-02-21 11:15:17 -08:00
Reagan Lopez bed9ee845e Make bundle messages consistent
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-02-14 15:41:54 -08:00
Reagan Lopez af9ef58f48 Handle optional bundles
Currently, build bundles generates an error if one of the mix bundles
has only an 'also-add()' entry in its definition.

Instead, build bundles should not error out and must process such
bundles.

Fixes #718

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2020-02-11 19:27:43 -08:00
John Akre 48a154b912 Print delta pack results together
Delta packs are generated concurrently, so their results output must be
printed once to prevent interleaved results. Additionally, this change
redirects warnings to stderr so that can be separated from the results.

Fixes #551

Signed-off-by: John Akre <john.w.akre@intel.com>
2020-02-05 11:36:05 -08:00
Ashlesha Atrey 1f21b261e7 Add --local flag in mixer bundle create command
Passing '--local' with mixer bundle create will skip
the upstream check and create a new empty local bundle
if it does not already exist.

fixes #713

Signed-off-by: Ashlesha Atrey <ashlesha.atrey@intel.com>
2020-02-04 15:12:04 -08:00