autotools生成的链接在上传之前应该被替换吗?

发布于 2024-07-22 04:34:01 字数 1806 浏览 1 评论 0原文

我的主要问题是自动工具创建了 INSTALL、COPYING、missing、install-sh 和 depcomp 的链接。 当我尝试查看它们时,我发现它们是作为链接上传的,因此我将它们替换为真实文件,以便可以查看它们。 我错过了一些基本的东西吗? 当我从“make dist”中解压我的 gz 文件时,它看起来像这样:

分发树(减去源目录)

-rw-r--r-- 1 ojblass users  18591 2009-05-30 03:23 Makefile.in
-rwxr-xr-x 1 ojblass users 136168 2009-05-30 03:20 configure
drwxr-xr-x 3 ojblass users   4096 2009-05-30 03:20 autom4te.cache
-rw-r--r-- 1 ojblass users  32230 2009-05-30 03:20 aclocal.m4
-rw-r--r-- 1 ojblass users    251 2009-05-30 03:20 configure.ac
-rw-r--r-- 1 ojblass users    626 2009-05-30 03:11 AUTHORS
-rwxr-xr-x 1 ojblass users    120 2009-05-30 03:11 autogen.sh
-rw-r--r-- 1 ojblass users    737 2009-05-30 03:11 ChangeLog
-rw-r--r-- 1 ojblass users  35147 2009-05-30 03:11 COPYING
-rwxr-xr-x 1 ojblass users  17867 2009-05-30 03:11 depcomp
-rwxr-xr-x 1 ojblass users    199 2009-05-30 03:11 example.pl
-rwxr-xr-x 1 ojblass users    152 2009-05-30 03:11 example.sh
-rw-r--r-- 1 ojblass users   9512 2009-05-30 03:11 INSTALL
-rwxr-xr-x 1 ojblass users  13620 2009-05-30 03:11 install-sh
-rw-r--r-- 1 ojblass users    215 2009-05-30 03:11 Makefile.am
-rwxr-xr-x 1 ojblass users  11135 2009-05-30 03:11 missing
-rw-r--r-- 1 ojblass users     75 2009-05-30 03:11 NEWS
-rwxr-xr-x 1 ojblass users    507 2009-05-30 03:11 profile.sh
-rw-r--r-- 1 ojblass users   2605 2009-05-30 03:11 README
-rw-r--r-- 1 ojblass users    201 2009-05-30 03:11 README_developers
-rwxr-xr-x 1 ojblass users    382 2009-05-30 03:11 run.sh
-rw-r--r-- 1 ojblass users    481 2009-05-30 03:11 TODO
-rwxr-xr-x 1 ojblass users    117 2009-05-30 03:11 usefull.sh

我计划删除 README_developers 并在 README 中制作两个部分。 我还在考虑删除 run.sh 和 profile.sh 并使它们成为 make 测试目标的一部分(需要一些阅读)。 我不认为 TODO 项属于源代码分发,但也许可以将它放在项目的源代码树中。 链接问题之上和之外的任何其他指示都值得赞赏。

My main question is that the autotools created links to INSTALL, COPYING, missing, install-sh, and depcomp. When I tried to view them I saw that they were uploaded as links so I replaced them with real files so they are viewable. Am I missing something fundamental? When I unpack my gz file from 'make dist' this is what it looks like:

Distribution Tree (Minus Source Directories)

-rw-r--r-- 1 ojblass users  18591 2009-05-30 03:23 Makefile.in
-rwxr-xr-x 1 ojblass users 136168 2009-05-30 03:20 configure
drwxr-xr-x 3 ojblass users   4096 2009-05-30 03:20 autom4te.cache
-rw-r--r-- 1 ojblass users  32230 2009-05-30 03:20 aclocal.m4
-rw-r--r-- 1 ojblass users    251 2009-05-30 03:20 configure.ac
-rw-r--r-- 1 ojblass users    626 2009-05-30 03:11 AUTHORS
-rwxr-xr-x 1 ojblass users    120 2009-05-30 03:11 autogen.sh
-rw-r--r-- 1 ojblass users    737 2009-05-30 03:11 ChangeLog
-rw-r--r-- 1 ojblass users  35147 2009-05-30 03:11 COPYING
-rwxr-xr-x 1 ojblass users  17867 2009-05-30 03:11 depcomp
-rwxr-xr-x 1 ojblass users    199 2009-05-30 03:11 example.pl
-rwxr-xr-x 1 ojblass users    152 2009-05-30 03:11 example.sh
-rw-r--r-- 1 ojblass users   9512 2009-05-30 03:11 INSTALL
-rwxr-xr-x 1 ojblass users  13620 2009-05-30 03:11 install-sh
-rw-r--r-- 1 ojblass users    215 2009-05-30 03:11 Makefile.am
-rwxr-xr-x 1 ojblass users  11135 2009-05-30 03:11 missing
-rw-r--r-- 1 ojblass users     75 2009-05-30 03:11 NEWS
-rwxr-xr-x 1 ojblass users    507 2009-05-30 03:11 profile.sh
-rw-r--r-- 1 ojblass users   2605 2009-05-30 03:11 README
-rw-r--r-- 1 ojblass users    201 2009-05-30 03:11 README_developers
-rwxr-xr-x 1 ojblass users    382 2009-05-30 03:11 run.sh
-rw-r--r-- 1 ojblass users    481 2009-05-30 03:11 TODO
-rwxr-xr-x 1 ojblass users    117 2009-05-30 03:11 usefull.sh

I am planning on removing the README_developers and making two sections in the README. I am also looking at removing the run.sh and profile.sh and making them part of a make test target (some reading required). I do not think that a TODO item belongs in the source distribution but maybe it is okay to have it in the source tree of the project. Any additional pointers above and beyond the links question is appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

