Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman: Add data/config/connections persist #6438

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

silver886
Copy link
Contributor

Add the ability to preserve and purge data/config/connections for Podman.

This PR also covered the migration process.

  • Use conventional PR title: <manifest-name[@version]|chore>: <general summary of the pull request>
  • I have read the Contributing Guide

Copy link
Contributor

github-actions bot commented Jan 8, 2025

All changes look good.

Wait for review from human collaborators.

podman

  • Description
  • License
  • Hashes
  • Checkver
  • Autoupdate
  • Autoupdate Hash Extraction

"uninstaller": {
"script": "Remove-Path -Path $dir -TargetEnvVar $scoopPathEnvVar -Global:$global -Force"
},
"env_set": {
"XDG_DATA_HOME": "$dir\\data",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This environment variable will impact numerous other applications. Is there an alternative method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the doc, it is the most elegant way to config.

Or, I can use the method for config persist directory, like L13 and L43-L46, which avoid the use of environment variable XDG_CONFIG_HOME.

I implemented different methods because I'm not sure which is the preferred way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is advisable to avoid using XDG_CONFIG_HOME imo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, now all environment variables start with XDG_ are removed from this PR.

@silver886 silver886 changed the title podman: Add data/config/connectionc persist podman: Add data/config/connections persist Jan 8, 2025
@silver886
Copy link
Contributor Author

@niheaven Is there anything I can do to move this forward?

Also, can you look at the other similar PR at ScoopInstaller/Extras#14697?
They both add persist directories for podman project.

@silver886
Copy link
Contributor Author

@niheaven Is there anything I can do to move this forward? :)

2 similar comments
@silver886
Copy link
Contributor Author

@niheaven Is there anything I can do to move this forward? :)

@silver886
Copy link
Contributor Author

@niheaven Is there anything I can do to move this forward? :)

@niheaven
Copy link
Member

I'll test it today

@niheaven
Copy link
Member

So there's no method to specify podman's data dir except for XDG_DATA_DIR, right? I've search podman's source codes but found nothing...

@niheaven
Copy link
Member

And, is there some method (junction or symbolic link) to link scoop's persist dir to .local/share?

@silver886
Copy link
Contributor Author

So there's no method to specify podman's data dir except for XDG_DATA_DIR, right? I've search podman's source codes but found nothing...

podman puts their storage/config related code in separate repositories.

Ref. https://github.com/containers/storage/blob/main/pkg/homedir/homedir.go#L14
Ref. https://github.com/containers/common/blob/main/pkg/config/connections.go#L19

However, these are not applied for all data/config.

And, is there some method (junction or symbolic link) to link scoop's persist dir to .local/share?

No, this PR doesn't create junction, symbolic link, or any linkage.
Save/load is the primary method to keep all data persist.

There are three persist directories:

@silver886
Copy link
Contributor Author

silver886 commented Jan 28, 2025

I found there's a way to improve install and uninstall stability and I pushed a new commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants