Commit Graph

3 Commits

Author SHA1 Message Date
Arnaldo Carvalho de Melo bb02fec203 README.tarball: Overcome --transform problem with symlinks
By doing the tarball using the parent directory ('pahole') and then
replacing ^pahole/ with dwarves-${version} we avoid tar replacing the
symlink destination, i.e. before we were getting:

  $ ls -la dwarves-1.22/lib/include/
  total 8
  drwxr-xr-x. 2 acme acme 4096 Aug 12 15:54 .
  drwxr-xr-x. 4 acme acme 4096 Aug 12 15:54 ..
  lrwxrwxrwx. 1 acme acme   23 Jun 18 17:56 bpf -> dwarves-1.22/../bpf/src
  $

Now we get:

  $ v=1.$(($(git tag | sort -V | tail -1 | cut -d. -f2) + 1)) ; tar cvfJ ~/rpmbuild/SOURCES/dwarves-${v}.tar.xz --transform "s,^pahole/,dwarves-${v}/," `sed s%^%../pahole/%g MANIFEST`
  $ tar tvf ~/rpmbuild/SOURCES/dwarves-1.22.tar.xz  | tail -3
  -rwxr-xr-x acme/acme      1132 2021-06-14 15:51 dwarves-1.22/lib/bpf/travis-ci/vmtest/run_vmtest.sh
  -rw-r--r-- acme/acme   2904227 2021-06-14 15:51 dwarves-1.22/lib/bpf/travis-ci/vmtest/vmlinux.h
  lrwxrwxrwx acme/acme         0 2021-08-11 08:55 dwarves-1.22/lib/include/bpf -> ../bpf/src
  $

And building from the resulting tarball succeeds.

See the references in the threads and bug reportgs in the Link tags
below for more details.

Link: https://lore.kernel.org/dwarves/YRVxNEPEspmuHcKr@kernel.org/
Link: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=775247
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-20 16:40:27 -03:00
Arnaldo Carvalho de Melo d0c3dd18c7 README.tarball: Remove hardcoded version, get it from 'git tag'
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2021-08-20 16:40:27 -03:00
Arnaldo Carvalho de Melo f14426e410 docs: Add command line to generate tarball with a prefix
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2020-03-12 16:55:15 -03:00