Skip to content

Commit 7d19d25

Browse files
authored
Merge pull request #2189 from ekohl/drop-old-deb
Drop Debian < 8 and Ubuntu < 14.04 code
2 parents 58d3cb6 + 8716eb9 commit 7d19d25

File tree

5 files changed

+14
-44
lines changed

5 files changed

+14
-44
lines changed

manifests/mod/suphp.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class apache::mod::suphp (
77
) {
88
if ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['major'], '15.10') >= 0) or
9-
($facts['os']['name'] == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
9+
$facts['os']['family'] == 'Debian' {
1010
fail("suphp was declared EOL by it's creators as of 2013 and so is no longer supported on Ubuntu 15.10/Debian 8 and above. Please use php-fpm")
1111
}
1212
include apache

manifests/mpm.pp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,8 @@
8585
}
8686

8787
if $mpm == 'itk' {
88-
if ( ( $::operatingsystem == 'Ubuntu' ) or ( ($::operatingsystem == 'Debian') and ( versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) ) {
89-
include apache::mpm::disable_mpm_event
90-
include apache::mpm::disable_mpm_worker
91-
}
88+
include apache::mpm::disable_mpm_event
89+
include apache::mpm::disable_mpm_worker
9290

9391
package { 'libapache2-mpm-itk':
9492
ensure => present,
@@ -100,14 +98,14 @@
10098
}
10199

102100
if $mpm == 'prefork' {
103-
if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) {
101+
if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or $::operatingsystem == 'Debian' ) {
104102
include apache::mpm::disable_mpm_event
105103
include apache::mpm::disable_mpm_worker
106104
}
107105
}
108106

109107
if $mpm == 'worker' {
110-
if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8.0.0') >= 0 ) ) {
108+
if ( ( $::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease,'18.04') >= 0 ) or $::operatingsystem == 'Debian' ) {
111109
include apache::mpm::disable_mpm_event
112110
include apache::mpm::disable_mpm_prefork
113111
}

manifests/params.pp

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,11 @@
459459
'xsendfile' => 'libapache2-mod-xsendfile',
460460
}
461461
}
462+
462463
$error_log = 'error.log'
463464
$scriptalias = '/usr/lib/cgi-bin'
464465
$access_log_file = 'access.log'
465-
if $::osfamily == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0 {
466-
$shib2_lib = 'mod_shib_22.so'
467-
} elsif ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '19.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '10') < 0) {
466+
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '19.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '10') < 0) {
468467
$shib2_lib = 'mod_shib2.so'
469468
} else {
470469
$shib2_lib = 'mod_shib.so'
@@ -480,11 +479,7 @@
480479
$fastcgi_lib_path = '/var/lib/apache2/fastcgi'
481480
$mime_support_package = 'mime-support'
482481
$mime_types_config = '/etc/mime.types'
483-
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
484-
$docroot = '/var/www/html'
485-
} else {
486-
$docroot = '/var/www'
487-
}
482+
$docroot = '/var/www/html'
488483
$cas_cookie_path = '/var/cache/apache2/mod_auth_cas/'
489484
$mellon_lock_file = undef
490485
$mellon_cache_size = undef
@@ -544,28 +539,17 @@
544539
}
545540
$alias_icons_path = '/usr/share/apache2/icons'
546541
$error_documents_path = '/usr/share/apache2/error'
547-
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
548-
$dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev']
549-
} else {
550-
$dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
551-
}
542+
$dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev']
552543

553544
#
554545
# Passenger-specific settings
555546
#
556547

557548
$passenger_conf_file = 'passenger.conf'
558549
$passenger_conf_package_file = undef
559-
560-
if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '14.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0) {
561-
$passenger_root = '/usr'
562-
$passenger_ruby = '/usr/bin/ruby'
563-
$passenger_default_ruby = undef
564-
} else {
565-
$passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
566-
$passenger_ruby = undef
567-
$passenger_default_ruby = '/usr/bin/ruby'
568-
}
550+
$passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
551+
$passenger_ruby = undef
552+
$passenger_default_ruby = '/usr/bin/ruby'
569553
$wsgi_socket_prefix = undef
570554
} elsif $::osfamily == 'FreeBSD' {
571555
$user = 'www'

manifests/version.pp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,7 @@
2020
}
2121
}
2222
'Debian': {
23-
if $::operatingsystem == 'Ubuntu' and versioncmp($facts['operatingsystemmajrelease'], '13.10') >= 0 {
24-
$default = '2.4'
25-
} elsif $::operatingsystem == 'Debian' and versioncmp($facts['operatingsystemmajrelease'], '8') >= 0 {
26-
$default = '2.4'
27-
} else {
28-
$default = '2.2'
29-
}
23+
$default = '2.4'
3024
}
3125
'FreeBSD': {
3226
$default = '2.4'

spec/spec_helper_acceptance_local.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,7 @@ def apache_settings_hash
133133
apache['error_log'] = 'error.log'
134134
apache['suphp_handler'] = 'x-httpd-php'
135135
apache['suphp_configpath'] = '/etc/php5/apache2'
136-
apache['version'] = if osfamily == 'ubuntu' && operatingsystemrelease >= 13.10
137-
'2.4'
138-
elsif osfamily == 'debian' && operatingsystemrelease >= 8.0
139-
'2.4'
140-
else
141-
'2.2'
142-
end
136+
apache['version'] = '2.4'
143137
apache['mod_ssl_dir'] = apache['mod_dir']
144138
when 'freebsd'
145139
apache['httpd_dir'] = '/usr/local/etc/apache24'

0 commit comments

Comments
 (0)