-
Notifications
You must be signed in to change notification settings - Fork 145
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
etcupdate: beta version #790
Conversation
Add subcommand "etcupdate" This will simply use the built in "bootstrap" command to bootstrap the "src" version of a release, then create a tarball for it ONCE. This tarball is then used to update (includes dry run) a specifie jail to a specified RELEASE version of etc.
uses built in etcupdate which is installed by default on freebsd. This version is cleaner than 660. I think this method should be adopted over 660 which kind of recreated the wheel. |
My jail is named
Considering I had to add things into
And the same thing happened.
Any quick way to get a more verbose output? I'm not sure if I'm doing anything wrong. All the above is run as root.
My only guess, which I suppose I will go ahead and try, is that perhaps the jail should be stopped first. |
Need to bootstrap first. bastille etcupdate bootstrap RELEASE |
I know this style of "debugging" is probably annoying, but I don't know how to proceed further. I just get this:
|
Can you add "set -x" to the start of the etcupdate file? |
I actually don't know the intended way to run the master branch. I realized that while I was running the Anyway, I added
Despite the above not being too interesting to me, digging further, there's this:
Hopefully I'm adding this quickly enough. Sorry for the edit:
The source dir is empty. I bootstrapped 14.2-RELEASE, but I wonder if on the previous version of bastille, it didn't pull the |
That was totally my bad. I had made a booboo. Try again. |
This bootstraps src on its own for you. |
First, this seems to be a successful implementation, but it does raise questions. Reading through
I mention the above because I question whether it's true. Is there a separate list of conflicts somewhere? The conflicting files appear to be unaltered. It says the following about
I don't see file versions saved with conflict markers. Should I? I had several files marked with a
I didn't find conflict markers in any of these files. As far as I can tell, those marked with a Follow-up: should there be an option to run the command a second time in Separately, it could be worthwhile to specify a separate logfile for each jail. The only log I see is 4,558 lines, and that's just the bootstrap. I don't see a log for the etcupdate on the jail. All I see is what printed to the console. |
Logs should be in /var/db/etcupdate inside each jail. Yes we could add a "resolve" mode. This is just beta to see if it will satisfy a basic etcupdate. |
Yep, sure enough everything was where you said. This is great. I look forward to seeing if other testers find anything noteworthy. Thank you. |
have we added a resolve mode to this? What else is missing that is in #660 ?? |
It hasn't been added. I'll look into it. It's just a switch inside the built in etcupdate command. |
@scoobybejesus I've added a resolve mode. Syntax has changed slightly. It is now So after the jail name comes the command "update or resolve" then the RELEASE. Can you test? Also, I've addes a [-f|--force] mode that will re-bootstrap. This will be helpful when doing updates to the patch level of a RELEASE and wanting to create a new tarball. |
Added a diff mode also in case someone would like to compare the current tree with what the jails tree looks like. |
works as long as your jail name is text. I have a jail named 134 and it will not update it. |
This is working well for me. A couple comments:
Quickly, here's a quick how-to:
|
|
Forgive me for treading what might already be common ground to many. Consider the two following scenarios:
Versus
In both cases, the final output is identical:
Observation: the I had intended to recommend that in the For a newly bootstrapped release:
Or for an existing release that has been or will be updated with patches, force a fresh bootstrap:
I intended to ask whether Now I find myself wondering if |
I already answered that for myself. src.txz is indeed identical, so I kept the -f out of there at least. I'm curious whether /usr/src changes after an update or upgrade of a release? |
After deleting/destroying the directories/datasets for 14.1-RELEASE and setting `bastille_bootstrap_archives="base src", I checked:
Between steps 2 and 4, the files in |
So it seems src stays the same for each major version then. Interesting. |
It seems the original files at release time are what stick around for the duration of the release, and patches are applied on top. And it seems no patches are applied to src/, which leads me to believe the intended use would be to initialize it as a git directory and then git pull the upstream changes. I wonder the extent to which that would be doable and/or desirable. In any event, it seems like something that could be added later. Though it would be nice to figure it out now. |
It's nice to at least have the option to force create a new tarball if (in any case) src gets updated. |
@scoobybejesus @tschettervictor I have tested this as is. Is there anything additional to do on this one? Have you both tested this well??? Especially @scoobybejesus. Want to get this merged to main since it didn't make the release. |
No issues on my end. |
Only thing missing is validating the release names, but Bastille bootstrap already does that for us. |
tested by @scoobybejesus @tschettervictor and myself. Works flawlessly doing what it is supposed to. |
Add subcommand "etcupdate"
This will simply use the built in "bootstrap" command to bootstrap the "src" version of a release, then create a tarball for it ONCE. This tarball is then used to update (includes dry run) a specifie jail to a specified RELEASE version of etc.
To test.
(make sure its a higher version than the jail)
Confirm the etc files updated properly and the resolve mode works as expected.
Logs are inside the jail at /var/db/etcupdate