public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] dev/xmw:master commit in: sys-process/cryopid/, sys-process/cryopid/files/
@ 2012-04-19  1:46 Michael Weber
  0 siblings, 0 replies; only message in thread
From: Michael Weber @ 2012-04-19  1:46 UTC (permalink / raw
  To: gentoo-commits

commit:     c9b9998f434d6944e68b8c3f4d33118e59818fe8
Author:     Michael Weber <xmw <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 19 01:45:11 2012 +0000
Commit:     Michael Weber <xmw <AT> gentoo <DOT> org>
CommitDate: Thu Apr 19 01:45:11 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=dev/xmw.git;a=commit;h=c9b9998f

sys-process/cryopid: Initial import, doesn't work yet.

(Portage version: 2.1.10.49/git/Linux x86_64, signed Manifest commit with key 62EEF090)

---
 sys-process/cryopid/ChangeLog                   |   10 +
 sys-process/cryopid/Manifest                    |   16 ++
 sys-process/cryopid/cryopid-0.5.9.1.ebuild      |   34 +++
 sys-process/cryopid/files/cryopid-0.5.9.1.patch |  280 +++++++++++++++++++++++
 sys-process/cryopid/metadata.xml                |    9 +
 5 files changed, 349 insertions(+), 0 deletions(-)

diff --git a/sys-process/cryopid/ChangeLog b/sys-process/cryopid/ChangeLog
new file mode 100644
index 0000000..fa194dc
--- /dev/null
+++ b/sys-process/cryopid/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for sys-process/cryopid
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*cryopid-0.5.9.1 (19 Apr 2012)
+
+  19 Apr 2012; Michael Weber <xmw@gentoo.org> +cryopid-0.5.9.1.ebuild,
+  +files/cryopid-0.5.9.1.patch, +metadata.xml:
+  sys-process/cryopid: Initial import, doesn't work yet.
+

diff --git a/sys-process/cryopid/Manifest b/sys-process/cryopid/Manifest
new file mode 100644
index 0000000..695a755
--- /dev/null
+++ b/sys-process/cryopid/Manifest
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX cryopid-0.5.9.1.patch 9264 RMD160 d529ecbc653c5e7d268ce0f3214d7c2ae492405e SHA1 5154fd3f9d22acaefbdb9f559159f1ec83363bfd SHA256 5adc3b97b0cce5bacf92ba04e27f058529199c8d1c0fd1b1976d357640eaf05b
+DIST cryopid-0.5.9.1-i386.tar.gz 156925 RMD160 e21e01752f703f6380dc9c16c3089e9d4ae43371 SHA1 55c6f5948b7b5228721dc9b7f4131daac80e8331 SHA256 7028d6d5c5db9576fe25eb76d29e4120ecc2782c365096001323f583d82d2790
+DIST cryopid-0.5.9.1-x86_64.tar.gz 176580 RMD160 bdca7e5edb37807344cfde78e6452488b5c77d4b SHA1 866571f06040759fa6afb2239d826a0b791178f3 SHA256 6b70c99f885d32fceb19d78d54530c72699b2fccba68d50e8888a5b2b64b7078
+EBUILD cryopid-0.5.9.1.ebuild 686 RMD160 da30dd19c8f583c0f219de833fd7cd0bff48eeb6 SHA1 1a3870b9b87d77b18dc96aaaee433584ca4daf6c SHA256 3af747600aaa0b165798f5edb29b9c8ed44e8cf9bf8976b84727de59bc61bf1f
+MISC ChangeLog 328 RMD160 607c402ccdc2afd5e8191bf6fe4f58066800a5f3 SHA1 d7c545272345d192cb5ba1227d843de08cb43fe1 SHA256 7470123f7deb5c93235f1cf6d840eaeed8c890aa6cf318fed85f9f399dab1959
+MISC metadata.xml 224 RMD160 2a7e22a99ec669c5b961c3d1738a0cda58264318 SHA1 f6fd81fac4df7d7995b1600848b265fceda692f8 SHA256 f810c6de744adceee241992d3f713142db3e7025986f6cc5898cfe3c9cb2f4a7
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iF0EAREIAAYFAk+PbicACgkQknrdDGLu8JCneQD4nAoUxKEHFTs9iU7pL5ecmTv+
+sgR1VWgtr+7T3ESUrwD9HIEpEwxupRZCBejmvOSjuw3cR1ogTj4Uq5Hr2OByiOY=
+=TgjS
+-----END PGP SIGNATURE-----

diff --git a/sys-process/cryopid/cryopid-0.5.9.1.ebuild b/sys-process/cryopid/cryopid-0.5.9.1.ebuild
new file mode 100644
index 0000000..28d0a1e
--- /dev/null
+++ b/sys-process/cryopid/cryopid-0.5.9.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils linux-info
+
+DESCRIPTION="Process freezing utility"
+HOMEPAGE="http://cryopid.berlios.de"
+SRC_URI="amd64? ( http://dagobah.ucc.asn.au/wacky/${P}-x86_64.tar.gz )
+	x86? ( http://dagobah.ucc.asn.au/wacky/${P}-i386.tar.gz )"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="
+	dev-libs/dietlibc
+	sys-libs/zlib[static-libs]
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${P}/src
+
+pkg_setup() {
+	linux_config_src_exists
+	get_version
+}
+
+src_compile() {
+	emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} -I\"${KV_DIR}\"/include -Iarch -I.. -Wl,-t" -j1
+}

diff --git a/sys-process/cryopid/files/cryopid-0.5.9.1.patch b/sys-process/cryopid/files/cryopid-0.5.9.1.patch
new file mode 100644
index 0000000..a169612
--- /dev/null
+++ b/sys-process/cryopid/files/cryopid-0.5.9.1.patch
@@ -0,0 +1,280 @@
+diff -ru work.orig/cryopid-0.5.9.1/src/Makefile work/cryopid-0.5.9.1/src/Makefile
+--- work.orig/cryopid-0.5.9.1/src/Makefile	2006-11-29 12:41:31.000000000 +0100
++++ work/cryopid-0.5.9.1/src/Makefile	2012-04-19 02:40:30.867281560 +0200
+@@ -2,7 +2,7 @@
+ USE_TCPCP=y
+ USE_GTK=n
+ 
+-ARCH=$(shell arch)
++ARCH=$(shell uname -m)
+ 
+ # Test if this gcc supports stack protection (and if so, turn it off).
+ ifeq ($(shell $(CC) -E -fno-stack-protector - < /dev/null > /dev/null 2>&1 && echo 1),1)
+@@ -16,16 +16,22 @@
+ ARCH=i386
+ ARCH_OFORMAT=elf32-i386
+ LD_FORMAT=elf_i386
++LIBCOMPAT=/usr/diet/lib-x86_64/libcompat.a
++LIBDIET=/usr/diet/lib-x86_64/libc.a
+ endif
+ ifeq ($(ARCH), x86_64)
+ ARCH_OFORMAT=elf64-x86-64
+ LD_FORMAT=elf_x86_64
++LIBCOMPAT=/usr/diet/lib-x86_64/libcompat.a
++LIBDIET=/usr/diet/lib-x86_64/libc.a
+ USE_TCPCP=n
+ USE_GTK=n
+ endif
+ ifeq ($(ARCH), sparc)
+ ARCH_OFORMAT=elf32-sparc
+ LD_FORMAT=elf32_sparc
++LIBCOMPAT=/usr/diet/lib-x86_64/libcompat.a
++LIBDIET=/usr/diet/lib-x86_64/libc.a
+ USE_TCPCP=n
+ USE_GTK=n
+ CFLAGS += -DARCH_HAS_ALIGNED_INSTRUCTIONS
+@@ -33,19 +39,21 @@
+ ifeq ($(ARCH), alpha)
+ ARCH_OFORMAT=elf64-alpha
+ LD_FORMAT=elf64alpha
++LIBCOMPAT=/usr/diet/lib-x86_64/libcompat.a
++LIBDIET=/usr/diet/lib-x86_64/libc.a
+ USE_TCPCP=n
+ USE_GTK=n
+ endif
+ 
+ R_CHUNK_OBJS = cpimage_r.o cp_r_fd.o cp_r_fd_console.o cp_r_fd_file.o cp_r_fd_fifo.o cp_r_fd_socket.o cp_r_misc.o cp_r_sighand.o cp_r_vma.o cp_r_header.o arch/arch_r_objs.o fork2.o
+ W_CHUNK_OBJS = cpimage_w.o cp_w_fd.o cp_w_fd_console.o cp_w_fd_file.o cp_w_fd_fifo.o cp_w_fd_socket.o cp_w_misc.o cp_w_sighand.o cp_w_vma.o cp_w_header.o arch/arch_w_objs.o list.o 
+-COMMON_OBJS = common.c arch/asmfuncs.o
++COMMON_OBJS = common.c
+ STUB_TYPES = gzip # raw buffered lzo
+ STUBS = $(patsubst %,stub-%,$(STUB_TYPES))
+ TARGETS = freeze fork2_helper
+ 
+ # How do we get our libc linked into the stub?
+-LIBC = -DPROVIDE_MALLOC -nostdlib -nostartfiles ../dietlibc-$(ARCH)/dietlibc.a -lgcc
++LIBC = -DPROVIDE_MALLOC -nostdlib -nostartfiles $(LIBDIET) $(LIBCOMPAT) -lgcc
+ #LIBC = -nostdlib -nostartfiles -lc
+ 
+ # Compile in tcpcp if wanted/needed
+@@ -61,6 +69,7 @@
+ DEFINES += -DUSE_GTK
+ endif
+ 
++DEFINES += -DFORK2HELPER=\"$(PREFIX)/lib/cryopid/fork2_helper\"
+ CFLAGS += $(DEFINES)
+ 
+ # Utilities
+@@ -74,7 +83,7 @@
+ 	! test -h arch && rm -f arch && ln -s arch-$(ARCH) arch || true
+ 	make -C arch 'CFLAGS+=$(DEFINES) $(CFLAGS_GCC_SP)'
+ 
+-clean:
++distclean clean:
+ 	rm -f *.o arch/*.o $(TARGETS) 
+ 	rm -f arch
+ 
+@@ -95,7 +104,16 @@
+ gtk_support.o: gtk_support.c
+ 	$(CC) $(CFLAGS) -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pango-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -c $<
+ 
++DESTDIR=/
++PREFIX=/usr
++
+ fork2_helper: fork2_helper.c
+ 	$(CC) $(CFLAGS) $< -o $@
+ 
+-.PHONY: arch
++install:	freeze fork2_helper
++	[ -d $(DESTDIR)/$(PREFIX)/bin/ ] || mkdir -p $(DESTDIR)/$(PREFIX)/bin/
++	cp freeze $(DESTDIR)/$(PREFIX)/bin/
++	[ -d $(DESTDIR)/$(PREFIX)/lib/cryopid/ ] || mkdir -p $(DESTDIR)/$(PREFIX)/lib/cryopid/
++	cp fork2_helper $(DESTDIR)/$(PREFIX)/lib/cryopid/
++
++.PHONY: arch clean distclean
+diff -ru work.orig/cryopid-0.5.9.1/src/arch-x86_64/arch.h work/cryopid-0.5.9.1/src/arch-x86_64/arch.h
+--- work.orig/cryopid-0.5.9.1/src/arch-x86_64/arch.h	2006-11-29 12:16:06.000000000 +0100
++++ work/cryopid-0.5.9.1/src/arch-x86_64/arch.h	2012-04-19 02:41:22.440636804 +0200
+@@ -1,6 +1,7 @@
+ #ifndef _ARCH_H_
+ #define _ARCH_H_
+ 
++#include <asm/unistd.h>
+ #include <sys/syscall.h>
+ #include <unistd.h>
+ 
+@@ -11,6 +12,41 @@
+ #define _ARCH_NSIG_BPW   64
+ #define _ARCH_NSIG_WORDS (_ARCH_NSIG / _ARCH_NSIG_BPW)
+ 
++/* import some definitions */
++#if 1
++#ifndef __syscall
++#define __syscall "syscall"
++#endif
++
++#ifndef __syscall_clobber
++#define __syscall_clobber "r11","rcx","memory"
++#endif
++
++#ifndef __syscall_return
++#define __syscall_return(type, res) \
++do { \
++        if ((unsigned long)(res) >= (unsigned long)(-127)) { \
++                errno = -(res); \
++                res = -1; \
++        } \
++        return (type) (res); \
++} while (0)
++#endif
++
++#ifndef _syscall2
++#define _syscall2(type,name,type1,arg1,type2,arg2) \
++type name(type1 arg1,type2 arg2) \
++{ \
++long __res; \
++__asm__ volatile (__syscall \
++        : "=a" (__res) \
++        : "0" (__NR_##name),"D" ((long)(arg1)),"S" ((long)(arg2)) : __syscall_clobber ); \
++__syscall_return(type,__res); \
++}
++#endif
++
++#endif
++
+ typedef struct { 
+ 	unsigned long sig[_ARCH_NSIG_WORDS];
+ } arch_sigset_t;
+diff -ru work.orig/cryopid-0.5.9.1/src/arch-x86_64/cp_r_regs.c work/cryopid-0.5.9.1/src/arch-x86_64/cp_r_regs.c
+--- work.orig/cryopid-0.5.9.1/src/arch-x86_64/cp_r_regs.c	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/arch-x86_64/cp_r_regs.c	2012-04-19 02:43:40.510910687 +0200
+@@ -1,9 +1,9 @@
+-#include <linux/user.h>
+ #include <linux/unistd.h>
+ #include <asm/ldt.h>
+ #include <asm/prctl.h>
+ #include <sys/mman.h>
+ #include <sys/ptrace.h>
++#include <sys/user.h>
+ 
+ #include "cpimage.h"
+ #include "cryopid.h"
+diff -ru work.orig/cryopid-0.5.9.1/src/arch-x86_64/cp_w_regs.c work/cryopid-0.5.9.1/src/arch-x86_64/cp_w_regs.c
+--- work.orig/cryopid-0.5.9.1/src/arch-x86_64/cp_w_regs.c	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/arch-x86_64/cp_w_regs.c	2012-04-19 02:43:53.701745779 +0200
+@@ -1,9 +1,9 @@
+-#include <linux/user.h>
+ #include <linux/unistd.h>
+ #include <asm/ldt.h>
+ #include <asm/prctl.h>
+ #include <sys/mman.h>
+ #include <sys/ptrace.h>
++#include <sys/user.h>
+ #include <errno.h>
+ 
+ #include "cpimage.h"
+diff -ru work.orig/cryopid-0.5.9.1/src/arch-x86_64/elfwriter.c work/cryopid-0.5.9.1/src/arch-x86_64/elfwriter.c
+--- work.orig/cryopid-0.5.9.1/src/arch-x86_64/elfwriter.c	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/arch-x86_64/elfwriter.c	2012-04-19 02:35:32.316013963 +0200
+@@ -3,7 +3,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <sys/mman.h>
+-#include <asm/page.h>
++#include <asm-generic/page.h>
+ #include <string.h>
+ #include <unistd.h>
+ #include "process.h"
+diff -ru work.orig/cryopid-0.5.9.1/src/arch-x86_64/process.c work/cryopid-0.5.9.1/src/arch-x86_64/process.c
+--- work.orig/cryopid-0.5.9.1/src/arch-x86_64/process.c	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/arch-x86_64/process.c	2012-04-19 02:44:09.819544280 +0200
+@@ -9,8 +9,8 @@
+ #include <assert.h>
+ #include <netinet/tcp.h>
+ #include <linux/net.h>
+-#include <linux/user.h>
+-#include <asm/page.h>
++#include <sys/user.h>
++#include <asm-generic/page.h>
+ 
+ #include "cryopid.h"
+ #include "cpimage.h"
+diff -ru work.orig/cryopid-0.5.9.1/src/arch-x86_64/stub.c work/cryopid-0.5.9.1/src/arch-x86_64/stub.c
+--- work.orig/cryopid-0.5.9.1/src/arch-x86_64/stub.c	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/arch-x86_64/stub.c	2012-04-19 02:41:42.997379810 +0200
+@@ -9,7 +9,8 @@
+ #include <sys/mman.h>
+ #include <sys/prctl.h>
+ #include <asm/prctl.h>
+-#include <asm/page.h>
++#include <asm-generic/page.h>
++#include <errno.h>
+ 
+ #include "cryopid.h"
+ #include "cpimage.h"
+diff -ru work.orig/cryopid-0.5.9.1/src/arch-x86_64/stub.h work/cryopid-0.5.9.1/src/arch-x86_64/stub.h
+--- work.orig/cryopid-0.5.9.1/src/arch-x86_64/stub.h	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/arch-x86_64/stub.h	2012-04-19 02:35:26.649084807 +0200
+@@ -2,8 +2,8 @@
+ #define _STUB_H_
+ 
+ #include <sys/mman.h>
+-#include <asm/page.h>
++#include <asm-generic/page.h>
+-#include "cryopid.h"
++#include "../cryopid.h"
+ 
+ static inline void jump_to_trampoline()
+ {
+diff -ru work.orig/cryopid-0.5.9.1/src/common.c work/cryopid-0.5.9.1/src/common.c
+--- work.orig/cryopid-0.5.9.1/src/common.c	2006-11-29 12:42:03.000000000 +0100
++++ work/cryopid-0.5.9.1/src/common.c	2012-04-19 02:35:56.708709012 +0200
+@@ -6,7 +6,7 @@
+ #include <string.h>
+ #include <unistd.h>
+ #include <sys/mman.h>
+-#include <asm/page.h>
++#include <asm-generic/page.h>
+ 
+ #include "cryopid.h"
+ 
+diff -ru work.orig/cryopid-0.5.9.1/src/cp_w_vma.c work/cryopid-0.5.9.1/src/cp_w_vma.c
+--- work.orig/cryopid-0.5.9.1/src/cp_w_vma.c	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/cp_w_vma.c	2012-04-19 02:35:50.852782221 +0200
+@@ -5,7 +5,7 @@
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <unistd.h>
+-#include <asm/page.h>
++#include <asm-generic/page.h>
+ 
+ #include "cpimage.h"
+ #include "process.h"
+diff -ru work.orig/cryopid-0.5.9.1/src/cpimage.h work/cryopid-0.5.9.1/src/cpimage.h
+--- work.orig/cryopid-0.5.9.1/src/cpimage.h	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/cpimage.h	2012-04-19 02:42:52.637509186 +0200
+@@ -10,7 +10,7 @@
+ #include <signal.h>
+ 
+ #include "list.h"
+-#include "cplayout.h"
++#include "arch/cplayout.h"
+ 
+ #define IMAGE_VERSION 0x03
+ 
+diff -ru work.orig/cryopid-0.5.9.1/src/fork2.c work/cryopid-0.5.9.1/src/fork2.c
+--- work.orig/cryopid-0.5.9.1/src/fork2.c	2006-07-05 16:53:08.000000000 +0200
++++ work/cryopid-0.5.9.1/src/fork2.c	2012-04-19 02:42:19.078928728 +0200
+@@ -44,7 +44,11 @@
+ 			{
+ 				char *argv[] = {"farewell", "kitty", "XXXXXXXXXX", NULL};
+ 				snprintf(argv[2], 10, "%d", pid);
+-				execve("fork2_helper", argv, environ);
++#ifndef FORK2HELPER
++#define FORK2HELPER "fork2_helper"
++#endif
++				execve(FORK2HELPER, argv, environ);
++#undef FORK2HELPER
+ 				perror("execve");
+ 				_exit(50);
+ 			}

diff --git a/sys-process/cryopid/metadata.xml b/sys-process/cryopid/metadata.xml
new file mode 100644
index 0000000..59acc2c
--- /dev/null
+++ b/sys-process/cryopid/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+<email>xmw@gentoo.org</email>
+<name>Michael Weber</name>
+</maintainer>
+</pkgmetadata>
+



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-19  1:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-19  1:46 [gentoo-commits] dev/xmw:master commit in: sys-process/cryopid/, sys-process/cryopid/files/ Michael Weber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox