Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KDE: new content pack update. #4403

Merged
merged 28 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3d1cbc9
KDE: new content pack update.
ScarlettGatelyMoore Oct 17, 2023
282a2ec
kde-neon-ext: update content pack in spread test.
ScarlettGatelyMoore Oct 17, 2023
aff579a
Merge branch 'snapcore:main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Oct 19, 2023
1d9a571
Merge branch 'snapcore:main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Oct 19, 2023
f96ddf8
kde-neon: Use non default build snap in test.
ScarlettGatelyMoore Oct 20, 2023
d55369e
Merge branch 'main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Oct 20, 2023
09193d2
New frameworks release.
ScarlettGatelyMoore Oct 27, 2023
0312e78
Merge branch 'snapcore:main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Oct 27, 2023
106b1e6
Merge branch 'snapcore:main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Oct 30, 2023
b552888
Merge branch 'main' into sgmoore/kde-neon-update
sergiusens Nov 13, 2023
e270304
Merge branch 'main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Nov 29, 2023
fa43e2d
Merge branch 'main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Dec 9, 2023
9985152
Fix tests using a default content snap. Only use latest on edge.
ScarlettGatelyMoore Dec 9, 2023
58d8861
Try again...
ScarlettGatelyMoore Dec 9, 2023
ed98708
Try again.
ScarlettGatelyMoore Dec 9, 2023
3365876
Fix spread test for kde-neon
ScarlettGatelyMoore Dec 9, 2023
3406072
Last of it I hope.
ScarlettGatelyMoore Dec 9, 2023
57cfeaf
Fix root snippet and typo.
ScarlettGatelyMoore Dec 10, 2023
7d16d02
Add missing -core22 to root snippet.
ScarlettGatelyMoore Dec 10, 2023
308d6fb
New frameworks release.
ScarlettGatelyMoore Dec 11, 2023
0dde7e2
Merge branch 'snapcore:main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Dec 13, 2023
5e3b7c9
Merge branch 'main' into sgmoore/kde-neon-update
lengau Jan 30, 2024
9aa7606
Merge branch 'main' into sgmoore/kde-neon-update
lengau Feb 5, 2024
43c6ca7
Added support for `webkitgtk2-4.0` and added `GI_TYPELIB_PATH` for gi…
soumyaDghosh Feb 8, 2024
2e4c2d1
Merge branch 'main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Feb 9, 2024
045ccdd
Update spread test kf5 version.
ScarlettGatelyMoore Feb 13, 2024
f46edfd
Merge branch 'main' into sgmoore/kde-neon-update
ScarlettGatelyMoore Feb 13, 2024
08ba312
Merge branch 'main' into sgmoore/kde-neon-update
mr-cal Feb 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 35 additions & 8 deletions snapcraft/extensions/gnome.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,17 @@ def get_root_snippet(self) -> Dict[str, Any]:
}
},
"layout": {
"/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.0": {
"bind": "$SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.0"
"/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.0": {
"bind": (
"$SNAP/gnome-platform/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.0"
)
},
"/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1": {
"bind": (
"$SNAP/gnome-platform/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1"
)
},
"/usr/share/xml/iso-codes": {
"bind": "$SNAP/gnome-platform/usr/share/xml/iso-codes"
Expand Down Expand Up @@ -189,19 +198,25 @@ def get_part_snippet(self, *, plugin_name: str) -> Dict[str, Any]:
"LD_LIBRARY_PATH": prepend_to_env(
"LD_LIBRARY_PATH",
[
f"/snap/{sdk_snap}/current/lib/$CRAFT_ARCH_TRIPLET",
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET",
f"/snap/{sdk_snap}/current/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR",
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR",
f"/snap/{sdk_snap}/current/usr/lib",
f"/snap/{sdk_snap}/current/usr/lib/vala-current",
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET/pulseaudio",
(
f"/snap/{sdk_snap}/current/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/pulseaudio"
),
],
),
},
{
"PKG_CONFIG_PATH": prepend_to_env(
"PKG_CONFIG_PATH",
[
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig",
(
f"/snap/{sdk_snap}/current/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig"
),
f"/snap/{sdk_snap}/current/usr/lib/pkgconfig",
f"/snap/{sdk_snap}/current/usr/share/pkgconfig",
],
Expand All @@ -217,7 +232,7 @@ def get_part_snippet(self, *, plugin_name: str) -> Dict[str, Any]:
},
{
"GDK_PIXBUF_MODULE_FILE": (
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET"
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
"/gdk-pixbuf-current/loaders.cache"
),
},
Expand All @@ -235,11 +250,23 @@ def get_part_snippet(self, *, plugin_name: str) -> Dict[str, Any]:
[
f"/snap/{sdk_snap}/current/usr/lib/python3.10",
f"/snap/{sdk_snap}/current/usr/lib/python3/dist-packages",
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET"
f"/snap/{sdk_snap}/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
"/gobject-introspection",
],
),
},
{
"GI_TYPELIB_PATH": prepend_to_env(
"GI_TYPELIB_PATH",
[
f"/snap/{sdk_snap}/current/usr/lib/girepository-1.0",
(
f"/snap/{sdk_snap}/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/girepository-1.0"
),
],
)
},
],
}

