-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package evdi as akmod #97
Conversation
Thank you so much for your contribution. First of all, the Travis test is something that is very interesting for supporting CentOS in the future, so it would be great to have that integrated, even if that is not the core value porposal of this PR. On the akmod side of things, I'd rather have @kwizart review this here, if possible. I am not an expert on building akmods, and I don't know if there are any idioms or tests that should pass :-) If @kwizart or the RPMFusion guys require a preliminary version to try this, I could trigger a Travis build for a pre-release branch from this uncommitted PR. Would that be useful? |
Our review process is very different from all travis/ci , so many files wouldn't be relevant. Basically best would be to review the spec/src.rpm from bugzilla.rpmfusion.org. Our review process expect a dedicated bugzilla entry to be created with a spec and src.rpm publication. Thx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a quick review before you can submit each files into the RPM fusion review process.
Please do your best to fix the file and don't hesitate to ask question if anything.
Also please consider to use the bugzilla review process so others rpmfusion contributor can test/review.
evdi-kmod-common.spec
Outdated
@@ -0,0 +1,94 @@ | |||
Name: evdi-kmod-common |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please name this file evdi.spec
It will need to have :
Provides: evid-kmod-common = %{version}-%{release}
evdi-kmod-common.spec
Outdated
Source4: DisplayLink USB Graphics Software for Ubuntu %{_daemon_version}.zip | ||
Source5: 20-displaylink.conf | ||
License: GPLv2.1, MIT and Proprietary | ||
ExclusiveArch: i386 x86_64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have used i686 and x86_64 in evdi-kmod, so you will have to use the same values on both side:
Please use i686 x86_64.
evdi-kmod-common.spec
Outdated
Source2: 99-displaylink.rules | ||
Source3: displaylink-sleep-extractor.sh | ||
# From http://www.displaylink.com/downloads/ubuntu.php | ||
Source4: DisplayLink USB Graphics Software for Ubuntu %{_daemon_version}.zip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you provide displaylink.spec, which seems appropriate given the few files that are maintained in the evdi source tree (scripts/library/etc), you will have to use this file only in the displaylink.spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean so there should be three spec files: evdi, evdi-kmod and displaylink? That would work, but I'd need to move the DKMS part of displaylink.spec into a submodule to avoid the obvious clash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RPM Fusion do not support dkms method, but you can support it if you like to (it would be a separate spec file).
We don't rely on your SCM at all if the spec are imported into RPM Fusion, it will have it's separate life.
You can have all spec into a "rpm" sub-directory of your project.
evdi-kmod-common.spec
Outdated
# From http://www.displaylink.com/downloads/ubuntu.php | ||
Source4: DisplayLink USB Graphics Software for Ubuntu %{_daemon_version}.zip | ||
Source5: 20-displaylink.conf | ||
License: GPLv2.1, MIT and Proprietary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the license as appropriate for earch components)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's also wrong, it should be LGPLv2.1 for libevdi, with the MIT and proprietary bits being the bits in displaylink.spec
evdi-kmod-common.spec
Outdated
BuildRequires: make | ||
|
||
# No sources, so no debug package possible. | ||
%global debug_package %{nil} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then It's probably noarch (specially once you will separate it from displaylink content).
evdi-kmod-common.spec
Outdated
/etc/udev/rules.d/99-displaylink.rules | ||
/etc/X11/xorg.conf.d/20-displaylink.conf | ||
%dir /usr/libexec/displaylink | ||
/usr/libexec/displaylink/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please list files if possible instead of using wildcard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in this case, if it's possible, it would be nice to have an exception to leave it that way so that we have less problems with forward-compatibility in case displaylink renames or adds new files here, and we miss those on our packaging update (which we might not notice in a CI environment without manual verification).
My opinion here is that hardening against delivering an incomplete release is likely a better trade-off than the alternative, but please feel free to convince me otherwise :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that from a single package point of view, using wildcard seems convenient. But as a package maintainer, we want to ensure that no unexpected binaries will conflict with another package on end-user "before" they installed on their system.
This can be achieved by listing them explicitly.
So something like displaylink* is appropriate, but display* (it may conflicts with ImageMagick package that has a display binary among others).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we are already inside /usr/libexec/displaylink
, that's why I thought it would be safe enough. The case I can think of is that the user manually installed displaylink before installing the RPM, but that is an expected clash. Other packages should not be expected to need the /usr/libexec/displaylink
folder, or should we not make that assumption?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using libexec/displaylink is a good idea, specially for content that isn't supposed to be used by end-users directly. Should we expect some binaries to be used by end-users ?
Is this directory relevant for all binaries ?
evdi-kmod-common.spec
Outdated
/etc/X11/xorg.conf.d/20-displaylink.conf | ||
%dir /usr/libexec/displaylink | ||
/usr/libexec/displaylink/* | ||
%dir /var/log/displaylink/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which daemon is resposible to output any log ? Are the log written as root ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume the logs are written by the DisplayLinkManager process which is run by systemd. The logs are written as root.
evdi-kmod.spec
Outdated
for kernel_version in %{?kernel_versions}; do | ||
pushd _kmod_build_${kernel_version%%___*}/ | ||
make V=1 %{?_smp_mflags} \ | ||
KERNEL_UNAME="${kernel_version%%___*}" SYSSRC="${kernel_version##*___}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was taken from the nvidia-kmod which is not the best case to use.
Please have a look on the variables that are appropriate for your project or use the kernel ones.
A quick test here is that you should be able to generate a valid evdi.ko for another kernel than the one you are currenly running on fedora (where a strict dependency is made for external modules to a given kernel uname -r)
evdi-kmod.spec
Outdated
|
||
|
||
%changelog | ||
* Thu May 30 2019 ffgiff <ffgiff@gmail.com> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Best is to use the real name when possible. Also worth to mention the version , release at the end.
rpmdev-bumpspec is the tool to update that as appropriate.
evdi-kmod.spec
Outdated
|
||
%changelog | ||
* Thu May 30 2019 ffgiff <ffgiff@gmail.com> | ||
- First version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ident, (use space)
Thank you so much for this review and for the interest in contributing this to RPMFusion! |
Thanks for the review, I'll update the PR in a week or so once I can get around to addressing all the issues. I think it does deserve some changes to be made in displaylink.spec, at least the dkms and libevdi parts need to be submodules so they won't clash with the akmod. That should make the licensing clearer too, but initially I was aiming to keep the change as unobtrusive as possible. I'll also see about making a separate PR for the travis change. |
The patches were provided by abucodonosor and severach. See DisplayLink/evdi#172 (comment) See DisplayLink/evdi#172 (comment)
….4-patch Apply patches to get evdi to compile and install on kernel 5.4.
…support for kernels 5.4 and 5.5.
When uninstalling, we need to remove the symbolic link first.
The changes are: * Updates related to the new evdi driver version 1.7.0. * Update to the released Displaylink driver 5.3.1. * The minimum kernel supported in evdi 1.7.0 is now 4.15. Adjusted the spec accordingly. * Remove Travis build for Fedora 27 since the kernel is no longer supported. * Fix support for DL-6xxx devices. The firmware image was not being copied from the DisplayLink driver package. * Adjust how we use dkms inside the rpm to follow recommended way outlined in the documentation. Resolves displaylink-rpm#112, resolves displaylink-rpm#121, resolves displaylink-rpm#128
Fixes related to evdi devel branch changes
Refactor spec file in preparation for new release The goal of these changes is to provide a more consistent experience when installing and upgrading. These changes have been tested over the past few weeks. Upgrading to new versions of the produced rpm has been tested. Upgrading to newer kernel versions has been tested. This commit does the following: * Update to evdi driver version 1.7.0. * Update to Displaylink driver 5.3.1. * The minimum kernel supported in evdi is now 4.15. Adjusting spec to match. * Fix support for DL-6xxx devices. The firmware image was not being copied from the DisplayLink driver package. * Adjust how we use dkms inside the rpm to follow recommended way in documentation. * Switch spec to using macro for buildroot instead of variable for consistency. * Change hardcoded paths to rpm macros * List out files instead of using a wild card. This Will help catch potential issues if files are missing or changed with new version releases. * Use systemd scriplets for handling systemd unit file * Use systemd preset file to enable displaylink.service by default * Remove call to enable dkms service since this is already enabled by policy on Fedora. * Add logrotate config file
The travis build flagged 'skip_cleanup' as being replaced with cleanup. The change is in a draft and I missed that. We need this back in for releases to work.
* Fixed typo in kernel package name
If 'make' is not installed on the system, then dkms is unable to build the evdi module. Resolves displaylink-rpm#139
Adding Fedora 33 as a target for Travis to build. Closes displaylink-rpm#150
There is a hard coded reference to libevdi.so.1.7.0. Since this version can change based on the currently released module, this patch changes this line to refer to the current version that is being built using the 'version' variable.
There was a typo in the Makefile. Change 'EDVI' reference to 'EVDI'.
It would appear that while in Fedora 30+ the rpmbuild has been able to handle the mangling of the shebang from '#!/bin/bash' to '#!/usr/bin/bash', the build for Fedora 33 is err'ing out. This is an attempt to correct this.
the evdi repository to support it.
Removed the requirement for 'ml' kernel when on RHEL / CentOS 8+ Added a requirement to have epel repository
- Update the module version in the necessary places. - Switch 'make devel' to point to the evdi/v1.7.x branch. This is the only branch that works with the current DisplayLink driver release (5.3.1). - Fix logic in spec for handling RHEL/CentOS 7 and below
For details, see dkms documentation.
Co-authored-by: user <user@x1>
This change brings in support for DisplayLink 5.4 and moves the devel builds to point to the current devel branch for evdi.
This will get around the rate limiting that docker hub is now doing on anonymous pulls.
* Add a 'Provides' to indicate the bundled library in this package. * Add a 'Requires' for libusbx * Use Fedora short names for license field
* Fixup for Fedora. * Add sources file. * Cleanup spec file. * README entry. * Update to the newer DisplayLink driver * Update sources with latest packages * Update spec to reflect Pavel's changes Co-authored-by: Michael L. Young <elgueromexicano@gmail.com>
DisplayLink manager 5.4. Since upstream evdi wasn't tagged properly we need to point to a commit id instead of the tag. Since upstream displaylink-rpm hasn't updated its tag, we still point to the old one.
Reopening this. I've been happily running my own akmods for well over a year now. Notwithstanding the current issues around the evdi 1.9.1 tagging, I'd like to get the ball rolling on this again and ultimately get it into rpmfusion. |
Replaced by #166 as the rework has confused GitHub which produces diffs to the wrong commit on the master branch. |
Create spec files for evdi driver and displaylink userland module.
Add install test on Travis showing that Centos build fails (#13).
Fixes #81