Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messages during make dist: "file name is too long" #6349

Closed
ArsenShnurkov opened this issue Dec 28, 2017 · 1 comment
Closed

messages during make dist: "file name is too long" #6349

ArsenShnurkov opened this issue Dec 28, 2017 · 1 comment
Assignees
Labels

Comments

@ArsenShnurkov
Copy link
Contributor

@ArsenShnurkov ArsenShnurkov commented Dec 28, 2017

Steps to Reproduce

#!/bin/bash

#WORKDIR=/var/tmp/tarballs/dotnet/dev-lang/mono
WORKDIR=/1

rm -rf ${WORKDIR}
mkdir -p ${WORKDIR}
git clone https://github.com/mono/mono.git ${WORKDIR}
cd ${WORKDIR}
git submodule update --init --recursive
git reset --hard f93caff1c85d74db8561d951b96d5dde9dea8bd5
./autogen.sh
#./configure
make
make dist

Current Behavior

test -n "" \
|| find "mono-5.11.0" -type d ! -perm -755 \
	-exec chmod u+rwx,go+rx {} \; -o \
  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -444 -exec /bin/sh /1/install-sh -c -m a+r {} {} \; \
|| chmod -R a+r "mono-5.11.0"
tardir=mono-5.11.0 && tar --format=ustar -chf - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >mono-5.11.0.tar.bz2
tar: mono-5.11.0/external/linker/linker/Tests/Mono.Linker.Tests.Cases/Generics/MethodWithParameterWhichHasGenericParametersAndOverrideUsesADifferentNameForGenericParameterNestedCase.cs: file name is too long (cannot be split); not dumped
tar: mono-5.11.0/external/linker/linker/Tests/Mono.Linker.Tests.Cases/Generics/MethodWithParameterWhichHasGenericParametersAndOverrideUsesADifferentNameForGenericParameterNestedCase2.cs: file name is too long (cannot be split); not dumped
tar: mono-5.11.0/external/linker/linker/Tests/Mono.Linker.Tests.Cases/Generics/DerivedClassWithMethodOfSameNameAsBaseButDifferentNumberOfGenericParametersUnusedBaseWillGetStripped.cs: file name is too long (cannot be split); not dumped
tar: Exiting with failure status due to previous errors

Expected Behavior

I expect these files to be included into archive

On which platforms did you notice this

Sabayon Linux

Versions Used:

  1. tar 1.29
    (the same with tar 1.30)

  2. Mono JIT compiler version 5.11.0.132 (tarball Thu Dec 28 02:37:15 MSK 2017)

Other thoughts

# file external/linker/linker/Tests/Mono.Linker.Tests.Cases/Generics/MethodWithParameterWhichHasGenericParametersAndOverrideUsesADifferentNameForGenericParameterNestedCase.cs
external/linker/linker/Tests/Mono.Linker.Tests.Cases/Generics/MethodWithParameterWhichHasGenericParametersAndOverrideUsesADifferentNameForGenericParameterNestedCase.cs: C++ source, UTF-8 Unicode (with BOM) text

they are not symlinks and should not be limited by 99 characters
https://www.gnu.org/software/tar/manual/html_node/Formats.html#SEC133

https://github.com/mono/mono/blob/master/configure.ac#L12-L14

https://savannah.gnu.org/support/?107095

@akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Dec 29, 2017

