From d6ced582d28341ac613de1c0e161c5054dfc3519 Mon Sep 17 00:00:00 2001 From: 12ww1160 <12ww1160@confdroid.com> Date: Thu, 30 Apr 2026 11:49:16 +0200 Subject: [PATCH 1/2] add option to allow excluding binaries from being upgraded --- manifests/params.pp | 11 +++++++++-- templates/automatic.conf.erb | 4 ++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index bdf77f8..5d5f1ea 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -14,11 +14,13 @@ # @param [String] ac_emit_via how to inform about emitted updates # @param [String] ac_email_to where to send the email to # @param [String] ac_email_host which host to use to send the email +# @param [Variant[String,Array[String]]] ac_excludepkgs packages to exclude from updates ############################################################################## class confdroid_automatic::params ( - String $ac_reqpackages = 'dnf-automatic', - String $ac_pkg_ensure = 'latest', + String $ac_reqpackages = 'dnf-automatic', + String $ac_pkg_ensure = 'latest', + Variant[String, Array[String]] $ac_excludepkgs = [], # updates String $ac_upgrade_type = 'default', @@ -45,6 +47,11 @@ class confdroid_automatic::params ( $ac_main_config = '/etc/dnf/automatic.conf' $ac_main_config_erb = 'confdroid_automatic/automatic.conf.erb' + $ac_excludepkgs_normalized = $ac_excludepkgs ? { + Array => join($ac_excludepkgs, ','), + default => $ac_excludepkgs, + } + # includes must be last include confdroid_automatic::main::config } diff --git a/templates/automatic.conf.erb b/templates/automatic.conf.erb index 3a530e6..e394a6a 100644 --- a/templates/automatic.conf.erb +++ b/templates/automatic.conf.erb @@ -93,5 +93,9 @@ email_to = <%= @ac_email_to %> [base] # This section overrides dnf.conf +<% unless @ac_excludepkgs_normalized.empty? -%> +excludepkgs = <%= @ac_excludepkgs_normalized %> +<% end -%> + # Use this to filter DNF core messages debuglevel = 1 From 171893d8e31be27c0e6f792db25e4a28b7c669d8 Mon Sep 17 00:00:00 2001 From: Jenkins Server Date: Thu, 30 Apr 2026 11:52:27 +0200 Subject: [PATCH 2/2] Recommit for updates in build 12 --- .../confdroid_automatic_3A_3Aparams.html | 40 ++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/doc/puppet_classes/confdroid_automatic_3A_3Aparams.html b/doc/puppet_classes/confdroid_automatic_3A_3Aparams.html index b10768b..668797f 100644 --- a/doc/puppet_classes/confdroid_automatic_3A_3Aparams.html +++ b/doc/puppet_classes/confdroid_automatic_3A_3Aparams.html @@ -300,6 +300,24 @@ —

which host to use to send the email

+
+ + + +
  • + + ac_excludepkgs + + + (Variant[String, Array[String]]) + + + (defaults to: []) + + + — +
    +

    packages to exclude from updates

  • @@ -315,7 +333,6 @@
     
     
    -18
     19
     20
     21
    @@ -347,15 +364,23 @@
     47
     48
     49
    -50
    +50 +51 +52 +53 +54 +55 +56 +57 -
    # File 'manifests/params.pp', line 18
    +        
    # File 'manifests/params.pp', line 19
     
     class confdroid_automatic::params (
     
    -  String $ac_reqpackages                 = 'dnf-automatic',
    -  String $ac_pkg_ensure                  = 'latest',
    +  String $ac_reqpackages                          = 'dnf-automatic',
    +  String $ac_pkg_ensure                           = 'latest',
    +  Variant[String, Array[String]] $ac_excludepkgs  = [],
     
       # updates
       String $ac_upgrade_type             = 'default',
    @@ -382,6 +407,11 @@ class confdroid_automatic::params (
       $ac_main_config           = '/etc/dnf/automatic.conf'
       $ac_main_config_erb       = 'confdroid_automatic/automatic.conf.erb'
     
    +  $ac_excludepkgs_normalized = $ac_excludepkgs ? {
    +    Array   => join($ac_excludepkgs, ','),
    +    default => $ac_excludepkgs,
    +  }
    +
     # includes must be last
       include confdroid_automatic::main::config
     }