snappy:dependabot/go_modules/tests/lib/muinstaller/golang.org/x/net-0.23.0

Last commit made on 2024-04-19
Get this branch:
git clone -b dependabot/go_modules/tests/lib/muinstaller/golang.org/x/net-0.23.0 https://git.launchpad.net/snappy

Branch merges

Branch information

Name:
dependabot/go_modules/tests/lib/muinstaller/golang.org/x/net-0.23.0
Repository:
lp:snappy

Recent commits

1540442... by "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>

build(deps): bump golang.org/x/net in /tests/lib/muinstaller

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.9.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.9.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <email address hidden>

5ca13c7... by Zygmunt Krynicki

i/apparmor: fix snap-update-ns with ecrypfs home (#13857)

Ever since snapd 2.62 was released, snap-update-ns requires opening the home
directory of the user for some validation and sanity checking. This is now
affected by a bug in base policy regarding ecryptfs. Add the similar workaround
we have in other templates.

Fixes: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2062330
Fixes: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/2062173

Signed-off-by: Zygmunt Krynicki <email address hidden>

8373593... by Alfonso Sanchez-Beato

o/snapstate,tests: discard previous component on a component refresh (#13842)

* o/snapstate: store unlinked component information in change

As we will need this information in the component discard task.

* o/snapstate: discard previous component on a component refresh

Only one can be installed in the system at the same time.

* tests/component: check removal of older component after refresh

* o/snapstate: add function to retrieve component setup

Add function to find ComponentSetup for a task that is part of the
tasks created to do a component operation.

* o/snapstate: store unlinked component in ComponentSetup

* o/snapstate/backend: remove component related directories if empty

* o/snapstate: use SnapSetup to store the previous kernel revision

instead of having an object directly in the change.

* o/snapstate: store unlinked component in setup task

* o/snapstate: set previous kernel in setup task

instead of making it part of SnapSetup.

* o/snapstate: some additional tests

63a26ef... by Zygmunt Krynicki

i/apparmor: add missing expansion for s-u-n template (#13853)

This fixes access to /etc/apparmor.d/tunables when running from snapd snap.
When snapd snap re-executes, and uses apparmor_parser from snapd snap (those
are separate conditions), then it re-directs the parser away from host
/etc/apparmor.d and we have special code to load tunables from the host anyway.
Those tunables are themselves conditional on the conditional include syntax
that may or may not be supported by apparmor (otherwise the would be explicitly
spelled out in the template, and not dynamically expanded with custom logic).

The problem was introduced along with patch
b98e4af3768cd7bc6e5302372ef19c6762b58f14 (i/apparmor: support for home.d
tunables from /etc/ (#13118)), as the case for snap-update-ns was missed, and
the default expansion is an empty string.

Regression-testing this requires that we re-package snapd snap, so the test
will come in with a separate patch as it requires somewhat more effort to
behave correctly.

This issue was identified by Maciej Borzecki.

Signed-off-by: Zygmunt Krynicki <email address hidden>

b616df5... by Alfonso Sanchez-Beato

o/snapstate: use StartBeforeDriversLoad only for systems with modes

We do not need early mounts for the kernel in UC16/18, and causes
problems with systemd on UC16.

5b5b54f... by Andrew Phelps <email address hidden>

daemon, o/snapstate, snap: add hooks to snap.ComponentInfo (#13771)

* daemon, o/snapstate, snap: add hook information to snap.ComponentInfo

* snap: add functions for helping with snap component instances

* snap: return correct security tags from hook if it is a component hook

* s/snaptest: add function for mocking an installed component

* snap: add functions to help with hook and component locations

* snap: add test for ReadComponentInfoFromContainer where component is not found in provided snap.Info

* snap, o/snapstate: move component and snap consistency checks into snap.ReadComponentInfoFromContainer

* snap: remove unneeded json tag

* snap: log if we ignore an unsuppported implicit component hook

* snap: reorder addAndBindImplicitComponentHooksFromContainer args to be more consistent

* snap: add extra component hook to test

* snap: reorder ComponentHooksDir args and implement it using ComponentMountDir

* snap: correct doc comment on SnapComponentName

* snap: use two spaces for indentation in yaml literals

* snap: upgrade debug log for unsupported hook to notice

c679f43... by Andrew Phelps <email address hidden>

s/cgroup, systemd: escape systemd unit names in CreateTransientScopeForTracking (#13763)

* systemd: add function that implements "systemd-escape" in addition to already existing "systemd-escape --path"

* s/cgroup: escape created unit name in CreateTransientScopeForTracking

With the addition of component hooks, we'll have unit names that include
a '+', like 'snap.snapname+comp.hook.install'. This causes systemd to
complain that the unit isn't properly escaped. On the command line,
systemd-run will properly escape this for you (with a warning), but the
dbus API doesn't do that.

* s/naming: teach ParseSecurityTag to handle tags from component hooks

* Revert "systemd: add function that implements "systemd-escape" in addition to already existing "systemd-escape --path""

This reverts commit 0521600ec8fa785b69d2b7a85fa8da9be4938a5a.

* systemd: add functions for escaping security tags to valid systemd unit names

We must at least partially escape unit names that are created from
security tags, since they may potentially contain '+' characters from
snap components.

Since we already use unit names with '-' in them, we cannot simply use a
reimplementation of systemd-escape. This is because '-' is escaped by
systemd-escape. Note that '-' is a valid character is a unit name, since
it is used as the replacement for the '/' character by systemd-escapes.

Thus, we have our own functions for converting a security tag to a unit
name, and the inverse. These functions only escape the '+' character
that appears in security tags.

* s/cgroup: use new conversions from security tags to unit names, and the inverse

* systemd: update doc comment on UnitNameFromSecurityTag

Co-authored-by: Maciej Borzecki <email address hidden>

* s/naming: add ComponentName method to HookSecurityTag interface

* systemd: split tests for UnitNameFromSecurityTag and SecurityTagFromUnitName

* s/naming: add test for invalid snap instance that is a part of a component

* s/naming: refactor ParseSecurityTag to clarify that components cannot have apps yet

* systemd, s/cgroup: rename security tag and unit name conversion functions for clarity

---------

Co-authored-by: Maciej Borzecki <email address hidden>

5503e21... by Maciej Borzecki

build-aux/snap: ship snap-debug-info.sh script

Ship the current version of snap-debug-info.sh script inside the snapd snapd, so
that folks no longer need to download it from snapd github repository.

Signed-off-by: Maciej Borzecki <email address hidden>

031dc4d... by Sergio Cazzolato

tests: enable nested uc24 (#13820)

* enable nested tests for uc24

* fix issue related to cloud init

* some test fixes

* Add missing details for tests

* Adding missing details for nested tests

* addin support for ubuntu-24.04 in upload-snapd-to-gce

* updated the password for external users in spread.yaml

4484bbe... by Maciej Borzecki

desktop/notification/notificationtest: fix data races

Fix data races identified by go test -race caused by manipulation of fields of
an exported dbus object.

```
==================
WARNING: DATA RACE
Read at 0x00c0003f0fd0 by goroutine 191:
  github.com/godbus/dbus.(*Conn).sendError()
      /home/maciek/work/canonical/snapd/vendor/github.com/godbus/dbus/conn.go:482 +0x6cf
  github.com/godbus/dbus.(*Conn).handleCall()
      /home/maciek/work/canonical/snapd/vendor/github.com/godbus/dbus/export.go:155 +0x9dc
  github.com/godbus/dbus.(*Conn).inWorker.gowrap1()
      /home/maciek/work/canonical/snapd/vendor/github.com/godbus/dbus/conn.go:334 +0x44

Previous write at 0x00c0003f0fd0 by goroutine 182:
  github.com/snapcore/snapd/desktop/notification_test.(*gtkSuite).TestCloseNotificationError()
      /home/maciek/work/canonical/snapd/desktop/notification/gtk_test.go:108 +0x224
  runtime.call16()
      /usr/lib/go/src/runtime/asm_amd64.s:770 +0x42
  reflect.Value.Call()
      /usr/lib/go/src/reflect/value.go:380 +0xb5
  gopkg.in/check%2ev1.(*suiteRunner).forkTest.func1()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/check.go:775 +0x9c5
  gopkg.in/check%2ev1.(*suiteRunner).forkCall.func1()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/check.go:669 +0xe9

Goroutine 191 (running) created at:
  github.com/godbus/dbus.(*Conn).inWorker()
      /home/maciek/work/canonical/snapd/vendor/github.com/godbus/dbus/conn.go:334 +0x346
  github.com/godbus/dbus.(*Conn).Auth.gowrap1()
      /home/maciek/work/canonical/snapd/vendor/github.com/godbus/dbus/auth.go:118 +0x33

Goroutine 182 (running) created at:
  gopkg.in/check%2ev1.(*suiteRunner).forkCall()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/check.go:666 +0x5ba
  gopkg.in/check%2ev1.(*suiteRunner).forkTest()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/check.go:757 +0x155
  gopkg.in/check%2ev1.(*suiteRunner).runTest()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/check.go:812 +0x419
  gopkg.in/check%2ev1.(*suiteRunner).run()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/check.go:618 +0x3c6
  gopkg.in/check%2ev1.Run()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/run.go:92 +0x44
  gopkg.in/check%2ev1.RunAll()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/run.go:84 +0x124
  gopkg.in/check%2ev1.TestingT()
      /home/maciek/work/canonical/snapd/vendor/gopkg.in/check.v1/run.go:72 +0x5d3
  github.com/snapcore/snapd/desktop/notification_test.Test()
      /home/maciek/work/canonical/snapd/desktop/notification/notify_test.go:30 +0x26
  testing.tRunner()
      /usr/lib/go/src/testing/testing.go:1689 +0x21e
  testing.(*T).Run.gowrap1()
      /usr/lib/go/src/testing/testing.go:1742 +0x44
==================
```

Signed-off-by: Maciej Borzecki <email address hidden>