Expand Down
2 changes: 1 addition & 1 deletion snapcraft/extensions/kde_neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from .extension import Extension, get_extensions_data_dir, prepend_to_env

_SDK_SNAP = {"core22": "kf5-5-108-qt-5-15-10-core22-sdk"}
_SDK_SNAP = {"core22": "kf5-5-113-qt-5-15-11-core22-sdk"}


@dataclasses.dataclass
Expand Down
2 changes: 1 addition & 1 deletion tests/spread/extensions/kde-neon/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ execute: |
if [[ "$SPREAD_SYSTEM" =~ ubuntu-20.04 ]]; then
snap list kde-frameworks-5-99-qt-5-15-7-core20
elif [[ "$SPREAD_SYSTEM" =~ ubuntu-22.04 ]]; then
snap list kf5-5-108-qt-5-15-10-core22
snap list kf5-5-111-qt-5-15-11-core22
lengau marked this conversation as resolved.
Show resolved Hide resolved
fi


Expand Down
67 changes: 51 additions & 16 deletions tests/unit/extensions/test_gnome.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,11 @@ def test_get_root_snippet(gnome_extension):
}
},
"layout": {
"/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.0": {
"bind": "$SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.0"
"/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.0": {
"bind": "$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.0"
},
"/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1": {
"bind": "$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1"
},
"/usr/share/xml/iso-codes": {
"bind": "$SNAP/gnome-platform/usr/share/xml/iso-codes"
Expand Down Expand Up @@ -141,8 +144,11 @@ def test_get_root_snippet_with_external_sdk(gnome_extension_with_build_snap):
}
},
"layout": {
"/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.0": {
"bind": "$SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.0"
"/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.0": {
"bind": "$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.0"
},
"/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1": {
"bind": "$SNAP/gnome-platform/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/webkit2gtk-4.1"
},
"/usr/share/xml/iso-codes": {
"bind": "$SNAP/gnome-platform/usr/share/xml/iso-codes"
Expand Down Expand Up @@ -202,19 +208,20 @@ def assert_get_part_snippet(gnome_instance):
{
"LD_LIBRARY_PATH": ":".join(
[
"/snap/gnome-42-2204-sdk/current/lib/$CRAFT_ARCH_TRIPLET",
"/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET",
"/snap/gnome-42-2204-sdk/current/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR",
"/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR",
"/snap/gnome-42-2204-sdk/current/usr/lib",
"/snap/gnome-42-2204-sdk/current/usr/lib/vala-current",
"/snap/gnome-42-2204-sdk/current/usr/lib/"
"$CRAFT_ARCH_TRIPLET/pulseaudio",
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/pulseaudio",
]
)
+ "${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
},
{
"PKG_CONFIG_PATH": (
"/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig:"
"/snap/gnome-42-2204-sdk/current/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig:"
"/snap/gnome-42-2204-sdk/current/usr/lib/pkgconfig:"
"/snap/gnome-42-2204-sdk/current/usr/share/pkgconfig"
"${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
Expand All @@ -228,7 +235,7 @@ def assert_get_part_snippet(gnome_instance):
},
{
"GDK_PIXBUF_MODULE_FILE": (
"/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET"
"/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
"/gdk-pixbuf-current/loaders.cache"
)
},
Expand All @@ -243,12 +250,24 @@ def assert_get_part_snippet(gnome_instance):
[
"/snap/gnome-42-2204-sdk/current/usr/lib/python3.10",
"/snap/gnome-42-2204-sdk/current/usr/lib/python3/dist-packages",
"/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET"
"/snap/gnome-42-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
"/gobject-introspection",
]
)
+ "${PYTHONPATH:+:$PYTHONPATH}"
},
{
"GI_TYPELIB_PATH": ":".join(
[
"/snap/gnome-42-2204-sdk/current/usr/lib/girepository-1.0",
(
"/snap/gnome-42-2204-sdk/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/girepository-1.0"
),
]
)
+ "${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
},
]
}

Expand All @@ -266,18 +285,22 @@ def test_get_part_snippet_with_external_sdk(gnome_extension_with_build_snap):
{
"LD_LIBRARY_PATH": ":".join(
[
"/snap/gnome-44-2204-sdk/current/lib/$CRAFT_ARCH_TRIPLET",
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET",
"/snap/gnome-44-2204-sdk/current/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR",
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR",
"/snap/gnome-44-2204-sdk/current/usr/lib",
"/snap/gnome-44-2204-sdk/current/usr/lib/vala-current",
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/pulseaudio",
(
"/snap/gnome-44-2204-sdk/current/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/pulseaudio"
),
]
)
+ "${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
},
{
"PKG_CONFIG_PATH": (
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET/pkgconfig:"
"/snap/gnome-44-2204-sdk/current/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig:"
"/snap/gnome-44-2204-sdk/current/usr/lib/pkgconfig:"
"/snap/gnome-44-2204-sdk/current/usr/share/pkgconfig"
"${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
Expand All @@ -291,7 +314,7 @@ def test_get_part_snippet_with_external_sdk(gnome_extension_with_build_snap):
},
{
"GDK_PIXBUF_MODULE_FILE": (
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET"
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
"/gdk-pixbuf-current/loaders.cache"
)
},
Expand All @@ -306,12 +329,24 @@ def test_get_part_snippet_with_external_sdk(gnome_extension_with_build_snap):
[
"/snap/gnome-44-2204-sdk/current/usr/lib/python3.10",
"/snap/gnome-44-2204-sdk/current/usr/lib/python3/dist-packages",
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET"
"/snap/gnome-44-2204-sdk/current/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR"
"/gobject-introspection",
]
)
+ "${PYTHONPATH:+:$PYTHONPATH}"
},
{
"GI_TYPELIB_PATH": ":".join(
[
"/snap/gnome-44-2204-sdk/current/usr/lib/girepository-1.0",
(
"/snap/gnome-44-2204-sdk/usr/lib/"
"$CRAFT_ARCH_TRIPLET_BUILD_FOR/girepository-1.0"
),
]
)
+ "${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}"
},
]
}

