chore: support building without network

Signed-off-by: weidongkl <weidong@uniontech.com>
This commit is contained in:
weidongkl 2024-12-05 14:51:31 +08:00
parent 900ffdd2bd
commit 8bbad289bd
No known key found for this signature in database
GPG Key ID: 5977E9E39B2579B0
2 changed files with 65 additions and 3 deletions

View File

@ -0,0 +1,57 @@
From 8b4b9f9020658554562665f78e019b897ff80647 Mon Sep 17 00:00:00 2001
From: weidongkl <weidong@uniontech.com>
Date: Thu, 5 Dec 2024 10:56:26 +0800
Subject: [PATCH] chore: support building without network
Signed-off-by: weidongkl <weidong@uniontech.com>
---
crit/Makefile | 8 ++++++--
lib/Makefile | 5 ++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/crit/Makefile b/crit/Makefile
index 9a856db..34f1359 100644
--- a/crit/Makefile
+++ b/crit/Makefile
@@ -16,11 +16,15 @@ ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0)
$(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install"
else
$(E) " INSTALL " crit
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit
+ #$(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit
+ $(Q) cd crit;$(PYTHON) setup.py install --root $(DESTDIR)
+
endif
else
$(E) " INSTALL " crit
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit
+ #$(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./crit
+ $(Q) cd crit;$(PYTHON) setup.py install --root $(DESTDIR)
+
endif
.PHONY: install
diff --git a/lib/Makefile b/lib/Makefile
index ae371e7..7fdd5b8 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -60,14 +60,13 @@ install: lib-c lib-a lib-py lib/c/criu.pc.in
ifeq ($(PYTHON_EXTERNALLY_MANAGED),1)
ifeq ($(PIP_BREAK_SYSTEM_PACKAGES),0)
$(E) " SKIP INSTALL pycriu: Externally managed python environment (See PEP 668 for more information)"
- $(E) " Consider using PIP_BREAK_SYSTEM_PACKAGES=1 make install"
else
$(E) " INSTALL " pycriu
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./lib
+ $(Q) cd lib;$(PYTHON) setup.py install --root $(DESTDIR)
endif
else
$(E) " INSTALL " pycriu
- $(Q) $(PYTHON) -m pip install --upgrade --ignore-installed --prefix=$(DESTDIR)$(PREFIX) ./lib
+ $(Q) cd lib;$(PYTHON) setup.py install --root $(DESTDIR)
endif
.PHONY: install
--
2.46.0

View File

@ -1,6 +1,6 @@
Name: criu
Version: 3.19
Release: 2
Release: 3
Provides: crtools = %{version}-%{release}
Obsoletes: crtools <= 1.0-2
Summary: A tool of Checkpoint/Restore in User-space
@ -18,6 +18,7 @@ Obsoletes: %{name}-libs < %{version}-%{release}
Patch1: 0001-criu-dump-and-restore-cpu-affinity-of-each-thread.patch
Patch2: 0002-Add-sys_sched_setaffinity-define-for-loongarch64.patch
Patch3: 0003-chore-support-building-without-network.patch
%description
Checkpoint/Restore in Userspace(CRIU),is a software tool for the linux operating system.
@ -87,11 +88,12 @@ chmod 0755 %{buildroot}/run/%{name}/
%exclude %{_libdir}/libcriu.a
%files -n python3-criu
%{python3_sitelib}/{pycriu*/*,*egg-info}
%{python3_sitelib}/{pycriu,pycriu-*egg-info}
%files -n crit
%{_bindir}/crit
%{python3_sitelib}/crit-%{version}.dist-info/
%{python3_sitelib}/crit-%{version}-*egg-info/
%{python3_sitelib}/crit
%files -n criu-ns
@ -103,6 +105,9 @@ chmod 0755 %{buildroot}/run/%{name}/
%doc %{_mandir}/man1/{compel.1*,crit.1*,criu-ns.1*,criu-amdgpu-plugin.1*}
%changelog
* Thu Dec 05 2024 weidongkl <weidong@uniontech.com> - 3.19-3
- chore: support building without network
* Mon May 13 2024 zhangzikang <zhangzikang@kylinos.cn> - 3.19-2
- add support for loongarch64