summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McQuah <jmcquah@disroot.org>2022-02-12 14:31:52 +0100
committerJuergen Daubert <jue@jue.li>2022-02-12 14:31:52 +0100
commit3ea64833ee045309080b2232fb2753c52538398f (patch)
treedb2d7a23997ce3517c26b14336d17680efa5a168
parent5db0bb84891807585d88ef630e3edcffce753025 (diff)
downloadprt-utils-3ea64833ee045309080b2232fb2753c52538398f.tar.gz
prt-utils-3ea64833ee045309080b2232fb2753c52538398f.tar.xz
portspage: augment portspage with the ability to find and print the signify public key
-rwxr-xr-xportspage32
1 files changed, 28 insertions, 4 deletions
diff --git a/portspage b/portspage
index 683e561..9a79f2f 100755
--- a/portspage
+++ b/portspage
@@ -1,16 +1,18 @@
#!/usr/bin/perl -w
-our $version = "1.0.4";
+our $version = "1.0.5";
########################################################################
#
-# portspage (http://www.karsikkopuu.net/crux/scripts/)
+# portspage
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This is a script for generating CRUX port listings.
# Distributed under the terms of the GPL license.
-# Report bugs and suggestions to <jukka@karsikkopuu.net>.
+# Report bugs and suggestions to jmcquah at disroot dot org.
#
# Changelog:
+# 1.0.5
+# - Added a table row containing the signify public key
# 1.0.4
# - Added --date-from-pkgfile (patch from Mikhail Kolesnik)
# 1.0.3
@@ -23,6 +25,7 @@ our $version = "1.0.4";
########################################################################
use strict;
+use Cwd qw(cwd getcwd);
our %options =
(
@@ -229,7 +232,28 @@ EOH
close(FILE);
}
+
+
+
print " <table width=\"100%\" cellspacing=\"0\">\n";
+ my $CWD = getcwd;
+ my @repopath = split /\//, $CWD;
+ my $repo = $repopath[$#repopath];
+ my $pubkey = "/etc/ports/".$repo.".pub";
+ if (-e $pubkey) {
+ open(KH, $pubkey) or die "Couldn't read from public key!";
+ while (my $line = <KH>) {
+ chomp $line;
+ if ($line =~ "untrusted comment") {
+ }
+ else {
+ print " <tr class=\"header\"><td colspan=\"4\">\n";
+ print " <strong>Signify public key:</strong> $line\n";
+ print " </td></tr>\n";
+ }
+ }
+ close(KH);
+ }
print " <tr class=\"header\"><td><b>Port</b></td><td><b>Version</b></td><td><b>Description</b></td>";
if ($options{timestamp_accuracy} > 0)
{
@@ -293,7 +317,7 @@ EOH
close(FILE);
}
- print " <p><i>Generated by <a href=\"http://www.karsikkopuu.net/crux/scripts/\">portspage</a> $version on " . isotime() . ".</i></p>\n";
+ print " <p><i>Generated by portspage $version on " . isotime() . ".</i></p>\n";
print <<EOH;
</body>

Generated by cgit