Skip to content
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

Some mkosi fixes #1032

Merged
merged 3 commits into from
Oct 31, 2024
Merged

Some mkosi fixes #1032

merged 3 commits into from
Oct 31, 2024

Conversation

Vogtinator
Copy link
Member

With the .sha256 file generation, Repotype: checksumsfile should work.

CC @bluca

Otherwise image builds which use %v fail, sometimes in weird ways.
It would conflict between separate builds in the same repo.
@bluca
Copy link
Contributor

bluca commented Oct 10, 2024

Any chance publishing the recipe can be salvaged? It is very nice to be able to reproduce them. Can they be in a directory named after the image or so?

@Vogtinator
Copy link
Member Author

Any chance publishing the recipe can be salvaged? It is very nice to be able to reproduce them. Can they be in a directory named after the image or so?

To make them unique, they would have to be named after the package + multibuild flavor.

What's the use case you have in mind?

@bluca
Copy link
Contributor

bluca commented Oct 10, 2024

I don't have a specific use case in mind, just that I remember from when we added livebuild support, the fact that you could download images but not recipes without an account was an issue, and I didn't want a repeat. It's not a huge issue, if there's no alternative that's fine.

@mlschroe
Copy link
Member

Your sha256 files contain the full path, which is probably not intended. How about something simpler like:


    for f in "$BUILD_ROOT/$TOPDIR"/OTHER/* ; do
        test -f "$f" && chroot "$BUILD_ROOT" sh -c "cd /$TOPDIR/OTHER && sha256sum \"${f##*/}\" > \"${f##*/}.sha256\""
    done

(untested)

Just do it for all files in OTHER.
@Vogtinator
Copy link
Member Author

Your sha256 files contain the full path, which is probably not intended. How about something simpler like:

Indeed, fixed. Slightly differently though, with just a single chroot still

@Vogtinator
Copy link
Member Author

I don't have a specific use case in mind, just that I remember from when we added livebuild support, the fact that you could download images but not recipes without an account was an issue, and I didn't want a repeat. It's not a huge issue, if there's no alternative that's fine.

IMO the repo shouldn't be used for publishing sources as-is, there are better ways for distribution. IMO the current state doesn't really make sense anyway as the recipe file on its own is incomplete without the other source files.

We can also keep the recipe file as build result and just ignore it during publishing. I'm wondering what we need it for, maybe for image build dependencies?

@bluca
Copy link
Contributor

bluca commented Oct 11, 2024

I don't have a specific use case in mind, just that I remember from when we added livebuild support, the fact that you could download images but not recipes without an account was an issue, and I didn't want a repeat. It's not a huge issue, if there's no alternative that's fine.

IMO the repo shouldn't be used for publishing sources as-is, there are better ways for distribution. IMO the current state doesn't really make sense anyway as the recipe file on its own is incomplete without the other source files.

We can also keep the recipe file as build result and just ignore it during publishing. I'm wondering what we need it for, maybe for image build dependencies?

The manifest is used for build dependencies, at least that was the intention in 1bead5d so yeah this should be fine to drop

@thkukuk
Copy link

thkukuk commented Oct 31, 2024

I don't have a specific use case in mind, just that I remember from when we added livebuild support, the fact that you could download images but not recipes without an account was an issue, and I didn't want a repeat. It's not a huge issue, if there's no alternative that's fine.

Sorry for the late response, was on vacation.
If you take my repository for building sysext images for MicroOS with mkosi as example, the mkosi.conf file alone is pretty useless. You need the files in the mkosi.images subdirectory, too. And here it starts: you need to parse the config to find all referenced directories and other files. I prefer the solution we do for kiwi files: create an extra RPM with all required files from it.

https://github.com/thkukuk/microos-sysext
https://build.opensuse.org/project/monitor/home:kukuk:sysext

@bluca
Copy link
Contributor

bluca commented Oct 31, 2024

I don't have a specific use case in mind, just that I remember from when we added livebuild support, the fact that you could download images but not recipes without an account was an issue, and I didn't want a repeat. It's not a huge issue, if there's no alternative that's fine.

Sorry for the late response, was on vacation. If you take my repository for building sysext images for MicroOS with mkosi as example, the mkosi.conf file alone is pretty useless. You need the files in the mkosi.images subdirectory, too. And here it starts: you need to parse the config to find all referenced directories and other files. I prefer the solution we do for kiwi files: create an extra RPM with all required files from it.

https://github.com/thkukuk/microos-sysext https://build.opensuse.org/project/monitor/home:kukuk:sysext

Yeah makes sense, I've already approve this, thanks.

BTW in that example, which looks great by the way, you are building both base and extensions in the same build - is anyone working on finishing the image-dependency-handling integration in OBS so that you can build the base and the extension separately? The idea being that for example in the MicroOS case, the base would be built in the MicroOS project itself, and then users can build-depend on it and build their own extensions in their own projects

@thkukuk
Copy link

thkukuk commented Oct 31, 2024

BTW in that example, which looks great by the way, you are building both base and extensions in the same build - is anyone working on finishing the image-dependency-handling integration in OBS so that you can build the base and the extension separately? The idea being that for example in the MicroOS case, the base would be built in the MicroOS project itself, and then users can build-depend on it and build their own extensions in their own projects

I would be already more than happy if we get full basic support for mkosi in OBS, like publishing the images with signed meta data to make it directly usable by importctl and systemd-sysupdate.
Currently I have no resources to do more and I don't see anybody else working on it.
Maybe this changes if we have this fully integrated in MicroOS and SL Micro 6.x and customer demand is there.

@mlschroe mlschroe merged commit a7b9e3c into openSUSE:master Oct 31, 2024
1 check passed
@Vogtinator Vogtinator deleted the mkosi branch October 31, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants