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

Re: Bug#225004: tetex-extra: Type1 fonts should be in a separate package



frank@kuesterei.ch (Frank Küster) wrote:

> You should rather have said "remember we are talking about commands in
> debian/rules"... 

I see. :)

>> sorted and uniq'ed, great. That's all. Or am I mistaken?
>
> You are, in this case:

Oh, yes. My brain stopped reading after the sort. ;-)

It is still a bit convoluted and risky if a file is listed twice in the
original tetex-extra.files (which I hope doesn't happen). And it
requires attention from maintainers when they update the package because
if for instance you add the (needed)
/etc/X11/fonts/Type1/xfonts-tetex.scale to tetex-extra-fonts.files
*before* the sort and uniq stuff, guess what, it will end up in
tetex-extra-fonts.files *and* tetex-extra.files...

> +# now split off Type1-files
> +	grep -E '\.(afm|pfb)$$' debian/tetex-extra.files > debian/tetex-extra-fonts.files
> +       grep -Ev '\.(afm|pfb)$$' debian/tetex-extra.files > tetex-extra.tmp
> +	mv -f tetex-extra.tmp debian/tetex-extra.files
>
> is probably clearer. By the way we don't create these tempfiles in a
> save way. I cannot judge if this is a problem here.

Yes, it is clearer IMO. BTW, I wouldn't clutter the mv command with -f
because the only case it would be make a difference would be precisely
when there is something weird that needs examination (the destination
file being normally unwritable).

As for the temporary file, really, I think it is pretty safe here: the
file is created in the package build directory, which is supposed to be
owned by the user building the package. The usual risk with temporary
files is that they are created in /tmp, which is world-writable and
therefore makes symlink attacks possible. That is why you are so much
safer once you have created a _directory_ (that is not world-writable)
under /tmp to put your temporary files in.

-- 
Florent



Reply to: