[Asterisk-Dev] zaptel rpm submission
Carey Jung
carey at itfreedom.com
Sun Apr 6 16:54:44 MST 2003
>
> > - Broke up the 'install' target into two pieces, 'install-files' and
> > 'post-install', corresponding to the RPM '%install' and '%post'
> sections.
>
> Okay, so long as none of this breaks the existing normal behaviors.
>
No, it doesn't, but I need to pull the CONFIG_ZAPATA_NET define back out of
the normal build. Probably the simplest thing to do is define two targets,
'rpm' and 'rpm-hdlc', to build without or with hdlc support.
> > All of the 'mknode' calls, modules.conf munging, ldconfig calls, and
> > chkconfig calls, etc. -- which require root access -- are done by
> > 'post-install'. Moreover, since the build environment is not
> available at
> > %post execution time, I had to move all of the 'post-install'
> stuff into a
> > 'ztpost' script, which gets installed as part of the RPM.
>
> Hrm... Is there a way to "fix" that?
I don't think there's really anything to fix. Editing of modules.conf must
be deferred until rpm install time on the client machine. The same is true
for the calls to ldconfig, chkconfig, depmod, etc. The calls to mknode
could be performed at RPM build time, if run as root, but why bother, since
not everything can be done then, anyhow. (Plus, it's a good idea to be able
to build everything as non-root.)
So, since some stuff must be deferred until the rpm is installed, those
post-install steps need to make their way into the spec file. Since we also
want to keep them available to the standard 'make install' command and also
not replicate code unnecessarily, I'm kinda stuck with putting them into a
shell script that'll work in both situations.
>
> > - Added -DCONFIG_ZAPATA_NET to KFLAGS automatically, based on a test for
> > hdlc.h in the kernel source tree. (Note: see Questions below)
>
> No-can-do... hdlc support is not, by default, built in a redhat
> kernel.
>
> > - Build sethdlc automatically, using same test above.
> > - Added $(SETHDLC) to 'all' target
>
> I think sethdlc fails to compile on some systems, not because the header
> isn't there, but because it is different somehow. Perhaps we can make it
> default in your RTP target?
Okay, hows this? I just defined two targets, 'rpm' and 'rpm-hdlc', to build
an rpm without or with hdlc support.
>
> > - Added 'rpm' target to build zaptel RPM. This requires no
> root access, so
> > long as your rpm build and source trees are accessible.
> (Usually by defining
> > %_topdir and %buildroot in ~/.rpmmacros.) (I was just thinking,
> though, that
> > it shouldn't be too difficult at all to do the entire build in a tmp
> > directory.)
>
> I dunno, I try to stick with pretty conventional stuff in the Makefiles
> whenever I can, since it makes it easier to maintain.
No problem. I'll leave it as is.
>
> You could check in /boot/System.map but that's somewhat specific to
> RedHat.
It also assumes that you're building against the same kernel you're running
on the build machine.
Attached is an updated tarball of
zaptel/{Makefile,zaptel.spec.in,ztpost.in}.
Carey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: zaptel-mods.tar
Type: application/x-tar
Size: 20480 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20030406/56ce89c5/zaptel-mods.tar
More information about the asterisk-dev
mailing list