Bug 975497

Summary: subpackage growpart so the package doesn't pull unnecessary deps into cloud image
Product: [Fedora] Fedora Reporter: Matthew Miller <mattdm>
Component: cloud-utilsAssignee: Juerg Haefliger <juergh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: awilliam, juergh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: RejectedFreezeException
Fixed In Version: cloud-utils-0.27-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-04 01:02:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Matthew Miller 2013-06-18 15:23:45 UTC
The cloud-utils package is largely utilities useful *outside* of cloud images, for manipulating and controlling those images. The exception is growpart, which is used for growing root partitions at boot time.

That weirdness should eventually be fixed upstream, but in the meantime, let's make it a separate package so that glusterfs, python-paramiko, qemu-img, ec2 API utils, and etc., aren't pulled in.

This is actually _done_ -- see https://admin.fedoraproject.org/updates/FEDORA-2013-11026/cloud-utils-0.27-4.fc19

I'm just filing a bug so we can propose it as a Nice To Have.

Comment 1 Matthew Miller 2013-06-18 15:47:20 UTC
Other background: we'd hoped to avoid this entirely by getting a patch into the parted, but that was rejected. The growpart script is an alternative, but it's particularly less desirable because of all this baggage.

Since it has to go in the cloud-kickstart and in the cloud image itself, an update doesn't really help.

Comment 2 Adam Williamson 2013-06-20 17:09:35 UTC
Discussed at 2013-06-20 freeze exception review meeting: http://meetbot.fedoraproject.org/fedora-blocker-review/2013-06-20/f19final-blocker-review-7.1.2013-06-20-15.01.log.txt . Tentatively rejected as a freeze exception issue as, as far as we understand it, the benefit here doesn't really seem worth the potential risk of changing key packages this late. Can be re-proposed if you think we missed the point.

Comment 3 Matthew Miller 2013-06-20 17:27:17 UTC
I wouldn't necessarily call it a "key package", but no, I don't think you've missed the point. We can make this change for F20, as the cloud image keeps getting incrementally better every release. :)

Comment 4 Matthew Miller 2013-06-20 17:32:04 UTC
Juerg -- cloud-utils-0.27-4.fc19 has a "Requires: gdisk".

I notice that the code itself has code like this:

   if [ "${id}" = "ee" ] ; then
        has_cmd "sgdisk" || fail "GPT partition found but no sgdisk"
        debug 1 "found GPT partition table (id = ${id})"
        gpt_resize
   else
        debug 1 "found MBR partition table (id = ${id})"
        mbr_resize
  fi

which will reasonably-gracefully provide a helpful error if the needed tool isn't found. I'd prefer the option to not include gdisk on non-GPT systems/images -- can we remove the Requires: line and assume that gdisk will get pulled in another way on gpt systems?

Comment 5 Adam Williamson 2013-06-21 02:20:00 UTC
mattdm: well, it's a 'key package' as relates to the cloud images. We were operating 'in context'.

Comment 6 Matthew Miller 2013-06-21 02:40:46 UTC
Even in context. This package is really a random grab-bag of scripts, most of which are only useful _outside_ of the cloud image. (Not to be confused with cloud-init.)


The only other part that would be useful inside an image is maybe the ec2metadata script, but for that use we're probably better off packaging up http://aws.amazon.com/code/1825 anyway.

Comment 7 Matthew Miller 2013-06-21 02:44:54 UTC
*cough* https://bugzilla.redhat.com/show_bug.cgi?id=876317

Comment 8 Juerg Haefliger 2013-06-21 05:13:42 UTC
(In reply to Matthew Miller from comment #4)
> Juerg -- cloud-utils-0.27-4.fc19 has a "Requires: gdisk".
> 
> I notice that the code itself has code like this:
> 
>    if [ "${id}" = "ee" ] ; then
>         has_cmd "sgdisk" || fail "GPT partition found but no sgdisk"
>         debug 1 "found GPT partition table (id = ${id})"
>         gpt_resize
>    else
>         debug 1 "found MBR partition table (id = ${id})"
>         mbr_resize
>   fi
> 
> which will reasonably-gracefully provide a helpful error if the needed tool
> isn't found. I'd prefer the option to not include gdisk on non-GPT
> systems/images -- can we remove the Requires: line and assume that gdisk
> will get pulled in another way on gpt systems?

Fixed in cloud-utils-0.27-5.fc19:

diff --git a/cloud-utils.spec b/cloud-utils.spec
index f86b06f..bd9fc1d 100644
--- a/cloud-utils.spec
+++ b/cloud-utils.spec
@@ -1,7 +1,7 @@
 Summary:       Cloud image management utilities
 Name:          cloud-utils
 Version:       0.27
-Release:       4%{?dist}
+Release:       5%{?dist}
 License:       GPLv3
 Group:         System Environment/Base
 URL:           https://launchpad.net/cloud-utils/trunk/0.27/+download/cloud-utils-0.27.tar.gz
@@ -43,7 +43,10 @@ Summary:     Script for growing a partition
 Group:         System Environment/Base
 
 Requires:      gawk
-Requires:      gdisk
+# gdisk is only required for resizing GPT partitions and depends on libicu
+# (25MB). We don't make this a hard requirement to save some space in non-GPT
+# systems.
+#Requires:     gdisk
 Requires:      util-linux
 
 
@@ -97,6 +100,10 @@ cp man/* $RPM_BUILD_ROOT/%{_mandir}/man1/
 
 
 %changelog
+* Mon Jun 17 2013 Juerg Haefliger <juergh> - 0.27-5
+- Don't make gdisk a hard requirement for cloud-utils-growpart to save some
+  space on systems that don't use GPT partitions.
+
 * Mon Jun 17 2013 Juerg Haefliger <juergh> - 0.27-4
 - Break out the growpart script into its own subpackage to prevent pulling a
   boatload of unnecessary dependencies into a cloud image.

Comment 9 Fedora Update System 2013-06-21 05:36:27 UTC
cloud-utils-0.27-5.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/cloud-utils-0.27-5.fc18

Comment 10 Fedora Update System 2013-06-21 06:16:21 UTC
cloud-utils-0.27-5.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/cloud-utils-0.27-5.el6

Comment 11 Fedora Update System 2013-06-21 19:35:55 UTC
Package cloud-utils-0.27-5.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing cloud-utils-0.27-5.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2013-10569/cloud-utils-0.27-5.el6
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2013-07-04 01:02:22 UTC
cloud-utils-0.27-5.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2013-07-16 01:06:38 UTC
cloud-utils-0.27-5.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.