Age | Commit message (Collapse) | Author |
|
Now that we are using libarchive and bsdtar it is not necessary to
ensure the full versions of gzip, bzip2, tar and xz are included
in all swupd using images.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
When using swupd-server 3.x bsdiff native is required at runtime,
ensure it is available in the native sysroot as a dependency of
the do_swupd_update task.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
This makes it easier to override for consumers of the class.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
This makes it simpler for a consumer of the layer to override or
append to the value (i.e. using += as is commonly done).
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Move implementation details and known issues into separate files.
Enhance the How to guide to discuss some of the swupd concepts and
how they impact the way we construct a custom distro using swupd.
Specifically discuss likely pain points and how to address them,
notably:
* update-alternatives
* stateless vs. stateful (updating files in /etc)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Also apply a version of the patch from 6d5555c1 to the reciep for
swupd-client v3.x
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
c6fc2a adds a backport of a patch submitted upstream to protect
the tar command against special characters, backport the submitted
patch for use in the 3.x recipes to keep our recipes as functionaly
equivalent as possible.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
0001-manifest.c-Always-initialize-preserver-pointer-of-fi.patch
is available in v3.0.0 and newer.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
This patch adds escaping for special characters in file names
for the tar commands used to install files into target file system.
Particularly it fixes installation of nodejs libs having '#'
and '@' in file names.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
We already unset IMAGE_FSTYPES to prevent any images being written
for the transient bundle images. As a logical follow on from that
change, and to prevent issues when trying to build for a MACHINE
which supports live images (due to the automatic inference of
live image support via build_live() in image.bbclass), delete the
do_bootimg task for bundle images.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
This reverts commit a7dddfbfb8f45989856c93c6f82f46d8a96e6f0b.
We can't completely disable the do_image task because we need to
allow various tasks that run during image creation which affect
the rootfs to run.
|
|
swupd upstream expects its host OS, i.e. Clear Linux, to be stateless and
thus by default ignores configuration file changes in the manifests.
Add a configure option to swupd-client to not ignore these files, matching
a similar change in swupd-server to ensure config files are included in
the manifests.
Do not enable this option by default in our recipe as we have several files
in /etc which are generated/modified on first-boot and will cause a
swupd verify to fail.
[YOCTO #9199]
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
The patch makes the function deduplicate_files_from_manifest()
return correct value always.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
The layer's users are supposed to create their own update
repos. Not setting --url may lead to downloading updates
from the default repo which is http://downloads.clearlinux.com/update
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
Mark do_image and do_bootimg as noexec tasks so that they don't run
but their task dependency chain is preserved. This prevents an error
in swupdbundle image building when an image for the target MACHINE
would result in a live image being built.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Errors are now printed including the "staging" filename (and without
segfaulting, which was already fixed by the previous patch), and
download performance is a lot better on Ostro OS where IMA is active
and affects the performance of the close() syscall.
The download performance patch was also ported to current swupd
master, see https://github.com/clearlinux/swupd-client/pull/42. It
does not get included here because there is a chance to get it
via an upstream update, whereas that is unlikely for 2.87.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
swupd generates and uses a Manifest.full which is a complete manifest
of all files in all bundles of the OS.
Therefore we should prevent users defining a bundle named 'full' as
this would also generate a Manifest.full file and confuse future use
of swupd.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
In many error situations a fake file struct is passed to
the logger. The filename field of the struct needs to be
checked for NULL before printing it to a log to avoid
dereference of a NULL-pointer.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Implement a task which runs after image creation and executes the
functions defined in SWUPD_IMAGE_SANITY_CHECKS to validate the
constructed image.
do_swupd_sanity_check_image() is influenced heavily by the
sanity_check_conffiles method in OE-Core's sanity.bbclass.
Include a single QA function to start with, disabled by default,
which checks whether there are any dangling symlinks in the image
— this check is based on code from the Ostro Project by Patrick
Ohly.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
The configure.ac uses PKG_CHECK, inherit pkgconfig to ensure we
have pkg-config built before swupd-server.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
We no longer need to add a BBCLASSEXTEND = "native" as this change
has been integrated in the rsync recipe in OE-Core.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
The format version isn't static, and indeed will be bumped in the
next swupd release.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Switch 3.3.0 recipe to using bsdtar, align DEPENDS, RDEPENDS and
EXTRA_OECONF settings.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Switch 3.1.2 recipe to using bsdtar and include the patch to work
around hardlink extended attribute issues when running under
pseudo.
Move 2.53 specific patches to the swupd-server-2.53 directory.
Unify DEPENDS, RDEPENDS and EXTRA_OECONF settings.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
remove_unlisted_files_from_directory() failed to remove unwanted
symlinks to directories because it only looked at files, whereas
Python lists symlinks to directories as directories.
In Ostro OS, that affected for example /usr/lib/perl5 -> perl and
was found when adding a QA check for dangling symlinks.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
As a special optimization, updating the rootfs of the base image was
skipped if actual image creation was disabled for the base
image. However, there are reasons beyond image creation for updating
the rootfs, for example to run QA checks on it.
Therefore the change gets reverted and the code now only gets skipped
for the virtual bundle recipes.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Add a new recipe to track the latest version, 3.3.0, from github.
We'll keep the older version around for now whilst we do some
testing.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Add a new recipe to track the latest version, 3.1.2, from github.
We'll keep the older version around for now whilst we do some
testing.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Changing os-release in a .bbappend is undesirable for two reasons:
1. it changes the content also for images which do not use swupd
2. it causes full rebuilds even when the only thing that changed
is the OS_VERSION
The latter may or may not be desired, so we should better leave that
choice to the user, which is possible by setting VERSION_ID to
OS_VERSION in local.conf.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
We had a request to print more of the debugging around long-running
tasks to the console when using knotty using bbplain. This is undesirable
as a default but this patch enables a user to opt-in to this behaviour by
setting SWUPD_LOG_FN = "bbplain" producing output like:
NOTE: Executing RunQueue Tasks
jgl-image-swupd-1.0-r0 do_swupd_update: New OS_VERSION is 20
jgl-image-swupd-1.0-r0 do_swupd_update: Generating update from 0 to 20
jgl-image-swupd-1.0-r0 do_swupd_update: Generating fullfiles for 20
jgl-image-swupd-1.0-r0 do_swupd_update: Generating zero packs, this can take some time.
jgl-image-swupd-1.0-r0 do_swupd_update: Generating zero pack for os-core
jgl-image-swupd-1.0-r0 do_swupd_update: Generating zero pack for connman
jgl-image-swupd-1.0-r0 do_swupd_update: Generating zero pack for server
jgl-image-swupd-1.0-r0 do_swupd_update: Generating zero pack for developer
NOTE: Tasks Summary: Attempted 2857 tasks of which 2582 didn't need to be rerun and all succeeded.
NOTE: Writing buildhistory
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
It is not guaranteed that OS versions always increment in steps of 10
and that deltas are desired for "current version - 10, -20, etc.". For
example, previous versions might be 10, 20, and the current one 21
because it is a minor update. In such a case no delta packs would be
generated because OS versions 11 and 1 do not exist.
Ostro OS outside of the CI derives the OS version from datetime, which
leads to high version numbers like 33014500. Counting down from that
in steps of ten in shell under pseudo was surprisingly slow and
unusable, running for minutes without even getting close to completion
when it does not hit existing version numbers.
So now the simplified approach is to generate delta packs for exactly
the last SWUPD_N_DELTAPACK older versions, regardless what their
numbering is.
If a more sophisticated approach is needed, it can still be added
later on, for example as part of YOCTO #9321.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
swupd-server relies on hardlinks to create a temporary directory with
the original file for the external tar command. Creating hardlinks
under pseudo leads to copies which (incorrectly) do not share the
original file's xattrs.
To work around this bug, we explicitly copy the xattrs.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
This patch adds bsdtar support to swupd-client and swupd-server
and enables it.
The reason why it's done this way is that:
- bsdtar works better with IMA (opens files only once and then
updates content and xattrs together);
- swupd remains fully functional, including xattrs support,
even when a distro disables GPLv3 licensed code.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
Some recipes may need to generate archives during build time
that are consumed on target devices, e. g. software updates.
Since the format of those archives must be identical configure
the native tool the same way as it's done for target builds:
enable xattrs if it's a distro feature. Also make the xz
compression type enabled always in addition to zlib and bzip2.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
Update 0001-Tolerate-quotes-in-os-release-files.patch to the
final version that got accepted upstream.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
The patch has been accepted upstream
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
swupd-client checks VERSION_ID, which must match the OS_VERSION
used for generating swupd bundles in the current build.
Also move os-release from /etc to /usr/lib because
swupd-client doesn't update files in /etc.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Replaced "ln -s ../usr/lib/...." with "lnr ${D}/usr/lib/..." for the
sake of consistency with OE-core common practices.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
By convention, any bundle called "foobar-dev" is equal to the "foobar"
bundle plus the "dev-pkgs" image feature, i.e. it has the same content
as the base bundle plus the corresponding development files.
Without this feature it is impossible to generate separate bundles for
development files; the only option would be to put "dev-pkgs" into the
shared image features, which would add development files also to the
os-core and all bundles.
Using this fixed naming convention was chosen over additional
configuration options because a consistent naming automatically gets
enforced and it was easier to implement than additional configuration
options.
A future optimization will be to declare a dependency of the -dev
bundle on the base bundle and only provide the additional development
files in the -dev bundle. Right now, the -dev bundle is simply a
larger variant of the base bundle because all non-development files
are present in both bundles.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Because we skip the normal do_rootfs, the file is not created. But
several use cases depend on it, so now we create it based on the
manifest files of the individual bundles which get copied into the
image.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
There are scenarios in which these are useful for use by other
parts of this system, not least of all the next patch which uses
them to compose a manifest for bundle-based images.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
The code in 5b48b103b9b940232cf65699db2adcab9c224124 fails to ever
delete the manifest symlinks, which causes errors on builds beyond
the first. The reason for this is that os.path.exists() on a broken
symlink returns False.
Fix this by trying to remove the manifest symlink first and then
removing the linked to file.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
Add the oe-swupd-helpers base dependency to
SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS in order to prevent the bash recipes
architecture taining the sstate of allarch oe-swupd-helpers.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
We now have HOWTO.md to describe usage of the layer in detail.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
HOWTO.md describes how to use the layer, what the known limitations
are and some of the design decisions we made when implementing the
class.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
As we don't actually generate any images for the bundle images
(only the rootfs) writing an image manifest to the deploy directory
isn't very useful.
Add a task to remove the image manifests, ideally we'd just unset
IMAGE_MANIFEST in swupdbundle.bbclass but that isn't fully supported
in write_image_manifest() of rootfs-postcommands.bbclass in OE-Core.
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
|
|
tar's option --preserve-permissions must be used on both sides
of the pipe: when creating an archive and when extracting it.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
|
|
Pseudo does not handle xattrs on hardlinks correctly. We work around
that for now by replacing hardlinks with symlinks. Only affects a few
entries, for example /sbin/e2fsck.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|