Closed alejandro-colomar closed 4 months ago
I don't need this anymore. I found a way to set up my server for building the PDFs with just building the manual pages, without actually installing them to a temp dir. So I guess it's better to not touch it; we have more important, broken, stuff to fix.
Thank you, Eli!
So what I'm getting out of this is that I spent my time discovering a solution for an xyproblem. :(
(What PDF? shadow doesn't have any build rules for such.)
So what I'm getting out of this is that I spent my time discovering a solution for an xyproblem. :(
Sorry! We can merge it if you want, though. I don't like wasting your time. And it's an improvement.
I just think this build system is too bad for all I want to do with it, that either I discard my ideas, or I workaround them, or I'll fight too many people to nuke this build system to get a better one (and I don't like fighting anyone). I'm not necessarily saying that it's autotools. Maybe there's a good way of using autotools, but in the projects I've seen it used (admittedly, just a few), it's so complex, and some things don't work, that I think a GNUmakefile-based carefully-hand-written build system, would be better.
(What PDF? shadow doesn't have any build rules for such.)
Someone asked about having online manual pages: https://github.com/shadow-maint/shadow/issues/872
And since I already do online PDF pages for the Linux man-pages project, I thought I could do the same for shadow, by fooling the Linux man-pages build system:
https://www.alejandro-colomar.es/share/dist/shadow/git/HEAD/man/
(The Chinese version is still bogus, due to a font problem, but the rest looks good.)
I will put the githooks(5) under some git(1) repository soon, but for now, it's this thing:
alx@www:/srv/src/alx/shadow/alx/shadow.git$ cat hooks/post-update
#!/bin/bash
set -Eeuo pipefail;
cd /home/alx/src/shadow/shadow/.bare.git/;
unset $(git rev-parse --local-env-vars);
git fetch srv >/dev/null;
export LANG=C.utf8;
test "$1" = "refs/heads/master" \
&& (
cd /home/alx/src/shadow/shadow/master/;
git reset srv/master --hard >/dev/null;
cd /home/alx/src/shadow/shadow/master-build/;
make -j4 -Orecurse --no-print-directory;
echo '$?: '"$?";
cd /home/alx/src/linux/man-pages/man-pages/shadow/;
git reset srv/shadow --hard >/dev/null;
MANDIR=/home/alx/src/shadow/shadow/master-build/man;
_LMBDIR=/srv/www/share/dist/shadow/git/HEAD/man;
GROFFBINDIR=/opt/local/gnu/groff/deri-gropdf-ng/bin;
PRECONV=$GROFFBINDIR/preconv;
PIC=$GROFFBINDIR/pic;
TBL=$GROFFBINDIR/tbl;
EQN=$GROFFBINDIR/eqn;
TROFF=$GROFFBINDIR/troff;
GROPDF=$GROFFBINDIR/gropdf;
make_book()
{
make build-book \
"PRECONV=$PRECONV" \
"PIC=$PIC" \
"TBL=$TBL" \
"EQN=$EQN" \
"TROFF=$TROFF" \
"GROPDF=$GROPDF" \
"$@" \
2>&1 \
| sed '/bashrc.*PS1/d';
}
make_book_lang()
{
LMB="shadow-HEAD_$1.pdf";
make_book \
"builddir=.tmp_$1" \
"MANDIR=$MANDIR/$1" \
"_LMBDIR=$_LMBDIR" \
"LMB=$LMB";
}
make_book "MANDIR=$MANDIR" "_LMBDIR=$_LMBDIR" "LMB=shadow-HEAD.pdf";
make_book_lang "da";
make_book_lang "de";
make_book_lang "fr";
make_book_lang "it";
make_book_lang "pl";
make_book_lang "ru";
make_book_lang "sv";
make_book_lang "uk";
make_book_lang "zh_CN";
echo '$?: '"$?";
)
The x problem for the y you solved, would be to be able to do all the stuff I do with the Linux man-pages build system, for example, make lint
and make build-book
(well, build-book
needs some custom files at the moment that it's probably not worth it, but lint
would be interesting).
Also related: https://github.com/shadow-maint/shadow/issues/795
Cc: @thesamesam From: @eli-schwartz