mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-29 14:16:31 +00:00
Finish implementing fakeroot handling so when we tar up the
rootfs, the tarball properly inherits device table settings and device nodes.
This commit is contained in:
parent
eb0ee4509d
commit
9540549182
@ -6,17 +6,30 @@
|
|||||||
|
|
||||||
TAR_OPTS := $(strip $(BR2_TARGET_ROOTFS_TAR_OPTIONS))
|
TAR_OPTS := $(strip $(BR2_TARGET_ROOTFS_TAR_OPTIONS))
|
||||||
|
|
||||||
TAR_TARGET := $(IMAGE).tar
|
tarroot: host-fakeroot makedevs
|
||||||
|
|
||||||
$(TAR_TARGET):
|
|
||||||
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
|
-@find $(TARGET_DIR) -type f -perm +111 | xargs $(STRIP) 2>/dev/null || true;
|
||||||
@rm -rf $(TARGET_DIR)/usr/man
|
@rm -rf $(TARGET_DIR)/usr/man
|
||||||
@rm -rf $(TARGET_DIR)/usr/share/man
|
|
||||||
@rm -rf $(TARGET_DIR)/usr/info
|
@rm -rf $(TARGET_DIR)/usr/info
|
||||||
tar -c$(TAR_OPTS)f $(TAR_TARGET) -C $(TARGET_DIR) .
|
# Use fakeroot to munge permissions and do root-like things
|
||||||
|
rm -f $(STAGING_DIR)/fakeroot.env
|
||||||
tarroot: $(TAR_TARGET)
|
touch $(STAGING_DIR)/fakeroot.env
|
||||||
@ls -l $(TAR_TARGET)
|
# Use fakeroot to pretend all target binaries are owned by root
|
||||||
|
$(STAGING_DIR)/usr/bin/fakeroot \
|
||||||
|
-i $(STAGING_DIR)/fakeroot.env \
|
||||||
|
-s $(STAGING_DIR)/fakeroot.env -- \
|
||||||
|
chown -R root:root $(TARGET_DIR)
|
||||||
|
# Use fakeroot to pretend to create all needed device nodes
|
||||||
|
$(STAGING_DIR)/usr/bin/fakeroot \
|
||||||
|
-i $(STAGING_DIR)/fakeroot.env \
|
||||||
|
-s $(STAGING_DIR)/fakeroot.env -- \
|
||||||
|
$(STAGING_DIR)/bin/makedevs \
|
||||||
|
-r $(TARGET_DIR) \
|
||||||
|
-d target/generic/device_table.txt
|
||||||
|
# Use fakeroot to fake out mksquashfs per the previous fakery
|
||||||
|
$(STAGING_DIR)/usr/bin/fakeroot \
|
||||||
|
-i $(STAGING_DIR)/fakeroot.env \
|
||||||
|
-s $(STAGING_DIR)/fakeroot.env -- \
|
||||||
|
tar -c$(TAR_OPTS)f $(IMAGE).tar -C $(TARGET_DIR) .
|
||||||
|
|
||||||
tarroot-source:
|
tarroot-source:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user