summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVirgil Dupras <vdupras@gentoo.org>2018-06-25 15:41:40 -0400
committerVirgil Dupras <vdupras@gentoo.org>2018-06-25 15:44:07 -0400
commit453cc5abaf4c2a4778cfa56c06ba37d6f04ba6a7 (patch)
tree5785e1c9dfc44385963d40fc615edb62e2904699 /sys-process/criu
parentdev-libs/rapidjson: Fix "this statement may fall through" error (diff)
downloadgentoo-453cc5abaf4c2a4778cfa56c06ba37d6f04ba6a7.tar.gz
gentoo-453cc5abaf4c2a4778cfa56c06ba37d6f04ba6a7.tar.bz2
gentoo-453cc5abaf4c2a4778cfa56c06ba37d6f04ba6a7.zip
sys-process/criu: bump to v3.9
- Drop spurious patch files - Drop spurious eutils inherit - Add "doc" USE flag thanks to Troy C. See bug 622550 - Add missing kernel flag checks Closes: https://bugs.gentoo.org/622550 Package-Manager: Portage-2.3.40, Repoman-2.3.9
Diffstat (limited to 'sys-process/criu')
-rw-r--r--sys-process/criu/Manifest1
-rw-r--r--sys-process/criu/criu-3.9.ebuild124
-rw-r--r--sys-process/criu/files/2.0/criu-2.0-automagic-libbsd.patch17
-rw-r--r--sys-process/criu/files/2.2/criu-2.2-makefile.patch77
-rw-r--r--sys-process/criu/files/2.2/criu-2.2-no-git.patch16
-rw-r--r--sys-process/criu/files/2.9/criu-2.9-makefile.patch78
6 files changed, 125 insertions, 188 deletions
diff --git a/sys-process/criu/Manifest b/sys-process/criu/Manifest
index 3cddefc4645..00632afc4d0 100644
--- a/sys-process/criu/Manifest
+++ b/sys-process/criu/Manifest
@@ -1,3 +1,4 @@
DIST criu-2.5.tar.bz2 605226 BLAKE2B c4086b9822b119a648bda4f6cc831eba5b7e3fba5af41f8f0b1c00dac7d4aff88a71e81569c4559fd98113e76eba0653c67684f443c1c803c453209367a4c875 SHA512 ccf942005ff3b2a567726ddb8aa44048c130f1adf6e2cbdf48e919043c84a4e1c03ad0ec34b44263e5764bea62807a2cc0fa1135b929ad3166fb9486c2880570
DIST criu-3.6.tar.bz2 739437 BLAKE2B 0f128cf69a5a073df3abc736e3081b7d266573575c038a457fdf8adcdab668d957559f3b9a16606ff31871c3bf5e111349995c496c4236b5191340486814981f SHA512 5849024ac4660a5537ed37b6d98adf61d3f071e2a181d873a1f7ca6c4d00a4258445b4bc840e908d907bc34daf8a818450f54e6cdf4826a679e756c0cbc5d586
DIST criu-3.7.tar.bz2 749499 BLAKE2B 41222983183910b8a039a69e1a425993703e4f461c1cc0e64e92f877aff571d56c7f32cdae7848ef1633a15cac9e7b746f8c84a71f3607f7fc22959964820258 SHA512 8feb9e2579c04b67a7fe9631bb662504a7eb78550c3951cbe29252d87d9258fd6994533f6e60b0017b6a6e21bbdd5e7cd7e8a255be53b77b57efacec4e50140f
+DIST criu-3.9.tar.bz2 772167 BLAKE2B 7c781acc9d6353a4e32c5daa9606332030d4c99d10c00d7f1c59beb54c1bc4cfb2ca0eea0663caa5ef936de436ac2efadf8c6b01a55e06905bd5a7fb91cf29e8 SHA512 875a4bfb809d7b479bb6357a4e114f2f5caaaf2940019a41cc6494fd90025d72b5fc4129be89eef1b9f62a5358eb96509fd15a33b64fe2b8f7f805dc8110b994
diff --git a/sys-process/criu/criu-3.9.ebuild b/sys-process/criu/criu-3.9.ebuild
new file mode 100644
index 00000000000..523a1b1c4e5
--- /dev/null
+++ b/sys-process/criu/criu-3.9.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit toolchain-funcs linux-info flag-o-matic python-r1 python-utils-r1
+
+DESCRIPTION="utility to checkpoint/restore a process tree"
+HOMEPAGE="https://criu.org/"
+SRC_URI="https://download.openvz.org/criu/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64"
+IUSE="doc python selinux setproctitle static-libs"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+RDEPEND="
+ dev-libs/protobuf-c
+ dev-libs/libnl:3
+ net-libs/libnet:1.1
+ sys-libs/libcap
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( sys-libs/libselinux )
+ setproctitle? ( dev-libs/libbsd )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-text/asciidoc
+ app-text/xmlto
+ )"
+RDEPEND="${RDEPEND}
+ python? (
+ dev-python/protobuf-python[${PYTHON_USEDEP}]
+ dev-python/ipaddr[${PYTHON_USEDEP}]
+ )"
+
+CONFIG_CHECK="~CHECKPOINT_RESTORE ~NAMESPACES ~PID_NS ~FHANDLE ~EVENTFD ~EPOLL ~INOTIFY_USER
+ ~IA32_EMULATION ~UNIX_DIAG ~INET_DIAG ~INET_UDP_DIAG ~PACKET_DIAG ~NETLINK_DIAG ~TUN
+ ~NETFILTER_XT_MARK"
+
+RESTRICT="test"
+
+PATCHES=(
+ "${FILESDIR}"/2.2/${PN}-2.2-flags.patch
+ "${FILESDIR}"/2.3/${PN}-2.3-no-git.patch
+ "${FILESDIR}"/${PN}-2.8-automagic-libbsd.patch
+ "${FILESDIR}"/2.0/${PN}-2.0-sysroot.patch
+)
+
+criu_arch() {
+ # criu infers the arch from $(uname -m). We never want this to happen.
+ case ${ARCH} in
+ amd64) echo "x86";;
+ arm64) echo "aarch64";;
+ *) echo "${ARCH}";;
+ esac
+}
+
+src_prepare() {
+ default
+
+ if ! use selinux; then
+ sed \
+ -e 's:libselinux:no_libselinux:g' \
+ -i Makefile.config || die
+ fi
+
+ use doc || sed -i 's_\(install: \)install-man _\1_g' Makefile.install
+}
+
+src_configure() {
+ # Gold linker generates invalid object file when used with criu's custom
+ # linker script. Use the bfd linker instead. See https://crbug.com/839665#c3
+ tc-ld-disable-gold
+}
+
+src_compile() {
+ local target="all $(usex doc 'docs' '')"
+ RAW_LDFLAGS="$(raw-ldflags)" emake \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getLD)" \
+ OBJCOPY="$(tc-getOBJCOPY)" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ ARCH="$(criu_arch)" \
+ V=1 WERROR=0 DEBUG=0 \
+ SETPROCTITLE=$(usex setproctitle) \
+ PYCRIU=$(usex python) \
+ ${target}
+}
+
+src_test() {
+ # root privileges are required to dump all necessary info
+ if [[ ${EUID} -eq 0 ]] ; then
+ emake -j1 CC="$(tc-getCC)" ARCH="$(criu_arch)" V=1 WERROR=0 test
+ fi
+}
+
+install_crit() {
+ "${PYTHON:-python}" ../scripts/crit-setup.py install --root="${D}" --prefix="${EPREFIX}/usr/"
+}
+
+src_install() {
+ emake \
+ ARCH="$(criu_arch)" \
+ PREFIX="${EPREFIX}"/usr \
+ LOGROTATEDIR="${EPREFIX}"/etc/logrotate.d \
+ DESTDIR="${D}" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ install
+
+ use doc && dodoc CREDITS README.md
+
+ if use python ; then
+ cd lib
+ python_foreach_impl install_crit
+ fi
+
+ if ! use static-libs; then
+ find "${D}" -name "*.a" -delete || die
+ fi
+}
diff --git a/sys-process/criu/files/2.0/criu-2.0-automagic-libbsd.patch b/sys-process/criu/files/2.0/criu-2.0-automagic-libbsd.patch
deleted file mode 100644
index 3f39ef63f82..00000000000
--- a/sys-process/criu/files/2.0/criu-2.0-automagic-libbsd.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff --git a/criu/Makefile.config b/criu/Makefile.config
-index aaaca1f..e977bcd 100644
---- a/criu/Makefile.config
-+++ b/criu/Makefile.config
-@@ -4,10 +4,12 @@ include ../scripts/feature-tests.mak
-
- CONFIG_HEADER := include/config.h
-
-+ifeq ($(SETPROCTITLE),yes)
- ifeq ($(call try-cc,$(FEATURE_TEST_LIBBSD_DEV),-lbsd),y)
- LIBS += -lbsd
- DEFINES += -DCONFIG_HAS_LIBBSD
- endif
-+endif
-
- ifeq ($(call pkg-config-check,libselinux),y)
- LIBS += -lselinux
diff --git a/sys-process/criu/files/2.2/criu-2.2-makefile.patch b/sys-process/criu/files/2.2/criu-2.2-makefile.patch
deleted file mode 100644
index e4e856d8ba7..00000000000
--- a/sys-process/criu/files/2.2/criu-2.2-makefile.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-diff --git a/Makefile.install b/Makefile.install
-index b3f5551..2349107 100644
---- a/Makefile.install
-+++ b/Makefile.install
-@@ -6,23 +6,10 @@ BINDIR ?= $(PREFIX)/bin
- SBINDIR ?= $(PREFIX)/sbin
- MANDIR ?= $(PREFIX)/share/man
- SYSTEMDUNITDIR ?= $(PREFIX)/lib/systemd/system/
--LOGROTATEDIR ?= $(PREFIX)/etc/logrotate.d/
-+LOGROTATEDIR ?= $(SYSCONFDIR)/etc/logrotate.d/
- LIBDIR ?= $(PREFIX)/lib
- INCLUDEDIR ?= $(PREFIX)/include/criu
-
--#
--# For recent Debian/Ubuntu with multiarch support.
--DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
--ifneq "$(DEB_HOST_MULTIARCH)" ""
-- LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
--else
-- #
-- # For most other systems
-- ifeq "$(shell uname -m)" "x86_64"
-- LIBDIR ?= $(PREFIX)/lib64
-- endif
--endif
--
- export BINDIR SBINDIR MANDIR SYSTEMDUNITDIR LOGROTATEDIR
- export INCLUDEDIR LIBDIR DESTDIR PREFIX
-
-diff --git a/lib/Makefile b/lib/Makefile
-index f1c0821..3bef265 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -25,8 +25,12 @@ lib-c: c/$(CRIU_SO)
- #
- # Python bindings.
- lib-py:
-+ifeq ($(PYCRIU),yes)
- $(call msg-gen, $@)
- $(Q) $(MAKE) -C py all
-+else
-+ $(Q) echo "no py criu"
-+endif
- .PHONY: lib-py
-
- all: lib-c lib-py
-@@ -43,7 +47,7 @@ clean:
- $(Q) $(RM) -r build usr
- .PHONY: clean
-
--install: lib-c lib-py ../crit/crit c/criu.pc.in
-+install: lib-c ../crit/crit c/criu.pc.in
- $(E) " INSTALL " $(CRIU_SO)
- $(Q) mkdir -p $(DESTDIR)$(LIBDIR)
- $(Q) install -m 755 c/$(CRIU_SO) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR)
-@@ -55,8 +59,6 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in
- $(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
- $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc
- $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
-- $(E) " INSTALL " crit
-- $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
- .PHONY: install
-
- uninstall:
-diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
-index bd40944..3cfbffa 100644
---- a/scripts/nmk/scripts/build.mk
-+++ b/scripts/nmk/scripts/build.mk
-@@ -87,7 +87,7 @@ builtin-name := $(strip $(builtin-name))
-
- #
- # Link flags.
--ld_flags := $(strip $(LDFLAGS) $(ldflags-y))
-+ld_flags := $(strip $(RAW_LDFLAGS) $(ldflags-y))
-
- #
- # $(obj) related rules.
diff --git a/sys-process/criu/files/2.2/criu-2.2-no-git.patch b/sys-process/criu/files/2.2/criu-2.2-no-git.patch
deleted file mode 100644
index 0622225c290..00000000000
--- a/sys-process/criu/files/2.2/criu-2.2-no-git.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/Makefile b/Makefile
-index 7c85403..20992ed 100644
---- a/Makefile
-+++ b/Makefile
-@@ -179,9 +179,9 @@ test: zdtm
- # Generating tar requires tag matched CRIU_VERSION.
- # If not found then simply use GIT's describe with
- # "v" prefix stripped.
--head-name := $(shell git tag -l v$(CRIU_VERSION))
-+head-name := $(shell if [ -d ".git" ]; then git tag -l v$(CRIU_VERSION); fi)
- ifeq ($(head-name),)
-- head-name := $(shell git describe)
-+ head-name := $(shell if [ -d ".git" ]; then git describe; fi)
- endif
- tar-name := $(shell echo $(head-name) | sed -e 's/^v//g')
- criu-$(tar-name).tar.bz2:
diff --git a/sys-process/criu/files/2.9/criu-2.9-makefile.patch b/sys-process/criu/files/2.9/criu-2.9-makefile.patch
deleted file mode 100644
index 7ec91eebaa3..00000000000
--- a/sys-process/criu/files/2.9/criu-2.9-makefile.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-diff --git a/Makefile.install b/Makefile.install
-index dbc22e1..23fd1ae 100644
---- a/Makefile.install
-+++ b/Makefile.install
-@@ -6,24 +6,11 @@ BINDIR ?= $(PREFIX)/bin
- SBINDIR ?= $(PREFIX)/sbin
- MANDIR ?= $(PREFIX)/share/man
- SYSTEMDUNITDIR ?= $(PREFIX)/lib/systemd/system/
--LOGROTATEDIR ?= $(PREFIX)/etc/logrotate.d/
-+LOGROTATEDIR ?= $(SYSCONFDIR)/etc/logrotate.d/
- LIBDIR ?= $(PREFIX)/lib
- INCLUDEDIR ?= $(PREFIX)/include/criu
- LIBEXECDIR ?= $(PREFIX)/libexec
-
--#
--# For recent Debian/Ubuntu with multiarch support.
--DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH 2>/dev/null)
--ifneq "$(DEB_HOST_MULTIARCH)" ""
-- LIBDIR ?= $(PREFIX)/lib/$(DEB_HOST_MULTIARCH)
--else
-- #
-- # For most other systems
-- ifeq "$(shell uname -m)" "x86_64"
-- LIBDIR ?= $(PREFIX)/lib64
-- endif
--endif
--
- export BINDIR SBINDIR MANDIR SYSTEMDUNITDIR LOGROTATEDIR
- export INCLUDEDIR LIBDIR DESTDIR PREFIX LIBEXECDIR
-
-diff --git a/lib/Makefile b/lib/Makefile
-index 616f089..aab3189 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -25,8 +25,12 @@ lib-c: c/$(CRIU_SO)
- #
- # Python bindings.
- lib-py:
-+ifeq ($(PYCRIU),yes)
- $(call msg-gen, $@)
- $(Q) $(MAKE) -C py all
-+else
-+ $(Q) echo "no py criu"
-+endif
- .PHONY: lib-py
-
- all: lib-c lib-py
-@@ -43,7 +47,7 @@ clean:
- $(Q) $(RM) -r build usr
- .PHONY: clean
-
--install: lib-c lib-py ../crit/crit c/criu.pc.in
-+install: lib-c ../crit/crit c/criu.pc.in
- $(E) " INSTALL " $(CRIU_SO)
- $(Q) mkdir -p $(DESTDIR)$(LIBDIR)
- $(Q) install -m 755 c/$(CRIU_SO) $(DESTDIR)$(LIBDIR)/$(CRIU_SO).$(CRIU_SO_VERSION_MAJOR).$(CRIU_SO_VERSION_MINOR)
-@@ -55,8 +59,6 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in
- $(Q) mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
- $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc
- $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
-- $(E) " INSTALL " crit
-- $(Q) $(PYTHON_BIN) ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
- .PHONY: install
-
- uninstall:
-diff --git a/scripts/nmk/scripts/build.mk b/scripts/nmk/scripts/build.mk
-index 1860d58..e169b0c 100644
---- a/scripts/nmk/scripts/build.mk
-+++ b/scripts/nmk/scripts/build.mk
-@@ -87,7 +87,7 @@ builtin-name := $(strip $(builtin-name))
-
- #
- # Link flags.
--ld_flags := $(strip $(LDFLAGS) $(ldflags-y))
-+ld_flags := $(strip $(RAW_LDFLAGS) $(ldflags-y))
-
- #
- # $(obj) related rules.