Documentation ¶
Index ¶
- Constants
- Variables
- func IsAipsetuHostSupported(name string) bool
- func IsAipsetupHostArchSupported(host, hostarch string) bool
- func IsAipsetupHostTargetSupported(host, target string) bool
- func NormalizeASPName(aspname string) (string, error)
- func UserIdByName(name string) (int, error)
- func UserKeysSortedSlice() []int
- func UserNameById(id int) (string, error)
- type ASPName
- type ASPNameSorter
- type ASPNameTimeStamp
- type BuilderAction
- type BuilderActionCallable
- type BuilderActions
- func (self BuilderActions) ActionList() []string
- func (self BuilderActions) AddActionAfterNameShort(name string, new_name string, callable BuilderActionCallable) (BuilderActions, error)
- func (self BuilderActions) AddActionBeforeNameShort(name string, new_name string, callable BuilderActionCallable) (BuilderActions, error)
- func (self BuilderActions) AddActionsAfter(value BuilderActions, index int) BuilderActions
- func (self BuilderActions) AddActionsAfterName(value BuilderActions, name string) (BuilderActions, error)
- func (self BuilderActions) AddActionsBefore(value BuilderActions, index int) BuilderActions
- func (self BuilderActions) AddActionsBeforeName(value BuilderActions, name string) (BuilderActions, error)
- func (self BuilderActions) Append(value BuilderActions) (BuilderActions, error)
- func (self BuilderActions) AppendSingle(name string, callable BuilderActionCallable) (BuilderActions, error)
- func (self BuilderActions) Get(name string) (*BuilderAction, bool)
- func (self BuilderActions) Index(name string) int
- func (self BuilderActions) Move(index, new_index int) BuilderActions
- func (self BuilderActions) MoveAfter(index int, name string) error
- func (self BuilderActions) MoveBefore(index int, name string) error
- func (self BuilderActions) MoveNamedAfter(index, name string) error
- func (self BuilderActions) MoveNamedBefore(index, name string) error
- func (self BuilderActions) Remove(name string) BuilderActions
- func (self BuilderActions) Replace(name string, action *BuilderAction) error
- func (self BuilderActions) ReplaceShort(name string, callable BuilderActionCallable) error
- type BuilderI
- type BuildingSiteCtlI
- type BuildingSiteInfo
- type BuildingSiteValuesCalculatorI
- type MassBuilderInfo
- type PackageInfo
- type PackagerI
- type PrePackagerI
- type SystemI
- type SystemValuesCalculatorI
Constants ¶
View Source
const ( AIPSETUP_SYSTEM_CONFIG_FILENAME = "aipsetup5.system.ini" LILITH_ROOT_MULTIHOST_DIRNAME = "multihost" LILITH_MULTIHOST_MULTIARCH_DIRNAME = "multiarch" LILITH_MULTIHOST_CROSSBULDERS_DIRNAME = "crossbuilders" DIR_TARBALL = "00.TARBALL" DIR_SOURCE = "01.SOURCE" DIR_PATCHES = "02.PATCHES" DIR_BUILDING = "03.BUILDING" DIR_DESTDIR = "04.DESTDIR" DIR_BUILD_LOGS = "05.BUILD_LOGS" DIR_LISTS = "06.LISTS" DIR_TEMP = "07.TEMP" MASSBUILDER_INFO_FILENAME = "00.massbuilder.info" MASSBUILDER_ASPS_DIR = "01.asps" MASSBUILDER_DONE_TARBALLS = "03.done_tarballs" PACKAGE_INFO_FILENAME = "package_info.json" PACKAGE_INFO_FILENAME_V5 = "package_info_v5.json" PACKAGE_CHECKSUM_FILENAME = "package.sha512" I686_PC_LINUX_GNU = "i686-pc-linux-gnu" X86_64_PC_LINUX_GNU = "x86_64-pc-linux-gnu" DIRNAME_BIN = "bin" DIRNAME_SBIN = "sbin" DIRNAME_INCLUDE = "include" DIRNAME_LIB = "lib" DIRNAME_LIB32 = "lib32" DIRNAME_LIBX32 = "libx32" DIRNAME_LIB64 = "lib64" DIRNAME_SHARE = "share" DIRNAME_MAN = "man" DIRNAME_DOC = "doc" DIRNAME_DOCS = "docs" DIRNAME_VAR = "var" DIRNAME_OPT = "opt" DIRNAME_PROC = "proc" DIRNAME_DAEMONS = "daemons" SYS_UID_MAX = 999 BOOT_IMAGE_BOOT_PARTITION_UUID = "8c19d732-192f-2e46-bce3-53e8dea186ff" BOOT_IMAGE_BOOT_PARTITION_FS_UUID = "2417c10c-1ea5-4107-bd97-86384692c09b" )
View Source
const (
ASP_NAME_REGEXPS_AIPSETUP3 = `` +
`^\((?P<name>.+?)\)` +
`-\((?P<version>\d+(\.\d+)*)\)` +
`-\((?P<status>.*?)\)` +
`-\((?P<timestamp>\d{8}\.\d{6}\.\d+)\)` +
`-\((?P<host>.*?)\)` +
`(-\((?P<hostarch>.*?)\))?` +
`(-\((?P<crossbuilder_target>crossbuilder\-target\:.*)\))?` +
`((\.tar.xz)|(\.asp)|(\.xz))?$`
)
View Source
const (
ASP_NAME_REGEXPS_AIPSETUP3_TIMESTAMP = `` +
`(?P<year>\d{4})(?P<month>\d{2})(?P<day>\d{2})\.` +
`(?P<hour>\d{2})(?P<min>\d{2})(?P<sec>\d{2})\.` +
`(?P<nsec>\d+)`
)
Variables ¶
View Source
var ( POSSIBLE_LIBDIR_NAMES = []string{ DIRNAME_LIB, DIRNAME_LIB32, DIRNAME_LIBX32, DIRNAME_LIB64, } PATH_CALCULATOR_BIN_DIR_NAMES = []string{DIRNAME_BIN, DIRNAME_SBIN} DIR_ALL = []string{ DIR_TARBALL, DIR_SOURCE, DIR_PATCHES, DIR_BUILDING, DIR_DESTDIR, DIR_BUILD_LOGS, DIR_LISTS, DIR_TEMP, } AIPSETUP_SUPPORTED_HOST_ARCHS = map[string]([]string){ "x86_64-pc-linux-gnu": []string{ "i686-pc-linux-gnu", "i586-pc-linux-gnu", "i486-pc-linux-gnu", }, } AIPSETUP_SUPPORTED_HOST_TARGETS = map[string]([]string){ "x86_64-pc-linux-gnu": []string{ "i686-pc-linux-gnu", }, "i686-pc-linux-gnu": []string{ "x86_64-pc-linux-gnu", }, } USERS = map[int]string{ 1: "nobody", 2: "nogroup", 3: "bin", 4: "ftp", 5: "mail", 6: "adm", 7: "gdm", 8: "wheel", 10: "pts", 11: "tty", 20: "disk", 21: "usb", 22: "flash", 23: "mouse", 24: "lp", 25: "floppy", 26: "video", 27: "audio", 28: "cdrom", 29: "tape", 30: "pulse", 31: "pulse-access", 32: "usbfs", 33: "usbdev", 34: "usbbus", 35: "usblist", 36: "alsa", 37: "render", 39: "colord", 40: "messagebus", 41: "sshd", 42: "haldaemon", 44: "mysql", 45: "exim", 46: "postgres", 47: "httpd", 48: "cron", 55: "cupsd", 58: "ssl", 62: "docker", 71: "kmem", 72: "polkituser", 75: "polkitd", 76: "kvm", 90: "mine", 91: "utmp", 92: "lock", 93: "avahi", 94: "avahi-autoipd", 95: "netdev", 99: "aipsetupserv", 100: "systemd-bus-proxy", 101: "systemd-network", 102: "systemd-resolve", 103: "systemd-timesync", 104: "systemd-journal", 105: "systemd-journal-gateway", 106: "systemd-journal-remote", 107: "systemd-journal-upload", 108: "systemd-coredump", 200: "tor", } LILITH_GROUPS = []string{ "cross", "core0", "core1", "xml", "netfilter", "crypt", "sec", "llvm", "rust", "lang", "perlmod", "media", "sdl", "gl", "wayland", "gtk", "qt", "web", "containers", "vz", "db", } LILITH_CATEGORIES = []string{ "x", "freedesktop", "media_alsa", } )
View Source
var ( ASP_NAME_REGEXPS_AIPSETUP3_COMPILED = regexp.MustCompile( ASP_NAME_REGEXPS_AIPSETUP3, ) )
View Source
var ( ASP_NAME_REGEXPS_AIPSETUP3_TIMESTAMP_COMPILED = regexp.MustCompile( ASP_NAME_REGEXPS_AIPSETUP3_TIMESTAMP, ) )
View Source
var (
ErrCantParseTimestamp = errors.New(
"Can't parse given str as ASP name timestamp",
)
)
Functions ¶
func IsAipsetuHostSupported ¶
func NormalizeASPName ¶
func UserIdByName ¶
func UserKeysSortedSlice ¶
func UserKeysSortedSlice() []int
func UserNameById ¶
Types ¶
type ASPName ¶
type ASPName struct { Name string Version string Status string TimeStamp ASPNameTimeStamp Host string HostArch string CrossbuilderTarget string }
func NewASPNameFromString ¶
type ASPNameSorter ¶
type ASPNameSorter []string
func (ASPNameSorter) Len ¶
func (self ASPNameSorter) Len() int
func (ASPNameSorter) Less ¶
func (self ASPNameSorter) Less(i, j int) bool
func (ASPNameSorter) Swap ¶
func (self ASPNameSorter) Swap(i, j int)
type ASPNameTimeStamp ¶
func NewASPTimeStampFromCurrentTime ¶
func NewASPTimeStampFromCurrentTime() ASPNameTimeStamp
func NewASPTimeStampFromString ¶
func NewASPTimeStampFromString(text string) (ASPNameTimeStamp, error)
func NewASPTimeStampFromTime ¶
func NewASPTimeStampFromTime(t time.Time) ASPNameTimeStamp
func (ASPNameTimeStamp) GetTime ¶
func (self ASPNameTimeStamp) GetTime() time.Time
func (ASPNameTimeStamp) String ¶
func (self ASPNameTimeStamp) String() string
type BuilderAction ¶
type BuilderAction struct { Name string Callable BuilderActionCallable }
type BuilderActionCallable ¶
type BuilderActions ¶
type BuilderActions []*BuilderAction
func NewBuilderActions ¶
func NewBuilderActions() BuilderActions
func NewBuilderActionsLenOne ¶
func NewBuilderActionsLenOne(name string, callable BuilderActionCallable) BuilderActions
func (BuilderActions) ActionList ¶
func (self BuilderActions) ActionList() []string
func (BuilderActions) AddActionAfterNameShort ¶
func (self BuilderActions) AddActionAfterNameShort( name string, new_name string, callable BuilderActionCallable, ) (BuilderActions, error)
func (BuilderActions) AddActionBeforeNameShort ¶
func (self BuilderActions) AddActionBeforeNameShort( name string, new_name string, callable BuilderActionCallable, ) (BuilderActions, error)
func (BuilderActions) AddActionsAfter ¶
func (self BuilderActions) AddActionsAfter(value BuilderActions, index int) BuilderActions
func (BuilderActions) AddActionsAfterName ¶
func (self BuilderActions) AddActionsAfterName(value BuilderActions, name string) (BuilderActions, error)
func (BuilderActions) AddActionsBefore ¶
func (self BuilderActions) AddActionsBefore(value BuilderActions, index int) BuilderActions
func (BuilderActions) AddActionsBeforeName ¶
func (self BuilderActions) AddActionsBeforeName(value BuilderActions, name string) (BuilderActions, error)
func (BuilderActions) Append ¶
func (self BuilderActions) Append(value BuilderActions) (BuilderActions, error)
func (BuilderActions) AppendSingle ¶
func (self BuilderActions) AppendSingle( name string, callable BuilderActionCallable, ) ( BuilderActions, error, )
func (BuilderActions) Get ¶
func (self BuilderActions) Get(name string) (*BuilderAction, bool)
func (BuilderActions) Index ¶
func (self BuilderActions) Index(name string) int
func (BuilderActions) Move ¶
func (self BuilderActions) Move(index, new_index int) BuilderActions
func (BuilderActions) MoveAfter ¶
func (self BuilderActions) MoveAfter(index int, name string) error
func (BuilderActions) MoveBefore ¶
func (self BuilderActions) MoveBefore(index int, name string) error
func (BuilderActions) MoveNamedAfter ¶
func (self BuilderActions) MoveNamedAfter(index, name string) error
func (BuilderActions) MoveNamedBefore ¶
func (self BuilderActions) MoveNamedBefore(index, name string) error
func (BuilderActions) Remove ¶
func (self BuilderActions) Remove(name string) BuilderActions
func (BuilderActions) Replace ¶
func (self BuilderActions) Replace(name string, action *BuilderAction) error
func (BuilderActions) ReplaceShort ¶
func (self BuilderActions) ReplaceShort(name string, callable BuilderActionCallable) error
type BuilderI ¶
type BuilderI interface { //SetBuildingSite(building_site BuildingSiteCtlI) DefineActions() (BuilderActions, error) GetBuildingSiteCtl() BuildingSiteCtlI }
type BuildingSiteCtlI ¶
type BuildingSiteCtlI interface { GetDIR_TARBALL() string GetDIR_SOURCE() string GetDIR_PATCHES() string GetDIR_BUILDING() string GetDIR_DESTDIR() string GetDIR_BUILD_LOGS() string GetDIR_LISTS() string GetDIR_TEMP() string ReadInfo() (*BuildingSiteInfo, error) WriteInfo(*BuildingSiteInfo) error DetermineMainTarrball() (string, error) GetPath() string GetSystem() SystemI GetLog() *logger.Logger GetBuildingSiteValuesCalculator() BuildingSiteValuesCalculatorI GetOuterTarballsDir() (string, error) GetOuterAspsDir() (string, error) GetSources() error GetTarballs() error GetPatches() error Run(targets []string) error PrePackager() PrePackagerI Packager() PackagerI }
type BuildingSiteInfo ¶
type BuildingSiteInfo struct { SystemTitle string `json:"system_title"` SystemVersion string `json:"system_version"` // System which going to run this package Host string `json:"host"` HostArch string `json:"hostarch"` // This package is crosscompiler to build other packages. // This package is going to run under Host // CrossbuilderTarget is System which going to run packages built by this crosscompiler // ThisIsCrossbuilder bool `json:"this_is_crossbuilder"` CrossbuilderTarget string `json:"crossbuilder_target"` // This package is crossbuilding // This package is being built to run under Host // This package uses CrossbuildersHost's crossbuilder to be built // ThisIsCrossbuilding bool `json:"this_is_crossbuilding"` CrossbuildersHost string `json:"crossbuilder_s_host"` // RunningByHost is host which started this building site InitiatedByHost string `json:"initiated_by_host"` PackageName string `json:"package_name"` PackageVersion string `json:"package_version"` PackageStatus string `json:"package_status"` PackageTimeStamp string `json:"package_timestamp"` TarballsDir string `json:"tarballs_dir"` AspsDir string `json:"asps_dir"` ModifyVersionBeforePack bool `json:"modify_version_before_pack"` NewVersion string `json:"new_version"` }
func NewBuildingSiteInfoFromByteSlice ¶
func NewBuildingSiteInfoFromByteSlice(text []byte) (*BuildingSiteInfo, error)
func NewBuildingSiteInfoFromString ¶
func NewBuildingSiteInfoFromString(text string) (*BuildingSiteInfo, error)
func (*BuildingSiteInfo) SetInfoLilith50 ¶
func (self *BuildingSiteInfo) SetInfoLilith50()
func (*BuildingSiteInfo) ThisIsCrossbuilder ¶
func (self *BuildingSiteInfo) ThisIsCrossbuilder() bool
func (*BuildingSiteInfo) ThisIsCrossbuilding ¶
func (self *BuildingSiteInfo) ThisIsCrossbuilding() bool
func (*BuildingSiteInfo) ThisIsSubarchBuilding ¶
func (self *BuildingSiteInfo) ThisIsSubarchBuilding() bool
type BuildingSiteValuesCalculatorI ¶
type BuildingSiteValuesCalculatorI interface { CalculateMultihostDir() string CalculateDstMultihostDir() string CalculateHostDir() (string, error) CalculateDstHostDir() (string, error) CalculateHostMultiarchDir() (string, error) CalculateDstHostMultiarchDir() (string, error) CalculateHostArchDir() (string, error) CalculateDstHostArchDir() (string, error) // /{hostpath}/corssbuilders CalculateHostCrossbuildersDir() (string, error) CalculateDstHostCrossbuildersDir() (string, error) // /{hostpath}/corssbuilders/{target} CalculateHostCrossbuilderDir() (string, error) CalculateDstHostCrossbuilderDir() (string, error) // /multihost/{host}/{libname} CalculateHostLibDir() (string, error) CalculateDstHostLibDir() (string, error) // /multihost/{host}/multiarch/{arch}/{libname} CalculateHostArchLibDir() (string, error) CalculateDstHostArchLibDir() (string, error) CalculateInstallPrefix() (string, error) CalculateDstInstallPrefix() (string, error) // /multihost/{host}/{libname} // or // /multihost/{host}/multiarch/{hostarch}/{libname} // depending on host != hostarch CalculateInstallLibDir() (string, error) CalculateDstInstallLibDir() (string, error) CalculateMainMultiarchLibDirName() (string, error) Calculate_LD_LIBRARY_PATH() ([]string, error) Calculate_LIBRARY_PATH() ([]string, error) Calculate_C_INCLUDE_PATH() ([]string, error) Calculate_PATH() ([]string, error) Calculate_C_Compiler() (string, error) Calculate_CXX_Compiler() (string, error) CalculateMultilibVariant() (string, error) CalculateAutotoolsCCParameterValue() (string, error) CalculateAutotoolsCXXParameterValue() (string, error) CalculateAutotoolsCompilerOptionsMap() (environ.EnvVarEd, error) CalculateAutotoolsAllOptionsMap() (environ.EnvVarEd, error) CalculateAutotoolsHBTOptions() ([]string, error) CalculateCmakeAllOptionsMap() (environ.EnvVarEd, error) CalculateOptAppDir(name string) string CalculateInstallPrefixExecutable(name string) (string, error) GetPrefixPkgConfig() (*pkgconfig.PkgConfig, error) }
type MassBuilderInfo ¶
type PackageInfo ¶
type PackageInfo struct { Description string HomePage string BuilderName string Removable bool Reducible bool AutoReduce bool NonBuildable bool NonInstallable bool Deprecated bool PrimaryInstallOnly bool BuildPkgDeps []string BuildDeps []string SODeps []string RunTimeDeps []string Tags []string Category string Groups []string TarballFileNameParser string TarballName string TarballFilters []string TarballProvider string TarballProviderArguments []string TarballProviderVersionSyncDepth int TarballStabilityClassifier string TarballVersionComparator string DownloadPatches bool PatchesDownloadingScriptText string }
func (*PackageInfo) RenderJSON ¶
func (self *PackageInfo) RenderJSON() (string, error)
type PrePackagerI ¶
type SystemI ¶
type SystemI interface { Cfg() *ini.File Root() string Host() (string, error) Archs() ([]string, error) GetInstalledASPDir() string GetInstalledASPSumsDir() string GetInstalledASPBuildLogsDir() string GetInstalledASPDepsDir() string GetTarballRepoRootDir() string GetSystemValuesCalculator() SystemValuesCalculatorI }
type SystemValuesCalculatorI ¶
type SystemValuesCalculatorI interface { CalculateMultihostDir() string CalculateHostDir(host string) string CalculateHostMultiarchDir(host string) string CalculateHostArchDir(host, hostarch string) string CalculateHostCrossbuildersDir(host string) string CalculateHostCrossbuilderDir(host, target string) string }
Click to show internal directories.
Click to hide internal directories.