From d0db11154f886f0476a011b72d40543b1fdfecf0 Mon Sep 17 00:00:00 2001 From: David Wilding Date: Fri, 13 Feb 2026 11:44:11 +0800 Subject: [PATCH 1/5] bump passwd version and add warning to docstring --- lib/charms/operator_libs_linux/v0/passwd.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/charms/operator_libs_linux/v0/passwd.py b/lib/charms/operator_libs_linux/v0/passwd.py index 7eb83b28..a1153a86 100644 --- a/lib/charms/operator_libs_linux/v0/passwd.py +++ b/lib/charms/operator_libs_linux/v0/passwd.py @@ -12,7 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Simple library for managing Linux users and groups. +"""Legacy Charmhub-hosted passwd library, deprecated in favour of ``charmlibs.passwd``. + +WARNING: This library is deprecated and will no longer receive feature updates or bugfixes. +``charmlibs.passwd`` version 1.0 is a bug-for-bug compatible migration of this library. +Add 'charmlibs-passwd~=1.0' to your charm's dependencies, and remove this Charmhub-hosted library. +Then replace `from charms.operator_libs_linux.v0 import passwd` with +`from charmlibs import passwd`. +Read more: +- https://documentation.ubuntu.com/charmlibs +- https://pypi.org/project/charmlibs-passwd + +--- + +Simple library for managing Linux users and groups. The `passwd` module provides convenience methods and abstractions around users and groups on a Linux system, in order to make adding and managing users and groups easy. @@ -45,7 +58,7 @@ # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 4 +LIBPATCH = 5 def user_exists(user: Union[str, int]) -> Optional[pwd.struct_passwd]: From a7934aadd0d0820a0cd1d6f87534875da86163eb Mon Sep 17 00:00:00 2001 From: David Wilding Date: Fri, 13 Feb 2026 11:46:14 +0800 Subject: [PATCH 2/5] bump systemd version and add warning to docstring --- lib/charms/operator_libs_linux/v1/systemd.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/charms/operator_libs_linux/v1/systemd.py b/lib/charms/operator_libs_linux/v1/systemd.py index cdcbad6a..ea9e6f58 100644 --- a/lib/charms/operator_libs_linux/v1/systemd.py +++ b/lib/charms/operator_libs_linux/v1/systemd.py @@ -13,7 +13,20 @@ # limitations under the License. -"""Abstractions for stopping, starting and managing system services via systemd. +"""Legacy Charmhub-hosted systemd library, deprecated in favour of ``charmlibs.systemd``. + +WARNING: This library is deprecated and will no longer receive feature updates or bugfixes. +``charmlibs.systemd`` version 1.0 is a bug-for-bug compatible migration of this library. +Add 'charmlibs-systemd~=1.0' to your charm's dependencies, and remove this Charmhub-hosted library. +Then replace `from charms.operator_libs_linux.v0 import systemd` with +`from charmlibs import systemd`. +Read more: +- https://documentation.ubuntu.com/charmlibs +- https://pypi.org/project/charmlibs-systemd + +--- + +Abstractions for stopping, starting and managing system services via systemd. This library assumes that your charm is running on a platform that uses systemd. E.g., Centos 7 or later, Ubuntu Xenial (16.04) or later. @@ -64,7 +77,7 @@ # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 4 +LIBPATCH = 5 class SystemdError(Exception): From 2dea11a745bc7458e978261ab1bb2be2646b89c5 Mon Sep 17 00:00:00 2001 From: David Wilding Date: Fri, 13 Feb 2026 11:52:44 +0800 Subject: [PATCH 3/5] bump sysctl version and add warning to docstring --- lib/charms/operator_libs_linux/v0/sysctl.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/charms/operator_libs_linux/v0/sysctl.py b/lib/charms/operator_libs_linux/v0/sysctl.py index 34cb97be..45dbf8a0 100644 --- a/lib/charms/operator_libs_linux/v0/sysctl.py +++ b/lib/charms/operator_libs_linux/v0/sysctl.py @@ -12,7 +12,20 @@ # See the License for the specific language governing permissions and # limitations under the License. -"""Handler for the sysctl config. +"""Legacy Charmhub-hosted sysctl library, deprecated in favour of ``charmlibs.sysctl``. + +WARNING: This library is deprecated and will no longer receive feature updates or bugfixes. +``charmlibs.sysctl`` version 1.0 is a bug-for-bug compatible migration of this library. +Add 'charmlibs-sysctl~=1.0' to your charm's dependencies, and remove this Charmhub-hosted library. +Then replace `from charms.operator_libs_linux.v0 import sysctl` with +`from charmlibs import sysctl`. +Read more: +- https://documentation.ubuntu.com/charmlibs +- https://pypi.org/project/charmlibs-sysctl + +--- + +Handler for the sysctl config. This library allows your charm to create and configure sysctl options to the machine. @@ -84,7 +97,7 @@ def _on_remove(self, _): # Increment this PATCH version before using `charmcraft publish-lib` or reset # to 0 if you are raising the major API version -LIBPATCH = 4 +LIBPATCH = 5 CHARM_FILENAME_PREFIX = "90-juju-" SYSCTL_DIRECTORY = Path("/etc/sysctl.d") From b54378c773b31396e3930bbd8bd939778b9851b2 Mon Sep 17 00:00:00 2001 From: David Wilding Date: Fri, 13 Feb 2026 12:01:27 +0800 Subject: [PATCH 4/5] add deprecation warning to README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e0897b81..9079b420 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,14 @@ ![Release Libraries](https://github.com/canonical/operator-libs-linux/actions/workflows/release-libs.yaml/badge.svg) ![Release to Charmhub](https://github.com/canonical/operator-libs-linux/actions/workflows/release.yaml/badge.svg) +> [!WARNING] +> This libraries provided by this charm are deprecated and will no longer receive feature updates or bugfixes. Some of the libraries have been migrated to packages in the `charmlibs` monorepo: +> - [apt](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/apt/) +> - [passwd](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/passwd/) +> - [snap](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/snap/) +> - [sysctl](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/sysctl/) +> - [systemd](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/systemd/) + ## Description The `operator-libs-linux` charm provides a set of [charm libraries] which can be used for managing and manipulating Debian packages, [snap packages], system repositories, users and groups, and other operations From 7326ba1bcee0bf4d9ac7064b77460ba3e6e17c88 Mon Sep 17 00:00:00 2001 From: David Wilding Date: Fri, 13 Feb 2026 12:02:19 +0800 Subject: [PATCH 5/5] adjust warning in README --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9079b420..3522e47c 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,10 @@ ![Release to Charmhub](https://github.com/canonical/operator-libs-linux/actions/workflows/release.yaml/badge.svg) > [!WARNING] -> This libraries provided by this charm are deprecated and will no longer receive feature updates or bugfixes. Some of the libraries have been migrated to packages in the `charmlibs` monorepo: +> The libraries provided by this charm are deprecated and will no longer receive feature updates or bugfixes. +> +> Some of the libraries have been migrated to packages in the `charmlibs` monorepo: +> > - [apt](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/apt/) > - [passwd](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/passwd/) > - [snap](https://documentation.ubuntu.com/charmlibs/reference/charmlibs/snap/)