Skip to content

Commit

Permalink
new: dev: update to debian packaging files from packages.debian.org
Browse files Browse the repository at this point in the history
* remove setuptools_scm toml feature and bump build-system requires
* note setuptools versions greater than 59 are only available for
  py37 and higher while minimum required for setuptools_scm is 61
  while setuptools_scm 8 is also too high for py37
* make sure debian control file depends on python3-setuptools-scm
  because it gets parsed by deb-helper scripts
* workaround bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003252
  in debian rules
* fix even more typos and remove superflous MANIFEST.in file
* make sure debian pkg workflow gets a compliant tag version

Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Nov 20, 2023
1 parent 65ab943 commit 864978c
Show file tree
Hide file tree
Showing 41 changed files with 572 additions and 97 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
python-version: [3.6, 3.8, '3.10', '3.11']
python-version: ['3.7', '3.8', '3.10', '3.11']
steps:
- name: Set git crlf/eol
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/debs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install devscripts
debchange -v "`git describe --tags | sed -e "s|v||"`-${{ matrix.dist }}" -b -M --distribution ${{ matrix.dist }} "ci build"
debchange -v "`git describe --tags | sed -e "s|v||" -e "s|-g|+g|"`-${{ matrix.dist }}" -b -M --distribution ${{ matrix.dist }} "ci build"
- name: Build deb packages
uses: jtdor/build-deb-action@v1
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ jobs:
python -m pip install --upgrade pip wheel
pip install tox tox-gh-actions
- name: Run tests
run: |
tox -- --slow
env:
PLATFORM: ${{ matrix.os }}

- name: Build dist pkgs
run: |
tox -e build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- name: Set git crlf/eol
Expand Down
7 changes: 0 additions & 7 deletions MANIFEST.in

This file was deleted.

Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./docs/man1/bmaptool.1
1 change: 1 addition & 0 deletions debian/bmap-tools.debhelper.log
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dh_installchangelogs
1 change: 0 additions & 1 deletion debian/bmap-tools.docs

This file was deleted.

1 change: 0 additions & 1 deletion debian/bmap-tools.install

This file was deleted.

10 changes: 10 additions & 0 deletions debian/bmap-tools.postinst.debhelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Automatically added by dh_python3:
if which py3compile >/dev/null 2>&1; then
py3compile -p bmap-tools
fi
if which pypy3compile >/dev/null 2>&1; then
pypy3compile -p bmap-tools || true
fi

# End automatically added section
10 changes: 10 additions & 0 deletions debian/bmap-tools.prerm.debhelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Automatically added by dh_python3:
if which py3clean >/dev/null 2>&1; then
py3clean -p bmap-tools
else
dpkg -L bmap-tools | perl -ne 's,/([^/]*)\.py$,/__pycache__/\1.*, or next; unlink $_ or die $! foreach glob($_)'
find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir
fi

