install smt.state as config file
drop nvsetenv which is included in upstream
This commit is contained in:
parent
09dcdb9862
commit
cbd4e8bc94
14
nvsetenv
14
nvsetenv
@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ "$1" = "--version" ]; then
|
|
||||||
echo This version of nvsetenv is just a wrapper to invoke nvram
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
nvram --print-config
|
|
||||||
elif [ -z "$2" ]; then
|
|
||||||
nvram --print-config="$1"
|
|
||||||
else
|
|
||||||
nvram --update-config "$1"="$2"
|
|
||||||
fi
|
|
||||||
exit $?
|
|
@ -1,12 +1,11 @@
|
|||||||
Name: powerpc-utils
|
Name: powerpc-utils
|
||||||
Version: 1.3.10
|
Version: 1.3.10
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
Summary: PERL-based scripts for maintaining and servicing PowerPC systems
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
URL: https://github.com/ibm-power-utilities/powerpc-utils
|
URL: https://github.com/ibm-power-utilities/powerpc-utils
|
||||||
Source0: https://github.com/ibm-power-utilities/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/ibm-power-utilities/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||||
Source1: nvsetenv
|
|
||||||
Patch0: powerpc-utils-1.3.10-manpages.patch
|
Patch0: powerpc-utils-1.3.10-manpages.patch
|
||||||
Patch1: powerpc-utils-1.3.10-distro.patch
|
Patch1: powerpc-utils-1.3.10-distro.patch
|
||||||
|
|
||||||
@ -61,15 +60,13 @@ Core utilities for maintaining and servicing PowerPC systems.
|
|||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
%configure --with-systemd=%{_unitdir} --disable-werror
|
%configure --with-systemd=%{_unitdir} --disable-werror
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags} V=1
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=$RPM_BUILD_ROOT FILES= RCSCRIPTS=
|
make install DESTDIR=$RPM_BUILD_ROOT FILES= RCSCRIPTS=
|
||||||
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sbindir}/nvsetenv
|
|
||||||
|
|
||||||
#define pkgdocdir {_datadir}/doc/{name}-{version}
|
#define pkgdocdir {_datadir}/doc/{name}-{version}
|
||||||
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||||
@ -95,11 +92,6 @@ rm -f $RPM_BUILD_ROOT%{_sbindir}/snap $RPM_BUILD_ROOT%{_mandir}/man8/snap.8*
|
|||||||
|
|
||||||
%post core
|
%post core
|
||||||
%systemd_post hcn-init.service
|
%systemd_post hcn-init.service
|
||||||
# add default SMT_VALUE=1 in smt.state
|
|
||||||
SMTSTATE=/var/lib/powerpc-utils/smt.state
|
|
||||||
if [ ! -f $SMTSTATE ] ; then
|
|
||||||
echo SMT_VALUE=1 > $SMTSTATE
|
|
||||||
fi
|
|
||||||
# update the smt.state file with current SMT
|
# update the smt.state file with current SMT
|
||||||
/usr/sbin/smtstate --save >/dev/null 2>&1 || :
|
/usr/sbin/smtstate --save >/dev/null 2>&1 || :
|
||||||
|
|
||||||
@ -124,8 +116,8 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
|||||||
|
|
||||||
%files core
|
%files core
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%dir /var/lib/powerpc-utils
|
%dir %{_localstatedir}/lib/powerpc-utils
|
||||||
%ghost %config(missingok,noreplace) /var/lib/powerpc-utils/smt.state
|
%config(noreplace) %{_localstatedir}/lib/powerpc-utils/smt.state
|
||||||
%{_unitdir}/smtstate.service
|
%{_unitdir}/smtstate.service
|
||||||
%{_unitdir}/smt_off.service
|
%{_unitdir}/smt_off.service
|
||||||
%{_unitdir}/hcn-init.service
|
%{_unitdir}/hcn-init.service
|
||||||
@ -200,6 +192,10 @@ systemctl enable hcn-init.service >/dev/null 2>&1 || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 08 2022 Than Ngo <than@redhat.com> - 1.3.10-2
|
||||||
|
- install smt.state as config file
|
||||||
|
- drop nvsetenv which is included in upstream
|
||||||
|
|
||||||
* Fri Jun 03 2022 Than Ngo <than@redhat.com> - 1.3.10-1
|
* Fri Jun 03 2022 Than Ngo <than@redhat.com> - 1.3.10-1
|
||||||
- update to 1.3.10
|
- update to 1.3.10
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user