-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add upgrading info to the readme #199
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.
I really do appreciate the presence of the instructions!
Probably I'd look into trimming these instructions to cover only upgrading a "plain normal bog standard Fedora installation". I sense that you might be trying to have automation to make it work, no matter what, possibly limiting upgrade support effort. I do believe, though, that this is just too much and rebalancing this to hold the user more accountable for the current state of this distribution may simplify matters somewhat.
`[ "$(grep -c "^systemd.*=.*true$" /etc/wsl.conf)" -ne 0 ] && sudo sed -i "s/^systemd.*=.*true$/systemd=false/" /etc/wsl.conf && wsl.exe --terminate ${WSL_DISTRO_NAME}` | ||
|
||
```bash | ||
next_version=$(echo "${VERSION_ID}+1" | bc) |
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.
What is the source of VERSION_ID? This is not set for me (but I am on Fedora 38 already)
I also understand the intent on doing the +1, as this matches the Fedora recommendation to always upgrade through versions, but I am also torn between this here and making the user responsible for explicitly entering the correct version. Personally, I'd prefer making the user responsible.
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 forgot to add this line
source /etc/os-release
This defines VERSION_ID
But you are right I'll change it to
next_version=38 #Put the version you want to upgrade to here
#Be sure that systemd is disabled | ||
`[ "$(grep -c "^systemd.*=.*true$" /etc/wsl.conf)" -ne 0 ] && sudo sed -i "s/^systemd.*=.*true$/systemd=false/" /etc/wsl.conf && wsl.exe --terminate ${WSL_DISTRO_NAME}` |
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.
The comment suggests that validation takes place, while in reality the command below will perform a very intrusive reconfiguration of the running system, and terminate it.
Given that systemd is disabled by default in WSL, I'd suggest leaving this as a pre-upgrade validation step and holding those users who actively enabled systemd to also disable it. Detection could be as simple as ps h --ppid 1 | grep systemd
Finally, on my relatively clean Fedora 37 the upgrade in fact worked fine with systemd enabled (and running).
update.sh | ||
sudo dnf -y upgrade --refresh | ||
sudo dnf -y install dnf-plugin-system-upgrade | ||
sudo rpm --import https://src.fedoraproject.org/rpms/fedora-repos/raw/rawhide/f/RPM-GPG-KEY-fedora-${next_version}-primary |
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.
This step depends on how much a user ... tuned ... their nice and shiny and clean Fedora baseline installation.
A baseline Fedora 37 installation will not require this step; anyone who fancied things from rawhide (or other third-party repositories) should be held accountable for their own actions.
I would leave this out from generic instructions.
sudo dnf -y system-upgrade --allowerasing --skip-broken download --releasever=${next_version} | ||
sudo dnf -y system-upgrade reboot | ||
|
||
# At this point, it will raise an error, ignore it, and execute the following commands: |
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 do remember getting an error, too, don't remember the content - but it'd be really helpful, IMHO, if the error message could be replicated here.
sudo dnf -y install dnf-plugin-system-upgrade | ||
sudo rpm --import https://src.fedoraproject.org/rpms/fedora-repos/raw/rawhide/f/RPM-GPG-KEY-fedora-${next_version}-primary | ||
sudo dnf -y install distribution-gpg-keys | ||
sudo dnf -y system-upgrade --allowerasing --skip-broken download --releasever=${next_version} |
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 appreciate why --allowerasing
and --skip-broken
are present, but this is the "blind application of sledgehammer" approach to "making it work, whatever"
From my point of view, there are two scenarios which can lead to these flags being required
- the Fedora distro upgrade process is broken - this most likely will be fixed by Fedora, eventually
- the user did funny things
I'd hold accountable the user for figuring this situation out, and I'd not add these two flags by default.
# At this point, it will raise an error, ignore it, and execute the following commands: | ||
|
||
sudo dnf -y system-upgrade upgrade | ||
sudo dnf -y autoremove |
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.
autoremove
is not part of any official instructions that I have seen - and it's something that I don't really like myself (so for me it's always dnf remove --noautoremove
).
With that command, you rely on perfect packaging (of all dependencies) - if that is not perfect, a working system might get damaged.
I'd leave this out.
|
||
sudo dnf -y system-upgrade upgrade | ||
sudo dnf -y autoremove | ||
sudo dnf -y clean all |
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.
Not required IMHO, it "just" saves disk space.
sudo dnf -y system-upgrade upgrade | ||
sudo dnf -y autoremove | ||
sudo dnf -y clean all | ||
sudo mandb |
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.
Why is this required? Doesn't this happen automatically / in the background?
sudo mandb | ||
update.sh | ||
cat /etc/fedora-release | ||
exit |
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.
Why exit
? To trigger a "reboot"?
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.
Well, there is no reboot in the WSL version from I just saw going through the steps.
No description provided.