Message ID | 1537471170-35289-1-git-send-email-martinxu9.ovs@gmail.com |
---|---|
State | Accepted |
Commit | 8821b212df5450799dfae8e9b4058b2cdacc49f0 |
Headers | show |
Series | [ovs-dev,v1,1/2] rhel: use _datadir as path prefix for ovs-kmod-manage.sh, fedora | expand |
Thanks for the review! Martin On Fri, Sep 21, 2018 at 5:24 AM Flavio Leitner <fbl@sysclose.org> wrote: > On Thu, Sep 20, 2018 at 12:19:29PM -0700, Martin Xu wrote: > > This patch fixes the path for ovs-kmod-manage.sh script in the > > openvswitch-kmod RPM in fedora spec file. Currently the path prefix is > > hard coded to /usr/share. Use %{_datadir} instead. > > > > Fixes 22c33c303932 (rhel: support kmod build against mulitple kernel > > versions, fedora) > > > > Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com> > > CC: Greg Rose <gvrose8192@gmail.com> > > CC: Flavio Leitner <fbl@sysclose.org> > > --- > > Thanks for improving it! > > Acked-by: Flavio Leitner <fbl@sysclose.org> > > >
On Thu, Sep 20, 2018 at 12:19:29PM -0700, Martin Xu wrote: > This patch fixes the path for ovs-kmod-manage.sh script in the > openvswitch-kmod RPM in fedora spec file. Currently the path prefix is > hard coded to /usr/share. Use %{_datadir} instead. > > Fixes 22c33c303932 (rhel: support kmod build against mulitple kernel > versions, fedora) > > Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com> > CC: Greg Rose <gvrose8192@gmail.com> > CC: Flavio Leitner <fbl@sysclose.org> Thanks for the patch. Flavio, thanks for the review. I applied this to master. Martin, I changed the end of the commit message slightly to match our usual style: Fixes: 22c33c303932 (rhel: support kmod build against mulitple kernel versions, fedora) Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com> CC: Greg Rose <gvrose8192@gmail.com> CC: Flavio Leitner <fbl@sysclose.org> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Flavio Leitner <fbl@sysclose.org> Thanks, Ben.
diff --git a/rhel/openvswitch-kmod-fedora.spec.in b/rhel/openvswitch-kmod-fedora.spec.in index 521c11a..464d537 100644 --- a/rhel/openvswitch-kmod-fedora.spec.in +++ b/rhel/openvswitch-kmod-fedora.spec.in @@ -74,7 +74,7 @@ for kv in %{kversion}; do done install -d -m 0755 $RPM_BUILD_ROOT/usr/share/openvswitch/scripts install -p -m 0755 rhel/usr_share_openvswitch_scripts_ovs-kmod-manage.sh \ - $RPM_BUILD_ROOT/usr/share/openvswitch/scripts/ovs-kmod-manage.sh + $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh %clean rm -rf $RPM_BUILD_ROOT @@ -88,15 +88,15 @@ IFS='.\|-' read mainline_major mainline_minor mainline_patch major_rev \ if [ "$mainline_major" = "3" ] && [ "$mainline_minor" = "10" ]; then if [ "$installed_major" = "327" ] || [ "$installed_major" = "693" ]; then # For RHEL 7.2 and 7.4 - if [ -x "/usr/share/openvswitch/scripts/ovs-kmod-manage.sh" ]; then - /usr/share/openvswitch/scripts/ovs-kmod-manage.sh + if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then + %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh fi fi elif [ "$mainline_major" = "4" ] && [ "$mainline_minor" = "4" ] && \ [ "$mainline_patch" -ge "73" ]; then # For SLES 12 SP3 - if [ -x "/usr/share/openvswitch/scripts/ovs-kmod-manage.sh" ]; then - /usr/share/openvswitch/scripts/ovs-kmod-manage.sh + if [ -x "%{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh" ]; then + %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh fi else # Ensure that modprobe will find our modules. @@ -125,7 +125,7 @@ fi /lib/modules/*/extra/openvswitch/*.ko /etc/depmod.d/kmod-openvswitch.conf %exclude /lib/modules/*/modules.* -%attr(755,root,root) /usr/share/openvswitch/scripts/ovs-kmod-manage.sh +%attr(755,root,root) %{_datadir}/openvswitch/scripts/ovs-kmod-manage.sh %changelog * Wed Sep 21 2011 Kyle Mestery <kmestery@cisco.com>
This patch fixes the path for ovs-kmod-manage.sh script in the openvswitch-kmod RPM in fedora spec file. Currently the path prefix is hard coded to /usr/share. Use %{_datadir} instead. Fixes 22c33c303932 (rhel: support kmod build against mulitple kernel versions, fedora) Signed-off-by: Martin Xu <martinxu9.ovs@gmail.com> CC: Greg Rose <gvrose8192@gmail.com> CC: Flavio Leitner <fbl@sysclose.org> --- rhel/openvswitch-kmod-fedora.spec.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)