Skip to content
Merged
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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
### Changed

## [3.9.0]

- copy: add `--removable-device`, `--keyring` and `--fingerprint` options
- Respect query part of the url when operating on the path
- support FTP authentication
- rework GPG tests

## [3.8.0]

- Move project to yoctoproject
- Maintainers change from Artem Bityutskiy (Thank you!) to Trevor Woerner, Joshua Watt, Tim Orling
- Consolidate name as 'bmaptool'

## [3.7.0]
### Added
- Use GitHub Actions for CI (#109)
Expand Down
3 changes: 2 additions & 1 deletion debian/bmaptool.docs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
docs/RELEASE_NOTES
CHANGELOG.md
README.md
1 change: 1 addition & 0 deletions debian/bmaptool.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs/man1/bmaptool.1
9 changes: 9 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
bmaptool (3.9.0) unstable; urgency=low

* copy: add `--removable-device`, `--keyring` and `--fingerprint` options
* Respect query part of the url when operating on the path
* support FTP authentication
* rework GPG tests

-- Trevor Woerner <[email protected]> Fri, 14 Mar 2025 13:46:05 -0600

bmaptool (3.8.0) unstable; urgency=low

* use 'df -P' for POSIX portable output
Expand Down
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

44 changes: 25 additions & 19 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,34 @@ Source: bmaptool
Maintainer: Trevor Woerner <[email protected]>
Section: utils
Priority: optional
Build-Depends: debhelper (>= 9),
python3 (>= 3.8),
python3-setuptools,
Standards-Version: 3.8.4
XS-Python-Version: >= 3.8
Build-Depends:
debhelper-compat (= 13),
dh-sequence-python3,
pybuild-plugin-pyproject,
python3 (>= 3.8),
python3-gpg,
python3-hatchling,
python3-pytest,
Standards-Version: 4.7.0
Homepage: https://github.com/yoctoproject/bmaptool

Package: bmaptool
Architecture: all
Depends: python (>=3.8),
python-gpgme,
${misc:Depends},
${python:Depends},
bzip2,
pbzip2,
gzip,
pigz,
lzop,
liblz4-tool,
xz-utils,
tar,
unzip,
zstd
Depends:
python3,
python3-six,
${misc:Depends},
${python3:Depends},
Recommends:
bzip2,
lzop,
xz-utils,
Suggests:
lz4,
pbzip2,
pigz,
python3-gpg,
unzip,
Description: Tools to generate block map (AKA bmap) and flash images using
bmap. 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
Expand Down
2 changes: 1 addition & 1 deletion debian/copyright
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-name: bmaptool
Upstream-Contact: Trevor Woerner <[email protected]>
Source: https://github.com/yoctoproject/bmaptool
Expand Down
2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/make -f

%:
dh $@ --with=python3
dh $@ --buildsystem=pybuild
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
2 changes: 1 addition & 1 deletion docs/man1/bmaptool.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH BMAPTOOL "1" "March 2024" "bmaptool 3.8.0" "User Commands"
.TH BMAPTOOL "1" "March 2025" "bmaptool 3.9.0" "User Commands"

.SH NAME

Expand Down
36 changes: 7 additions & 29 deletions make_a_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fatal() {

usage() {
cat <<EOF
Usage: ${0##*/} <new_ver> <outdir>
Usage: ${0##*/} <new_ver>

<new_ver> - new bmaptool version to make in X.Y.Z format
EOF
Expand All @@ -43,10 +43,10 @@ ask_question() {
while true; do
printf "%s\n" "$question (yes/no)?"
IFS= read answer
if [ "$answer" == "yes" ]; then
if [ "$answer" = "yes" ]; then
printf "%s\n" "Very good!"
return
elif [ "$answer" == "no" ]; then
elif [ "$answer" = "no" ]; then
printf "%s\n" "Please, do that!"
exit 1
else
Expand All @@ -63,7 +63,7 @@ format_changelog() {
local width="$((80-$pfx_len))"

while IFS= read -r line; do
printf "%s\n" "$line" | fold -c -s -w "$width" | \
printf "%s\n" "$line" | fold -s -w "$width" | \
sed -e "1 s/^/$pfx1/" | sed -e "1! s/^/$pfx2/" | \
sed -e "s/[\t ]\+$//"
done < "$logfile"
Expand All @@ -78,12 +78,6 @@ new_ver="$1"; shift
printf "%s" "$new_ver" | egrep -q -x '[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+' ||
fatal "please, provide new version in X.Y.Z format"

# Make sure that the current branch is 'main'
current_branch="$(git branch | sed -n -e '/^*/ s/^* //p')"
if [ "$current_branch" != "main" ]; then
fatal "current branch is '$current_branch' but must be 'main'"
fi

# Make sure the git index is up-to-date
[ -z "$(git status --porcelain)" ] || fatal "git index is not up-to-date"

Expand All @@ -92,7 +86,7 @@ ask_question "Did you update the man page"
ask_question "Did you update tests: test-data and oldcodebase"

# Change the version in the 'bmaptool/CLI.py' file
sed -i -e "s/^VERSION = \"[0-9]\+\.[0-9]\+\.[0-9]\+\"$/VERSION = \"$new_ver\"/" bmaptool/CLI.py
sed -i -e "s/^VERSION = \"[0-9]\+\.[0-9]\+\.[0-9]\+\"$/VERSION = \"$new_ver\"/" src/bmaptool/CLI.py
# Sed the version in the RPM spec file
sed -i -e "s/^Version: [0-9]\+\.[0-9]\+\.[0-9]\+$/Version: $new_ver/" packaging/bmaptool.spec
# Remove the "rc_num" macro from the RPM spec file to make sure we do not have
Expand Down Expand Up @@ -145,27 +139,11 @@ outdir="."
tag_name="v$new_ver"
release_name="bmaptool-$new_ver"

# Create new tag
printf "%s\n" "Creating tag $tag_name"
git tag -m "$release_name" "$tag_name"

# Get the name of the release branch corresponding to this version
release_branch="release-$(printf "%s" "$new_ver" | sed -e 's/\(.*\)\..*/\1.0/')"

cat <<EOF
To finish the release:
1. push the $tag_name tag out
2. update the $release_branch with the contents of the 'main' branch
3. point the main branch to the updated $release_branch branch
4. push the main and $release_branch branches out

The commands would be:

#1
git push origin $tag_name
#2
git branch -f $release_branch main
#3
git push origin main:main
git push origin $release_branch:$release_branch
1. Push this change as a PR for review
2. Make a release named '$new_ver' in GitHub after the PR merges
EOF
6 changes: 6 additions & 0 deletions packaging/bmaptool.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Mar 14 07:46:05 PM UTC 2025 - Trevor Woerner <[email protected]> 3.9.0-1
- copy: add `--removable-device`, `--keyring` and `--fingerprint` options
- Respect query part of the url when operating on the path
- support FTP authentication
- rework GPG tests

Tue Mar 19 03:44:10 UTC 2024 - Trevor Woerner <[email protected]> 3.8.0-1
- use 'df -P' for POSIX portable output
- bmaptool has new maintainers
Expand Down
2 changes: 1 addition & 1 deletion packaging/bmaptool.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Name: bmaptool
Summary: Tools to generate block map (AKA bmap) and flash images using bmap
Version: 3.8.0
Version: 3.9.0
%if 0%{?opensuse_bs}
Release: %{rc_str}.<CI_CNT>.<B_CNT>
%else
Expand Down
2 changes: 1 addition & 1 deletion src/bmaptool/CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
from typing import NamedTuple
from . import BmapCreate, BmapCopy, BmapHelpers, TransRead

VERSION = "3.8.0"
VERSION = "3.9.0"

log = logging.getLogger() # pylint: disable=C0103

Expand Down
4 changes: 2 additions & 2 deletions tests/oldcodebase/BmapCopy1_0.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable-all

""" This module implements copying of images with bmap and provides the
"""This module implements copying of images with bmap and provides the
following API.
1. BmapCopy class - implements copying to any kind of file, be that a block
device or a regular file.
Expand Down Expand Up @@ -30,7 +30,7 @@
stick (namely, you copy only mapped blocks). This is a lot faster than copying
all 4GiB of data. We say that it is a bit more than 100MiB because things like
file-system meta-data (inode tables, superblocks, etc), partition table, etc
also contribute to the mapped blocks and are also copied. """
also contribute to the mapped blocks and are also copied."""

# Disable the following pylint recommendations:
# * Too many instance attributes (R0902)
Expand Down
4 changes: 2 additions & 2 deletions tests/oldcodebase/BmapCopy2_0.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable-all

""" This module implements copying of images with bmap and provides the
"""This module implements copying of images with bmap and provides the
following API.
1. BmapCopy class - implements copying to any kind of file, be that a block
device or a regular file.
Expand Down Expand Up @@ -30,7 +30,7 @@
stick (namely, you copy only mapped blocks). This is a lot faster than copying
all 4GiB of data. We say that it is a bit more than 100MiB because things like
file-system meta-data (inode tables, superblocks, etc), partition table, etc
also contribute to the mapped blocks and are also copied. """
also contribute to the mapped blocks and are also copied."""

# Disable the following pylint recommendations:
# * Too many instance attributes (R0902)
Expand Down
4 changes: 2 additions & 2 deletions tests/oldcodebase/BmapCopy2_1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable-all

""" This module implements copying of images with bmap and provides the
"""This module implements copying of images with bmap and provides the
following API.
1. BmapCopy class - implements copying to any kind of file, be that a block
device or a regular file.
Expand Down Expand Up @@ -30,7 +30,7 @@
stick (namely, you copy only mapped blocks). This is a lot faster than copying
all 4GiB of data. We say that it is a bit more than 100MiB because things like
file-system meta-data (inode tables, superblocks, etc), partition table, etc
also contribute to the mapped blocks and are also copied. """
also contribute to the mapped blocks and are also copied."""

# Disable the following pylint recommendations:
# * Too many instance attributes (R0902)
Expand Down
4 changes: 2 additions & 2 deletions tests/oldcodebase/BmapCopy2_2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable-all

""" This module implements copying of images with bmap and provides the
"""This module implements copying of images with bmap and provides the
following API.
1. BmapCopy class - implements copying to any kind of file, be that a block
device or a regular file.
Expand Down Expand Up @@ -30,7 +30,7 @@
stick (namely, you copy only mapped blocks). This is a lot faster than copying
all 4GiB of data. We say that it is a bit more than 100MiB because things like
file-system meta-data (inode tables, superblocks, etc), partition table, etc
also contribute to the mapped blocks and are also copied. """
also contribute to the mapped blocks and are also copied."""

# Disable the following pylint recommendations:
# * Too many instance attributes (R0902)
Expand Down
4 changes: 2 additions & 2 deletions tests/oldcodebase/BmapCopy2_3.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable-all

""" This module implements copying of images with bmap and provides the
"""This module implements copying of images with bmap and provides the
following API.
1. BmapCopy class - implements copying to any kind of file, be that a block
device or a regular file.
Expand Down Expand Up @@ -30,7 +30,7 @@
stick (namely, you copy only mapped blocks). This is a lot faster than copying
all 4GiB of data. We say that it is a bit more than 100MiB because things like
file-system meta-data (inode tables, superblocks, etc), partition table, etc
also contribute to the mapped blocks and are also copied. """
also contribute to the mapped blocks and are also copied."""

# Disable the following pylint recommendations:
# * Too many instance attributes (R0902)
Expand Down
4 changes: 2 additions & 2 deletions tests/oldcodebase/BmapCopy2_4.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pylint: disable-all

""" This module implements copying of images with bmap and provides the
"""This module implements copying of images with bmap and provides the
following API.
1. BmapCopy class - implements copying to any kind of file, be that a block
device or a regular file.
Expand Down Expand Up @@ -30,7 +30,7 @@
stick (namely, you copy only mapped blocks). This is a lot faster than copying
all 4GiB of data. We say that it is a bit more than 100MiB because things like
file-system meta-data (inode tables, superblocks, etc), partition table, etc
also contribute to the mapped blocks and are also copied. """
also contribute to the mapped blocks and are also copied."""

# Disable the following pylint recommendations:
# * Too many instance attributes (R0902)
Expand Down