uupdate thread:

uupdate thread:
168 Replies
j0rge
j0rgeOP4mo ago
j0rge
j0rgeOP4mo ago
I didn't know about bootc-fetch-apply-updates.service
tulip🌷
tulip🌷4mo ago
oh!!! nice!!! we can just use it instead for bootc if it would be better
j0rge
j0rgeOP4mo ago
yeah that's what I was thinking
tulip🌷
tulip🌷4mo ago
oh. we cant use it bootc update --apply reboots the system right away
j0rge
j0rgeOP4mo ago
ah
tulip🌷
tulip🌷4mo ago
No description
tulip🌷
tulip🌷4mo ago
yup :(
j0rge
j0rgeOP4mo ago
oh well
tulip🌷
tulip🌷4mo ago
that sucks it would be so good to have it
j0rge
j0rgeOP4mo ago
these docs are updated, I've learned a ton of things tonight
tulip🌷
tulip🌷4mo ago
the fedora docs? they are looking pretty nice!
bsherman
bsherman4mo ago
these new bootc docs are looking good
RealDishwash
RealDishwash4mo ago
Is the plan to use systemd soft reboot in the future?
tulip🌷
tulip🌷4mo ago
yup! at least for bootc update --apply its a TON faster
j0rge
j0rgeOP2mo 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
Gerblesh2mo ago
yeah
j0rge
j0rgeOP2mo ago
I wasn't able to figure that out
Gerblesh
Gerblesh2mo ago
that's all through dbus now iirc
j0rge
j0rgeOP2mo ago
oh ok awesome, so it has feature parity, nothing missing? oh that's so baller.
Gerblesh
Gerblesh2mo 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
j0rgeOP2mo ago
alright so we had it on achillobator since the holidays and there have been zero issues this is really nice!
tulip🌷
tulip🌷2mo ago
its been working crazy good
Gerblesh
Gerblesh2mo ago
no errors? Awesome!
tulip🌷
tulip🌷2mo ago
literally no issues with it
tulip🌷
tulip🌷2mo ago
@Gerblesh
No description
tulip🌷
tulip🌷2mo ago
just updated my vm with it 😭
j0rge
j0rgeOP2mo 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🌷2mo ago
true damn
j0rge
j0rgeOP2mo ago
I'm hoping we can get it in bazzite testing and let it bake there
tulip🌷
tulip🌷2mo ago
its made to be the most boring program ever so its most likely gonna be fine
j0rge
j0rgeOP2mo ago
or unstable or whatever
Gerblesh
Gerblesh2mo 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🌷2mo ago
i really think we should not add anything else to it
j0rge
j0rgeOP2mo ago
it jsut means the ujust in bazzite will call topgrade after
tulip🌷
tulip🌷2mo ago
true
j0rge
j0rgeOP2mo ago
yeah let's not reinvent topgrade, we are leaving topgrade on the image anyway so people can nerd out
Gerblesh
Gerblesh2mo ago
yeah, I'm also kinda apprehensive about auto updating the CSS
j0rge
j0rgeOP2mo ago
I am apprehensive about updating anything else than what you've enabled lol.
Gerblesh
Gerblesh2mo 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🌷2mo ago
keep it simple resist the bloat demons
Gerblesh
Gerblesh2mo ago
nvm, that would be kinda silly, not everyone has KDE installed
j0rge
j0rgeOP2mo ago
what is KCM?
tulip🌷
tulip🌷2mo ago
KDE configuration module that thing that @ledif was making
j0rge
j0rgeOP2mo ago
omg omg, dad joke incoming: "That's Kyle's Kproblem" hahahahahah
RealDishwash
RealDishwash2mo ago
You can add your own pages to KDE settings Very cool
j0rge
j0rgeOP2mo ago
yeah I wish I had that in gnome that's awesome.
Gerblesh
Gerblesh2mo ago
can we do that with GNOME? oh
tulip🌷
tulip🌷2mo ago
gotta fork gnome settings to have that
RealDishwash
RealDishwash2mo ago
tulip🌷
tulip🌷2mo ago
we can... but its not.... good....
j0rge
j0rgeOP2mo ago
sure we can, if you learn C AND raw GTK hahahaha
Gerblesh
Gerblesh2mo ago
we can try to maintain a simple gnome shell extension
j0rge
j0rgeOP2mo ago
the toggling of updates with ujust will need to be fixed
Gerblesh
Gerblesh2mo ago
that would just be some JS
j0rge
j0rgeOP2mo ago
yeah but then someone is like
tulip🌷
tulip🌷2mo ago
thats gonna be jank
j0rge
j0rgeOP2mo ago
"I need my dx button in there" I need this, I need that.
tulip🌷
tulip🌷2mo ago
true 😭
Gerblesh
Gerblesh2mo ago
true, but DX is going away soon right?
tulip🌷
tulip🌷2mo ago
i hope so probably wont
j0rge
j0rgeOP2mo 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
Gerblesh2mo ago
lol
tulip🌷
tulip🌷2mo ago
just like souk is doin
j0rge
j0rgeOP2mo 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🌷2mo ago
we making the year of the linux desktop a reality with this one 🗣🗣🗣🔥🔥🥶🥶
Gerblesh
Gerblesh2mo ago
souk?
tulip🌷
tulip🌷2mo ago
man you need to check it out GNOME software but so much better
tulip🌷
tulip🌷2mo 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🌷2mo ago
we forked it
Gerblesh
Gerblesh2mo ago
I see
bketelsen
bketelsen2mo ago
@j0rge making time for a quick scan now
ledif
ledif2mo ago
I just like showing this off 🙃
No description
tulip🌷
tulip🌷2mo ago
be proud! you did an amazing job with it it looks great too
bketelsen
bketelsen2mo 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🌷2mo ago
LES GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO @j0rge
Gerblesh
Gerblesh2mo ago
huge props to tulip for cleaning things up a good deal
j0rge
j0rgeOP2mo ago
No description
Kyle Gospo
Kyle Gospo2mo ago
Thank you for reminding me, I need to buy a copy for my bookshelf
j0rge
j0rgeOP2mo ago
alright switching bluefin @Gerblesh can you do a maintenance release or something so we can exercise the build loop?
tulip🌷
tulip🌷2mo ago
@inffy @RealDishwash @ledif
inffy
inffy2mo ago
wazzup
tulip🌷
tulip🌷2mo ago
we switched to uupd on the fin
j0rge
j0rgeOP2mo ago
or we will once we get some green hahahah
inffy
inffy2mo ago
🫡 I have the PR on aurora. was there any updates the past few days?
j0rge
j0rgeOP2mo 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
inffy2mo ago
yeah has been working fine on my VM
j0rge
j0rgeOP2mo ago
@Kyle Gospo in here
Kyle Gospo
Kyle Gospo2mo ago
No description
Kyle Gospo
Kyle Gospo2mo 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
j0rgeOP2mo ago
cc @tulip ok drafting the PR, I've not seen this output before
tulip🌷
tulip🌷2mo 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 Gospo2mo ago
That is the entire output Just stopped there
tulip🌷
tulip🌷2mo ago
@Gerblesh crap
antheas
antheas2mo ago
this output only a mother could love i think was his point
Kyle Gospo
Kyle Gospo2mo ago
Ah well, I'll roll this back for now Old stuff works fine
tulip🌷
tulip🌷2mo ago
i dont even know how it got this json output 😭
Gerblesh
Gerblesh2mo ago
uh oh, is this uupd?
tulip🌷
tulip🌷2mo ago
yup
antheas
antheas2mo ago
needs to be prettier and something my mother could understand
tulip🌷
tulip🌷2mo ago
with layered packages on the rpm-ostree module
antheas
antheas2mo ago
not that my mother would use a terminal
Gerblesh
Gerblesh2mo ago
alright I can try to fix things later, I'm pretty busy currently though
Kyle Gospo
Kyle Gospo2mo 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
antheas2mo ago
"its just json mother"
tulip🌷
tulip🌷2mo ago
it shoudlnt be outputting all this bs
antheas
antheas2mo ago
Gerblesh
Gerblesh2mo 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🌷2mo ago
oh LOL
Gerblesh
Gerblesh2mo ago
yeah error code 77 rpm-ostree is weird
tulip🌷
tulip🌷2mo ago
the json output being displayed is still a big issue tho LOL we gotta have some way to quieten it
Gerblesh
Gerblesh2mo ago
it's debug like when you run with the debug flag you get everything
tulip🌷
tulip🌷2mo 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
Gerblesh2mo ago
oh I fixed it
tulip🌷
tulip🌷2mo ago
hell yeah
Gerblesh
Gerblesh2mo 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🌷2mo ago
yup!!!
Gerblesh
Gerblesh2mo ago
I'll add some more debug logs
tulip🌷
tulip🌷2mo 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
j0rgeOP2mo ago
yeah we need the bootc status in there
Gerblesh
Gerblesh2mo 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🌷2mo ago
its kinda hard cuz bootc seems to hide the fancy stuff when you run it as a subprocess YO?
Gerblesh
Gerblesh2mo 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🌷2mo ago
it doesnt seem to have the --progress-fd option even now apparently
Gerblesh
Gerblesh2mo ago
oh it exists, it's just not in --help
tulip🌷
tulip🌷2mo 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
Gerblesh2mo 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🌷2mo ago
you are closing the thing before its used how are you gonna read from it?
Gerblesh
Gerblesh2mo ago
it still errors
tulip🌷
tulip🌷2mo ago
i think the run + log code has some good example for that actually
Gerblesh
Gerblesh2mo 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🌷2mo ago
@Gerblesh try doing it just like this but with the pipe apparently
Gerblesh
Gerblesh2mo ago
yeah this is basically the same thing
tulip🌷
tulip🌷2mo ago
but it doesnt use the concurrency thing go func()
Gerblesh
Gerblesh2mo ago
concurrency shouldn't be affecting things
tulip🌷
tulip🌷2mo ago
lets just see! it probably is affecting things
Gerblesh
Gerblesh2mo ago
shoot
tulip🌷
tulip🌷2mo ago
hmm?
Gerblesh
Gerblesh2mo ago
I think I closed the r file descriptor too early with the defer possibly? idk it should be waiting
tulip🌷
tulip🌷2mo ago
just remove the close to see what happens LOL
Gerblesh
Gerblesh2mo ago
I still don't see anything atm nah I removed the goroutine
tulip🌷
tulip🌷2mo ago
mind sending me a patch?
Gerblesh
Gerblesh2mo ago
now it just freezes
tulip🌷
tulip🌷2mo ago
wanna test it out locally
Gerblesh
Gerblesh2mo 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🌷2mo ago
oh - you arent on uupd at all? aight lemme check it out
Gerblesh
Gerblesh2mo ago
yeah I'm just testing things seperately before putting it in
tulip🌷
tulip🌷2mo ago
fair!
Gerblesh
Gerblesh2mo ago
@tulip any progress? I'll upstream the fix for the 77 exit code
tulip🌷
tulip🌷2mo ago
just a sec, debugging nvidia drivers rn 😭
Gerblesh
Gerblesh2mo 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
Gerblesh2mo ago
still figuring out the progress
tulip🌷
tulip🌷2mo 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
antheas2mo 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
Gerblesh2mo 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
j0rge
j0rgeOP4w ago
I saw a convo somewhere about uupd @Kyle Gospo bringing that convo here you think we're close to switching?
Kyle Gospo
Kyle Gospo4w ago
We're having some users reporting issues with ublue update So I was just saying we should probably look into switching soon I'm down to help test
j0rge
j0rgeOP4w ago
I have one ask ... when I run it in a terminal I need to see the bootc status, we spent months working with colin on the bootc status I need to know that stuff yeah and we have it in lts this whole time I think it's more the "we haven't tested it in user interactive mode that much" the thing itself is solid also remember to ask burger king about his code review, I bet he can't wait to explain. if he remembers you know how it is with emeritus
Gerblesh
Gerblesh4w ago
I'm still confused around the whole progress-fd flag, I was having trouble getting the proper output
j0rge
j0rgeOP4w ago
i'm sure someone will figure it out
Kyle Gospo
Kyle Gospo4w ago
@antheas pinging you since part of this is your baby
antheas
antheas4w ago
Colin made some changes But essentially you readline, convert to json, profit I made sure in the API to have some outputs that are jq friendly too If Colin didn't remove them
Gerblesh
Gerblesh4w 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("/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)
}

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("/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)
}

if err != nil {
log.Println(cmd.Stdout)
log.Fatalf("Command errored: %v", err)
}
}
here's what I got so far, I don't parse the JSON yet
tulip🌷
tulip🌷3w ago
NICE good job on this!
Gerblesh
Gerblesh3w ago
it doesn't work
tulip🌷
tulip🌷3w ago
that makes sense tho damn LOL what happened?
Gerblesh
Gerblesh3w ago
there's no output idk you can try

Did you find this page helpful?