Good morning, @stephdl. Thank you for your contribution.
I was trying to replicate your project, but I am encountering the following issue when compiling it.
I’m not proficient, and I have recently started exploring this fantastic world.
From reading various posts, I understood that I should not compile with the “root” user. With which user should I perform the operations: ./prep-sources and make-rpms *.spec?
[root@nethsecurity nethserver-cybersecurity]# sudo make-rpms *.spec
prep-sources [INFO] source0 git archive: nethserver-cybersecurity-0.0.0.tar.gz
INFO: mock.py version 2.17 starting (python version = 3.6.8, NVR = mock-2.17-1.e l7)...
Start(bootstrap): init plugins
INFO: selinux disabled
Finish(bootstrap): init plugins
Start: init plugins
INFO: selinux disabled
Finish: init plugins
INFO: Signal handler active
Start: run
INFO: Start(nethserver-cybersecurity.spec) Config(nethserver-7-x86_64)
Start: clean chroot
Finish: clean chroot
Start(bootstrap): chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled package manager cache
Start(bootstrap): cleaning package manager metadata
Finish(bootstrap): cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 2.17
INFO: Mock Version: 2.17
Finish(bootstrap): chroot init
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
Start: unpacking root cache
Finish: unpacking root cache
INFO: enabled package manager cache
Start: cleaning package manager metadata
Finish: cleaning package manager metadata
INFO: enabled HW Info plugin
Mock Version: 2.17
INFO: Mock Version: 2.17
Start: yum update
Failed to create directory /var/lib/mock/nethserver-7-x86_64-bootstrap/root//sys/fs/selinux: Read-only file system
Failed to create directory /var/lib/mock/nethserver-7-x86_64-bootstrap/root//sys/fs/selinux: Read-only file system
Failed to set locale, defaulting to C
Finish: yum update
Finish: chroot init
Start: buildsrpm
Start: rpmbuild -bs
Failed to create directory /var/lib/mock/nethserver-7-x86_64/root//sys/fs/selinux: Read-only file system
Failed to create directory /var/lib/mock/nethserver-7-x86_64/root//sys/fs/selinux: Read-only file system
error: Bad file: /builddir/build/SOURCES/nethserver-cybersecurity.tar.gz: No such file or directory
Bad file: /builddir/build/SOURCES/nethserver-cybersecurity.tar.gz: No such file or directory
Building target platforms: x86_64
Building for target x86_64
RPM build errors:
Finish: rpmbuild -bs
Finish: buildsrpm
ERROR: Exception(nethserver-cybersecurity.spec) Config(nethserver-7-x86_64) 1 minutes 59 seconds
INFO: Results and/or logs in: .
INFO: Cleaning up build root ('cleanup_on_failure=True')
Start: clean chroot
Finish: clean chroot
ERROR: Command failed:
# /usr/bin/systemd-nspawn -q -M 2f12e32a6dd74ed1aa3a791483aa5567 -D /var/lib/mock/nethserver-7-x86_64/root -a -u mockbuild --capability=cap_ipc_lock --bind=/tmp/mock-resolv.1eom65se:/etc/resolv.conf --bind=/dev/btrfs-control --bind=/dev/loop-control --bind=/dev/loop0 --bind=/dev/loop1 --bind=/dev/loop2 --bind=/dev/loop3 --bind=/dev/loop4 --bind=/dev/loop5 --bind=/dev/loop6 --bind=/dev/loop7 --bind=/dev/loop8 --bind=/dev/loop9 --bind=/dev/loop10 --bind=/dev/loop11 --setenv=TERM=vt100 --setenv=SHELL=/bin/bash --setenv=HOME=/builddir --setenv=HOSTNAME=mock --setenv=PATH=/usr/bin:/bin:/usr/sbin:/sbin --setenv=PROMPT_COMMAND=printf "\033]0;<mock-chroot>\007" --setenv=PS1=<mock-chroot> \s-\v\$ --setenv=LANG=C.UTF-8 bash --login -c /usr/bin/rpmbuild -bs --target x86_64 --nodeps /builddir/build/SPECS/nethserver-cybersecurity.spec
Info
[root@nethsecurity nethserver-cybersecurity]# yum info nethserver-mock
Loaded plugins: changelog, copr, nethserver_events
Installed Packages
Name : nethserver-mock
Arch : noarch
Version : 1.6.3
Release : 1.ns7
Size : 71 k
Repo : installed
From repo : /nethserver-mock-1.6.3-1.ns7.noarch
Summary : RPM build automation scripts for NethServer packages
URL : http://www.nethserver.org
License : GPLv3
Description : Provides build automation scripts for NethServer packages