summaryrefslogtreecommitdiff
blob: 755bb13bb50393f149c692dbde1b6b6644c5c493 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
diff -ur PortageXS-0.02.09.orig/lib/PortageXS/Core.pm PortageXS-0.02.09/lib/PortageXS/Core.pm
--- PortageXS-0.02.09.orig/lib/PortageXS/Core.pm	2008-12-01 21:30:50 +0100
+++ PortageXS-0.02.09/lib/PortageXS/Core.pm	2009-03-18 20:56:20 +0100
@@ -94,7 +94,7 @@
 	my $self		= shift;
 	my $param		= shift;
 	my @files		= ();
-	my @etcfiles		= qw(/usr/share/portage/config/make.globals /etc/portage/make.conf);
+	my @etcfiles		= qw(@GENTOO_PORTAGE_EPREFIX@/usr/share/portage/config/make.globals @GENTOO_PORTAGE_EPREFIX@/etc/portage/make.conf);
 	my @profilefiles	= ();
 	my $v			= '';
 	my $parent		= '';
@@ -139,7 +139,7 @@
 	
 	# - Defaults >
 	if ($param eq 'PORTDIR' && !$v) {
-		$v='/usr/portage';
+		$v='@GENTOO_PORTAGE_EPREFIX@/usr/portage';
 	}
 	
 	return $v;
@@ -166,7 +166,7 @@
 		return $self->{'PORTDIR'};
 	}
 	else {
-		$self->{'PORTDIR'}=$self->getParamFromFile($self->getFileContents('/usr/share/portage/config/make.globals').$self->getFileContents('/etc/portage/make.conf'),'PORTDIR','lastseen');
+		$self->{'PORTDIR'}=$self->getParamFromFile($self->getFileContents('@GENTOO_PORTAGE_EPREFIX@/usr/share/portage/config/make.globals').$self->getFileContents('@GENTOO_PORTAGE_EPREFIX@/etc/portage/make.conf'),'PORTDIR','lastseen');
 		return $self->{'PORTDIR'};
 	}
 }
@@ -183,7 +183,7 @@
 	my $self	= shift;
 	my $forcereload	= shift;
 	
-	return split(/ /,$self->getParamFromFile($self->getFileContents('/usr/share/portage/config/make.globals').$self->getFileContents('/etc/portage/make.conf'),'PORTDIR_OVERLAY','lastseen'));
+	return split(/ /,$self->getParamFromFile($self->getFileContents('@GENTOO_PORTAGE_EPREFIX@/usr/share/portage/config/make.globals').$self->getFileContents('@GENTOO_PORTAGE_EPREFIX@/etc/portage/make.conf'),'PORTDIR_OVERLAY','lastseen'));
 }
 
 # Description:
diff -ur PortageXS-0.02.09.orig/lib/PortageXS.pm PortageXS-0.02.09/lib/PortageXS.pm
--- PortageXS-0.02.09.orig/lib/PortageXS.pm	2008-12-01 21:30:50 +0100
+++ PortageXS-0.02.09/lib/PortageXS.pm	2009-03-18 20:52:29 +0100
@@ -61,8 +61,8 @@
 	$self->{'VERSION'}			= $VERSION;
 	
 	$self->{'PORTDIR'}			= $self->getPortdir();
-	$self->{'PKG_DB_DIR'}			= '/var/db/pkg/';
-	$self->{'PATH_TO_WORLDFILE'}		= '/var/lib/portage/world';
+	$self->{'PKG_DB_DIR'}			= '@GENTOO_PORTAGE_EPREFIX@/var/db/pkg/';
+	$self->{'PATH_TO_WORLDFILE'}		= '@GENTOO_PORTAGE_EPREFIX@/var/lib/portage/world';
 	$self->{'IS_INITIALIZED'}		= 1;
 	
 	$self->{'EXCLUDE_DIRS'}{'.'}		= 1;
@@ -75,9 +75,9 @@
 	$self->{'EXCLUDE_DIRS'}{'CVS'}		= 1;
 	$self->{'EXCLUDE_DIRS'}{'.cache'}	= 1;
 	
-	$self->{'PORTAGEXS_ETC_DIR'}		= '/etc/pxs/';
-	$self->{'ETC_DIR'}			= '/etc/';
-	$self->{'MAKE_PROFILE_PATH'}		= '/etc/portage/make.profile';
+	$self->{'PORTAGEXS_ETC_DIR'}		= '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/';
+	$self->{'ETC_DIR'}			= '@GENTOO_PORTAGE_EPREFIX@/etc/';
+	$self->{'MAKE_PROFILE_PATH'}		= '@GENTOO_PORTAGE_EPREFIX@/etc/portage/make.profile';
 	
 	# - init colors >
 	$self->{'COLORS'}{'YELLOW'}		= color('bold yellow');
