Bug 506939

Summary: Review Request: dracut - a generic initramfs generator
Product: [Fedora] Fedora Reporter: Harald Hoyer <harald>
Component: Package ReviewAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, notting, rvokal
Target Milestone: ---Flags: notting: fedora-review+
j: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-10-13 13:30:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Hoyer 2009-06-19 12:17:09 UTC
Spec URL: http://harald.fedorapeople.org/downloads/dracut/dracut.spec
SRPM URL: http://harald.fedorapeople.org/downloads/dracut/dracut-0.1-1.fc11.src.rpm
Description: dracut is a new, event-driven initramfs infrastructure based around udev.

Will be the mkinitrd/nash replacement. 
See also: http://fedoraproject.org/wiki/Features/Dracut

Comment 1 Harald Hoyer 2009-06-19 12:33:37 UTC
$ rpmlint /home/harald/git/dracut/dracut-0.1-1.fc11.src.rpm /home/harald/git/dracut/noarch/dracut-0.1-1.fc11.noarch.rpm /home/harald/git/dracut/noarch/dracut-generic-0.1-1.fc11.noarch.rpm dracut.spec 
3 packages and 1 specfiles checked; 0 errors, 0 warnings.

Comment 2 Harald Hoyer 2009-06-19 13:54:46 UTC
forgot to add, that to test the dracut, you have to:
%define with_switch_root 1
in the dracut.spec, until /sbin/switch_root is provided by util-linux-ng

Comment 3 Bill Nottingham 2009-06-19 15:03:55 UTC
- Package meets naming and packaging guidelines - OK
- Spec file matches base package name. - OK
- Spec has consistant macro usage. - OK
- Meets Packaging Guidelines. - OK
- License - GPLv2+
- License field in spec matches - ***

*** The license in the code is GPLv2 or later; the spec tag should be GPLv2+.
    It's also not present in most of the shell snippets; unsure what the requirements are there.

- License file included in package - OK
- Spec in American English - ***

generic package description:
This package requires everything, which is needed to build a generic
all purpose initramfs.

Should probably be 'everything that is needed', without the comma.

- Spec is legible. - OK
- Sources match upstream md5sum: -  a6cbc2b0c1dbdec0b37a6ecfadf0a33c1f2e1122 - OK

- Package needs ExcludeArch - ***

*** The arch/noarch switching seems a bit odd. Can we just get a new util-linux in so we don't need this?

- BuildRequires correct - OK 
- Spec handles locales/find_lang - N/A
- Package has %defattr and permissions on files is good. - OK
- Package has a correct %clean section. - OK
- Package has correct buildroot - OK
- Package is code or permissible content. - OK
- Doc subpackage needed/used. - N/A
- Packages %doc files don't affect runtime. - OK
- Handles devel libs/ldconfig/pkg-config/etc. correctly - N/A


- Package compiles and builds on at least one arch. - OK (tested x86_64 building noarch, x86_64 building x86_64)
- Package has no duplicate files in %files. - OK
- Package doesn't own any directories other packages own. - OK
- Package owns all the directories it creates. - OK
- No rpmlint output. - OK
- final provides and requires are sane: - ***

The 'generic' package really should be some sort of Suggests/Enhances on the main package. Alas, we can't do that yet. (Requiring to pull in nbd seems wrong.)

That being said, if we don't have some sort of requirements on lvm2, raid, etc. tools in the main package, the ordering won't be right on kernel installs, and it will try to build a non-generic initramfs when the tools haven't yet been installed that may be needed for that system. This needs solved before we ship it.

SHOULD Items:

- Should build in mock. - OK (see above)
- Should build on all supported archs - didn't try
- Should function as described. - didn't try
- Should have sane scriptlets. - N/A
- Should have subpackages require base package with fully versioned depend. - OK
- Should have dist tag - OK
- Should package latest version - OK

Other notes:
- dracut modules live in /usr. Do we need to be able to rebuild the initramfs when /usr isn't present?

Comment 4 Harald Hoyer 2009-06-19 16:29:10 UTC
(In reply to comment #3)
> - License - GPLv2+
> - License field in spec matches - ***
> 
> *** The license in the code is GPLv2 or later; the spec tag should be GPLv2+.
>     It's also not present in most of the shell snippets; unsure what the
> requirements are there.


oh, yes, will change

> - Spec in American English - ***
> 
> generic package description:
> This package requires everything, which is needed to build a generic
> all purpose initramfs.
> 
> Should probably be 'everything that is needed', without the comma.

ok, will change

> - Package needs ExcludeArch - ***
> 
> *** The arch/noarch switching seems a bit odd. Can we just get a new util-linux
> in so we don't need this?

yes, we still have to have this for F-11 and have to wait a little bit for F-12


> The 'generic' package really should be some sort of Suggests/Enhances on the
> main package. Alas, we can't do that yet. (Requiring to pull in nbd seems
> wrong.)

