[Asterisk-Dev] zaptel rpm submission

Mark Spencer markster at digium.com
Sun Apr 6 10:47:21 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.

> 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?

> - Defined RPMVERSION and RPMRELEASE variables in the Makefile

Fine :)

> - 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?

> - Added 'ztpost' target to build ztpost script from ztpost.in template file.
> Moved all of the device construction and other post-installation code into
> this script.

Hrm okay.

> - Added 'zaptel.spec' target to build zaptel.spec from zaptel.spec.in
> template

Yah.

> - 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.

> - In my particular situation, I needed to build with
> KFLAGS+=-DCONFIG_ZAPATA_NET and also build 'sethdlc' to get hdlc support.  I
> noticed zaptel builds fine with this defined, even w/no hdlc support in the
> kernel.  So, is it safe to leave it defined all the time?  If not, what's a
> good test for automatically defining it if hdlc is enabled in the kernel?
> My test for automatically defining CONFIG_ZAPATA_NET or not currently fails.

You could check in /boot/System.map but that's somewhat specific to
RedHat.

Mark




More information about the asterisk-dev mailing list