惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
博客园_首页
H
Help Net Security
WordPress大学
WordPress大学
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
罗磊的独立博客
博客园 - 三生石上(FineUI控件)
B
Blog
I
InfoQ
SecWiki News
SecWiki News
T
Tailwind CSS Blog
Spread Privacy
Spread Privacy
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
P
Palo Alto Networks Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Vercel News
Vercel News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
Kaspersky official blog
M
MIT News - Artificial intelligence
S
Schneier on Security
T
Threat Research - Cisco Blogs
F
Fortinet All Blogs
Cyberwarzone
Cyberwarzone
Scott Helme
Scott Helme
aimingoo的专栏
aimingoo的专栏
Martin Fowler
Martin Fowler
MyScale Blog
MyScale Blog
The Cloudflare Blog
Recent Announcements
Recent Announcements
Security Latest
Security Latest
G
GRAHAM CLULEY
IT之家
IT之家
Y
Y Combinator Blog
The Last Watchdog
The Last Watchdog
腾讯CDC
Google DeepMind News
Google DeepMind News
V
V2EX
S
Securelist
TaoSecurity Blog
TaoSecurity Blog
B
Blog RSS Feed
S
SegmentFault 最新的问题
博客园 - 叶小钗
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Project Zero
Project Zero
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure

debian – my $log;

My Free Software Activities in Jul-Sep 2017
Packaging SoftiWARP kernel module for Debian
by Alex Muntada · 2014-06-19 · via debian – my $log;

One of the HPC clusters we have at work has a mixed set of nodes: a few of them have InfiniBand interfaces and the others don’t. A few weeks ago we were requested to install the SoftiWARP kernel module on those nodes that lack the InfiniBand interface. We had already tried to build the module from source and it worked well, but now the challenge was to install it as a Debian package with DKMS, so it would be built for all installed kernel versions on each node.

We use Puppet to manage cluster node configuration, so you may wonder why not using Puppet instead. Well, for one we’re talking about installing the source of a kernel module, with no configuration at all. But there’s also the fact that Puppet delegates to package providers the management of software, which know much better how to deal with software upgrades. Lastly, there’s the challenge of learning something new: though I had previous knowlegde of DKMS, I had no idea on how to make a Debian package out of it.

Fortunately, I found Evgeny Golov‘s DKMS playground on Debian wiki. With those tips and my recently updated experience on packaging Perl modules for Debian, I was confident enough to try my first DKMS Debian package. Actually, it came out quite easy: I just had to adapt debian/rules a bit to accommodate modern debhelper best practices:

#!/usr/bin/make -f
pdkms:=siw-dkms
sname:=siw
sversion:=$(shell dpkg-parsechangelog|grep "^Version:"|cut -d" " -f2|rev|cut -d- -f2-|rev|cut -d':' -f2)
 
%:
    dh $@
 
override_dh_auto_install:
    dh_installdirs -p$(pdkms)  usr/src/$(sname)-$(sversion)
    cp -a *.txt Makefile *.c *.h debian/$(pdkms)/usr/src/$(sname)-$(sversion)
    sed "s/__VERSION__/$(sversion)/g" debian/dkms.conf.in > debian/$(pdkms)/usr/src/$(sname)-$(sversion)/dkms.conf

Funny enough, I spend more time filling the details on debian/copyright and debian/control files than actually setting up DKMS, so big kudos to Evgeni!

Take a look at the full debian packaging for further details. You may notice that this package has a dependency on libsiw-dev (SoftiWARP userland library), which I had to package first and was a bit trickier. More on that next time.