Problem while making rpm

Hi all,
I’m trying to setup environment to build MsSQL package. I’m starting with creating default db but make-rpms fails with this error:

RPM build errors:
Directory not found: /builddir/build/BUILDROOT/nethserver-mssql-1.0.0-1.ns7.x86_64/etc/e-smith/events/nethserver-mssql-update
Finish: rpmbuild nethserver-mssql-1.0.0-1.ns7.src.rpm
Finish: build phase for nethserver-mssql-1.0.0-1.ns7.src.rpm
ERROR: Exception(nethserver-mssql-1.0.0-1.ns7.src.rpm) Config(nethserver-7-x86_64) 0 minutes 34 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 7045d7a573e741f0aae6ae32576a94bb -D /var/lib/mock/nethserver-7-x86_64/root -a --capability=cap_ipc_lock --bind=/tmp/mock-resolv.6kvjgeij:/etc/resolv.conf --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 -u mockbuild bash --login -c /usr/bin/rpmbuild -bb --target x86_64 --nodeps /builddir/build/SPECS/nethserver-mssql.spec

Code is available here:
Can someone help me?

/cc: @giacomo @davidep

I don’t run it any more. If you have Fedora, you could try nethserver-makerpms.

I’m obtaining the same error :confused:

no tested but I cannot see a tag inside GH, please take care to commit and make a first tag

git tag 1.0.0
git push master --follow-tags

The command is


no dash inside :wink:

Yes, I used it. But it returns the same error.
I tried to tag, but nothing…

The error can’t be the same: systemd-nspawn is the evidence of a mock run.

Try to create the directory structure with some database defaults, the error should go away.

I solved. There was an error into createlinks file ($event instead of my $event). Now it works.
But I have a question: why nethserver-mssql-update is not executed after installation of package?
If I launch manually the event it works fine and create db properly.

The event will be fired only if the event directory is owned by the package.
You can check with rpm -ql nethserver-hotsync.

[root@testing nethserver-mssql]# rpm -ql nethserver-mssql

Manually it works. I’m missing something into .spec file?

The directory is there, so it should work. Just proceed with the work, we will solve this little issue after the Christmas holidays! :wink:

1 Like

Did you manage to fix the problem?

Event works fine if I launch it from CLI, but after install is not launched automatically.

1 Like

The event has been correctly fired on my machine:

Dec 19 21:55:29 test yum[9444]: Installed: nethserver-mssql-1.0.0-1.ns7.noarch
Dec 19 21:55:37 test esmith::event[9560]: Event: nethserver-mssql-update
Dec 19 21:55:37 test esmith::event[9560]: Migrating existing database configuration
Dec 19 21:55:37 test /etc/e-smith/events/nethserver-mssql-update/S00initialize-default-databases[9562]: /var/lib/nethserver/db/configuration: OLD squid=service|BlueMode|manual|BypassDomains||DiskCache|disabled|DiskCacheSize|100|GreenMode|manual|KrbPrimaryList|HTTP|KrbStatus|enabled|MaxObjSize|4096|MemCacheSize|256|MinObjSize|0|NoCache||ParentProxy||PortBlock|disabled|PortRedirect||SafePorts||TCPPorts|3128,3129,3130|access|green|status|enabled
Dec 19 21:55:38 test esmith::event[9560]: Event: nethserver-mssql-update SUCCESS

Make sure that NethServer yum plugin is enabled inside /etc/yum/pluginconf.d/nethserver_events.conf.

1 Like

Giacomo, I think you are right. My tests on HotSync I think have disabled nethserver-events :smiley:

When you are free, can you try the first rpm and tell me if it works and a sort of to-do on rpm.
You have some notes in PM for RPM.

1 Like