[opensuse-packaging] $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema
![](https://seccdn.libravatar.org/avatar/022a482927e713146ced675bb5399746.jpg?s=120&d=mm&r=g)
Disclaimer: I'm not a packaging expert. I'm just trying to update packages here and there. In the current case I'm fighting with a strange problem here: https://build.opensuse.org/package/show/home:stroeder:branches:network:ldap:... It seems %{_sysconfdir} expands to /usr/local/etc but only in some cases. Build always fails like this: ------------------- snip ------------------- [ 224s] cp ldapns.schema /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema [ 224s] cp: cannot create regular file '/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema': No such file or directory [ 224s] Makefile:67: recipe for target 'install' failed [ 224s] make: *** [install] Error 1 [ 224s] error: Bad exit status from /var/tmp/rpm-tmp.SgHWLT (%install) [ 224s] [ 224s] [ 224s] RPM build errors: [ 224s] Bad exit status from /var/tmp/rpm-tmp.SgHWLT (%install) ------------------- snip ------------------- Even if I *remove* (for testing) this line from openldap2.spec it fails like above: ------------------- snip ------------------- install -m 644 *.schema $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema ------------------- snip ------------------- Any hint what's going on is appreciated. Ciao, Michael.
![](https://seccdn.libravatar.org/avatar/5b748275c3dbb1ceee18ed554486547d.jpg?s=120&d=mm&r=g)
On Monday 2014-12-08 21:23, Michael Ströder wrote:
------------------- snip ------------------- [ 224s] cp ldapns.schema /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema [ 224s] cp: cannot create regular file '/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema': No such file or directory [ 224s] Makefile:67: recipe for target 'install' failed [ 224s] make: *** [install] Error 1 ------------------- snip ------------------- Even if I *remove* (for testing) this line from openldap2.spec it fails like above: ------------------- snip ------------------- install -m 644 *.schema $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema ------------------- snip -------------------
That is because what fails is not "install -m 644 *.schema", but "make install". -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/022a482927e713146ced675bb5399746.jpg?s=120&d=mm&r=g)
Jan Engelhardt wrote:
On Monday 2014-12-08 21:23, Michael Ströder wrote:
------------------- snip ------------------- [ 224s] cp ldapns.schema /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema [ 224s] cp: cannot create regular file '/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema': No such file or directory [ 224s] Makefile:67: recipe for target 'install' failed [ 224s] make: *** [install] Error 1 ------------------- snip ------------------- Even if I *remove* (for testing) this line from openldap2.spec it fails like above: ------------------- snip ------------------- install -m 644 *.schema $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema ------------------- snip -------------------
That is because what fails is not "install -m 644 *.schema", but "make install".
Thanks for your answer. But frankly I don't get it. Which line in the build log indicates that a prior "make install" fails? The cp command above is plain wrong since the target directory should be /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/etc/openldap/schema instead of /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema Ciao, Michael.
![](https://seccdn.libravatar.org/avatar/a6ffef5dde34bf02c36fb9fb70f3e397.jpg?s=120&d=mm&r=g)
On Mon, 8 Dec 2014 23:01, Michael Ströder wrote:
Jan Engelhardt wrote:
On Monday 2014-12-08 21:23, Michael Ströder wrote:
------------------- snip ------------------- [ 224s] cp ldapns.schema /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema [ 224s] cp: cannot create regular file '/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema': No such file or directory [ 224s] Makefile:67: recipe for target 'install' failed [ 224s] make: *** [install] Error 1 ------------------- snip ------------------- Even if I *remove* (for testing) this line from openldap2.spec it fails like above: ------------------- snip ------------------- install -m 644 *.schema $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/schema ------------------- snip -------------------
That is because what fails is not "install -m 644 *.schema", but "make install".
Thanks for your answer.
But frankly I don't get it.
Which line in the build log indicates that a prior "make install" fails?
The cp command above is plain wrong since the target directory should be
/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/etc/openldap/schema
instead of
/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema
Ciao, Michael.
IMHO spec file error as root cause. Have you checked the results of the %configure? Is there a definition of a "BASE" (or similar) that contains "/usr/local" anywhere? A predefined default of "local" build could cause a basedir of "/usr/local/" instead of "system" build basedir "/" This could be the cause of %{_sysconfdir} resolving to /usr/local/etc. - Yamaban.
![](https://seccdn.libravatar.org/avatar/5b748275c3dbb1ceee18ed554486547d.jpg?s=120&d=mm&r=g)
On Monday 2014-12-08 23:01, Michael Ströder wrote:
[ 224s] make: *** [install] Error 1
Which line in the build log indicates that a prior "make install" fails?
The one with three stars. install(1) does not emit those, but make(1) does.
The cp command above is plain wrong since the target directory should be
That assessment is correct. That /usr/local thing must come from somewhere inside openldap, likely caused by changes you made since branching from network:ldap/openldap2. Maybe run `osc linkdiff` and find differences. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/833649deea07c68de42500ad14c257f6.jpg?s=120&d=mm&r=g)
Michael Ströder <michael@stroeder.com> writes:
Disclaimer: I'm not a packaging expert. I'm just trying to update packages here and there.
In the current case I'm fighting with a strange problem here:
https://build.opensuse.org/package/show/home:stroeder:branches:network:ldap:...
It seems %{_sysconfdir} expands to /usr/local/etc but only in some cases.
No, it should always expand to /etc.
Build always fails like this:
------------------- snip ------------------- [ 224s] cp ldapns.schema /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema [ 224s] cp: cannot create regular file '/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema': No such file or directory
You need to pass sysconfdir=%{_sysconfdir} when calling make in the contrib overlays. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/022a482927e713146ced675bb5399746.jpg?s=120&d=mm&r=g)
Andreas Schwab wrote:
Michael Ströder <michael@stroeder.com> writes:
Disclaimer: I'm not a packaging expert. I'm just trying to update packages here and there.
In the current case I'm fighting with a strange problem here:
https://build.opensuse.org/package/show/home:stroeder:branches:network:ldap:...
It seems %{_sysconfdir} expands to /usr/local/etc but only in some cases.
No, it should always expand to /etc.
Build always fails like this:
------------------- snip ------------------- [ 224s] cp ldapns.schema /home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema [ 224s] cp: cannot create regular file '/home/abuild/rpmbuild/BUILDROOT/openldap2-2.4.40-0.x86_64/usr/local/etc/openldap/schema': No such file or directory
You need to pass sysconfdir=%{_sysconfdir} when calling make in the contrib overlays.
This was the solution! slapo-nssov ships with its own copy of ldapns.schema and the Makefile wants to also install that. Ciao, Michael.
participants (4)
-
Andreas Schwab
-
Jan Engelhardt
-
Michael Ströder
-
Yamaban