Mailing List Archive

Building source packages and LIRC
Hi,

I have 1 question and 1 request. Apologies if this belongs on the
-users list, but there doesn't seem to be much traffic there.

Question: Is there some magic to building source packages from ATrpms?

I need to rebuild the lirc package to include IRman support (I made a
libirman rpm using checkinstall). It only requires a 1-line change to
the spec file, but whenever I try to build it from the source rpm,
rpmbuild complains with "Unknown tag: %kernelmodule". If I comment out
that line in the spec file, it complains about another tag, etc...

I get similar errors trying to build other source packages from ATrpms.
Is there something I'm missing?

Request:

Would it be possible to include IRman support in the ATrpms lirc
package? IRman support is not a LIRC kernel module, but needs to
(statically) link lircd with libirman.

-JAC
Re: Building source packages and LIRC [ In reply to ]
Hi,

On Thu, Mar 04, 2004 at 10:11:04AM -0500, J. Caputo wrote:
> I have 1 question and 1 request. Apologies if this belongs on the
> -users list, but there doesn't seem to be much traffic there.

There isn't that much more traffic here either ;)
(lists are not yet publicly announced anywhere)
But your questions are 100% -devel ;)

> Question: Is there some magic to building source packages from ATrpms?

Unfortunately for kernel module packages, yes.

> I need to rebuild the lirc package to include IRman support (I made a
> libirman rpm using checkinstall). It only requires a 1-line change to
> the spec file, but whenever I try to build it from the source rpm,
> rpmbuild complains with "Unknown tag: %kernelmodule". If I comment out
> that line in the spec file, it complains about another tag, etc...
>
> I get similar errors trying to build other source packages from ATrpms.
> Is there something I'm missing?

These macros accomodate the package to the preconfigured environment
of the ATrpms build system. While the macros have been _designed_ to
be replaceable by end user implementations, there are none yet, and it
looks difficult to construct one without preconfigured kernels (the
problem is that kernel modules require a kernel source tree configured
and 'make dep'ed with the target kernels config file, removing the
"custom" safety suffix in the top level Makefile etc. A naive
implementation would install kernel-source and copy the tree to
another location to do that)

So currently kernel modules cannot be rebuilt. But ATrpms is extending
to more developers, and as more eyes look at the build system chaos,
the more likely it is that a nice implementation emerges.

> Request:
>
> Would it be possible to include IRman support in the ATrpms lirc
> package? IRman support is not a LIRC kernel module, but needs to
> (statically) link lircd with libirman.

Yes, what would the one-liner look like? A

BuildRequires: libirman-devel

or something like that? I guess it also requires a libirman package. ;)
--
Axel.Thimm@physik.fu-berlin.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.atrpms.net/pipermail/atrpms-devel/attachments/20040304/d806fbd5/attachment.bin
Re: Building source packages and LIRC [ In reply to ]
On Thursday 04 March 2004 11:19, you wrote:
> Hi,
>
> On Thu, Mar 04, 2004 at 10:11:04AM -0500, J. Caputo wrote:
> > I have 1 question and 1 request. Apologies if this belongs on the
> > -users list, but there doesn't seem to be much traffic there.
>
> There isn't that much more traffic here either ;)
> (lists are not yet publicly announced anywhere)
> But your questions are 100% -devel ;)
>
> > Question: Is there some magic to building source packages from
> > ATrpms?
>
> Unfortunately for kernel module packages, yes.
>
> > I need to rebuild the lirc package to include IRman support (I made
> > a libirman rpm using checkinstall). It only requires a 1-line
> > change to the spec file, but whenever I try to build it from the
> > source rpm, rpmbuild complains with "Unknown tag: %kernelmodule".
> > If I comment out that line in the spec file, it complains about
> > another tag, etc...
> >
> > I get similar errors trying to build other source packages from
> > ATrpms. Is there something I'm missing?
>
> These macros accomodate the package to the preconfigured environment
> of the ATrpms build system. While the macros have been _designed_ to
> be replaceable by end user implementations, there are none yet, and
> it looks difficult to construct one without preconfigured kernels
> (the problem is that kernel modules require a kernel source tree
> configured and 'make dep'ed with the target kernels config file,
> removing the "custom" safety suffix in the top level Makefile etc. A
> naive implementation would install kernel-source and copy the tree to
> another location to do that)
>
> So currently kernel modules cannot be rebuilt. But ATrpms is
> extending to more developers, and as more eyes look at the build
> system chaos, the more likely it is that a nice implementation
> emerges.

