Nethserver on Raspberry Pi

,

great!
added nethserver-devtools and nethserver-mock, installation went fine… keep us informed. tnx

I’m surprised too, thanks for starting this compelling topic! There are many amazing people around here :dragon:

Just rebuilt my mock cache, all seems good so far.
EDIT:

http://mirror.framassa.org/nethpi/7/base/armhfp/repodata/repomd.xml: [Errno 14] HTTP Error 504 - Gateway Timeout

I’ll try to review mock.cfg in the weekend, I’d like to add it to the wiki page.
Next step: cross compilation. Anyone has experience in this matter?

yes server is down, i hope to check it in the afternoon sorry :frowning:

EDIT:
@filippo_carletti can you try now? tnx

This is great!

Not on CentOS and the like. Centos has a cross compiler package, but i can’t figure out to build a tool chain.
If there is a mock.cfg to make nethserver-packages om arm, i’ll think a arm devel-setup will do. the packages are relativlie small. I was looking in to it bçause under some circumstances build dependancies can be met by the build-host (i.e you need this in your tool chain, x86 lib will do)

BTW i think they are done (re)building the hole epel repo; today the repodata showed up in the devel repo’s

That’s critical, we need epel packages for many modules.

Here’s my mock cfg. Put it in /etc/mock/ and set

mockcfg=nethserver-7-armhfp

/etc/mock/nethserver-7-armhfp.cfg

#
# NethServer 7 armhfp mock configuration 
#

import string

distroversion = '7.2.1511'
releasever = distroversion.split('.')[0]

config_opts['target_arch'] = 'armhfp'
config_opts['legal_host_arches'] = ('armv7l')
config_opts['root'] = 'nethserver-%s-armhfp' % releasever
config_opts['chroot_setup_cmd'] = ('install', 'bash', 'util-linux-ng', 'rpm-build', 'gcc', 'gcc-c++', 'make', 'python', 'which')
config_opts['plugin_conf']['ccache_enable'] = False

config_opts['macros']['%url_prefix'] = 'http://github.com/NethServer'
config_opts['macros']['%vendor'] = 'NethServer'
config_opts['macros']['%dist'] = 'ns7'

# Substitute $releasever and $basearch:
config_opts['yum.conf'] = string.Template("""
[main]
cachedir=/var/cache/yum
debuglevel=1
logfile=/var/log/yum.log
reposdir=/dev/null
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
plugins=1
ui_repoid_vars=1
http_caching=none

[base]
name=CentOS-$releasever - Base
enablegroups=0
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
baseurl=http://mirror.centos.org/altarch/$releasever/os/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32

#released updates 
[updates]
name=CentOS-$releasever - Updates
enablegroups=0
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
baseurl=http://mirror.centos.org/altarch/$releasever/updates/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
enablegroups=0
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
baseurl=http://mirror.centos.org/altarch/$releasever/extras/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
enablegroups=0
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
baseurl=http://mirror.centos.org/altarch/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
       file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-AltArch-Arm32

#
# nethserver-arm YUM repositories configuration
#

[nethserver-base]
name=NethServer $distroversion-arm base 
#mirrorlist=http://mirrorlist.nethserver.org/
baseurl=http://mirror.framassa.org/nethpi/$releasever/base/$basearch
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethServer-$releasever
gpgcheck=0
enabled=1
enablegroups=1

[nethserver-updates]
name=NethServer $distroversion-arm updates
#mirrorlist=http://mirrorlist.nethserver.org/
baseurl=http://mirror.framassa.org/nethpi/$releasever/updates/$basearch
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethServer-$releasever
gpgcheck=0
enabled=1
enablegroups=1

[nethserver-testing]
name=NethServer $distroversion-arm testing
#mirrorlist=http://mirrorlist.nethserver.org/
baseurl=http://mirror.framassa.org/nethpi/$releasever/testing/$basearch
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethServer-$releasever
gpgcheck=0
enabled=0
enablegroups=0

[epel]
#Temporary placeholder for missing epel repositories
name=NethServer $distroversion-arm placeholder for epel
#mirrorlist=http://mirrorlist.nethserver.org/
baseurl=http://mirror.framassa.org/nethpi/$releasever/ns-epel/$basearch
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-NethServer-$releasever
gpgcheck=0
enabled=1
enablegroups=0

#[epel]
#name=Extra Packages for Enterprise Linux $releasever - $basearch
##baseurl=http://download.fedoraproject.org/pub/epel/$releasever/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-$releasever&arch=$basearch
#failovermethod=priority
#enabled=1
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$releasever

""").substitute(distroversion=distroversion, releasever=releasever, basearch=config_opts['target_arch'], infra='stock')
5 Likes

If anyone interested, we can also try the build infrastructure from CentOS for arm64: http://cbs.centos.org/koji/hosts

Ran out of hardware to test this (monitoring install’s with munin)

Could not resist and bought a PI3, gone have a go soon :slight_smile:

1 Like

LOL me too yesterday… :grin: Also because tomorrow I must return the rpi2 i’m using for testing to my friend

@jackyes CentOS still uses the “noob” config.txt, under-clocking the rpi3 on 700 MHz.
Do you know moderate (stable) settings for clock/core/dram and the like?

