-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathqore-process-module.spec
More file actions
134 lines (108 loc) · 4.18 KB
/
qore-process-module.spec
File metadata and controls
134 lines (108 loc) · 4.18 KB
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
%define module_api %(qore --module-api 2>/dev/null)
%define module_dir %{_libdir}/qore-modules
%if 0%{?sles_version}
%define dist .sles%{?sles_version}
%else
%if 0%{?suse_version}
# get *suse release major version
%define os_maj %(echo %suse_version|rev|cut -b3-|rev)
# get *suse release minor version without trailing zeros
%define os_min %(echo %suse_version|rev|cut -b-2|rev|sed s/0*$//)
%if %suse_version
%define dist .opensuse%{os_maj}_%{os_min}
%endif
%endif
%endif
# see if we can determine the distribution type
%if 0%{!?dist:1}
%define rh_dist %(if [ -f /etc/redhat-release ];then cat /etc/redhat-release|sed "s/[^0-9.]*//"|cut -f1 -d.;fi)
%if 0%{?rh_dist}
%define dist .rhel%{rh_dist}
%else
%define dist .unknown
%endif
%endif
Summary: process module for Qore
Name: qore-process-module
Version: 2.0.0
Release: 1%{dist}
License: LGPL-2.1-or-later
Group: Development/Languages/Other
URL: http://www.qore.org
Source: https://github.com/qorelanguage/module-process/releases/download/release-%{version}/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: /usr/bin/env
Requires: qore-module-api-%{module_api}
BuildRequires: cmake >= 3.5
BuildRequires: gcc-c++
BuildRequires: qore-devel >= 2.0
BuildRequires: qore-stdlib >= 2.0
BuildRequires: qore >= 2.0
BuildRequires: openssl-devel
BuildRequires: doxygen
%if 0%{?el7}
BuildRequires: devtoolset-7-gcc-c++
%endif
%description
process API module for the Qore Programming Language.
%if 0%{?suse_version}
%debug_package
%endif
%prep
%setup -q
%build
%if 0%{?el7}
# enable devtoolset7
. /opt/rh/devtoolset-7/enable
%endif
export CXXFLAGS="%{?optflags}"
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=RELWITHDEBINFO -DCMAKE_SKIP_RPATH=1 -DCMAKE_SKIP_INSTALL_RPATH=1 -DCMAKE_SKIP_BUILD_RPATH=1 -DCMAKE_PREFIX_PATH=${_prefix}/lib64/cmake/Qore .
make %{?_smp_mflags}
make %{?_smp_mflags} docs
sed -i 's/#!\/usr\/bin\/env qore/#!\/usr\/bin\/qore/' test/*.qtest
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%check
qore -l ./process-api-1.4.qmod test/process.qtest -v
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%{module_dir}
%doc COPYING README test/process.qtest test/test_cwd.q test/test_env.q test/test_false.q test/test_io.q test/test_output.q test/test_signal.q test/test_sleep.q test/test_stdin_eof.q test/test_true.q test/test_utf8.q
%package doc
Summary: Documentation and examples for the Qore process module
Group: Development/Languages/Other
%description doc
This package contains the HTML documentation and example programs for the Qore
process module.
%files doc
%defattr(-,root,root,-)
%doc docs/process test
%changelog
* Mon Dec 30 2025 David Nichols <david.nichols@qoretechnologies.com>
- updated to boost 1.90 (includes exit-code fix for terminate + async_wait)
- added PID validation to static Process::terminate(), Process::checkPid(),
and Process::waitForTermination() to prevent kill(-1) from killing all processes
* Sun Dec 29 2025 David Nichols <david.nichols@qoretechnologies.com>
- added sendSignal() method to send signals to processes
- added closeStdin() method to close stdin pipe and signal EOF
- added Process::run() static method for synchronous command execution with timeout
- added getResourceUsage() method and static variant for resource usage stats
- added getChildPids() method and static variant to get child process IDs
- added terminateTree() method to terminate process and all descendants
- added Process::pipeline() static method for command pipelines
- added constructor options: encoding, shell, nice, limits
- added critical safety checks to prevent kill(-1) from killing all user processes
- child processes now run in their own process group for signal isolation
* Mon Aug 11 2025 David Nichols <david.nichols@qoretechnologies.com>
- updated to use boost process 2.0
- updated to version 2.0
* Mon Dec 19 2022 David Nichols <david.nichols@qoretechnologies.com>
- updated to version 1.0.5
* Mon Jan 10 2022 David Nichols <david.nichols@qoretechnologies.com>
- updated to version 1.0.4
* Mon Dec 27 2021 David Nichols <david.nichols@qoretechnologies.com>
- updated to version 1.0.3
* Fri Sep 17 2021 David Nichols <david.nichols@qoretechnologies.com>
- initial spec file