@@ -89,7 +89,7 @@
 	$self->{'COLORS'}{'BLUE'}		= color('bold blue');
 	$self->{'COLORS'}{'RESET'}		= color('reset');
 	
-	if (lc($self->getParamFromFile($self->getFileContents('/etc/portage/make.conf'),'NOCOLOR','lastseen')) eq 'true') {
+	if (lc($self->getParamFromFile($self->getFileContents('@GENTOO_PORTAGE_EPREFIX@/etc/portage/make.conf'),'NOCOLOR','lastseen')) eq 'true') {
 		$self->{'COLORS'}{'YELLOW'}		= '';
 		$self->{'COLORS'}{'GREEN'}		= '';
 		$self->{'COLORS'}{'LIGHTGREEN'}		= '';
diff -ur PortageXS-0.02.09.orig/usr/bin/portagexs_client PortageXS-0.02.09/usr/bin/portagexs_client
--- PortageXS-0.02.09.orig/usr/bin/portagexs_client	2008-12-01 21:30:50 +0100
+++ PortageXS-0.02.09/usr/bin/portagexs_client	2009-03-18 20:52:29 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!@GENTOO_PORTAGE_EPREFIX@/usr/bin/perl
 
 # -----------------------------------------------------------------------------
 #
@@ -54,9 +54,9 @@
 				SSL_use_cert => 1,
 				SSL_verify_mode => 0x01,
 				SSL_passwd_cb => sub { return "" },
-				SSL_key_file => '/etc/pxs/certs/client-key.pem',
-				SSL_cert_file => '/etc/pxs/certs/client-cert.pem',
-				SSL_ca_file => '/etc/pxs/certs/my-ca.pem'
+				SSL_key_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/client-key.pem',
+				SSL_cert_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/client-cert.pem',
+				SSL_ca_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/my-ca.pem'
 				 ))) {
 	$pxs->print_err("unable to create socket: ".&IO::Socket::SSL::errstr."\n");
 	$pxs->print_err("Server down?\n");
diff -ur PortageXS-0.02.09.orig/usr/sbin/portagexsd PortageXS-0.02.09/usr/sbin/portagexsd
--- PortageXS-0.02.09.orig/usr/sbin/portagexsd	2008-12-01 21:30:50 +0100
+++ PortageXS-0.02.09/usr/sbin/portagexsd	2009-03-18 20:52:29 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -t
+#!@GENTOO_PORTAGE_EPREFIX@/usr/bin/perl -t
 
 # -----------------------------------------------------------------------------
 #
@@ -50,7 +50,7 @@
 sub main {
 	# - Parse config >
 	my %config	= ();
-	$config{'cfgfiledata'} = $pxs->getFileContents("/etc/pxs/portagexsd.conf");
+	$config{'cfgfiledata'} = $pxs->getFileContents("@GENTOO_PORTAGE_EPREFIX@/etc/pxs/portagexsd.conf");
 	$config{'Port'} = $pxs->getParamFromFile($config{'cfgfiledata'},"Port","lastseen");
 	$config{'SSLpasswd'} = $pxs->getParamFromFile($config{'cfgfiledata'},"SSLpasswd","lastseen");
 	$config{'PidFile'} = $pxs->getParamFromFile($config{'cfgfiledata'},"PidFile","lastseen");
@@ -60,7 +60,7 @@
 	$config{'cfgfiledata'} = undef;
 	
 	if (!$config{'I_AM_ROOT_AND_I_KNOW_WHAT_I_AM_DOING'}) {
-		syslog("info", 'Not starting server as it seems that you did not have a look at the configs yet! (/etc/pxs/portagexsd.conf)');
+		syslog("info", 'Not starting server as it seems that you did not have a look at the configs yet! (@GENTOO_PORTAGE_EPREFIX@/etc/pxs/portagexsd.conf)');
 		exit(0);
 	}
 	
@@ -70,9 +71,9 @@
 				Reuse     => 1,
 				SSL_verify_mode => 0x01,
 				SSL_passwd_cb => sub {return $config{'SSLpasswd'}},
-				SSL_key_file => '/etc/pxs/certs/server-key.pem',
-				SSL_cert_file => '/etc/pxs/certs/server-cert.pem',
-				SSL_ca_file => '/etc/pxs/certs/my-ca.pem'
+				SSL_key_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/server-key.pem',
+				SSL_cert_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/server-cert.pem',
+				SSL_ca_file => '@GENTOO_PORTAGE_EPREFIX@/etc/pxs/certs/my-ca.pem'
 			)) ) {
 		syslog("info", "Unable to create socket: ", &IO::Socket::SSL::errstr);
 		exit(0);