https://bugs.dragonflybsd.org/https://bugs.dragonflybsd.org/favicon.ico?16293952082019-07-13T23:16:59ZDragonFlyBSD bugtrackerDragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137522019-07-13T23:16:59Ztse
<ul><li><strong>File</strong> <i>upgrade</i> added</li></ul><p>Hiya,</p>
<p>I realize this is quite a simple script, and possibly misses useful features (?). Originally posted to @users, but mailing list line-wraping didn't keep the script fully intact, so copy/paste/test wouldn't of worked</p>
<p>Also, the response on DragonFly Digest encouraged me re-post it here</p>
<p>I've tested it on new installs of 4.8, 5.2, and 5.4, and with installs previously upgraded with `make src-create/src-create-shallow`</p>
<p>It takes this: <br />------</p>
<blockquote>
<p>cd /usr <br />make src-create <br />... <br />make buildworld <br />make buildkernel <br />... <br />make upgrade</p>
</blockquote>
<hr />
<p>To this: <br />------</p>
<blockquote>
<p>/usr/upgrade</p>
</blockquote>
<p>Upgrading DragonFly BSD</p>
<p>For more information see: <br />`man build` `man config` <br />/usr/src/README /usr/src/UPDATING <br /><a class="external" href="http://www.dragonflybsd.org/docs/handbook/">http://www.dragonflybsd.org/docs/handbook/</a></p>
<p>It is possible to run this script without root privileges <br />Usage: upgrade [configuration] <br />Configuration is "X86_64_GENERIC"</p>
<p>Latest releases: <br />[1] DragonFly_RELEASE_5_6 <br />[2] DragonFly_RELEASE_5_4 <br />[3] DragonFly_RELEASE_5_2 <br />[4] DragonFly_RELEASE_5_0 <br />[5] DragonFly_RELEASE_4_8</p>
<p>Select [1-5]: <br />------</p>
<p>Note: I thankfully just did some retesting, and 'git fetch --depth=1' made git think HEAD was diverged since it didn't have the history to recognize even a single new commit. I've changed the script to do 'git checkout -B RELEASE origin/RELEASE' which should fix the issue, but I will retest DragonFly 4.8 on Monday, since sometimes those flags are not back-compatible</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137532019-07-13T23:18:46Ztse
<ul><li><strong>File</strong> deleted (<del><i>upgrade</i></del>)</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137542019-07-14T21:18:54Ztse
<ul><li><strong>File</strong> deleted (<del><i>upgrade</i></del>)</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137552019-07-14T21:20:06Ztse
<ul><li><strong>File</strong> <i>upgrade</i> added</li></ul><p>4.8 looks good to me. Feel free to re-download and try it out</p>
<p>Notes:<br />The script uses 'fetch depth=1' which reduces the initial download by ~250MB. But developers who want full history can do '/usr/upgrade; cd /usr/src; git fetch --unshallow', and sort their own lives out -- so I didn't think it was worth adding to the script as a flag...</p>
<p>If the user aborts the script in the middle of checkout, they may like to just delete /usr/src and try again. So I've added a warning to that effect</p>
<p>I realize this mini-script is unsolicited, and could easily be unwanted for many reasons. That's fine</p>
<p>My thoughts are in the future to maybe look at memory compression / malloc latency / auto configuring wifi. But these really are just thoughts, and not something for this summer</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137632019-07-28T22:58:26Zjustin
<ul></ul><p>tse wrote:</p>
<blockquote>
<p>4.8 looks good to me. Feel free to re-download and try it out</p>
</blockquote>
<p>I am not sure how to describe this exactly, but I'm thinking it would be better as an action - upgrade --release for the current release version, 'upgrade --bleedingedge' or similar for HEAD. Kitchen sink scripts that handle maintenance are good but they tend to grow and then collapse under their weight.</p>
<p>I may be overthinking this.</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137642019-07-29T10:42:12Ztse
<ul></ul><p>You're right, some people will want HEAD, and seeing @yellowrabbit do a commit bisect, a one liner upgrade to named commit would also be nice</p>
<p>I wanted to avoid required flags, so people don't have to re-look them up, but an optional flag like [ -r HEAD | COMMIT | RELEASE ] would make the script more automatable, so maybe something like:</p>
<p>/usr/upgrade [-r release] [configuration]<br />Configuration is "X86_64_GENERIC" <br />Select a release:<br /> [1] DragonFly_RELEASE_5_6<br /> [2] DragonFly_RELEASE_5_4<br /> [_] Enter a specific commit like HEAD or abcdef123</p>
<p>If people don't pass a [ -r RELEASE ], then the script will give the release options to select from</p>
<p>Would something like that be what you're after?</p>
<blockquote>
<p>Kitchen sink scripts that handle maintenance are good but they tend to grow and then collapse under their weight.</p>
</blockquote>
<p>Agreed</p>
<p>This script partly replicates the functionality in /usr/Makefile. Should it totally replicate the functionality (dports-create, dports-download), so the Makefile can be removed? Or should that functionality be retained elsewhere -- it's not something I've used before</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137652019-07-30T16:21:24Zjustin
<ul></ul><p>tse wrote:</p>
<blockquote>
<p>If people don't pass a [ -r RELEASE ], then the script will give the release options to select from</p>
</blockquote>
<p>Let's go even simpler - if a branch isn't named, as either RELEASE, HEAD, or (Git commit ID), assume that it's an update of whatever branch is currently in place. No menus or choices needed.</p>
<blockquote>
<p>This script partly replicates the functionality in /usr/Makefile. Should it totally replicate the functionality (dports-create, dports-download), so the Makefile can be removed? Or should that functionality be retained elsewhere -- it's not something I've used before</p>
</blockquote>
<p>In a perfect world, we'd have this all under the same interface - 'make (whatever)' would do the appropriate actions. People are very used to having the make function work, so I'm leery of removing that functionality... but on the other hand, I am not the one doing all the work. Do what you would enjoy working on and let's see what other people think.</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137662019-07-30T23:37:07Ztse
<ul><li><strong>File</strong> <i>upgrade2</i> added</li></ul><p>Yup, lets leave the Makefile</p>
<blockquote>
<p>Let's go even simpler - if a branch isn't named, as either RELEASE, HEAD, or (Git commit ID), assume that it's an update of whatever branch is currently in place. No menus or choices needed.</p>
</blockquote>
<p>For myself personally, I stay on the latest stable release, so I want upgrades to always change the branch 5.4 -> 5.6 -> ... I had basically finished some changes when I got your message (+ a long break for another test install). They give us the latest stable branch with `/usr/upgrade -r 1`. And the prior stable branch with '-r 2'. For the bleeding edge, people can get that with `/usr/upgrade -r 4`, or a specific commit with `/usr/upgrade -r abcdef123`. Maybe the bleeding edge should be '-r 0', but I currently placed it lower so people don't assume it's the first and best option....</p>
<p>Let me at least upload that script (upgrade2)</p>
<p>I agree that people on the bleeding edge only ever want to upgrade their current branch so then a no-branch-change default would be best; but for stable branch users it would just give them a long wait that looks like an upgrade and tells them to reboot etc</p>
<p>Currently if '-r' is specified then there are no menus or choices, which I think is a nice balance. Maybe '-r 4' should move to '-r 0'</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137672019-07-30T23:50:03Ztse
<ul></ul><p>Or something like '-r stable' and '-r unstable' would be easy to add</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137692019-07-31T16:43:55Ztse
<ul><li><strong>File</strong> <i>upgrade3</i> added</li></ul><p>Hiya,</p>
<p>I think this gives you what you asked for:</p>
<p>Upgrading to HEAD can be equally done with '-r 0' or '-r unstable' or even '-r master' and '-r 273ce6e304'<br />Upgrading to the latest release can be done with '-r 1' '-r stable' or even '-r DragonFly_RELEASE_5_6' and '-r e2b890'</p>
<p>So the user can select a relative number, an absolute named branch, a specific commit, or even the bonus phrases of 'stable/unstable'</p>
<p>Feel free to change the wording or anything else; or ask for any changes. I haven't re-tested older dfly versions, but seems good on 5.6</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137722019-08-06T20:32:09Zjustin
<ul></ul><p>tse wrote:</p>
<blockquote>
<p>Feel free to change the wording or anything else; or ask for any changes.</p>
</blockquote>
<p>This works well - I imagine 95% of the use cases are going to be "upgrade within current version" or "move to next release" so I want that to be as little guesswork as possible.</p>
<p>I'm going to be on the road for a little while yet - part of the reason for my slow responses. I won't be able to try this out... maybe I can gin up some testers.</p> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137752019-08-09T05:23:12Ztse
<ul><li><strong>File</strong> deleted (<del><i>upgrade</i></del>)</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137762019-08-09T05:23:18Ztse
<ul><li><strong>File</strong> deleted (<del><i>upgrade2</i></del>)</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137772019-08-09T05:23:49Ztse
<ul><li><strong>File</strong> <i>upgrade</i> added</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=137782019-08-09T05:23:58Ztse
<ul><li><strong>File</strong> deleted (<del><i>upgrade3</i></del>)</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=138582020-02-29T14:58:06Ztse
<ul><li><strong>File</strong> <a href="/attachments/1622">upgrade</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1622/upgrade">upgrade</a> added</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=138592020-02-29T14:58:42Ztse
<ul><li><strong>File</strong> deleted (<del><i>upgrade</i></del>)</li></ul> DragonFlyBSD - Bug #3197: DragonFly upgradeshttps://bugs.dragonflybsd.org/issues/3197?journal_id=138792020-04-18T23:18:13Ztse
<ul><li><strong>File</strong> <a href="/attachments/1630">upgrade</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1630/upgrade">upgrade</a> added</li></ul><p>Make sure user has options when network offline</p>