Browse files

dropping e4rat.

  • Loading branch information...
1 parent c09a73b commit dd240ed763a85963239543872ee69b75afe73f5b Piotr Karbowski committed Dec 22, 2012
View
1 sys-fs/e4rat/Manifest
@@ -1 +0,0 @@
-DIST e4rat_0.2.1_src.tar.gz 71943 RMD160 d65c48e7717ec84a219a05fcfb5bd62f8034b8e8 SHA1 e93a850ca068d9977dabfa79c2a91861a51fdbfb SHA256 c509f165eff317f80f5d13d7b370514c457df4542ff3b31bee4c26f97ce89769
View
70 sys-fs/e4rat/e4rat-0.2.1-r2.ebuild
@@ -1,70 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/e4rat/e4rat-0.2.1-r2.ebuild,v 1.1 2012/01/08 11:38:11 hwoarang Exp $
-
-EAPI=4
-
-inherit cmake-utils linux-info
-
-DESCRIPTION="Toolset to accelerate the boot process and application startup"
-HOMEPAGE="http://e4rat.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P/-/_}_src.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-
-DEPEND="dev-lang/perl
- >=dev-libs/boost-1.42
- sys-fs/e2fsprogs
- sys-process/audit"
-RDEPEND="${DEPEND}"
-
-CONFIG_CHECK="~AUDITSYSCALL"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-shared-build.patch
- "${FILESDIR}"/${PN}-libdir.patch
-)
-
-pkg_setup() {
- check_extra_config
-}
-
-src_prepare() {
- base_src_prepare
- cp "${FILESDIR}/e4rat-preload-lite.c" "$S"
-}
-
-
-src_compile() {
- cd "$S"
- gcc -std=c99 -Wall -O2 -o e4rat-preload-lite e4rat-preload-lite.c
-
- cmake-utils_src_compile
-}
-
-src_install() {
- cmake-utils_src_install
- # relocate binaries to /sbin. If someone knows of a better way to do it
- # please do tell me
- dodir sbin
- find "${D}"/usr/sbin -type f -exec mv {} "${D}"/sbin/. \; \
- || die
- cp "${S}/e4rat-preload-lite" "${D}/sbin"
-}
-
-pkg_postinst() {
- elog
- elog "Please consult the upstream wiki if you need help"
- elog "configuring your system"
- elog "http://e4rat.sourceforge.net/wiki/index.php/Main_Page"
- elog
- if has_version sys-apps/preload; then
- elog "It appears you have sys-apps/preload installed. This may"
- elog "has negative effects on ${PN}. You may want to disable preload"
- elog "when using ${PN}."
- elog "http://e4rat.sourceforge.net/wiki/index.php/Main_Page#Debian.2FUbuntu"
- fi
-}
View
26 sys-fs/e4rat/files/e4rat-libdir.patch
@@ -1,26 +0,0 @@
-From b2413a77f3f11c6722ea7e83aafbaa3fc5c73376 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <gentoo@mgorny.alt.pl>
-Date: Sun, 11 Dec 2011 18:39:59 +0100
-Subject: [PATCH] Fix installing into libdir.
-
----
- e4rat-0.2.1/src/CMakeLists.txt | 2 --
- 1 files changed, 0 insertions(+), 2 deletions(-)
-
-diff --git a/e4rat-0.2.1/src/CMakeLists.txt b/e4rat-0.2.1/src/CMakeLists.txt
-index d379ec6..9fc7492 100644
---- a/e4rat-0.2.1/src/CMakeLists.txt
-+++ b/e4rat-0.2.1/src/CMakeLists.txt
-@@ -163,8 +163,7 @@ endif(NOT HAVE_64_BIT)
-
- INSTALL(TARGETS ${${PROJECT_NAME}_TARGETS}
- RUNTIME DESTINATION "sbin"
-- LIBRARY DESTINATION "lib"
-+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
-- ARCHIVE DESTINATION "lib"
- )
-
- INSTALL(DIRECTORY DESTINATION "/var/lib/${PROJECT_NAME}")
---
-1.7.8.110.g4cb5d1.dirty
-
View
139 sys-fs/e4rat/files/e4rat-preload-lite.c
@@ -1,139 +0,0 @@
-/* e4rat-preload-lite, written by John Lindgren, 2011. */
-/* Replacement for e4rat-preload, which was written by Andreas Rid, 2011. */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#define LIST "/var/lib/e4rat/startup.log"
-#define INIT "/sbin/init"
-#define EARLY 200
-#define BLOCK 300
-#define BUF (1024*1024)
-
-typedef struct {
- int n, dev;
- uint64_t inode;
- char * path;
-} FileDesc;
-
-static FileDesc * * list = 0;
-static FileDesc * * sorted = 0;
-static int listlen = 0;
-
-static int sort_cb (const void * _a, const void * _b) {
- FileDesc * a = * (FileDesc * *) _a;
- FileDesc * b = * (FileDesc * *) _b;
- if (a->dev < b->dev)
- return -1;
- if (a->dev > b->dev)
- return 1;
- if (a->inode < b->inode)
- return -1;
- if (a->inode > b->inode)
- return 1;
- return 0;
-}
-
-static FileDesc * parse_line (int n, const char * line) {
- int dev = 0;
- while (* line >= '0' && * line <= '9')
- dev = dev * 10 + ((* line ++) - '0');
- if ((* line ++) != ' ')
- return 0;
- uint64_t inode = 0;
- while (* line >= '0' && * line <= '9')
- inode = inode * 10 + ((* line ++) - '0');
- if ((* line ++) != ' ')
- return 0;
- FileDesc * f = malloc (sizeof (FileDesc));
- f->n = n;
- f->dev = dev;
- f->inode = inode;
- f->path = strdup (line);
- return f;
-}
-
-static void load_list (void) {
- printf ("Loading %s.\n", LIST);
- FILE * stream = fopen (LIST, "r");
- if (! stream) {
- printf ("Error: %s.\n", strerror (errno));
- exit (EXIT_FAILURE);
- }
- int listsize = 0;
- while (1) {
- char buf[512];
- if (! fgets (buf, sizeof buf, stream))
- break;
- if (buf[0] && buf[strlen (buf) - 1] == '\n')
- buf[strlen (buf) - 1] = 0;
- FileDesc * f = parse_line (listlen, buf);
- if (! f)
- continue;
- if (listlen >= listsize) {
- listsize = listsize ? listsize * 2 : 256;
- list = realloc (list, sizeof (FileDesc *) * listsize);
- }
- list[listlen ++] = f;
- }
- fclose (stream);
- list = realloc (list, sizeof (FileDesc *) * listlen);
- sorted = malloc (sizeof (FileDesc *) * listlen);
- memcpy (sorted, list, sizeof (FileDesc *) * listlen);
- qsort (sorted, listlen, sizeof (FileDesc *), sort_cb);
-}
-
-static void load_inodes (int a, int b) {
- struct stat s;
- for (int i = 0; i < listlen; i ++) {
- if (sorted[i]->n >= a && sorted[i]->n < b)
- stat (sorted[i]->path, & s);
- }
-}
-
-static void exec_init (char * * argv) {
- printf ("Executing %s.\n", INIT);
- switch (fork ()) {
- case -1:
- printf ("Error: %s.\n", strerror (errno));
- exit (EXIT_FAILURE);
- case 0:
- return;
- default:
- execv (INIT, argv);
- printf ("Error: %s.\n", strerror (errno));
- exit (EXIT_FAILURE);
- }
-}
-
-static void load_files (int a, int b) {
- void * buf = malloc (BUF);
- for (int i = a; i < b && i < listlen; i ++) {
- int handle = open (list[i]->path, O_RDONLY);
- if (handle < 0)
- continue;
- while (read (handle, buf, BUF) > 0)
- ;
- close (handle);
- }
- free (buf);
-}
-
-int main (int argc, char * * argv) {
- load_list ();
- printf ("Preloading %d files.\n", listlen);
- load_inodes (0, EARLY);
- load_files (0, EARLY);
- exec_init (argv);
- for (int i = EARLY; i < listlen; i += BLOCK) {
- load_inodes (i, i + BLOCK);
- load_files (i, i + BLOCK);
- }
- exit (EXIT_SUCCESS);
-}
View
96 sys-fs/e4rat/files/e4rat-shared-build.patch
@@ -1,96 +0,0 @@
-From d9114b018b79afdcedb59621dfc13a0423c65fae Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
-Date: Sat, 10 Dec 2011 23:00:35 +0100
-Subject: [PATCH] Link with and install shared libraries.
-
----
- e4rat-0.2.1/CMakeLists.txt | 1 -
- e4rat-0.2.1/src/CMakeLists.txt | 13 +------------
- e4rat-0.2.1/src/cmake/Findaudit.cmake | 2 +-
- e4rat-0.2.1/src/cmake/Findauparse.cmake | 2 +-
- 4 files changed, 3 insertions(+), 15 deletions(-)
-
-diff --git a/e4rat-0.2.1/CMakeLists.txt b/e4rat-0.2.1/CMakeLists.txt
-index 72b0681..e5e64cf 100644
---- a/e4rat-0.2.1/CMakeLists.txt
-+++ b/e4rat-0.2.1/CMakeLists.txt
-@@ -14,7 +14,6 @@ IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
- set(CMAKE_INSTALL_PREFIX "/" CACHE PATH "e4rat install prefix" FORCE)
- ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-
--set(Boost_USE_STATIC_LIBS ON)
- set(Boost_USE_MULTITHREADED OFF)
- add_definitions(-DBOOST_FILESYSTEM_VERSION=2)
- find_package(Boost 1.41 COMPONENTS system filesystem regex REQUIRED)
-diff --git a/e4rat-0.2.1/src/CMakeLists.txt b/e4rat-0.2.1/src/CMakeLists.txt
-index d379ec6..4f8c12e 100644
---- a/e4rat-0.2.1/src/CMakeLists.txt
-+++ b/e4rat-0.2.1/src/CMakeLists.txt
-@@ -113,21 +113,12 @@ IF(CMAKE_BUILD_TYPE STREQUAL "debug")
- )
- ENDIF(CMAKE_BUILD_TYPE STREQUAL "debug")
-
--# On 64 bit architecture you cannot link a static to a shared library
--# Therefore -static-libstdc++ will fail.
--if(HAVE_64_BIT)
-- add_library(${PROJECT_NAME}-core STATIC
-- ${${PROJECT_NAME}-core_SRC}
-- )
--else(HAVE_64_BIT)
- add_library(${PROJECT_NAME}-core SHARED
- ${${PROJECT_NAME}-core_SRC}
- )
- set_target_properties(${PROJECT_NAME}-core PROPERTIES
- SOVERSION 0
-- LINK_FLAGS "-static-libgcc -static-libstdc++"
- )
--endif(HAVE_64_BIT)
-
- target_link_libraries(${PROJECT_NAME}-core
- ${${PROJECT_NAME}_LIBRARIES}
-@@ -140,15 +131,13 @@ foreach( EXE ${PROJECT_NAME}-collect
- TARGET_LINK_LIBRARIES(${EXE}
- ${PROJECT_NAME}-core
- )
-- set_target_properties(${EXE} PROPERTIES
-- LINK_FLAGS "-static-libgcc -static-libstdc++"
-- )
- endforeach( EXE )
-
- ###
- # install project targets
- ###
- set(${PROJECT_NAME}_TARGETS
-+ ${PROJECT_NAME}-core
- ${PROJECT_NAME}-collect
- ${PROJECT_NAME}-preload
- ${PROJECT_NAME}-realloc
-diff --git a/e4rat-0.2.1/src/cmake/Findaudit.cmake b/e4rat-0.2.1/src/cmake/Findaudit.cmake
-index 32ac636..d8de45a 100644
---- a/e4rat-0.2.1/src/cmake/Findaudit.cmake
-+++ b/e4rat-0.2.1/src/cmake/Findaudit.cmake
-@@ -1,7 +1,7 @@
- FIND_PATH(AUDIT_INCLUDE_DIR libaudit.h /usr/include
- /usr/local/include)
-
--FIND_LIBRARY(AUDIT_LIBRARY NAMES libaudit.a PATH /usr/lib /usr/local/lib)
-+FIND_LIBRARY(AUDIT_LIBRARY NAMES audit PATH /usr/lib /usr/local/lib)
-
- IF (AUDIT_INCLUDE_DIR AND AUDIT_LIBRARY)
- SET(AUDIT_FOUND TRUE)
-diff --git a/e4rat-0.2.1/src/cmake/Findauparse.cmake b/e4rat-0.2.1/src/cmake/Findauparse.cmake
-index 7db0511..3771cd5 100644
---- a/e4rat-0.2.1/src/cmake/Findauparse.cmake
-+++ b/e4rat-0.2.1/src/cmake/Findauparse.cmake
-@@ -1,7 +1,7 @@
- FIND_PATH(AUPARSE_INCLUDE_DIR auparse.h /usr/include
- /usr/local/include)
-
--FIND_LIBRARY(AUPARSE_LIBRARY NAMES libauparse.a PATH /usr/lib /usr/local/lib)
-+FIND_LIBRARY(AUPARSE_LIBRARY NAMES auparse PATH /usr/lib /usr/local/lib)
-
- IF (AUPARSE_INCLUDE_DIR AND AUPARSE_LIBRARY)
- SET(AUPARSE_FOUND TRUE)
---
-1.7.8.110.g4cb5d1.dirty
-

0 comments on commit dd240ed

Please sign in to comment.