debian: Switch to quilt format
Some checks failed
Build dev environments / Build dev-env (debian-bookworm) (push) Has been cancelled
Build dev environments / Build dev-env (debian-bullseye) (push) Has been cancelled
Build dev environments / Build dev-env (debian-trixie) (push) Has been cancelled
Build dev environments / Build dev-env (fedora-39) (push) Has been cancelled
Build dev environments / Build dev-env (fedora-40) (push) Has been cancelled
Build dev environments / Build dev-env (fedora-41) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-20.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-22.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-24.04) (push) Has been cancelled
Build dev environments / Build dev-env (ubuntu-24.10) (push) Has been cancelled
Build dev environments / build-container-image (push) Has been cancelled
Check branch conformity / prevent-fixup-commits (push) Has been cancelled
Tests / run-lint (push) Has been cancelled
Tests / build-container-image (push) Has been cancelled
Tests / Download and cache Tesseract data (push) Has been cancelled
Scan latest app and container / security-scan-container (push) Has been cancelled
Scan latest app and container / security-scan-app (push) Has been cancelled
Tests / build-deb (debian trixie) (push) Has been cancelled
Tests / windows (push) Has been cancelled
Tests / macOS (arch64) (push) Has been cancelled
Tests / macOS (x86_64) (push) Has been cancelled
Tests / build-deb (debian bookworm) (push) Has been cancelled
Tests / build-deb (debian bullseye) (push) Has been cancelled
Tests / build-deb (ubuntu 20.04) (push) Has been cancelled
Tests / build-deb (ubuntu 22.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.04) (push) Has been cancelled
Tests / build-deb (ubuntu 24.10) (push) Has been cancelled
Tests / install-deb (debian bookworm) (push) Has been cancelled
Tests / install-deb (debian bullseye) (push) Has been cancelled
Tests / install-deb (debian trixie) (push) Has been cancelled
Tests / install-deb (ubuntu 20.04) (push) Has been cancelled
Tests / install-deb (ubuntu 22.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.04) (push) Has been cancelled
Tests / install-deb (ubuntu 24.10) (push) Has been cancelled
Tests / build-install-rpm (fedora 39) (push) Has been cancelled
Tests / build-install-rpm (fedora 40) (push) Has been cancelled
Tests / build-install-rpm (fedora 41) (push) Has been cancelled
Tests / run tests (debian bookworm) (push) Has been cancelled
Tests / run tests (debian bullseye) (push) Has been cancelled
Tests / run tests (debian trixie) (push) Has been cancelled
Tests / run tests (fedora 39) (push) Has been cancelled
Tests / run tests (fedora 40) (push) Has been cancelled
Tests / run tests (fedora 41) (push) Has been cancelled
Tests / run tests (ubuntu 20.04) (push) Has been cancelled
Tests / run tests (ubuntu 22.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.04) (push) Has been cancelled
Tests / run tests (ubuntu 24.10) (push) Has been cancelled

Switch to quilt package format, and use `dpkg-buildpackage -b` to build
the new Python package.
This commit is contained in:
Alex Pyrgiotis 2025-02-05 17:23:11 +02:00
parent 3c80b2d2fb
commit f64615555b
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
2 changed files with 8 additions and 37 deletions

View file

@ -1 +1 @@
3.0 (native)
3.0 (quilt)

View file

@ -21,22 +21,6 @@ def run(cmd):
def main():
parser = argparse.ArgumentParser(
prog=sys.argv[0],
description="Dev script for building Dangerzone debs",
)
# FIXME: The name of the distro is important, as it can help users who are upgrading
# from a distro version to another. If we *do* need to provide a name at some point,
# here's a suggestion on how we should tackle naming:
#
# https://github.com/freedomofpress/dangerzone/pull/322#issuecomment-1428665162
parser.add_argument(
"--distro",
required=False,
help="The name of the Debian-based distro",
)
args = parser.parse_args()
dist_path = root / "dist"
deb_dist_path = root / "deb_dist"
@ -46,28 +30,15 @@ def main():
if os.path.exists(deb_dist_path):
shutil.rmtree(deb_dist_path)
print("* Building DEB package")
if args.distro is None:
deb_ver = "1"
else:
deb_ver = args.distro
run(
[
"dpkg-buildpackage",
]
)
print("* Building binary-only DEB package")
run(["dpkg-buildpackage", "-b"])
os.makedirs(deb_dist_path, exist_ok=True)
print("")
print("* To install run:")
# dpkg-buildpackage produces a .deb file in the parent folder
# that needs to be copied to the `deb_dist` folder manually
src = root.parent / f"dangerzone_{version}_amd64.deb"
destination = root / "deb_dist" / f"dangerzone_{version}-{deb_ver}_amd64.deb"
shutil.move(src, destination)
print(f"sudo dpkg -i {destination}")
print("The following files have been created:")
for src in root.parent.glob(f"dangerzone_{version}*"):
dest = deb_dist_path / src.name
shutil.move(src, dest)
print(f"{dest}")
if __name__ == "__main__":