uupdate thread:

uupdate thread:
156 Replies
j0rge
j0rgeOP3mo ago
j0rge
j0rgeOP3mo ago
I didn't know about bootc-fetch-apply-updates.service
tulip🌷
tulip🌷3mo ago
oh!!! nice!!! we can just use it instead for bootc if it would be better
j0rge
j0rgeOP3mo ago
yeah that's what I was thinking
tulip🌷
tulip🌷3mo ago
oh. we cant use it bootc update --apply reboots the system right away
j0rge
j0rgeOP3mo ago
ah
tulip🌷
tulip🌷3mo ago
No description
tulip🌷
tulip🌷3mo ago
yup :(
j0rge
j0rgeOP3mo ago
oh well
tulip🌷
tulip🌷3mo ago
that sucks it would be so good to have it
j0rge
j0rgeOP3mo ago
these docs are updated, I've learned a ton of things tonight
tulip🌷
tulip🌷3mo ago
the fedora docs? they are looking pretty nice!
bsherman
bsherman3mo ago
these new bootc docs are looking good
RealDishwash
RealDishwash3mo ago
Is the plan to use systemd soft reboot in the future?
tulip🌷
tulip🌷3mo ago
yup! at least for bootc update --apply its a TON faster
j0rge
j0rgeOP4w ago
@Kyle Gospo so uupd's been rocking and rolling, are you still on ublue-update on bazzite? @Gerblesh it's been a while so thought I'd bring up the convo again since f42 work will start soon https://github.com/containers/bootc/pull/956/files also in progress bootc update timer thing I thought I should mention hey so do we have the bits from ublue-update about not upgrading when below a certain battery threshold and all that?
Gerblesh
Gerblesh4w ago
yeah
j0rge
j0rgeOP4w ago
I wasn't able to figure that out
Gerblesh
Gerblesh4w ago
that's all through dbus now iirc
j0rge
j0rgeOP4w ago
oh ok awesome, so it has feature parity, nothing missing? oh that's so baller.
Gerblesh
Gerblesh4w ago
only thing that's missing is configuration, so you can't have it update anything besides what's already in the program which tbh works for me
j0rge
j0rgeOP4w ago
alright so we had it on achillobator since the holidays and there have been zero issues this is really nice!
tulip🌷
tulip🌷4w ago
its been working crazy good
Gerblesh
Gerblesh4w ago
no errors? Awesome!
tulip🌷
tulip🌷4w ago
literally no issues with it
tulip🌷
tulip🌷4w ago
@Gerblesh
No description
tulip🌷
tulip🌷4w ago
just updated my vm with it 😭
j0rge
j0rgeOP4w ago
since it is a critical component it'd be nice to get some eyes on the code. @bketelsen you got any time to lend your go eyeballs?
tulip🌷
tulip🌷4w ago
true damn
j0rge
j0rgeOP4w ago
I'm hoping we can get it in bazzite testing and let it bake there
tulip🌷
tulip🌷4w ago
its made to be the most boring program ever so its most likely gonna be fine
j0rge
j0rgeOP4w ago
or unstable or whatever
Gerblesh
Gerblesh4w ago
the only thing I have think of that isn't feature parity is the decky loader CSS themes won't be updated with uupd
tulip🌷
tulip🌷4w ago
i really think we should not add anything else to it
j0rge
j0rgeOP4w ago
it jsut means the ujust in bazzite will call topgrade after
tulip🌷
tulip🌷4w ago
true
j0rge
j0rgeOP4w ago
yeah let's not reinvent topgrade, we are leaving topgrade on the image anyway so people can nerd out
Gerblesh
Gerblesh4w ago
yeah, I'm also kinda apprehensive about auto updating the CSS
j0rge
j0rgeOP4w ago
I am apprehensive about updating anything else than what you've enabled lol.
Gerblesh
Gerblesh4w ago
true we probably also need to update the KCM module for settings to use the new service or maybe ship it in the RPM for uupd?
tulip🌷
tulip🌷4w ago
keep it simple resist the bloat demons
Gerblesh
Gerblesh4w ago
nvm, that would be kinda silly, not everyone has KDE installed
j0rge
j0rgeOP4w ago
what is KCM?
tulip🌷
tulip🌷4w ago
KDE configuration module that thing that @ledif was making
j0rge
j0rgeOP4w ago
omg omg, dad joke incoming: "That's Kyle's Kproblem" hahahahahah
RealDishwash
RealDishwash4w ago
You can add your own pages to KDE settings Very cool
j0rge
j0rgeOP4w ago
yeah I wish I had that in gnome that's awesome.
Gerblesh
Gerblesh4w ago
can we do that with GNOME? oh
tulip🌷
tulip🌷4w ago
gotta fork gnome settings to have that
RealDishwash
RealDishwash4w ago
tulip🌷
tulip🌷4w ago
we can... but its not.... good....
j0rge
j0rgeOP4w ago
sure we can, if you learn C AND raw GTK hahahaha
Gerblesh
Gerblesh4w ago
we can try to maintain a simple gnome shell extension
j0rge
j0rgeOP4w ago
the toggling of updates with ujust will need to be fixed
Gerblesh
Gerblesh4w ago
that would just be some JS
j0rge
j0rgeOP4w ago
yeah but then someone is like
tulip🌷
tulip🌷4w ago
thats gonna be jank
j0rge
j0rgeOP4w ago
"I need my dx button in there" I need this, I need that.
tulip🌷
tulip🌷4w ago
true 😭
Gerblesh
Gerblesh4w ago
true, but DX is going away soon right?
tulip🌷
tulip🌷4w ago
i hope so probably wont
j0rge
j0rgeOP4w ago
What I am choosing to do seems to be the laziest way. It's only a matter of time before some rust nerd makes a new configuration applet that is way better someone makes another mission center that replaces a core app with something way better.
Gerblesh
Gerblesh4w ago
lol
tulip🌷
tulip🌷4w ago
just like souk is doin
j0rge
j0rgeOP4w ago
I want souk more badly than anything lol it's like seeing the death star trench but it's not your turn, we gotta make another pass but I can SEE the goal...
tulip🌷
tulip🌷4w ago
we making the year of the linux desktop a reality with this one 🗣🗣🗣🔥🔥🥶🥶
Gerblesh
Gerblesh4w ago
souk?
tulip🌷
tulip🌷4w ago
man you need to check it out GNOME software but so much better
tulip🌷
tulip🌷4w ago
GitHub
GitHub - ublue-os/souk: Working for of souk, staging area for upstr...
Working for of souk, staging area for upstream contributions - ublue-os/souk
tulip🌷
tulip🌷4w ago
we forked it
Gerblesh
Gerblesh4w ago
I see
bketelsen
bketelsen4w ago
@j0rge making time for a quick scan now
ledif
ledif4w ago
I just like showing this off 🙃
No description
tulip🌷
tulip🌷4w ago
be proud! you did an amazing job with it it looks great too
bketelsen
bketelsen4w ago
@Gerblesh @tulip🌷 this code is beautiful. clean, concise, well written. No glaring problems. I'll try to make a small PR soon with tiny style changes, but there's nothing I can find at a quick glance that makes me nervous at all. Very well done
tulip🌷
tulip🌷4w ago
LES GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO @j0rge
Gerblesh
Gerblesh4w ago
huge props to tulip for cleaning things up a good deal
j0rge
j0rgeOP4w ago
No description
Kyle Gospo
Kyle Gospo4w ago
Thank you for reminding me, I need to buy a copy for my bookshelf
j0rge
j0rgeOP3w ago
alright switching bluefin @Gerblesh can you do a maintenance release or something so we can exercise the build loop?
tulip🌷
tulip🌷3w ago
@inffy @RealDishwash @ledif
inffy
inffy3w ago
wazzup
tulip🌷
tulip🌷3w ago
we switched to uupd on the fin
j0rge
j0rgeOP3w ago
or we will once we get some green hahahah
inffy
inffy3w ago
🫡 I have the PR on aurora. was there any updates the past few days?
j0rge
j0rgeOP3w ago
I think it's just time, it's working great in lts and it's one more thing we can get rid of plus it gives us a clean seperation between that and topgrade
inffy
inffy3w ago
yeah has been working fine on my VM
j0rge
j0rgeOP3w ago
@Kyle Gospo in here
Kyle Gospo
Kyle Gospo3w ago
No description
Kyle Gospo
Kyle Gospo3w ago
@j0rge this is ujust update Exact same syntax that you just shipped in bluefin It's also what bazzite users would see via the desktop system update icon This looks terrible, even to me it looks like my updates are broken
j0rge
j0rgeOP3w ago
cc @tulip ok drafting the PR, I've not seen this output before
tulip🌷
tulip🌷3w ago
oh damn??? it just broke trying to use rpm-ostree in this case they indeed are broken do you mind sending me the entire output?
Kyle Gospo
Kyle Gospo3w ago
That is the entire output Just stopped there
tulip🌷
tulip🌷3w ago
@Gerblesh crap
antheas
antheas3w ago
this output only a mother could love i think was his point
Kyle Gospo
Kyle Gospo3w ago
Ah well, I'll roll this back for now Old stuff works fine
tulip🌷
tulip🌷3w ago
i dont even know how it got this json output 😭
Gerblesh
Gerblesh3w ago
uh oh, is this uupd?
tulip🌷
tulip🌷3w ago
yup
antheas
antheas3w ago
needs to be prettier and something my mother could understand
tulip🌷
tulip🌷3w ago
with layered packages on the rpm-ostree module
antheas
antheas3w ago
not that my mother would use a terminal
Gerblesh
Gerblesh3w ago
alright I can try to fix things later, I'm pretty busy currently though
Kyle Gospo
Kyle Gospo3w ago
Well in this case the update icon on the desktop that previously opened the terminal that ended in a nice friendly quit or restart message is launching this, so it does need to be something your mother would understand
antheas
antheas3w ago
"its just json mother"
tulip🌷
tulip🌷3w ago
it shoudlnt be outputting all this bs
antheas
antheas3w ago
Gerblesh
Gerblesh3w ago
oh I see what's going on here @tulip I there must've been some confusion when moving around the update code for rpm-ostree, an error is returned when an update isn't available
tulip🌷
tulip🌷3w ago
oh LOL
Gerblesh
Gerblesh3w ago
yeah error code 77 rpm-ostree is weird
tulip🌷
tulip🌷3w ago
the json output being displayed is still a big issue tho LOL we gotta have some way to quieten it
Gerblesh
Gerblesh3w ago
it's debug like when you run with the debug flag you get everything
tulip🌷
tulip🌷3w ago
true LOL but like we might want command output not-on-the-debug flag i think its like a single line change i can PR it if you cant rn
Gerblesh
Gerblesh3w ago
oh I fixed it
tulip🌷
tulip🌷3w ago
hell yeah
Gerblesh
Gerblesh3w ago
func (up RpmOstreeUpdater) Check() (bool, error) {
if up.Config.DryRun {
return true, nil
}

// This function may or may not be accurate, rpm-ostree updgrade --check has issues... https://github.com/coreos/rpm-ostree/issues/1579
// Not worried because we will end up removing rpm-ostree from the equation soon
cmd := exec.Command(up.BinaryPath, "upgrade", "--check")
out, err := cmd.CombinedOutput()
if err != nil {
if cmd.ProcessState.ExitCode() == 77 {
// No update, exit code 77
return true, nil
}
return true, err
}

updateNecessary := strings.Contains(string(out), "AvailableUpdate")
up.Config.Logger.Debug("Executed update check", slog.String("output", string(out)), slog.Bool("update", updateNecessary))
return updateNecessary, nil
}
func (up RpmOstreeUpdater) Check() (bool, error) {
if up.Config.DryRun {
return true, nil
}

// This function may or may not be accurate, rpm-ostree updgrade --check has issues... https://github.com/coreos/rpm-ostree/issues/1579
// Not worried because we will end up removing rpm-ostree from the equation soon
cmd := exec.Command(up.BinaryPath, "upgrade", "--check")
out, err := cmd.CombinedOutput()
if err != nil {
if cmd.ProcessState.ExitCode() == 77 {
// No update, exit code 77
return true, nil
}
return true, err
}

updateNecessary := strings.Contains(string(out), "AvailableUpdate")
up.Config.Logger.Debug("Executed update check", slog.String("output", string(out)), slog.Bool("update", updateNecessary))
return updateNecessary, nil
}
just checking for exit code 77
tulip🌷
tulip🌷3w ago
yup!!!
Gerblesh
Gerblesh3w ago
I'll add some more debug logs
tulip🌷
tulip🌷3w ago
also, about the interactivity - what you think we can do about it? the output is just not friendly and it probably cant be too friendly hmmm
j0rge
j0rgeOP3w ago
yeah we need the bootc status in there
Gerblesh
Gerblesh3w ago
I'm working on that too hold on I'm having issues though, here's what I currently have:
package main

import (
"bufio"
"fmt"
"log"
"os"
"os/exec"
)

func main() {
log.SetFlags(0)
// Ignore the error here lol
r, w, err := os.Pipe()
if err != nil {
log.Fatalf("Error creating pipe: %v", err)
}

defer r.Close()

cmd := exec.Command("sudo", "/usr/bin/bootc", "upgrade", fmt.Sprintf("--progress-fd=%d", w.Fd))
log.Printf("File descriptor: %d", w.Fd)
cmd.ExtraFiles = []*os.File{w}

// CLOSE THE FD BEFORE BAD
err = cmd.Start()
if err != nil {
log.Fatalf("Failed to start cmd: %v", err)
}

w.Close()
go func() {
s := bufio.NewScanner(r)
for s.Scan() {
log.Println(s.Text())
}
err := s.Err()
if err != nil {
log.Fatalf("Error reading from pipe: %v", err)
}
}()

err = cmd.Wait()

if err != nil {
log.Println(cmd.Stdout)
log.Fatalf("Command errored: %v", err)
}
}
package main

import (
"bufio"
"fmt"
"log"
"os"
"os/exec"
)

func main() {
log.SetFlags(0)
// Ignore the error here lol
r, w, err := os.Pipe()
if err != nil {
log.Fatalf("Error creating pipe: %v", err)
}

defer r.Close()

cmd := exec.Command("sudo", "/usr/bin/bootc", "upgrade", fmt.Sprintf("--progress-fd=%d", w.Fd))
log.Printf("File descriptor: %d", w.Fd)
cmd.ExtraFiles = []*os.File{w}

// CLOSE THE FD BEFORE BAD
err = cmd.Start()
if err != nil {
log.Fatalf("Failed to start cmd: %v", err)
}

w.Close()
go func() {
s := bufio.NewScanner(r)
for s.Scan() {
log.Println(s.Text())
}
err := s.Err()
if err != nil {
log.Fatalf("Error reading from pipe: %v", err)
}
}()

err = cmd.Wait()

if err != nil {
log.Println(cmd.Stdout)
log.Fatalf("Command errored: %v", err)
}
}
tulip🌷
tulip🌷3w ago
its kinda hard cuz bootc seems to hide the fancy stuff when you run it as a subprocess YO?
Gerblesh
Gerblesh3w ago
yeah it says broken pipe not sure how best to fix this? are there changes in git that fixes it? I'm using 1.1.4
tulip🌷
tulip🌷3w ago
it doesnt seem to have the --progress-fd option even now apparently
Gerblesh
Gerblesh3w ago
oh it exists, it's just not in --help
tulip🌷
tulip🌷3w ago
oh it does have it! nice! @antheas dont you use that for the fancy hhd upgrade thing? maybe you know what is going on?
Gerblesh
Gerblesh3w ago
are you able to figure out what's broken? Antheas has an example in python here: https://github.com/hhd-dev/hhd/blob/master/src/hhd/plugins/bootc/__init__.py
GitHub
hhd/src/hhd/plugins/bootc/init.py at master · hhd-dev/hhd
Handheld Daemon, a tool for configuring handheld devices. - hhd-dev/hhd
tulip🌷
tulip🌷3w ago
you are closing the thing before its used how are you gonna read from it?
Gerblesh
Gerblesh3w ago
it still errors
tulip🌷
tulip🌷3w ago
i think the run + log code has some good example for that actually
Gerblesh
Gerblesh3w ago
go func() {
s := bufio.NewScanner(r)
for s.Scan() {
log.Println(s.Text())
}
err := s.Err()
if err != nil {
log.Fatalf("Error reading from pipe: %v", err)
}
}()
go func() {
s := bufio.NewScanner(r)
for s.Scan() {
log.Println(s.Text())
}
err := s.Err()
if err != nil {
log.Fatalf("Error reading from pipe: %v", err)
}
}()
this should do that
tulip🌷
tulip🌷3w ago
@Gerblesh try doing it just like this but with the pipe apparently
Gerblesh
Gerblesh3w ago
yeah this is basically the same thing
tulip🌷
tulip🌷3w ago
but it doesnt use the concurrency thing go func()
Gerblesh
Gerblesh3w ago
concurrency shouldn't be affecting things
tulip🌷
tulip🌷3w ago
lets just see! it probably is affecting things
Gerblesh
Gerblesh3w ago
shoot
tulip🌷
tulip🌷3w ago
hmm?
Gerblesh
Gerblesh3w ago
I think I closed the r file descriptor too early with the defer possibly? idk it should be waiting
tulip🌷
tulip🌷3w ago
just remove the close to see what happens LOL
Gerblesh
Gerblesh3w ago
I still don't see anything atm nah I removed the goroutine
tulip🌷
tulip🌷3w ago
mind sending me a patch?
Gerblesh
Gerblesh3w ago
now it just freezes
tulip🌷
tulip🌷3w ago
wanna test it out locally
Gerblesh
Gerblesh3w ago
package main

import (
"bufio"
"fmt"
"log"
"os"
"os/exec"
)

func main() {
log.SetFlags(0)
r, w, err := os.Pipe()
if err != nil {
log.Fatalf("Error creating pipe: %v", err)
}

defer r.Close()
defer w.Close()

cmd := exec.Command("sudo", "/usr/bin/bootc", "upgrade", fmt.Sprintf("--progress-fd=%d", w.Fd))
log.Printf("File descriptor: %d", w.Fd)
cmd.ExtraFiles = []*os.File{w}

err = cmd.Start()
if err != nil {
log.Fatalf("Failed to start cmd: %v", err)
}
scanner := bufio.NewScanner(r)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
log.Printf("%s", scanner.Text())
}
if err := cmd.Wait(); err != nil {
log.Printf("Error waiting for command: %v", err)
}
err = cmd.Wait()

if err != nil {
log.Println(cmd.Stdout)
log.Fatalf("Command errored: %v", err)
}
}
package main

import (
"bufio"
"fmt"
"log"
"os"
"os/exec"
)

func main() {
log.SetFlags(0)
r, w, err := os.Pipe()
if err != nil {
log.Fatalf("Error creating pipe: %v", err)
}

defer r.Close()
defer w.Close()

cmd := exec.Command("sudo", "/usr/bin/bootc", "upgrade", fmt.Sprintf("--progress-fd=%d", w.Fd))
log.Printf("File descriptor: %d", w.Fd)
cmd.ExtraFiles = []*os.File{w}

err = cmd.Start()
if err != nil {
log.Fatalf("Failed to start cmd: %v", err)
}
scanner := bufio.NewScanner(r)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
log.Printf("%s", scanner.Text())
}
if err := cmd.Wait(); err != nil {
log.Printf("Error waiting for command: %v", err)
}
err = cmd.Wait()

if err != nil {
log.Println(cmd.Stdout)
log.Fatalf("Command errored: %v", err)
}
}
tulip🌷
tulip🌷3w ago
oh - you arent on uupd at all? aight lemme check it out
Gerblesh
Gerblesh3w ago
yeah I'm just testing things seperately before putting it in
tulip🌷
tulip🌷3w ago
fair!
Gerblesh
Gerblesh3w ago
@tulip any progress? I'll upstream the fix for the 77 exit code
tulip🌷
tulip🌷3w ago
just a sec, debugging nvidia drivers rn 😭
Gerblesh
Gerblesh3w ago
GitHub
fix: account for error code 77 in rpm-ostree driver by gerblesh · P...
this fixes the update checking for error code 77 from rpm-ostree driver (no update available)
Gerblesh
Gerblesh3w ago
still figuring out the progress
tulip🌷
tulip🌷3w ago
does this work on layered systems? we might need to merge this soon as the dnf update just broke auto updates again 😭 yup! i finally got nvidia drivers working right now btw please make a release once this is merged so that we can add it to staging and put it on bluefin asap
antheas
antheas3w ago
Hhd needs to be updated it was made with a previous API version that had --json-fd But it's the same api
Gerblesh
Gerblesh2w ago
@tulip🌷 released 1.0.1 soooo rpm-ostree upgrade --preview is basically reporting false when there is clearly an image upgrade I see now why ublue-update uses skopeo to manually check for image upgrades

Did you find this page helpful?