Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

Compat with mkosi 18 #31

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

keszybz
Copy link
Member

@keszybz keszybz commented Oct 11, 2023

No description provided.

This saves 700k.
There were many incompatible changes, and I don't see a way to have a version
that works with both versions. With those changes, it seems to work again.
depmod complains if those files are missing, and it seems we really need them to
correctly load all modules. This means that we need both files. Usually,
kernel-core will be installed if kernel-modules-core is, so it's not such a big
issue.
mkosi.finalize Fixed Show fixed Hide fixed
mkosi.finalize Fixed Show fixed Hide fixed
mkosi.finalize Fixed Show fixed Hide fixed
if not (copy_in_modules_from_rpmls(root, rpms) or
copy_in_modules_from_fs(root, kver) or
copy_in_modules_from_cpio(root, rpms)):
raise Exception(f'Failed to copy modules for kernel {kver}')

Check warning

Code scanning / vcs-diff-lint

copy_in_modules_kver: Raising too general exception: Exception Warning

copy_in_modules_kver: Raising too general exception: Exception

mkosi --default /usr/lib/mkosi-initrd/fedora.mkosi \
mkosi --include=/usr/lib/mkosi-initrd/mkosi.conf \

Choose a reason for hiding this comment

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

You can just specify /usr/lib/mkosi-initrd here and it will pick up the finalize script automatically.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's better to be explicit.

@keszybz
Copy link
Member Author

keszybz commented Oct 12, 2023

‣ Building default image
‣  Installing Fedora
fedora                                           21 MB/s |  73 MB     00:03    
updates                                         992 kB/s | 1.7 MB     00:01    
Last metadata expiration check: 0:00:28 ago on Thu Oct 12 08:18:53 2023.
Dependencies resolved.
================================================================================
 Package                          Arch      Version             Repo       Size
================================================================================
Installing:
 filesystem                       x86_64    3.18-6.fc39         fedora    1.1 M
Installing dependencies:
 fedora-gpg-keys                  noarch    40-0.2              fedora    130 k
 fedora-release                   noarch    40-0.14             fedora    8.8 k
 fedora-release-common            noarch    40-0.14             fedora     19 k
 fedora-release-identity-basic    noarch    40-0.14             fedora    9.6 k
 fedora-repos                     noarch    40-0.2              fedora    9.3 k
 fedora-repos-rawhide             noarch    40-0.2              fedora    8.9 k
 setup                            noarch    2.14.4-1.fc39       fedora    154 k

Transaction Summary
================================================================================
Install  8 Packages

Total download size: 1.4 M
Installed size: 870 k
Downloading Packages:
(1/8): fedora-release-common-40-0.14.noarch.rpm 235 kB/s |  19 kB     00:00    
(2/8): fedora-release-40-0.14.noarch.rpm         96 kB/s | 8.8 kB     00:00    
(3/8): fedora-release-identity-basic-40-0.14.no 692 kB/s | 9.6 kB     00:00    
(4/8): fedora-repos-40-0.2.noarch.rpm           723 kB/s | 9.3 kB     00:00    
(5/8): fedora-gpg-keys-40-0.2.noarch.rpm        1.1 MB/s | 130 kB     00:00    
(6/8): fedora-repos-rawhide-40-0.2.noarch.rpm   603 kB/s | 8.9 kB     00:00    
(7/8): setup-2.14.4-1.fc39.noarch.rpm           6.1 MB/s | 154 kB     00:00    
(8/8): filesystem-3.18-6.fc39.x86_64.rpm         12 MB/s | 1.1 MB     00:00    
--------------------------------------------------------------------------------
Total                                           4.5 MB/s | 1.4 MB     00:00     
fedora                                          125 kB/s | 6.9 kB     00:00    
Traceback (most recent call last):
  File "/usr/bin/dnf", line 62, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 201, in user_main
    errcode = main(args)
              ^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 67, in main
    return _main(base, args, cli_class, option_parser_class)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 106, in _main
    return cli_run(cli, base)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 130, in cli_run
    ret = resolving(cli, base)
          ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/cli/main.py", line 176, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.12/site-packages/dnf/cli/cli.py", line 238, in do_transaction
    self.gpgsigcheck(install_pkgs)
  File "/usr/lib/python3.12/site-packages/dnf/cli/cli.py", line 294, in gpgsigcheck
    self._get_key_for_package(po, fn)
  File "/usr/lib/python3.12/site-packages/dnf/base.py", line 2518, in _get_key_for_package
    keys = dnf.crypto.retrieve(keyurl, repo)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/crypto.py", line 137, in retrieve
    keyinfos = rawkey2infos(handle)
               ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/dnf/crypto.py", line 127, in rawkey2infos
    keys = libdnf.repo.Key.keysFromFd(key_fo.fileno())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/site-packages/libdnf/repo.py", line 341, in keysFromFd
    return _repo.Key_keysFromFd(fileDescriptor)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Public key not found
‣ "/usr/bin/dnf --assumeyes --config=/__w/mkosi-initrd/mkosi-initrd/.mkosi-tmp2ymsoav6/pkgmngr/etc/dnf/dnf.conf --best --releasever=40 --installroot=/__w/mkosi-initrd/mkosi-initrd/.mkosi-tmp2ymsoav6/root --setopt=keepcache=1 '--setopt=cachedir=/__w/mkosi-initrd/mkosi-initrd/.mkosi-tmp2ymsoav6/cache/fedora~40~x86-64' --setopt=reposdir=/__w/mkosi-initrd/mkosi-initrd/.mkosi-tmp2ymsoav6/pkgmngr/etc/yum.repos.d --setopt=varsdir=/__w/mkosi-initrd/mkosi-initrd/.mkosi-tmp2ymsoav6/pkgmngr/etc/dnf/vars --setopt=persistdir=/__w/mkosi-initrd/mkosi-initrd/.mkosi-tmp2ymsoav6/pkgmngr/var/lib/dnf --setopt=check_config_file_age=0 '--disableplugin=*' --enableplugin=builddep --nodocs install filesystem" returned non-zero exit code 1.
Error: Process completed with exit code 1.

Hmm.

@DaanDeMeyer
Copy link

Maybe running into rpm-software-management/librepo#284?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants