Getting savapage running on pi with nethserver

Hi I’m in the process of trying to bring some of the various software solutions currently running on nethserver to the RPI version I’m starting with sava page.

So far ive followed the steps for Arm development setup for NS7 (how to get started)

changing the steps for nano to use this package from mrmarkuz repo in compiling

next i installed the dependencies nethserver-avahi and nethserver-cups
and installed the nethserver-savapage package that was compiled everything installed fine but I’m thinking that some settings need to be manually configured i did look at userguide:savapage but not sure what to configure as this is new to me i thought id open this topic to ask for suggestions

2 Likes

Great work, would be nice if we could release savapage for arm.

It should be possible to use the browser to configure savapage:

https://wiki.nethserver.org/doku.php?id=savapagemodule

Link to recent (unfortunately untested) PR:

1 Like

just for reference savapage forum topic on single board computer

1 Like

@Shane_Treweek, you picked a challenging package to port to armhfp :grinning:

A few tips/observations : the savapage-setup-1.4.0-rc-linux-x64.bin is actually a (self extracting?) gzip.

I would start by unpacking that and identify the real ach depended "bin"s,
they ( savapage-nss and savapage-pam) can be found in:
\savapage\server\bin\

and ( savapage-cups-notifier) in:
savapage\providers\cups\linux-x64\

maybe on more places though,
I think this repository gives some clues how it’s packaged:

2 Likes

@mrmarkuz actually SavaPage 1.3.0 released also see https://www.savapage.org/download/installer/

2 Likes

to build the (cpp) binaries…

(from bash history, so hope did not forget something)
make a build chroot which can be resused

sudo cp /etc/mock/nethserver-7-armhfp.cfg /etc/mock/savapage-7-armhfp.cfg

sudo nano /etc/mock/savapage-7-armhfp.cfg

change the chroot name

....
config_opts['root'] = 'savapage-7-armhfp'
....

now we ready to go

mock -r savapage-7-armhfp --init
mock -r savapage-7-armhfp --install libstdc++-static cups-devel pam-devel git nano

log into chroot and go to home dir and make a dir (build) for the results

mock -r savapage-7-armhfp --shell --enable-network
cd && pwd
mkdir build

cloning git repo’s

git clone https://gitlab.com/savapage/xmlrpcpp.git 
git clone https://gitlab.com/savapage/savapage-cups-notifier.git 
git clone https://gitlab.com/savapage/savapage-nss.git 
git clone https://gitlab.com/savapage/savapage-pam.git

mkdir build

build xmlrpcpp first, it is dependency for savapage-cups-notifier
(it gets statically-linked so we do not need the result of xmlrpcpp)

cd xmlrpcpp/
make all

then what you need:

cd ../savapage-cups-notifier/
make all
cp target/savapage-notifier ~/build

cd ../savapage-nss/
make all
cp target/savapage-nss ~/build/

cd ../savapage-pam/
make all
cp target/savapage-pam ~/build/

exit

get the results

mock -r savapage-7-armhfp --copyout /builddir/build/ $(pwd)/build

Hope it works for you…

2 Likes

Thanks I’ll try compiling tonight

2 Likes

I hacked something together which seems to install

yum install nethserver-avahi nethserver-postgresql nethserver-cups
yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel \
poppler-utils ImageMagick binutils which gzip perl avahi-tools \
shadow-utils
getent group savapage >/dev/null || groupadd -r savapage
getent passwd savapage >/dev/null || \
useradd -r -g savapage -d /opt/savapage -s /bin/bash \
-c "Savapage user" savapage

mkdir -p /opt/savapage
chown savapage:savapage /opt/savapage

download the arm savapage setup bin to /opt/savapage and install it with

chmod +x savepage-setup....
chown savapage:savapage savepage-setup...
su savapage -c ./savepage-setup....

As said it is a kind of hacked…
If it works we (you :grinning:) need to makeup some build strategy for it.

2 Likes

i should be able to automate the install with a script (im also in the process of writing a script to automate the build from source then create folder structure and upload to repo and refresh so you just need to input name of package and location of source) but so far so good not fully tested but results look promising

2 Likes

what about packaging the 3 (arch depended) binaries in rpm’s who are installing those in /opt/savapage-bin-armv7l/ (or something like that) ?

These rpm’s would be pure a build-requirement for the armv7l savapage setup bin.

This would eliminate the need to build those manually (other then make-rpms savapage-notifier.spec)
As they get installed in a predictable place they can be used by a x84 > armv7l conversion script.

2 Likes

The resulting binaries get installed in /opt/savapage-bin-%{_target}/ which on arm 32bit expands to /opt/savapage-bin-armv7l-linux/

2 Likes

Lets ping @rijkr
Do you have any suggestions on this Rijk? thanks!

2 Likes

There was already some discussion on the SavaPage Community forum and I saw that the build and install of the arm variant was successful. I’m not familiar with how SavaPage is fitted into NethServer, but if you need something extra in SavaPage to facilitate the integration of the arm (cpp) binaries, please let me know.

5 Likes

just wanted to point out incase it’s not installed you may need the following

sudo yum install cups-devel.armv7hl pam-devel make gcc

2 Likes

Yes if you build on the host. :wink:

Note if you build on the host-system you build against the libraries ( cups-devel, pam-devel) from the host-distro which may differ from the target distro (ie Fedora as host el7 as target)

Personally prefer to build in a clean build-chroot isolated from my host,
And that is what mock does, it sets up a (systemd-nspawn) container to build the packages :grinning:

2 Likes

That makes sense I ran into an issue using mock for some reason it says git not available

Can it be you forgot ---enable-network ?

I got following warning when using make-rpms but I think it can be ignored.

prep-sources [WARNING] git not installed, or git repository not found!

2 Likes

still haven’t had a chance to build the package but i noticed every time the server restarts or you issue systemctl daemon-reload
savapage.service is not loaded

my work around is as follows

change /usr/lib/systemd/system/savapage.service
to

This
#
# This file is part of the SavaPage project <https://www.savapage.org>.
# Copyright (c) 2011-2018 Datraverse B.V.
# Author: Rijk Ravestein.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
#
# For more information, please contact Datraverse B.V. at this
# address: info@datraverse.com
#
[Unit]
Description=SavaPage Open Print Portal
After=network.target cups.service

[Service]
Type=forking
PIDFile=/opt/savapage/server/logs/service.pid
User=savapage
Group=savapage
LimitNOFILE=65536
ExecStart=/opt/savapage/server/bin/linux-armv7l/app-server start
ExecStop=/opt/savapage/server/bin/linux-armv7l/app-server stop
Restart=on-success

[Install]
WantedBy=multi-user.target

# end-of file

Not sure if the permission was already set to this but in case it wasn’t
chmod 644 /usr/lib/systemd/system/savapage.service
chown root:root /usr/lib/systemd/system/savapage.service
then symlink
ln -s /usr/lib/systemd/system/savapage.service /etc/systemd/system/multi-user.target.wants/savapage.service
then enable
cd /etc/systemd/system/ && systemctl enable savapage.service
reboot

systemctl status savapage
● savapage.service - SavaPage Open Print Portal
   Loaded: loaded (/usr/lib/systemd/system/savapage.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 1970-01-01 10:00:15 AEST; 51 years 8 months ago
  Process: 700 ExecStart=/opt/savapage/server/bin/linux-armv7l/app-server start (code=exited, status=0/SUCCESS)
 Main PID: 1245 (java)
   CGroup: /system.slice/savapage.service
           ├─1245 java -server -XX:+PrintGCDetails -XX:+PrintGCApplic...
           ├─3810 /usr/lib/libreoffice/program/soffice.bin -accept=so...
           └─3838 /usr/lib/libreoffice/program/soffice.bin -accept=so...
[truncated]

and `systemctl daemon-reload’

systemctl status savapage
● savapage.service - SavaPage Open Print Portal
   Loaded: loaded (/usr/lib/systemd/system/savapage.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 1970-01-01 10:00:15 AEST; 51 years 8 months ago
  Process: 700 ExecStart=/opt/savapage/server/bin/linux-armv7l/app-server start (code=exited, status=0/SUCCESS)
 Main PID: 1245 (java)
   CGroup: /system.slice/savapage.service
           ├─1245 java -server -XX:+PrintGCDetails -XX:+PrintGCApplic...
           ├─3810 /usr/lib/libreoffice/program/soffice.bin -accept=so...
           └─3838 /usr/lib/libreoffice/program/soffice.bin -accept=so...
[truncated]

P.S. ignore the part about running for 51 years i changed the ntp to a government one and didnt configure the authentication correctly and said my server date was in the 1970s now it’s working right it says it’s been running for 51years