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

[gentoo] preper for usrmerge #1173

Merged
merged 1 commit into from
Jan 12, 2023
Merged

[gentoo] preper for usrmerge #1173

merged 1 commit into from
Jan 12, 2023

Conversation

257
Copy link
Contributor

@257 257 commented Sep 5, 2022

upstream has added merged-usr profile: https://bugs.gentoo.org/843818#c2
this makes that profile default for us. I expect a stage3 for merged-usr
sometime soon which should result in signicant code-drop at our end.

Signed-off-by: Paymon MARANDI [email protected]

@lgtm-com

This comment was marked as resolved.

@DaanDeMeyer
Copy link
Contributor

What's the status here?

@257
Copy link
Contributor Author

257 commented Sep 21, 2022

i will rework it this weekend.

@257
Copy link
Contributor Author

257 commented Sep 21, 2022

What's the status here?

actually it passes the test. alert are outdated/fixed. let me know if you see otherwise.

@DaanDeMeyer
Copy link
Contributor

Any idea when we'll be getting the merged-usr stage3?

@257
Copy link
Contributor Author

257 commented Sep 21, 2022

soon i hope. i'm hoping that gentoo-releng's uses mkosi for at least generating the initial stage3s.
pinging @floppym

@257
Copy link
Contributor Author

257 commented Sep 21, 2022

Any idea when we'll be getting the merged-usr stage3?

by the EOY, supposidly.

@DaanDeMeyer
Copy link
Contributor

There's still a CI failure in the gentoo gpt ext4 CI run, so I don't think we can merge this just yet

@257
Copy link
Contributor Author

257 commented Sep 29, 2022

i will have a look over the weekend. yes, please hold off merging this.

@257
Copy link
Contributor Author

257 commented Oct 9, 2022

There's still a CI failure in the gentoo gpt ext4 CI run, so I don't think we can merge this just yet

possibly fails on sys-kernel/gentoo-kernel-bin...

builds here, stage3 images upstream are autobuilt. i even thought of freezing the build that works (today it's stage3-amd64-nomultilib-systemd-20220911T170535Z.tar.xz and =sys-kernel/gentoo-kernel-bin-5.15.69) but it's pointless because we don't have a guarantee from upstream that image would even be there at the time of next mkosi release.

my understanding is that there is an effort upstream to stanardise the way these stage3 release work.

i understand this breaks mkosi's promise of 100% reproducibility but as you you can options are limited.

what do you think?

@257
Copy link
Contributor Author

257 commented Oct 9, 2022

There's still a CI failure in the gentoo gpt ext4 CI run, so I don't think we can merge this just yet

hmm, actually image boots we fail on ssh odd!

@257
Copy link
Contributor Author

257 commented Oct 9, 2022

seems to be a bug with portage and binary packages, fixed upstream. how do i force the actions to run again without pushing to the branch?

@DaanDeMeyer
Copy link
Contributor

I restarted the failed job

@DaanDeMeyer
Copy link
Contributor

@257 Can you take another look, something is borked with ssh

@257
Copy link
Contributor Author

257 commented Oct 29, 2022

@257 Can you take another look, something is borked with ssh

i did while back i couldn't find a way to run the test locally. any pointers?

@257 257 force-pushed the gentoo branch 6 times, most recently from 78220b2 to 5b12058 Compare October 30, 2022 18:36
@DaanDeMeyer
Copy link
Contributor

@257 Can you rebase? plain_squashfs just got removed by #1276 so we don't need to disable it anymore

@257
Copy link
Contributor Author

257 commented Dec 21, 2022

np, working on it

@257
Copy link
Contributor Author

257 commented Dec 21, 2022

@DaanDeMeyer which version of systemd-repart comes with --defer-partitions? i'm hitting this here:

systemd-repart: unrecognized option '--defer-partitions'
systemd 252 (252)
+PAM -AUDIT -SELINUX -APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS -FIDO2 +IDN2 -IDN -IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 +PWQUALITY -P11KIT +QRENCODE +TPM2 -BZIP2 +LZ4 -XZ -ZLIB +ZSTD -BPF_FRAMEWORK +XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified

@behrmann
Copy link
Contributor

@257 see #1290

@257 257 force-pushed the gentoo branch 5 times, most recently from 251ba93 to 4f80ba7 Compare January 9, 2023 16:05
@257
Copy link
Contributor Author

257 commented Jan 9, 2023

np, working on it

ready with possible exception of ssh. please review.

@257
Copy link
Contributor Author

257 commented Jan 9, 2023

ready with possible exception of ssh. please review.

ssh is also fixed. probably a side-effect of usrmerge.

@257
Copy link
Contributor Author

257 commented Jan 9, 2023

not sure why centos is failing

@DaanDeMeyer
Copy link
Contributor

not sure why centos is failing

Unrelated to this PR

Copy link
Contributor

@DaanDeMeyer DaanDeMeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a few comments though

mkosi/distributions/gentoo.py Outdated Show resolved Hide resolved
mkosi/distributions/gentoo.py Outdated Show resolved Hide resolved
Comment on lines +399 to +385
MkosiPrinter.print_step("Invoking emerge(1) inside stage3"
f"{self.root}")
run_workspace_command(self.state, cmd, network=True, env=self.emerge_vars,
nspawn_params=self.DEFAULT_NSPAWN_PARAMS,
check=check)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this have to run inside the image? We're trying to move all the package manager stuff to run outside of the image instead of inside the image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we ran into number of problems using host's portage in the past. only initial sync_portage_tree() uses host's portage and i'm tempted to even remove that.

also we still do make some changes related to systemd and we also install kernel related packages for bootable cases, see pkgs['boot'] especially under update_stage3().
also any extra packages asked by user also needs this, see merge_user_pkgs().

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer if we use host's portage if possible. We do the same for all other distributions. But we can leave that for another PR since this one is already been open for a long time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i started out using host's portage and its python interface in face, which turned out to be horrible. even @poettering mentioned that we probably do the same for dnf...

yeah changing to host's would be a big big change with lots of test. although with usermerge in place we're dropping lots of code and complexity. i will have a go at it once day job gets a bit lighter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keeping this unresolved for future ref.

@257 257 force-pushed the gentoo branch 3 times, most recently from e0fa0ec to 40829ef Compare January 12, 2023 11:57
@257
Copy link
Contributor Author

257 commented Jan 12, 2023

once this is merged a mini-release would be nice since gentoo people insist on it for some reason!
i wish they could be content with git commits only but the world is not perfect :)

upstream finally has merged-usr profiles/stage3s [1].
this makes `no-multilib/systemd/merged-usr`, and related stage3, default
for us.

[1] https://bugs.gentoo.org/843818#c2

Signed-off-by: Paymon MARANDI <[email protected]>
@DaanDeMeyer DaanDeMeyer merged commit d1f5db4 into systemd:main Jan 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants