-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
refactor(systemd): rename to kubo #9099
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Needs another pass – we did not rename binary nor any env variable.
See "minimal rename" (#8959).
b4783a9
to
b6a9fcf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am concerned about the side effects here: as noted in #8959 the rule of thumb is to keep changes minimal, avoiding breaking existing users and tutorials that were created in the past 7 years.
Changing binary name, user ang group sound like extremely breaking change, no?
How things will behave for existing users?
We are NOT planning any change of binary name (breaks too many things), so
it makes little sense to rename user groups and other things just for the sake of changing.
Ideally, changes in this PR should be shallow, limited to Description fields.
Mind dialing this down a bit?
Co-authored-by: Marcin Rataj <[email protected]>
Co-authored-by: Marcin Rataj <[email protected]>
c0da3d5
to
0998b9f
Compare
@lidel overall I feel like these changes are not critical in terms of breaking people's setups. The files are mainly meant for package maintainers, not regular users. So if a file changes and the package maintainer likes to keep something in an older "fashion" no one will hinder him. :) Migration from x to y between versions and having scripts do the migrations is pretty common. Here for example is my script to do this for arch as an example. post_upgrade() {
## search for old location of kubo data and move data
if [ -f '/var/lib/ipfs/config' ]; then
daemon_was_running='no'
echo ":: ipfs-to-kubo upgrade: stopping ipfs.service if running..."
if [ $(systemctl is-active --quiet ipfs.service) ]; then
daemon_was_running='yes'
systemctl stop ipfs.service >/dev/null 2>&1 || true
fi
echo ":: moving existing ipfs data from '/var/lib/ipfs/' to '/var/lib/kubo/'..."
mkdir -p /var/lib/kubo
mv /var/lib/ipfs /var/lib/kubo >/dev/null 2>&1 || true
chown kubo: -R /var/lib/kubo/ || true
fi
# in case the daemon was never started, generate a configuration
if [ ! -f /var/lib/kubo/config ]; then
systemctl restart systemd-sysusers.service
mkdir -p /var/lib/kubo/
chown kubo: -R /var/lib/kubo/
su kubo -s /bin/bash -c "export IPFS_PATH='/var/lib/kubo/'; kubo init"
else
if [ $(systemctl is-active --quiet kubo.service) ]; then
daemon_was_running='yes'
systemctl stop kubo.service >/dev/null 2>&1 || true
fi
fi
# do data migration
su kubo -s /bin/bash -c "export IPFS_PATH='/var/lib/kubo/'; kubo repo migrate"
if [ "$daemon_was_running" == 'yes' ]; then
systemctl start kubo.service >/dev/null 2>&1 || true
fi
}
post_install() {
# do every check an upgrade would do
post_upgrade
} |
@lidel maybe we should add an |
@lidel will/is the environmental variable IPFS_PATH also (be) renamed to KUBO_PATH?