File: bookworm-support.patch

package info (click to toggle)
puppet-module-deric-zookeeper 0.8.4-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 392 kB
  • sloc: ruby: 1,734; sh: 224; makefile: 10
file content (159 lines) | stat: -rw-r--r-- 5,813 bytes parent folder | download
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Description: Add bookworm support
 This patch adds support for Bookworm, mostly by fixing the missuse of
 toplevel facts that are now gone from Puppet 8.7 and facter 4.10.
Author: Thomas Goirand <zigo@debian.org>
Forwarded: no
Last-Update: 2025-05-27

Index: puppet-module-deric-zookeeper/manifests/params.pp
===================================================================
--- puppet-module-deric-zookeeper.orig/manifests/params.pp
+++ puppet-module-deric-zookeeper/manifests/params.pp
@@ -6,18 +6,18 @@ class zookeeper::params {
     'packages' => ['zookeeper'],
   }
 
-  case $::osfamily {
+  case $facts['os']['family'] {
     'Debian': {
-      case $::operatingsystem {
+      case $facts['os']['name'] {
         'Debian': {
-          case $::operatingsystemmajrelease {
+          case $facts['os']['release']['major'] {
             '7': { $initstyle = 'init' }
             '8': { $initstyle = 'systemd' }
             default: { $initstyle = undef }
           }
         }
         'Ubuntu': {
-          case $::operatingsystemmajrelease {
+          case $facts['os']['release']['major'] {
             '14.04': { $initstyle = 'upstart' }
             default: { $initstyle = undef }
           }
@@ -36,7 +36,7 @@ class zookeeper::params {
       $environment_file = 'environment'
     }
     'RedHat': {
-      case $::operatingsystemmajrelease {
+      case $facts['os']['release']['major'] {
         '6': { $initstyle = 'redhat' }
         '7': { $initstyle = 'systemd' }
         default: { $initstyle = undef }
@@ -51,7 +51,7 @@ class zookeeper::params {
     }
 
     default: {
-      fail("Module '${module_name}' is not supported on OS: '${::operatingsystem}', family: '${::osfamily}'")
+      fail("Module '${module_name}' is not supported on OS: '${::facts['os']['name']}', family: '${::facts['os']['family']}'")
     }
   }
   $_params = merge($_defaults, $_os_overrides)
@@ -142,12 +142,18 @@ class zookeeper::params {
   $maxfilesize = '256MB'
   $maxbackupindex = 20
 
+  if $facts['networking']['fqdn'] {
+    $fqdn = $facts['networking']['fqdn']
+  }else{
+    $fqdn = $::fqdn
+  }
+
   # sasl options
   $sasl_krb5 = true
   $sasl_users = {}
   $keytab_path = '/etc/zookeeper/conf/zookeeper.keytab'
-  $principal = "zookeeper/${::fqdn}"
-  $realm = $::domain
+  $principal = "zookeeper/${fqdn}"
+  $realm = $facts['networking']['domain']
   $store_key = true
   $use_keytab = true
   $use_ticket_cache = false
Index: puppet-module-deric-zookeeper/manifests/init.pp
===================================================================
--- puppet-module-deric-zookeeper.orig/manifests/init.pp
+++ puppet-module-deric-zookeeper/manifests/init.pp
@@ -98,9 +98,10 @@ class zookeeper(
     $pid_path = "${pid_dir}/zookeeper.pid"
   }
 
-  $repo_source = is_hash($repo) ? {
-    true  => 'custom',
-    false => $repo
+  $repo_source = $repo ? {
+    Hash => 'custom',
+    String => $repo,
+    default => undef,
   }
 
   if $::zookeeper::ensure_account {
Index: puppet-module-deric-zookeeper/manifests/install.pp
===================================================================
--- puppet-module-deric-zookeeper.orig/manifests/install.pp
+++ puppet-module-deric-zookeeper/manifests/install.pp
@@ -7,7 +7,7 @@ class zookeeper::install inherits zookee
   anchor { 'zookeeper::install::begin': }
 
   # Repo management
-  case $::osfamily {
+  case $facts['os']['family'] {
     'RedHat': {
       include zookeeper::install::repo
       Anchor['zookeeper::install::begin']
@@ -28,7 +28,7 @@ class zookeeper::install inherits zookee
     anchor { 'zookeeper::install::java': }
 
     # parameter allow_virtual is not supported before Puppet 3.6
-    if versioncmp($::puppetversion, '3.6.0') >= 0 {
+    if versioncmp($facts['puppetversion'], '3.6.0') >= 0 {
       ensure_resource('package', $::zookeeper::java_package,
         {'ensure' => $::zookeeper::ensure, 'allow_virtual' => true,
         'before'  => Anchor['zookeeper::install::intermediate'],
Index: puppet-module-deric-zookeeper/manifests/post_install.pp
===================================================================
--- puppet-module-deric-zookeeper.orig/manifests/post_install.pp
+++ puppet-module-deric-zookeeper/manifests/post_install.pp
@@ -12,11 +12,11 @@ class zookeeper::post_install inherits z
   } else {
     # Autodetect:
     # Since ZooKeeper 3.4 there's no need for purging snapshots with cron
-    case $::osfamily {
+    case $facts['os']['family'] {
       'Debian': {
-          case $::operatingsystem {
+          case $facts['os']['name'] {
             'Debian': {
-              case $::lsbdistcodename {
+              case $facts['os']['distro']['codename'] {
                 'wheezy', 'squeeze': { # 3.3.5
                   $_clean = true
                 }
@@ -26,7 +26,7 @@ class zookeeper::post_install inherits z
               }
             }
             'Ubuntu': {
-              case $::lsbdistcodename {
+              case $facts['os']['distro']['codename'] {
                 'precise': { # 3.3.5
                   $_clean = true
                 }
@@ -36,7 +36,7 @@ class zookeeper::post_install inherits z
               }
             }
             default: {
-              fail ("Family: '${::osfamily}' OS: '${::operatingsystem}' is not supported yet")
+              fail ("Family: '${::facts['os']['family']}' OS: '${::facts['os']['distro']['codename']}' is not supported yet")
             }
           }
       }
@@ -44,7 +44,7 @@ class zookeeper::post_install inherits z
         $_clean = false
       }
       default: {
-        fail ("Family: '${::osfamily}' OS: '${::operatingsystem}' is not supported yet")
+        fail ("Family: '${::facts['os']['family']}' OS: '${::facts['os']['distro']['codename']}' is not supported yet")
       }
     }
   }