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

feat(providers): use core24 buildd daily image for devel #4532

Merged
merged 9 commits into from
Feb 13, 2024
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/providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"core18": bases.BuilddBaseAlias.BIONIC,
"core20": bases.BuilddBaseAlias.FOCAL,
"core22": bases.BuilddBaseAlias.JAMMY,
"core24": bases.BuilddBaseAlias.DEVEL,
"core24": bases.BuilddBaseAlias.NOBLE,
"devel": bases.BuilddBaseAlias.DEVEL,
}

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
Loading