Skip to content

Commit

Permalink
Tools: Sign DEBs
Browse files Browse the repository at this point in the history
  • Loading branch information
cyanfish committed Apr 1, 2024
1 parent da601be commit 04f087b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion NAPS2.Tools/Project/Packaging/DebPackager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
Expand Down Expand Up @@ -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}");
}
}
2 changes: 1 addition & 1 deletion NAPS2.Tools/Project/Packaging/PackageCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 04f087b

Please sign in to comment.