Skip to content

Commit faa2f06

Browse files
author
MarcoFalke
committed
scripted-diff: [build] Ensure source tarball has leading directory name
-BEGIN VERIFY SCRIPT- sed -i 's|git archive --|git archive --prefix="${DISTNAME}/" --|g' $(git grep -l 'git archive' ./contrib) sed -i 's|tar -xf "\?${\?GIT_ARCHIVE}\?"\?|tar --strip-components=1 -xf "${GIT_ARCHIVE}"|g' $(git grep -l 'tar -xf' ./contrib) -END VERIFY SCRIPT-
1 parent 9bb0783 commit faa2f06

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ script: |
112112
113113
# Create the source tarball
114114
mkdir -p "$(dirname "$GIT_ARCHIVE")"
115-
git archive --output="$GIT_ARCHIVE" HEAD
115+
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
116116
117117
ORIGPATH="$PATH"
118118
# Extract the git archive into a dir for each host and build
@@ -129,7 +129,7 @@ script: |
129129
cd distsrc-${i}
130130
INSTALLPATH="${PWD}/installed/${DISTNAME}"
131131
mkdir -p ${INSTALLPATH}
132-
tar -xf $GIT_ARCHIVE
132+
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
133133
134134
./autogen.sh
135135
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ script: |
111111
112112
# Create the source tarball
113113
mkdir -p "$(dirname "$GIT_ARCHIVE")"
114-
git archive --output="$GIT_ARCHIVE" HEAD
114+
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
115115
116116
ORIGPATH="$PATH"
117117
# Extract the git archive into a dir for each host and build
@@ -121,7 +121,7 @@ script: |
121121
cd distsrc-${i}
122122
INSTALLPATH="${PWD}/installed/${DISTNAME}"
123123
mkdir -p ${INSTALLPATH}
124-
tar -xf $GIT_ARCHIVE
124+
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
125125
126126
./autogen.sh
127127
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS}

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ script: |
116116
117117
# Create the source tarball
118118
mkdir -p "$(dirname "$GIT_ARCHIVE")"
119-
git archive --output="$GIT_ARCHIVE" HEAD
119+
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
120120
121121
ORIGPATH="$PATH"
122122
# Extract the git archive into a dir for each host and build
@@ -126,7 +126,7 @@ script: |
126126
cd distsrc-${i}
127127
INSTALLPATH="${PWD}/installed/${DISTNAME}"
128128
mkdir -p ${INSTALLPATH}
129-
tar -xf $GIT_ARCHIVE
129+
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
130130
131131
./autogen.sh
132132
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}"

contrib/guix/libexec/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz"
158158
# Create the source tarball if not already there
159159
if [ ! -e "$GIT_ARCHIVE" ]; then
160160
mkdir -p "$(dirname "$GIT_ARCHIVE")"
161-
git archive --output="$GIT_ARCHIVE" HEAD
161+
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
162162
fi
163163

164164
###########################
@@ -193,7 +193,7 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}"
193193
cd "$DISTSRC"
194194

195195
# Extract the source tarball
196-
tar -xf "${GIT_ARCHIVE}"
196+
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
197197

198198
./autogen.sh
199199

0 commit comments

Comments
 (0)