Fvennetier (Talk | contribs) m (→Step by step) |
Fvennetier (Talk | contribs) (→Graphical interface) |
||
| Line 175: | Line 175: | ||
= Graphical interface = | = Graphical interface = | ||
| - | The GUI is launched via the command obslightgui | + | The GUI is launched via the command ''obslightgui''. |
| - | + | ||
| - | The GUI is split in 3 main | + | Only the parameter ''--version'' is supported. |
| + | |||
| + | The GUI is split in 3 main sections: | ||
* OBS project | * OBS project | ||
* Packages | * Packages | ||
* local files and chroot (on a tab) | * local files and chroot (on a tab) | ||
| - | The buttons in each | + | The buttons in each section apply to the relative section. They display a tool-tip when the mouse is positioned on them. |
Button are grayed when there are not active or not yet implemented. | Button are grayed when there are not active or not yet implemented. | ||
| Line 213: | Line 214: | ||
The panel on the middle displays the list of packages of the selected project, and information about the selected package. | The panel on the middle displays the list of packages of the selected project, and information about the selected package. | ||
| - | + | 7 buttons available: | |
| + | {| border="1" cellpadding="5" | ||
| + | | | ||
;New | ;New | ||
: Create a new package. Currently you cannot create a new package from scratch using OBS Light, only import one. | : Create a new package. Currently you cannot create a new package from scratch using OBS Light, only import one. | ||
| Line 219: | Line 222: | ||
: Import a package from an OBS project. | : Import a package from an OBS project. | ||
;Delete | ;Delete | ||
| - | : Delete the selected package. The package | + | : Delete the selected package. The package will be removed locally but will remain on the OBS server. |
;Modify | ;Modify | ||
: Modify the package title and description. Currently not available. | : Modify the package title and description. Currently not available. | ||
| + | | | ||
| + | ;Refresh OBS status | ||
| + | : Refresh the OBS status column. | ||
| + | ;Refresh OSC status | ||
| + | : Refresh the OSC status column. | ||
;Install source | ;Install source | ||
: Install the source of a package into the chroot of the project. This button is available only if the chroot has already been created. | : Install the source of a package into the chroot of the project. This button is available only if the chroot has already been created. | ||
| + | |} | ||
=== The file panel === | === The file panel === | ||
The file panel has two tabs: '''local directory''' and '''chroot'''. | The file panel has two tabs: '''local directory''' and '''chroot'''. | ||
| + | |||
==== The local directory tab ==== | ==== The local directory tab ==== | ||
This tab shows the list of files contained in the selected package. | This tab shows the list of files contained in the selected package. | ||
| Line 243: | Line 253: | ||
: Launch an editor on the file | : Launch an editor on the file | ||
| | | | ||
| + | ;Open terminal | ||
| + | : Open a terminal in the package directory. | ||
;Update files | ;Update files | ||
: Checkout/update files from the OBS (''osc update'' equivalent) | : Checkout/update files from the OBS (''osc update'' equivalent) | ||
| - | |||
| - | |||
;Generate patch | ;Generate patch | ||
: Generate a patch from the modifications made to the package source in the chroot, and add this patch to the package. | : Generate a patch from the modifications made to the package source in the chroot, and add this patch to the package. | ||
| Line 252: | Line 262: | ||
: Commit changes to the OBS (''osc commit'' equivalent) | : Commit changes to the OBS (''osc commit'' equivalent) | ||
|} | |} | ||
| + | |||
==== The chroot tab ==== | ==== The chroot tab ==== | ||
This tab shows the complete file tree of the chroot of the selected project. | This tab shows the complete file tree of the chroot of the selected project. | ||
| Line 261: | Line 272: | ||
| | | | ||
;New | ;New | ||
| + | : Make a package repository accessible from zypper inside the chroot, by URL. | ||
;Import | ;Import | ||
| + | : Make the package repository of another OBS Light project accessible from zypper inside the chroot. | ||
;Delete | ;Delete | ||
| + | : Delete a repository from the chroot. | ||
;Modify | ;Modify | ||
| + | : Modify the URL or alias of a repository. | ||
| | | | ||
| - | ;New/Open | + | ;New/Open terminal |
| + | : Create the chroot or open a terminal in the chroot if it is already created. | ||
;Import | ;Import | ||
| + | : Not implemented | ||
;Delete | ;Delete | ||
| + | : Delete the chroot | ||
;Modify | ;Modify | ||
| + | : Not implemented | ||
|} | |} | ||
== Imager projects tab == | == Imager projects tab == | ||
Currently not available. | Currently not available. | ||
| - | |||
= Troubleshooting = | = Troubleshooting = | ||
This is the user manual of the command-line and graphical interface of OBS Light.
OBS Light is available via command line (obslight) and a graphical user interface GUI (obslightgui). Independently of that fact that you are using the command line or the GUI, you will get access to the same services.
OBS Light is a simplified model to develop code via an OBS. It does not replace your OBS.
To use OBS Light you will need a login access to an OBS. You have two simple methods to get a login on an OBS:
Once you have a login on an OBS instance, you will need to copy a project to play with. You can use the utilities obstag and obs2obscopy to achieve that in an easy way. See Obstag .
OBS Light needs to know on which server you will connect to. As OBS Light does more than the osc tool, more information will be needed. You will be asked the following :
Even if these information are copied in .osrcrc, they must be maintain via the OBS light command.
After the configuration of one or more OBS servers, you will be able to import a package to work on. You can also create an empty package would you like to.
OBS Light will create a local copy of that package on your workstation in a very similar way to what an osc checkout action would do. As osc, OBS Light transparently keeps track directly of the links between the packages and the associated OBS servers.
Once that you have loaded the packages, you can, by a simple selection of a given package, request the creation of a chroot. The created chroot is specific to the project and will not be recreated if it's already present. During the creation of the chroot, extra packages imposed by the build dependencies will be loaded automatically. If you are connected on a remote OBS that phase can take some time and may require a bit of patience.
OBS Light tries to load automatically the dependencies from the analysis of the .spec file in the RPM but that is not always possible. The user has the possibility to add manually extra file and/or packages to the chroot.
Packages can be imported either from a project already present in OBS Light or from any URL.
Once that the chroot is created, the source from the package can be imported in the chroot. During that process, OBS Light will load the extra package needed to build that specific imported source and will create a special git tree which will monitor any changes done by the user.
The user can directly open a window on the chroot from OBS Light. The console program used by default can be defined in the OBS Light configuration file. From there direct modification of the code in the chroot is possible and local build can be run as often as desired.
When the user is happy of his change, he can request the change from the chroot to be committed directly in the package.
A patch will be created and added to the package and configured in the .spec file by OBS Light.
Once that changes on a given project (which can work on one or multiple packages) achieve a stage which is worth to push on the OBS server. The user can simply request to save the project and OBS Light will commit the changes automatically.
obslight addObsServer --serverApi <your OBS API URL> --serverRepo <your OBS package repository URL> --alias <alias> --user <login> --password <password>
obslight addProject --projectLocalName MeeGo_1.2_oss --projectObsName MeeGo:1.2:oss --obsServer <alias> --projectArch i586 --projectTarget standard
obslight addPackage --projectLocalName MeeGo_1.2_oss --package kernel
obslight createChRoot --projectLocalName MeeGo_1.2_oss
obslight addPackageSourceInChRoot --projectLocalName MeeGo_1.2_oss --package kernel
obslight goToChRoot --projectLocalName MeeGo_1.2_oss --package kernel
Now you are logged in the chroot. In this example we just modify the kernel configuration.
# cp configs/kernel-x86.config .config # make menuconfig
There are two methods.
# cp .config config-x86 # exit obslight makePatch --projectLocalName MeeGo_1.2_oss --package kernel --patch myKernelPatch.patch
vi ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/kernel.spec
# cp .config /chrootTransfert/config-x86 # exit cp /chrootTransfert/config-x86 ~/OBSLight/MeeGo_1.2_oss/MeeGo:1.2:oss/kernel/
obslight addAndCommitChanges --projectLocalName MeeGo_1.2_oss --package kernel -m "Patch kernel"
The help is integrated in the tool. obslight --help will give you an online help.
To get more detail on a specific command you can type obslight command --help.
#obslight --help
Usage: ObsLight [global command] <command> [--command-options]
Type obslight <command> --help to get help on a specific command.
Commands:
getLocalProjectList: Print the list of local projects.
getPackageList: Print the list of packages of a project.
getObsServerList: Print the list of OBS servers.
addObsServer: Add an OBS server.
delObsServer: Del an OBS server.
addProject: Create a local project based on an existing project on an OBS server.
exportProject: save a Project into a path
importProject: import a Project from a file
getWebProjectPage: return the web URL of a project.
removeProject: Remove local project
removePackage: Remove local package from a local project
addPackage: Create a local package in a local project, based on an existing package in a project on an OBS server.
createChRoot: Create a chroot, built from a local project.
addPackageSourceInChRoot:Install the source RPM of a package into the chroot of the project.
goToChRoot: Open a bash in the chroot of a project.
makePatch: Generate a patch with modifications made in the chroot of a local project.
addAndCommitChanges: Add the new files (including patches) and commit them to the OBS
addRepoInChRoot: Add a repository to the chroot's zypper configuration file.
global commands
--quiet: Print all subprocess outputs.
--debug: Print all subprocess commands.
--version Print the current version.
ObsLight:
Provides a tool to manage an OBS project on your local machine
For additional informations, see
* http://wiki.meego.com/OBS_Light
The GUI is launched via the command obslightgui.
Only the parameter --version is supported.
The GUI is split in 3 main sections:
The buttons in each section apply to the relative section. They display a tool-tip when the mouse is positioned on them. Button are grayed when there are not active or not yet implemented.
The graphical interface has two main tabs: OBS Projects and Imager Projects.
This tab allows you to manage an OBS project, its packages (and their files) and its chroot.
The panel on the left displays the list of projects locally configured, and information about the selected project.
6 buttons available:
The panel on the middle displays the list of packages of the selected project, and information about the selected package.
7 buttons available:
|
|
The file panel has two tabs: local directory and chroot.
This tab shows the list of files contained in the selected package.
| File-related buttons | OSC-related buttons |
|
|
This tab shows the complete file tree of the chroot of the selected project. If a package is selected and it has previously been imported into the chroot, its path is expanded by default.
| Repository-related buttons | Chroot-related buttons |
|
|
Currently not available.
This message appears when adding packages in ARM chroot. It may come from a broken version of zypper/libzypp in your chroot, which do not see noarch packages. This problem was reported with zypper 1.5.3 and libzypp 8.12.1. We suggest you to update your zypper version to 1.6+. For convenience, we pre-built zypper 1.6.15 and libzypp 9.10.2 to Meego 1.2.0.
First add our repository to your chroot's zypper configuration file:
obslight addRepoInChRoot --projectLocalName $ProjectName --url http://repo.pub.meego.com/Project:/OBS_Light:/Zypper/MeeGo_1.2_OSS/ --alias "Zypper_1.6.15_backport"
Then go to the chroot and update zypper:
obslight goToChRoot --projectLocalName $ProjectName # zypper update zypper # exit
The build package of your chroot does not support armv8el builds. Consider using another version, like the 2011.03.29 of MeeGo repositories.
First add the MeeGo building tools repository to your chroot's zypper configuration file:
obslight addRepoInChRoot --projectLocalName $ProjectName --url http://download.meego.com/live/Tools:/Building/MeeGo_1.2.0/ --alias "Tools:Building_MeeGo_1.2.0"
Then go to the chroot and update build:
obslight goToChRoot --projectLocalName $ProjectName # zypper update build # exit
This appears when binfmt_misc is not or badly configured. Launch qemu's binfmt configuration script (as root):
qemu-binfmt-conf.sh
If you still get the same message, try this (as root):
echo -1 > /proc/sys/fs/binfmt_misc/arm echo ":arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:`which qemu-arm`:" > /proc/sys/fs/binfmt_misc/register
This error appears on Ubuntu when running obslight from a console, without a graphical environment. At the moment, the only known solution is to run obslight only from a graphical environment (e.g. Gnome).