Bug 9199 - [meta-swupd] Enable updating of configuration files in swupd-client
Summary: [meta-swupd] Enable updating of configuration files in swupd-client
Status: RESOLVED FIXED
Alias: None
Product: Other YP Layers
Classification: Build System, Metadata & Runtime
Component: meta-swupd (show other bugs)
Version: 2.1
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.2 M1
Assignee: Joshua Lock
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-03-02 14:23 UTC by Joshua Lock
Modified: 2016-04-18 12:46 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Bare minimum patch to have swupd-client pay attention to files in /etc (4.41 KB, patch)
2016-04-14 13:12 UTC, Joshua Lock
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Lock 2016-03-02 14:23:41 UTC
We have a patch to ensure that swupd-server writes information about configuration files to the generated Manifests, we need a similar patch to swupd-client so that it doesn't ignore configuration files it finds in the manifests.
Comment 1 Joshua Lock 2016-03-02 17:10:56 UTC
We have various files that are generated, or modified, at first boot. i.e. in my minimal distro + systemd the following files all fail a swupd verify after initial boot:

/etc/ld.so.cache
/etc/group-
/etc/gshadow
/etc/mtab
/etc.machine-id

I wonder what the best way to enhance swupd client for the stateful use-case is.
Comment 2 Joshua Lock 2016-04-14 13:12:37 UTC
Created attachment 3125 [details]
Bare minimum patch to have swupd-client pay attention to files in /etc

Attached is a tiny patch which changes swupd-client to process files in /etc (developed against v2.x), this fails to consider the boot-time generated/modified files.

Most likely the correct solution is to modify swupd-server to be aware of these files and not include them in the manifest.
Comment 3 Patrick Ohly 2016-04-15 10:31:58 UTC
I ported that patch to current meta-swupd and currently have everything working in Ostro OS. Test build here:

https://github.com/ostroproject/ostro-os/pull/58

The basic approach is that the rootfs must not contain anything in /etc which later gets modified on the device. IMHO this depends a lot on the distro; I wouldn't expect meta-swupd to get involved in that area.
Comment 4 Joshua Lock 2016-04-17 21:23:03 UTC
(In reply to comment #3)
> I ported that patch to current meta-swupd and currently have everything
> working in Ostro OS. Test build here:
> 
> https://github.com/ostroproject/ostro-os/pull/58

Patch has been applied to meta-swupd master, thanks.
 
> The basic approach is that the rootfs must not contain anything in /etc
> which later gets modified on the device. IMHO this depends a lot on the
> distro; I wouldn't expect meta-swupd to get involved in that area.

Agreed, it does depend a lot on the distro. I plan to at least update the Guide to discuss this.
Comment 5 Joshua Lock 2016-04-18 12:46:38 UTC
I've also applied a similar patch to the 3.x version of the recipes in meta-swupd master. Marking this bug as resolved.