diff options
author | 2010-08-14 16:17:45 +0300 | |
---|---|---|
committer | 2010-08-14 16:17:45 +0300 | |
commit | 30cf5e45ac7d4b11501c67054b943ae6d6839824 (patch) | |
tree | 3267a03cd01c8c46130ab8678318afe0297caf23 | |
parent | Move /tmp folders/files to /var/tmp (diff) | |
download | idfetch-30cf5e45ac7d4b11501c67054b943ae6d6839824.tar.gz idfetch-30cf5e45ac7d4b11501c67054b943ae6d6839824.tar.bz2 idfetch-30cf5e45ac7d4b11501c67054b943ae6d6839824.zip |
Fix pkgconfig problem with libcrypto++, and rename segget.* to seggetd.*
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | request/Makefile | 1 | ||||
-rw-r--r-- | request/settings.cpp | 2 | ||||
-rw-r--r-- | seggetd/Makefile | 12 | ||||
-rw-r--r-- | seggetd/scripts/functions.py | 2 | ||||
-rw-r--r-- | seggetd/seggetd.conf | 12 | ||||
-rw-r--r-- | seggetd/seggetd.cpp | 6 | ||||
-rw-r--r-- | seggetd/settings.cpp | 2 | ||||
-rw-r--r-- | seggetd/settings.h | 6 | ||||
-rw-r--r-- | tuiclient/settings.h | 6 | ||||
-rw-r--r-- | tuiclient/tuiclient.conf | 14 |
11 files changed, 35 insertions, 34 deletions
@@ -1,14 +1,14 @@ all: - cd segget && make + cd seggetd && make cd request && make cd tuiclient && make install: - cd segget && make install + cd seggetd && make install cd request && make install cd tuiclient && make install clean: - cd segget && make clean + cd seggetd && make clean cd request && make clean cd tuiclient && make clean diff --git a/request/Makefile b/request/Makefile index ca5c5dd..ed06bf5 100644 --- a/request/Makefile +++ b/request/Makefile @@ -28,7 +28,6 @@ clean: install: -mkdir -p /etc/seggetd - -cp *.conf /etc/seggetd -cp request /usr/bin -mkdir -p /var/tmp/seggetd -mkdir -p /var/log/seggetd diff --git a/request/settings.cpp b/request/settings.cpp index 8bfdf37..f9504f0 100644 --- a/request/settings.cpp +++ b/request/settings.cpp @@ -30,7 +30,7 @@ Tsettings settings; void Tsettings::init(){ try{ - Tconfig conf(conf_dir+"/segget.conf"); + Tconfig conf(conf_dir+"/seggetd.conf"); // conf.set("logs","general_log_file",general_log_file); // conf.set("logs","logs_dir",logs_dir); // conf.set("logs","error_log_file",error_log_file); diff --git a/seggetd/Makefile b/seggetd/Makefile index 497ba70..2c66cb9 100644 --- a/seggetd/Makefile +++ b/seggetd/Makefile @@ -1,4 +1,4 @@ -BINS = segget +BINS = seggetd OBJS = $(addsuffix .o,$(BINS)) PKGCONFIG_MODULES = json libcurl libcrypto MISSING_PLUGINS_LIBS = @@ -18,8 +18,8 @@ all: $(BINS) %.o: %.cxx $(CXX) -c -o $@ $(CXXFLAGS) $^ -segget: segget.o connection.o checksum.o config.o distfile.o log.o mirror.o network.o networkbroker.o phase.o pkg.o response.o segment.o settings.o stats.o str.o tui.o utils.o ui_server.o proxyfetcher.o requestserver.o scriptserver.o - $(CXX) -o $@ -lncurses $(LIBS) $(CIBS) $^ +seggetd: seggetd.o connection.o checksum.o config.o distfile.o log.o mirror.o network.o networkbroker.o phase.o pkg.o response.o segment.o settings.o stats.o str.o tui.o utils.o ui_server.o proxyfetcher.o requestserver.o scriptserver.o + $(CXX) -o $@ -lncurses -lcryptopp $(LIBS) $(CIBS) $^ #%: %.o # $(CXX) -o $@ $(LIBS) $(CIBS) $^ @@ -31,14 +31,14 @@ clean: install: -mkdir /etc/seggetd -cp *.conf /etc/seggetd - -cp segget /usr/bin/seggetd + -cp seggetd /usr/bin/seggetd -cp ./init.d/seggetd /etc/init.d/seggetd -mkdir -p /usr/share/seggetd -cp -R ./webui /usr/share/seggetd -mkdir -p /usr/share/seggetd/scripts -cp -R ./scripts /usr/share/seggetd - -mkdir -p /tmp/seggetd/segments + -mkdir -p /var/tmp/seggetd/segments -mkdir -p /usr/portage/distfiles -mkdir -p /var/log/seggetd -.PRECIOUS: %.o +.PRECIOUS: %.o
\ No newline at end of file diff --git a/seggetd/scripts/functions.py b/seggetd/scripts/functions.py index c2527b2..999e1a5 100644 --- a/seggetd/scripts/functions.py +++ b/seggetd/scripts/functions.py @@ -74,4 +74,4 @@ distfile=Tdistfile segment=Tsegment client_socket = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) -client_socket.connect("/tmp/seggetd/script_socket")
\ No newline at end of file +client_socket.connect("/var/tmp/seggetd/script_socket")
\ No newline at end of file diff --git a/seggetd/seggetd.conf b/seggetd/seggetd.conf index 219530e..3bfb7b0 100644 --- a/seggetd/seggetd.conf +++ b/seggetd/seggetd.conf @@ -5,9 +5,9 @@ # /usr/bin - binary files: seggetd, tuiclient, request # /usr/share/seggetd/scripts - for user-side python script files # /usr/share/seggetd/webui - for webui files -# /tmp/seggetd/pkg.list - to save distfile list generated by portage and parse it +# /var/tmp/seggetd/pkg.list - to save distfile list generated by portage and parse it # by request tool to segget daemon -# /tmp/seggetd/segments - to store segments +# /var/tmp/seggetd/segments - to store segments # /usr/portage/distfiles - to store ready to use distfiles # /var/log/seggetd - to store log files @@ -20,8 +20,8 @@ distfiles_dir=/usr/portage/distfiles # SEGMENTS_DIR # Define a dir to store distfiles' segments # Default: -# segments_dir=/tmp/seggetd/segments -segments_dir=/tmp/seggetd/segments +# segments_dir=/var/tmp/seggetd/segments +segments_dir=/var/tmp/seggetd/segments [portage] # SYNOPSIS: fetch_only=0 | 1 @@ -378,8 +378,8 @@ scripts_dir=/usr/share/seggetd/scripts # Specify path for the socket on your filesystem. # NOTE !: Default value can NOT be changed yet (option under development). # Default: -# script_socket_path=/tmp/seggetd/script_socket -script_socket_path=/tmp/seggetd/script_socket +# script_socket_path=/var/tmp/seggetd/script_socket +script_socket_path=/var/tmp/seggetd/script_socket [logs] # LOGS_DIR diff --git a/seggetd/seggetd.cpp b/seggetd/seggetd.cpp index a34b2f9..a392ffa 100644 --- a/seggetd/seggetd.cpp +++ b/seggetd/seggetd.cpp @@ -24,7 +24,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "segget.h" +#include "seggetd.h" /* int load_pkgs(){ try{ @@ -484,7 +484,9 @@ void start_daemon_mode(){ } umask(0); // prevent unmount problems - switch to root -// chdir("/"); + if (chdir("/")){ + error_log_no_msg("Error in segget.cpp: start_daemon_mode: can NOT chdir(\"/\")"); + } // create descriptors in case someone will use them int fileDesc = open("/dev/null", O_RDWR); //stdin //stdout diff --git a/seggetd/settings.cpp b/seggetd/settings.cpp index c3db2b6..d6f98d3 100644 --- a/seggetd/settings.cpp +++ b/seggetd/settings.cpp @@ -67,7 +67,7 @@ void Tsettings::load_provide_mirror_files_restricted_patterns_vector(){ void Tsettings::init(){ try{ - Tconfig conf("segget.conf"); + Tconfig conf("seggetd.conf"); conf.set("logs","general_log_file",general_log_file); conf.set("logs","logs_dir",logs_dir); conf.set("logs","error_log_file",error_log_file); diff --git a/seggetd/settings.h b/seggetd/settings.h index 0328501..60f484a 100644 --- a/seggetd/settings.h +++ b/seggetd/settings.h @@ -104,7 +104,7 @@ class Tsettings{ no_daemon_flag(false), //folders distfiles_dir("/usr/portage/distfiles"), - segments_dir("/tmp/seggetd/segments"), + segments_dir("/var/tmp/seggetd/segments"), //pkg_list // pkg_list_dir("./"), // del_pkg_list_when_dld_finished(1), @@ -150,10 +150,10 @@ class Tsettings{ //scripting_and_scheduling python_path("/usr/bin/python"), scripts_dir("/usr/share/seggetd/scripts"), - script_socket_path("/tmp/seggetd/script_socket"), + script_socket_path("/var/tmp/seggetd/script_socket"), //logs logs_dir("/var/log/seggetd"), - general_log_file("segget.log"), + general_log_file("seggetd.log"), error_log_file("error.log"), debug_log_file("none"), general_log_time_format("%m/%d %X"), diff --git a/tuiclient/settings.h b/tuiclient/settings.h index 4d05f65..22fd167 100644 --- a/tuiclient/settings.h +++ b/tuiclient/settings.h @@ -168,10 +168,10 @@ class Tsettings{ color_status_disconnected_bg(COLOR_RED), //logs - logs_dir("./logs"), + logs_dir("/var/log/seggetd"), general_log_file("tuiclient.log"), - error_log_file("error.log"), - debug_log_file("debug.log") + error_log_file("tuiclient_error.log"), + debug_log_file("tuiclient_debug.log") {}; void init(); }; diff --git a/tuiclient/tuiclient.conf b/tuiclient/tuiclient.conf index 81e3480..6092a0a 100644 --- a/tuiclient/tuiclient.conf +++ b/tuiclient/tuiclient.conf @@ -20,7 +20,7 @@ ui_port=9999 [colors] # Define color scheme for tuiclient. -# Avaible colors are: +# Available colors are: # COLOR_BLACK # COLOR_RED # COLOR_GREEN @@ -82,8 +82,8 @@ color_status_disconnected_bg=COLOR_RED # LOGS_DIR # Define a dir to store log files. # Default: -# logs_dir=./logs -logs_dir=./logs +# logs_dir=/var/log/seggetd +logs_dir=/var/log/seggetd # GENERAL_LOG_FILE # Define a file name to store general log. @@ -94,11 +94,11 @@ general_log_file=tuiclient.log # ERROR_LOG_FILE # Define a file name to store error log. # Default: -# error_log_file=segget.log -error_log_file=error.log +# error_log_file=tuiclient_error.log +error_log_file=tuiclient_error.log # DEBUG_LOG_FILE # Define a file name to store debug log. # Default: -# debug_log_file=segget.log -debug_log_file=debug.log
\ No newline at end of file +# debug_log_file=tuiclient_debug.log +debug_log_file=tuiclient_debug.log
\ No newline at end of file |