[asterisk-bugs] [JIRA] (DAHLIN-337) Unable to build DAHDI-Linux 2.9.1 in mock chroot

Elwin Andriol (JIRA) noreply at issues.asterisk.org
Sat Mar 29 14:17:19 CDT 2014


    [ https://issues.asterisk.org/jira/browse/DAHLIN-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=216917#comment-216917 ] 

Elwin Andriol edited comment on DAHLIN-337 at 3/29/14 2:16 PM:
---------------------------------------------------------------

I was able to confirmed this issue by building a .deb package, with pbuilder on Debian Wheezy.

It issue is not specific to any OS or building environment. It's in fact a series of bugs in *drivers/dahdi/firmware/Makefile*. The Makefile is calling the *build_tools/install_firmware* script in order to install firmware. The install_firmware scripts expects the DESTDIR (essentially you installation prefix) variable as its third parameter, but the Makefile only supplies 2 parameters on each invocation.

As long as things are being installed in the system's root directory, this issue does not show because DESTDIR is an empty variable in that case. It is nonetheless a serious bug that will cause trouble for anybody involved in packaging DAHDI-linux.


was (Author: e.andriol):
I was able to confirmed this issue by building a .deb package, with pbuilder on Debian Wheezy.

It issue is not specific to any OS or building environment. It's in fact a series of bugs in *drivers/dahdi/firmware/Makefile*. The Makefile is calling the *build_tools/install_firmware* script in order to install firmware. The install_firmware scripts expects the DESTDIR (essentially you installation prefix) variable as its third parameter, but the Makefile only supplies 2 parameters on each invocation.

As long as things are being installed in the system's root directory, this issue does not show because DESTDIR is an empty variable in that case. It is nonetheless a serious bug that will cause trouble for anybody involved in packaging DAHDI-linux.

I am new to this issue tracker and have not yet found out how to attach a patch file. I'll just post it here in this comment, to illustrate what changes need to be made to the Makefile.

{noformat}
diff -urN dahdi-linux-2.9.1.orig/drivers/dahdi/firmware/Makefile dahdi-linux-2.9.1/drivers/dahdi/firmware/Makefile
--- dahdi-linux-2.9.1.orig/drivers/dahdi/firmware/Makefile      2014-03-28 21:18:36.000000000 +0100
+++ dahdi-linux-2.9.1/drivers/dahdi/firmware/Makefile   2014-03-29 19:41:05.113926652 +0100
@@ -126,21 +126,21 @@
 
 # Install all downloaded firmware images for hotplug usage
 hotplug-install: $(DESTDIR)/usr/lib/hotplug/firmware $(DESTDIR)/lib/firmware $(FIRMWARE)
-       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-032 $(OCT6114_032_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-064 $(OCT6114_064_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-128 $(OCT6114_128_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-256 $(OCT6114_256_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-tc400m $(TC400M_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-hx8 $(HX8_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-vpmoct032 $(VPMOCT032_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-te820 $(WCT820_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-te133 $(TE133_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-te134 $(TE134_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-te435 $(TE435_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-a8a $(A8A_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-a8b $(A8B_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-a4a $(A4A_VERSION)
-       @$(INSTALL_FIRMWARE) dahdi-fw-a4b $(A4B_VERSION)
+       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-032 $(OCT6114_032_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-064 $(OCT6114_064_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-128 $(OCT6114_128_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-oct6114-256 $(OCT6114_256_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-tc400m $(TC400M_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-hx8 $(HX8_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-vpmoct032 $(VPMOCT032_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-te820 $(WCT820_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-te133 $(TE133_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-te134 $(TE134_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-te435 $(TE435_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-a8a $(A8A_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-a8b $(A8B_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-a4a $(A4A_VERSION) $(DESTDIR)
+       @$(INSTALL_FIRMWARE) dahdi-fw-a4b $(A4B_VERSION) $(DESTDIR)
 
 # Uninstall any installed dahdi firmware images from hotplug firmware directories
 hotplug-uninstall:
{noformat}

> Unable to build DAHDI-Linux 2.9.1 in mock chroot
> ------------------------------------------------
>
>                 Key: DAHLIN-337
>                 URL: https://issues.asterisk.org/jira/browse/DAHLIN-337
>             Project: DAHDI-Linux
>          Issue Type: Bug
>      Security Level: None
>          Components: General
>         Environment: Both Fedora 20 and CentOS 6.5 Koji/mock chroots
>            Reporter: Anthony Messina
>            Assignee: Russ Meyerriecks
>         Attachments: dahdi-linux-2.9.1-hotplug-install-fix.diff
>
>
> Unfortunately, after
> http://git.asterisk.org/gitweb/?p=dahdi/linux.git;a=commitdiff;h=6cebc1c1fb12cc0661f3810ef47ad33206b2e398
> I am unable to build DAHDI-Linux in a mock chroot for packaging purposes.  I 
> believe this is related to the Makefile calling install_firmware with only 2 
> args, where install_firmware is a shell script with DESTDIR set to $3, which 
> is empty.
> In this case, the DESTDIR evaluates to "/usr/lib/hotplug/firmware", rather 
> than "<buildroot_destdir>/usr/lib/hotplug/firmware".
> make -C drivers/dahdi/firmware hotplug-install 
> DESTDIR=/builddir/build/BUILDROOT/dahdi-linux-2.9.1-1.fc20.x86_64 
> HOTPLUG_FIRMWARE=yes
> make[1]: Entering directory `/builddir/build/BUILD/dahdi-
> linux-2.9.1/drivers/dahdi/firmware'
> mkdir -p /builddir/build/BUILDROOT/dahdi-
> linux-2.9.1-1.fc20.x86_64/usr/lib/hotplug/firmware
> mkdir -p /builddir/build/BUILDROOT/dahdi-
> linux-2.9.1-1.fc20.x86_64/lib/firmware
> Installing dahdi-fw-oct6114-032.bin to hotplug firmware directories
> install: cannot create regular file '/usr/lib/hotplug/firmware': No such file 
> or directory
> make[1]: *** [hotplug-install] Error 1
> make[1]: Leaving directory `/builddir/build/BUILD/dahdi-
> linux-2.9.1/drivers/dahdi/firmware'
> make: *** [install-firmware] Error 2



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list