aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-12-25 23:13:40 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-12-25 23:13:40 -0300
commitd6784318b80b784d3528a76429b327d375e90796 (patch)
tree67c73c1a0fd477f19c396e72c07b52354d9d1ba8
parent90f00e8e8359ddcc52a5b36e92274331deb6223b (diff)
downloadpuppet-php-d6784318b80b784d3528a76429b327d375e90796.tar.gz
puppet-php-d6784318b80b784d3528a76429b327d375e90796.tar.bz2
Fix: dpa: adds preferences file
-rw-r--r--files/preferences7
-rw-r--r--manifests/dpa.pp10
2 files changed, 17 insertions, 0 deletions
diff --git a/files/preferences b/files/preferences
new file mode 100644
index 0000000..23ee6c1
--- /dev/null
+++ b/files/preferences
@@ -0,0 +1,7 @@
+Package: php*
+Pin: release o=Debian
+Pin-Priority: 990
+
+Package: php*
+Pin: origin "packages.sury.org"
+Pin-Priority: 990
diff --git a/manifests/dpa.pp b/manifests/dpa.pp
index 74ba174..1a69e6c 100644
--- a/manifests/dpa.pp
+++ b/manifests/dpa.pp
@@ -11,4 +11,14 @@ class php::dpa inherits php::repository {
content => "deb https://packages.sury.org/php/ ${::lsbdistcodename} main\n",
require => File['/etc/apt/trusted.gpg.d/deb.sury.org-php.gpg'],
}
+
+ # Pinning
+ # Adapted from https://dmvrtx.me/2023/06/php-7.4-on-debian-bookworm/
+ file { '/etc/apt/preferences.d/php':
+ ensure => present,
+ owner => "root",
+ group => "root",
+ mode => "0644",
+ source => 'puppet:///modules/php/preferences',
+ }
}