[opensuse-buildservice] makeinstall macro on non-suse distros
Hi, I have a minor problem with %makeinstall macro. On suse it expands to make install DESTDIR=$RPM_BUILD_ROOT On the other distros it expands to make install bindir=$RPM_BUILD_ROOT/usr/bin infodir=$RPM_BUILD_ROOT/usr/bin ... etc But it does not set docdir="$RPM_BUILD_ROOT/usr/share/doc..." Therefore make install always fails with something like error: install /usr/share/doc/README, permission denied My workaround is this of course: %install # don't use makeinstall macro because missing docdir=... make install DESTDIR=$RPM_BUILD_ROOT I'd like to use the macro. How should I do it? Or is the missing docdir just a bug? cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 05/09/11 11:16, Ruediger Meier wrote:
Hi,
I have a minor problem with %makeinstall macro.
On suse it expands to make install DESTDIR=$RPM_BUILD_ROOT
On the other distros it expands to make install bindir=$RPM_BUILD_ROOT/usr/bin infodir=$RPM_BUILD_ROOT/usr/bin ... etc
But it does not set docdir="$RPM_BUILD_ROOT/usr/share/doc..." Therefore make install always fails with something like error: install /usr/share/doc/README, permission denied
My workaround is this of course:
%install # don't use makeinstall macro because missing docdir=... make install DESTDIR=$RPM_BUILD_ROOT
I'd like to use the macro. How should I do it? Or is the missing docdir just a bug?
cu, Rudi
It works on modern distros (last few versions of openSUSE, Fedora, Mandriva), i just redefine %makeinstall in prjconf for any broken distros (CentOS 5.5 is the only one I regularly encounter). Tejas -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Monday 05 September 2011, Tejas Guruswamy wrote:
On 05/09/11 11:16, Ruediger Meier wrote:
My workaround is this of course:
%install # don't use makeinstall macro because missing docdir=... make install DESTDIR=$RPM_BUILD_ROOT
I'd like to use the macro. How should I do it? Or is the missing docdir just a bug?
It works on modern distros (last few versions of openSUSE, Fedora, Mandriva),
AFAIR it didn't worked on all non-suse distros. Could it be that I have to do a bit more than just enabling Fedora build to get a Fedora conform build environment?
i just redefine %makeinstall in prjconf for any broken distros (CentOS 5.5 is the only one I regularly encounter).
Ok, but then I prefer to hardcode it just within the spec file. I only thought it should be another solution because when overriding destination paths it could be that stuff gets installed into folders where it doesn't belong to (from distro's point of view). cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 05/09/11 21:20, Rüdiger Meier wrote:
On Monday 05 September 2011, Tejas Guruswamy wrote:
On 05/09/11 11:16, Ruediger Meier wrote:
My workaround is this of course:
%install # don't use makeinstall macro because missing docdir=... make install DESTDIR=$RPM_BUILD_ROOT
I'd like to use the macro. How should I do it? Or is the missing docdir just a bug?
It works on modern distros (last few versions of openSUSE, Fedora, Mandriva), AFAIR it didn't worked on all non-suse distros. Could it be that I have to do a bit more than just enabling Fedora build to get a Fedora conform build environment?
Oh sorry, I didn't notice you wrote %makeinstall instead of %make_install. %makeinstall (which was SuSE-only) is deprecated since 11.1 or so in favour of %make_install (which is upstreamed, works on Fedora also), and is what I meant to talk about
i just redefine %makeinstall in prjconf for any broken distros (CentOS 5.5 is the only one I regularly encounter). Ok, but then I prefer to hardcode it just within the spec file. I only thought it should be another solution because when overriding destination paths it could be that stuff gets installed into folders where it doesn't belong to (from distro's point of view).
If files end up missing buildroot, it should be obvious because the build fails. More subtle mistakes can still happen, yes. Regards, Tejas -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Monday 05 September 2011, Tejas Guruswamy wrote:
On 05/09/11 21:20, Rüdiger Meier wrote:
On Monday 05 September 2011, Tejas Guruswamy wrote:
On 05/09/11 11:16, Ruediger Meier wrote:
It works on modern distros (last few versions of openSUSE, Fedora, Mandriva),
AFAIR it didn't worked on all non-suse distros. Could it be that I have to do a bit more than just enabling Fedora build to get a Fedora conform build environment?
Oh sorry, I didn't notice you wrote %makeinstall instead of %make_install.
%makeinstall (which was SuSE-only) is deprecated since 11.1 or so in favour of %make_install (which is upstreamed, works on Fedora also), and is what I meant to talk about
Thanks a lot! It still doesn't work for a lot distros but now I'm going to use %make_install always if it's defined, which should be very portable: %install %if %{?make_install:1} %{make_install} %else make install DESTDIR=%{?buildroot} %endif
I only thought it should be another solution because when overriding destination paths it could be that stuff gets installed into folders where it doesn't belong to (from distro's point of view).
If files end up missing buildroot, it should be obvious because the build fails. More subtle mistakes can still happen, yes.
Yes, I've wanted to mention that specifying all the separate destdirs in %configure _and_ in %makeinstall is a bad (possible conflicting) thing. So now it seems natural for me that they've deprecated %makeinstall (to not brake existing spec files) and added just a better %make_install. cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 05/09/11 22:52, Rüdiger Meier wrote:
On 05/09/11 21:20, Rüdiger Meier wrote:
On Monday 05 September 2011, Tejas Guruswamy wrote:
On 05/09/11 11:16, Ruediger Meier wrote:
It works on modern distros (last few versions of openSUSE, Fedora, Mandriva), AFAIR it didn't worked on all non-suse distros. Could it be that I have to do a bit more than just enabling Fedora build to get a Fedora conform build environment? Oh sorry, I didn't notice you wrote %makeinstall instead of %make_install.
%makeinstall (which was SuSE-only) is deprecated since 11.1 or so in favour of %make_install (which is upstreamed, works on Fedora also), and is what I meant to talk about Thanks a lot! It still doesn't work for a lot distros but now I'm going to use %make_install always if it's defined, which should be very
On Monday 05 September 2011, Tejas Guruswamy wrote: portable:
%install %if %{?make_install:1} %{make_install} %else make install DESTDIR=%{?buildroot} %endif
You can compress this to %{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}} or even %{?make_install} %{!?make_install:%makeinstall} Regards, Tejas -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tuesday 06 September 2011, Tejas Guruswamy wrote:
On 05/09/11 22:52, Rüdiger Meier wrote:
%install %if %{?make_install:1} %{make_install} %else make install DESTDIR=%{?buildroot} %endif
You can compress this to
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
Thx, good to know. My bloated version was because I'd just read the rpm book to do my first "ifdef macro" :)
or even %{?make_install} %{!?make_install:%makeinstall}
This is bad because it was the broken %makeinstall (missing docdir) why we are talking here at all. ;) cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On Tuesday 06 September 2011, Rüdiger Meier wrote:
On Tuesday 06 September 2011, Tejas Guruswamy wrote:
You can compress this to
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
To make this thread complete... Finally I'm using %install %{?make_install} %{!?make_install:make install DESTDIR=$RPM_BUILD_ROOT} because mandriva failed probably because of missing %buildroot macro If anybody is interested in building portable packages here is the very simple atem package which builds on all OBS supported .deb and .rpm distros: https://build.opensuse.org/package/show?package=atem&project=home%3Arudi_m%3Adevel cu, Rudi -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Please note the fedora position on this: Why the %makeinstall macro should not be used http://fedoraproject.org/wiki/Packaging/Guidelines#Why_the_.25makeinstall_ma... -- Paul Elliott 1(512)837-1096 pelliott@BlackPatchPanel.com PMB 181, 11900 Metric Blvd Suite J http://www.free.blackpatchpanel.com/pme/ Austin TX 78758-3117
participants (4)
-
Paul Elliott
-
Ruediger Meier
-
Rüdiger Meier
-
Tejas Guruswamy