FOSSology  4.4.0
Open Source License Compliance by Open Source Software
migrateConfig.php File Reference

prepare a system for pkg migrate testing. More...

Go to the source code of this file.

Classes

class  ConfigSys
 

Functions

 insertDeb ($objRef)
 insert the fossology debian line in /etc/apt/sources.list More...
 
 installFossology ($objRef, $migrate)
 Install fossology using either apt or yum. More...
 
 ckInstallLog ($log)
 Check the fossology install output for errors in the install. More...
 
 copyFiles ($files, $dest)
 copyFiles, copy one or more files to the destination, throws exception if file is not copied. More...
 
 configDebian ($osType, $osVersion)
 config a debian based system to install fossology. More...
 
 configYum ($objRef, $migrate)
 config yum on a redhat based system to install fossology. More...
 
 stop ($application)
 stop the application Assumes application is restartable via /etc/init.d/<script>. The application passed in should match the script name in /etc/init.d More...
 

Variables

global $Debian
 
global $RedHat
 
global $Migrate
 
 $debian = NULL
 
 $redHat = NULL
 
 $fedora = NULL
 
 $ubuntu = NULL
 
 $euid = posix_getuid()
 
if($euid !=0) if($argc > 1) $distros = array()
 
 $f = exec('cat /etc/issue', $dist, $dRtn)
 
 $testUtils = new TestRun()
 

Detailed Description

prepare a system for pkg migrate testing.

migrateConfig prepares a system for the installation of fossology packages and installs the fossology packages, then upgrate to the latest version of packages.

Parameters
string$fossVersionthe version of fossology to install?
Todo:
what should the api for this really be?
Version
"$Id $" Created on Apr 15, 2014 by Vincent Ma

Definition in file migrateConfig.php.

Function Documentation

◆ ckInstallLog()

ckInstallLog (   $log)

Check the fossology install output for errors in the install.

These errors do not cause apt to think that the install failed, so the output should be checked for typical failures during an install of packages. See the code for the specific checks.

Parameters
string$logthe output from a fossology install with packages

Definition at line 497 of file migrateConfig.php.

◆ configDebian()

configDebian (   $osType,
  $osVersion 
)

config a debian based system to install fossology.

copy postgres, php config files so that fossology can run.

Parameters
string$osTypeeither Debian or Ubuntu
string$osVersionthe particular version to install
Returns
boolean

Definition at line 612 of file migrateConfig.php.

◆ configYum()

configYum (   $objRef,
  $migrate 
)

config yum on a redhat based system to install fossology.

Copies the Yum configuration file for fossology to

Parameters
object$objRef,areference to the ConfigSys object
Returns
boolean

Definition at line 670 of file migrateConfig.php.

◆ copyFiles()

copyFiles (   $files,
  $dest 
)

copyFiles, copy one or more files to the destination, throws exception if file is not copied.

The method can be used to rename a single file, but not a directory. It cannot rename multiple files.

Parameters
mixed$filesthe files to copy (string), use an array for multiple files.
string$destthe destination path (must exist, must be writable).

@retrun boolean

Definition at line 540 of file migrateConfig.php.

◆ insertDeb()

insertDeb (   $objRef)

insert the fossology debian line in /etc/apt/sources.list

Parameters
object$objRefthe object with the deb attribute
Returns
boolean

Definition at line 335 of file migrateConfig.php.

◆ installFossology()

installFossology (   $objRef,
  $migrate 
)

Install fossology using either apt or yum.

installFossology assumes that the correct configuration for yum and the correct fossology version has been configured into the system.

Parameters
object$objRefan object reference (should be to ConfigSys)
Returns
boolean

Definition at line 377 of file migrateConfig.php.

◆ stop()

stop (   $application)

stop the application Assumes application is restartable via /etc/init.d/<script>. The application passed in should match the script name in /etc/init.d

Parameters
string$applicationthe application to stop. The application passed in should match the script name in /etc/init.d
Returns
boolen

Definition at line 754 of file migrateConfig.php.