From 495834e3de6be05be961a0bc664d29e14f4110f7 Mon Sep 17 00:00:00 2001 From: Callahan Kovacs Date: Wed, 22 Jul 2026 07:45:23 -0500 Subject: [PATCH 1/4] build(deps): point craft-application to dev branch Signed-off-by: Callahan Kovacs --- pyproject.toml | 2 +- uv.lock | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6e28a99223..0b4444b932 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ dynamic = ["version"] dependencies = [ "catkin-pkg==1.1.0; sys_platform == 'linux'", "click>=8.3.3", - "craft-application[remote]>=7.1.0", + "craft-application[remote] @ git+https://github.com/canonical/craft-application@work/CRAFT-5237/pro-docs", "craft-archives>=2.2.0", "craft-cli>=3.4.0", "craft-grammar>=2.3.0", diff --git a/uv.lock b/uv.lock index b492b47291..b4ebe56037 100644 --- a/uv.lock +++ b/uv.lock @@ -491,8 +491,8 @@ toml = [ [[package]] name = "craft-application" -version = "7.1.0" -source = { registry = "https://pypi.org/simple" } +version = "7.1.0.post21+gd7f5f5e" +source = { git = "https://github.com/canonical/craft-application?rev=work%2FCRAFT-5237%2Fpro-docs#d7f5f5e6b55a99e46d0bcd172ad0816d9ca84e35" } dependencies = [ { name = "annotated-types" }, { name = "craft-archives" }, @@ -513,10 +513,6 @@ dependencies = [ { name = "snap-http" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/6b/c3/be96c01c1b92a7a7eb6cafa881ccd09a6b9e1db1355835fc98f001680cc3/craft_application-7.1.0.tar.gz", hash = "sha256:e0a3fb2080bf1dd6daf8b570262716f79a5f307a87d3ed2b986eaca50e07efed", size = 663202, upload-time = "2026-07-07T22:02:40.491Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/eb/ce/169bdacdfbda0fe8a880d914be0794fc5379b7ec577546444f1572f4762d/craft_application-7.1.0-py3-none-any.whl", hash = "sha256:3319310644d1d935fd7e2fb285fa38bc87c490f3d4fb72fed934e6202164b7bc", size = 212571, upload-time = "2026-07-07T22:02:38.317Z" }, -] [package.optional-dependencies] remote = [ @@ -2519,7 +2515,7 @@ types = [ requires-dist = [ { name = "catkin-pkg", marker = "sys_platform == 'linux'", specifier = "==1.1.0" }, { name = "click", specifier = ">=8.3.3" }, - { name = "craft-application", extras = ["remote"], specifier = ">=7.1.0" }, + { name = "craft-application", extras = ["remote"], git = "https://github.com/canonical/craft-application?rev=work%2FCRAFT-5237%2Fpro-docs" }, { name = "craft-archives", specifier = ">=2.2.0" }, { name = "craft-cli", specifier = ">=3.4.0" }, { name = "craft-grammar", specifier = ">=2.3.0" }, From 8772b47ece96e546dcbd008294a1c998f7a19966 Mon Sep 17 00:00:00 2001 From: Callahan Kovacs Date: Wed, 22 Jul 2026 11:27:46 -0500 Subject: [PATCH 2/4] docs: add a "pack a Pro snap" how-to Signed-off-by: Callahan Kovacs --- docs/.custom_wordlist.txt | 1 + docs/how-to/crafting/index.rst | 2 + docs/how-to/crafting/pack-a-pro-snap.rst | 78 ++++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 docs/how-to/crafting/pack-a-pro-snap.rst diff --git a/docs/.custom_wordlist.txt b/docs/.custom_wordlist.txt index f0c8560387..9630a161ce 100644 --- a/docs/.custom_wordlist.txt +++ b/docs/.custom_wordlist.txt @@ -50,6 +50,7 @@ dvipng drwxr-xr-x drwxrwxrwx emacs +enablement FIGlet Filesets? filetrees? diff --git a/docs/how-to/crafting/index.rst b/docs/how-to/crafting/index.rst index f983e99227..7ce0c0593e 100644 --- a/docs/how-to/crafting/index.rst +++ b/docs/how-to/crafting/index.rst @@ -22,6 +22,7 @@ Software dependencies Much of the work of making a snap is in determining and adding its dependencies. - :ref:`how-to-manage-dependencies` +- :ref:`how-to-pack-a-pro-snap` User settings and data @@ -70,6 +71,7 @@ with APT. specify-a-base select-platforms manage-dependencies + pack-a-pro-snap add-a-snap-configuration use-layouts manage-data-compatibility diff --git a/docs/how-to/crafting/pack-a-pro-snap.rst b/docs/how-to/crafting/pack-a-pro-snap.rst new file mode 100644 index 0000000000..9884f8b7f6 --- /dev/null +++ b/docs/how-to/crafting/pack-a-pro-snap.rst @@ -0,0 +1,78 @@ +.. |app| replace:: Snapcraft +.. |app-command| replace:: snapcraft +.. |artifact| replace:: snap +.. |an-artifact| replace:: a snap +.. |app-min-pro-version| replace:: 9.1 +.. |app-link| replace:: https://snapcraft.io/snapcraft + +.. _how-to-pack-a-pro-snap: + +.. include:: ../../common/craft-application/how-to-guides/pack-a-pro-artifact.rst + :end-before: .. Split point for downstream docs: Prerequisites onward + +Core24 and higher +~~~~~~~~~~~~~~~~~~~ + +.. include:: ../../common/craft-application/how-to-guides/pack-a-pro-artifact.rst + :start-after: .. Split point for downstream docs: Prerequisites onward + +Core22 +~~~~~~~ + +Core22 snaps use a legacy mechanism to pack Pro-compliant snaps. As a result, it uses +the previous name UA (Ubuntu Advantage) instead of Ubuntu Pro. + +Prerequisites +------------- + +- An Ubuntu Pro token (https://ubuntu.com/pro) + +Identify the required Pro services +---------------------------------- + +First, determine which Pro services fit your needs: + +- ``esm-apps`` or ``esm-infra``: If your goal is to pack a snap for an application + and include the latest security patches for a base that is no longer under Standard + Security Maintenance. +- ``fips``, ``fips-updates`` or ``fips-preview``: If you need to deploy a snap in a + highly regulated environment that processes sensitive data. + +The desired Pro services must be available. On a system with your Pro token +attached, run ``pro status`` and check the ``ENTITLED`` column for available +services. The Ubuntu Pro Client documentation has `further information +`__ on +each service. + +To enable the desired Pro services when building your snap, add a ua-services key to +your project file: + +.. code-block:: yaml + :caption: snapcraft.yaml + + ua-services: + - esm-apps + - esm-infra + +Pack the snap +------------- + +Now you can pack the snap with the desired services by passing the Pro token: + +.. code-block:: bash + :substitutions: + + snapcraft pack --ua-token --enable-experimental-ua-services + +The Pro token can also be provided as an environment variable: + +.. code-block:: bash + :substitutions: + + SNAPCRAFT_UA_TOKEN= snapcraft pack --enable-experimental-ua-services + +As Pro enablement is an experimental feature, ``--enable-experimental-ua-services`` is +needed in either case. + +Snapcraft will automatically attach the Pro subscription and enable the requested +services in the build environment while packing the snap. From ffb2c985566bdfcb2dc2a4f1a082c7dca0e8585f Mon Sep 17 00:00:00 2001 From: Callahan Kovacs Date: Thu, 23 Jul 2026 11:57:39 -0500 Subject: [PATCH 3/4] docs: feedback from PR Signed-off-by: Callahan Kovacs --- docs/how-to/crafting/index.rst | 2 +- docs/how-to/crafting/pack-a-pro-snap.rst | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/docs/how-to/crafting/index.rst b/docs/how-to/crafting/index.rst index 7ce0c0593e..744785caaf 100644 --- a/docs/how-to/crafting/index.rst +++ b/docs/how-to/crafting/index.rst @@ -71,7 +71,6 @@ with APT. specify-a-base select-platforms manage-dependencies - pack-a-pro-snap add-a-snap-configuration use-layouts manage-data-compatibility @@ -80,3 +79,4 @@ with APT. reuse-packages-between-builds create-a-component enable-classic-confinement + pack-a-pro-snap diff --git a/docs/how-to/crafting/pack-a-pro-snap.rst b/docs/how-to/crafting/pack-a-pro-snap.rst index 9884f8b7f6..fcca056b92 100644 --- a/docs/how-to/crafting/pack-a-pro-snap.rst +++ b/docs/how-to/crafting/pack-a-pro-snap.rst @@ -1,3 +1,6 @@ +.. meta:: + :description: Pack a snap that contains extended security patches or meets regulatory compliance needs, powered by Ubuntu Pro. + .. |app| replace:: Snapcraft .. |app-command| replace:: snapcraft .. |artifact| replace:: snap @@ -7,20 +10,24 @@ .. _how-to-pack-a-pro-snap: +Pack a Pro-compliant snap +========================= + .. include:: ../../common/craft-application/how-to-guides/pack-a-pro-artifact.rst - :end-before: .. Split point for downstream docs: Prerequisites onward + :start-after: .. Begin overview + :end-before: .. End overview Core24 and higher ~~~~~~~~~~~~~~~~~~~ .. include:: ../../common/craft-application/how-to-guides/pack-a-pro-artifact.rst - :start-after: .. Split point for downstream docs: Prerequisites onward + :start-after: .. End overview Core22 ~~~~~~~ -Core22 snaps use a legacy mechanism to pack Pro-compliant snaps. As a result, it uses -the previous name UA (Ubuntu Advantage) instead of Ubuntu Pro. +Core22 snaps use a legacy mechanism to pack Pro-compliant snaps. The mechanism uses the +term *Ubuntu Advantage* (UA) instead of *Ubuntu Pro*. Prerequisites ------------- @@ -40,12 +47,10 @@ First, determine which Pro services fit your needs: The desired Pro services must be available. On a system with your Pro token attached, run ``pro status`` and check the ``ENTITLED`` column for available -services. The Ubuntu Pro Client documentation has `further information -`__ on -each service. +services. The Ubuntu Pro Client documentation has `detailed information on each service +`__. -To enable the desired Pro services when building your snap, add a ua-services key to -your project file: +Add a ``ua-services`` key to your snap, and list the services: .. code-block:: yaml :caption: snapcraft.yaml From 6f6f3556af27182331e701583b914d62c8a2f898 Mon Sep 17 00:00:00 2001 From: Callahan Kovacs Date: Thu, 23 Jul 2026 12:20:13 -0500 Subject: [PATCH 4/4] build(deps): point craft-application to dev branch Signed-off-by: Callahan Kovacs --- uv.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uv.lock b/uv.lock index b4ebe56037..828d23ea96 100644 --- a/uv.lock +++ b/uv.lock @@ -491,8 +491,8 @@ toml = [ [[package]] name = "craft-application" -version = "7.1.0.post21+gd7f5f5e" -source = { git = "https://github.com/canonical/craft-application?rev=work%2FCRAFT-5237%2Fpro-docs#d7f5f5e6b55a99e46d0bcd172ad0816d9ca84e35" } +version = "7.1.0.post24+g9e89e3a" +source = { git = "https://github.com/canonical/craft-application?rev=work%2FCRAFT-5237%2Fpro-docs#9e89e3a116c2772508fa16b2ef888a2a04926c4e" } dependencies = [ { name = "annotated-types" }, { name = "craft-archives" },