~snappy-dev/snapd/+git/snapd-pawel:validation-sets/enforce-with-prereq

Last commit made on 2021-10-20
Get this branch:
git clone -b validation-sets/enforce-with-prereq https://git.launchpad.net/~snappy-dev/snapd/+git/snapd-pawel

Branch merges

Branch information

Name:
validation-sets/enforce-with-prereq
Repository:
lp:~snappy-dev/snapd/+git/snapd-pawel

Recent commits

19777ca... by Paweł Stołowski

Merge branch 'master' into validation-sets/enforce-with-prereq

79cec58... by Samuele Pedroni

tests: not testing lxd snap anymore on i386 architecture

Merge pull request #10912 from sergiocazzolato/tests-fix-lxd-bionic-32

As lxd snap is based on core20 now, the i386 architecture is not supported anymore. Ubuntu 20.04 doesn't have i386 anymore, so anything that's based on it similarly cannot have it.

This change updates the tests which are validating lxd in i386.

More info here:
https://discuss.linuxcontainers.org/t/lxd-snap-transitioning-to-core20-and-losing-i386-support/10887

0e72513... by Paweł Stołowski

o/snapstate, hookstate: print remaining hold time on snapctl --hold (#10883)

Print remaining hold time after snapctl --hold; this time is the minimum value of hold times of all snaps held by the gating snap that calls snapctl command. In the future this may get extended to allow snaps to ask for 1 extra hour.

e426d47... by Samuele Pedroni

cmd/snap: support --ignore-validation with snap install client command

Merge pull request #10544 from stolowski/validation-sets/install-ignore-validation-flag

Allow --ignore-validation flag with snap install command.

0b91133... by Samuele Pedroni

tests/snapd-sigterm: be more robust against service restart

Merge pull request #10934 from mardy/restart-test-robustness

Since we don't stop the socket (stopping it could always make the test
pass, even if the code regresses and the bug reappears), systemd might
restart the snapd service. Make the check a bit more robust, as it was
seen that on some machine this test fails and the unit is found to be in
the "activating" state already.

8373aa5... by Alberto Mardegan

tests: simplify mock script for apparmor_parser (#10941)

Instead of using bash arithmetics to count the iterations and have a
switch for the exit values (which makes it cumbersome to add new
invocations), directly write the exit code into the input file: at every
invocation the first exit code is read (and used), while all the others
are written back into the file.

a60220f... by Samuele Pedroni

 o/devicestate, o/servicestate: update gadget assets and cmdline when remodeling

Merge pull request #10876 from bboozzoo/bboozzoo/remodel-needs-gadet-assets-update

It is possible that due to prior remodels, the kernel or gadget snaps the new model request are already installed. The gadget may be carrying boot assets or command line elements, in which case we should ensure that both the boot assets and the kernel command line is updated during remodel.

073a6b2... by Samuele Pedroni

tests/nested/manual/refresh-revert-fundamentals: re-enable encryption

Merge pull request #10925 from anonymouse64/feature/rename-uc20-nested-tests

This test had encryption temporarily disabled as part of #9632,
so it's now high time we re-enable it almost a year later /o\

To be clear, this PR is orthogonal to the tests mentioned in #10923, and specifically this test would not have caught the regression that that PR reverts. This test only would catch specific errors that result in not being able to refresh at all, while the regression in that PR is about a refresh which results in a reseal operation that happens after the new snapd is installed with an existing/old kernel. This test could possibly be extended to also trigger a reseal and cover that case, but I'm going to add that functionality to a different test instead since that's a bit involved and better to keep this test simple as-is I think.

Also rename some UC20 specific tests to make clear they are UC20 specific.

da507a2... by Samuele Pedroni

osutil/disks: fix bug in BlkIDEncodeLabel, add BlkIDDecodeLabel

Merge pull request #10916 from anonymouse64/feature/uc20-multi-volume-gadget-asset-updates-14

The existing code was not properly encoding non-allowed single length runes
less than 0x10 by not including the prefixing "0".

BlkIDDecodeLabel is needed since some labels we read from udev need to be
compared with normal Go string values we get from i.e. gadget.yaml.

b512d2e... by Samuele Pedroni

gadget, osutil/disks: fix some bugs from prior PR's

Merge pull request #10905 from anonymouse64/feature/uc20-multi-volume-gadget-asset-updates-10.5-whoopsies

Fix a couple mistakes from previous PR's that were only evident on an end-to-end test
I did again with multi-volume stuff.

It remains to be seen if the udev properties change to get partitions will actually pose a
problem for us, I think it is only a problem in the uc20-create-partitions test when we start
actually using disks.DiskFromDevicePath from gadget/install.Run(), but I think we can
cross that bridge when we get there.

The other problem is that we actually need to write the mapping file from install mode to
boot.InstallHostWritableDir, which we can't import from gadget package, so instead pass
in the dir. Example usage now from the gadget/install package eventually:

 if err := gadget.SaveDiskVolumesDeviceTraits(dirs.SnapDeviceDirUnder(boot.InstallHostWritableDir), allVols); err != nil {
  return nil, fmt.Errorf("cannot save disk to volume device traits: %v", err)
 }