Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,12 @@ Data type: `Stdlib::HTTPUrl`

Archive URL

##### `with_appstream`

Data type: `Optional[Boolean]`

Download AppStream (DEP-11) metadata

##### `with_installer`

Data type: `Optional[Boolean]`
Expand Down Expand Up @@ -709,6 +715,12 @@ Data type: `Optional[Integer[0]]`

Max download tries till process fails with download error

##### `with_appstream`

Data type: `Optional[Boolean]`

Download AppStream (DEP-11) metadata

##### `with_installer`

Data type: `Optional[Boolean]`
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet/provider/aptly_mirror/aptly_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def get(context)
filter_with_deps: mirror['FilterWithDeps'],
force_architectures: mirror['SkipArchitectureCheck'],
force_components: mirror['SkipComponentCheck'],
with_appstream: mirror['DownloadAppStream'],
with_installer: mirror['DownloadInstaller'],
with_sources: mirror['DownloadSources'],
with_udebs: mirror['DownloadUdebs'],
Expand Down Expand Up @@ -70,6 +71,7 @@ def create(context, name, should, noop: false)
force_components: should[:force_components],
ignore_signatures: should[:ignore_signatures],
max_tries: should[:max_tries],
with_appstream: should[:with_appstream],
with_installer: should[:with_installer],
with_sources: should[:with_sources],
with_udebs: should[:with_udebs],
Expand Down
4 changes: 4 additions & 0 deletions lib/puppet/type/aptly_mirror.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
type: 'Optional[Integer[0]]',
behaviour: :parameter,
},
with_appstream: {
desc: 'Download AppStream (DEP-11) metadata',
type: 'Optional[Boolean]',
},
with_installer: {
desc: 'Download additional not packaged installer files',
type: 'Optional[Boolean]',
Expand Down
2 changes: 2 additions & 0 deletions lib/puppet_x/voxpupuli/aptly/cli_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def self.mirror_create(name, url, distribution, options = {})
cmd << '-ignore-signatures' if options[:ignore_signatures]
cmd += Array(options[:keyring]).map { |x| "-keyring=#{x}" }
cmd << "-max-tries=#{options[:max_tries]}" if options[:max_tries]
cmd << '-with-appstream' if options[:with_appstream]
cmd << '-with-installer' if options[:with_installer]
cmd << '-with-sources' if options[:with_sources]
cmd << '-with-udebs' if options[:with_udebs]
Expand Down Expand Up @@ -77,6 +78,7 @@ def self.mirror_edit(name, options = {})
cmd << '-filter-with-deps' if options[:filter_with_deps]
cmd << '-ignore-signatures' if options[:ignore_signatures]
cmd += Array(options[:keyring]).map { |x| "-keyring=#{x}" }
cmd << '-with-appstream' if options[:with_appstream]
cmd << '-with-installer' if options[:with_installer]
cmd << '-with-sources' if options[:with_sources]
cmd << '-with-udebs' if options[:with_udebs]
Expand Down
5 changes: 4 additions & 1 deletion spec/unit/cli_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
ignore_signatures: true,
keyring: '/home/aptly/keyring.gpg',
max_tries: 5,
with_appstream: true,
with_installer: true,
with_sources: true,
with_udebs: true,
Expand All @@ -83,7 +84,7 @@
-config=/home/test/aptly.conf -dep-follow-all-variants
-dep-follow-recommends -dep-follow-source -dep-follow-suggests
-filter=foo -filter-with-deps -ignore-signatures
-keyring=/home/aptly/keyring.gpg -max-tries=5 -with-installer
-keyring=/home/aptly/keyring.gpg -max-tries=5 -with-appstream -with-installer
-with-sources -with-udebs bookworm-main http://deb.debian.org/debian/
bookworm main updates
]
Expand Down Expand Up @@ -193,6 +194,7 @@
filter_with_deps: true,
ignore_signatures: true,
keyring: ['/home/aptly/example_keyring1.gpg', '/home/aptly/example_keyring2.gpg'],
with_appstream: true,
with_installer: true,
with_sources: true,
with_udebs: true,
Expand All @@ -207,6 +209,7 @@
-filter=foo -filter-with-deps -ignore-signatures
-keyring=/home/aptly/example_keyring1.gpg
-keyring=/home/aptly/example_keyring2.gpg
-with-appstream
-with-installer -with-sources -with-udebs
bookworm-main
]
Expand Down
8 changes: 8 additions & 0 deletions spec/unit/provider/aptly_mirror_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module Puppet::Provider::AptlyMirror; end
'DownloadSources' => true,
'DownloadUdebs' => true,
'DownloadInstaller' => true,
'DownloadAppStream' => true,
},
{
'Name' => 'bullseye-main',
Expand All @@ -53,6 +54,7 @@ module Puppet::Provider::AptlyMirror; end
'DownloadSources' => false,
'DownloadUdebs' => false,
'DownloadInstaller' => false,
'DownloadAppStream' => false,
},
]
end
Expand All @@ -79,6 +81,7 @@ module Puppet::Provider::AptlyMirror; end
force_components: false,
name: 'bookworm-main',
url: 'http://deb.debian.org/debian/',
with_appstream: true,
with_installer: true,
with_sources: true,
with_udebs: true,
Expand All @@ -94,6 +97,7 @@ module Puppet::Provider::AptlyMirror; end
force_components: false,
name: 'bullseye-main',
url: 'http://deb.debian.org/debian/',
with_appstream: false,
with_installer: false,
with_sources: false,
with_udebs: false,
Expand Down Expand Up @@ -124,6 +128,7 @@ module Puppet::Provider::AptlyMirror; end
force_components: false,
name: name,
url: 'https://apt.voxpupuli.org',
with_appstream: false,
with_installer: false,
with_sources: false,
with_udebs: false,
Expand Down Expand Up @@ -211,6 +216,7 @@ module Puppet::Provider::AptlyMirror; end
max_tries: 3,
name: name,
url: 'https://apt.voxpupuli.org',
with_appstream: false,
with_installer: false,
with_sources: false,
with_udebs: false,
Expand Down Expand Up @@ -259,6 +265,7 @@ module Puppet::Provider::AptlyMirror; end
force_components: false,
name: name,
url: 'http://deb.debian.org/debian/',
with_appstream: true,
with_installer: true,
with_sources: false,
with_udebs: true,
Expand Down Expand Up @@ -301,6 +308,7 @@ module Puppet::Provider::AptlyMirror; end
max_tries: nil,
name: name,
url: 'http://deb.debian.org/debian/',
with_appstream: true,
with_installer: true,
with_sources: false,
with_udebs: true,
Expand Down
4 changes: 4 additions & 0 deletions tasks/mirror_create.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@
"description": "Max download tries till process fails with download error",
"type": "Optional[Integer[0]]"
},
"with_appstream": {
"description": "Download AppStream (DEP-11) metadata",
"type": "Optional[Boolean]"
},
"with_installer": {
"description": "Download additional not packaged installer files",
"type": "Optional[Boolean]"
Expand Down
Loading