[pve-devel] [PATCH] Change ceph repository

Wolfgang Link w.link at proxmox.com
Fri Sep 4 14:06:10 CEST 2015


We change currently the the ceph repository, so we are able to install ceph on PVE4.0 Beta2.
---
 bin/pveceph | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/bin/pveceph b/bin/pveceph
index 227eaa1..aefeee0 100755
--- a/bin/pveceph
+++ b/bin/pveceph
@@ -98,8 +98,10 @@ __PACKAGE__->register_method ({
     code => sub {
 	my ($param) = @_;
 
-	my $cephver = $param->{version} || 'firefly';
+	my $cephver = $param->{version} || 'hammer';
 
+	#Solong we are on the devel repo only hammer is posible
+	$cephver = 'hammer';
 	local $ENV{DEBIAN_FRONTEND} = 'noninteractive';
 
 	my $keyurl = "https://git.ceph.com/?p=ceph.git;a=blob_plain;f=keys/release.asc";
@@ -127,13 +129,32 @@ __PACKAGE__->register_method ({
 
 	unlink $tmp_key_file;
 
-	my $source = "deb http://ceph.com/debian-$cephver wheezy main\n";
+	#Note: this is the developer key and will used for testing
+	my $dev_keyurl = 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc';
 
-	PVE::Tools::file_set_contents("/etc/apt/sources.list.d/ceph.list", $source);
+	$response = $ua->get($dev_keyurl);
+	if ($response->is_success) {
+	    my $data = $response->decoded_content;
+	    PVE::Tools::file_set_contents($tmp_key_file, $data);
+        } else {
+	    die "unable to download ceph release key: " . $response->status_line . "\n";
+	}
+
+	system("apt-key add $tmp_key_file 2>&1 >/dev/null") == 0 ||
+	    die "unable to download ceph release key\n";
+
+	unlink $tmp_key_file;
+
+	my $source =  "deb http://gitbuilder.ceph.com/ceph-deb-jessie-x86_64-basic/ref/hammer  jessie main\n";
+
+	PVE::Tools::file_set_contents("/etc/apt/sources.list.d/ceph-dev.list", $source);
 
 	print "update available package list\n";
 	eval { run_command(['apt-get', '-q', 'update'], outfunc => sub {}, errfunc => sub {}); };
 
+	print "upgrade available package list\n";
+	eval { run_command(['apt-get', 'dist-upgrade', '-y'], outfunc => sub {}, errfunc => sub {}); };
+
 	run_command(['apt-get', '-q', '--assume-yes', '--no-install-recommends',
 		     '-o', 'Dpkg::Options::=--force-confnew',
 		     'install', '--',
-- 
2.1.4





More information about the pve-devel mailing list