[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#745824: live-build: doesn't preserve all permissions when making hdd images



Package: live-build
Version: 4.0~alpha33-1
Severity: normal
Tags: patch

When using "--binary-images hdd --binary-filesystem ext4
--chroot-filesystem none", live-build loses the setuid bit when it copies
files from binary/ into the ext4 image, breaking things like sudo.

The solution is to use 'cp -a' instead of 'cp -r'.

Regards,
    S

-- System Information:
Debian Release: jessie/sid
  APT prefers proposed-updates
  APT policy: (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.utf8, LC_CTYPE=en_GB.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-build depends on:
ii  cdebootstrap  0.5.10
ii  debootstrap   1.0.59
ii  python3       3.3.4-1

Versions of packages live-build recommends:
ii  cpio                            2.11+dfsg-2
ii  live-boot-doc                   4.0~alpha21-1
ii  live-config-doc                 4.0~alpha32-1
ii  live-manual-html [live-manual]  1:4.0~alpha11-1

live-build suggests no packages.

-- no debconf information
>From dd6c05c59608514c66ce86c7004c68b763aae7fc Mon Sep 17 00:00:00 2001
From: Simon McVittie <simon.mcvittie@collabora.co.uk>
Date: Fri, 25 Apr 2014 15:42:23 +0100
Subject: [PATCH] Preserve all possible file attributes when making an ext*
 image

---
 scripts/build/binary_hdd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/build/binary_hdd b/scripts/build/binary_hdd
index 68ae6ad..d47bfdf 100755
--- a/scripts/build/binary_hdd
+++ b/scripts/build/binary_hdd
@@ -258,7 +258,7 @@ esac
 mkdir -p chroot/binary.tmp
 mount ${MOUNT_OPTIONS} ${FREELO} chroot/binary.tmp
 Echo_message "Copying binary contents into image..."
-cp -r -T ${CP_OPTIONS} binary/ chroot/binary.tmp
+cp -a -T ${CP_OPTIONS} binary/ chroot/binary.tmp
 
 FIXME()
 {
-- 
2.0.0.rc0


Reply to: