|
|
9b65e1 |
%global provider github
|
|
|
9b65e1 |
%global provider_tld com
|
|
|
9b65e1 |
%global project Yelp
|
|
|
9b65e1 |
%global repo dumb-init
|
|
|
9b65e1 |
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
|
|
|
9b65e1 |
%global commit d283f8a58bea8374c03becf8f06339670f2f07ee
|
|
|
9b65e1 |
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
|
|
9b65e1 |
|
|
|
9b65e1 |
%global YYYYMMDD 20170802
|
|
|
9b65e1 |
|
|
|
9b65e1 |
Name: %{repo}
|
|
|
9b65e1 |
Version: 1.2.0
|
|
|
9b65e1 |
Release: 1.%{YYYYMMDD}git%{shortcommit}%{?dist}
|
|
|
9b65e1 |
Summary: Entry-point for containers that proxies signals
|
|
|
9b65e1 |
License: MIT
|
|
|
9b65e1 |
URL: https://%{provider_prefix}
|
|
|
9b65e1 |
Source0: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
|
|
|
9b65e1 |
Patch0: initscripts.patch
|
|
|
9b65e1 |
|
|
|
9b65e1 |
BuildRequires: gcc, help2man
|
|
|
9b65e1 |
|
|
|
9b65e1 |
#To build in rhel6, we just run gcc and help2man.
|
|
|
9b65e1 |
#Containers do not work in rhel6, python is old, packages are missing, tests will not work
|
|
|
9b65e1 |
#the following is only for future reference:
|
|
|
9b65e1 |
#BuildRequires: python, python2-pytest, python2-mock
|
|
|
9b65e1 |
# /bin/xxd of vim-common of is needed for non-released versions
|
|
|
9b65e1 |
# BuildRequires: vim-common
|
|
|
9b65e1 |
|
|
|
9b65e1 |
%description
|
|
|
9b65e1 |
dumb-init is a simple process supervisor and init system designed to run as
|
|
|
9b65e1 |
PID 1 inside minimal container environments (such as Docker).
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* It can handle orphaned zombie processes.
|
|
|
9b65e1 |
* It can pass signals properly for simple containers.
|
|
|
9b65e1 |
|
|
|
9b65e1 |
%prep
|
|
|
9b65e1 |
%setup -q -n %{name}-%{commit}
|
|
|
9b65e1 |
%patch0 -p1 -b .initscripts
|
|
|
9b65e1 |
|
|
|
9b65e1 |
%build
|
|
|
9b65e1 |
gcc -std=gnu99 %{optflags} -o %{name} dumb-init.c
|
|
|
9b65e1 |
|
|
|
9b65e1 |
#a wrapper to redirect stderr for old help2man
|
|
|
9b65e1 |
cat <<EOF >%{name}.wrapper
|
|
|
9b65e1 |
#!/bin/bash
|
|
|
9b65e1 |
./dumb-init "\$@" 2>&1
|
|
|
9b65e1 |
EOF
|
|
|
9b65e1 |
|
|
|
9b65e1 |
chmod a+x %{name}.wrapper
|
|
|
9b65e1 |
help2man --include debian/help2man --no-info --name '%{summary}' ./%{name}.wrapper> %{name}.1
|
|
|
9b65e1 |
rm %{name}.wrapper
|
|
|
9b65e1 |
|
|
|
9b65e1 |
#sadly, in rhel6, no containers, no tests
|
|
|
9b65e1 |
#%%check
|
|
|
9b65e1 |
#PATH=.:$PATH py.test tests/
|
|
|
9b65e1 |
|
|
|
9b65e1 |
%install
|
|
|
9b65e1 |
install -Dpm0755 %{name} %{buildroot}%{_bindir}/%{name}
|
|
|
9b65e1 |
install -Dpm0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
|
|
9b65e1 |
|
|
|
9b65e1 |
%files
|
|
|
9b65e1 |
%{_bindir}/%{name}
|
|
|
9b65e1 |
%{_mandir}/man1/%{name}.1*
|
|
|
9b65e1 |
%doc README.md LICENSE
|
|
|
9b65e1 |
|
|
|
9b65e1 |
%changelog
|
|
|
9b65e1 |
* Mon Aug 21 2017 Frantisek Kluknavsky <fkluknav@redhat.com> - 1.2.0-2.20170802gitd283f8a
|
|
|
9b65e1 |
- rebased and heavily adapted for rhel6
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-11
|
|
|
9b65e1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Wed Aug 31 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-10
|
|
|
9b65e1 |
- revert to python2
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Wed Aug 31 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-9
|
|
|
9b65e1 |
- support epel
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Fri Aug 26 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-8
|
|
|
9b65e1 |
- run tests
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Wed Aug 17 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-7
|
|
|
9b65e1 |
- let manpage automatically marked as document
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Wed Aug 17 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-6
|
|
|
9b65e1 |
- remove gzip after help2man
|
|
|
9b65e1 |
- add missing BuildRequire
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Wed Aug 17 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-4
|
|
|
9b65e1 |
- install 644 for manpage
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Wed Aug 17 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-3
|
|
|
9b65e1 |
- remove vim-common and use install
|
|
|
9b65e1 |
|
|
|
9b65e1 |
* Mon Aug 15 2016 Muayyad Alsadi <alsadi@gmail.com> - 1.1.3-2
|
|
|
9b65e1 |
- initial packaging
|