From acbc2fa9dc2ce4c3e5f0aef3c65ebe6a9230bf73 Mon Sep 17 00:00:00 2001 From: alsadi Date: Mon, 15 Aug 2016 10:54:32 +0300 Subject: [PATCH 1/8] add spec file needed to build rpms --- dumb-init.spec | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 dumb-init.spec diff --git a/dumb-init.spec b/dumb-init.spec new file mode 100644 index 0000000..6304d0d --- /dev/null +++ b/dumb-init.spec @@ -0,0 +1,46 @@ +Name: dumb-init +Version: 1.1.3 +Release: 1%{?dist} +Summary: Entry-point for containers that proxies signals + +License: MIT +URL: https://github.com/Yelp/dumb-init +Source0: https://github.com/Yelp/dumb-init/archive/v1.1.3.tar.gz + +BuildRequires: vim-common +BuildRequires: help2man + +%description +dumb-init is a simple process supervisor and init system designed to run as +PID 1 inside minimal container environments (such as Docker). + +* It can handle orphaned zombie processes. +* It can pass signals properly for simple containers. + +%prep +%setup -q + +%build + +# if we are building a release then this is not needed +# make VERSION.h +gcc -std=gnu99 %{optflags} -o %{name} dumb-init.c +help2man --no-discard-stderr --include debian/help2man --no-info --name '%{summary}' ./%{name} | gzip -9 > %{name}.1.gz + + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p "${RPM_BUILD_ROOT}/%{_bindir}" "${RPM_BUILD_ROOT}/%{_mandir}/man1/" +cp %{name} "${RPM_BUILD_ROOT}/%{_bindir}/" +cp %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" + +%files +%{_bindir}/%{name} +%license LICENSE +%doc README.md +%doc %{_mandir}/man1/%{name}.1.gz + + +%changelog +* Mon Aug 15 2016 alsadi - 1.1.3-1 +- initial packaging From 8c19a0af445921cc00b922c866557a25493729c7 Mon Sep 17 00:00:00 2001 From: alsadi Date: Mon, 15 Aug 2016 12:14:40 +0300 Subject: [PATCH 2/8] make version in url use version macro --- dumb-init.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dumb-init.spec b/dumb-init.spec index 6304d0d..ad3787e 100644 --- a/dumb-init.spec +++ b/dumb-init.spec @@ -1,11 +1,11 @@ Name: dumb-init Version: 1.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Entry-point for containers that proxies signals License: MIT URL: https://github.com/Yelp/dumb-init -Source0: https://github.com/Yelp/dumb-init/archive/v1.1.3.tar.gz +Source0: https://github.com/Yelp/dumb-init/archive/v%{version}.tar.gz BuildRequires: vim-common BuildRequires: help2man @@ -42,5 +42,5 @@ cp %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" %changelog -* Mon Aug 15 2016 alsadi - 1.1.3-1 +* Mon Aug 15 2016 alsadi - 1.1.3-2 - initial packaging From 2c8589b8a72160211a85a4893caf66d6c5372bc0 Mon Sep 17 00:00:00 2001 From: alsadi Date: Wed, 17 Aug 2016 01:21:15 +0300 Subject: [PATCH 3/8] update spec due to package review --- dumb-init.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dumb-init.spec b/dumb-init.spec index ad3787e..456246d 100644 --- a/dumb-init.spec +++ b/dumb-init.spec @@ -1,13 +1,14 @@ Name: dumb-init Version: 1.1.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Entry-point for containers that proxies signals License: MIT URL: https://github.com/Yelp/dumb-init Source0: https://github.com/Yelp/dumb-init/archive/v%{version}.tar.gz -BuildRequires: vim-common +# /bin/xxd of vim-common of is needed for non-released versions +# BuildRequires: vim-common BuildRequires: help2man %description @@ -21,26 +22,25 @@ PID 1 inside minimal container environments (such as Docker). %setup -q %build - -# if we are building a release then this is not needed +# uncomment next line when building a non-released version # make VERSION.h gcc -std=gnu99 %{optflags} -o %{name} dumb-init.c help2man --no-discard-stderr --include debian/help2man --no-info --name '%{summary}' ./%{name} | gzip -9 > %{name}.1.gz - %install -rm -rf $RPM_BUILD_ROOT mkdir -p "${RPM_BUILD_ROOT}/%{_bindir}" "${RPM_BUILD_ROOT}/%{_mandir}/man1/" -cp %{name} "${RPM_BUILD_ROOT}/%{_bindir}/" -cp %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" +install -pm 755 %{name} "${RPM_BUILD_ROOT}/%{_bindir}/" +install -pm 755 %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" %files %{_bindir}/%{name} %license LICENSE %doc README.md -%doc %{_mandir}/man1/%{name}.1.gz - +%{_mandir}/man1/%{name}.1.gz %changelog -* Mon Aug 15 2016 alsadi - 1.1.3-2 +* Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-3 +- remove vim-common and use install + +* Mon Aug 15 2016 Muayyad Alsadi - 1.1.3-2 - initial packaging From 7d4d971825a3612d7d2b5f037a7a1da07c691fc8 Mon Sep 17 00:00:00 2001 From: alsadi Date: Wed, 17 Aug 2016 09:51:09 +0300 Subject: [PATCH 4/8] fix mode to 644 --- dumb-init.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumb-init.spec b/dumb-init.spec index 456246d..e69d432 100644 --- a/dumb-init.spec +++ b/dumb-init.spec @@ -30,7 +30,7 @@ help2man --no-discard-stderr --include debian/help2man --no-info --name '%{summa %install mkdir -p "${RPM_BUILD_ROOT}/%{_bindir}" "${RPM_BUILD_ROOT}/%{_mandir}/man1/" install -pm 755 %{name} "${RPM_BUILD_ROOT}/%{_bindir}/" -install -pm 755 %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" +install -pm 644 %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" %files %{_bindir}/%{name} From c1ec7453074b7255071069f509b2bd8c43243ed8 Mon Sep 17 00:00:00 2001 From: alsadi Date: Wed, 17 Aug 2016 09:51:58 +0300 Subject: [PATCH 5/8] fix mode to 644 --- dumb-init.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dumb-init.spec b/dumb-init.spec index e69d432..280b905 100644 --- a/dumb-init.spec +++ b/dumb-init.spec @@ -1,6 +1,6 @@ Name: dumb-init Version: 1.1.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Entry-point for containers that proxies signals License: MIT @@ -39,6 +39,9 @@ install -pm 644 %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" %{_mandir}/man1/%{name}.1.gz %changelog +* Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-4 +- install 644 for manpage + * Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-3 - remove vim-common and use install From c55fffb1c4bd4bf7eb24dcb62146e0be0ce7729a Mon Sep 17 00:00:00 2001 From: alsadi Date: Wed, 17 Aug 2016 10:30:53 +0300 Subject: [PATCH 6/8] small fixes --- dumb-init.spec | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/dumb-init.spec b/dumb-init.spec index 280b905..311063b 100644 --- a/dumb-init.spec +++ b/dumb-init.spec @@ -1,15 +1,17 @@ Name: dumb-init Version: 1.1.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Entry-point for containers that proxies signals License: MIT URL: https://github.com/Yelp/dumb-init -Source0: https://github.com/Yelp/dumb-init/archive/v%{version}.tar.gz +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz + +BuildRequires: gcc +BuildRequires: help2man # /bin/xxd of vim-common of is needed for non-released versions # BuildRequires: vim-common -BuildRequires: help2man %description dumb-init is a simple process supervisor and init system designed to run as @@ -22,23 +24,28 @@ PID 1 inside minimal container environments (such as Docker). %setup -q %build + # uncomment next line when building a non-released version # make VERSION.h + gcc -std=gnu99 %{optflags} -o %{name} dumb-init.c -help2man --no-discard-stderr --include debian/help2man --no-info --name '%{summary}' ./%{name} | gzip -9 > %{name}.1.gz +help2man --no-discard-stderr --include debian/help2man --no-info --name '%{summary}' ./%{name} > %{name}.1 %install -mkdir -p "${RPM_BUILD_ROOT}/%{_bindir}" "${RPM_BUILD_ROOT}/%{_mandir}/man1/" -install -pm 755 %{name} "${RPM_BUILD_ROOT}/%{_bindir}/" -install -pm 644 %{name}.1.gz "${RPM_BUILD_ROOT}/%{_mandir}/man1/" +install -Dpm0755 %{name} %{buildroot}%{_bindir}/%{name} +install -Dpm0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %files %{_bindir}/%{name} %license LICENSE %doc README.md -%{_mandir}/man1/%{name}.1.gz +%doc %{_mandir}/man/%{name}.1* %changelog +* Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-5 +- remove gzip after help2man +- add missing BuildRequire + * Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-4 - install 644 for manpage From 512f31bc57a8d093e7ccd83519188be6efa19eb1 Mon Sep 17 00:00:00 2001 From: alsadi Date: Wed, 17 Aug 2016 10:41:15 +0300 Subject: [PATCH 7/8] fix typo --- dumb-init.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dumb-init.spec b/dumb-init.spec index 311063b..1d35d68 100644 --- a/dumb-init.spec +++ b/dumb-init.spec @@ -1,6 +1,6 @@ Name: dumb-init Version: 1.1.3 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Entry-point for containers that proxies signals License: MIT @@ -39,10 +39,10 @@ install -Dpm0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %{_bindir}/%{name} %license LICENSE %doc README.md -%doc %{_mandir}/man/%{name}.1* +%doc %{_mandir}/man1/%{name}.1* %changelog -* Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-5 +* Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-6 - remove gzip after help2man - add missing BuildRequire From 663474f99fa16106a8ba0f5ee261df8636b48fda Mon Sep 17 00:00:00 2001 From: alsadi Date: Wed, 17 Aug 2016 11:18:22 +0300 Subject: [PATCH 8/8] let man be automatically marked --- dumb-init.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dumb-init.spec b/dumb-init.spec index 1d35d68..799e467 100644 --- a/dumb-init.spec +++ b/dumb-init.spec @@ -1,6 +1,6 @@ Name: dumb-init Version: 1.1.3 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Entry-point for containers that proxies signals License: MIT @@ -37,11 +37,14 @@ install -Dpm0644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1 %files %{_bindir}/%{name} +%{_mandir}/man1/%{name}.1* %license LICENSE %doc README.md -%doc %{_mandir}/man1/%{name}.1* %changelog +* Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-7 +- let manpage automatically marked as document + * Wed Aug 17 2016 Muayyad Alsadi - 1.1.3-6 - remove gzip after help2man - add missing BuildRequire