]> review.fuel-infra Code Review - puppet-modules/puppetlabs-apt.git/commitdiff
Merge pull request #897 from puppetlabs/pdksync_pdksync-addubuntu14
authorcarabasdaniel <daniel.carabas@puppet.com>
Wed, 11 Dec 2019 12:31:44 +0000 (14:31 +0200)
committerGitHub <noreply@github.com>
Wed, 11 Dec 2019 12:31:44 +0000 (14:31 +0200)
MODULES-10242 Add ubuntu14 support back to the modules

.sync.yml
.travis.yml
REFERENCE.md
lib/puppet/type/apt_key.rb
manifests/key.pp
manifests/ppa.pp
metadata.json

index 2bf4a39adb83e8f29fe7fad7451cdecdb3cbdb4c..88dbcc69acc080e2cd09aa16708655a92fe3b746 100644 (file)
--- a/.sync.yml
+++ b/.sync.yml
@@ -8,6 +8,8 @@
     - rubocop-i18n
     - rubocop-rspec
 ".travis.yml":
+  deploy_to_forge:
+    enabled: false
   branches:
   - release
   includes:
index 922d081117bec2b4527f0747405bb5d80b3f7696..1fc720dc5c261c52b0f20466550ed0c69486c6d3 100644 (file)
@@ -17,9 +17,6 @@ stages:
   - static
   - spec
   - acceptance
-  -
-    if: tag =~ ^v\d
-    name: deploy
 matrix:
   fast_finish: true
   include:
@@ -54,9 +51,6 @@ matrix:
       services: docker
       stage: acceptance
       sudo: required
-    -
-      env: DEPLOY_TO_FORGE=yes
-      stage: deploy
 branches:
   only:
     - master
index d9175d5581e7d3b9b3de324dbd9d02e2e8c24f76..6163acf998fa73b0c7d694a7e6da24cedebfabfb 100644 (file)
@@ -520,7 +520,7 @@ Default value: `undef`
 
 ##### `server`
 
-Data type: `Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_]+)*\/?$/]`
+Data type: `Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$/]`
 
 Specifies a keyserver to provide the GPG key. Valid options: a string containing a domain name or a full URL (http://, https://,
 hkp:// or hkps://). The hkps:// protocol is currently only supported on Ubuntu 18.04.
index e543b96cb980a2d63bf197fddf2903e3b6ca5e54..7c275efa075465c718b115853dff01b62f3724a7 100644 (file)
@@ -68,7 +68,7 @@ Puppet::Type.newtype(:apt_key) do
     desc 'The key server to fetch the key from based on the ID. It can either be a domain name or url.'
     defaultto :'keyserver.ubuntu.com'
 
-    newvalues(%r{\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_]+)*\/?$})
+    newvalues(%r{\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$})
   end
 
   newparam(:options) do
index 1ffdef1b18d60816d27598eabc0e77e04e1e45a7..87fe4e34c189d0263f24ca746af559848b97e41c 100644 (file)
@@ -40,7 +40,7 @@ define apt::key (
   Enum['present', 'absent', 'refreshed'] $ensure                                                                        = present,
   Optional[String] $content                                                                                             = undef,
   Optional[Pattern[/\Ahttps?:\/\//, /\Aftp:\/\//, /\A\/\w+/]] $source                                                   = undef,
-  Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_]+)*\/?$/] $server = $::apt::keyserver,
+  Pattern[/\A((hkp|hkps|http|https):\/\/)?([a-z\d])([a-z\d-]{0,61}\.)+[a-z\d]+(:\d{2,5})?(\/[a-zA-Z\d\-_.]+)*\/?$/] $server = $::apt::keyserver,
   Boolean $weak_ssl                                                                                                     = false,
   Optional[String] $options                                                                                             = $::apt::key_options,
   ) {
index 402961a72a949631b9ba6ebaed7b104abefdefca..ba05485c31c2ed5792cab8f0ae0a5fb85660627b 100644 (file)
 #   Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint). 
 #   Specifies the operating system of your node. Valid options: a string containing a valid LSB distribution codename.
 #
+# @param dist
+#   Optional if lsb-release is installed (unless you're using a different release than indicated by lsb-release, e.g., Linux Mint). 
+#   Specifies the distribution of your node. Valid options: a string containing a valid distribution codename.
+#
 # @param package_name
 #   Names the package that provides the `apt-add-repository` command. Default: 'software-properties-common'.
 #
@@ -23,6 +27,7 @@ define apt::ppa(
   String $ensure                 = 'present',
   Optional[String] $options      = $::apt::ppa_options,
   Optional[String] $release      = $facts['lsbdistcodename'],
+  Optional[String] $dist         = $facts['lsbdistid'],
   Optional[String] $package_name = $::apt::ppa_package,
   Boolean $package_manage        = false,
 ) {
@@ -30,12 +35,12 @@ define apt::ppa(
     fail(translate('lsbdistcodename fact not available: release parameter required'))
   }
 
-  if $facts['lsbdistid'] == 'Debian' {
+  if $dist == 'Debian' {
     fail(translate('apt::ppa is not currently supported on Debian.'))
   }
 
   if versioncmp($facts['lsbdistrelease'], '14.10') >= 0 {
-    $distid = downcase($facts['lsbdistid'])
+    $distid = downcase($dist)
     $dash_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1-${distid}-\\2")
     $underscore_filename = regsubst($name, '^ppa:([^/]+)/(.+)$', "\\1_${distid}_\\2")
   } else {
index 395c0ac2eb082134f952d99db1858af7640be24b..b48b42d2afb72dff9dc7f911d127972886375c54 100644 (file)
@@ -42,6 +42,6 @@
     }
   ],
   "template-url": "https://github.com/puppetlabs/pdk-templates#master",
-  "template-ref": "heads/master-0-gfaf9e8b",
+  "template-ref": "heads/master-0-g643529a",
   "pdk-version": "1.14.1"
 }