### Description
I testing package `master` and `5.2` branch int RPM. but cannot. Build and packaging logs is [here](https://build.opensuse.org/build/home:sergey-safarov:v5.2.x-rpms/CentOS_6/x8...)
Is happens because `make install-share` goal is try create folder `/usr/share/kamailio/` instead of `/home/build/rpmbuild/BUILDROOT/kamailio-5.2.0-0.el7.centos.x86_64/usr/share/kamailio/`.
### Troubleshooting
#### Reproduction
please look above
#### Debugging Data
NA.
#### Log Messages
``` [build@node0 kamailio-5.2.0]$ pwd /home/build/rpmbuild/BUILD/kamailio-5.2.0 [build@node0 kamailio-5.2.0]$ make -C src install-share make: Entering directory `/home/build/rpmbuild/BUILD/kamailio-5.2.0/src' mkdir -p /usr/share/kamailio/ mkdir: cannot create directory ‘/usr/share/kamailio/’: Permission denied make: *** [/usr/share/kamailio/] Error 1 make: Leaving directory `/home/build/rpmbuild/BUILD/kamailio-5.2.0/src' [build@node0 kamailio-5.2.0]$ ```
#### SIP Traffic
NA
### Possible Solutions
Not known
### Additional Information
tested current master and 5.2 branch
* **Operating System**: CentOS 7
``` Linux node0.docker.rcsnet.ru 4.14.13-300.fc27.x86_64 #1 SMP Thu Jan 11 04:00:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux ```
Issue related to [`share_prefix=%{_prefix}`](https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/obs/kamailio.s...) options of `make cfg` When this options is not used then `make install` command is executed properly but later packaging is failed by `rpath` check error. ``` + /usr/lib/rpm/check-buildroot Binary file /home/build/rpmbuild/BUILDROOT/kamailio-5.2.0-0.el7.centos.x86_64/usr/lib64/kamailio/modules/db_redis.so matches Found '/home/build/rpmbuild/BUILDROOT/kamailio-5.2.0-0.el7.centos.x86_64' in installed files; aborting error: Bad exit status from /var/tmp/rpm-tmp.BKXKDY (%install)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.BKXKDY (%install) [build@node0 SPECS]$ ``` As options we can disable build of `db_redis` and delete `share_prefix=%{_prefix}` options of `make cfg`
`db_redis` issue is rised after this commit https://github.com/kamailio/kamailio/commit/ee95675177466a7ae5f9575db300df32...
Can you try for latest master? If ok, then I will backport.
I checked on local server build and it is help package. But same on PBS is not. Double checked and cannot find difference
Did you mean OBS instead of PBS? Can you give a link to the log of the failed build?
I forget to remove `share_prefix=%{_prefix}` After this rpm properly created. I not testing build [result](https://build.opensuse.org/package/show/home:sergey-safarov:v5.2.x-rpms/kama...). I expect all will be success except `openSUSE_Tumbleweed`. This i will fix on other PR
Looks as `smsops` not related to `ims` module. [Logs](https://build.opensuse.org/package/live_build_log/home:sergey-safarov:v5.2.x...). ``` [ 661s] Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/abuild/rpmbuild/BUILDROOT/kamailio-5.2.0-8.1.ppc64 [ 661s] error: Installed (but unpackaged) file(s) found: [ 661s] /usr/lib64/kamailio/modules/smsops.so [ 661s] /usr/share/doc/kamailio/modules/README.smsops ``` Should i move `smsops` module to other package?
Commit 2b295f83e1c40637012633b6cab2ad86415d4623 may be backported into 5.2 and 5.1 branch.
The smsops module should belong to the basic module group, according to the Makefile.groups
I moved `smsops` into main kamailio module. Now looks as packaging correct on RHEL, CentOS and Fedora dists. Still required to backport 2b295f83e1c40637012633b6cab2ad86415d4623 to stable branch
The share_target is needed only for db_redis module, so the 5.1 should not need the commit 2b295f8. I backported it to 5.2.
Thanks Daniel @miconda I closing ticket.
Closed #1709.