Skip to content
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

Add scripts/ to spdk-tools Debian package #58

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
spdk (22.01.2-4.01) unstable; urgency=medium

[ Brian J. Murrell ]
* Install setup.sh and friends

-- Brian J. Murrell <[email protected]> Wed, 18 Jan 2023 10:10:22 -0500

spdk (22.01.2-3) unstable; urgency=medium

[ Tom Nabarro ]
* Add patch to fix build with glib 2.3.

-- Tom Nabarro <[email protected]> Tue, 10 Jan 2023 00:00:00 +0000


spdk (22.01.2-2) unstable; urgency=medium

[ Brian J. Murrell ]
* Keep in sync with RPM

-- Brian J. Murrell <[email protected]> Sun, 27 Nov 2022 00:00:00 -0500

spdk (22.01.2-1) unstable; urgency=medium

[ Tom Nabarro ]
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Priority: optional
Maintainer: daos-stack <[email protected]>
Build-Depends:
debhelper,
python,
python3,
libdpdk-dev (>= 21.11.2),
librdmacm-dev,
libibverbs-dev,
Expand Down
54 changes: 41 additions & 13 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/usr/bin/make -f

name := spdk
prefix := /usr
sysconfdir := /etc
exec_prefix := $(prefix)
buildroot := debian/tmp
cflags := -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection

#export DH_VERBOSE = 1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
Expand All @@ -26,23 +33,44 @@ override_dh_auto_clean:
#endif
#
override_dh_auto_configure:
./configure --prefix=/usr \
--disable-tests \
--without-vhost \
--without-crypto \
--without-pmdk \
--without-rbd \
--with-shared \
./configure --prefix=$(prefix) \
--target-arch=haswell \
--disable-tests \
--disable-unit-tests \
--disable-apps \
--without-vhost \
--without-crypto \
--without-pmdk \
--without-rbd \
--with-shared \
--without-iscsi-initiator \
--without-isal \
--without-vtune \
--with-dpdk # =$$PWD/dpdk
--without-isal \
--without-vtune \
--with-dpdk

#override_dh_auto_build:
# make V=1 # -j 8
override_dh_auto_build:
export CFLAGS='$(cflags)'
export CXXFLAGS='$(cflags)'
export FFLAGS='$(cflags)'
export LDFLAGS='-Wl,-z,relro -Wl,-z,now'
dh_auto_build -- CONFIG_ARCH=haswell V=1

override_dh_auto_install:
dh_auto_install -- prefix=/usr libdir=/lib/x86_64-linux-gnu/ datadir=/usr/share
dh_auto_install -- prefix=$(prefix) libdir=/lib/x86_64-linux-gnu/ datadir=$(prefix)/share

# Install tools
mkdir -p ${buildroot}$(prefix)/share/$(name)/scripts

# install the setup tool
cp scripts/setup.sh scripts/common.sh ${buildroot}$(prefix)/share/$(name)/scripts/
mkdir -p ${buildroot}$(prefix)/include/$(name)/
cp include/$(name)/pci_ids.h ${buildroot}$(prefix)/include/$(name)/
# spdk_nvme_identify and spdk_nvme_perf are already installed by default
cp build/examples/lsvmd ${buildroot}/$(prefix)/bin/spdk_nvme_lsvmd
cp build/examples/nvme_manage ${buildroot}/$(prefix)/bin/spdk_nvme_manage

# Change $(prefix)/bin/{env ,}bash
sed -i -e '1s/env //' ${buildroot}$(prefix)/share/$(name)/scripts/setup.sh

override_dh_missing:
dh_missing --fail-missing
1 change: 1 addition & 0 deletions debian/spdk-tools.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/share/spdk/scripts
3 changes: 2 additions & 1 deletion debian/spdk-tools.install
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
usr/bin/*
usr/bin/*
usr/share/spdk/scripts/*
5 changes: 4 additions & 1 deletion spdk.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

Name: spdk
Version: 22.01.2
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 0

Summary: Set of libraries and utilities for high performance user-mode storage
Expand Down Expand Up @@ -229,6 +229,9 @@ rm -f %{buildroot}/%{_libdir}/*.a


%changelog
* Wed Jan 18 2023 Brian J. Murrell <[email protected]> - 0:22.01.2-4
- Keep in sync with Debian build

* Tue Jan 10 2023 Tom Nabarro <[email protected]> - 0:22.01.2-3
- Add patch to fix build with glib 2.3.

Expand Down