You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
138 lines
6.3 KiB
138 lines
6.3 KiB
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);
|