Skip to content

Commit

Permalink
Merge pull request #165 from matteotenca/fix_debian_9.1.0_dkms
Browse files Browse the repository at this point in the history
Change Ubuntu/Debian files, now create rapiddisk-dkms and debug packages
  • Loading branch information
pkoutoupis committed Apr 30, 2023
2 parents 4ab06bb + 8d9b4ea commit 5ea6271
Show file tree
Hide file tree
Showing 10 changed files with 51 additions and 26 deletions.
2 changes: 2 additions & 0 deletions pkg/debian/changelog
Expand Up @@ -16,6 +16,8 @@ rapiddisk (9.1.0-1) UNRELEASED; urgency=medium
* New upstream release.
* Changed Build-Depends to adapt to the new dependency relations between 'dkms' and 'dh_dkms'
starting with Ubuntu 22.10 Kinetic.
* Now four packages are created, rapiddisk, rapiddisk-dkms and
rapiddisk-on-boot, plus the debugging package.

-- Matteo Tenca <matteo.tenca@gmail.com> Mon, 28 Apr 2023 00:00:00 +0000

Expand Down
3 changes: 1 addition & 2 deletions pkg/debian/clean
@@ -1,3 +1,2 @@
debian/rapiddisk.install
debian/rapiddisk.rapiddiskd.service

debian/rapiddisk-dkms.install
24 changes: 19 additions & 5 deletions pkg/debian/control
@@ -1,16 +1,30 @@
Source: rapiddisk
Section: misc
Section: kernel
Priority: optional
Maintainer: Matteo Tenca <matteo.tenca@gmail.com>
Build-Depends: debhelper, dh-dkms | dh-sequence-dkms | dkms, libjansson-dev, libmicrohttpd-dev, libpcre2-dev, libdevmapper-dev
Homepage: https://github.com/pkoutoupis/rapiddisk/
Vcs-Browser: https://github.com/pkoutoupis/rapiddisk/
Vcs-Git: https://github.com/pkoutoupis/rapiddisk.git
Standards-Version: 4.4.1
Testsuite: autopkgtest-pkg-dkms

Package: rapiddisk-dkms
Architecture: all
Depends: dkms, ${misc:Depends}
Suggests: rapiddisk, rapiddisk-on-boot
Description: Linux RAM Drive and Caching kernel modules (DKMS)
This software defined advanced RAM drive and storage
caching solution. This suite includes a collection of modules,
configuration files, and command line utilities for managing
RapidDisk enabled storage volumes and accessing them either
locally or across an NVMe Target network.
.
This is the kernel module for Linux.

Package: rapiddisk
Architecture: amd64
Depends: dkms, ${shlibs:Depends}, ${misc:Depends}
Architecture: any
Depends: rapiddisk-dkms, ${shlibs:Depends}, ${misc:Depends}
Suggests: rapiddisk-on-boot
Description: RapidDisk
The RapidDisk software defined advanced RAM drive and storage
Expand All @@ -20,8 +34,8 @@ Description: RapidDisk
locally or across an NVMe Target network.

Package: rapiddisk-on-boot
Architecture: amd64
Depends: rapiddisk
Architecture: all
Depends: rapiddisk, rapiddisk-dkms
Description: RapidDisk Boot Install Script
Allows to install a RapidDisk cache on the boot
volume manipulating the initramfs-tools configuration.
Expand Down
7 changes: 3 additions & 4 deletions pkg/debian/rapiddisk.dkms → pkg/debian/dkms
@@ -1,10 +1,9 @@
PACKAGE_NAME="rapiddisk"
PACKAGE_NAME="rapiddisk-dkms"
PACKAGE_VERSION="#MODULE_VERSION#"
MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build"
CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean"
BUILT_MODULE_NAME[0]="rapiddisk"
BUILT_MODULE_NAME[1]="rapiddisk-cache"
DEST_MODULE_LOCATION[0]="/kernel/rapiddisk/"
DEST_MODULE_LOCATION[1]="/kernel/rapiddisk/"
DEST_MODULE_LOCATION[0]="/extra/"
DEST_MODULE_LOCATION[1]="/extra/"
AUTOINSTALL="yes"
REMAKE_INITRD="yes"
File renamed without changes.
5 changes: 5 additions & 0 deletions pkg/debian/rapiddisk-dkms.install.in
@@ -0,0 +1,5 @@
module/Makefile usr/src/PDKMS-DEB_VERSION_UPSTREAM
module/rapiddisk-cache.c usr/src/PDKMS-DEB_VERSION_UPSTREAM
module/rapiddisk.c usr/src/PDKMS-DEB_VERSION_UPSTREAM
module/rapiddisk.txt usr/src/PDKMS-DEB_VERSION_UPSTREAM

12 changes: 12 additions & 0 deletions pkg/debian/rapiddisk.README.Debian
@@ -0,0 +1,12 @@
rapiddisk for Debian
-----------------
The systemd service file "rapiddiskd.service" is copied from the source tree
to the debian directory with the name changed to "rapiddiskd.service", on each
build.

The dh_clean target deletes all the files ending in ".orig" in the build tree,
leading to the removal of two project files under "scripts/rapiddisk-rootdev".
This problem is fixed overriding the dh_clean target and excluding those
files.

-- Matteo Tenca <matteo.tenca@gmail.com> Sat, 07 May 2022 05:44:16 +0200
1 change: 1 addition & 0 deletions pkg/debian/rapiddisk.docs
@@ -0,0 +1 @@
doc/API.txt
5 changes: 0 additions & 5 deletions pkg/debian/rapiddisk.install.in

This file was deleted.

18 changes: 8 additions & 10 deletions pkg/debian/rules
Expand Up @@ -4,19 +4,21 @@
#export DH_VERBOSE = 1

# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

DEB_BUILD_OPTIONS += noautodbgsym
#DEB_BUILD_OPTIONS += noautodbgsym

PDKMS:=rapiddisk-dkms

JOBS:=$(patsubst parallel=%,-j%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))

Expand All @@ -32,22 +34,18 @@ override_dh_clean:

override_dh_auto_install:
$(MAKE) -$(MAKEFLAGS) $(JOBS) -C $(CURDIR)/src install DESTDIR=$(CURDIR)/debian/rapiddisk
sed -e "s/DEB_VERSION_UPSTREAM/$(DEB_VERSION_UPSTREAM)/g" debian/rapiddisk.install.in > debian/rapiddisk.install

override_dh_install:
install -T -g root -o root -m 755 -D $(CURDIR)/debian/rapiddisk-on-boot_kernel_prerm $(CURDIR)/debian/rapiddisk-on-boot/etc/kernel/prerm.d/rapiddisk-on-boot
sed -e "s/DEB_VERSION_UPSTREAM/$(DEB_VERSION_UPSTREAM)/g" -e "s/PDKMS/$(PDKMS)/g" debian/rapiddisk-dkms.install.in > debian/rapiddisk-dkms.install
dh_install

override_dh_installsystemd:
dh_installsystemd --name=rapiddiskd

override_dh_auto_test:

override_dh_dkms:
override_dh_dkms-indep:
dh_dkms -V $(DEB_VERSION_UPSTREAM)

override_dh_dwz:

%:
dh ${@} --with dkms

0 comments on commit 5ea6271

Please sign in to comment.