Message ID | alpine.LNX.2.00.1104120729280.7359@connie.slackware.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
On 04/12/2011 04:31 PM, Robby Workman wrote: > On Tue, 12 Apr 2011, Andreas Oberritter wrote: > >> On 04/12/2011 04:10 AM, Robby Workman wrote: >>> --- a/Make.rules >>> +++ b/Make.rules >>> @@ -11,6 +11,7 @@ PREFIX = /usr/local >>> LIBDIR = $(PREFIX)/lib >>> # subdir below LIBDIR in which to install the libv4lx libc wrappers >>> LIBSUBDIR = libv4l >>> +MANDIR = /usr/share/man >> >> Why did you hardcode /usr instead of keeping $(PREFIX)/share/man? > > > Eek. I'd like to say that I sent the wrong patch, but alas, I > simply had a thinko. See attached (better) patch :-) Looks good. Mauro, will you pick up this patch? Regards, Andreas > > -RW > > > 0002-Allow-override-of-manpage-installation-directory.patch > > > From 6ef4a1fecee242be9658528ef7663845d9bd6bc6 Mon Sep 17 00:00:00 2001 > From: Robby Workman <rworkman@slackware.com> > Date: Tue, 12 Apr 2011 09:26:57 -0500 > Subject: [PATCH] Allow override of manpage installation directory > > This creates MANDIR in Make.rules and keeps the preexisting > default of $(PREFIX)/share/man, but allows packagers to easily > override via e.g. "make MANDIR=/usr/man" > --- > Make.rules | 1 + > utils/keytable/Makefile | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/Make.rules b/Make.rules > index 0bb2eb8..875828a 100644 > --- a/Make.rules > +++ b/Make.rules > @@ -11,6 +11,7 @@ PREFIX = /usr/local > LIBDIR = $(PREFIX)/lib > # subdir below LIBDIR in which to install the libv4lx libc wrappers > LIBSUBDIR = libv4l > +MANDIR = $(PREFIX)/share/man > > # These ones should not be overriden from the cmdline > > diff --git a/utils/keytable/Makefile b/utils/keytable/Makefile > index 29a6ac4..e093280 100644 > --- a/utils/keytable/Makefile > +++ b/utils/keytable/Makefile > @@ -39,7 +39,7 @@ install: $(TARGETS) > install -m 644 -p rc_keymaps/* $(DESTDIR)/etc/rc_keymaps > install -m 755 -d $(DESTDIR)/lib/udev/rules.d > install -m 644 -p 70-infrared.rules $(DESTDIR)/lib/udev/rules.d > - install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1 > - install -m 644 -p ir-keytable.1 $(DESTDIR)$(PREFIX)/share/man/man1 > + install -m 755 -d $(DESTDIR)$(MANDIR)/man1 > + install -m 644 -p ir-keytable.1 $(DESTDIR)$(MANDIR)/man1 > > include ../../Make.rules > -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Em 13-04-2011 15:20, Andreas Oberritter escreveu: > On 04/12/2011 04:31 PM, Robby Workman wrote: >> On Tue, 12 Apr 2011, Andreas Oberritter wrote: >> >>> On 04/12/2011 04:10 AM, Robby Workman wrote: >>>> --- a/Make.rules >>>> +++ b/Make.rules >>>> @@ -11,6 +11,7 @@ PREFIX = /usr/local >>>> LIBDIR = $(PREFIX)/lib >>>> # subdir below LIBDIR in which to install the libv4lx libc wrappers >>>> LIBSUBDIR = libv4l >>>> +MANDIR = /usr/share/man >>> >>> Why did you hardcode /usr instead of keeping $(PREFIX)/share/man? >> >> >> Eek. I'd like to say that I sent the wrong patch, but alas, I >> simply had a thinko. See attached (better) patch :-) > > Looks good. Mauro, will you pick up this patch? Yes, when done. I have one comment about it. Not sure what happened, but I lost the original email, so let me quote it from patchwork ID#699151. > Subject: [PATCHES] Misc. trivial fixes > Date: Tue, 12 Apr 2011 02:10:36 -0000 > From: Robby Workman <rworkman@slackware.com> > X-Patchwork-Id: 699151 > Message-Id: <alpine.LNX.2.00.1104111908050.32072@connie.slackware.com> > To: linux-media@vger.kernel.org > Cc: Patrick Volkerding <volkerdi@slackware.com> > > Patch #1 installs udev rules files to /lib/udev/rules.d/ instead > of /etc/udev/rules.d/ - see commit message for more info. > > Patch #2 allows override of manpage installation directory by > packagers - see commit message for more info Please send each patch in-lined, one patch per email. > > -RW > >From d3356b0cf968c41b1d44fcc682a44112ffff9d0b Mon Sep 17 00:00:00 2001 > From: Robby Workman <rworkman@slackware.com> > Date: Mon, 11 Apr 2011 20:41:28 -0500 > Subject: [PATCH 1/2] Install udev rules to /lib/udev/ instead of /etc/udev > > In moderately recent versions of udev, packages should install > rules files to /lib/udev/rules.d/ instead of /etc/udev/rules.d/, > as /etc/udev/rules.d/ is now for generated rules and overrides > of the packaged rules. > --- > utils/keytable/70-infrared.rules | 4 +--- > utils/keytable/Makefile | 4 ++-- > 2 files changed, 3 insertions(+), 5 deletions(-) > > -- > 1.7.4.4 > >From 0b5f4bc501c896155401226b188688fd3bef1f5c Mon Sep 17 00:00:00 2001 > From: Robby Workman <rworkman@slackware.com> > Date: Mon, 11 Apr 2011 20:50:18 -0500 > Subject: [PATCH 2/2] Allow override of manpage installation directory > > This creates MANDIR in Make.rules and keeps the preexisting > default of /usr/share/man, but allows packagers to easily > override via e.g. "make MANDIR=/usr/man" > --- > Make.rules | 1 + > utils/keytable/Makefile | 4 ++-- > 2 files changed, 3 insertions(+), 2 deletions(-) > > diff --git a/Make.rules b/Make.rules > index 0bb2eb8..1529ef8 100644 > --- a/Make.rules > +++ b/Make.rules > @@ -11,6 +11,7 @@ PREFIX = /usr/local > LIBDIR = $(PREFIX)/lib > # subdir below LIBDIR in which to install the libv4lx libc wrappers > LIBSUBDIR = libv4l > +MANDIR = /usr/share/man It would be better to define it as: MANDIR = $(PREFIX)/share/man As suggested by Andreas. > > # These ones should not be overriden from the cmdline > > diff --git a/utils/keytable/Makefile b/utils/keytable/Makefile > index 29a6ac4..e093280 100644 > --- a/utils/keytable/Makefile > +++ b/utils/keytable/Makefile > @@ -39,7 +39,7 @@ install: $(TARGETS) > install -m 644 -p rc_keymaps/* $(DESTDIR)/etc/rc_keymaps > install -m 755 -d $(DESTDIR)/lib/udev/rules.d > install -m 644 -p 70-infrared.rules $(DESTDIR)/lib/udev/rules.d > - install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1 > - install -m 644 -p ir-keytable.1 $(DESTDIR)$(PREFIX)/share/man/man1 > + install -m 755 -d $(DESTDIR)$(MANDIR)/man1 > + install -m 644 -p ir-keytable.1 $(DESTDIR)$(MANDIR)/man1 > > include ../../Make.rules > -- > 1.7.4.4 > > > diff --git a/utils/keytable/70-infrared.rules b/utils/keytable/70-infrared.rules > index 308a6d4..afffd95 100644 > --- a/utils/keytable/70-infrared.rules > +++ b/utils/keytable/70-infrared.rules > @@ -1,6 +1,4 @@ > # Automatically load the proper keymaps after the Remote Controller device > -# creation. > -# Copy this file at /etc/udev/rules.d/70-infrared.rules in order to load keytables > -# during boot time. The keycode tables rules should be at /etc/rc_maps.cfg > +# creation. The keycode tables rules should be at /etc/rc_maps.cfg > > ACTION=="add", SUBSYSTEM=="rc", RUN+="/usr/bin/ir-keytable -a /etc/rc_maps.cfg -s $name" > diff --git a/utils/keytable/Makefile b/utils/keytable/Makefile > index aa020ef..29a6ac4 100644 > --- a/utils/keytable/Makefile > +++ b/utils/keytable/Makefile > @@ -37,8 +37,8 @@ install: $(TARGETS) > install -m 644 -p rc_maps.cfg $(DESTDIR)/etc > install -m 755 -d $(DESTDIR)/etc/rc_keymaps > install -m 644 -p rc_keymaps/* $(DESTDIR)/etc/rc_keymaps > - install -m 755 -d $(DESTDIR)/etc/udev/rules.d > - install -m 644 -p 70-infrared.rules $(DESTDIR)/etc/udev/rules.d > + install -m 755 -d $(DESTDIR)/lib/udev/rules.d Not all distros use /lib for it. In fact, RHEL5/RHEL6/Fedora 15 and Fedora rawhide all use /etc/udev/rules.d. In a matter of fact, looking at RHEL6 (udev-147-2.35.el6.x86_64), it has both. I suspect that /lib/udev/rules.d is meant to have the default scripts that are part of the official packages, and /etc/udev/rules.d to be user-defined ones. So, at least on RHEL6, it makes sense that a user-compiled tarball would install stuff into /etc/*, and that a RHEL6 package would change it to install at /lib/*. So, it is better to have some Makefile var with some default, that allows overriding it when doing a make install, for example: UDEVDIR=/etc/udev/rules.d The default is a matter of personal taste. I would keep the current way as default, as it avoids breaking for those that are using it on the current way. One alternative would be to add some logic there to change the default to /lib/* if /etc/* doesn't exist. > + install -m 644 -p 70-infrared.rules $(DESTDIR)/lib/udev/rules.d > install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1 > install -m 644 -p ir-keytable.1 $(DESTDIR)$(PREFIX)/share/man/man1 > > Cheers, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, 2 May 2011, Mauro Carvalho Chehab wrote: > Not sure what happened, but I lost the original email, so let me quote > it from patchwork ID#699151. > > >> Subject: [PATCHES] Misc. trivial fixes >> Date: Tue, 12 Apr 2011 02:10:36 -0000 >> From: Robby Workman <rworkman@slackware.com> >> X-Patchwork-Id: 699151 >> Message-Id: <alpine.LNX.2.00.1104111908050.32072@connie.slackware.com> >> To: linux-media@vger.kernel.org >> >> Patch #1 installs udev rules files to /lib/udev/rules.d/ instead >> of /etc/udev/rules.d/ - see commit message for more info. >> >> Patch #2 allows override of manpage installation directory by >> packagers - see commit message for more info > > Please send each patch in-lined, one patch per email. Okay, noted. Should I resend, or is this for future reference? >> This creates MANDIR in Make.rules and keeps the preexisting >> default of /usr/share/man, but allows packagers to easily >> override via e.g. "make MANDIR=/usr/man" >> ... snipped lots ... >> +MANDIR = /usr/share/man > > > It would be better to define it as: > MANDIR = $(PREFIX)/share/man > > As suggested by Andreas. Yes, I sent a fixed patch later - perhaps a resend is better regardless now? :-) >> ... snipped lots ... >> - install -m 755 -d $(DESTDIR)/etc/udev/rules.d >> - install -m 644 -p 70-infrared.rules $(DESTDIR)/etc/udev/rules.d >> + install -m 755 -d $(DESTDIR)/lib/udev/rules.d > > > Not all distros use /lib for it. In fact, RHEL5/RHEL6/Fedora 15 and Fedora rawhide > all use /etc/udev/rules.d. If so, it's only older distros that I wouldn't expect to be packaging newer versions of v4l-utils (e.g. RHEL won't as I understand it), and for Fedora, if "rawhide" is devel tree, then I'm pretty sure you're mistaken. > In a matter of fact, looking at RHEL6 (udev-147-2.35.el6.x86_64), it has both. I suspect > that /lib/udev/rules.d is meant to have the default scripts that are part of the > official packages, and /etc/udev/rules.d to be user-defined ones. So, at least on RHEL6, > it makes sense that a user-compiled tarball would install stuff into /etc/*, and > that a RHEL6 package would change it to install at /lib/*. Every distro (recent) will have both /lib/udev/rules.d/ and /etc/udev/rules.d/ ; more on that later... > So, it is better to have some Makefile var with some default, that > allows overriding it when doing a make install, for example: > > UDEVDIR=/etc/udev/rules.d Well, if you *insist* on doing this, sure, but better to do this: UDEVDIR=/lib/udev as the default, and then use $(UDEVDIR)/rules.d/ (and let packagers redefine UDEVDIR if desired - though I don't think that will be as common as you believe). > The default is a matter of personal taste. I would keep the current way as default, > as it avoids breaking for those that are using it on the current way. One alternative > would be to add some logic there to change the default to /lib/* if /etc/* doesn't > exist. But /etc/udev/rules.d/ should exist regardless, and it's not at all a matter of personal taste, as I understand it. /lib/udev/rules.d/ is the location for packaged and general default rules files to be placed, and /etc/udev/rules.d/ is where autogenerated rules (such as those that create persistent symlinks for optical and network devices) are placed, as well as admin- and system-specific override rules (e.g. a file named 10-blah.rules in /etc/udev/rules.d/ would completely override a file of the same name in /lib/udev/rules.d/). The point I'm trying to make is this: you lose nothing in the way of user customization by defaulting to /lib/udev/rules.d/ - you simply force it to happen the way that upstream udev intends. The only thing you lose is support for older udev releases, and I'm not sure that's a big concern :-) (CC'd udev mail list so that someone can LART me if I'm wrong) ;-) -RW -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Em 02-05-2011 23:48, Robby Workman escreveu: > On Mon, 2 May 2011, Mauro Carvalho Chehab wrote: > >> Not sure what happened, but I lost the original email, so let me quote >> it from patchwork ID#699151. >> >> >>> Subject: [PATCHES] Misc. trivial fixes >>> Date: Tue, 12 Apr 2011 02:10:36 -0000 >>> From: Robby Workman <rworkman@slackware.com> >>> X-Patchwork-Id: 699151 >>> Message-Id: <alpine.LNX.2.00.1104111908050.32072@connie.slackware.com> >>> To: linux-media@vger.kernel.org >>> >>> Patch #1 installs udev rules files to /lib/udev/rules.d/ instead >>> of /etc/udev/rules.d/ - see commit message for more info. >>> >>> Patch #2 allows override of manpage installation directory by >>> packagers - see commit message for more info >> >> Please send each patch in-lined, one patch per email. > > > Okay, noted. Should I resend, or is this for future reference? If you don't mind, please re-send it. Please c/c me, as we're having some troubles with patchwork nowadays. >> Not all distros use /lib for it. In fact, RHEL5/RHEL6/Fedora 15 and Fedora rawhide >> all use /etc/udev/rules.d. > > If so, it's only older distros that I wouldn't expect to be packaging newer > versions of v4l-utils (e.g. RHEL won't as I understand it), and for Fedora, > if "rawhide" is devel tree, then I'm pretty sure you're mistaken. We've packaged v4l-utils for RHEL, via epel[1]. I volunteered to maintain it for RHEL6, as I use it on my machine and I would be doing it anyway for me, so better to maintain it for the others also ;) [1] https://admin.fedoraproject.org/pkgdb/acls/name/v4l-utils I don't intend to maintain it for RHEL5, but I was told that lots of mythtv users run CentOS (based on RHEL5). So, I won't doubt if someone from CentOS (or other rpm repos for .el5, like atrpms) would add v4l-utils there. >> In a matter of fact, looking at RHEL6 (udev-147-2.35.el6.x86_64), it has both. I suspect >> that /lib/udev/rules.d is meant to have the default scripts that are part of the >> official packages, and /etc/udev/rules.d to be user-defined ones. So, at least on RHEL6, >> it makes sense that a user-compiled tarball would install stuff into /etc/*, and >> that a RHEL6 package would change it to install at /lib/*. > > > Every distro (recent) will have both /lib/udev/rules.d/ and /etc/udev/rules.d/ ; > more on that later... > > >> So, it is better to have some Makefile var with some default, that >> allows overriding it when doing a make install, for example: >> >> UDEVDIR=/etc/udev/rules.d > > > Well, if you *insist* on doing this, sure, but better to do this: > UDEVDIR=/lib/udev as the default, and then use $(UDEVDIR)/rules.d/ (and let packagers > redefine UDEVDIR if desired - though I don't think that will be as > common as you believe). Do you know, by any chance, what's the minimal udev version where /lib/udev exists? If it is too old, then I agree that pointing the default to /lib/udev is the better. >> The default is a matter of personal taste. I would keep the current way as default, >> as it avoids breaking for those that are using it on the current way. One alternative >> would be to add some logic there to change the default to /lib/* if /etc/* doesn't >> exist. > > > But /etc/udev/rules.d/ should exist regardless, and it's not at all a > matter of personal taste, as I understand it. /lib/udev/rules.d/ is > the location for packaged and general default rules files to be placed, > and /etc/udev/rules.d/ is where autogenerated rules (such as those that > create persistent symlinks for optical and network devices) are placed, > as well as admin- and system-specific override rules (e.g. a file named > 10-blah.rules in /etc/udev/rules.d/ would completely override a file of > the same name in /lib/udev/rules.d/). Ok. > > The point I'm trying to make is this: you lose nothing in the way of user customization by defaulting to /lib/udev/rules.d/ - you simply force it to happen the way that upstream udev intends. The only thing > you lose is support for older udev releases, and I'm not sure that's > a big concern :-) > > (CC'd udev mail list so that someone can LART me if I'm wrong) ;-) Thanks! > > -RW Mauro. -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, 3 May 2011, Mauro Carvalho Chehab wrote: > Em 02-05-2011 23:48, Robby Workman escreveu: >> On Mon, 2 May 2011, Mauro Carvalho Chehab wrote: >> >>> Not sure what happened, but I lost the original email, so let me quote >>> it from patchwork ID#699151. >>> >>>> Subject: [PATCHES] Misc. trivial fixes >>>> Date: Tue, 12 Apr 2011 02:10:36 -0000 >>>> From: Robby Workman <rworkman@slackware.com> >>>> X-Patchwork-Id: 699151 >>>> Message-Id: <alpine.LNX.2.00.1104111908050.32072@connie.slackware.com> >>>> To: linux-media@vger.kernel.org >>>> >>>> Patch #1 installs udev rules files to /lib/udev/rules.d/ instead >>>> of /etc/udev/rules.d/ - see commit message for more info. >>>> >>>> Patch #2 allows override of manpage installation directory by >>>> packagers - see commit message for more info >>> >>> Please send each patch in-lined, one patch per email. >> >> >> Okay, noted. Should I resend, or is this for future reference? > > If you don't mind, please re-send it. Please c/c me, as we're having some > troubles with patchwork nowadays. Sure, will do in just a bit. >>> Not all distros use /lib for it. In fact, RHEL5/RHEL6/Fedora 15 and Fedora rawhide >>> all use /etc/udev/rules.d. >> >> If so, it's only older distros that I wouldn't expect to be packaging newer >> versions of v4l-utils (e.g. RHEL won't as I understand it), and for Fedora, >> if "rawhide" is devel tree, then I'm pretty sure you're mistaken. > > We've packaged v4l-utils for RHEL, via epel[1]. I volunteered to maintain it for RHEL6, > as I use it on my machine and I would be doing it anyway for me, so better to maintain > it for the others also ;) > > [1] https://admin.fedoraproject.org/pkgdb/acls/name/v4l-utils > > I don't intend to maintain it for RHEL5, but I was told that lots of mythtv users run > CentOS (based on RHEL5). So, I won't doubt if someone from CentOS (or other rpm repos > for .el5, like atrpms) would add v4l-utils there. Okay, fair enough. > Do you know, by any chance, what's the minimal udev version where /lib/udev exists? > > If it is too old, then I agree that pointing the default to /lib/udev is the better. Here's a casual look into udev's git log: commit 05b9640022d25a75923cc7809409914491a5f9da Author: Kay Sievers <kay.sievers@vrfy.org> Date: Fri Jul 18 16:26:55 2008 +0200 release 125 ... commit 282988c4f8a85c28468e6442e86efe51dc71cc93 Author: Kay Sievers <kay.sievers@vrfy.org> Date: Fri Jul 18 15:56:03 2008 +0200 move default rules from /etc/udev/rules.d/ to /lib/udev/rules.d/ ... So that's almost three years ago... -RW -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/Make.rules b/Make.rules index 0bb2eb8..875828a 100644 --- a/Make.rules +++ b/Make.rules @@ -11,6 +11,7 @@ PREFIX = /usr/local LIBDIR = $(PREFIX)/lib # subdir below LIBDIR in which to install the libv4lx libc wrappers LIBSUBDIR = libv4l +MANDIR = $(PREFIX)/share/man # These ones should not be overriden from the cmdline diff --git a/utils/keytable/Makefile b/utils/keytable/Makefile index 29a6ac4..e093280 100644 --- a/utils/keytable/Makefile +++ b/utils/keytable/Makefile @@ -39,7 +39,7 @@ install: $(TARGETS) install -m 644 -p rc_keymaps/* $(DESTDIR)/etc/rc_keymaps install -m 755 -d $(DESTDIR)/lib/udev/rules.d install -m 644 -p 70-infrared.rules $(DESTDIR)/lib/udev/rules.d - install -m 755 -d $(DESTDIR)$(PREFIX)/share/man/man1 - install -m 644 -p ir-keytable.1 $(DESTDIR)$(PREFIX)/share/man/man1 + install -m 755 -d $(DESTDIR)$(MANDIR)/man1 + install -m 644 -p ir-keytable.1 $(DESTDIR)$(MANDIR)/man1 include ../../Make.rules