aboutsummaryrefslogtreecommitdiff
path: root/rhel
diff options
context:
space:
mode:
authorChris Wright <chrisw@sous-sol.org>2011-12-08 23:36:02 -0800
committerBen Pfaff <blp@nicira.com>2011-12-09 09:42:34 -0800
commita038fa773089b33332bd4d860b9bd4190e0cc573 (patch)
treefdc247eac449113da1acb7be33996e3a21ff9b3e /rhel
parent17872e9e31ce88e14b3023ddab8f76aedb938e14 (diff)
rhel: openvswitch.spec.in: fix perms on logrotate and sysconfig.template
Fixes rpmlint warning: W: spurious-executable-perm /etc/logrotate.d/openvswitch W: non-conffile-in-etc /etc/logrotate.d/openvswitch E: script-without-shebang /usr/share/openvswitch/scripts/sysconfig.template Define rhel_cp() shell func and include file mode on install. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Ben Pfaff <blp@nicira.com>
Diffstat (limited to 'rhel')
-rw-r--r--rhel/openvswitch.spec.in25
1 files changed, 14 insertions, 11 deletions
diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
index f9a4e12a..4d52d3b7 100644
--- a/rhel/openvswitch.spec.in
+++ b/rhel/openvswitch.spec.in
@@ -35,16 +35,19 @@ make %{_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
-for base in \
- etc_init.d_openvswitch \
- etc_logrotate.d_openvswitch \
- etc_sysconfig_network-scripts_ifup-ovs \
- etc_sysconfig_network-scripts_ifdown-ovs \
- usr_share_openvswitch_scripts_sysconfig.template; do
- dst=$RPM_BUILD_ROOT/$(echo $base | sed 's,_,/,g')
- install -d -m755 "$(dirname $dst)"
- install rhel/$base "$dst"
-done
+
+rhel_cp() {
+ base=$1
+ mode=$2
+ dst=$RPM_BUILD_ROOT/$(echo $base | sed 's,_,/,g')
+ install -D -m $mode rhel/$base $dst
+}
+rhel_cp etc_init.d_openvswitch 0755
+rhel_cp etc_logrotate.d_openvswitch 0644
+rhel_cp etc_sysconfig_network-scripts_ifup-ovs 0755
+rhel_cp etc_sysconfig_network-scripts_ifdown-ovs 0755
+rhel_cp usr_share_openvswitch_scripts_sysconfig.template 0644
+
docdir=$RPM_BUILD_ROOT/usr/share/doc/openvswitch-%{version}
install -d -m755 "$docdir"
install -m 0644 rhel/README.RHEL "$docdir"
@@ -103,7 +106,7 @@ exit 0
%files
%defattr(-,root,root)
/etc/init.d/openvswitch
-/etc/logrotate.d/openvswitch
+%config(noreplace) /etc/logrotate.d/openvswitch
/etc/sysconfig/network-scripts/ifup-ovs
/etc/sysconfig/network-scripts/ifdown-ovs
/etc/openvswitch/bugtool-plugins/*