[MIR] platformdirs

Bug #2057683 reported by James Page
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
platformdirs (Ubuntu)
Fix Released
High
Unassigned

Bug Description

[Availability]
The package platformdirs is already in Ubuntu universe.
The package platformdirs build for the architectures it is designed to work on (any).
It currently builds and works for architectures: OK
Link to package https://launchpad.net/ubuntu/+source/platformdirs

[Rationale]
The package platformdirs is a new runtime dependency of package python-openstacksdk that we already support

The package platformdirs is required in Ubuntu main no later than Final Freeze as its required for the 24.04 LTS release.

[Security]
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=platformdirs
site:www.openwall.com/lists/oss-security
https://ubuntu.com/security/cves?package=platformdirs
https://security-tracker.debian.org/tracker/source-package/platformdirs
- No CVEs/security issues in this software in the past

- no `suid` or `sgid` binaries
- no executables in `/sbin` and `/usr/sbin`
- Package does not install services, timers or recurring jobs
- Packages does not open privileged ports (ports < 1024).
- Package does not expose any external endpoints
- Packages does not contain extensions to security-sensitive software
  (filters, scanners, plugins, UI skins, ...)

[Quality assurance - function/usage]
- The package works well right after install

[Quality assurance - maintenance]
- The package is maintained well in Debian/Ubuntu/Upstream and does
  not have too many, long-term & critical, open bugs
- Ubuntu https://bugs.launchpad.net/ubuntu/+source/platformdirs/+bug
- Debian https://bugs.debian.org/cgi-bin/pkgreport.cgi?src=platformdirs
- Upstream's bug tracker https://github.com/platformdirs/platformdirs/issues

[Quality assurance - testing]
- The package runs a test suite on build time, if it fails
  it makes the build fail, link to build log TBD
- The package runs an autopkgtest, and is currently passing on
  all architectures, link to test logs: https://autopkgtest.ubuntu.com/packages/platformdirs
- The package does have not failing autopkgtests right now

[Quality assurance - packaging]
- debian/watch is present and works
- debian/control defines a correct Maintainer field

- This package does not yield massive lintian Warnings, Errors
- Please link to a recent build log of the package - https://launchpadlibrarian.net/712733449/buildlog_ubuntu-noble-amd64.platformdirs_4.2.0-1_BUILDING.txt.gz
- Lintian overrides are not present

- This package does not rely on obsolete or about to be demoted packages.
- This package has no python2 or GTK2 dependencies
- The package will not be installed by default
- Packaging and build is easy, (bare pybuild in rules only)

[UI standards]
- Application is not end-user facing (does not need translation)

[Dependencies]
- No further depends or recommends dependencies that are not yet in main

[Standards compliance]
- This package correctly follows FHS and Debian Policy

[Maintenance/Owner]
- The owning team will be ubuntu-openstack and I have their acknowledgement that commitment
- The future owning team is not yet subscribed, but will subscribe to
  the package before promotion

- This does not use static builds
- This does not use vendored code
- This package is not rust based
- The package has been built in the archive more recently than the last
  test rebuild

[Background information]
The Package description explains the package well
Upstream Name is platformdirs
Link to upstream project https://github.com/platformdirs/platformdirs

Tags: noble
James Page (james-page)
description: updated
Changed in platformdirs (Ubuntu):
assignee: nobody → James Page (james-page)
James Page (james-page)
description: updated
description: updated
James Page (james-page)
description: updated
description: updated
description: updated
James Page (james-page)
description: updated
description: updated
Changed in platformdirs (Ubuntu):
status: Incomplete → New
assignee: James Page (james-page) → nobody
importance: Undecided → High
milestone: none → ubuntu-24.04-beta
Changed in platformdirs (Ubuntu):
assignee: nobody → Christian Ehrhardt  (paelzer)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Download full text (5.6 KiB)

Review for Source Package: platformdirs

This goes a bit of an unusual way ...

