aboutsummaryrefslogtreecommitdiff
path: root/tools/darwin
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2019-04-23 08:59:26 +0200
committerRechi <Rechi@users.noreply.github.com>2019-04-23 08:59:26 +0200
commit57557199099ea7e511e8ff0073505b912f2d6cb7 (patch)
tree2ac2e1042d656da63423141a6264e8e3f1fa5cf6 /tools/darwin
parent394037e6acfa82d8fab33022f13f613d916aebbd (diff)
[ios] use dpkg-deb --root-owner-group for deb creation
This removes the requirement for disabled SIP (for fakeroot) or the build user being a member of the sudo group. The --root-owner-group option is available since dpkg 1.19.0.
Diffstat (limited to 'tools/darwin')
-rw-r--r--tools/darwin/packaging/ios/mkdeb-ios.sh.in19
1 files changed, 4 insertions, 15 deletions
diff --git a/tools/darwin/packaging/ios/mkdeb-ios.sh.in b/tools/darwin/packaging/ios/mkdeb-ios.sh.in
index a08ca9b88d..f5e1ab337b 100644
--- a/tools/darwin/packaging/ios/mkdeb-ios.sh.in
+++ b/tools/darwin/packaging/ios/mkdeb-ios.sh.in
@@ -42,13 +42,6 @@ if [ ! -d $APP ]; then
exit 1
fi
-# also check for SIP (System Integrity Protection) here (via csrutil) - fakeroot et al are not working when it is enabled
-# fall back to oldschool sudo in that case
-if [ -f "${NATIVEPREFIX}/bin/fakeroot" -a "`csrutil status | grep enabled`"x == "x" ]; then
- SUDO="${NATIVEPREFIX}/bin/fakeroot"
-elif [ -f "/usr/bin/sudo" ]; then
- SUDO="/usr/bin/sudo"
-fi
if [ -f "${NATIVEPREFIX}/bin/dpkg-deb" ]; then
# make sure we pickup our tar, gnutar will fail when dpkg -i
bin_path=$(cd ${NATIVEPREFIX}/bin; pwd)
@@ -75,8 +68,8 @@ $ARM64 && ARCHIVE=${PACKAGE_ARM64}_${VERSION}-${REVISION}_iphoneos-arm.deb
SIZE="$(du -s -k ${APP} | awk '{print $1}')"
echo Creating $PACKAGE package version $VERSION revision $REVISION
-${SUDO} rm -rf $DIRNAME/$PACKAGE
-${SUDO} rm -rf $DIRNAME/$ARCHIVE
+rm -rf $DIRNAME/$PACKAGE
+rm -rf $DIRNAME/$ARCHIVE
# create debian control file.
mkdir -p $DIRNAME/$PACKAGE/DEBIAN
@@ -123,9 +116,6 @@ find $DIRNAME/$PACKAGE/Applications/ -name '.git*' -exec rm -rf {} \;
find $DIRNAME/$PACKAGE/Applications/ -name '.DS_Store' -exec rm -rf {} \;
find $DIRNAME/$PACKAGE/Applications/ -name '*.xcent' -exec rm -rf {} \;
-# set ownership to root:root
-${SUDO} chown -R 0:0 $DIRNAME/$PACKAGE
-
echo Packaging $PACKAGE
# Tell tar, pax, etc. on Mac OS X 10.4+ not to archive
# extended attributes (e.g. resource forks) to ._* archive members.
@@ -133,10 +123,9 @@ echo Packaging $PACKAGE
export COPYFILE_DISABLE=true
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
#
-${SUDO} dpkg-deb -bZ lzma --no-uniform-compression $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
-${SUDO} chown 501:20 $DIRNAME/$ARCHIVE
+dpkg-deb -bZ lzma --no-uniform-compression --root-owner-group $DIRNAME/$PACKAGE $DIRNAME/$ARCHIVE
dpkg-deb --info $DIRNAME/$ARCHIVE
dpkg-deb --contents $DIRNAME/$ARCHIVE
# clean up by removing package dir
-${SUDO} rm -rf $DIRNAME/$PACKAGE
+rm -rf $DIRNAME/$PACKAGE