@dz00te @giacomo hesitated long to get a RPI3 because an eye on this:
http://www.hardkernel.com/main/products/prdt_info.php?g_code=G145457216438

My pi3 stabile at 1300mhz, SDRAM freq 400 overvolt 2. More than this became unstable.
On my friends pi 1400mhz,SDRAM freq 500 ,overvolt 6 without problem.
Try a mid valute from these settings :smile:

After that, to increase performance set the scaling governor to “ondemand” or “performance”:

echo “ondemand” |sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

If set on demand, change the up thresold limit from 95 to 60:

echo 60 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold

With this the CPU freq go up when the CPU load is more of 60%.

This can greatly improve the performance of the pi :wink:

It’s a good idea to use a heatsink because the temp go up much more than the older pi :wink:

This is very cool!!

The Good news is it does build Nethserver packages :slight_smile:

Bad new is I can’t get them installed :disappointed:

Transaction check error:
  file /usr/sbin from install of nethserver-release-7arm-0.1.24.ge946f89.ns7.noarch conflicts with file from package filesystem-3.2-18.el7.armv7hl

Did not change much just two typo’s messages.

EDIT:
EDIT 2: fixed this fault in spec file and installed successful :slight_smile:
Trying to build a new nethserver-mock for arm threw up this:

DEBUG util.py:468:  Executing command: ['btrfs', 'subv', 'list', '/var/lib/mock'] with env {'LANG': 'C', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell Fa$
DEBUG util.py:393:  ERROR: can't perform the search - Inappropriate ioctl for device

Any clues? (I saw mock message selinux enabled could that be a clue???)

The package contains the /usr/sbin directory inside the %file section, you should remove it.
Please paste the spec file :wink:

Odd, i have used this spec file from the beginning…

%define distroversion 7.2.1511
%define distrorelease alpha2

Summary: NethServer YUM repo configuration
Name: nethserver-release
Version: 7arm
Release: 0.1%{?dist}
License: GPL
BuildArch: noarch
Source: %{name}-%{version}.tar.gz
URL: %{url_prefix}/%{name}

BuildRequires: nethserver-devtools

%description
NethServer YUM repository configuration

%prep
%setup

%build
perl createlinks
echo %{distroversion} > root/etc/yum/vars/distroversion
echo %{distroversion} > root/etc/e-smith/db/configuration/force/sysconfig/Version
echo %{distrorelease} > root/etc/e-smith/db/configuration/force/sysconfig/Release
echo "NethServer release %{distroversion} (%{distrorelease})" > root/etc/%{name}
%{__install} -d root/%{_nseventsdir}/%{name}-update

%install
rm -rf %{buildroot}
(cd root   ; find . -depth -not -name '*.orig' -print  | cpio -dump %{buildroot})
%{genfilelist} %{buildroot} > %{name}-%{version}-%{release}-filelist

%files -f %{name}-%{version}-%{release}-filelist
%defattr(-,root,root)
%doc COPYING
%config(noreplace) /etc/yum.repos.d/NethServer.repo
%dir %{_nseventsdir}/%{name}-update

%changelog
.....

Are you using nethserver-mock and nethserver-devtools from @dz00te repo with my mock.cfg file?
I think you don’t need to rebuild nethserver-mock, it’s noarch.

yes

just did this for test exercise (added your mock.cfg)

The nethserver-devtools provides the genfilelist script and the one from ns6 branch wants to own any directory, like /usr/sbin. On ns7 I’ve fixed its behaviour. Could you check the nethserver-devtools version that is downloaded during mock builds?

Mine is nethserver-devtools-1.1.4-1.5.ga337344.ns7.noarch.

here to;

==================================================================================
Package Arch Version Repository Size

Installing:
nethserver-devtools noarch 1.1.4-1.5.ga337344.ns7 nethserver-base 21 k
Installing for dependencies:
freetype armv7hl 2.4.11-11.el7 base 345 k
jbigkit-libs armv7hl 2.0-11.el7 base 44 k
libjpeg-turbo armv7hl 1.2.90-5.el7 base 115 k
libtiff armv7hl 4.0.3-14.el7 base 156 k
libwebp armv7hl 0.3.0-3.el7 base 150 k
python-docutils noarch 0.11-0.2.20130715svn7687.el7 base 1.5 M
python-pillow armv7hl 2.0.0-19.gitd1c6db8.el7 base 419 k

Transaction Summary

Install 1 Package (+7 Dependent packages)

Total size: 2.7 M
Installed size: 9.1 M

No build failures in the logs, cleaning up the chroot has an error (tail root.log)

DEBUG util.py:468:  Executing command: ['btrfs', 'subv', 'list', '/var/lib/mock'] with env {'LANG': 'C', 'TERM': 'vt100', 'SHELL': '/bin/sh', 'HOSTNAME': 'mock', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin'} and shell Fa$
DEBUG util.py:393:  ERROR: can't perform the search - Inappropriate ioctl for device
DEBUG util.py:393:  ERROR: can't get rootid for '/var/lib/mock'
DEBUG util.py:515:  Child return code was: 1

(logs and faulty package : https://drive.google.com/file/d/0B4zCoP0frJBBMmYxa3VFWmp6aDg/view?usp=sharing)

rather puzzling… I must try to reproduce it! :grimacing: