package created by autospec [release 0.2.3-1mamba;Wed Oct 31 2012]

This commit is contained in:
Silvan Calarco 2024-01-05 22:01:19 +01:00
parent 04ecedb7b9
commit 743a513293
3 changed files with 174 additions and 0 deletions

View File

@ -1,2 +1,7 @@
# e4rat # e4rat
e4rat ("Ext4 - Reducing Access Times") is a toolset to accelerate the boot process as well as application startups. Through physical file realloction e4rat eliminates both seek times and rotational delays. This leads to a high disk transfer rate.
Placing files on disk in a sequentially ordered way allows to efficiently read-ahead files in parallel to the program startup. The combination of sequentially reading and a high cache hit rate may reduce the boot time by a factor of three, as the example below shows.
e4rat is based on the online defragmentation ioctl EXT4_IOC_MOVE_EXT from the Ext4 filesystem, which was introduced in Linux Kernel 2.6.31. Other filesystem types and/or earlier versions of extended filesystems are not supported.

View File

@ -0,0 +1,110 @@
From 166096f2c0dc2edc76ff498502008da9852ae3e2 Mon Sep 17 00:00:00 2001
From: Andreas Rid <conso@users.sf.net>
Date: Tue, 11 Sep 2012 23:24:42 +0200
Subject: [PATCH] Add support for boost filesystem version 3
Boost filesystem version 2 is deprecated in boot-1.50.
---
CMakeLists.txt | 2 +-
src/common.cc | 6 +++---
src/config.cc | 2 +-
src/device.cc | 8 ++++----
src/e4rat-collect.cc | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e6de8d2..65aa95d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,7 @@ ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED OFF)
-add_definitions(-DBOOST_FILESYSTEM_VERSION=2)
+add_definitions(-DBOOST_FILESYSTEM_VERSION=3)
find_package(Boost 1.41 COMPONENTS system filesystem regex REQUIRED)
set(${PROJECT_NAME}_LIBRARIES ${${PROJECT_NAME}_LIBRARIES}
${Boost_LIBRARIES})
diff --git a/src/common.cc b/src/common.cc
index 9fba13a..f907fa4 100644
--- a/src/common.cc
+++ b/src/common.cc
@@ -157,7 +157,7 @@ std::vector<std::string> matchPath( const std::string & filesearch )
p /= filesearch;
}
// Initialize regex filter - use * as default if nothing is given in filesearch
- std::string f( p.has_filename() ? p.filename() : "*");
+ std::string f( p.has_filename() ? p.filename().string() : "*");
fs::path dir(system_complete(p).parent_path());
if( is_directory(dir) )
@@ -166,8 +166,8 @@ std::vector<std::string> matchPath( const std::string & filesearch )
it!=boost::filesystem::directory_iterator();
++it )
{
- if( boost::regex_match( it->leaf(), path2regex(f) ) )
- fileset.push_back(it->string());
+ if( boost::regex_match( it->path().string(), path2regex(f) ) )
+ fileset.push_back(it->path().string());
}
return fileset;
}
diff --git a/src/config.cc b/src/config.cc
index 5671fb4..8841c5d 100644
--- a/src/config.cc
+++ b/src/config.cc
@@ -71,7 +71,7 @@ Config::Config()
return;
}
- tool_name = fs::path(argv[0]).filename();
+ tool_name = fs::path(argv[0]).filename().string();
found = tool_name.find_last_of("-");
if(found)
defaultSection = tool_name.substr(found+1);
diff --git a/src/device.cc b/src/device.cc
index 4ac6e73..e366cdb 100644
--- a/src/device.cc
+++ b/src/device.cc
@@ -196,13 +196,13 @@ int Device::getDevNameFromDevfs()
it != end_itr;
++it )
{
- if(it->filename() == "root")
+ if(it->path().string() == "root")
continue;
- if(lstat(it->string().c_str(), &st))
+ if(lstat(it->path().string().c_str(), &st))
continue;
if(st.st_rdev == get()->devno)
{
- get()->deviceName = it->filename();
+ get()->deviceName = it->path().string();
get()->devicePath = "/dev/" + get()->deviceName;
return 0;
}
@@ -225,7 +225,7 @@ int Device::getDevNameFromMajorMinor()
// the minor number of virtual filesystems are allocated dynamically in function set_anon_super() in fs/super.c
// for convenience set deviceName and devicePath to a common name
get()->deviceName = "virtual file system";
- get()->devicePath = get()->mount_point.filename();
+ get()->devicePath = get()->mount_point.filename().string();
return 0;
case 2:
ss << "fd";
diff --git a/src/e4rat-collect.cc b/src/e4rat-collect.cc
index 8cc2b81..455057c 100644
--- a/src/e4rat-collect.cc
+++ b/src/e4rat-collect.cc
@@ -396,7 +396,7 @@ int main(int argc, char* argv[])
* Parse application list given as arguments
*/
for ( ; optind < argc; optind++)
- project.observeApp(fs::path(argv[optind]).filename());
+ project.observeApp(fs::path(argv[optind]).filename().string());
/*
* Parse application list on stdin
--
1.7.4.1

59
e4rat.spec Normal file
View File

@ -0,0 +1,59 @@
Name: e4rat
Version: 0.2.3
Release: 1mamba
Summary: A toolset to accelerate the boot process as well as application startups
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://e4rat.sourceforge.net/
Source: http://downloads.sourceforge.net/project/e4rat/%{version}/e4rat_%{version}_src.tar.gz
Patch0: e4rat-0.2.3-libboost-1.50.0.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libe2fs-devel
## AUTOBUILDREQ-END
BuildRequires: cmake
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
e4rat ("Ext4 - Reducing Access Times") is a toolset to accelerate the boot process as well as application startups. Through physical file realloction e4rat eliminates both seek times and rotational delays. This leads to a high disk transfer rate.
Placing files on disk in a sequentially ordered way allows to efficiently read-ahead files in parallel to the program startup. The combination of sequentially reading and a high cache hit rate may reduce the boot time by a factor of three, as the example below shows.
e4rat is based on the online defragmentation ioctl EXT4_IOC_MOVE_EXT from the Ext4 filesystem, which was introduced in Linux Kernel 2.6.31. Other filesystem types and/or earlier versions of extended filesystems are not supported.
%debug_package
%prep
%setup -q
%patch0 -p1
%build
%cmake -d build
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall -C build
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/e4rat.conf
%{_libdir}/libe4rat-core.so
%{_libdir}/libe4rat-core.so.0
%{_sbindir}/e4rat-collect
%{_sbindir}/e4rat-preload
%{_sbindir}/e4rat-realloc
%{_mandir}/man5/e4rat.conf.5.gz
%{_mandir}/man8/e4rat-collect.8.gz
%{_mandir}/man8/e4rat-preload.8.gz
%{_mandir}/man8/e4rat-realloc.8.gz
%doc LICENSE
%changelog
* Wed Oct 31 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.2.3-1mamba
- package created by autospec