极致的悲 2024-07-29 04:34:02

简短回答:保留这些符号链接(安装除外)将是
伪造符合 GNU 编码标准

默认情况下,automake 执行是否符合 GNU 标准的检查
(需要存在以下文件:安装、新闻、自述文件、
复制、作者和变更日志)。 人们可以取消该支票(并且
通过传递 --foreign 选项来安全地删除其中一些文件)
automake(编辑 autogen.sh 并重新运行它)。

这些链接是在使用 --add-missing 调用 automake 时创建的
除非给出 --copy 选项,否则选项将创建符号链接
丢失文件而不是复制它们。 这是为了保留那些
每当您安装较新的文件时(实际上仅安装)都是最新的
汽车制造商。 考虑乔纳森的回答,这些符号链接不是问题:所有
在制作 tarball 之前,将分发的文件复制到单独的目录。
如果您想编辑它们,请将它们更改为常规文件。

其他文件(README_developers、run.sh、profile.sh、TODO
等)可能是由您正在使用的 IDE 生成并添加到
顶部 Makefile.am 中的 EXTRA_DIST 变量。 您可以将它们从
通过编辑 EXTRA_DIST 进行分发,然后您也可以删除
他们从源头。

其余部分由 autoconf 和 automake 自动生成:

  • aclocal.m4
  • autom4te.cache
  • configure
  • depcomp
  • install-sh
  • Makefile.in
  • Missing

如果您想进一步整理您的顶级源目录,您可以添加
AC_CONFIG_AUX_DIR([scripts]) 到configure.ac。 这样一些脚本
将在 scripts 目录中找到位置。

更新:

GNU 编码标准仅描述了这些标准的要求
发行版中存在的文档文件以及内容
信息应包含在那里。 --add-missing 选项是
提醒程序员应该写入哪些文件。 明显有空
新闻或作者文件不会使项目更符合标准。

只有 ChangeLog 文件对其格式有严格的要求
在某些项目中,ChangeLog 是从正确的位置自动生成的
格式化的提交消息。 在 Darcs 上,它只是 darcs 更改 >ChangeLog
如果您使用 Subversion,您可以查看:svn2logsvn2cl

如前所述,安装文件保留为符号链接可能是合理的,但仅
如果不需要有关安装的项目特定信息
(即没有额外的配置脚本参数等)。

Short answer: Leaving those symlinks (other than INSTALL) would be
faked conformance to GNU coding standards.

By default automake perform check for conformance to GNU standards
(requires following files to exist: INSTALL, NEWS, README,
COPYING, AUTHORS and ChangeLog). One may turn of that check (and
safely remove some of those files) by passing --foreign option to
automake (to do it edit autogen.sh and rerun it).

The links were created when automake was invoked with --add-missing
options which unless --copy option was given creates symlinks for
missing files rather then copying them. This is in order to keep those
files (actually INSTALL only) up to date whenever you install newer
automake. Regerding Jonathan's answer those symlinks are not an issue: all
distributed files are copied to separate directory before making tarball.
Change them to regular files if you want to edit them.

Other files (README_developers, run.sh, profile.sh, TODO
etc.) were probably generated by IDE you are using and added to
EXTRA_DIST variable in top Makefile.am. You may remove them from
distribution by editing EXTRA_DIST and afterward you may also remove
them from source.

The rest is automatically generated by autoconf and automake:

  • aclocal.m4
  • autom4te.cache
  • configure
  • depcomp
  • install-sh
  • Makefile.in
  • missing

If you want to further unclutter your top source directory you may add
AC_CONFIG_AUX_DIR([scripts]) to configure.ac. This way some of the scripts
will find place in scripts directory.

Update:

The GNU coding standards merely describe the requirement of those
documentation files to be present within distribution and what
information should be included there. The --add-missing option is to
remind programmer what files should be written. Obviously having empty
NEWS or AUTHORS file won't make the project more conformant to standard.

Only ChangeLog file have rigid requirements on it's format.
In some projects ChangeLog is automatically generated from properly
formated commit messages. On Darcs it's simply darcs changes >ChangeLog.
If you use Subversion you may look at: svn2log, svn2cl.

As mentioned INSTALL file might be reasonable to keep as symlink but only
if there is no project specific information needed about the installation
(i.e. no extra configure script arguments etc.).

淑女气质 2024-07-29 04:34:02

TODO 文件可以放入发行版中; 它向消费者表明您认为产品中存在的缺陷,并且向消费者指出了他们可能有助于改进产品的领域的潜在贡献者。 (此外,如果您跌倒在公共汽车下,这将有助于其他人接管当前的发布材料。)

使用子目录来保存大量配置材料可能是值得的。

关于您的主要问题 - 文件是“链接”还是“符号链接”? 符号链接对于打包来说不太有用,除非您告诉 (GNU) tar 无论如何都要遵循它们(“-h”或“--dereference”)。 如果唯一的符号链接是这些文件,那么就可以了; 如果您在发行版本身中使用符号链接,则可能会适得其反。

The TODO file can go in the distribution; it is an indication to consumers of things that you think are deficient in the product, and they are a pointer to potential contributors to areas where they could perhaps help improve the product. (Also, if you fell under a bus, it would help other people take over using the current release material.)

It might be worth using a sub-directory to hold the bulk of configuration material.

Regarding your main question - were the files 'links' or 'symlinks'? Symbolic links are less useful for packaging unless you tell (GNU) tar to follow them anyway ('-h' or '--dereference'). If the only symlinks are to those files, that works; if you use symbolic links in the distribution itself, it may be more counter-productive.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文