Skip to content

Commit 65c955a

Browse files
committed
rpm: fix order of exclude arguments
CentOS 8 has recently gained a new version of tar. This version of tar is sensitive about the order of its operands and only applies the --exclude arguments to file arguments following them. As a result, this version of tar ignores the exclude arguments altogether, which results in us trying to recursively copy the contents of the tmptar directory into itself until the operation fails because the file name is too long. Predictably, this results in a failed build for CentOS 8. To avoid that, place the --exclude options before the file arguments so that they apply correctly and the build succeeds.
1 parent 0ce4e8e commit 65c955a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rpm/build_rpms.bsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ rm -rf ${CURDIR}/tmptar
160160
mkdir -p ${CURDIR}/tmptar/git-lfs-${LFS_VERSION}
161161
pushd ${CURDIR}/..
162162
#I started running out of space in the docker, so I needed to copy a little less waste
163-
tar -c . --exclude tmptar --exclude repos | tar -x -C ${CURDIR}/tmptar/git-lfs-${LFS_VERSION}/
163+
tar -c --exclude tmptar --exclude repos . | tar -x -C ${CURDIR}/tmptar/git-lfs-${LFS_VERSION}/
164164
popd
165165
pushd ${CURDIR}/tmptar
166166
tar -zcf ${CURDIR}/SOURCES/git-lfs-${LFS_VERSION}.tar.gz git-lfs-${LFS_VERSION}

0 commit comments

Comments
 (0)