# End automatically added section
3 changes: 3 additions & 0 deletions debian/bmap-tools.substvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
python3:Depends=python3-defusedxml, python3-gpg, python3-six, python3:any
misc:Depends=
misc:Pre-Depends=
18 changes: 18 additions & 0 deletions debian/bmap-tools/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Package: bmap-tools
Version: 3.7-1
Architecture: all
Maintainer: Simon McVittie <[email protected]>
Installed-Size: 189
Depends: python3, python3-six, python3-defusedxml, python3-gpg, python3:any
Recommends: bzip2, lzop, xz-utils
Suggests: lz4, pbzip2, pigz, unzip
Provides: bmaptool (= 3.7-1)
Section: utils
Priority: optional
Homepage: https://github.com/intel/bmap-tools
Description: tool to flash image files to block devices using the block map
bmaptool is a generic tool for creating the block map (bmap) for a
file, and copying files using the block map. The idea is that large
file containing unused blocks, like raw system image files, can be
copied or flashed a lot faster with bmaptool than with traditional
tools like "dd" or "cp".
17 changes: 17 additions & 0 deletions debian/bmap-tools/DEBIAN/md5sums
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
3bcf4fd352c663b682e65a40e1432915 usr/bin/bmaptool
714494747759c5340efa6611ca8e07f2 usr/lib/python3/dist-packages/bmaptools-3.7.egg-info/PKG-INFO
68b329da9893e34099c7d8ad5cb9c940 usr/lib/python3/dist-packages/bmaptools-3.7.egg-info/dependency_links.txt
6bf9e932ffbe61d8e95254b242e76622 usr/lib/python3/dist-packages/bmaptools-3.7.egg-info/entry_points.txt
76d70de87a9e5f51641493d79799047b usr/lib/python3/dist-packages/bmaptools-3.7.egg-info/requires.txt
9686b27f082b08d16f710d660c620408 usr/lib/python3/dist-packages/bmaptools-3.7.egg-info/top_level.txt
f93de3f4a0918374ac0551e50c115c54 usr/lib/python3/dist-packages/bmaptools/BmapCopy.py
391b6f0887f078d0e5048e4ed55611ad usr/lib/python3/dist-packages/bmaptools/BmapCreate.py
24a73e0934890ac7376c84940f341c66 usr/lib/python3/dist-packages/bmaptools/BmapHelpers.py
a727cec56f6c11f1ae8e8c344bf077ca usr/lib/python3/dist-packages/bmaptools/CLI.py
71fccfdc420a99682f8b309ae818db0c usr/lib/python3/dist-packages/bmaptools/Filemap.py
735d9554f0b50e54d20217350738e25b usr/lib/python3/dist-packages/bmaptools/TransRead.py
d41d8cd98f00b204e9800998ecf8427e usr/lib/python3/dist-packages/bmaptools/__init__.py
abbd31f3215cf5d4c59632b2144ed3d8 usr/share/doc/bmap-tools/changelog.Debian.gz
e2b5a602fcdcf12e4663263701421d2c usr/share/doc/bmap-tools/changelog.gz
e40ad170acd266660792dbb2e44f1a39 usr/share/doc/bmap-tools/copyright
f7081958a7f54818c944d8489b1fd9e5 usr/share/man/man1/bmaptool.1.gz
12 changes: 12 additions & 0 deletions debian/bmap-tools/DEBIAN/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -e

# Automatically added by dh_python3:
if which py3compile >/dev/null 2>&1; then
py3compile -p bmap-tools
fi
if which pypy3compile >/dev/null 2>&1; then
pypy3compile -p bmap-tools || true
fi

# End automatically added section
12 changes: 12 additions & 0 deletions debian/bmap-tools/DEBIAN/prerm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -e

# Automatically added by dh_python3:
if which py3clean >/dev/null 2>&1; then
py3clean -p bmap-tools
else
dpkg -L bmap-tools | perl -ne 's,/([^/]*)\.py$,/__pycache__/\1.*, or next; unlink $_ or die $! foreach glob($_)'
find /usr/lib/python3/dist-packages/ -type d -name __pycache__ -empty -print0 | xargs --null --no-run-if-empty rmdir
fi

# End automatically added section
12 changes: 12 additions & 0 deletions debian/bmap-tools/usr/bin/bmaptool
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/python3
# EASY-INSTALL-ENTRY-SCRIPT: 'bmaptools==3.7','console_scripts','bmaptool'
__requires__ = 'bmaptools==3.7'
import re
import sys
from pkg_resources import load_entry_point

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(
load_entry_point('bmaptools==3.7', 'console_scripts', 'bmaptool')()
)
Binary file not shown.
Binary file not shown.
54 changes: 54 additions & 0 deletions debian/bmap-tools/usr/share/doc/bmap-tools/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: bmap-tools
Source: https://github.com/intel/bmap-tools/releases
Comment:
The initial package was put together by Ed Bartosh <[email protected]>
on Sun Oct 27 22:32:19 EEST 2012.

Files: *
Copyright: © 2012-2014 Intel, Inc.
License: GPL-2

Files: debian/*
Copyright:
© 2012-2013 Intel, Inc.
© 2014-2018 Simon McVittie
License: GPL-2

Files:
debian/tests/web-server.py
Copyright:
© 2017-2019 Red Hat Inc.
License: LGPL-2.1+
Comment: Copied from the Flatpak test suite

License: GPL-2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2,
as published by the Free Software Foundation.
.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
Comment:
On Debian systems, the full text of the GPL v2 can be found
in /usr/share/common-licenses/GPL-2.

License: LGPL-2.1+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Comment:
On Debian systems, the full text of the GNU Lesser General Public License
version 2.1 can be found in the file '/usr/share/common-licenses/LGPL-2.1'.
Binary file not shown.
Loading

0 comments on commit 864978c

Please sign in to comment.