Ah, but I don't need to build the kernel modules... any way to create a
lirc-irman source package that doesn't include all the kernel module
stuff?

>
> > Request:
> >
> > Would it be possible to include IRman support in the ATrpms lirc
> > package? IRman support is not a LIRC kernel module, but needs to
> > (statically) link lircd with libirman.
>
> Yes, what would the one-liner look like? A
>
> BuildRequires: libirman-devel
>
> or something like that? I guess it also requires a libirman
package.atrpms-devel@atrpms.net

Well, libirman is *only* a -devel package, really. When you build it,
you only get libirman.a and irman.h (Well, there's also an executable
'workmanir', but it's not necessary for LIRC, and I think it's really
no use to anyone, unless you're trying to develop IRman applications
without LIRC). I created a package for it using 'checkinstall' just
for convenience, but I didn't really have to...

So, I'm not really well-versed in RPM spec files, so I didn't bother
with the dependencies... actually, looking at it some more, it doesn't
even require the change I thought it did. Your spec file builds the
main "lirc" package with "--with-driver=any", which will try to build
*all* available drivers. If libirman.a is available, the LIRC
configure script will find it and build in IRman support if it can.

To use the IRman, it also requires that "/dev/lirc" be a symlink to the
serial port where the IRman is connected. Don't know how you'd handle
this... oh, wait, I just saw that the LIRC configure script has a
"--with-tty=" option for IRman, so you'd probably want a default serial
port there? Hmmm... don't know how to handle that. Well, one step at a
time!

-JAC
Re: Building source packages and LIRC [ In reply to ]
On Thu, Mar 04, 2004 at 11:37:46AM -0500, J. Caputo wrote:
> On Thursday 04 March 2004 11:19, you wrote:
> > > I need to rebuild the lirc package to include IRman support (I made
> > > a libirman rpm using checkinstall). [...]

> > > Would it be possible to include IRman support in the ATrpms lirc
> > > package? IRman support is not a LIRC kernel module, but needs to
> > > (statically) link lircd with libirman.

Could you test the libirman and new lirc rpms? Thanks!
--
Axel.Thimm@physik.fu-berlin.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.atrpms.net/pipermail/atrpms-devel/attachments/20040306/f40c6995/attachment.bin
Re: Building source packages and LIRC [ In reply to ]
On Saturday 06 March 2004 12:39, Axel Thimm wrote:
> On Thu, Mar 04, 2004 at 11:37:46AM -0500, J. Caputo wrote:
> > On Thursday 04 March 2004 11:19, you wrote:
> > > > I need to rebuild the lirc package to include IRman support (I
> > > > made a libirman rpm using checkinstall). [...]
> > > >
> > > > Would it be possible to include IRman support in the ATrpms
> > > > lirc package? IRman support is not a LIRC kernel module, but
> > > > needs to (statically) link lircd with libirman.
>
> Could you test the libirman and new lirc rpms? Thanks!

(Replying to list... forgot last time!)

OK... results:

The 'lirc' binary package doesn't really need to depend on the
'libirman' package... there's no run-time dependency. Instead, the
'libirman' package needs to be installed on the machine where the
'lirc' binary package is being built -- the LIRC './configure' script
will only build in IRman support if it can find 'libirman.a' to link
against.

The '/usr/bin/lircd' executable in your new 'lirc' package
(lirc-0.7.0-22_cvs20040304.rhfc1.at) does not have IRman support. To
test it, try running:

/usr/sbin/lircd --driver=irman --device=/dev/ttyS0

I get:
Driver `irman' not supported.
Supported drivers:
audio
bte
creative
creative_infracd
default
dev/input
dsp
livedrive_midi
livedrive_seq
logitech
mp3anywhere
null
pinsys
pixelview
silitek
tira
udp
uirt2
uirt2_raw


-Joe