Hiyas,
the Packaging Guidelines contradict itself about the usage of %makeinstall
http://fedoraproject.org/wiki/Packaging/Guidelines#head-fcaf3e6fcbd51194a5d0...
The headline says "Why the %makeinstall macro should not be used" and the first sentence says "RPM, as included in Fedora, includes a %makeinstall macro, but you must NOT use this macro in Fedora packages."
It seems to be used by a lot of maintainers, so is this just a should not or is this another candidate for a major specfile-cleanup project?
Regards, Till
Till Maas wrote:
Hiyas,
the Packaging Guidelines contradict itself about the usage of %makeinstall
http://fedoraproject.org/wiki/Packaging/Guidelines#head-fcaf3e6fcbd51194a5d0...
The headline says "Why the %makeinstall macro should not be used" and the first sentence says "RPM, as included in Fedora, includes a %makeinstall macro, but you must NOT use this macro in Fedora packages."
It seems to be used by a lot of maintainers, so is this just a should not or is this another candidate for a major specfile-cleanup project?
Whoever wrote this text misrepresents the conclusion of the discussion that lead to its inclusion I think.
"make DESTDIR=%{buildroot} install" should be *preferred* when it works, but there are times when %makeinstall works and there is no DESTDIR support in a package's Makefiles, so writing this as a "must not" as it is at the moment is just daft IMHO.
Paul.
On Fri, 2006-08-18 at 15:03 +0100, Paul Howarth wrote:
Till Maas wrote:
Hiyas,
the Packaging Guidelines contradict itself about the usage of %makeinstall
http://fedoraproject.org/wiki/Packaging/Guidelines#head-fcaf3e6fcbd51194a5d0...
The headline says "Why the %makeinstall macro should not be used" and the first sentence says "RPM, as included in Fedora, includes a %makeinstall macro, but you must NOT use this macro in Fedora packages."
It seems to be used by a lot of maintainers, so is this just a should not or is this another candidate for a major specfile-cleanup project?
Whoever wrote this text misrepresents the conclusion of the discussion that lead to its inclusion I think.
"make DESTDIR=%{buildroot} install" should be *preferred* when it works, but there are times when %makeinstall works and there is no DESTDIR support in a package's Makefiles, so writing this as a "must not" as it is at the moment is just daft IMHO.
Does this make more sense?
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with broken Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
-Toshio
Toshio Kuratomi wrote:
On Fri, 2006-08-18 at 15:03 +0100, Paul Howarth wrote:
Till Maas wrote:
Hiyas,
the Packaging Guidelines contradict itself about the usage of %makeinstall
http://fedoraproject.org/wiki/Packaging/Guidelines#head-fcaf3e6fcbd51194a5d0...
The headline says "Why the %makeinstall macro should not be used" and the first sentence says "RPM, as included in Fedora, includes a %makeinstall macro, but you must NOT use this macro in Fedora packages."
It seems to be used by a lot of maintainers, so is this just a should not or is this another candidate for a major specfile-cleanup project?
Whoever wrote this text misrepresents the conclusion of the discussion that lead to its inclusion I think.
"make DESTDIR=%{buildroot} install" should be *preferred* when it works, but there are times when %makeinstall works and there is no DESTDIR support in a package's Makefiles, so writing this as a "must not" as it is at the moment is just daft IMHO.
Does this make more sense?
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with broken Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
WORKSFORME.
Paul.
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when
^^^^
"should"?
make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with broken Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
What if it doesn't have those issues in a particular case?
Also, I'm not sure it's particularly fair to use the term "broken" for makefiles which don't include a DESTDIR variable. As far as I'm aware, that's not a _requirement_ for a makefile -- just a handy convention.
On Fri, 2006-08-18 at 10:53 -0400, Matthew Miller wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when
^^^^
"should"?
"must" was intentional. Let's see what the arguments pro/con "should" are.
make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with broken Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
What if it doesn't have those issues in a particular case?
It must still use make install DESTDIR=%{buildroot}. When reviewing the package you have to assume that %makeinstall has broken something and check for problems that could result from that. Theoretically, the packager has performed those checks as well so there's a lot more work involved with using %makeinstall than from using DESTDIR.
Also, I'm not sure it's particularly fair to use the term "broken" for makefiles which don't include a DESTDIR variable. As far as I'm aware, that's not a _requirement_ for a makefile -- just a handy convention.
That's a good criticism. I hesitated over using broken or old and chose the least inaccurate. Do you have a better word or phrase to describe them? Non-compliant with GNU standards for Makefiles is accurate but overly limiting in scope. Maybe simply removing the adjective describing Makefiles altogether?
-Toshio
On Fri, 2006-08-18 at 12:02 -0500, Jason L Tibbitts III wrote:
"TK" == Toshio Kuratomi toshio@tiki-lounge.com writes:
TK> Does this make more sense?
Absolutely. Count this as a +1 for that wording if someone wants to vote on the list.
Great! List voting would be perfect for little clarifications like this. I've removed the "broken" from the text but otherwise left this the same. If we can get six packaging committee members to vote +1 on it, I'll put it into ratify.
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
-Toshio
Toshio Kuratomi wrote:
On Fri, 2006-08-18 at 12:02 -0500, Jason L Tibbitts III wrote:
> "TK" == Toshio Kuratomi toshio@tiki-lounge.com writes:
TK> Does this make more sense?
Absolutely. Count this as a +1 for that wording if someone wants to vote on the list.
Great! List voting would be perfect for little clarifications like this. I've removed the "broken" from the text but otherwise left this the same. If we can get six packaging committee members to vote +1 on it, I'll put it into ratify.
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
+1
-- Rex
On Fri, 2006-08-18 at 12:02 -0700, Toshio Kuratomi wrote:
On Fri, 2006-08-18 at 12:02 -0500, Jason L Tibbitts III wrote:
> "TK" == Toshio Kuratomi toshio@tiki-lounge.com writes:
TK> Does this make more sense?
Absolutely. Count this as a +1 for that wording if someone wants to vote on the list.
Great! List voting would be perfect for little clarifications like this. I've removed the "broken" from the text but otherwise left this the same. If we can get six packaging committee members to vote +1 on it, I'll put it into ratify.
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
+1 to that.
~spot
On Friday 18 August 2006 15:02, Toshio Kuratomi wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
+1
On Fri, 2006-08-18 at 12:02 -0700, Toshio Kuratomi wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
+1
On Sun, 2006-08-20 at 11:18 +0300, Ville Skyttä wrote:
On Fri, 2006-08-18 at 12:02 -0700, Toshio Kuratomi wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
+1
With my +1, that's six.
Thanks all, Toshio
hi, On 8/21/06, Toshio Kuratomi toshio@tiki-lounge.com wrote:
On Sun, 2006-08-20 at 11:18 +0300, Ville Skyttä wrote:
On Fri, 2006-08-18 at 12:02 -0700, Toshio Kuratomi wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
+1
With my +1, that's six.
So can i say in other words that if applications built using say GTK application built using glade which automatically creates Makefiles must use always make install DESTDIR=%{buildroot} and not %makeinstall
AND if upstream package developer himself written a Makefile then he must use %makeinstall ??
I need explanation on my understanding. Regards, Parag.
On Sun, 2006-09-10 at 14:39 +0530, Parag N(पराग़) wrote:
hi, On 8/21/06, Toshio Kuratomi toshio@tiki-lounge.com wrote:
On Sun, 2006-08-20 at 11:18 +0300, Ville Skyttä wrote:
On Fri, 2006-08-18 at 12:02 -0700, Toshio Kuratomi wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
+1
With my +1, that's six.
So can i say in other words that if applications built using say GTK application built using glade which automatically creates Makefiles must use always make install DESTDIR=%{buildroot} and not %makeinstall
If "make install DESTDIR=%{buildroot}" or "make install DESTDIR= $RPM_BUILD_ROOT" (depending on your preference) works, then you MUST use it. Only in those cases where it does not work can you then try % makeinstall.
~spot
On Sun, 2006-09-10 at 14:39 +0530, Parag N(पराग़) wrote:
hi, On 8/21/06, Toshio Kuratomi toshio@tiki-lounge.com wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
So can i say in other words that if applications built using say GTK application built using glade which automatically creates Makefiles must use always make install DESTDIR=%{buildroot} and not %makeinstall
AND if upstream package developer himself written a Makefile then he must use %makeinstall ??
%makeinstall is an RPM spec file macro. It doesn't involve upstream because it is not part of the Makefile. It is only part of the spec file that you, as a Fedora packager, write.
<history> When upstream projects create Makefiles, they usually include a variable called DESTDIR which allows downstream packagers to install into a temporary directory. This works by prepending DESTDIR to the directories that the program installs into *during make install* (LIBDIR, DATADIR, etc). During build (regular "make" or "make all") the program uses only the directories the program will end up in (LIBDIR, DATADIR, etc) and does not use DESTDIR at all.
Older Makefiles did not use DESTDIR. So with these the packager has to modify the values of the actual destination directories in order to install into the temporary root during packaging. This is what % makeinstall does. Since packagers still run across these Makefiles once in a while so %makeinstall still has value. But using it requires extra vigilance on the part of the packager and reviewer. You should look in the build.log to be sure that the package is not rebuilding any part of itself during "make install" and grep through the installed files to make sure the temporary root isn't included in any of the installed files. </history>
-Toshio
Hi, On 9/10/06, Toshio Kuratomi a.badger@gmail.com wrote:
On Sun, 2006-09-10 at 14:39 +0530, Parag N(पराग़) wrote:
hi, On 8/21/06, Toshio Kuratomi toshio@tiki-lounge.com wrote:
"Fedora's RPM includes a %makeinstall macro but it must NOT be used when make install DESTDIR=%{buildroot} will work. %makeinstall is a kludge that can work with Makefiles that don't make use of the DESTDIR variable but it has the following potential issues:"
So can i say in other words that if applications built using say GTK application built using glade which automatically creates Makefiles must use always make install DESTDIR=%{buildroot} and not %makeinstall
AND if upstream package developer himself written a Makefile then he must use %makeinstall ??
%makeinstall is an RPM spec file macro. It doesn't involve upstream because it is not part of the Makefile. It is only part of the spec file that you, as a Fedora packager, write.
<history> When upstream projects create Makefiles, they usually include a variable called DESTDIR which allows downstream packagers to install into a temporary directory. This works by prepending DESTDIR to the directories that the program installs into *during make install* (LIBDIR, DATADIR, etc). During build (regular "make" or "make all") the program uses only the directories the program will end up in (LIBDIR, DATADIR, etc) and does not use DESTDIR at all.
Older Makefiles did not use DESTDIR. So with these the packager has to modify the values of the actual destination directories in order to install into the temporary root during packaging. This is what % makeinstall does. Since packagers still run across these Makefiles once in a while so %makeinstall still has value. But using it requires extra vigilance on the part of the packager and reviewer. You should look in the build.log to be sure that the package is not rebuilding any part of itself during "make install" and grep through the installed files to make sure the temporary root isn't included in any of the installed files.
</history>
So in other words i can say if i am going to package any tarball i should first check main Makefile for DESTDIR variable. If its present use make install DESTDIR=%{buildroot} if DESTDIR is not in Makefile use %makeinstall right? Regards, Parag.
On Mon, 2006-09-11 at 09:40 +0530, Parag N(पराग़) wrote:
So in other words i can say if i am going to package any tarball i should first check main Makefile for DESTDIR variable. If its present use make install DESTDIR=%{buildroot}
This part is correct barring brokecn Makefiles :-). I think all packages which use automake have DESTDIR (although this might not be the case in the distant past).
if DESTDIR is not in Makefile use %makeinstall right?
... and be sure to check that it doesn't compile the buildroot's path into the resulting programs.
-Toshio
packaging@lists.fedoraproject.org