Skip to content

Conversation

@htravis123
Copy link
Contributor

This pull request fixes several problems that were preventing DAHDI from installing/working properly on openSUSE Leap 16.0 (though it may help for other releases of Leap, as well as Tumbleweed; it's just that Leap 16.0 is what I have on hand).

In commit order:

  1. openSUSE places kernel source code in /usr/src/linux-*, which was not checked for in the script, causing kernel header detection to fail. I added the aforementioned path to the ls command run by this portion of the script.
  2. An additional package, kernel-default-devel, is required to build kernel modules. It was added to the DAHDI pre-requisite list for zypper.
  3. The path to the kernel Makefile patched by PhreakScript when DAHDI is to be installed uses a hard-coded path of /usr/lib/linux-kbuild-major.minor. openSUSE does not use this path, instead using the source path mentioned in 1. I added a scrappy check for the default path being missing, in which case it will set it to an openSUSE path.
  4. The pre-requisite list for Zypper doesn't explicitly list Autoconf/Automake, and Libtool, which resulted in them not getting installed, causing the DAHDI build to fail very early on. I added these packages to the list.
  5. By default, in openSUSE (and SLE as well), the loading of kernel modules deemed "unsupported" (e.g. those not signed by SUSE) is disabled. Zypper users will now see a message on enabling unsupported modules after installation, if DAHDI was installed.

Added a check for openSUSE Leap in the package manager detector section.
openSUSE uses a different path format for kernel headers that was not checked for by install_kernel_headers(), resulting in an error. This commit adds detection for these paths.
In openSUSE, one of the "kernel-*-devel" packages is required to build kernel modules, otherwise PhreakScript fails to find the kernel build directory. This commit adds the "default" version (a safe assumption, given it's for the standard kernel) of this package to the list of kernel module-related packages that zypper is told to install.
openSUSE does not place kernel build directories in /usr/lib/linux-kbuild-*. This commit adds a check for /usr/src/linux-*, where it is located, in case the first path doesn't exist.
…y code

I forgot a newline in the "no build directory found" message, so I added one.
Because autoconf wasn't installed, the DAHDI tools installation failed, so I added it to the list of packages.
…n unsupported modules.

After installing libtool and automake, DAHDI finally built sucessfully, so I added them to the prereqs.
I also discovered that openSUSE disables the loading of "unsupported" (i.e. external, not signed by SUSE) kernel modules, so I added a message that displays on zypper-based systems that have installed DAHDI that tells the user how to enable loading them, otherwise DAHDI won't work.
Copy link
Contributor Author

@htravis123 htravis123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I placed the packages in the main prerequisite list to match the existing code. The branches for the other package managers also install the same packages regardless of whether or not DAHDI was selected to be installed, so I figured I'd do the same here.

@InterLinked1
Copy link
Owner

I placed the packages in the main prerequisite list to match the existing code. The branches for the other package managers also install the same packages regardless of whether or not DAHDI was selected to be installed, so I figured I'd do the same here.

You're right, it's not consistent... hardly surprising given how organically this has grown.

I'll let it pass for now, there are some upcoming changes to Asterisk that will require autotools when building from Git now, so it's not the end of the world if they get installed.

Copy link
Owner

@InterLinked1 InterLinked1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing autotools packages on all path okay for now

@InterLinked1 InterLinked1 merged commit 316d5e2 into InterLinked1:master Jan 13, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants