aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--minimun.orig10
-rw-r--r--minimun.spec9
3 files changed, 13 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index dc7175d..32ec7db 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,7 @@ clean:
install: $(DESTDIR) minimun
cp -t $(DESTDIR) minimun format.tex logo.png
+ chown minimun:minimun $(DESTDIR)/{minimun,format.tex,logo.png,}
uninstall:
rm $(DESTDIR)/{minimun,format.tex,logo.png}
diff --git a/minimun.orig b/minimun.orig
index bf07a25..5ad7dc8 100644
--- a/minimun.orig
+++ b/minimun.orig
@@ -41,11 +41,9 @@ else{
$in .= "\\bye\n";
my $timestamp = time;
-run ['/usr/bin/pdftex', '-jobname', "$timestamp", 'format.tex'], '<', \$in, '>', \$out;
+run ['/usr/bin/pdftex', '-jobname', "/tmp/$timestamp", 'format.tex'], '<', \$in, '>', \$out;
print "Content-type: application/pdf\n\n";
-open(DOC, '<', "$timestamp.pdf");
-while (<DOC>){
- print;
-}
+open(DOC, '<', "/tmp/$timestamp.pdf");
+print <DOC>;
close(DOC);
-unlink "$timestamp.pdf", "$timestamp.log";
+unlink "/tmp/$timestamp.pdf", "/tmp/$timestamp.log";
diff --git a/minimun.spec b/minimun.spec
index 4580006..440b6f7 100644
--- a/minimun.spec
+++ b/minimun.spec
@@ -1,7 +1,7 @@
Summary: A perl cgi/pdfTeX script for doc generation
Name: minimun
Version: 1.0
-Release: 1
+Release: 2
License: GPL, Unknown
Source: https://hrhr.dev/src/minimun.tar.gz
URL: https://git.hrhr.dev/minimun/about
@@ -10,6 +10,8 @@ Vendor: Holden Rohrer
Packager: Holden Rohrer <hr@hrhr.dev>
BuildArch: noarch
Requires: perl
+Requires(pre): shadow-utils
+BuildRequires: make
%description
This script builds award documents and room name sheets, for letter-size
@@ -17,6 +19,11 @@ paper. The code is under GPLv3, but the logo's license is unknown.
%global debug_package %{nil}
+%pre
+getent group minimun >/dev/null || groupadd -r minimun
+getent passwd minimun >/dev/null || useradd -r -s /sbin/nologin\
+ -g minimun -c "miniMUN cgi account" -d /usr/lib/minimun -M minimun
+
%prep
%setup