summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/tar/tar/0003-Exclude-VCS-directory-with-writing-from-an-archive.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/tar/tar/0003-Exclude-VCS-directory-with-writing-from-an-archive.patch')
-rw-r--r--meta/recipes-extended/tar/tar/0003-Exclude-VCS-directory-with-writing-from-an-archive.patch112
1 files changed, 112 insertions, 0 deletions
diff --git a/meta/recipes-extended/tar/tar/0003-Exclude-VCS-directory-with-writing-from-an-archive.patch b/meta/recipes-extended/tar/tar/0003-Exclude-VCS-directory-with-writing-from-an-archive.patch
new file mode 100644
index 0000000000..577a9ba997
--- /dev/null
+++ b/meta/recipes-extended/tar/tar/0003-Exclude-VCS-directory-with-writing-from-an-archive.patch
@@ -0,0 +1,112 @@
1From 4f814e0e4c673f86dc65a557f7e55f6b5efd1529 Mon Sep 17 00:00:00 2001
2From: Anton Makrushin <makrusan@gmail.com>
3Date: Mon, 20 Mar 2023 20:05:42 +0530
4Subject: Exclude VCS directory with writing from an archive
5
6See https://savannah.gnu.org/bugs/?62859
7
8Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/tar.git/commit/?id=4f814e0e4c673f86dc65a557f7e55f6b5efd1529]
9
10Signed-off-by: Qiu Tingting <qiutt@fujitsu.com>
11
12---
13 tests/exclude18.at | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
14 1 files changed, 87 insertions(+)
15 create mode 100644 tests/exclude18.at
16
17diff --git a/tests/exclude18.at b/tests/exclude18.at
18new file mode 100644
19index 0000000..64aaa52
20--- /dev/null
21+++ b/tests/exclude18.at
22@@ -0,0 +1,87 @@
23+# Process this file with autom4te to create testsuite. -*- Autotest -*-
24+
25+# Test suite for GNU tar.
26+# Copyright 2004-2023 Free Software Foundation, Inc.
27+
28+# This file is part of GNU tar.
29+
30+# GNU tar is free software; you can redistribute it and/or modify
31+# it under the terms of the GNU General Public License as published by
32+# the Free Software Foundation; either version 3 of the License, or
33+# (at your option) any later version.
34+
35+# GNU tar is distributed in the hope that it will be useful,
36+# but WITHOUT ANY WARRANTY; without even the implied warranty of
37+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
38+# GNU General Public License for more details.
39+
40+# You should have received a copy of the GNU General Public License
41+# along with this program. If not, see <http://www.gnu.org/licenses/>.
42+
43+# Test --exclude-vcs option with subcommands: EXTRACT, LIST, DIFF.
44+# Check VCS directory with files, and empty.
45+#
46+# Ref: https://savannah.gnu.org/bugs/?62859
47+# Wed 03 Aug 2022 04:06:28 PM UTC, original submission: Quote
48+# Mohamed Akram <mohdakram>
49+# > The --exclude-vcs flag seems to exclude .gitignore but not .git when
50+# extracting.
51+
52+AT_SETUP([--exclude-vcs extract list compare])
53+AT_KEYWORDS([exclude-vcs extract list compare exclude18])
54+
55+AT_TAR_CHECK([
56+AT_SORT_PREREQ
57+mkdir gitrepo
58+cd gitrepo
59+
60+# Make an empty VCS directory:
61+mkdir .svn
62+
63+# Make a VCS directory with a file:
64+mkdir .git
65+touch .git/_A
66+
67+# Make a VCS file:
68+touch .gitignore
69+
70+# Make non-VCS files:
71+touch .git_B
72+touch _C
73+
74+# Create an archive, include VCS:
75+cd ..
76+tar -cf gitrepo.tar gitrepo
77+rm -r gitrepo
78+
79+echo Extract:
80+tar -xvf gitrepo.tar --exclude-vcs | sort
81+
82+echo
83+echo List:
84+tar -tf gitrepo.tar --exclude-vcs | sort
85+
86+echo
87+echo Diff:
88+tar -dvf gitrepo.tar --exclude-vcs gitrepo | sort
89+
90+],
91+[0],
92+[Extract:
93+gitrepo/
94+gitrepo/.git_B
95+gitrepo/_C
96+
97+List:
98+gitrepo/
99+gitrepo/.git_B
100+gitrepo/_C
101+
102+Diff:
103+gitrepo/
104+gitrepo/.git_B
105+gitrepo/_C
106+],
107+[])
108+
109+AT_CLEANUP
110--
111cgit v1.1
112