From 04f087b504beb327ddf058eb6749696b4b6629af Mon Sep 17 00:00:00 2001 From: Ben Olden-Cooligan Date: Sun, 31 Mar 2024 23:35:25 -0700 Subject: [PATCH] Tools: Sign DEBs --- NAPS2.Tools/Project/Packaging/DebPackager.cs | 7 ++++++- NAPS2.Tools/Project/Packaging/PackageCommand.cs | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NAPS2.Tools/Project/Packaging/DebPackager.cs b/NAPS2.Tools/Project/Packaging/DebPackager.cs index e6ae1fa56a..c5b001bc5d 100644 --- a/NAPS2.Tools/Project/Packaging/DebPackager.cs +++ b/NAPS2.Tools/Project/Packaging/DebPackager.cs @@ -4,7 +4,7 @@ namespace NAPS2.Tools.Project.Packaging; public static class DebPackager { - public static void PackageDeb(PackageInfo pkgInfo) + public static void PackageDeb(PackageInfo pkgInfo, bool noSign) { var debPath = pkgInfo.GetPath("deb"); Output.Info($"Packaging deb: {debPath}"); @@ -69,6 +69,11 @@ public static void PackageDeb(PackageInfo pkgInfo) Cli.Run("dpkg-deb", $"-Zxz --root-owner-group --build {workingDir} {debPath}"); + if (!noSign) + { + Cli.Run("debsigs", $"--sign=origin {debPath}"); + } + Output.OperationEnd($"Packaged deb: {debPath}"); } } \ No newline at end of file diff --git a/NAPS2.Tools/Project/Packaging/PackageCommand.cs b/NAPS2.Tools/Project/Packaging/PackageCommand.cs index fbe378da70..21f43a089b 100644 --- a/NAPS2.Tools/Project/Packaging/PackageCommand.cs +++ b/NAPS2.Tools/Project/Packaging/PackageCommand.cs @@ -39,7 +39,7 @@ public int Run(PackageOptions opts) ZipArchivePackager.PackageZip(GetPackageInfoForConfig("Release-Zip")); break; case PackageType.Deb: - DebPackager.PackageDeb(GetPackageInfoForConfig()); + DebPackager.PackageDeb(GetPackageInfoForConfig(), opts.NoSign); break; case PackageType.Rpm: RpmPackager.PackageRpm(GetPackageInfoForConfig(), opts.NoSign);