-
Notifications
You must be signed in to change notification settings - Fork 55
/
powerpc-utils.spec.in
175 lines (158 loc) · 4.47 KB
/
powerpc-utils.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
%bcond_with systemd
%define name powerpc-utils
%define version @PACKAGE_VERSION@
%define release 1
Summary: Utilities for PowerPC platforms
Name: %{name}
Version: %{version}
Release: %{release}
License: GNU General Public License (GPL)
Group: System Environment
Source: powerpc-utils-%{version}.tar.gz
BuildRoot: /tmp/%{name}-buildroot/
Vendor: IBM Corp.
Requires: /bin/bash, /bin/sh, /bin/sed, /usr/bin/perl, librtas >= 1.4.0, zlib, numactl-libs
Requires: coreutils
Requires: findutils
Requires: gawk
Requires: grep
Requires: /sbin/modprobe
Requires: /sbin/shutdown
Requires: udev
Requires: util-linux
Requires: which
%description
Utilities for maintaining and servicing PowerPC systems.
%prep
%setup -q
%build
%configure %{?_with_systemd} --disable-werror
%{__make} %{?_smp_mflags}
%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__make} install DESTDIR=$RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/share/doc/packages/powerpc-utils/README
/usr/share/doc/packages/powerpc-utils/COPYING
/usr/sbin/update_flash
/usr/sbin/update_flash_nv
/usr/sbin/activate_firmware
/usr/sbin/set_poweron_time
/usr/sbin/rtas_ibm_get_vpd
/usr/sbin/serv_config
/usr/sbin/uesensor
/usr/sbin/hvcsadmin
/usr/sbin/rtas_dump
/usr/sbin/rtas_event_decode
/usr/sbin/sys_ident
/usr/sbin/drmgr
/usr/sbin/lsslot
/usr/sbin/lparnumascore
/usr/sbin/lsprop
/usr/sbin/nvram
/usr/sbin/nvsetenv
/usr/sbin/snap
/usr/sbin/bootlist
/usr/sbin/ofpathname
/usr/sbin/ppc64_cpu
/usr/sbin/lsdevinfo
/usr/sbin/ls-veth
/usr/sbin/ls-vdev
/usr/sbin/ls-vscsi
/usr/sbin/lparstat
/usr/sbin/pseries_platform
/usr/sbin/errinjct
/usr/sbin/rtas_dbg
/usr/sbin/vcpustat
/usr/sbin/hcnmgr
/usr/sbin/hcncfgdrc
/usr/sbin/hcnqrydev
/usr/sbin/hcnrmdev
/usr/sbin/hcnrmhcn
/usr/sbin/hcnversion
/usr/bin/amsstat
%if 0%{?suse_version}
/usr/lib/powerpc-utils/functions.suse
%endif
%if %{with systemd}
/usr/sbin/smtstate
/var/lib/powerpc-utils/smt.state
/lib/systemd/system/smtstate.service
/lib/systemd/system/smt_off.service
/lib/systemd/system/hcn-init-NetworkManager.service
/lib/systemd/system/hcn-init-wicked.service
/usr/share/man/man8/smtstate.8.gz
%endif
/usr/share/man/man8/update_flash.8.gz
/usr/share/man/man8/activate_firmware.8.gz
/usr/share/man/man8/set_poweron_time.8.gz
/usr/share/man/man8/rtas_ibm_get_vpd.8.gz
/usr/share/man/man8/serv_config.8.gz
/usr/share/man/man8/uesensor.8.gz
/usr/share/man/man8/hvcsadmin.8.gz
/usr/share/man/man8/rtas_dump.8.gz
/usr/share/man/man8/sys_ident.8.gz
/usr/share/man/man8/nvram.8.gz
/usr/share/man/man8/snap.8.gz
/usr/share/man/man8/bootlist.8.gz
/usr/share/man/man8/ofpathname.8.gz
/usr/share/man/man5/lparcfg.5.gz
/usr/share/man/man8/lparstat.8.gz
/usr/share/man/man8/lsslot.8.gz
/usr/share/man/man8/ppc64_cpu.8.gz
/usr/share/man/man1/amsstat.1.gz
/usr/share/man/man8/errinjct.8.gz
/usr/share/man/man8/rtas_dbg.8.gz
/usr/share/man/man8/vcpustat.8.gz
/usr/share/man/man8/drmgr.8.gz
/usr/share/man/man8/lparnumascore.8.gz
%post
# Post-install script -----------------------------------------------
ln -sf /usr/sbin/serv_config usr/sbin/uspchrp
ln -sf /usr/share/man/man8/serv_config.8 usr/share/man/man8/uspchrp.8
%if %{with systemd}
systemctl daemon-reload
for i in NetworkManager wicked ; do
systemctl start hcn-init-${i}.service
systemctl enable hcn-init-${i}.service
done
# update the smt.state file with current SMT
/usr/sbin/smtstate --save
%endif
%preun
# Pre-uninstall script ----------------------------------------------
%if %{with systemd}
svc=$(systemctl list-units -la | grep -Fq smtstate.service; echo $?)
if [ "$svc" = "0" ]; then
systemctl stop smtstate.service
systemctl disable smtstate.service
fi
for i in NetworkManager wicked ; do
if systemctl is-enabled hcn-init-${i}.service |grep -q "enabled"; then
systemctl stop hcn-init-${i}.service
systemctl disable hcn-init-${i}.service
fi
done
%endif
%postun
# Post-uninstall script ---------------------------------------------
if [ "$1" = "0" ]; then
# last uninstall
rm -f /usr/sbin/uspchrp
rm -f /usr/share/man/man8/uspchrp.8.gz
fi
%if %{with systemd}
systemctl daemon-reload
%endif
%changelog
* Wed Apr 14 2021 Laurent Dufour <[email protected]>
- Added lparnumascore
* Fri Mar 06 2020 Naveen N. Rao <[email protected]>
- Added vcpustat utility
* Wed Dec 7 2011 Brian King <[email protected]>
- Added lsslot man page
* Fri May 13 2011 Brian King <[email protected]>
- Fixed some ofpathname issues with various SAS and FC adapters
* Fri Mar 11 2011 Brian King <[email protected]>
- Do not install vscsi server scripts, since they are deprecated