summaryrefslogtreecommitdiff
path: root/rhel/openvswitch.spec.in
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:29:48 -0800
commit537559908e6ea61223d46fa3d49ffa15218eb75e (patch)
tree48d1e283b781b96ba9363908d2fdf37fb62fde28 /rhel/openvswitch.spec.in
parent81fe12a77582f063f97e75f86b5f10e97dfbcaeb (diff)
downloadopenvswitch-537559908e6ea61223d46fa3d49ffa15218eb75e.tar.gz
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/openvswitch.spec.in')
-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 f9a4e12a8..4d52d3b7e 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/*