aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-buildpackage-funcs
diff options
context:
space:
mode:
authordancer <dancer>2005-08-19 14:07:14 +0000
committerdancer <dancer>2005-08-19 14:07:14 +0000
commit56f1d5b8795d3ba89fee13f8b250bd0a0a0397d9 (patch)
treed85b502080bf91c20dfd16a08174ad00be6a370c /pbuilder-buildpackage-funcs
parent3b3aad5eb7c4af1509b0bfe1605a4f343f1098d6 (diff)
downloadpbuilder-56f1d5b8795d3ba89fee13f8b250bd0a0a0397d9.tar
pbuilder-56f1d5b8795d3ba89fee13f8b250bd0a0a0397d9.tar.gz
+ * pbuilder-buildpackage-funcs: do cow thing, with cowprotect, for cowdancer.
Diffstat (limited to 'pbuilder-buildpackage-funcs')
-rw-r--r--pbuilder-buildpackage-funcs13
1 files changed, 13 insertions, 0 deletions
diff --git a/pbuilder-buildpackage-funcs b/pbuilder-buildpackage-funcs
index 03b4458..093e053 100644
--- a/pbuilder-buildpackage-funcs
+++ b/pbuilder-buildpackage-funcs
@@ -66,9 +66,22 @@ function showbuildbanner () {
echo
}
+function cowprotect () {
+ # a hack for cowdancer
+ for A in "$@"; do
+ if readlink -f "$A"; then
+ A=$(readlink -f "$A")
+ mv "$A" "$A"~
+ cp -a "$A"~ "$A"
+ rm -f "$A"~
+ fi
+ done
+}
+
function createbuilduser () {
# create the build user
if [ -n "$SUTOUSER" ]; then
+ cowprotect $BUILDPLACE/etc/passwd $BUILDPLACE/etc/group $BUILDPLACE/etc/shadow
echo "$BUILDUSERNAME:x:$BUILDUSERID:$BUILDUSERID:,,,:/tmp/buildd:/bin/sh" >> $BUILDPLACE/etc/passwd
echo "$BUILDUSERNAME:*:$BUILDUSERID:" >> $BUILDPLACE/etc/group
echo "$BUILDUSERNAME:!:::::::" >> $BUILDPLACE/etc/shadow