[Rationale, Duplication and Ownership]
First of all, what does platformdirs do, according to its description
and interfaces:
 Depending on your system (Linux, Mac OS X, or Windows), you have to use
 different directories for storing user data. platformdirs will help you choose
 an appropriate:
 .
  * user data directory (user_data_dir function)
  * user config directory (user_config_dir function)
  * user cache directory (user_cache_dir function)
  * site data directory (site_data_dir function)
  * site config directory (site_config_dir function)
  * user log directory (user_log_dir function)

According to my, surely incomplete, research I quickly identified two
alternatives that seem to be the most common use cases for this.
1. There is python3-xdg which is a bit more Desktop centric, but implements
   https://specifications.freedesktop.org/basedir-spec/latest/
   And yes - it is in main already :-/
   In doing so it provides ability to load the following paths
   xdg_data_home, xdg_data_dirs, xdg_config_home, xdg_config_dirs,
   xdg_cache_home, xdg_state_home and therefore provides almost the same.
   Although it seems not to be a in-place alternative and using it
   might be quite some effort depending on how it is used from openstack code.
2. Even more interesting seems python3-appdirs
   It is more popular by usage counts, by project forks and all that
   and yes - it is also in main already :-/
   But it is suspiciously close in what it does
   appdirs will help you choose an appropriate:
    * user data dir (user_data_dir)
    * user config dir (user_config_dir)
    * user cache dir (user_cache_dir)
    * site data dir (site_data_dir)
    * site config dir (site_config_dir)
    * user log dir (user_log_dir)
   And with that being too close to be an accident I found this:

   Note: This project has been officially deprecated. You may want to
   check out https://pypi.org/project/platformdirs/ which is a more active
   fork of appdirs. Thanks to everyone who has used appdirs.

And on the platformdirs side I found:
   This repository is a friendly fork of the wonderful work started by
   ActiveState who created appdirs, this package's ancestor.
   Maintaining an open source project is no easy task, particularly from
   within an organization, and the Python community is indebted to appdirs
   (and to Trent Mick and Jeff Rouse in particular) for creating an incredibly
   useful simple module, as evidenced by the wide number of users it has
   attracted over the years.
   Nonetheless, given the number of long-standing open issues and pull
   requests, and no clear path towards ensuring that maintenance of the
   package would continue or grow, this fork was created.

So in regard to our usual check, yes there is other software in main providing
the same functionality - python3-appdirs.
But the python3-platformdirs that you suggested is the better alternative.
It is the same code but evolving.

On one hand, that means that this MIR is much easier.

I can skip the rest of the review here ...
It is essentially a continuation of bug 1464165 which brought appdirs in....

Read more...

Revision history for this message
James Page (james-page) wrote :

Working on the handful of migrations in main under the openstack package set.

os-client-config does not actually depend on appdirs - fix uploaded
openstacksdk migrated already - dependency dropped, fix uploaded
ironicclient - review submitted upstream - patched version uploaded.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

James did all the uploads AFAIK, once they are all in proposed or migrated things can be pro-/dem-moted. Changing states accordingly to reflect that this is ready.

Changed in platformdirs (Ubuntu):
assignee: Christian Ehrhardt  (paelzer) → nobody
status: New → Fix Committed
Revision history for this message
James Page (james-page) wrote :

Thanks for the prompt review @paelzer!

Revision history for this message
Steve Langasek (vorlon) wrote :

Override component to main
platformdirs 4.2.0-1 in noble: universe/misc -> main
python3-platformdirs 4.2.0-1 in noble amd64: universe/python/optional/100% -> main
python3-platformdirs 4.2.0-1 in noble arm64: universe/python/optional/100% -> main
python3-platformdirs 4.2.0-1 in noble armhf: universe/python/optional/100% -> main
python3-platformdirs 4.2.0-1 in noble i386: universe/python/optional/100% -> main
python3-platformdirs 4.2.0-1 in noble ppc64el: universe/python/optional/100% -> main
python3-platformdirs 4.2.0-1 in noble riscv64: universe/python/optional/100% -> main
python3-platformdirs 4.2.0-1 in noble s390x: universe/python/optional/100% -> main
8 publications overridden.

Changed in platformdirs (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.