Skip to content

Commit

Permalink
chore: merge hotfix 8.2 into main (#4786)
Browse files Browse the repository at this point in the history
- [ ] Have you followed the [guidelines for
contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)?
- [ ] Have you signed the
[CLA](http://www.ubuntu.com/legal/contributors/)?
- [ ] Have you successfully run `tox run -m lint`?
- [ ] Have you successfully run `tox run -e test-py310`? (supported
versions: `py39`, `py310`, `py311`, `py312`)

-----
  • Loading branch information
cmatsuoka authored May 3, 2024
2 parents 77057c2 + adbea43 commit b390058
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
craft-application==2.6.2
craft-application==2.6.3
craft-archives==1.1.3
craft-cli==2.5.1
craft-grammar==1.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements-devel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ click==8.1.7
codespell==2.2.6
colorama==0.4.6
coverage==7.4.4
craft-application==2.6.2
craft-application==2.6.3
craft-archives==1.1.3
craft-cli==2.5.1
craft-grammar==1.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
craft-application==2.6.2
craft-application==2.6.3
craft-archives==1.1.3
craft-cli==2.5.1
craft-grammar==1.2.0
Expand Down
4 changes: 4 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ assumes:
environment:
PATH: "$SNAP/libexec/snapcraft:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
LD_LIBRARY_PATH: "$SNAP/none"
# cryptography>=42.0 cannot load legacy algorithms on
# Ubuntu 20.04 for armhf, ppc64el, riscv64, and s390x
CRYPTOGRAPHY_OPENSSL_NO_LEGACY: "1"


apps:
snapcraft:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ parts:
stage-packages:
- test-ppa
- puppet-tools-release # Comes from the Puppet repo
override-build: |
craftctl default
# This file comes from the puppet-tools-release package.
test -f ${CRAFT_PART_INSTALL}/usr/share/doc/puppet-tools-release/bill-of-materials

apps:
test-ppa:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ grade: devel
confinement: strict
base: core24

platforms:
s390x:
build-on: amd64
build-for: s390x

parts:
hello:
plugin: nil
Expand Down
16 changes: 14 additions & 2 deletions tests/spread/core24-suites/environment/test-variables/task.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
summary: Test scriptlets variables on core24

# limit to amd64 for BUILD_ON variables
systems:
- ubuntu-24.04
- ubuntu-24.04-64
- ubuntu-24.04-amd64

environment:
SNAP/test_variables: test-variables

Expand Down Expand Up @@ -38,6 +44,10 @@ execute: |
"^SNAPCRAFT_PART_INSTALL=${root}/parts/hello/install$" \
"^SNAPCRAFT_STAGE=${root}/stage$" \
"^SNAPCRAFT_PRIME=${root}/prime$" \
"^CRAFT_ARCH_BUILD_ON=amd64$" \
"^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_PROJECT_DIR=${root}$" \
"^CRAFT_PART_NAME=hello$" \
Expand All @@ -52,10 +62,12 @@ execute: |
done
}
snapcraft pull
# exercise lifecycle commands with and without `--platform` and `--build-for`
snapcraft pull --platform s390x
check_vars pull.txt
snapcraft build
snapcraft build --build-for s390x
check_vars build.txt
snapcraft stage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,6 @@ parts:
build-snaps: [core24, gtk-common-themes, gnome-46-2404/latest/edge]
override-prime: |
set -eux
for snap in "core24" "gtk-common-themes" "gnome-42-2204"; do
for snap in "core24" "gtk-common-themes" "gnome-46-2404"; do
cd "/snap/$snap/current" && find . -type f,l -name *.so.* -exec rm -f "$CRAFT_PRIME/{}" \;
done
15 changes: 7 additions & 8 deletions tests/spread/core24/linters-pack/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ restore: |
execute: |
cd "${SNAP}"
# Remove this once library-gnome works (it will probably fail
# on the diff check.
if ! snapcraft pack 2> output.txt && [ "${SNAP}" = library-gnome ]; then
exit 0
fi
snapcraft pack 2> output.txt
test -f linter-test_0.1_*.snap
test -f linter-test_*.snap
sed -n '/^Running linters/,/^Creating snap/p' < output.txt > linter_output.txt
diff -u linter_output.txt expected_linter_output.txt
# linter for gnome snap is not working as-expected (#4751)
if [ "${SNAP}" != "library-gnome" ]; then
sed -n '/^Running linters/,/^Creating snap/p' < output.txt > linter_output.txt
diff -u linter_output.txt expected_linter_output.txt
fi
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ parts:
stage-packages:
- test-ppa
- puppet-tools-release # Comes from the Puppet repo
override-build: |
craftctl default
# This file comes from the puppet-tools-release package.
test -f ${CRAFT_PART_INSTALL}/usr/share/doc/puppet-tools-release/bill-of-materials

apps:
test-multi-keys:
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/commands/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -658,11 +658,11 @@ def test_build_for_error(
"craft_application.services.remotebuild.RemoteBuildService.start_builds"
)
app = application.create_app()
assert app.run() == 78
assert app.run() == 1

_, err = capsys.readouterr()

assert "build-for 'nonexistent' is not supported." in err
assert "Architecture 'nonexistent' is not supported." in err


########################
Expand Down

0 comments on commit b390058

Please sign in to comment.