Could you please try the following patch which removes these files from the tarball (we don't use them during the build, only tests) and should workaround the problem:

diff --git a/Makefile.am b/Makefile.am
index f9dd1784c83..7e3f093f20a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,6 +50,7 @@ dist-hook:
        rm -rf `find $(top_distdir)/external -path '*\.git'`
        rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
        rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
+       rm -rf "$(top_distdir)/external/linker/linker/Tests"

 pkgconfigdir = $(libdir)/pkgconfig
 noinst_DATA = mono-uninstalled.pc
ArsenShnurkov added a commit to ArsenShnurkov/shnurise-tarballs-automation that referenced this issue Dec 29, 2017
akoeplinger added a commit to akoeplinger/mono that referenced this issue Jan 2, 2018
On some distros the number of strings you can pass to execve()
is limited which means you get the following error when trying
to create the tarball:

```
make[5]: execvp: /bin/sh: Argument list too long
make[5]: * [../../build/rules.make:303: dist-default] Error 127
```

To solve this we split the DISTFILES variable into groups of 100
entries and invoke the shell for each group instead of adding all
into the same invocation. Also removed looking for 'makefile' and
'GNUmakefile' since those don't exist in Mono and simplifies the logic.

Found during investigation of mono#6349
akoeplinger added a commit to akoeplinger/mono that referenced this issue Jan 2, 2018
They contain files with very long names which causes issues with `tar`.

We simply remove them from the dist directory before creating
the tarball since we don't use them in the Mono build anyway.

Fixes mono#6349
akoeplinger added a commit that referenced this issue Jan 2, 2018
On some distros the number of strings you can pass to execve()
is limited which means you get the following error when trying
to create the tarball:

```
make[5]: execvp: /bin/sh: Argument list too long
make[5]: * [../../build/rules.make:303: dist-default] Error 127
```

To solve this we split the DISTFILES variable into groups of 100
entries and invoke the shell for each group instead of adding all
into the same invocation. Also removed looking for 'makefile' and
'GNUmakefile' since those don't exist in Mono and simplifies the logic.

Found during investigation of #6349
akoeplinger added a commit that referenced this issue Jan 2, 2018
They contain files with very long names which causes issues with `tar`.

We simply remove them from the dist directory before creating
the tarball since we don't use them in the Mono build anyway.

Fixes #6349
jaykrell added a commit to jaykrell/mono that referenced this issue Jan 4, 2018
On some distros the number of strings you can pass to execve()
is limited which means you get the following error when trying
to create the tarball:

```
make[5]: execvp: /bin/sh: Argument list too long
make[5]: * [../../build/rules.make:303: dist-default] Error 127
```

To solve this we split the DISTFILES variable into groups of 100
entries and invoke the shell for each group instead of adding all
into the same invocation. Also removed looking for 'makefile' and
'GNUmakefile' since those don't exist in Mono and simplifies the logic.

Found during investigation of mono#6349
jaykrell added a commit to jaykrell/mono that referenced this issue Jan 4, 2018
They contain files with very long names which causes issues with `tar`.

We simply remove them from the dist directory before creating
the tarball since we don't use them in the Mono build anyway.

Fixes mono#6349
joncham added a commit to Unity-Technologies/mono that referenced this issue Apr 6, 2018
On some distros the number of strings you can pass to execve()
is limited which means you get the following error when trying
to create the tarball:

```
make[5]: execvp: /bin/sh: Argument list too long
make[5]: * [../../build/rules.make:303: dist-default] Error 127
```

To solve this we split the DISTFILES variable into groups of 100
entries and invoke the shell for each group instead of adding all
into the same invocation. Also removed looking for 'makefile' and
'GNUmakefile' since those don't exist in Mono and simplifies the logic.

Found during investigation of mono#6349
joncham added a commit to Unity-Technologies/mono that referenced this issue Apr 6, 2018
They contain files with very long names which causes issues with `tar`.

We simply remove them from the dist directory before creating
the tarball since we don't use them in the Mono build anyway.

Fixes mono#6349
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Apr 25, 2018
Bumps to Java.Interop/master/0afb2b0f
Bumps to llvm/master/a9cfb50e.

Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=11771
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=15051
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=19436
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=45901
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=56071
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58413
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58413
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=58413
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=59184
fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60065
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60225
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60298
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60359
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60568
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60756
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60848
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60862
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60900
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60904
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=60986
Fixes: https://github.com/mono/mono/issues/59400
Fixes: mono/mono#6169
Fixes: mono/mono#6187
Fixes: mono/mono#6192
Fixes: mono/mono#6255
Fixes: mono/mono#6264
Fixes: mono/mono#6266
Fixes: mono/mono#6281
Fixes: mono/mono#6283
Fixes: mono/mono#6320
Fixes: mono/mono#6339
Fixes: mono/mono#6343
Fixes: mono/mono#6349
Fixes: mono/mono#6379
Fixes: mono/mono#6383
Fixes: mono/mono#6401.
Fixes: mono/mono#6411
Fixes: mono/mono#6414
Fixes: mono/mono#6490
Fixes: mono/mono#6721
Fixes: mono/mono#6767
Fixes: mono/mono#6777
Fixes: mono/mono#6848
Fixes: mono/mono#6940
Fixes: mono/mono#6948
Fixes: mono/mono#6998
Fixes: mono/mono#7016
Fixes: mono/mono#7085
Fixes: mono/mono#7086
Fixes: mono/mono#7095
Fixes: mono/mono#7137
Fixes: mono/mono#7184
Fixes: mono/mono#7240
Fixes: mono/mono#7262
Fixes: mono/mono#7289
Fixes: mono/mono#7338
Fixes: mono/mono#7356
Fixes: mono/mono#7364
Fixes: mono/mono#7378
Fixes: mono/mono#7389
Fixes: mono/mono#7460
Fixes: mono/mono#7535
Fixes: mono/mono#7536
Fixes: mono/mono#7610
Fixes: mono/mono#7624
Fixes: mono/mono#7637
Fixes: mono/mono#7655
Fixes: mono/mono#7657
Fixes: mono/mono#7685
Fixes: mono/mono#7786
Fixes: mono/mono#7792
Fixes: mono/mono#7822
Fixes: mono/mono#7860
Fixes: mono/mono#8089
Fixes: mono/mono#8267
Fixes: mono/mono#8409
Fixes: xamarin/maccore#628
Fixes: xamarin/maccore#629
Fixes: xamarin/maccore#673
Fixes: xamarin/maccore#673
Fixes: #1561
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants