* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
@ 2003-10-29 1:52 ` Greg KH
2003-10-29 6:54 ` Olaf Hering
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-10-29 1:52 UTC (permalink / raw)
To: linux-hotplug
On Tue, Oct 28, 2003 at 05:04:06PM +0100, Olaf Hering wrote:
> For these distro guys.
> make install DESTDIR=/tmp/foobar
What's wrong with the existing makefile where you can do:
make install prefix=/tmp/foobar
That's what the RPM currently does.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
2003-10-29 1:52 ` Greg KH
@ 2003-10-29 6:54 ` Olaf Hering
2003-10-29 11:56 ` Olaf Hering
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Olaf Hering @ 2003-10-29 6:54 UTC (permalink / raw)
To: linux-hotplug
On Tue, Oct 28, Greg KH wrote:
> On Tue, Oct 28, 2003 at 05:04:06PM +0100, Olaf Hering wrote:
> > For these distro guys.
> > make install DESTDIR=/tmp/foobar
>
> What's wrong with the existing makefile where you can do:
> make install prefix=/tmp/foobar
>
> That's what the RPM currently does.
The hotplug symlink looks bogus. DESTDIR is for packaging, not for
--prefix.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
2003-10-29 1:52 ` Greg KH
2003-10-29 6:54 ` Olaf Hering
@ 2003-10-29 11:56 ` Olaf Hering
2003-10-29 19:28 ` Greg KH
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Olaf Hering @ 2003-10-29 11:56 UTC (permalink / raw)
To: linux-hotplug
On Wed, Oct 29, Olaf Hering wrote:
> On Tue, Oct 28, Greg KH wrote:
>
> > On Tue, Oct 28, 2003 at 05:04:06PM +0100, Olaf Hering wrote:
> > > For these distro guys.
> > > make install DESTDIR=/tmp/foobar
> >
> > What's wrong with the existing makefile where you can do:
> > make install prefix=/tmp/foobar
> >
> > That's what the RPM currently does.
>
> The hotplug symlink looks bogus. DESTDIR is for packaging, not for
> --prefix.
This is a more complete patch.
You already noticed the bogus symlink /etc/hotplug.d/default/udev.hotplug
diff -p -purN udev.bk.orig/Makefile udev.bk/Makefile
--- udev.bk.orig/Makefile 2003-10-25 01:21:18.000000000 +0200
+++ udev.bk/Makefile 2003-10-29 12:52:52.000000000 +0100
@@ -26,6 +26,7 @@ VERSION = 005
INSTALL_DIR = /usr/local/bin
RELEASE_NAME = $(ROOT)-$(VERSION)
+DESTDIR # override this to make udev look in a different location for it's config files
prefix exec_prefix = ${prefix}
@@ -195,14 +196,14 @@ release: $(DISTFILES) clean
install: all
- $(INSTALL) -d $(udevdir)
- $(INSTALL) -d $(configdir)
- $(INSTALL) -d $(hotplugdir)
- $(INSTALL_PROGRAM) -D $(ROOT) $(sbindir)/$(ROOT)
- $(INSTALL_DATA) -D udev.8 $(mandir)/man8/udev.8
- $(INSTALL_DATA) udev.config $(configdir)
- $(INSTALL_DATA) udev.permissions $(configdir)
- - ln -s $(sbindir)/$(ROOT) $(hotplugdir)/udev.hotplug
+ $(INSTALL) -d $(DESTDIR)$(udevdir)
+ $(INSTALL) -d $(DESTDIR)$(configdir)
+ $(INSTALL) -d $(DESTDIR)$(hotplugdir)
+ $(INSTALL_PROGRAM) -D $(ROOT) $(DESTDIR)$(sbindir)/$(ROOT)
+ $(INSTALL_DATA) -D udev.8 $(DESTDIR)$(mandir)/man8/udev.8
+ $(INSTALL_DATA) udev.config $(DESTDIR)$(configdir)
+ $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir)
+ - ln -s $(sbindir)/$(ROOT) $(DESTDIR)$(hotplugdir)/udev.hotplug
uninstall:
- rm $(hotplugdir)/udev.hotplug
diff -p -purN udev.bk.orig/udev.spec udev.bk/udev.spec
--- udev.bk.orig/udev.spec 2003-10-23 02:08:58.000000000 +0200
+++ udev.bk/udev.spec 2003-10-29 12:53:59.000000000 +0100
@@ -7,7 +7,7 @@ Group: Utilities/System
Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.gz
ExclusiveOS: Linux
Vendor: Greg Kroah-Hartman <greg@kroah.com>
-BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Prereq: /bin/sh, fileutils, hotplug
%description
@@ -21,9 +21,7 @@ udev is a implementation of devfs in use
make CC="gcc $RPM_OPT_FLAGS"
%install
-make prefix=$RPM_BUILD_ROOT install
-rm -f ${RPM_BUILD_ROOT}/etc/hotplug.d/default/udev.hotplug
-ln -s /sbin/udev ${RPM_BUILD_ROOT}/etc/hotplug.d/default/udev.hotplug
+make DESTDIR=$RPM_BUILD_ROOT install
%clean
rm -rf $RPM_BUILD_ROOT
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
` (2 preceding siblings ...)
2003-10-29 11:56 ` Olaf Hering
@ 2003-10-29 19:28 ` Greg KH
2003-10-29 20:03 ` Olaf Hering
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-10-29 19:28 UTC (permalink / raw)
To: linux-hotplug
On Wed, Oct 29, 2003 at 12:56:55PM +0100, Olaf Hering wrote:
> On Wed, Oct 29, Olaf Hering wrote:
>
> > On Tue, Oct 28, Greg KH wrote:
> >
> > > On Tue, Oct 28, 2003 at 05:04:06PM +0100, Olaf Hering wrote:
> > > > For these distro guys.
> > > > make install DESTDIR=/tmp/foobar
> > >
> > > What's wrong with the existing makefile where you can do:
> > > make install prefix=/tmp/foobar
> > >
> > > That's what the RPM currently does.
> >
> > The hotplug symlink looks bogus. DESTDIR is for packaging, not for
> > --prefix.
Are these names documented as the default somewhere in the LSB or
something like it? What's wrong with using prefix in the rpm file?
> This is a more complete patch.
> You already noticed the bogus symlink /etc/hotplug.d/default/udev.hotplug
Why is it bogus? I couldn't get rpm to pick up the symlink any other
way. It looks like your patch just gets rid of it alltogether, right?
That's not good.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
` (3 preceding siblings ...)
2003-10-29 19:28 ` Greg KH
@ 2003-10-29 20:03 ` Olaf Hering
2003-10-29 22:27 ` Greg KH
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Olaf Hering @ 2003-10-29 20:03 UTC (permalink / raw)
To: linux-hotplug
On Wed, Oct 29, Greg KH wrote:
> On Wed, Oct 29, 2003 at 12:56:55PM +0100, Olaf Hering wrote:
> > On Wed, Oct 29, Olaf Hering wrote:
> >
> > > On Tue, Oct 28, Greg KH wrote:
> > >
> > > > On Tue, Oct 28, 2003 at 05:04:06PM +0100, Olaf Hering wrote:
> > > > > For these distro guys.
> > > > > make install DESTDIR=/tmp/foobar
> > > >
> > > > What's wrong with the existing makefile where you can do:
> > > > make install prefix=/tmp/foobar
> > > >
> > > > That's what the RPM currently does.
> > >
> > > The hotplug symlink looks bogus. DESTDIR is for packaging, not for
> > > --prefix.
>
> Are these names documented as the default somewhere in the LSB or
> something like it? What's wrong with using prefix in the rpm file?
>
> > This is a more complete patch.
> > You already noticed the bogus symlink /etc/hotplug.d/default/udev.hotplug
>
> Why is it bogus? I couldn't get rpm to pick up the symlink any other
> way. It looks like your patch just gets rid of it alltogether, right?
> That's not good.
How do I explain that to you. Lets try it that way:
pick your current spec file and build the rpm as user. It will not work
because you can not write below /etc or /sbin as example.
You use prefix=$RPM_BUILD_ROOT to workaround that fact. The symlink,
created in the Makefile will be:
ln -sv /var/tmp/udev-root/sbin/udev /var/tmp/udev-root/etc/hotplug.d/default
With my patch it will be
ln -sv /sbin/udev /var/tmp/udev-root/etc/hotplug.d/default
no need to remove it and recreate it manually in the specfile.
DESTDIR= is used in many projects to install the files for packaging in
the temporary directory.
--
USB is for mice, FireWire is for men!
sUse lINUX ag, n√úRNBERG
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
` (4 preceding siblings ...)
2003-10-29 20:03 ` Olaf Hering
@ 2003-10-29 22:27 ` Greg KH
2003-10-29 22:30 ` Adrien Beau
2003-10-29 22:32 ` Greg KH
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-10-29 22:27 UTC (permalink / raw)
To: linux-hotplug
On Wed, Oct 29, 2003 at 09:03:13PM +0100, Olaf Hering wrote:
> On Wed, Oct 29, Greg KH wrote:
>
> > On Wed, Oct 29, 2003 at 12:56:55PM +0100, Olaf Hering wrote:
> > > On Wed, Oct 29, Olaf Hering wrote:
> > >
> > > > On Tue, Oct 28, Greg KH wrote:
> > > >
> > > > > On Tue, Oct 28, 2003 at 05:04:06PM +0100, Olaf Hering wrote:
> > > > > > For these distro guys.
> > > > > > make install DESTDIR=/tmp/foobar
> > > > >
> > > > > What's wrong with the existing makefile where you can do:
> > > > > make install prefix=/tmp/foobar
> > > > >
> > > > > That's what the RPM currently does.
> > > >
> > > > The hotplug symlink looks bogus. DESTDIR is for packaging, not for
> > > > --prefix.
> >
> > Are these names documented as the default somewhere in the LSB or
> > something like it? What's wrong with using prefix in the rpm file?
> >
> > > This is a more complete patch.
> > > You already noticed the bogus symlink /etc/hotplug.d/default/udev.hotplug
> >
> > Why is it bogus? I couldn't get rpm to pick up the symlink any other
> > way. It looks like your patch just gets rid of it alltogether, right?
> > That's not good.
>
> How do I explain that to you. Lets try it that way:
> pick your current spec file and build the rpm as user. It will not work
> because you can not write below /etc or /sbin as example.
> You use prefix=$RPM_BUILD_ROOT to workaround that fact. The symlink,
> created in the Makefile will be:
> ln -sv /var/tmp/udev-root/sbin/udev /var/tmp/udev-root/etc/hotplug.d/default
> With my patch it will be
> ln -sv /sbin/udev /var/tmp/udev-root/etc/hotplug.d/default
>
> no need to remove it and recreate it manually in the specfile.
Ok, that makes more sense now, thanks.
> DESTDIR= is used in many projects to install the files for packaging in
> the temporary directory.
Ok, I've applied your last patch for the Makefile and the spec file and
tested that it still builds a useful rpm file.
thanks again for the patch,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
` (5 preceding siblings ...)
2003-10-29 22:27 ` Greg KH
@ 2003-10-29 22:30 ` Adrien Beau
2003-10-29 22:32 ` Greg KH
7 siblings, 0 replies; 9+ messages in thread
From: Adrien Beau @ 2003-10-29 22:30 UTC (permalink / raw)
To: linux-hotplug
On Wednesday 29 October 2003 20:28, Greg KH wrote:
>
> > > The hotplug symlink looks bogus. DESTDIR is for packaging,
> > > not for --prefix.
>
> Are these names documented as the default somewhere in the LSB
> or something like it? What's wrong with using prefix in the
> rpm file?
I haven't looked at udev, but generally speaking, --prefix is
used to specify where on the filesystem the software will *live*,
while DESTDIR is used to specify under which "root" directory the
files will be put during a make install.
The key difference is that the --prefix will sometimes be
compiled somewhere into the software (as an hardcoded default
path to a config file or data directory, for example) while the
DESTDIR has no influence on the software.
Typically, --prefix is specified at ./configure time, and is
either /usr or /usr/local (usual default), while DESTDIR is only
specified at make install time, and can have any value useful to
the "make install"er.
I don't know if there is any proper documentation or standard for
these features. Both come with almost every software that uses
automake/autoconf as part of its build system.
--
adrien.beau@free.fr - http://adrien.beau.free.fr/
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH] DESTDIR for udev
2003-10-28 16:04 [PATCH] DESTDIR for udev Olaf Hering
` (6 preceding siblings ...)
2003-10-29 22:30 ` Adrien Beau
@ 2003-10-29 22:32 ` Greg KH
7 siblings, 0 replies; 9+ messages in thread
From: Greg KH @ 2003-10-29 22:32 UTC (permalink / raw)
To: linux-hotplug
On Wed, Oct 29, 2003 at 11:30:27PM +0100, Adrien Beau wrote:
> On Wednesday 29 October 2003 20:28, Greg KH wrote:
> >
> > > > The hotplug symlink looks bogus. DESTDIR is for packaging,
> > > > not for --prefix.
> >
> > Are these names documented as the default somewhere in the LSB
> > or something like it? What's wrong with using prefix in the
> > rpm file?
>
> I haven't looked at udev, but generally speaking, --prefix is
> used to specify where on the filesystem the software will *live*,
> while DESTDIR is used to specify under which "root" directory the
> files will be put during a make install.
>
> The key difference is that the --prefix will sometimes be
> compiled somewhere into the software (as an hardcoded default
> path to a config file or data directory, for example) while the
> DESTDIR has no influence on the software.
>
> Typically, --prefix is specified at ./configure time, and is
> either /usr or /usr/local (usual default), while DESTDIR is only
> specified at make install time, and can have any value useful to
> the "make install"er.
>
> I don't know if there is any proper documentation or standard for
> these features. Both come with almost every software that uses
> automake/autoconf as part of its build system.
Ah, thanks for the explaination. As udev isn't using automake/autoconf
(and I don't want it too, either, please don't send patches doing
that...) I had to try to remember what the defaults were :)
I've accepted the DESTDIR patch.
thanks again.
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 9+ messages in thread