1
// Copyright 2015 Canonical Ltd.
2
// Copyright 2015 Cloudbase Solutions SRL
3
// Licensed under the LGPLv3, see LICENCE file for details.
8
"github.com/juju/utils/packaging"
12
// CentOSCloudArchiveUrl is the url of the (future) cloud archive for CentOS.
13
// TODO (people of the distant future): add this when it is available.
14
// CentOSCloudArchiveUrl = "http://fill-me-in.com/cloud-archive.repo"
16
// CentOSSourcesFile is the default file which lists all core sources
17
// for yum packages on CentOS.
18
CentOSSourcesFile = "/etc/yum/repos.d/CentOS-Base.repo"
20
// ReplaceCentOSMirror is a mini-script which replaces the default CentOS
21
// mirros with the one formatted in.
22
ReplaceCentOSMirror = "sed -r -i -e 's|^mirrorlist|#mirrorlist|g' -e 's|#baseurl=.*|baseurl=%s|g' " +
26
// CentOSDefaultPackages is the default package set we'd like installed
27
// on all CentOS machines.
28
var CentOSDefaultPackages = append(DefaultPackages, []string{
29
// TODO (aznashwan, all): further populate this list.
34
// cloudArchivePackagesCentOS maintains a list of CentOS packages that
35
// Configurer.IsCloudArchivePackage will reference when determining the
36
// repository from which to install a package.
37
var cloudArchivePackagesCentOS = map[string]struct{}{
38
// TODO (aznashwan, all): if a separate repository for
39
// CentOS 7+ especially for Juju is to ever occur, please add the relevant
40
// package listings here.
43
// centOSToUbuntuPackageNameMap is a map for converting package names from
44
// their names as found in CentOS repositories to their equivalent in Ubuntu.
45
// It is implemented as the flipped package mapper for Ubuntu.
46
var centOSToUbuntuPackageNameMap = flipMap(ubuntuToCentOSPackageNameMap)
48
// configureCloudArchiveSourceCentOS is a helper function which returns the
49
// cloud archive PackageSource and PackagePreferences for the given series for
51
func configureCloudArchiveSourceCentOS(series string) (packaging.PackageSource, packaging.PackagePreferences) {
52
// TODO (aznashwan, all): implement this when the
53
// archive for CentOS goes up.
54
return packaging.PackageSource{}, packaging.PackagePreferences{}
57
// getTargetReleaseSpecifierCentOS returns the specifier that can be passed to
58
// yum in order to ensure that it pulls the package from that particular source.
59
func getTargetReleaseSpecifierCentOS(series string) string {
60
// TODO (aznashwan, all): add these when the archive for CentOS goes up.