ok, then I rename it to dracut-buildall?

> 
> That being said, if we don't have some sort of requirements on lvm2, raid, etc.
> tools in the main package, the ordering won't be right on kernel installs, and
> it will try to build a non-generic initramfs when the tools haven't yet been
> installed that may be needed for that system. This needs solved before we ship
> it.

if the tools haven't been installed.. so you mean running a lvm / crypto / raid root without the tools ?


> Other notes:
> - dracut modules live in /usr. Do we need to be able to rebuild the initramfs
> when /usr isn't present?  

good point! and plymouth?

Comment 5 Bill Nottingham 2009-06-19 19:28:05 UTC
(In reply to comment #4)
> > - Package needs ExcludeArch - ***
> > The 'generic' package really should be some sort of Suggests/Enhances on the
> > main package. Alas, we can't do that yet. (Requiring to pull in nbd seems
> > wrong.)
> 
> ok, then I rename it to dracut-buildall?

Well, I'm not sure it needs to exist. More below.

> > That being said, if we don't have some sort of requirements on lvm2, raid, etc.
> > tools in the main package, the ordering won't be right on kernel installs, and
> > it will try to build a non-generic initramfs when the tools haven't yet been
> > installed that may be needed for that system. This needs solved before we ship
> > it.
> 
> if the tools haven't been installed.. so you mean running a lvm / crypto / raid
> root without the tools ?

anaconda never runs mkinitrd; it simply relies on the kernel %post script to run it to make a working initramfs. If you're doing an install to a RAID device, or LVM, or encrypted FS, etc., those tools need to be on the installed system when the kernel package is installed and mkinitrd/dracut is run.

Without Requires: in the mkinitrd/dracut package, there's no guarantee that this is the case. (We had to respin mkinitrd to require kbd for F-11 because of this, as it wasn't getting the proper keymaps for the user to enter passwords.)

So, we likely just need all these requires in the main package itself.

> > Other notes:
> > - dracut modules live in /usr. Do we need to be able to rebuild the initramfs
> > when /usr isn't present?  
> 
> good point! and plymouth?  

Hm, when you put it that way, maybe it's not such a big deal.

Comment 6 Harald Hoyer 2009-06-23 05:53:25 UTC
> - License - GPLv2+
> - License field in spec matches - ***
> 
> *** The license in the code is GPLv2 or later; the spec tag should be GPLv2+.
>     It's also not present in most of the shell snippets; unsure what the
> requirements are there.

fixed

> - Spec in American English - ***
> 
> generic package description:
> This package requires everything, which is needed to build a generic
> all purpose initramfs.
> 
> Should probably be 'everything that is needed', without the comma.

changed

> - Package needs ExcludeArch - ***
> 
> *** The arch/noarch switching seems a bit odd. Can we just get a new util-linux
> in so we don't need this?

left in until util-linux-ng provides switch_root

> The 'generic' package really should be some sort of Suggests/Enhances on the
> main package. Alas, we can't do that yet. (Requiring to pull in nbd seems
> wrong.)

The idea is to generate a "generic" dracut image with every kernel build, so that the user does not have to build his own, though he can do it.

> 
> That being said, if we don't have some sort of requirements on lvm2, raid, etc.
> tools in the main package, the ordering won't be right on kernel installs, and
> it will try to build a non-generic initramfs when the tools haven't yet been
> installed that may be needed for that system. This needs solved before we ship
> it.

add the mkinitrd Requires to the basic dracut rpm

Comment 7 Bill Nottingham 2009-06-23 14:37:09 UTC
(In reply to comment #6)
> > The 'generic' package really should be some sort of Suggests/Enhances on the
> > main package. Alas, we can't do that yet. (Requiring to pull in nbd seems
> > wrong.)
> 
> The idea is to generate a "generic" dracut image with every kernel build, so
> that the user does not have to build his own, though he can do it.

OK. So is  the kernel going to continue to require mkinitrd (in which case it will not pull in the -generic package), or will it switch its requires?

Comment 8 Harald Hoyer 2009-06-26 08:48:51 UTC
The kernel should BuildRequire the dracut-generic package and deliver a generic initramfs image, which can be chosen as an alternative image to the special host generated image, which can/should be triggered with a kernel install.

I think the kernel only Requires /sbin/new-kernel-pkg, which is part of grubby. new-kernel-pkg will be modified to use dracut to build an image.

Comment 9 Bill Nottingham 2009-06-26 14:46:32 UTC
OK. That makes the transition a little messy, but doesn't actually affect the current packaging.

APPROVED.

Comment 10 Harald Hoyer 2009-06-29 12:23:55 UTC
New Package CVS Request
=======================
Package Name: dracut
Short Description: dracut is a new, event-driven initramfs infrastructure based
around udev.
Owners: harald
Branches: F-11
InitialCC:

Comment 11 Jason Tibbitts 2009-06-29 17:08:03 UTC
CVS done.