]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/aur/manifests/aura.pp
Fix aura packager
[perso/Immae/Projets/Puppet.git] / modules / aur / manifests / aura.pp
index fff988b02f1e86d060b28f6ae8def6855a488f20..3e06f0a18289287924c713a775c67d0ae0816882 100644 (file)
@@ -6,13 +6,12 @@ class aur::aura(
     ensure => "present"
   }
 
-  exec { 'pacman-base-devel':
-    command   => '/usr/bin/pacman -S base-devel --needed --noconfirm',
-    unless    => '/usr/bin/pacman -Qo aura',
-    logoutput => 'on_failure',
+  sudo::conf { 'aur-builder':
+    content => "aur-builder ALL=(root) NOPASSWD: /usr/bin/aura *"
   }
 
-  ensure_packages(['gmp', 'pcre', 'abs'], { 'install_options' => '--asdeps' })
+  ensure_packages(['base-devel'], { 'install_options'  => '--needed' })
+  ensure_packages(['gmp', 'pcre'], { 'install_options' => '--asdeps' })
 
   exec { 'aur::aura':
     cwd       => "/tmp",
@@ -20,14 +19,15 @@ class aur::aura(
     command   => 'curl -o /tmp/aur.sh aur.sh && chmod +x /tmp/aur.sh && /tmp/aur.sh aura-bin && mv /tmp/aura-bin/aura-bin-*-x86_64.pkg.tar.xz /tmp/aura-bin-x86_64.pkg.tar.xz && rm /tmp/aur.sh && rm -rf /tmp/aura-bin',
     user      => "aur-builder",
     unless    => '/usr/bin/pacman -Qo aura',
-    require   => Exec['pacman-base-devel'],
+    require   => Package['base-devel'],
     logoutput => 'on_failure',
   }
 
   package { 'aura-bin':
-    ensure => "present",
-    source => "/tmp/aura-bin-x86_64.pkg.tar.xz",
-    notify => Exec['aur::aura::cleanup']
+    ensure  => "present",
+    source  => "/tmp/aura-bin-x86_64.pkg.tar.xz",
+    require => Exec['aur::aura'],
+    notify  => Exec['aur::aura::cleanup']
   }
 
   exec { 'aur::aura::cleanup':