Bug 1409536

Summary: appliance-tools should require package parted
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: appliance-toolsAssignee: Neal Gompa <ngompa13>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agrimm, ngompa13, virt-maint
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: appliance-tools-008.0-4.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-29 01:29:39 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 Lukas Slebodnik 2017-01-02 12:35:54 UTC
Description of problem:
I have been using this package for long time and it is quite useful for my use-case. There were some changes in rawhide and I got following traceback:

Initializing partition table for /dev/loop1 with msdos layout
Traceback (most recent call last):
  File "/usr/bin/appliance-creator", line 171, in <module>
    sys.exit(main())
  File "/usr/bin/appliance-creator", line 148, in main
    creator.mount("NONE", options.cachedir)
  File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 535, in mount
    self._mount_instroot(base_on)
  File "/usr/lib/python2.7/site-packages/appcreate/appliance.py", line 196, in _mount_instroot
    self.__instloop.mount()
  File "/usr/lib/python2.7/site-packages/appcreate/partitionedfs.py", line 250, in mount
    self.__format_disks()
  File "/usr/lib/python2.7/site-packages/appcreate/partitionedfs.py", line 67, in __format_disks
    rc = subprocess.call(["/sbin/parted", "-s", d['disk'].device, "mklabel", "%s" % self.partition_layout])
  File "/usr/lib64/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directoryInitializing partition table for /dev/loop1 with msdos layout
Traceback (most recent call last):
  File "/usr/bin/appliance-creator", line 171, in <module>
    sys.exit(main())
  File "/usr/bin/appliance-creator", line 148, in main
    creator.mount("NONE", options.cachedir)
  File "/usr/lib/python2.7/site-packages/imgcreate/creator.py", line 535, in mount
    self._mount_instroot(base_on)
  File "/usr/lib/python2.7/site-packages/appcreate/appliance.py", line 196, in _mount_instroot
    self.__instloop.mount()
  File "/usr/lib/python2.7/site-packages/appcreate/partitionedfs.py", line 250, in mount
    self.__format_disks()
  File "/usr/lib/python2.7/site-packages/appcreate/partitionedfs.py", line 67, in __format_disks
    rc = subprocess.call(["/sbin/parted", "-s", d['disk'].device, "mklabel", "%s" % self.partition_layout])
  File "/usr/lib64/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Version-Release number of selected component (if applicable):
sh$ rpm -q appliance-tools 
appliance-tools-007.8-12.fc26.noarch

How reproducible:
Deterministic

Steps to Reproduce:
1. dnf install -y appliance-tools
2. rpm -q parted

Actual results:
package parted is not installed

Expected results:
parted-3.2-22.fc26.x86_64
//or newer version of parted

Additional info:
On fedora 25 it was installled as a dependency of livecd-tools
[root@fedora_25 /]# rpm -q --whatrequires parted
lorax-25.17-1.fc25.x86_64
livecd-tools-23.4-1.fc25.x86_64

[root@fedora_25 /]# rpm -q --whatrequires livecd-tools
appliance-tools-007.8-10.fc25.noarch

But these packages are not installed on rawhide
[root@rawhide /]# rpm -q lorax livecd-tools appliance-tools 
package lorax is not installed
package livecd-tools is not installed
appliance-tools-007.8-12.fc26.noarch

For my use-case, it is enough to install parted as well "dnf install -y appliance-tools parted"

Comment 1 Neal Gompa 2017-01-02 14:33:56 UTC
livecd-tools in rawhide requires both lorax and parted. I'm not sure why you don't have them installed.
See: https://koji.fedoraproject.org/koji/rpminfo?rpmID=8732690

Comment 2 Lukas Slebodnik 2017-01-02 16:29:22 UTC
(In reply to Neal Gompa from comment #1)
> livecd-tools in rawhide requires both lorax and parted. I'm not sure why you
> don't have them installed.
> See: https://koji.fedoraproject.org/koji/rpminfo?rpmID=8732690

That's true but appliance-tools does not require livecd-tools in rawhide
  dnf install -y appliance-tools
  rpm -q lorax livecd-tools appliance-tools 
  rpm -q --requires appliance-tools

[root@b8c9c58292c5 /]# rpm -q lorax livecd-tools appliance-tools 
package lorax is not installed
package livecd-tools is not installed
appliance-tools-007.8-12.fc26.noarch

[root@b8c9c58292c5 /]# rpm -q --requires appliance-tools
/usr/bin/python
curl
kpartx
python(abi) = 2.7
python-imgcreate >= 24.0
python-urlgrabber
qemu-img
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rsync
sssd-client
xfsprogs
xz
zlib

Comment 3 Lukas Slebodnik 2017-01-02 16:46:48 UTC
and here is an output from fedora 25

[root@fedora_25 /]# rpm -q lorax livecd-tools appliance-tools
lorax-25.17-1.fc25.x86_64
livecd-tools-23.4-1.fc25.x86_64
appliance-tools-007.8-10.fc25.noarch

[root@fedora_25 /]# rpm -q --requires appliance-tools
/usr/bin/python
curl
kpartx
livecd-tools >= 020
python(abi) = 2.7
qemu-img
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rsync
sssd-client
xfsprogs
xz
zlib

BTW 
livecd-tools were removed from dependency in commit f975689042bceb9bbaf886f7768e065d75670b2a

Comment 4 Neal Gompa 2017-01-02 17:05:37 UTC
I've fixed this in livecd-tools-24.0-3.fc26 and appliance-tools-007.8-13.fc26 in Rawhide.

Comment 5 Fedora Update System 2017-03-07 14:02:32 UTC
livecd-tools-24.2-1.fc25 appliance-tools-008.0-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7799a1cc7c

Comment 6 Fedora Update System 2017-03-08 14:54:25 UTC
appliance-tools-008.0-3.fc25, livecd-tools-24.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7799a1cc7c

Comment 7 Fedora Update System 2017-03-12 22:46:04 UTC
appliance-tools-008.0-4.fc25 livecd-tools-24.2-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-7799a1cc7c

Comment 8 Fedora Update System 2017-03-14 01:22:42 UTC
appliance-tools-008.0-4.fc25, livecd-tools-24.2-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-7799a1cc7c

Comment 9 Fedora Update System 2017-03-29 01:29:39 UTC
appliance-tools-008.0-4.fc25, livecd-tools-24.2-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.