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: https://github.com/federicoballarini/nethserver-mssql
Can someone help me?
/cc: @giacomo @davidep
davidep
(Davide Principi)
December 23, 2019, 8:57am
2
federico.ballarini:
make-rpms fails
I don’t run it any more. If you have Fedora, you could try nethserver-makerpms.
I’m obtaining the same error
stephdl
(Stéphane de Labrusse)
December 23, 2019, 10:01am
4
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
Yes, I used it. But it returns the same error.
I tried to tag, but nothing…
davidep
(Davide Principi)
December 23, 2019, 11:33am
7
The error can’t be the same: systemd-nspawn is the evidence of a mock run.
giacomo
(Giacomo Sanchietti)
December 23, 2019, 12:19pm
8
federico.ballarini:
Can someone help me?
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.
giacomo
(Giacomo Sanchietti)
December 23, 2019, 12:25pm
10
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
/etc/e-smith/db/configuration/defaults/mssql
/etc/e-smith/db/configuration/defaults/mssql/ProductId
/etc/e-smith/db/configuration/defaults/mssql/TCPPort
/etc/e-smith/db/configuration/defaults/mssql/access
/etc/e-smith/db/configuration/defaults/mssql/status
/etc/e-smith/db/configuration/defaults/mssql/type
/etc/e-smith/events/nethserver-mssql-update
/etc/e-smith/events/nethserver-mssql-update/S00initialize-default-databases
/usr/share/doc/nethserver-mssql-1.0.0
/usr/share/doc/nethserver-mssql-1.0.0/COPYING
Manually it works. I’m missing something into .spec file?
giacomo
(Giacomo Sanchietti)
December 23, 2019, 12:32pm
12
The directory is there, so it should work. Just proceed with the work, we will solve this little issue after the Christmas holidays!
1 Like
giacomo
(Giacomo Sanchietti)
January 7, 2020, 1:22pm
13
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
giacomo
(Giacomo Sanchietti)
January 7, 2020, 3:27pm
15
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
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