Change-Id: Ic6a98a956a45d4983ca0751ff3a62f4284f79a72
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2001
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: A free, distributed source control management tool. |
2 | 2 |
Name: mercurial |
3 | 3 |
Version: 3.7.1 |
4 |
-Release: 5%{?dist} |
|
4 |
+Release: 6%{?dist} |
|
5 | 5 |
License: GPLv2+ |
6 | 6 |
URL: https://www.ruby-lang.org/en/ |
7 | 7 |
Group: System Environment/Security |
... | ... |
@@ -16,9 +16,10 @@ Patch3: hg-CVE-2016-3069-3.patch |
16 | 16 |
Patch4: hg-CVE-2016-3069-4.patch |
17 | 17 |
Patch5: hg-CVE-2016-3069-5.patch |
18 | 18 |
Patch6: hg-CVE-2016-3105.patch |
19 |
-BuildRequires: python2-devel |
|
20 |
-BuildRequires: python2-libs |
|
21 |
-Requires: python2 |
|
19 |
+BuildRequires: python2 |
|
20 |
+BuildRequires: python2-libs |
|
21 |
+BuildRequires: python2-devel |
|
22 |
+Requires: python2 |
|
22 | 23 |
%description |
23 | 24 |
Mercurial is a distributed source control management tool similar to Git and Bazaar. |
24 | 25 |
Mercurial is written in Python and is used by projects such as Mozilla and Vim. |
... | ... |
@@ -34,31 +35,19 @@ Mercurial is written in Python and is used by projects such as Mozilla and Vim. |
34 | 34 |
%patch6 -p1 |
35 | 35 |
%build |
36 | 36 |
make build |
37 |
+ |
|
37 | 38 |
%install |
38 | 39 |
[ %{buildroot} != "/"] && rm -rf %{buildroot}/* |
39 |
-make PREFIX=%{_prefix} install-bin |
|
40 |
- |
|
41 |
-install -vdm755 %{buildroot}/var/opt/%{name}-%{version} |
|
42 |
-mv -v %{_builddir}/%{name}-%{version}/* %{buildroot}/var/opt/%{name}-%{version}/ |
|
43 |
-chown -R root:root %{buildroot}/var/opt/%{name}-%{version} |
|
40 |
+mkdir -p %{buildroot}/%{_bindir} |
|
41 |
+%{__python} setup.py install --skip-build --root %{buildroot} |
|
44 | 42 |
|
45 |
-install -vdm755 %{buildroot}/bin |
|
46 |
-ln -sfv ../var/opt/%{name}-%{version}/hg %{buildroot}/bin/hg |
|
47 | 43 |
cat >> %{buildroot}/.hgrc << "EOF" |
48 | 44 |
[ui] |
49 | 45 |
username = "$(id -u)" |
50 | 46 |
EOF |
51 | 47 |
|
52 |
-install -vdm755 %{buildroot}/etc/profile.d |
|
53 |
-cat >> %{buildroot}/etc/profile.d/mercurial-exports.sh <<- "EOF" |
|
54 |
-export PYTHONPATH="$PYTHONPATH:/var/opt/%{name}-%{version}/mercurial/pure" |
|
55 |
-EOF |
|
56 |
- |
|
57 |
-%{_fixperms} %{buildroot}/* |
|
58 |
- |
|
59 | 48 |
%check |
60 |
-cd %{buildroot}/var/opt/%{name}-%{version} |
|
61 |
-make tests |
|
49 |
+make %{?_smp_mflags} check |
|
62 | 50 |
|
63 | 51 |
%post -p /sbin/ldconfig |
64 | 52 |
|
... | ... |
@@ -71,12 +60,12 @@ rm -rf %{buildroot}/* |
71 | 71 |
%files |
72 | 72 |
%defattr(-,root,root) |
73 | 73 |
/.hgrc |
74 |
-/var/opt/%{name}-%{version}/* |
|
75 |
-/bin/hg |
|
76 |
-/etc/profile.d/mercurial-exports.sh |
|
77 |
-%exclude /var/opt/%{name}-%{version}/contrib/plan9 |
|
78 |
-%exclude /var/opt/%{name}-%{version}/build/temp.* |
|
74 |
+%{_bindir}/hg |
|
75 |
+%{python_sitelib}/* |
|
76 |
+ |
|
79 | 77 |
%changelog |
78 |
+* Mon Jan 22 2017 Xiaolin Li <xiaolinl@vmware.com> 3.7.1-6 |
|
79 |
+- Install with setup.py. |
|
80 | 80 |
* Tue Nov 22 2016 Xiaolin Li <xiaolinl@vmware.com> 3.7.1-5 |
81 | 81 |
- Apply patches for CVE-2016-3068, CVE-2016-3069, CVE-2016-3105 |
82 | 82 |
* Fri Oct 07 2016 ChangLee <changlee@vmware.com> 3.7.1-4 |