developer:nethserver_7_kickstart

# NethServer 7 kickstart

## Prerequisites

Install NethServer 7. Refer to [Administrator manual](http://docs.nethserver.org).

## Developer environment

If you want to create a developer environment, first install mock configuration:

```

# yum install nethserver-mock

```

Create a normal user, member of the ``mock`` group:

useradd filippo
usermod -a -G mock filippo
passwd filippo

## GitHub-based workflow

[Fork a repository](https://help.github.com/articles/fork-a-repo/) from [NethServer on GitHub](https://github.com/NethServer?utf8=%E2%9C%93&query=nethserver-). For instance, ``nethserver-directory``.

After a logout and login as a normal user, clone locally your freshly forked repository: ``` git config –global credential.helper cache git clone https://github.com:filippo/nethserver-directory.git ```

Enter the ``nethserver-directory`` dir, review the specfile looking for common issues and try to build the RPM.

``` $ cd nethserver-directory $ make-rpms nethserver-directory.spec ```

If everything is OK, you obtain two (or more) RPMs in the current directory:

``` $ ls -1 *.rpm nethserver-directory-2.2.0-1.1.ga90636c.ns7.noarch.rpm nethserver-directory-2.2.0-1.1.ga90636c.ns7.src.rpm ```

Switch to the root account and try to install the “noarch” RPM.

``` # yum localinstall ~davidep/nethserver-directory/nethserver-directory-2.2.0-1.1.ga90636c.ns7.noarch.rpm ```

## File a bug

As usual, if an error occurs during the RPM build or installation, check if the problem has been reported:

* See if a similar problem is listed on [v7 milestone](https://github.com/NethServer/dev/milestones/v7) or a [Pull Request](https://github.com/pulls?user=NethServer) has been opened

* Search the [development](http://community.nethserver.org/c/development) and [bug](http://community.nethserver.org/c/bug) categories. We use the tag ``v7``.

* Ask for help on community, opening a new topic [on development category](http://community.nethserver.org/c/development) and adding the tag ``v7``

If you are sure the problem has never been found, file a new issue on
https://github.com/NethServer/dev/issues/new

* Build errors are usually written to ``build.log`` file, in your current working directory. Search for relevant error messages inside ``build.log``. * Installation/Dependency errors are written to standard output

``` [TODO add example] ```

## Fix the bug

If you found the solution for a bug, share it! First of all, check if the git repository has a ``v7`` pacakge:

``` $ cd nethserver-directory $ git branch * master ```

If the ``v7`` branch has not been created yet, simply ignore the next step. Otherwise checkout it:

``` $ git branch * master

v7

$ git checkout v7 ```

Then you're ready to write down the bug solution. Commit, push to your fork repository then [create a pull request](https://help.github.com/articles/creating-a-pull-request/) for the ``v7`` branch (not master). Remeber to add a reference to the issue in the pull request description. For instance

``` The bug was caused by this and that

Refs NethServer/dev#5000 ```

## Common issues

When editing the ``.spec`` file

1. [Remove ``AutoReq: no``](https://github.com/NethServer/nethserver-firewall-base/commit/60060df96fb0f4b312e00d722a69f59748528cb4) 2. [Claim ownership of ``<package>-update`` event](https://github.com/NethServer/nethserver-firewall-base/commit/a4228b540cf0ffb22ccbb7a6626182c13616e6b5) 3. [Claim ownership of e-smith databases](https://github.com/NethServer/nethserver-firewall-base/commit/0eca5d38e317d083bea6147079c7825af039efff) 4. [Use %{buildroot} macro in .spec file](https://github.com/NethServer/nethserver-firewall-base/commit/0b8a95a83264ff5b689402465f61256268b46aea) 5. [Use %{genfilelist} macro in .spec file](https://github.com/NethServer/nethserver-firewall-base/commit/0b8a95a83264ff5b689402465f61256268b46aea)

When running ``make-rpms``, ``mock`` complains of ``localtime`` and prints the following line:

``` IOError: [Errno 21] Is a directory: '/etc/localtime' ```

To fix this issue, run:

rm -f /etc/localtime
ln -sf /usr/share/zoneinfo/Europe/Rome /etc/localtime
  • developer/nethserver_7_kickstart.txt
  • Last modified: 2017/02/07 04:13
  • by Davide Principi