Bug 1531111

Summary: vdo package install should use systemd macros
Product: Red Hat Enterprise Linux 7 Reporter: Joseph Chapman <jochapma>
Component: vdoAssignee: Joseph Chapman <jochapma>
Status: CLOSED ERRATA QA Contact: Jakub Krysl <jkrysl>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: awalsh, bgurney, jkrysl, limershe, pholica
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 6.1.1.0-18 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-30 09:38:49 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:
Bug Depends On:    
Bug Blocks: 1568427    

Description Joseph Chapman 2018-01-04 15:34:22 UTC
Description of problem:
The vdo RPM spec file uses shell commands to install and remove the vdo
systemd files. It should use the helper macros provided by the systemd package
instead to ensure proper handling of the service.

Version-Release number of selected component (if applicable):
vdo-6.1.0.106-13

How reproducible:
100%

Steps to Reproduce:
1. Examine the spec file.

Actual results:
For example. the %post section contains:
  /bin/systemctl enable vdo.service || :

Expected results:
Should use the %systemd_post macro.

Additional info:

Comment 4 Andy Walsh 2018-02-23 15:09:06 UTC
*** Bug 1547557 has been marked as a duplicate of this bug. ***

Comment 6 Jakub Krysl 2018-07-04 09:32:27 UTC
Tested on:
RHEL-7.6-20180626.0
kernel-3.10.0-915.el7
kmod-vdo-6.1.1.99-1.el7
vdo-6.1.1.99-2.el7

requirements when installing on 7.5:
---> Package vdo.x86_64 0:6.1.0.168-18 will be installed
Checking deps for vdo.x86_64 0:6.1.0.168-18 - u
looking for ('python(abi)', 'EQ', ('0', '2.7', None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('PyYAML', 'GE', ('0', '3.10', None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('kmod-kvdo', 'GE', ('0', '6.1', None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('lvm2', 'GE', ('0', '2.02.171', None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('/usr/bin/python', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libm.so.6(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libpthread.so.0(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libpthread.so.0(GLIBC_2.3.2)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libpthread.so.0(GLIBC_2.3.3)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('librt.so.1(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libuuid.so.1(UUID_1.0)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libc.so.6(GLIBC_2.14)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libdl.so.2()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libm.so.6()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libpthread.so.0()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('librt.so.1()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libuuid.so.1()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
looking for ('libz.so.1()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.0.168-18 - u
--> Finished Dependency Resolution

requirements when installing on 7.6:
---> Package vdo.x86_64 0:6.1.1.99-2.el7 will be installed
Checking deps for vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('python(abi)', 'EQ', ('0', '2.7', None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('PyYAML', 'GE', ('0', '3.10', None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('kmod-kvdo', 'GE', ('0', '6.1', None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libuuid', 'GE', ('0', '2.23', None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('lvm2', 'GE', ('0', '2.02.171', None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('/bin/sh', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('/usr/bin/python', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libm.so.6(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libpthread.so.0(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libpthread.so.0(GLIBC_2.3.2)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libpthread.so.0(GLIBC_2.3.3)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('librt.so.1(GLIBC_2.2.5)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libuuid.so.1(UUID_1.0)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('rtld(GNU_HASH)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('systemd', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('systemd', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libc.so.6(GLIBC_2.14)(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libdl.so.2()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libm.so.6()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libpthread.so.0()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('librt.so.1()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libuuid.so.1()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
looking for ('libz.so.1()(64bit)', None, (None, None, None)) as a requirement of vdo.x86_64 0:6.1.1.99-2.el7 - u
--> Finished Dependency Resolution

systemd is now required for vdo to be installed. The installation of vdo.service is now done through systemd:
# cat vdo.spec | grep systemd
BuildRequires: systemd
%{?systemd_requires}
%systemd_post vdo.service
%systemd_preun vdo.service
%systemd_postun_with_restart vdo.service
%dir %{_defaultdocdir}/%{name}/examples/systemd
%doc %{_defaultdocdir}/%{name}/examples/systemd/VDO.mount.example
- Modified spec files to use systemd macros
- Add systemd files
# cat vdo.spec | grep vdo.service
%systemd_post vdo.service
%systemd_preun vdo.service
%systemd_postun_with_restart vdo.service
%{_unitdir}/vdo.service
- Package uninstall removes vdo.service symlinks

Comment 7 Joseph Chapman 2018-09-06 13:55:54 UTC
*** Bug 1617896 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2018-10-30 09:38:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:3094