[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: alternative debian/rules



Thomas Goirand <zigo@debian.org> writes:

> Agreed. Especially when I see that this:

> echo .nr g 2 | cat - cpio.1 | \
>             gzip -n9 >debian/pax/usr/share/man/man1/paxcpio.1.gz

> is called "obfuscation", then doom it as unacceptable for the archive.

I'm generally in favor of using standardized packaging tools, and I think
it's better to not use hand-rolled build systems (although we're still
doing it for Policy for I think justifiable reasons).  However, the above
is not in the slightest bit obfuscated; I also have to object to that.

That code adds the line ".nr g 2" to the start of cpio.1 and adds it to
the package as paxcpio.1.gz.  There's nothing obscure about that -- it's
all standard UNIX tools that most Debian packagers should be familiar with
-- except for the ".nr g 2" part, and that's just because not everyone
reads *roff.  A random hunk of Haskell code is equally obscure to me, but
that doesn't mean Haskell is obfuscated.

For the record, .nr g 2 sets the g register to the value 2.  From context,
I bet upstream ships a man page that can generate either cpio or paxcpio
documentation and switches between them based on the setting of the g
register.

I wrote the above paragraph without looking at the file, just to keep
myself honest, and have now looked at the file, and it's exactly what I
thought except that it actually switches between mircpio, paxcpio, and
cpio:

.Sh NAME
.ie \ng==1 \{\
.Nm mircpio
.Nd copy file archives in and out
.\}
.el .ie \ng==2 \{\
.Nm paxcpio
.Nd copy file archives in and out
.\}
.el \{\
.Nm cpio
.Nd copy file archives in and out
.\}

This is normal *roff code familiar to anyone who writes *roff.  The above
is a reasonably elegant way of handling generation of the paxcpio man page
that minimizes code duplication.  There's nothing objectionable about it.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: