Skip to content

Limit .gitignore to allow 'git clean'; aid repeated builds.

Cameron Nemo requested to merge limit-gitignore into master

The .gitignore file in this repository covers build products and prevents the use of commands like git clean -f -d to restore the repository to a pristine state.

It is of particular importance to Debian. Our build tools assert that source trees are identical to tarballs created from clean upstream repositories (which we keep in our archive). For repeated builds, it requires a working clean target that few upstreams provide.

In Debian, the specific error for your packages is:

    dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/gammastep_2.0.2-4.diff.JdV_YZ
    dpkg-source: info: you can integrate the local changes with dpkg-source --commit
    dpkg-buildpackage: error: dpkg-source -b . subprocess returned exit status 2
    debuild: fatal error at line 1182:
    dpkg-buildpackage -rfakeroot -us -uc -ui failed

A diffstat for the unexpected source changes mentioned is attached below. The information illustrates the magnitude of the changes that are being made.

Git also provides a great way to obtain a pristine source tree with the git clean family of commands, but that requires judicious management of ignored files. In your case, git status always shows a clean source tree.

Ideally, Git would only ignore files that deserve to be disregarded because they have no effect on builds. Editor backup files are a common example.

Build products, on the other hand, and files otherwise generated or modified should not be ignored.

Without this commit, the Debian packager has to employ this awkward sequence before each build:

    rm .gitignore
    git clean -f -d
    git checkout .

In summary, acceptance of this commit would greatly aid packaging in Debian, and perhaps elsewhere. It also lowers the hurdle to work on new releases of your software when packaging it.

On a very positive note, your helpful program already stirred up great interest inside Debian and will probably be backported to our stable release shortly. Thank you for providing gammastep!


$ diffstat /tmp/gammastep_2.0.2-4.diff.JdV_YZ
 /Makefile.in                           |  693 +
 gammastep-2.0.2/ABOUT-NLS              | 1068 +
 gammastep-2.0.2/Makefile.in            | 1183 ++
 gammastep-2.0.2/aclocal.m4             | 1696 ++
 gammastep-2.0.2/compile                |  348
 gammastep-2.0.2/config.guess           | 1480 ++
 gammastep-2.0.2/config.h.in            |  129
 gammastep-2.0.2/config.rpath           |  666 +
 gammastep-2.0.2/config.sub             | 1801 +++
 gammastep-2.0.2/configure              |18976 +++++++++++++++++++++++++++++++++
 gammastep-2.0.2/depcomp                |  791 +
 gammastep-2.0.2/install-sh             |  518
 gammastep-2.0.2/ltmain.sh              |11249 +++++++++++++++++++
 gammastep-2.0.2/m4/codeset.m4          |   21
 gammastep-2.0.2/m4/gettext.m4          |  381
 gammastep-2.0.2/m4/glibc2.m4           |   30
 gammastep-2.0.2/m4/glibc21.m4          |   30
 gammastep-2.0.2/m4/iconv.m4            |  180
 gammastep-2.0.2/m4/intdiv0.m4          |   84
 gammastep-2.0.2/m4/intl.m4             |  285
 gammastep-2.0.2/m4/intldir.m4          |   19
 gammastep-2.0.2/m4/intlmacosx.m4       |   51
 gammastep-2.0.2/m4/intltool.m4         |  212
 gammastep-2.0.2/m4/intmax.m4           |   33
 gammastep-2.0.2/m4/inttypes-pri.m4     |   36
 gammastep-2.0.2/m4/inttypes_h.m4       |   26
 gammastep-2.0.2/m4/lcmessage.m4        |   30
 gammastep-2.0.2/m4/lib-ld.m4           |  110
 gammastep-2.0.2/m4/lib-link.m4         |  709 +
 gammastep-2.0.2/m4/lib-prefix.m4       |  185
 gammastep-2.0.2/m4/libtool.m4          | 8388 ++++++++++++++
 gammastep-2.0.2/m4/lock.m4             |  316
 gammastep-2.0.2/m4/longlong.m4         |  109
 gammastep-2.0.2/m4/ltoptions.m4        |  437
 gammastep-2.0.2/m4/ltsugar.m4          |  124
 gammastep-2.0.2/m4/ltversion.m4        |   23
 gammastep-2.0.2/m4/lt~obsolete.m4      |   99
 gammastep-2.0.2/m4/nls.m4              |   31
 gammastep-2.0.2/m4/po.m4               |  449
 gammastep-2.0.2/m4/printf-posix.m4     |   44
 gammastep-2.0.2/m4/progtest.m4         |   92
 gammastep-2.0.2/m4/size_max.m4         |   68
 gammastep-2.0.2/m4/stdint_h.m4         |   26
 gammastep-2.0.2/m4/uintmax_t.m4        |   30
 gammastep-2.0.2/m4/visibility.m4       |   52
 gammastep-2.0.2/m4/wchar_t.m4          |   20
 gammastep-2.0.2/m4/wint_t.m4           |   28
 gammastep-2.0.2/m4/xsize.m4            |   13
 gammastep-2.0.2/missing                |  215
 gammastep-2.0.2/po/Makefile.in.in      |  221
 gammastep-2.0.2/po/Makevars.template   |   41
 gammastep-2.0.2/po/Rules-quot          |   47
 gammastep-2.0.2/po/boldquot.sed        |   10
 gammastep-2.0.2/po/en@boldquot.header  |   25
 gammastep-2.0.2/po/en@quot.header      |   22
 gammastep-2.0.2/po/insert-header.sin   |   23
 gammastep-2.0.2/po/quot.sed            |    6
 gammastep-2.0.2/po/remove-potcdate.sin |   19
 gammastep-2.0.2/py-compile             |  170
 gammastep-2.0.2/src/Makefile.in        | 1007 +
 60 files changed, 55175 insertions(+)

Merge request reports

Loading