package.yml - VirtualBox - Lazarus (#132)

Signed-off-by: Pierre-Yves <pyu@riseup.net>
This commit is contained in:
Pierre-Yves 2018-04-20 14:50:56 +02:00 committed by Joshua Strobl
parent 7164e42c29
commit cb79b6860b
7 changed files with 101 additions and 139 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

0
imgs/software/virtualbox/vbox-kernel.png Executable file → Normal file
View File

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,6 +1,6 @@
+++ +++
title = "Package.yml" title = "Package.yml"
lastmod = "2017-09-27T15:32:14+03:00" lastmod = "2018-04-19T19:31:14+02:00"
+++ +++
# Package.yml # Package.yml
@ -18,24 +18,28 @@ An example file follows:
``` yaml ``` yaml
name : nano name : nano
version : 2.5.1 version : 2.9.5
release : 39 release : 96
source : source :
- http://www.nano-editor.org/dist/v2.5/nano-2.5.1.tar.gz : e06fca01bf183f4d531aa65a28dffc0e2d10185239909eb3de797023f3453bde - https://www.nano-editor.org/dist/v2.9/nano-2.9.5.tar.xz : 7b8d181cb57f42fa86a380bb9ad46abab859b60383607f731b65a9077f4b4e19
license : GPL-3.0 license : GPL-3.0-or-later
component : editor
summary : Small, friendly text editor inspired by Pico summary : Small, friendly text editor inspired by Pico
component : system.devel
description: | description: |
GNU nano is an easy-to-use text editor originally designed as a replacement for GNU nano is an easy-to-use text editor originally designed as a replacement for Pico, the ncurses-based editor from the non-free mailer package Pine (itself now available under the Apache License as Alpine).
Pico, the ncurses-based editor from the non-free mailer package Pine.
setup : | setup : |
%configure --enable-utf8 --docdir=/usr/share/doc/nano %patch -p1 < $pkgfiles/0001-Use-a-stateless-configuration.patch
%reconfigure --enable-utf8 --docdir=/usr/share/doc/nano
build : | build : |
%make %make
install : | install : |
%make_install %make_install
# TODO: Convert to stateless install -D -m 00644 $pkgfiles/nanorc $installdir/usr/share/defaults/nano/nanorc
install -D -m 00644 $pkgfiles/nanorc $installdir/etc/nanorc install -D -m 00644 $pkgfiles/git.nanorc $installdir/usr/share/nano/git.nanorc
# https://github.com/scopatz/nanorc
for rcFile in $pkgfiles/nanorc-extras/*.nanorc; do
install -m 00644 $rcFile $installdir/usr/share/nano
done
``` ```
## Keys ## Keys
@ -84,8 +88,7 @@ Step Name | Description
## Macros ## Macros
To further assist in packaging, a number of macros are available. These are simply shorthand ways to perform a normal build operation. They also ensure that the resulting package is consistent. These macros are only available in our build steps, as To further assist in packaging, a number of macros are available. These are simply shorthand ways to perform a normal build operation. They also ensure that the resulting package is consistent. These macros are only available in our build steps, as they are substituted within the script before execution.
they are substituted within the script before execution.
### Usage ### Usage
@ -101,7 +104,8 @@ Macros are prefixed with `%`, and are substituted before your script is executed
Macro | Description Macro | Description
---- | ---- ---- | ----
**%autogen** | Runs autogen with our `%CONFOPTS%` to create a configure script then proceeds to run `%configure`. **%autogen** | Runs autogen with our `%CONFOPTS%` to create a configure script then proceeds to run `%configure`.
**%cmake** | Configure cmake project with the distribution specific options, such as prefix and release type **%cmake** | Configure cmake project with the distribution specific options, such as prefix and release type.
**%cmake_ninja** | Configure cmake project with ninja so it can be used with `%ninja_build`, `%ninja_install` and `%ninja_check` macros.
**%configure** | Runs `./configure` with our `%CONFOPTS%` variable macro. **%configure** | Runs `./configure` with our `%CONFOPTS%` variable macro.
**%make** | Runs the `make` command with the job count specified in `eopkg.conf` **%make** | Runs the `make` command with the job count specified in `eopkg.conf`
**%make_install** | Perform a `make install`, using the `DESTDIR` variant. Should work for the vast majority of packages. **%make_install** | Perform a `make install`, using the `DESTDIR` variant. Should work for the vast majority of packages.
@ -118,13 +122,14 @@ Macro | Description
**%cabal_install** | Runs cabal copy to `$installdir` **%cabal_install** | Runs cabal copy to `$installdir`
**%cabal_register** | Runs cabal register to generate a pkg-config for package and version, then installs the conf file. **%cabal_register** | Runs cabal register to generate a pkg-config for package and version, then installs the conf file.
### Meson Actionable Macros ### Ninja Actionable Macros
Macro | Description Macro | Description
---- | ---- ---- | ----
**%meson_configure** | Runs meson with our CFLAGS and appropriate flags such as libdir. **%meson_configure** | Runs meson with our CFLAGS and appropriate flags such as libdir.
**%meson_build** | Runs ninja and passes our `%JOBS%` variable. **%ninja_build** | Runs ninja and passes our `%JOBS%` variable. This macro obsoletes *%meson_build*.
**%meson_install** | Runs meson install and passed the appropriate `DESTDIR` and `%JOBS%` variable **%ninja_install** | Runs meson install and passed the appropriate `DESTDIR` and `%JOBS%` variable. This macro obsoletes *%meson_install*.
**%ninja_check** | Runs ninja test and passes our `%JOBS%` variable. This macro obsoletes *%meson_check*.
### Perl Actionable Macros ### Perl Actionable Macros
@ -143,6 +148,13 @@ Macro | Description
**%python3_setup** | Runs the build portion of a setup.py using python3. **%python3_setup** | Runs the build portion of a setup.py using python3.
**%python3_install** | Runs the install portion of a setup.py, to the appropriate root, using python3. **%python3_install** | Runs the install portion of a setup.py, to the appropriate root, using python3.
### Ruby Actionable Macros
Macro | Description
---- | ----
**%gem_build** | Runs gem build.
**%gem_install** | Runs gem install with the appropriate parameters.
### Qt Actionable Macros ### Qt Actionable Macros
Macro | Description Macro | Description
@ -150,6 +162,14 @@ Macro | Description
**%qmake** | Runs qmake for Qt5 with the appropriate make flags. **%qmake** | Runs qmake for Qt5 with the appropriate make flags.
**%qmake4** | Runs qmake for Qt4, as well as adding the necessary MOC, RCC, and UIC flags since those Qt4 executables end in -qt4. **%qmake4** | Runs qmake for Qt4, as well as adding the necessary MOC, RCC, and UIC flags since those Qt4 executables end in -qt4.
### Waf Actionable Macros
Macro | Description
---- | ----
**%waf_configure** | Runs waf configure with prefix.
**%waf_build** | Runs waf and passes our `%JOBS%` variable.
**%waf_install** | Runs waf install and passed the appropriate `destdir` and `%JOBS%` variable
### Variable Macros ### Variable Macros
Macro | Description Macro | Description
@ -157,11 +177,13 @@ Macro | Description
**%ARCH%** | Indicates the current build architecture. **%ARCH%** | Indicates the current build architecture.
**%CC%** | C compiler **%CC%** | C compiler
**%CFLAGS%** | cflags as set in `eopkg.conf` **%CFLAGS%** | cflags as set in `eopkg.conf`
**%CONFOPTS%** | Flags / options for configuration, such as `--prefix=/usr`. [Full List.](https://github.com/solus-project/ypkg/blob/master/ypkg2/rc.yml#L127-L130) **%CONFOPTS%** | Flags / options for configuration, such as `--prefix=%PREFIX%`. [Full List.](https://github.com/solus-project/ypkg/blob/master/ypkg2/rc.yml#L230-L233)
**%CXX%** | C++ compiler **%CXX%** | C++ compiler
**%CXXFLAGS%** | cxxflags as set in `eopkg.conf` **%CXXFLAGS%** | cxxflags as set in `eopkg.conf`
**%JOBS%** | jobs, as set in `eopkg.conf` **%JOBS%** | jobs, as set in `eopkg.conf`
**%LDFLAGS%** | ldflags as set in `eopkg.conf` **%LDFLAGS%** | ldflags as set in `eopkg.conf`
**%LIBSUFFIX%** | Library suffix (either 32 for 32-bit or 64 for 64-bit)
**%PREFIX%** | Hard-coded prefix `/usr`
**%YJOBS%** | Job count without `-j` as set in `eopkg.conf` **%YJOBS%** | Job count without `-j` as set in `eopkg.conf`
**%installroot%** | Hard-coded install directory **%installroot%** | Hard-coded install directory
**%libdir%** | The distributions default library directory, i.e. `/usr/lib64` (Alters for `emul32`) **%libdir%** | The distributions default library directory, i.e. `/usr/lib64` (Alters for `emul32`)
@ -180,10 +202,10 @@ Variable | Description
**$CC** | C compiler **$CC** | C compiler
**$CXX** | C++ compiler **$CXX** | C++ compiler
**$EMUL32BUILD** | Set only when compiling in `emul32` mode **$EMUL32BUILD** | Set only when compiling in `emul32` mode
**$workdir** | The work, or source, directory of the package build
**$installdir** | The install directory, i.e. where files are installed to for packaging **$installdir** | The install directory, i.e. where files are installed to for packaging
**$pkgfiles** | Refers to the `./files` directory relative to the `package.yml` file **$pkgfiles** | Refers to the `./files` directory relative to the `package.yml` file
**$sources** | Refers to the directory where your source files are stored e.g. `$sources/nano.tar.gz` **$sources** | Refers to the directory where your source files are stored e.g. `$sources/nano.tar.gz`
**$workdir** | The work, or source, directory of the package build
## Types ## Types

View File

@ -1,36 +0,0 @@
+++
title = "Lazarus IDE"
lastmod = "2017-07-22T14:44:58+03:00"
+++
# Lazarus IDE
[Lazarus](https://www.lazarus-ide.org/) is a Delphi compatible cross-platform IDE for Rapid Application Development. It has variety of components ready for use and a graphical form designer to easily create complex graphical user interfaces.
## Getting Started
Make sure you have the necessary packages installed:
``` bash
sudo eopkg upgrade
sudo eopkg install lazarus
```
### Installing FPC Source
First, determine the version of `fpc` that you have installed:
``` bash
fpc -h
```
Now go to [FreePascal on SourceForge](https://sourceforge.net/projects/freepascal/files/Source/) and download the corresponding archive `fpc-<version>.source.tar.gz`.
Once you have the archive, unpack it into a directory of your choosing by using either the `tar` command or a graphical program. This tutorial uses `~/Development/fpc-3.0.2` to store the source files.
Now that you have the source files, open **Lazarus IDE**. You should be presented with a window like this one:
{{< altimg "lazarus_config.png" "help-center/software/lazarus/" >}}
From the ***FPC Sources*** tab, ***Browse*** to the directory where you unpacked the source. Confirm your selection and then press ***Start IDE***.
That's it! You are now ready to use Lazarus IDE to develop GUI applications.

View File

@ -1,12 +1,35 @@
+++ +++
title = "VirtualBox" title = "VirtualBox"
lastmod = "2018-02-24T22:30:00+02:00" lastmod = "2018-04-19T19:30:00+02:00"
+++ +++
# VirtualBox # VirtualBox
[VirtualBox](https://virtualbox.org) is an x86 virtualization software package developed by Oracle. [VirtualBox](https://virtualbox.org) is an x86 and x86_64 virtualization software package developed by Oracle.
## Determine which kernel you are using
## Before you start
This section applies to new installations for both **Host** and **Guest**.
### Remove prior installation
It is important to uninstall any version of VirtualBox (or VirtualBox Guest Additions) that **was not** installed from the Software Center or there will be conflicts that will prevent the application to work.
This can usually be done by executing the following command from a terminal:
``` bash
sudo /opt/VirtualBox/uninstall.sh
```
### Update your system
Ensure your system is up-to-date. This is very important because VirtualBox installs some kernel modules and the application will not work if your kernel is outdated.
``` bash
sudo eopkg upgrade
```
### Determine which kernel you are using
Solus support both a `current` and `lts` kernel. It is important to install the version that corresponds to your kernel. Solus support both a `current` and `lts` kernel. It is important to install the version that corresponds to your kernel.
@ -16,7 +39,8 @@ If you aren't sure which kernel you are running, run the following in terminal:
uname -r uname -r
``` ```
You will either have a `.current` or `.lts` suffix. Examples: `4.13.12-32.current` or `4.9.61-57.lts` You will either have a `.current` or `.lts` suffix. Examples: `4.15.15-63.current` or `4.9.92-85.lts`
## Solus as Host ## Solus as Host
@ -24,9 +48,9 @@ VirtualBox is available in the Software Center, select the package that matches
virtualbox | virtualbox-current virtualbox | virtualbox-current
----- | ----- ----- | -----
VirtualBox modules for the **linux-lts** kernel | VirtualBox modules for the **linux-current** kernel VirtualBox Host modules for the **linux-lts** kernel | VirtualBox Host modules for the **linux-current** kernel
You **must** reboot your computer before running VirtualBox for the first time You **must** reboot your computer before running VirtualBox for the first time.
### Troubleshooting ### Troubleshooting
@ -37,73 +61,24 @@ The Error `Kernel driver not installed (rc=-1908)` may occur if
- The computer was not restarted before launching VirtualBox for the first time - The computer was not restarted before launching VirtualBox for the first time
- The computer is not booted on the latest kernel. Make sure to apply the updates from the Software Center and restart your machine. - The computer is not booted on the latest kernel. Make sure to apply the updates from the Software Center and restart your machine.
- The wrong VirtualBox package was installed. Please check the instructions just above to install the correct package for your kernel. - The wrong VirtualBox package was installed. Please check the instructions just above to install the correct package for your kernel.
- VirtualBox was manually installed and it conflicts with the version installed from the Solus Repository. The below commands usually help solving this last problem. - VirtualBox was manually installed and it conflicts with the version installed from the Solus Repository.
``` bash
sudo /opt/VirtualBox/uninstall.sh
eopkg li | grep virtualbox | awk '{print $1}' | xargs sudo eopkg it --reinstall
sudo reboot
```
## Solus as Guest ## Solus as Guest
### Preparing your system VirtualBox Guest Additions are available in the Software Center, select the package that matches kernel version on the Solus virtual machine.
Before you start, ensure your all packages are up-to-date on the virtual machine
``` bash virtualbox-guest | virtualbox-guest-current
sudo eopkg upgrade ----- | -----
``` VirtualBox Guest modules for the **linux-lts** kernel | VirtualBox Guest modules for the **linux-current** kernel
For using VirtualBox, it is important to install the correct headers for your kernel You **must** reboot your virtual machine to load the newly installed modules
If you have a **lts** kernel, install the lts headers
``` bash ## Extra configuration
sudo eopkg install linux-lts-headers
```
If you have a **current** kernel, installing the current headers
``` bash
sudo eopkg install linux-current-headers
```
Make sure you have the necessary packages installed
``` bash
sudo eopkg install gcc make autoconf binutils xorg-server-devel libelf-devel
```
Reboot the virtual machine.
### Install the Guest Additions
Now install the **Guest Additions** : from the VirtualBox menu `Devices` -> `Insert Guest Additions CD image...`
On the guest Machine, open `Files` and click on the optical drive icon (CD name starts with VBOXADDITIONS) then click on the `Run Software` button and follow the on screen instructions.
{{< altimg "autorun.png" "help-center/software/virtualbox/" >}}
**Note:** For each kernel update you will need to rebuild the VirtualBox Modules. So simply remount the ISO and run the instructions again.
### Virtual machine settings
Here is a brief overview on some options you may want to set (you can only do it when your virtual machine is not running).
Select your guest machine and click on the Settings icon.
#### Clipboard Sharing, Drag & Drop
By default, Clipboard Sharing and Drag'n'Drop are disabled, you can change this in `General` -> `Advanced`
{{< altimg "vbox-clipboard.png" "help-center/software/virtualbox/" >}}
#### Number of CPU
Virtual machines are created with only 1 CPU. You can change this in
`System` -> `Processor`
#### 3D Acceleration
For better performances, it is strongly recommended to enable 3D Acceleration in `Display` -> `Screen`
#### USB Controller #### USB Controller
If you have installed the [extension pack](https://www.virtualbox.org/manual/ch01.html#intro-installing) and your hardware supports it, you set the USB Controller to USB 2.0 or 3.0, in `USB` If you want to use USB 2.0 or 3.0 in your virtual machine (and your hardware supports it), you have to install the [extension pack](https://www.virtualbox.org/manual/ch01.html#intro-installing).
Note: Access to USB is granted by the user group `vboxusers` on the **Host** operating system. You can add yourself to this group with the following command Note: Access to USB is granted by the user group `vboxusers` on the **Host** operating system. You can add yourself to this group with the following command
@ -112,12 +87,13 @@ sudo usermod -aG vboxusers `whoami`
``` ```
#### Shared Folders #### Shared Folders
You can share folders from the Host to the Guest in `Shared Folders` Share folders let you access files from the host system from within a guest machine.
**Note:** auto-mounted shared folders are mounted into the `/media` directory, along with the prefix `sf_`. For example, the shared folder `myfiles` would be mounted to `/media/sf_myfiles`. Access to auto-mounted shared folders is only granted to the user group `vboxsf` on the Guest operating system. **Note:** auto-mounted shared folders are mounted into the `/media` directory, along with the prefix `sf_`. For example, the shared folder `myfiles` would be mounted to `/media/sf_myfiles`.
Access to the shared folders is only granted to the user group `vboxsf` on the **Guest** operating system.
Execute these commands to set the permissions and add yourself to the group Execute these commands to set the permissions and add yourself to the group
``` bash ``` bash
sudo chmod 755 /media
sudo usermod -aG vboxsf `whoami` sudo usermod -aG vboxsf `whoami`
``` ```