From 1dc93a93763f66b4ece0b1ea32d5a34e3dfcf73142485634a401543bf64b1c2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Wed, 26 Nov 2014 08:03:10 +0000 Subject: [PATCH] - Update to version 1.5.3 * Reaping finished subprocesses now has precedence over starting new jobs * ninja no longer depends on googletest - Install bash/zsh completion - Install vim syntax file - Implement %check - Add ninja-disable-maxprocs-test.patch to disable max procs test, it needs a ulimit raise. OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/ninja?expand=0&rev=19 --- ninja-disable-maxprocs-test.patch | 43 +++++++++++++++++++++++++++++++ ninja.changes | 13 ++++++++++ ninja.spec | 17 ++++++++++-- v1.5.1.tar.gz | 3 --- v1.5.3.tar.gz | 3 +++ 5 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 ninja-disable-maxprocs-test.patch delete mode 100644 v1.5.1.tar.gz create mode 100644 v1.5.3.tar.gz diff --git a/ninja-disable-maxprocs-test.patch b/ninja-disable-maxprocs-test.patch new file mode 100644 index 0000000..b279680 --- /dev/null +++ b/ninja-disable-maxprocs-test.patch @@ -0,0 +1,43 @@ +Index: ninja-1.5.3/src/subprocess_test.cc +=================================================================== +--- ninja-1.5.3.orig/src/subprocess_test.cc ++++ ninja-1.5.3/src/subprocess_test.cc +@@ -166,38 +166,6 @@ TEST_F(SubprocessTest, SetWithMulti) { + } + } + +-// OS X's process limit is less than 1025 by default +-// (|sysctl kern.maxprocperuid| is 709 on 10.7 and 10.8 and less prior to that). +-#if !defined(__APPLE__) && !defined(_WIN32) +-TEST_F(SubprocessTest, SetWithLots) { +- // Arbitrary big number; needs to be over 1024 to confirm we're no longer +- // hostage to pselect. +- const unsigned kNumProcs = 1025; +- +- // Make sure [ulimit -n] isn't going to stop us from working. +- rlimit rlim; +- ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlim)); +- if (!EXPECT_GT(rlim.rlim_cur, kNumProcs)) { +- printf("Raise [ulimit -n] well above %u to make this test go\n", kNumProcs); +- return; +- } +- +- vector procs; +- for (size_t i = 0; i < kNumProcs; ++i) { +- Subprocess* subproc = subprocs_.Add("/bin/echo"); +- ASSERT_NE((Subprocess *) 0, subproc); +- procs.push_back(subproc); +- } +- while (!subprocs_.running_.empty()) +- subprocs_.DoWork(); +- for (size_t i = 0; i < procs.size(); ++i) { +- ASSERT_EQ(ExitSuccess, procs[i]->Finish()); +- ASSERT_NE("", procs[i]->GetOutput()); +- } +- ASSERT_EQ(kNumProcs, subprocs_.finished_.size()); +-} +-#endif // !__APPLE__ && !_WIN32 +- + // TODO: this test could work on Windows, just not sure how to simply + // read stdin. + #ifndef _WIN32 diff --git a/ninja.changes b/ninja.changes index a535196..ae7d9c7 100644 --- a/ninja.changes +++ b/ninja.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Nov 26 07:42:03 UTC 2014 - idonmez@suse.com + +- Update to version 1.5.3 + * Reaping finished subprocesses now has precedence over + starting new jobs + * ninja no longer depends on googletest +- Install bash/zsh completion +- Install vim syntax file +- Implement %check +- Add ninja-disable-maxprocs-test.patch to disable max procs test, + it needs a ulimit raise. + ------------------------------------------------------------------- Thu Sep 11 10:21:01 UTC 2014 - idonmez@suse.com diff --git a/ninja.spec b/ninja.spec index e36861e..9774242 100644 --- a/ninja.spec +++ b/ninja.spec @@ -20,13 +20,14 @@ Name: ninja Summary: A small build system closest in spirit to Make License: Apache-2.0 Group: Development/Tools/Building -Version: 1.5.1 +Version: 1.5.3 Release: 0 Url: https://github.com/martine/ninja BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: gcc-c++ BuildRequires: python-base Source0: https://github.com/martine/ninja/archive/v%{version}.tar.gz +Patch1: ninja-disable-maxprocs-test.patch %description Ninja is yet another build system. @@ -35,17 +36,29 @@ and orchestrates building them, quickly. %prep %setup -q +%patch1 -p1 %build -python ./bootstrap.py +python ./configure.py --bootstrap %install mkdir -p %{buildroot}%{_bindir} + install -m 0755 ninja %{buildroot}%{_bindir}/ninja +install -D -m 0644 misc/zsh-completion %{buildroot}%{_datadir}/zsh/site-functions/_ninja +install -D -m 0644 misc/ninja.vim %{buildroot}%{_datadir}/vim/site/syntax/ninja.vim +install -D -m 0644 misc/bash-completion %{buildroot}%{_sysconfdir}/bash_completion.d/ninja + +%check +./ninja ninja_test +./ninja_test %files %defattr(-,root,root) %{_bindir}/ninja +%{_datadir}/zsh +%{_datadir}/vim +%{_sysconfdir}/bash_completion.d %doc COPYING %changelog diff --git a/v1.5.1.tar.gz b/v1.5.1.tar.gz deleted file mode 100644 index c28149d..0000000 --- a/v1.5.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fba77b9ed4b4dd0e86c4513776938dc64bd4508dc2055b04c0c6df68bcfa397d -size 163437 diff --git a/v1.5.3.tar.gz b/v1.5.3.tar.gz new file mode 100644 index 0000000..94dc38f --- /dev/null +++ b/v1.5.3.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c953b5a7c26cfcd082882e3f3e2cd08fee8848ad228bb47223b18ea18777ec0 +size 168829