forked from veos-sxarr-NEC/veos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
veos.spec.in
183 lines (158 loc) · 4.45 KB
/
veos.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
176
177
178
179
180
181
182
183
Name: @PACKAGE@
Version: @VERSION@
Release: @RELEASE@%{?dist}
Summary: VE Operating System
Group: System Environment/Daemons
License: GPLv2+ and (LGPLv2+ and BSD and MIT)
#URL:
Source0: @PACKAGE@-@[email protected]
Vendor: NEC Corporation
BuildArch: x86_64
BuildRequires: libved-devel velayout-devel
BuildRequires: protobuf-c-devel log4c-devel systemd-devel libuuid-devel
BuildRequires: libcap-devel
BuildRequires: procps-ng-devel
BuildRequires: protobuf-compiler
BuildRequires: ve-memory-mapping-devel
BuildRequires: libdhash-devel
Requires: libved velayout
Requires: protobuf-c log4c systemd-libs libuuid
Requires: libcap
Requires: procps-ng
Requires: protobuf-python
Requires: libdhash
Requires(pre): systemd glibc
Requires(preun): systemd glibc
%description
VEOS is a set of daemons and commands providing operating system
functionality to VE programs.
%package libveptrace
Summary: VE ptrace library
License: GPLv2+
%description libveptrace
This package contains the VE ptrace library.
%package devel
Summary: Headers for VEOS
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libveptrace = %{version}-%{release}
%description devel
This package contains the files required to build system software
which uses VEOS functionality.
This package is not required to build VE programs or libraries.
%package headers
License: MIT
Summary: Headers for VEOS
%description headers
This package contains the header files of definitions of VEOS.
VE programs or libraries include them if required.
%package musl-headers
License: MIT
Summary: Headers for VEOS
%description musl-headers
This package contains the header files of definitions of VEOS.
VE programs or libraries include them if required.
%package libvepseudo-headers
License: LGPLv2+ and BSD
Summary: Headers for libvepseudo
Requires: %{name} = %{version}-%{release}
Requires: libved-devel velayout-devel
%description libvepseudo-headers
This package contains the header files of definition of libvepseudo.
VH programs or libraries using internal functions in libvepseudo
include them.
%define _prefix @prefix@
%define _sysconfdir @sysconfdir@
%define _localstatedir @localstatedir@
%prep
%setup -q
%build
%configure --with-ve-musl-includedir=@ve_musl_includedir@ \
--with-vemm-agent-includedir=@VEMM_AGENT_INCLUDEDIR@ \
--with-binfmtdir=@binfmtdir@ \
--with-limitsdir=@limitsdir@ \
--with-sysctldir=@sysctldir@
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
%pre
for dev in /dev/veslot*; do
if [ $dev == '/dev/veslot*' ]; then
break
fi
sysfs_path=/sys`/usr/bin/udevadm info -q path $dev`/os_state
os_state=`cat $sysfs_path`
if [ $os_state != "1" ]; then
echo "Error: OS state is not offline"
exit 1
fi
done
%post
/sbin/ldconfig
if [ $1 -gt 1 ] ; then
if /usr/bin/systemctl is-active ve-ived.service >/dev/null 2>&1; then
/usr/bin/systemctl stop ve-ived.service
/usr/bin/systemctl start ve-ived.service
fi
fi
if [ $1 -ge 1 ] ; then
/usr/sbin/sysctl --system >/dev/null 2>&1
fi
if [ $1 -eq 1 ] ; then
/usr/bin/systemctl restart systemd-binfmt
fi
%preun
for dev in /dev/veslot*; do
if [ $dev == '/dev/veslot*' ]; then
break
fi
sysfs_path=/sys`/usr/bin/udevadm info -q path $dev`/os_state
os_state=`cat $sysfs_path`
if [ $os_state != "1" ]; then
echo "Error: OS state is not offline"
exit 1
fi
done
%postun
/sbin/ldconfig
%files
%config %{_sysconfdir}/log4crc
%config @binfmtdir@/ve.conf
%config @sysctldir@/10-veos.conf
%config @limitsdir@/10-veos.conf
@ve_os_launcher_confdir@/ve-ived.options
@ve_os_launcher_confdir@/veos_timer.options
@ve_bindir@/*
# GPLv2+
%{_sbindir}/*
@ve_libexecdir@/*
%{_prefix}/lib/python2.7/site-packages/*
%{_prefix}/lib/python2.7/site-packages/*/*
%{_libexecdir}/ve_coredump_helper
%{_libexecdir}/ve_release_resource
# LGPLv2+ and BSD and MIT
%{_libdir}/libvepseudo.so.*
%{_libexecdir}/ve_exec
%doc
%files libveptrace
%{_libdir}/libveptrace.so.*
%files devel
%doc
%{_includedir}/*.h
%{_libdir}/*.a
%{_libdir}/*.la
%{_libdir}/*.so
%files headers
@ve_includedir@/*.h
%files musl-headers
@ve_musl_includedir@/*.h
%files libvepseudo-headers
# LGPLv2+
%{_includedir}/libvepseudo/*.h
%{_includedir}/libvepseudo/amm/*.h
%{_includedir}/libvepseudo/common/handle.h
%{_includedir}/libvepseudo/common/sys_common.h
%{_includedir}/libvepseudo/common/ve_syscall_no.h
%{_includedir}/libvepseudo/loader/loader.h
%{_includedir}/libvepseudo/psm/*.h
# BSD
%{_includedir}/libvepseudo/common/list.h