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

debian: Switch to quilt format #1072

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dangerzone (0.8.1) unstable; urgency=low
dangerzone (0.8.1-1) unstable; urgency=low

* Released Dangerzone 0.8.1

-- Freedom of the Press Foundation <[email protected]> Tue, 22 December 2024 22:03:28 +0300
-- Freedom of the Press Foundation <[email protected]> Tue, 22 Dec 2024 22:03:28 +0300

dangerzone (0.8.0) unstable; urgency=low

Expand Down
2 changes: 1 addition & 1 deletion debian/source/format
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0 (native)
3.0 (quilt)
43 changes: 7 additions & 36 deletions install/linux/build-deb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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__":
Expand Down
Loading