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