]>
Commit | Line | Data |
---|---|---|
a1e49a26 | 1 | %define _rel 0.7 |
73048336 | 2 | Summary: EMC PowerPath - multi-path with fail-over and load-sharing over SCSI |
26d042b4 | 3 | Summary(pl.UTF-8): EMC PowerPath - multi-path z fail-over i dzieleniem obciążenia po SCSI |
60cd4962 | 4 | Name: EMCpower |
d2c9fe38 | 5 | Version: 5.0.0 |
60cd4962 ER |
6 | Release: %{_rel} |
7 | License: Proprietary (not distributable) | |
d2c9fe38 ER |
8 | Group: Base |
9 | Source0: %{name}.LINUX-%{version}-157.sles10.i386.rpm | |
10 | # NoSource0-md5: 9e687044c65d2ee368b71c339e639522 | |
11 | Source1: %{name}.LINUX-%{version}-157.sles10.x86_64.rpm | |
12 | # NoSource1-md5: cf980fc4714f0be008de168333cefcb4 | |
73048336 JB |
13 | NoSource: 0 |
14 | NoSource: 1 | |
130b9031 | 15 | Patch0: %{name}-init.patch |
a1e49a26 | 16 | Obsoletes: EMCpower.LINUX |
60cd4962 ER |
17 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
18 | ||
77c33a41 | 19 | %define _sysconfdir /something/bogus |
19cb858a | 20 | %define _sbindir /sbin |
130b9031 | 21 | |
60cd4962 ER |
22 | %description |
23 | Multi-path software providing fail-over and load-sharing for SCSI | |
24 | disks. | |
25 | ||
c10c84e7 JR |
26 | %description -l pl.UTF-8 |
27 | Oprogramowanie do multi-path z opcją fail-over i dzieleniem obciążenia | |
28 | między dyski SCSI. | |
73048336 | 29 | |
60cd4962 ER |
30 | |
31 | %prep | |
32 | %setup -qcT | |
33 | %ifarch %{ix86} | |
34 | rpm2cpio %{SOURCE0} | cpio -dimu | |
35 | %endif | |
36 | %ifarch %{x8664} | |
37 | rpm2cpio %{SOURCE1} | cpio -dimu | |
38 | %endif | |
39 | mv etc/opt/emcpower/EMCpower.LINUX-%{version}/* . | |
a1e49a26 ER |
40 | cp PowerPath{.rhel,} |
41 | %patch0 -p1 | |
42 | echo 'options emcp managedclass=symm,clariion,hitachi,invista,hpxp,ess,hphsx' >> modprobe.conf.pp | |
60cd4962 ER |
43 | |
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
a1e49a26 | 46 | install -d $RPM_BUILD_ROOT{/etc/emc/ppme,%{_libdir}/emc,%{_sbindir},%{_mandir}/man1,/etc/modprobe.d,%{_datadir}/locale,/etc/rc.d/init.d} |
60cd4962 ER |
47 | |
48 | cp -a man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
49 | install modprobe.conf.pp $RPM_BUILD_ROOT/etc/modprobe.d/%{name}.conf | |
50 | cp -a i18n/catalog/* $RPM_BUILD_ROOT%{_datadir}/locale | |
a1e49a26 | 51 | install PowerPath $RPM_BUILD_ROOT/etc/rc.d/init.d/PowerPath |
60cd4962 ER |
52 | install bin/lib/* $RPM_BUILD_ROOT%{_libdir} |
53 | install bin/cmds/* $RPM_BUILD_ROOT%{_sbindir} | |
a1e49a26 | 54 | cp -a bin/.drivers_* $RPM_BUILD_ROOT/etc/emc |
60cd4962 ER |
55 | |
56 | %find_lang EMCpower | |
57 | %find_lang PowerPath | |
58 | cat PowerPath.lang >> EMCpower.lang | |
d4b26b0f ER |
59 | |
60 | # hardcoded paths. oh sigh | |
6d2ba32c | 61 | install -d $RPM_BUILD_ROOT/etc/opt/emcpower/.tmp |
d4b26b0f ER |
62 | ln -s %{_sbindir}/emcpmgr $RPM_BUILD_ROOT/etc/opt/emcpower |
63 | ln -s %{_sbindir}/powercf $RPM_BUILD_ROOT/etc/opt/emcpower | |
6d2ba32c ER |
64 | touch $RPM_BUILD_ROOT/etc/opt/emcpower/.__emcp_db_global_lock |
65 | touch $RPM_BUILD_ROOT/etc/opt/emcpower/.__emcp_db_lock | |
66 | ||
d4b26b0f | 67 | install -d $RPM_BUILD_ROOT/opt/emcpower |
6d2ba32c | 68 | install -d $RPM_BUILD_ROOT/etc/emcpower |
77c33a41 | 69 | touch $RPM_BUILD_ROOT/etc/emc/mpaa.{excluded,lams} |
60cd4962 ER |
70 | |
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
77c33a41 | 74 | %if 0 |
11f9f943 ER |
75 | %verifyscript |
76 | echo "These PowerPath modules are installed" | |
77 | /sbin/lsmod | head -n 1 | |
78 | /sbin/lsmod | grep emc | |
79 | echo "DONE" | |
80 | ||
5c57202d ER |
81 | %pre |
82 | # Check - Only install on a 2.6 kernel | |
83 | expr `uname -r` : '2\.6' > /dev/null | |
84 | if [ $? -ne 0 ]; then | |
85 | echo "This PowerPath package does not support this kernel." | |
86 | exit 1 | |
87 | fi | |
88 | ||
89 | # Check - Make sure no devices are in use. | |
90 | if [ "`/sbin/lsmod | grep -w emcp`" != "" ]; then | |
91 | /sbin/powermt save > /dev/null 2>&1 | |
92 | /sbin/powermt remove dev=all > /dev/null 2>&1 | |
93 | if [ "`powermt display dev=all 2>&1 | grep "not found"`" = "" ]; then | |
94 | echo "Unable to remove devices from the PowerPath configuration." | |
95 | echo "Please make sure no PowerPath devices are in use and retry." | |
96 | /sbin/powermt config > /dev/null 2>&1 | |
97 | /sbin/powermt load > /dev/null 2>&1 | |
98 | exit 1 | |
99 | fi | |
100 | /sbin/powermt config > /dev/null 2>&1 | |
101 | /sbin/powermt load > /dev/null 2>&1 | |
102 | fi | |
77c33a41 | 103 | %endif |
5c57202d | 104 | |
60cd4962 ER |
105 | %files -f EMCpower.lang |
106 | %defattr(644,root,root,755) | |
77c33a41 ER |
107 | %dir /etc/emc |
108 | %dir /etc/emc/ppme | |
a1e49a26 | 109 | /etc/emc/.drivers_* |
77c33a41 ER |
110 | %ghost /etc/emc/mpaa.excluded |
111 | %ghost /etc/emc/mpaa.lams | |
60cd4962 | 112 | /etc/modprobe.d/EMCpower.conf |
a1e49a26 | 113 | %attr(754,root,root) /etc/rc.d/init.d/PowerPath |
60cd4962 ER |
114 | %attr(755,root,root) %{_sbindir}/emcpadm |
115 | %attr(755,root,root) %{_sbindir}/emcpdiscover | |
116 | %attr(755,root,root) %{_sbindir}/emcpmgr | |
117 | %attr(755,root,root) %{_sbindir}/emcppurge | |
118 | %attr(755,root,root) %{_sbindir}/emcpreg | |
119 | %attr(755,root,root) %{_sbindir}/powercf | |
120 | %attr(755,root,root) %{_sbindir}/powermt | |
121 | %attr(755,root,root) %{_sbindir}/powerprotect | |
d2c9fe38 ER |
122 | %attr(755,root,root) %{_sbindir}/powermig |
123 | %attr(755,root,root) %{_sbindir}/pp_inq | |
a1e49a26 | 124 | %dir %{_libdir}/emc |
73048336 JB |
125 | %attr(755,root,root) %{_libdir}/libemcp.so |
126 | %attr(755,root,root) %{_libdir}/libemcp_core.so | |
127 | %attr(755,root,root) %{_libdir}/libemcp_lam.so | |
128 | %attr(755,root,root) %{_libdir}/libemcp_lic_rtl.so | |
129 | %attr(755,root,root) %{_libdir}/libemcp_mp_rtl.so | |
130 | %attr(755,root,root) %{_libdir}/libemcpmp.so | |
131 | %attr(755,root,root) %{_libdir}/libpn.so | |
60cd4962 ER |
132 | %{_mandir}/man1/emcpadm.1* |
133 | %{_mandir}/man1/emcpreg.1* | |
134 | %{_mandir}/man1/emcpupgrade.1* | |
d2c9fe38 | 135 | %{_mandir}/man1/powerformat.1* |
60cd4962 ER |
136 | %{_mandir}/man1/powermig.1* |
137 | %{_mandir}/man1/powermt.1* | |
138 | %{_mandir}/man1/powerprotect.1* | |
dc84bbb8 ER |
139 | |
140 | # hardcoded paths. oh sigh | |
d2c9fe38 | 141 | %dir /etc/opt/emcpower |
6d2ba32c ER |
142 | %ghost /etc/opt/emcpower/.__emcp_db_global_lock |
143 | %ghost /etc/opt/emcpower/.__emcp_db_lock | |
dc84bbb8 | 144 | /opt/emcpower |
6d2ba32c | 145 | %dir /etc/emcpower |