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

Fwd: Re: Bug#876441: debian-reference: Command "make distclean" in the source package removes users' tempdir



Debian 参考手册修复了一个 bug。

在系统环境变量 TMPDIR 有设置的时候,make distclean 会把这个环境变量对应的整个目录删除。 而操作系统上经常有设置 $TMPDIR, 其它软件也比较常用到这个环境变量, 其对应的目录里面很有可能存其它软件使用的内容。

这个 bug 是由文档的意大利翻译者发现并报告的,我协助定位了问题。Osamu 已经 git push 了补丁解决。

即将文档编译用的临时目录,使用单独的环境变量 $TMP_DIR_DR ,而不使用大家常用的 $TMPDIR。

-ifndef TMPDIR
-TMPDIR := $(CURDIR)/tmp
+# TMP_DIR_DR is not mean to be set to generic TMPDIR like /tmp ~/.tmp
+ifndef TMP_DIR_DR
+TMP_DIR_DR     := $(CURDIR)/tmp
 endif

大家如果发现 Debian 参考手册有任何问题,也欢迎报告 bug 反馈哈!

肖盛文

-------- 转发的消息 --------
主题: Re: Bug#876441: debian-reference: Command "make distclean" in the source package removes users' tempdir
日期: Fri, 22 Sep 2017 23:28:06 +0900
发件人: Osamu Aoki <aoki.osamu@gmail.com>
收件人: Beatrice Torracca <beatricet@libero.it>, 876441@bugs.debian.org
抄送: atzlinux <atzlinux@sina.com>


Hi,

On Fri, Sep 22, 2017 at 12:46:21PM +0200, Beatrice Torracca wrote:
> Source: debian-reference
> Version: 2.68
> Severity: normal
> 
> Hi!
> 
> Currently the "make distclean" command deletes the users' tempdir if
> it was already set as the environment variable "TMPDIR". In my case it
> is ~/.tmp.

I see.  In my case, it is unset and let Makefile set it to $(CURDIR)/tmp

> Not only all the files in the directory are deleted, but also the
> directory itself.
> 
> I think the directory should not be erased, and not even the files in
> it, aside those created by the debian-reference package.
> 
> For a better explanation see this thread in the Debian Documentation
> Project Mailing-list
> 
> https://lists.debian.org/debian-doc/2017/09/msg00014.html

I see this is safer.
 
> And particularly the reply by user atzlinux that
> contains a proposed patch for the problem.
> 
> https://lists.debian.org/debian-doc/2017/09/msg00016.html

Good.  Why not commit?

Osamu


Reply to: