All our buildds are running at least stretch, drop jessie specific code
[mirror/dsa-puppet.git] / modules / buildd / manifests / init.pp
index 2128293..29a3524 100644 (file)
@@ -101,7 +101,7 @@ class buildd ($ensure=present) {
                #
                # buildd/pybuildd configuration
                #
-               if $::hostname in [x86-bm-01,x86-grnet-01,zani] {
+               if $::hostname in [x86-grnet-01,x86-grnet-02,zani] {
                        #
                        # pybuildd configuration
                        #
@@ -138,7 +138,23 @@ class buildd ($ensure=present) {
                                mode    => '755',
                        }
                        file { '/etc/systemd/journald.conf.d/persistency.conf':
-                               source => 'puppet:///modules/systemd/persistency.conf',
+                               source => 'puppet:///modules/dsa_systemd/persistency.conf',
+                       }
+
+                       # Make sure that the build directory have the correct permissions.
+                       # This should go away once pybuildd issue #3 is solved.
+                       file { '/home/buildd/build':
+                               ensure  => directory,
+                               mode    => '2750',
+                               group   => buildd,
+                               owner   => buildd,
+                       }
+                       # work around https://salsa.debian.org/wb-team/pybuildd/issues/11
+                       concat::fragment { 'dsa-puppet-stuff--pybuildd-expire-logs':
+                               target => '/etc/cron.d/dsa-puppet-stuff',
+                               content  => @(EOF)
+                                       @daily buildd [ -d ~buildd/logs ] && find ~buildd/logs -type f -mtime +90 -delete
+                                       | EOF
                        }
                } else {
                        #
@@ -200,26 +216,6 @@ class buildd ($ensure=present) {
                                require => Package['buildd'],
                        }
 
-                       if (versioncmp($::lsbmajdistrelease, '9') >= 0) {
-                               site::aptrepo { 'buildd.debian.org':
-                                       ensure => absent,
-                               }
-                               file { '/etc/apt/apt.conf.d/puppet-https-buildd':
-                                       ensure => absent,
-                               }
-                       } else {
-                               site::aptrepo { 'buildd.debian.org':
-                                       key        => 'puppet:///modules/buildd/buildd.debian.org.gpg',
-                                       url        => 'https://apt.buildd.debian.org/',
-                                       suite      => 'jessie',
-                                       components => 'main',
-                                       require    => Package['apt-transport-https'],
-                               }
-                               file { '/etc/apt/apt.conf.d/puppet-https-buildd':
-                                       content => "Acquire::https::apt.buildd.debian.org::CaInfo \"/etc/ssl/ca-debian/ca-certificates.crt\";\n",
-                               }
-                       }
-
                        concat::fragment { 'dsa-puppet-stuff--buildd':
                                target => '/etc/cron.d/dsa-puppet-stuff',
                                source  => 'puppet:///modules/buildd/cron.d-dsa-buildd',