Skip to content

Commit

Permalink
Merge pull request #417 from martin-belanger/debian-updates
Browse files Browse the repository at this point in the history
debian: Updated debian control file to match upstream Debian Pkg
  • Loading branch information
martin-belanger authored Feb 2, 2024
2 parents fa285b0 + 31c0939 commit 8b3a952
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 29 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
uses: actions/checkout@v4

- name: "BLACK"
uses: psf/black@stable
uses: psf/black@23.7.0
with:
options: "--check --diff --color --line-length 120 --skip-string-normalization --extend-exclude (subprojects|debian|.build)"
src: "."
48 changes: 34 additions & 14 deletions debian/control
Original file line number Diff line number Diff line change
@@ -1,23 +1,43 @@
Source: nvme-stas
Section: misc
Section: net
Priority: optional
Maintainer: Martin Belanger <[email protected]>
Build-Depends: debhelper-compat (= 12), python3-setuptools, dh-python, meson, ninja-build
Standards-Version: 4.4.1
Homepage: https://nvme-stas.readthedocs.io/en/latest/
Build-Depends:
debhelper-compat (= 13),
dh-python,
docbook-xml,
docbook-xsl,
iproute2,
libglib2.0-dev-bin,
meson,
python3-lxml,
python3:any,
xsltproc,
Rules-Requires-Root: no
Standards-Version: 4.6.2
Homepage: https://github.com/linux-nvme/nvme-stas
Vcs-Browser: https://github.com/linux-nvme/nvme-stas
Vcs-Git: https://github.com/linux-nvme/nvme-stas.git
#Testsuite: autopkgtest-pkg-python

Package: nvme-stas
Section: net
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, python3-pyudev, python3-systemd, python3-gi, python3-dasbus, python3-libnvme
Description: NVMe STorage Appliance Services
This package provides two daemons, stafd and stacd. The STorage Appliance
Finder Daemon (stafd) automatically discovers NVMe-oF Discovery Controllers (DC)
and retrieves the list of NVMe Storage Appliances. The STorage Appliance
Connector Daemon (stacd) establishes I/O connections to the NVMe Storage
Appliances discovered by stafd.
Depends:
python3-dasbus,
python3-gi,
python3-libnvme,
python3-pyudev,
python3-systemd,
${misc:Depends},
${python3:Depends},
Description: NVMe Storage Appliance Services (STAS)
NVMe over Fabrics (NVMe-oF) is the concept of using a transport protocol over
a network to connect remote NVMe devices. nvme-stas contains two services,
stafd and stacd, to be used to access NVMe over TCP:
.
This package installs the library for Python 3.

* Storage Appliance Finder (stafd):
automatically locate Central or Direct Discovery Controllers (CDC, DDC)
with zeroconf (mDNS).
.
* Storage Appliance Connector (stacd):
setup the I/O controller connections to each storage subsystem.
13 changes: 11 additions & 2 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@
#export PYBUILD_NAME=nvme-stas

%:
dh $@ --with python3 --buildsystem=meson+ninja
dh ${@} --buildsystem=meson+ninja --with python3

override_dh_install:
override_dh_auto_configure:
dh_auto_configure -- -Dman=true

override_dh_auto_test:
dh_auto_test || true

execute_after_dh_auto_install:
# Moving systemd unit directory (#1034225)
mkdir -p debian/nvme-stas/lib/systemd
mv debian/nvme-stas/usr/lib/systemd/system debian/nvme-stas/lib/systemd
rmdir -p --ignore-fail-on-non-empty debian/nvme-stas/usr/lib/systemd
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ summary_dict = {
'dbus_conf_dir ': dbus_conf_dir,
'sd_unit_dir ': sd_unit_dir,
'build location ': meson.current_build_dir(),
'libnvme for tests ': libnvme_location,
'libnvme location ': libnvme_location,
}
summary(summary_dict, section: 'Directories')

Expand Down
8 changes: 5 additions & 3 deletions staslib/avahi.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ def set_identity(self, transport, address, port, txt): # pylint: disable=too-ma
'trsvcid': trsvcid,
# host-iface permitted for tcp alone and not rdma
'host-iface': host_iface,
'subsysnqn': txt.get('nqn', defs.WELL_KNOWN_DISC_NQN).strip()
if conf.NvmeOptions().discovery_supp
else defs.WELL_KNOWN_DISC_NQN,
'subsysnqn': (
txt.get('nqn', defs.WELL_KNOWN_DISC_NQN).strip()
if conf.NvmeOptions().discovery_supp
else defs.WELL_KNOWN_DISC_NQN
),
}

self._ip = iputil.get_ipaddress_obj(traddr, ipv4_mapped_convert=True)
Expand Down
18 changes: 10 additions & 8 deletions test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

srce_dir = meson.current_source_dir()
test_env = environment({'MALLOC_PERTURB_': '0'})
test_env.append('PYTHONMALLOC', 'malloc')
test_list = modules_to_lint + packages_to_lint

libnvme_location = '?'

Expand All @@ -23,9 +25,9 @@ if get_option('libnvme-sel') == 'pre-installed'
rr = run_command(python3, '-c', 'import libnvme; print(f"{libnvme.__path__[0]}")', check: false, env: test_env)
if rr.returncode() == 0
libnvme_location = rr.stdout().strip()
pythonpath = fs.parent(libnvme_location)
test_env.prepend('PYTHONPATH', pythonpath) # Look in standard location first
test_env.append('PYTHONPATH', PYTHONPATH) # Look in the build directory second
libnvme_path = fs.parent(libnvme_location)
PYTHONPATH = ':'.join([libnvme_path, PYTHONPATH])
test_env.prepend('PYTHONPATH', PYTHONPATH)
endif
endif

Expand All @@ -52,7 +54,7 @@ else
# python3 -m pip install --upgrade pylint==2.17.7


if modules_to_lint.length() != 0
if test_list.length() != 0
pylint = find_program('pylint', required: false)
pyflakes = find_program('pyflakes3', required: false)
if not pyflakes.found()
Expand All @@ -65,12 +67,12 @@ else
rcfile = srce_dir / 'pylint.rc'

if pylint.found()
test('pylint', pylint, args: ['--rcfile=' + rcfile] + modules_to_lint + packages_to_lint, env: test_env)
test('pylint', pylint, args: ['--rcfile=' + rcfile] + test_list, env: test_env)
else
warning('Skiping some of the tests because "pylint" is missing.')
endif
if pyflakes.found()
test('pyflakes', pyflakes, args: modules_to_lint, env: test_env)
test('pyflakes', pyflakes, args: test_list, env: test_env)
else
warning('Skiping some of the tests because "pyflakes" is missing.')
endif
Expand Down Expand Up @@ -156,8 +158,8 @@ tools = [
]
vermin = find_program('vermin', required: false)
if vermin.found()
if modules_to_lint.length() != 0
test('vermin code', vermin, args: ['--config-file', srce_dir / 'vermin.conf'] + modules_to_lint, env: test_env)
if test_list.length() != 0
test('vermin code', vermin, args: ['--config-file', srce_dir / 'vermin.conf'] + test_list, env: test_env)
endif
test('vermin tools', vermin, args: ['--config-file', srce_dir / 'vermin-tools.conf'] + tools, env: test_env)
else
Expand Down

0 comments on commit 8b3a952

Please sign in to comment.