Skip to content

Commit

Permalink
Merge branch 'main' into fix-unsquashfs-bug-data-queue-too-large
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-costas authored Nov 27, 2024
2 parents 0dbc432 + 25f4e2c commit 778bdf0
Show file tree
Hide file tree
Showing 6 changed files with 173 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/.sphinx/pinned-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.8
sphinxcontrib-serializinghtml==1.1.10
tornado==6.4.1
tornado==6.4.2
urllib3==1.26.20
100 changes: 100 additions & 0 deletions docs/reference/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,102 @@ Changelog

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

8.5.0 (2024-Nov-19)
-------------------

Core
====

* Remove the Snapcraft Dockerfile in favour of the `snapcraft-rocks`_ registry.
For more information, see the ``docker/README.md`` file.

Bases
#####

core24
""""""

* Add a ``--platform <platform>`` argument to the ``clean`` command to filter
which build environments to clean (`canonical/craft-application#425`_).

Plugins
#######

Poetry
""""""

* Add a new plugin for projects using `Poetry <https://python-poetry.org/>`_.
For more information, see :doc:`Poetry plugin
reference</reference/plugins/poetry_plugin>`.

Extensions
##########

Env-injector
""""""""""""

* Add a new experimental extension called
`env-injector <https://github.com/canonical/snappy-env>`_. It simplifies
passing environment variables to snaps at runtime using ``snap config`` or a
``.env`` file. For more information, see `the env-injector
extension <https://forum.snapcraft.io/t/the-env-injector-extension/41477>`_

Command line
============

* Order lifecycle commands in the sequence they run rather than alphabetically
in help messages.

* Show positional arguments in help messages.

* Hide the terminal cursor when Snapcraft is running.

* Fix a bug where the version and path to the log file were logged multiple
times.

* Fix a bug where deprecated commands were suggested when an invalid command
was entered (`canonical/craft-cli#297`_).

Init
====

* Add a ``<project-dir>`` argument to initialise the project in a particular
directory.

* Add a ``--name <name>`` argument to set the ``name`` key in the initialised
``snapcraft.yaml``. If ``--name`` isn't provided, the name of the project
directory or current working directory is used.

* Add a ``--profile <profile>`` argument to initialise a project for a specific
purpose. Currently, only the ``simple`` profile is supported.

Store
=====

* Add support for ``registries`` with new commands ``list-registries`` and
``edit-registries``.

* Add support for specifying components in a validation set when using the
``edit-validation-sets`` command.

Documentation
=============

* Add :doc:`reference</reference/linters>` for linters.

* Update the ``HACKING`` doc with instructions for how to use ``tox``.

* Hide subheadings in the changelog's table of contents.

* Add :doc:`reference</reference/plugins/poetry_plugin>` for
the Poetry plugin.

* Fix an issue where the auto-generated command reference wasn't rendered
correctly.

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


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

Expand Down Expand Up @@ -1264,12 +1360,15 @@ For a complete list of commits, check out the `8.0.0`_ release on GitHub.
.. _Releases page: https://github.com/canonical/snapcraft/releases
.. _PEP 518: https://peps.python.org/pep-0518/
.. _ROS architectures with snaps: https://ubuntu.com/robotics/docs/ros-architectures-with-snaps.
.. _snapcraft-rocks: https://github.com/canonical/snapcraft-rocks/pkgs/container/snapcraft

.. _canonical/charmcraft#406: https://github.com/canonical/charmcraft/issues/406
.. _canonical/craft-application#225: https://github.com/canonical/craft-application/pull/225
.. _canonical/craft-application#355: https://github.com/canonical/craft-application/pull/355
.. _canonical/craft-application#382: https://github.com/canonical/craft-application/pull/382
.. _canonical/craft-application#425: https://github.com/canonical/craft-application/pull/425
.. _canonical/craft-cli#270: https://github.com/canonical/craft-parts/issues/270
.. _canonical/craft-cli#297: https://github.com/canonical/craft-parts/issues/297
.. _canonical/craft-parts#717: https://github.com/canonical/craft-parts/issues/717
.. _canonical/craft-parts#802: https://github.com/canonical/craft-parts/issues/802
.. _canonical/craft-parts#804: https://github.com/canonical/craft-parts/issues/804
Expand Down Expand Up @@ -1371,3 +1470,4 @@ For a complete list of commits, check out the `8.0.0`_ release on GitHub.
.. _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
.. _8.5.0: https://github.com/canonical/snapcraft/releases/tag/8.5.0
16 changes: 16 additions & 0 deletions snap/local/craft.git
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# Copyright 2024 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 3, as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
# SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.

GIT_EXEC_PATH="${SNAP}/usr/lib/git-core" exec "${SNAP}/usr/lib/git-core/git" "$@"
25 changes: 25 additions & 0 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,31 @@ parts:
stage:
- snapcraft-completion

snapcraft-scripts:
source: snap/local
plugin: dump
organize:
craft.git: libexec/snapcraft/craft.git
stage:
- "libexec/"

git:
plugin: nil
stage-packages: [git]
build-attributes:
- enable-patchelf
prime:
- "usr/lib/git-core"
- "usr/share/git-core"
- "usr/lib/x86_64-linux-gnu/libcurl-gnutls*"
- "usr/lib/x86_64-linux-gnu/libpsl*"
- "usr/lib/x86_64-linux-gnu/librtmp*"
- "usr/lib/x86_64-linux-gnu/libnghttp2*"
- "usr/lib/x86_64-linux-gnu/libldap*"
- "usr/lib/x86_64-linux-gnu/liblber*"
- "usr/lib/x86_64-linux-gnu/libsasl2*"


patchelf:
plugin: autotools
source: https://github.com/canonical/patchelf
Expand Down
23 changes: 23 additions & 0 deletions tests/spread/core24/craftgit/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: craftgit-test
base: core24
version: '0.1'
summary: Echo
description: Just a dummy build to check if craft.git from package works
confinement: strict

parts:
craftgit-test:
plugin: nil
override-pull: |
echo "checking if craft.git from snap is available during pull"
which craft.git | grep "$SNAP/libexec/snapcraft/craft.git"
craft.git clone --depth 1 https://git.launchpad.net/ubuntu/+source/hello
override-build: |
echo "checking if craft.git from snap is available during build"
which craft.git | grep "$SNAP/libexec/snapcraft/craft.git"
override-stage: |
echo "checking if craft.git from snap is available during stage"
which craft.git | grep "$SNAP/libexec/snapcraft/craft.git"
override-prime: |
echo "checking if craft.git from snap is available during prime"
which craft.git | grep "$SNAP/libexec/snapcraft/craft.git"
8 changes: 8 additions & 0 deletions tests/spread/core24/craftgit/task.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
summary: Pack a snap that uses craft.git

restore: |
snapcraft clean
rm -f ./*.snap
execute: |
snapcraft pack

0 comments on commit 778bdf0

Please sign in to comment.