Skip to content

Commit

Permalink
chore(merge): 8.4.3 and 8.4.4 into main (#5134)
Browse files Browse the repository at this point in the history
Merge 8.4.3 and 8.4.4 into main.
  • Loading branch information
mr-cal authored Oct 25, 2024
2 parents 1e38b4e + 0cb9841 commit 187187d
Show file tree
Hide file tree
Showing 10 changed files with 109 additions and 13 deletions.
53 changes: 53 additions & 0 deletions docs/reference/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,53 @@ Changelog

For a complete list of commits, check out the `X.Y.Z`_ release on GitHub.

8.4.4 (2024-Oct-24)
-------------------

Core
====

Bases
#####

core24
""""""

* Fix a bug where ``CRAFT_PARALLEL_BUILD_COUNT`` was not evaluated in
``snapcraft.yaml`` files (`#4785`_).

* Fix a bug where ``package-repositories`` declarations could conflict with
default sources present in Noble (`LP#2083013`_).

For a complete list of commits, check out the `8.4.4`_ release on GitHub.


7.5.8 (2024-Oct-24)
-------------------

Core
====

* Fix a regression where Snapcraft would fail to run on some architectures due
to a ``cryptography`` dependency that attempted to load legacy algorithms
(`#5077`_).

For a complete list of commits, check out the `7.5.8`_ release on GitHub.


8.4.3 (2024-Oct-10)
-------------------

Core
====

Components
##########

* Add support for component types ``kernel-modules`` and ``standard``
(`#5089`_).

For a complete list of commits, check out the `8.4.3`_ release on GitHub.

8.4.2 (2024-Oct-07)
-------------------
Expand Down Expand Up @@ -1230,6 +1277,7 @@ For a complete list of commits, check out the `8.0.0`_ release on GitHub.
.. _LP#2061603: https://bugs.launchpad.net/snapcraft/+bug/2061603
.. _LP#2064639: https://bugs.launchpad.net/snapcraft/+bug/2064639
.. _LP#2069783: https://bugs.launchpad.net/snapcraft/+bug/2069783
.. _LP#2083013: https://bugs.launchpad.net/snapcraft/+bug/2083013

.. _#4142: https://github.com/canonical/snapcraft/issues/4142
.. _#4356: https://github.com/canonical/snapcraft/issues/4356
Expand All @@ -1255,6 +1303,7 @@ For a complete list of commits, check out the `8.0.0`_ release on GitHub.
.. _#4780: https://github.com/canonical/snapcraft/issues/4780
.. _#4781: https://github.com/canonical/snapcraft/issues/4781
.. _#4783: https://github.com/canonical/snapcraft/issues/4783
.. _#4785: https://github.com/canonical/snapcraft/issues/4785
.. _#4791: https://github.com/canonical/snapcraft/issues/4791
.. _#4798: https://github.com/canonical/snapcraft/issues/4798
.. _#4804: https://github.com/canonical/snapcraft/issues/4804
Expand Down Expand Up @@ -1287,9 +1336,11 @@ For a complete list of commits, check out the `8.0.0`_ release on GitHub.
.. _#5048: https://github.com/canonical/snapcraft/issues/5048
.. _#5077: https://github.com/canonical/snapcraft/issues/5077
.. _#5079: https://github.com/canonical/snapcraft/issues/5079
.. _#5089: https://github.com/canonical/snapcraft/issues/5089

.. _7.5.6: https://github.com/canonical/snapcraft/releases/tag/7.5.6
.. _7.5.7: https://github.com/canonical/snapcraft/releases/tag/7.5.7
.. _7.5.8: https://github.com/canonical/snapcraft/releases/tag/7.5.8
.. _8.0.0: https://github.com/canonical/snapcraft/releases/tag/8.0.0
.. _8.0.1: https://github.com/canonical/snapcraft/releases/tag/8.0.1
.. _8.0.2: https://github.com/canonical/snapcraft/releases/tag/8.0.2
Expand Down Expand Up @@ -1318,3 +1369,5 @@ For a complete list of commits, check out the `8.0.0`_ release on GitHub.
.. _8.4.0: https://github.com/canonical/snapcraft/releases/tag/8.4.0
.. _8.4.1: https://github.com/canonical/snapcraft/releases/tag/8.4.1
.. _8.4.2: https://github.com/canonical/snapcraft/releases/tag/8.4.2
.. _8.4.3: https://github.com/canonical/snapcraft/releases/tag/8.4.3
.. _8.4.4: https://github.com/canonical/snapcraft/releases/tag/8.4.4
4 changes: 2 additions & 2 deletions requirements-devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ click==8.1.7
codespell==2.3.0
colorama==0.4.6
coverage==7.6.1
craft-application==4.2.6
craft-archives==2.0.0
craft-application==4.2.7
craft-archives==2.0.1
craft-cli==2.7.0
craft-grammar==2.0.1
craft-parts==2.1.2
Expand Down
4 changes: 2 additions & 2 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
craft-application==4.2.6
craft-archives==2.0.0
craft-application==4.2.7
craft-archives==2.0.1
craft-cli==2.7.0
craft-grammar==2.0.1
craft-parts==2.1.2
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ cffi==1.17.1
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
craft-application==4.2.6
craft-archives==2.0.0
craft-application==4.2.7
craft-archives==2.0.1
craft-cli==2.7.0
craft-grammar==2.0.1
craft-parts==2.1.2
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def recursive_data_files(directory, install_directory):
"attrs",
"catkin-pkg; sys_platform == 'linux'",
"click",
"craft-application>=4.2.6,<5.0.0",
"craft-application>=4.2.7,<5.0.0",
"craft-archives~=2.0",
"craft-cli~=2.6",
"craft-grammar>=2.0.1,<3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion snapcraft/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class Component(models.CraftBaseModel):

summary: SummaryStr
description: str
type: Literal["test"]
type: Literal["test", "kernel-modules", "standard"]
version: VersionStr | None = None
hooks: dict[str, Hook] | None = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ systems:

environment:
SNAP/test_variables: test-variables
SNAPCRAFT_PARALLEL_BUILD_COUNT: 5

prepare: |
#shellcheck source=tests/spread/tools/snapcraft-yaml.sh
Expand Down Expand Up @@ -35,7 +36,7 @@ execute: |
"^SNAPCRAFT_PROJECT_GRADE=devel$" \
"^SNAPCRAFT_PROJECT_NAME=variables$" \
"^SNAPCRAFT_PROJECT_VERSION=1$" \
"^SNAPCRAFT_PARALLEL_BUILD_COUNT=[0-9]\+$" \
"^SNAPCRAFT_PARALLEL_BUILD_COUNT=5$" \
"^SNAPCRAFT_PROJECT_DIR=${root}$" \
"^SNAPCRAFT_PART_SRC=${root}/parts/hello/src$" \
"^SNAPCRAFT_PART_SRC_WORK=${root}/parts/hello/src$" \
Expand All @@ -48,7 +49,7 @@ execute: |
"^CRAFT_ARCH_TRIPLET_BUILD_ON=x86_64-linux-gnu$" \
"^CRAFT_ARCH_BUILD_FOR=s390x$" \
"^CRAFT_ARCH_TRIPLET_BUILD_FOR=s390x-linux-gnu$" \
"^CRAFT_PARALLEL_BUILD_COUNT=[0-9]\+$" \
"^CRAFT_PARALLEL_BUILD_COUNT=5$" \
"^CRAFT_PROJECT_DIR=${root}$" \
"^CRAFT_PART_NAME=hello$" \
"^CRAFT_PART_SRC=${root}/parts/hello/src$" \
Expand Down
1 change: 1 addition & 0 deletions tests/spread/core24/package-repositories/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ environment:
SNAP/test_multi_keys: test-multi-keys
SNAP/test_foreign_armhf: test-foreign-armhf
SNAP/test_foreign_i386: test-foreign-i386
SNAP/test_key_conflict: test-key-conflict

prepare: |
# Remove the currently installed "gpg" and "dirmngr" packages to ensure that
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test-key-conflict
version: '1.0'
summary: test package repos with keys already present on the system
description: test package repos with keys already present on the system
confinement: strict
base: core24
platforms:
amd64:

package-repositories:
# In core24+ this pair of url + suite is already listed in
# /etc/apt/sources.list.d/ubuntu.sources. Add it here to make sure this setup
# is working.
- type: apt
url: http://archive.ubuntu.com/ubuntu
suites: [noble]
components: [main, universe]
architectures: [i386]
key-id: F6ECB3762474EDA9D21B7022871920D1991BC93C
key-server: keyserver.ubuntu.com
# This ports.ubuntu.com repo is not affected by the bug, but add it here to
# ensure that a different repo with the same key-id still works.
- type: apt
url: http://ports.ubuntu.com/ubuntu-ports
suites: [noble]
architectures: [armhf]
components: [main]
key-id: F6ECB3762474EDA9D21B7022871920D1991BC93C

parts:
mypart:
plugin: nil
stage-packages:
- zlib1g:i386 # To ensure the package-repo is setup correctly
- zlib1g:armhf
- hello # there is no hello:i386 in the archives

apps:
test-key-conflict:
command: usr/bin/hello -g hello
7 changes: 4 additions & 3 deletions tests/unit/models/test_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -2566,16 +2566,17 @@ def test_components_valid(self, project, project_yaml_data, stub_component_data)

assert test_project.components == components

@pytest.mark.parametrize("component_type", ["test", "kernel-modules", "standard"])
def test_component_type_valid(
self, project, project_yaml_data, stub_component_data
self, component_type, project, project_yaml_data, stub_component_data
):
component = {"foo": stub_component_data}
component["foo"]["type"] = "test"
component["foo"]["type"] = component_type

test_project = project.unmarshal(project_yaml_data(components=component))

assert test_project.components
assert test_project.components["foo"].type == "test"
assert test_project.components["foo"].type == component_type

def test_component_type_invalid(
self, project, project_yaml_data, stub_component_data
Expand Down

0 comments on commit 187187d

Please sign in to comment.