Skip to content

Commit ef5326d

Browse files
author
Chris Johnson
committed
Fixes multiple out-of-spec errors.
1 parent 05d939d commit ef5326d

1 file changed

Lines changed: 24 additions & 13 deletions

File tree

rpm/specfiles/simengine.spec

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,67 @@
11
Name: simengine
22
Version: 2
33
Release: 2
4-
Summary: SimEngine
4+
Summary: Hardware Simulation Engine
55
URL: https://github.com/Seneca-CDOT/simengine
66
License: GPLv3+
77

88
%global gittag 2
99

1010
Source0: https://github.com/Seneca-CDOT/%{name}/archive/%{gittag}/%{name}-%{version}.tar.gz
1111

12-
BuildRequires: OpenIPMI-devel, gcc
12+
Requires(pre): shadow-utils
13+
BuildRequires: OpenIPMI-devel, gcc, systemd
1314
Requires: neo4j, cypher-shell, redis, python-neo4j-driver, python-redis, python3-libvirt, OpenIPMI, OpenIPMI-lanserv, python3-redis, python2-redis, python3-pysnmp, python3-neo4j-driver, httpd
1415

1516
%description
16-
Core files for SimEngine.
17+
Simengine is a hardware simulation engine that models high-availability setups.
1718

1819
%global debug_package %{nil}
1920

2021
%pre
2122
systemctl stop neo4j
2223
pip3 install circuits
24+
getent group neo4j >/dev/null || groupadd -r neo4j
25+
getent passwd neo4j >/dev/null || \
26+
useradd -r -g neo4j -s /sbin/nologin \
27+
-c "Neo4j Database Account" neo4j
28+
exit 0
2329

2430
%prep
2531
%autosetup -n %{name}-%{version}
2632

2733
%build
2834
gcc -shared -o %{_builddir}/%{name}-%{version}/haos_extend.so -fPIC %{_builddir}/%{name}-%{version}/enginecore/ipmi_sim/haos_extend.c
35+
objcopy --only-keep-debug %{_builddir}/%{name}-%{version}/haos_extend.so %{_builddir}/%{name}-%{version}/haos_extend.debug
36+
strip --strip-debug --strip-unneeded %{_builddir}/%{name}-%{version}/haos_extend.so
2937

3038
%install
3139
mkdir -p %{buildroot}%{_sharedstatedir}/neo4j/data/dbms/
3240
mkdir -p %{buildroot}%{_datadir}/%{name}/
33-
mkdir -p %{buildroot}/usr/lib/%{name}/
34-
mkdir -p %{buildroot}/usr/lib/systemd/system/
41+
mkdir -p %{buildroot}%{_libdir}/%{name}/
42+
mkdir -p %{buildroot}%{_unitdir}/
3543
mkdir -p %{buildroot}%{_bindir}/
3644
mkdir -p %{buildroot}%{_var}/www/html/%{name}/
3745
cp -fRp dashboard/prebuild/* %{buildroot}%{_var}/www/html/%{name}/
3846
cp -fp database/auth %{buildroot}%{_sharedstatedir}/neo4j/data/dbms/
39-
cp -fp haos_extend.so %{buildroot}/usr/lib/%{name}/
47+
cp -fp haos_extend.so %{buildroot}%{_libdir}/%{name}/
4048
cp -fRp enginecore %{buildroot}%{_datadir}/%{name}/
4149
cp -fRp data %{buildroot}%{_datadir}/%{name}/
42-
cp -fp services/simengine-core.service %{buildroot}/usr/lib/systemd/system/
43-
ln -s /usr/share/%{name}/enginecore/simengine-cli %{buildroot}%{_bindir}/simengine-cli
50+
cp -fp services/simengine-core.service %{buildroot}%{_unitdir}/
51+
ln -s %{_datadir}/%{name}/enginecore/simengine-cli %{buildroot}%{_bindir}/simengine-cli
4452
exit 0
4553

4654
%files
4755
%attr(0644, neo4j, neo4j) %{_sharedstatedir}/neo4j/data/dbms/auth
48-
/usr/lib/%{name}/haos_extend.so
56+
%{_libdir}/%{name}/haos_extend.so
4957
%{_datadir}/%{name}/enginecore
5058
%{_datadir}/%{name}/data
51-
/usr/lib/systemd/system/simengine-core.service
59+
%{_unitdir}/simengine-core.service
5260
%{_bindir}/simengine-cli
5361
%{_var}/www/html/%{name}/
62+
%exclude %{_datadir}/%{name}/enginecore/.pylintrc
63+
%exclude %{_datadir}/%{name}/enginecore/ipmi_sim/haos_extend.c
64+
%exclude %{_datadir}/%{name}/enginecore/ipmi_sim/.gitignore
5465

5566
%post
5667
systemctl daemon-reload
@@ -61,12 +72,12 @@ echo "CREATE CONSTRAINT ON (n:Asset) ASSERT (n.key) IS UNIQUE;" | cypher-shell -
6172
systemctl enable simengine-core.service --now
6273

6374
%changelog
64-
* Thu Aug 23 2018 Chris Johnson <chris.johnson@senecacollege.ca>
75+
* Thu Aug 23 2018 Chris Johnson <chris.johnson@senecacollege.ca> 2-2
6576
- Converted paths to macros where applicable
6677
- Changed source to GitHub URL using gittag release version
6778

68-
* Thu Aug 16 2018 Chris Johnson <chris.johnson@senecacollege.ca>
79+
* Thu Aug 16 2018 Chris Johnson <chris.johnson@senecacollege.ca> 1-2
6980
- Updated dependencies
7081

71-
* Mon Jul 23 2018 Chris Johnson <chris.johnson@senecacollege.ca>
82+
* Mon Jul 23 2018 Chris Johnson <chris.johnson@senecacollege.ca> 1-1
7283
- Initial alpha test file

0 commit comments

Comments
 (0)