index

package
v3.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CHECKSUM_MD5    = "md5"
	CHECKSUM_SHA1   = "sha1"
	CHECKSUM_SHA224 = "sha224"
	CHECKSUM_SHA256 = "sha256"
	CHECKSUM_SHA384 = "sha384"
	CHECKSUM_SHA512 = "sha512"
)
View Source
const (
	MDF_SIMPLE = "simple"
	MDF_UNIQUE = "unique"
)
View Source
const (
	COMPRESSION_GZ   = "gz"
	COMPRESSION_BZ2  = "bz2"
	COMPRESSION_XZ   = "xz"
	COMPRESSION_ZSTD = "zstd"
)
View Source
const (
	PERMS_DIR  os.FileMode = 0755 // Default permissions for directories
	PERMS_FILE os.FileMode = 0644 // Default permissions for files
)

Variables

CheckSumMethods contains all supported checksum methods

Contains all supported compression methods

View Source
var DefaultOptions = &Options{
	Update:       true,
	MDFilenames:  MDF_SIMPLE,
	CompressType: COMPRESSION_BZ2,
}

DefaultOptions is default options

View Source
var MDFilenames = []string{
	MDF_SIMPLE,
	MDF_UNIQUE,
}

MDFilenames contains all supported types of supported metadata names generation methods

Functions

func Generate

func Generate(path string, options *Options, full bool) error

Generate creates repository index using createrepo_c utility

func IsCreaterepoInstalled

func IsCreaterepoInstalled() bool

IsCreaterepoInstalled returns true if createrepo_c utility is installed on the system

Types

type Options

type Options struct {
	User      string      // Repository data directory owner username
	Group     string      // Repository data directory owner group
	DirPerms  os.FileMode // Permissions for directories
	FilePerms os.FileMode // Permissions for files

	GroupFile      string // Path to groupfile to include in metadata
	CheckSum       string // Checksum used in repomd.xml and for packages in the metadata (default: sha256)
	MDFilenames    string // Include the file's checksum in the filename,helps with proxies (unique/simple)
	CompressType   string // Which compression type to use (default: bz2)
	Distro         string // Distro tag and optional CPE ID
	Content        string // Tags for the content in the repository
	Revision       string // User-specified revision for repository
	NumDeltas      int    // The number of older versions to make deltas against
	ChangelogLimit int    // Only import the last N changelog entries
	Workers        int    // Number of workers to spawn to read rpms
	Pretty         bool   // Make sure all xml generated is formatted
	Update         bool   // Use the existing repodata to speed up creation of new repository
	Split          bool   // Generate split meta
	SkipSymlinks   bool   // Ignore symlinks of packages
	Deltas         bool   // Create delta rpms and metadata
	Zchunk         bool   // Generate zchunk files as well as the standard repodata
}

Options contains options used for generating repository index

func (*Options) Clone

func (o *Options) Clone() *Options

Clone creates options copy

func (*Options) GetDirPerms

func (o *Options) GetDirPerms() os.FileMode

GetDirPerms returns permissions for directories

func (*Options) GetFilePerms

func (o *Options) GetFilePerms() os.FileMode

GetFilePerms returns permissions for files

func (*Options) ToArgs

func (o *Options) ToArgs() []string

ToArgs converts options to slice with arguments for createrepo_c utility

func (*Options) Validate

func (o *Options) Validate() error

Validate validates options

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL