summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2017-03-10 15:00:37 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-03-10 15:01:09 +0100
commit5ca6f36612935489102fbf75d1d8a9fd9c87b205 (patch)
tree005f6b587d5c97e2b81398ce33f417238845f56f
parent62d3c7fa4cfb2ed515cc76ef2c3426a092c5406f (diff)
downloadbuildscripts-5ca6f36612935489102fbf75d1d8a9fd9c87b205.tar.gz
buildscripts-5ca6f36612935489102fbf75d1d8a9fd9c87b205.tar.bz2
buildscripts-5ca6f36612935489102fbf75d1d8a9fd9c87b205.zip
bin/{{s,}build-deb-package,build-{nsis,rpm}-package}: do not *ever* make local copies of git repositories with hardlinks in them.
To start with, that defeats the purpose of such a copy in the first place and secondly has been failing badly for Debian packages since the dawn of time. We want a nice, full, deep copy that can be changed without harming other builds.
-rwxr-xr-xbin/build-rpm-package4
-rwxr-xr-xbin/sbuild-deb-package4
2 files changed, 4 insertions, 4 deletions
diff --git a/bin/build-rpm-package b/bin/build-rpm-package
index a99a62f..65ba67c 100755
--- a/bin/build-rpm-package
+++ b/bin/build-rpm-package
@@ -515,7 +515,7 @@ prepare_workspace() {
git clean -df
else
cd "$(dirname "${PROJECT_DIR}")"
- git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git"
+ git clone --no-hardlinks --no-local "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git"
cd "${PROJECT}"
git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}"
git fetch origin upstream:upstream
@@ -603,7 +603,7 @@ build_packages() {
chmod -Rf -- 2770 "${TEMP_DIR}"
cd "$PROJECT_DIR"
- git clone "${PROJECT_DIR}" "${TEMP_DIR}/${PROJECT}/"
+ git clone --no-hardlinks --no-local "${PROJECT_DIR}" "${TEMP_DIR}/${PROJECT}/"
cd "${TEMP_DIR}"
GITREV="$(cd "${PROJECT}" && gitrevno && cd - 1>/dev/null)"
diff --git a/bin/sbuild-deb-package b/bin/sbuild-deb-package
index a479059..b8a90e0 100755
--- a/bin/sbuild-deb-package
+++ b/bin/sbuild-deb-package
@@ -132,7 +132,7 @@ prepare_workspace() {
cd ${my_WORKDIR}
if [ ! -d ${PROJECT}/.git ]; then
- git clone "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git"
+ git clone --no-hardlinks --no-local "git://${GIT_HOSTNAME}/${PROJECT_PATH}.git"
cd "${PROJECT}"
git checkout --force "${CHECKOUT}" || git checkout --force -b "${CHECKOUT}"
@@ -221,7 +221,7 @@ build_packages() {
chmod 2770 -Rf -- "${TEMP_DIR}"
cd "${PROJECT_DIR}"
- git clone "${PROJECT_DIR}" "${TEMP_DIR}/${PROJECT}/"
+ git clone --no-hardlinks --no-local "${PROJECT_DIR}" "${TEMP_DIR}/${PROJECT}/"
cd "${TEMP_DIR}/${PROJECT}"
git checkout "${CHECKOUT}" || git checkout master
find "${PROJECT_DIR}/../" -maxdepth 0 -mindepth 0 -type f | grep -qs "${PROJECT}_"*.orig.tar.gz && cp -- "${PROJECT_DIR}/../${PROJECT}_"*.orig.tar.gz ..