diff options
author | dancer <dancer> | 2002-09-29 07:55:30 +0000 |
---|---|---|
committer | dancer <dancer> | 2002-09-29 07:55:30 +0000 |
commit | b65e870745b91087e56129c5acced4992505e4c4 (patch) | |
tree | 6e8416b3c3ce04b6975ad9cdd389c4e6c0f6a306 /pbuilder-buildpackage | |
parent | ba89056292054adca8711459579c2580594fd60a (diff) | |
download | pbuilder-b65e870745b91087e56129c5acced4992505e4c4.tar pbuilder-b65e870745b91087e56129c5acced4992505e4c4.tar.gz |
+
+ * pbuilderrc.5: update manpage to document the vars.
+
+ * pbuilder-buildpackage (BUILD_PID): preserve file permissions
+ on copying the result.
+ (BUILDRESULTUID,BUILDRESULTGID): define UID and GID.
+ chown and chgrp to the user ID after build.
Diffstat (limited to 'pbuilder-buildpackage')
-rwxr-xr-x | pbuilder-buildpackage | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/pbuilder-buildpackage b/pbuilder-buildpackage index 10cde90..00521c4 100755 --- a/pbuilder-buildpackage +++ b/pbuilder-buildpackage @@ -110,10 +110,16 @@ executehooks "B" trap cleanbuildplace exit umountproc -if [ -n "$BUILDRESULT" ]; then - mkdir -p "$BUILDRESULT" - if [ -d "$BUILDRESULT" ]; then - cp "$BUILDPLACE"/tmp/buildd/* "$BUILDRESULT" 2>/dev/null || true +if [ -n "${BUILDRESULT}" ]; then + mkdir -p "${BUILDRESULT}" + if [ -d "${BUILDRESULT}" ]; then + if [ -n "${BUILDRESULTUID}" ]; then + chown "${BUILDRESULTUID}" "${BUILDPLACE}"/tmp/buildd/* + fi + if [ -n "${BUILDRESULTGID}" ]; then + chgrp "${BUILDRESULTGID}" "${BUILDPLACE}"/tmp/buildd/* + fi + cp -p "${BUILDPLACE}"/tmp/buildd/* "${BUILDRESULT}" 2>/dev/null || true else echo "E: BUILDRESULT=[$BUILDRESULT] is not a directory." >&2 fi |