Trying to build a RPM for dahdi lead to boot fail on the destination machine
0
votes
0
answers
108
views
I am trying to build a rpm for Centos 7 to be able to install dahdi without the need of build tools on the destination machine.
For that, I tried to create this specs file :
Name: dahdi-linux-complete
Version: 3.1.0+3.1.0
Release: 1%{?dist}
Summary: DAHDI Linux Asterisk kernel modules
License: GPL
URL: http://downloads.digium.com/pub/telephony/dahdi-linux-complete/
Source0: $RPM_SOURCE_DIR/dahdi-linux-complete-3.1.0+3.1.0.tar.gz
BuildRequires: kernel-headers = 3.10.0-1127.8.2.el7, kernel-devel = 3.10.0-1127.8.2.el7
Requires: kernel = 3.10.0-1127.8.2.el7
%description
Kernel modules to use with the Asterisk telephony server.
%prep
%setup -q
%build
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
%make_install
make install-config
%files
%defattr(-,root,root,-)
%doc
/etc/bash_completion.d/dahdi
/etc/dahdi/assigned-spans.conf.sample
/etc/dahdi/modules.sample
/etc/dahdi/span-types.conf.sample
/etc/dahdi/system.conf.sample
/etc/udev/rules.d/dahdi.rules
/etc/udev/rules.d/xpp.rules
/lib/firmware/.dahdi-fw-a4a-a0017
/lib/firmware/.dahdi-fw-a4b-d001e
/lib/firmware/.dahdi-fw-a8a-1d0017
/lib/firmware/.dahdi-fw-a8b-1f001e
/lib/firmware/.dahdi-fw-hx8-2.06
/lib/firmware/.dahdi-fw-oct6114-032-1.05.01
/lib/firmware/.dahdi-fw-oct6114-064-1.05.01
/lib/firmware/.dahdi-fw-oct6114-128-1.05.01
/lib/firmware/.dahdi-fw-oct6114-256-1.05.01
/lib/firmware/.dahdi-fw-tc400m-MR6.12
/lib/firmware/.dahdi-fw-te133-7a001e
/lib/firmware/.dahdi-fw-te134-780017
/lib/firmware/.dahdi-fw-te435-13001e
/lib/firmware/.dahdi-fw-te436-10017
/lib/firmware/.dahdi-fw-te820-1.76
/lib/firmware/.dahdi-fw-vpmoct032-1.12.0
/lib/firmware/dahdi-fw-a4a.bin
/lib/firmware/dahdi-fw-a4b.bin
/lib/firmware/dahdi-fw-a8a.bin
/lib/firmware/dahdi-fw-a8b.bin
/lib/firmware/dahdi-fw-hx8.bin
/lib/firmware/dahdi-fw-oct6114-032.bin
/lib/firmware/dahdi-fw-oct6114-064.bin
/lib/firmware/dahdi-fw-oct6114-128.bin
/lib/firmware/dahdi-fw-oct6114-256.bin
/lib/firmware/dahdi-fw-tc400m.bin
/lib/firmware/dahdi-fw-te133.bin
/lib/firmware/dahdi-fw-te134.bin
/lib/firmware/dahdi-fw-te435.bin
/lib/firmware/dahdi-fw-te436.bin
/lib/firmware/dahdi-fw-te820.bin
/lib/firmware/dahdi-fw-vpmoct032.bin
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_dynamic.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_dynamic_eth.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_dynamic_ethmf.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_dynamic_loc.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_echocan_jpah.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_echocan_kb1.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_echocan_mg2.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_echocan_sec.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_echocan_sec2.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_transcode.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/dahdi_vpmadt032_loader.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/oct612x/oct612x.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/voicebus/dahdi_voicebus.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/wcaxx.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/wcb4xxp/wcb4xxp.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/wct4xxp/wct4xxp.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/wctc4xxp/wctc4xxp.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/wctdm24xxp/wctdm24xxp.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/wcte13xp.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/wcte43x.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/xpp/xpd_bri.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/xpp/xpd_echo.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/xpp/xpd_fxo.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/xpp/xpd_fxs.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/xpp/xpd_pri.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/xpp/xpp.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/dahdi/xpp/xpp_usb.ko
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.alias
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.alias.bin
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.builtin.bin
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.dep
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.dep.bin
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.devname
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.softdep
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.symbols
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.symbols.bin
/usr/include/dahdi/dahdi_config.h
/usr/include/dahdi/fasthdlc.h
/usr/include/dahdi/kernel.h
/usr/include/dahdi/tonezone.h
/usr/include/dahdi/user.h
/usr/include/dahdi/wctdm_user.h
/usr/lib/dracut/dracut.conf.d/50-dahdi.conf
/usr/lib/libtonezone.a
/usr/lib/libtonezone.la
/usr/lib/libtonezone.so
/usr/lib/libtonezone.so.2
/usr/lib/libtonezone.so.2.0
/usr/lib/libtonezone.so.2.0.0
/usr/local/share/perl5/Dahdi.pm
/usr/local/share/perl5/Dahdi/Chans.pm
/usr/local/share/perl5/Dahdi/Config/Gen.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Assignedspans.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Chandahdi.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Freepbxdb.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Modules.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Spantypes.pm
/usr/local/share/perl5/Dahdi/Config/Gen/System.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Unicall.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Users.pm
/usr/local/share/perl5/Dahdi/Config/Gen/Xpporder.pm
/usr/local/share/perl5/Dahdi/Config/Params.pm
/usr/local/share/perl5/Dahdi/Hardware.pm
/usr/local/share/perl5/Dahdi/Hardware/PCI.pm
/usr/local/share/perl5/Dahdi/Hardware/USB.pm
/usr/local/share/perl5/Dahdi/Span.pm
/usr/local/share/perl5/Dahdi/Utils.pm
/usr/local/share/perl5/Dahdi/Xpp.pm
/usr/local/share/perl5/Dahdi/Xpp/Line.pm
/usr/local/share/perl5/Dahdi/Xpp/Mpp.pm
/usr/local/share/perl5/Dahdi/Xpp/Xbus.pm
/usr/local/share/perl5/Dahdi/Xpp/Xpd.pm
/usr/sbin/dahdi_cfg
/usr/sbin/dahdi_genconf
/usr/sbin/dahdi_hardware
/usr/sbin/dahdi_maint
/usr/sbin/dahdi_monitor
/usr/sbin/dahdi_registration
/usr/sbin/dahdi_scan
/usr/sbin/dahdi_span_assignments
/usr/sbin/dahdi_span_types
/usr/sbin/dahdi_speed
/usr/sbin/dahdi_test
/usr/sbin/dahdi_waitfor_span_assignments
/usr/sbin/fxotune
/usr/sbin/lsdahdi
/usr/sbin/sethdlc
/usr/sbin/twinstar
/usr/sbin/xpp_blink
/usr/sbin/xpp_sync
/usr/share/dahdi/FPGA_1141.hex
/usr/share/dahdi/FPGA_1151.hex
/usr/share/dahdi/FPGA_1161.201.hex
/usr/share/dahdi/FPGA_1161.202.hex
/usr/share/dahdi/FPGA_1161.203.hex
/usr/share/dahdi/FPGA_1161.hex
/usr/share/dahdi/FPGA_FXS.hex
/usr/share/dahdi/PIC_TYPE_1.hex
/usr/share/dahdi/PIC_TYPE_2.hex
/usr/share/dahdi/PIC_TYPE_3.hex
/usr/share/dahdi/PIC_TYPE_4.hex
/usr/share/dahdi/PIC_TYPE_6.hex
/usr/share/dahdi/USB_FW.201.hex
/usr/share/dahdi/USB_FW.202.hex
/usr/share/dahdi/USB_FW.203.hex
/usr/share/dahdi/USB_FW.hex
/usr/share/dahdi/USB_RECOV.hex
/usr/share/dahdi/XppConfig.pm
/usr/share/dahdi/astribank_hook
/usr/share/dahdi/dahdi_auto_assign_compat
/usr/share/dahdi/dahdi_handle_device
/usr/share/dahdi/dahdi_span_config
/usr/share/dahdi/handle_device.d/10-span-types
/usr/share/dahdi/handle_device.d/20-span-assignments
/usr/share/dahdi/init_card_1_30
/usr/share/dahdi/init_card_2_30
/usr/share/dahdi/init_card_3_30
/usr/share/dahdi/init_card_4_30
/usr/share/dahdi/init_card_5_30
/usr/share/dahdi/init_card_6_30
/usr/share/dahdi/span_config.d/10-dahdi-cfg
/usr/share/dahdi/span_config.d/20-fxotune
/usr/share/dahdi/span_config.d/50-asterisk
/usr/share/dahdi/waitfor_xpds
/usr/share/dahdi/xpp_fxloader
/usr/share/man/man8/dahdi_cfg.8.gz
/usr/share/man/man8/dahdi_genconf.8.gz
/usr/share/man/man8/dahdi_hardware.8.gz
/usr/share/man/man8/dahdi_maint.8.gz
/usr/share/man/man8/dahdi_monitor.8.gz
/usr/share/man/man8/dahdi_registration.8.gz
/usr/share/man/man8/dahdi_scan.8.gz
/usr/share/man/man8/dahdi_span_assignments.8.gz
/usr/share/man/man8/dahdi_span_types.8.gz
/usr/share/man/man8/dahdi_test.8.gz
/usr/share/man/man8/dahdi_tool.8.gz
/usr/share/man/man8/dahdi_waitfor_span_assignments.8.gz
/usr/share/man/man8/fxotune.8.gz
/usr/share/man/man8/lsdahdi.8.gz
/usr/share/man/man8/twinstar.8.gz
/usr/share/man/man8/xpp_blink.8.gz
/usr/share/man/man8/xpp_sync.8.gz
%changelog
So far it seems to works as expected, but the machine where I am installing the generated rpm will failed at boot, the systemd fails at mounting the efi partition, because it can't find the vfat driver.
Maybe I need to perform a dracut action as a post install hook. But I am not really sure this is what I need to do, and I don't know how to do it.
Update :
it seems that providing one of these files :
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.alias
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.alias.bin
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.builtin.bin
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.dep
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.dep.bin
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.devname
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.softdep
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.symbols
/lib/modules/3.10.0-1127.8.2.el7.x86_64/modules.symbols.bin
Make the kernel fail to load.
For a test I have saved these files, and restored them after the installation of my rpm, the kernel load correctly this time, but dahdi drivers are not loaded.
So it seems that instead of overwriting these files, I have to "patch" them in a post hook script of the rpm ?
Asked by iXô
(327 rep)
Jun 1, 2020, 11:40 AM
Last activity: Jun 1, 2020, 12:30 PM
Last activity: Jun 1, 2020, 12:30 PM