Expand Down
20 changes: 10 additions & 10 deletions tests/unit/extensions/test_kde_neon.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def kde_neon_extension_with_default_build_snap_from_latest_edge():
"base": "core22",
"parts": {
"part1": {
"build-snaps": ["kf5-5-108-qt-5-15-10-core22-sdk/latest/edge"]
"build-snaps": ["kf5-5-113-qt-5-15-11-core22-sdk/latest/edge"]
}
},
},
Expand Down Expand Up @@ -111,10 +111,10 @@ def test_get_root_snippet(kde_neon_extension):
"target": "$SNAP/data-dir/sounds",
"default-provider": "gtk-common-themes",
},
"kf5-5-108-qt-5-15-10-core22": {
"content": "kf5-5-108-qt-5-15-10-core22-all",
"kf5-5-113-qt-5-15-11-core22": {
"content": "kf5-5-113-qt-5-15-11-core22-all",
"interface": "content",
"default-provider": "kf5-5-108-qt-5-15-10-core22",
"default-provider": "kf5-5-113-qt-5-15-11-core22",
"target": "$SNAP/kf5",
},
},
Expand Down Expand Up @@ -174,19 +174,19 @@ def assert_get_part_snippet(kde_neon_instance):
"build-environment": [
{
"PATH": (
"/snap/kf5-5-108-qt-5-15-10-core22-sdk/current/usr/bin${PATH:+:$PATH}"
"/snap/kf5-5-113-qt-5-15-11-core22-sdk/current/usr/bin${PATH:+:$PATH}"
)
},
{
"XDG_DATA_DIRS": (
"$CRAFT_STAGE/usr/share:/snap/kf5-5-108-qt-5-15-10-core22-sdk"
"$CRAFT_STAGE/usr/share:/snap/kf5-5-113-qt-5-15-11-core22-sdk"
"/current/usr/share:/usr/share${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}"
)
},
{
"SNAPCRAFT_CMAKE_ARGS": (
"-DCMAKE_FIND_ROOT_PATH="
"/snap/kf5-5-108-qt-5-15-10-core22-sdk/current"
"/snap/kf5-5-113-qt-5-15-11-core22-sdk/current"
"${SNAPCRAFT_CMAKE_ARGS:+:$SNAPCRAFT_CMAKE_ARGS}"
)
},
Expand Down Expand Up @@ -227,8 +227,8 @@ def test_get_parts_snippet(kde_neon_extension):
"kde-neon/sdk": {
"source": str(source),
"plugin": "make",
"make-parameters": ["PLATFORM_PLUG=kf5-5-108-qt-5-15-10-core22"],
"build-snaps": ["kf5-5-108-qt-5-15-10-core22-sdk"],
"make-parameters": ["PLATFORM_PLUG=kf5-5-113-qt-5-15-11-core22"],
"build-snaps": ["kf5-5-113-qt-5-15-11-core22-sdk"],
}
}

Expand All @@ -255,7 +255,7 @@ def test_get_parts_snippet_with_external_sdk_different_channel(
"kde-neon/sdk": {
"source": str(source),
"plugin": "make",
"make-parameters": ["PLATFORM_PLUG=kf5-5-108-qt-5-15-10-core22"],
"make-parameters": ["PLATFORM_PLUG=kf5-5-113-qt-5-15-11-core22"],
}
}
)
Loading