mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-07 17:40:30 +00:00
Merge pull request #305 from KellerFuchs/apt.conf
Enable setting `apt.conf(5)` options
This commit is contained in:
commit
042b881a14
5 changed files with 220 additions and 173 deletions
|
@ -6,29 +6,40 @@ __all__ = ['Phase', 'Task', 'main']
|
||||||
|
|
||||||
|
|
||||||
def validate_manifest(data, validator, error):
|
def validate_manifest(data, validator, error):
|
||||||
"""Validates the manifest using the base manifest
|
"""Validates the manifest using the base manifest
|
||||||
|
|
||||||
:param dict data: The data of the manifest
|
:param dict data: The data of the manifest
|
||||||
:param function validator: The function that validates the manifest given the data and a path
|
:param function validator: The function that validates the manifest given the data and a path
|
||||||
:param function error: The function tha raises an error when the validation fails
|
:param function error: The function tha raises an error when the validation fails
|
||||||
"""
|
"""
|
||||||
import os.path
|
import os.path
|
||||||
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.yml'))
|
||||||
validator(data, schema_path)
|
validator(data, schema_path)
|
||||||
|
|
||||||
from bootstrapvz.common.releases import get_release
|
from bootstrapvz.common.releases import get_release
|
||||||
from bootstrapvz.common.releases import squeeze
|
from bootstrapvz.common.releases import squeeze
|
||||||
release = get_release(data['system']['release'])
|
release = get_release(data['system']['release'])
|
||||||
|
|
||||||
if release < squeeze:
|
if release < squeeze:
|
||||||
error('Only Debian squeeze and later is supported', ['system', 'release'])
|
error('Only Debian squeeze and later is supported', ['system', 'release'])
|
||||||
|
|
||||||
# Check the bootloader/partitioning configuration.
|
# Check the bootloader/partitioning configuration.
|
||||||
# Doing this via the schema is a pain and does not output a useful error message.
|
# Doing this via the schema is a pain and does not output a useful error message.
|
||||||
if data['system']['bootloader'] == 'grub':
|
if data['system']['bootloader'] == 'grub':
|
||||||
|
|
||||||
if data['volume']['partitions']['type'] == 'none':
|
if data['volume']['partitions']['type'] == 'none':
|
||||||
error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader'])
|
error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader'])
|
||||||
|
|
||||||
if release == squeeze:
|
if release == squeeze:
|
||||||
error('Grub installation on squeeze is not supported', ['system', 'bootloader'])
|
error('Grub installation on squeeze is not supported', ['system', 'bootloader'])
|
||||||
|
|
||||||
|
# Check the provided apt.conf(5) options
|
||||||
|
if 'packages' in data:
|
||||||
|
for name, val in data['packages'].get('apt.conf.d', {}).iteritems():
|
||||||
|
from bootstrapvz.common.tools import log_call
|
||||||
|
|
||||||
|
status, _, _ = log_call(['apt-config', '-c=/dev/stdin', 'dump'],
|
||||||
|
stdin=val + '\n')
|
||||||
|
|
||||||
|
if status != 0:
|
||||||
|
error('apt.conf(5) syntax error', ['packages', 'apt.conf.d', name])
|
||||||
|
|
|
@ -98,7 +98,14 @@ properties:
|
||||||
required: [pin, package, pin-priority]
|
required: [pin, package, pin-priority]
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
minItems: 1
|
minItems: 1
|
||||||
minItems: 1
|
minProperties: 1
|
||||||
|
additionalProperties: false
|
||||||
|
apt.conf.d:
|
||||||
|
type: object
|
||||||
|
patternProperties:
|
||||||
|
^[0-9A-Za-z][0-9A-Za-z-_.]+$:
|
||||||
|
type: string
|
||||||
|
minProperties: 1
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
sources:
|
sources:
|
||||||
type: object
|
type: object
|
||||||
|
@ -109,7 +116,7 @@ properties:
|
||||||
pattern: ^(deb|deb-src)\s+(\[\s*(.+\S)?\s*\]\s+)?\S+\s+\S+(\s+(.+\S))?\s*$
|
pattern: ^(deb|deb-src)\s+(\[\s*(.+\S)?\s*\]\s+)?\S+\s+\S+(\s+(.+\S))?\s*$
|
||||||
minItems: 1
|
minItems: 1
|
||||||
type: array
|
type: array
|
||||||
minItems: 1
|
minProperties: 1
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
trusted-keys:
|
trusted-keys:
|
||||||
type: array
|
type: array
|
||||||
|
|
|
@ -125,6 +125,8 @@ def get_apt_group(manifest):
|
||||||
if 'preferences' in manifest.packages:
|
if 'preferences' in manifest.packages:
|
||||||
group.append(apt.AddManifestPreferences)
|
group.append(apt.AddManifestPreferences)
|
||||||
group.append(apt.WritePreferences)
|
group.append(apt.WritePreferences)
|
||||||
|
if 'apt.conf.d' in manifest.packages:
|
||||||
|
group.append(apt.WriteConfiguration)
|
||||||
if 'install' in manifest.packages:
|
if 'install' in manifest.packages:
|
||||||
group.append(packages.AddManifestPackages)
|
group.append(packages.AddManifestPackages)
|
||||||
if manifest.packages.get('install_standard', False):
|
if manifest.packages.get('install_standard', False):
|
||||||
|
|
|
@ -7,203 +7,219 @@ import os
|
||||||
|
|
||||||
|
|
||||||
class AddManifestSources(Task):
|
class AddManifestSources(Task):
|
||||||
description = 'Adding sources from the manifest'
|
description = 'Adding sources from the manifest'
|
||||||
phase = phases.preparation
|
phase = phases.preparation
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
for name, lines in info.manifest.packages['sources'].iteritems():
|
for name, lines in info.manifest.packages['sources'].iteritems():
|
||||||
for line in lines:
|
for line in lines:
|
||||||
info.source_lists.add(name, line)
|
info.source_lists.add(name, line)
|
||||||
|
|
||||||
|
|
||||||
class AddDefaultSources(Task):
|
class AddDefaultSources(Task):
|
||||||
description = 'Adding default release sources'
|
description = 'Adding default release sources'
|
||||||
phase = phases.preparation
|
phase = phases.preparation
|
||||||
predecessors = [AddManifestSources]
|
predecessors = [AddManifestSources]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from bootstrapvz.common.releases import sid
|
from bootstrapvz.common.releases import sid
|
||||||
include_src = info.manifest.packages.get('include-source-type', False)
|
include_src = info.manifest.packages.get('include-source-type', False)
|
||||||
components = ' '.join(info.manifest.packages.get('components', ['main']))
|
components = ' '.join(info.manifest.packages.get('components', ['main']))
|
||||||
info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + components)
|
info.source_lists.add('main', 'deb {apt_mirror} {system.release} ' + components)
|
||||||
if include_src:
|
if include_src:
|
||||||
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + components)
|
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release} ' + components)
|
||||||
if info.manifest.release != sid:
|
if info.manifest.release != sid:
|
||||||
info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates ' + components)
|
info.source_lists.add('main', 'deb http://security.debian.org/ {system.release}/updates ' + components)
|
||||||
if include_src:
|
if include_src:
|
||||||
info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates ' + components)
|
info.source_lists.add('main', 'deb-src http://security.debian.org/ {system.release}/updates ' + components)
|
||||||
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + components)
|
info.source_lists.add('main', 'deb {apt_mirror} {system.release}-updates ' + components)
|
||||||
if include_src:
|
if include_src:
|
||||||
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + components)
|
info.source_lists.add('main', 'deb-src {apt_mirror} {system.release}-updates ' + components)
|
||||||
|
|
||||||
|
|
||||||
class AddBackports(Task):
|
class AddBackports(Task):
|
||||||
description = 'Adding backports to the apt sources'
|
description = 'Adding backports to the apt sources'
|
||||||
phase = phases.preparation
|
phase = phases.preparation
|
||||||
predecessors = [AddDefaultSources]
|
predecessors = [AddDefaultSources]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from bootstrapvz.common.releases import unstable
|
from bootstrapvz.common.releases import unstable
|
||||||
if info.source_lists.target_exists('{system.release}-backports'):
|
if info.source_lists.target_exists('{system.release}-backports'):
|
||||||
msg = ('{system.release}-backports target already exists').format(**info.manifest_vars)
|
msg = ('{system.release}-backports target already exists').format(**info.manifest_vars)
|
||||||
logging.getLogger(__name__).info(msg)
|
logging.getLogger(__name__).info(msg)
|
||||||
elif info.manifest.release == unstable:
|
elif info.manifest.release == unstable:
|
||||||
logging.getLogger(__name__).info('There are no backports for sid/unstable')
|
logging.getLogger(__name__).info('There are no backports for sid/unstable')
|
||||||
else:
|
else:
|
||||||
info.source_lists.add('backports', 'deb {apt_mirror} {system.release}-backports main')
|
info.source_lists.add('backports', 'deb {apt_mirror} {system.release}-backports main')
|
||||||
info.source_lists.add('backports', 'deb-src {apt_mirror} {system.release}-backports main')
|
info.source_lists.add('backports', 'deb-src {apt_mirror} {system.release}-backports main')
|
||||||
|
|
||||||
|
|
||||||
class AddManifestPreferences(Task):
|
class AddManifestPreferences(Task):
|
||||||
description = 'Adding preferences from the manifest'
|
description = 'Adding preferences from the manifest'
|
||||||
phase = phases.preparation
|
phase = phases.preparation
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
for name, preferences in info.manifest.packages['preferences'].iteritems():
|
for name, preferences in info.manifest.packages['preferences'].iteritems():
|
||||||
info.preference_lists.add(name, preferences)
|
info.preference_lists.add(name, preferences)
|
||||||
|
|
||||||
|
|
||||||
class InstallTrustedKeys(Task):
|
class InstallTrustedKeys(Task):
|
||||||
description = 'Installing trusted keys'
|
description = 'Installing trusted keys'
|
||||||
phase = phases.package_installation
|
phase = phases.package_installation
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from shutil import copy
|
from shutil import copy
|
||||||
for key_path in info.manifest.packages['trusted-keys']:
|
for key_path in info.manifest.packages['trusted-keys']:
|
||||||
key_name = os.path.basename(key_path)
|
key_name = os.path.basename(key_path)
|
||||||
destination = os.path.join(info.root, 'etc/apt/trusted.gpg.d', key_name)
|
destination = os.path.join(info.root, 'etc/apt/trusted.gpg.d', key_name)
|
||||||
copy(key_path, destination)
|
copy(key_path, destination)
|
||||||
|
|
||||||
|
|
||||||
|
class WriteConfiguration(Task):
|
||||||
|
decription = 'Write configuration to apt.conf.d from the manifest'
|
||||||
|
phase = phases.package_installation
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def run(cls, info):
|
||||||
|
for name, val in info.manifest.packages.get('apt.conf.d', {}).iteritems():
|
||||||
|
if name == 'main':
|
||||||
|
path = os.path.join(info.root, 'etc/apt/apt.conf')
|
||||||
|
else:
|
||||||
|
path = os.path.join(info.root, 'etc/apt/apt.conf.d', name)
|
||||||
|
|
||||||
|
with open(path, 'w') as conf_file:
|
||||||
|
conf_file.write(val + '\n')
|
||||||
|
|
||||||
|
|
||||||
class WriteSources(Task):
|
class WriteSources(Task):
|
||||||
description = 'Writing aptitude sources to disk'
|
description = 'Writing aptitude sources to disk'
|
||||||
phase = phases.package_installation
|
phase = phases.package_installation
|
||||||
predecessors = [InstallTrustedKeys]
|
predecessors = [InstallTrustedKeys]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
if not info.source_lists.target_exists(info.manifest.system['release']):
|
if not info.source_lists.target_exists(info.manifest.system['release']):
|
||||||
import logging
|
import logging
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
log.warn('No default target has been specified in the sources list, '
|
log.warn('No default target has been specified in the sources list, '
|
||||||
'installing packages may fail')
|
'installing packages may fail')
|
||||||
for name, sources in info.source_lists.sources.iteritems():
|
for name, sources in info.source_lists.sources.iteritems():
|
||||||
if name == 'main':
|
if name == 'main':
|
||||||
list_path = os.path.join(info.root, 'etc/apt/sources.list')
|
list_path = os.path.join(info.root, 'etc/apt/sources.list')
|
||||||
else:
|
else:
|
||||||
list_path = os.path.join(info.root, 'etc/apt/sources.list.d/', name + '.list')
|
list_path = os.path.join(info.root, 'etc/apt/sources.list.d/', name + '.list')
|
||||||
with open(list_path, 'w') as source_list:
|
with open(list_path, 'w') as source_list:
|
||||||
for source in sources:
|
for source in sources:
|
||||||
source_list.write(str(source) + '\n')
|
source_list.write(str(source) + '\n')
|
||||||
|
|
||||||
|
|
||||||
class WritePreferences(Task):
|
class WritePreferences(Task):
|
||||||
description = 'Writing aptitude preferences to disk'
|
description = 'Writing aptitude preferences to disk'
|
||||||
phase = phases.package_installation
|
phase = phases.package_installation
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
for name, preferences in info.preference_lists.preferences.iteritems():
|
for name, preferences in info.preference_lists.preferences.iteritems():
|
||||||
if name == 'main':
|
if name == 'main':
|
||||||
list_path = os.path.join(info.root, 'etc/apt/preferences')
|
list_path = os.path.join(info.root, 'etc/apt/preferences')
|
||||||
else:
|
else:
|
||||||
list_path = os.path.join(info.root, 'etc/apt/preferences.d/', name)
|
list_path = os.path.join(info.root, 'etc/apt/preferences.d/', name)
|
||||||
with open(list_path, 'w') as preference_list:
|
with open(list_path, 'w') as preference_list:
|
||||||
for preference in preferences:
|
for preference in preferences:
|
||||||
preference_list.write(str(preference) + '\n')
|
preference_list.write(str(preference) + '\n')
|
||||||
|
|
||||||
|
|
||||||
class DisableDaemonAutostart(Task):
|
class DisableDaemonAutostart(Task):
|
||||||
description = 'Disabling daemon autostart'
|
description = 'Disabling daemon autostart'
|
||||||
phase = phases.package_installation
|
phase = phases.package_installation
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
rc_policy_path = os.path.join(info.root, 'usr/sbin/policy-rc.d')
|
rc_policy_path = os.path.join(info.root, 'usr/sbin/policy-rc.d')
|
||||||
with open(rc_policy_path, 'w') as rc_policy:
|
with open(rc_policy_path, 'w') as rc_policy:
|
||||||
rc_policy.write(('#!/bin/sh\n'
|
rc_policy.write(('#!/bin/sh\n'
|
||||||
'exit 101'))
|
'exit 101'))
|
||||||
import stat
|
import stat
|
||||||
os.chmod(rc_policy_path,
|
os.chmod(rc_policy_path,
|
||||||
stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
|
||||||
stat.S_IRGRP | stat.S_IXGRP |
|
stat.S_IRGRP | stat.S_IXGRP |
|
||||||
stat.S_IROTH | stat.S_IXOTH)
|
stat.S_IROTH | stat.S_IXOTH)
|
||||||
|
|
||||||
|
|
||||||
class AptUpdate(Task):
|
class AptUpdate(Task):
|
||||||
description = 'Updating the package cache'
|
description = 'Updating the package cache'
|
||||||
phase = phases.package_installation
|
phase = phases.package_installation
|
||||||
predecessors = [locale.GenerateLocale, WriteSources, WritePreferences]
|
predecessors = [locale.GenerateLocale, WriteConfiguration, WriteSources, WritePreferences]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
log_check_call(['chroot', info.root,
|
log_check_call(['chroot', info.root,
|
||||||
'apt-get', 'update'])
|
'apt-get', 'update'])
|
||||||
|
|
||||||
|
|
||||||
class AptUpgrade(Task):
|
class AptUpgrade(Task):
|
||||||
description = 'Upgrading packages and fixing broken dependencies'
|
description = 'Upgrading packages and fixing broken dependencies'
|
||||||
phase = phases.package_installation
|
phase = phases.package_installation
|
||||||
predecessors = [AptUpdate, DisableDaemonAutostart]
|
predecessors = [AptUpdate, DisableDaemonAutostart]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from subprocess import CalledProcessError
|
from subprocess import CalledProcessError
|
||||||
try:
|
try:
|
||||||
log_check_call(['chroot', info.root,
|
log_check_call(['chroot', info.root,
|
||||||
'apt-get', 'install',
|
'apt-get', 'install',
|
||||||
'--fix-broken',
|
'--fix-broken',
|
||||||
'--no-install-recommends',
|
'--no-install-recommends',
|
||||||
'--assume-yes'])
|
'--assume-yes'])
|
||||||
log_check_call(['chroot', info.root,
|
log_check_call(['chroot', info.root,
|
||||||
'apt-get', 'upgrade',
|
'apt-get', 'upgrade',
|
||||||
'--no-install-recommends',
|
'--no-install-recommends',
|
||||||
'--assume-yes'])
|
'--assume-yes'])
|
||||||
except CalledProcessError as e:
|
except CalledProcessError as e:
|
||||||
if e.returncode == 100:
|
if e.returncode == 100:
|
||||||
msg = ('apt exited with status code 100. '
|
msg = ('apt exited with status code 100. '
|
||||||
'This can sometimes occur when package retrieval times out or a package extraction failed. '
|
'This can sometimes occur when package retrieval times out or a package extraction failed. '
|
||||||
'apt might succeed if you try bootstrapping again.')
|
'apt might succeed if you try bootstrapping again.')
|
||||||
logging.getLogger(__name__).warn(msg)
|
logging.getLogger(__name__).warn(msg)
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|
||||||
class PurgeUnusedPackages(Task):
|
class PurgeUnusedPackages(Task):
|
||||||
description = 'Removing unused packages'
|
description = 'Removing unused packages'
|
||||||
phase = phases.system_cleaning
|
phase = phases.system_cleaning
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
log_check_call(['chroot', info.root,
|
log_check_call(['chroot', info.root,
|
||||||
'apt-get', 'autoremove',
|
'apt-get', 'autoremove',
|
||||||
'--purge',
|
'--purge',
|
||||||
'--assume-yes'])
|
'--assume-yes'])
|
||||||
|
|
||||||
|
|
||||||
class AptClean(Task):
|
class AptClean(Task):
|
||||||
description = 'Clearing the aptitude cache'
|
description = 'Clearing the aptitude cache'
|
||||||
phase = phases.system_cleaning
|
phase = phases.system_cleaning
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
log_check_call(['chroot', info.root,
|
log_check_call(['chroot', info.root,
|
||||||
'apt-get', 'clean'])
|
'apt-get', 'clean'])
|
||||||
|
|
||||||
lists = os.path.join(info.root, 'var/lib/apt/lists')
|
lists = os.path.join(info.root, 'var/lib/apt/lists')
|
||||||
for list_file in [os.path.join(lists, f) for f in os.listdir(lists)]:
|
for list_file in [os.path.join(lists, f) for f in os.listdir(lists)]:
|
||||||
if os.path.isfile(list_file):
|
if os.path.isfile(list_file):
|
||||||
os.remove(list_file)
|
os.remove(list_file)
|
||||||
|
|
||||||
|
|
||||||
class EnableDaemonAutostart(Task):
|
class EnableDaemonAutostart(Task):
|
||||||
description = 'Re-enabling daemon autostart after installation'
|
description = 'Re-enabling daemon autostart after installation'
|
||||||
phase = phases.system_cleaning
|
phase = phases.system_cleaning
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
os.remove(os.path.join(info.root, 'usr/sbin/policy-rc.d'))
|
os.remove(os.path.join(info.root, 'usr/sbin/policy-rc.d'))
|
||||||
|
|
|
@ -198,8 +198,9 @@ variety of sources.
|
||||||
Default: ``http://httpredir.debian.org/debian/``
|
Default: ``http://httpredir.debian.org/debian/``
|
||||||
- ``sources``: A map of additional sources that should be added to
|
- ``sources``: A map of additional sources that should be added to
|
||||||
the aptitude sources list. The key becomes the filename in
|
the aptitude sources list. The key becomes the filename in
|
||||||
``/etc/apt/sources.list.d/`` (with ``.list`` appended to it), while
|
``/etc/apt/sources.list.d/`` (with ``.list`` appended to it), except
|
||||||
the value is an array with each entry being a line.
|
for ``main``, which designates ``/etc/apt/sources.list``.
|
||||||
|
The value is an array with each entry being a line.
|
||||||
``optional``
|
``optional``
|
||||||
- ``components``: A list of components that should be added to the
|
- ``components``: A list of components that should be added to the
|
||||||
default apt sources. For example ``contrib`` or ``non-free``
|
default apt sources. For example ``contrib`` or ``non-free``
|
||||||
|
@ -209,6 +210,11 @@ variety of sources.
|
||||||
be added to the aptitude keyring of trusted signatures for
|
be added to the aptitude keyring of trusted signatures for
|
||||||
repositories.
|
repositories.
|
||||||
``optional``
|
``optional``
|
||||||
|
- ``apt.conf.d``: A map of ``apt.conf(5)`` configuration snippets.
|
||||||
|
The key become the filename in ``/etc/apt/apt.conf.d``, except
|
||||||
|
``main`` which designates ``/etc/apt/apt.conf``.
|
||||||
|
The value is a string in the ``apt.conf(5)`` syntax.
|
||||||
|
``optional``
|
||||||
- ``preferences``: Allows you to pin packages through `apt
|
- ``preferences``: Allows you to pin packages through `apt
|
||||||
preferences <https://wiki.debian.org/AptPreferences>`__. The setting
|
preferences <https://wiki.debian.org/AptPreferences>`__. The setting
|
||||||
is an object where the key is the preference filename in
|
is an object where the key is the preference filename in
|
||||||
|
@ -241,6 +247,11 @@ Example:
|
||||||
- non-free
|
- non-free
|
||||||
trusted-keys:
|
trusted-keys:
|
||||||
- /root/keys/puppet.gpg
|
- /root/keys/puppet.gpg
|
||||||
|
apt.conf.d:
|
||||||
|
00InstallRecommends: >-
|
||||||
|
APT::Install-Recommends "false";
|
||||||
|
APT::Install-Suggests "false";
|
||||||
|
00IPv4: 'Acquire::ForceIPv4 "false";'
|
||||||
preferences:
|
preferences:
|
||||||
main:
|
main:
|
||||||
- package: *
|
- package: *
|
||||||
|
|
Loading…
Add table
Reference in a new issue