diskimage-builder/diskimage_builder/elements
Noam Angel f1369a1add Set manifest permissions in the image
This is a follow-on to 57ef187632.

There's two things going on here; DIB_MANIFEST_IMAGE_DIR is *outside*
the chroot on the build host.  We copy the files here for posterity, I
guess.  MANIFEST_IMAGE_PATH is *inside* the chroot and are the files
we want to ensure are locked to root.

The prior change modified the permissions on DIB_MANIFEST_IMAGE_DIR.
So the first time you build, it works -- then the second time,
assuming you're using the same output filename, it hits the root-owned
manifest directories and causes a build failure.

I have built with this and checked that the manifest files in the
image are locked to root:

 $ virt-ls -a ./test.qcow2 -l /etc/dib-manifests
 total 32
 drwxr-xr-x  2 0 0  4096 May 24 03:39 .
 drwxr-xr-x 53 0 0  4096 May 24 03:39 ..
 -rw-------  1 0 0 15236 May 24 03:39 dib-manifest-dpkg-test
 -rw-------  1 0 0    35 May 24 03:39 dib_arguments
 -rw-------  1 0 0   137 May 24 03:39 dib_environment

Related-Bug: #1671842
Change-Id: I08319d0b5fcc461d40fe0be8427dcf0e37ad21e6
2017-05-24 15:20:55 +10:00
..
apt-conf Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
apt-preferences Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
apt-sources Release 1.25.2 2017-02-02 11:20:00 +11:00
architecture-emulation-binaries Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
baremetal Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
base Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
bootloader Fix typo in CMDLINE env var for bootloader 2017-03-22 12:02:37 +01:00
cache-url Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
centos Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
centos7 Merge "Run dib-run-parts out of /tmp" 2017-04-05 10:18:55 +00:00
centos-minimal Release 1.27.0 2017-02-03 11:49:45 +11:00
cleanup-kernel-initrd Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
cloud-init Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
cloud-init-datasources Turn off strict_id mode for Ec2 datasource 2017-04-19 09:47:56 +02:00
cloud-init-disable-resizefs Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
cloud-init-nocloud Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
debian Unify and fix doc of several Debian and Ubuntu elements 2017-04-07 05:56:50 +00:00
debian-minimal Add a test to validate we can build debian vms 2017-05-05 19:17:39 +02:00
debian-systemd Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
debian-upstart Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
debootstrap Refactor: block-device filesystem creation, mount and fstab 2017-05-12 13:52:02 +02:00
deploy-baremetal Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-kexec Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-targetcli Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
deploy-tgtadm Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
devuser Release 1.25.2 2017-02-02 11:20:00 +11:00
dhcp-all-interfaces Release 1.27.0 2017-02-03 11:49:45 +11:00
dib-init-system Fix dib-init-system for Debian Jessie and Debian Stretch 2017-03-11 14:04:13 +00:00
dib-python Install pip with python interpreter 2017-04-11 18:59:09 +10:00
dib-run-parts Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
disable-selinux/post-install.d Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
dkms Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
docker Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
dpkg Semi-automatic doc generation of element dependency 2017-02-09 09:50:30 +11:00
dracut-network Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
dracut-ramdisk Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
dynamic-login Release 1.25.2 2017-02-02 11:20:00 +11:00
element-manifest Release 1.24.0 2017-01-31 14:14:19 +11:00
enable-serial-console Release 1.25.2 2017-02-02 11:20:00 +11:00
epel Add yum-utils as EPEL dependency 2017-04-20 17:01:00 -04:00
fedora Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
fedora-minimal Release 1.27.0 2017-02-03 11:49:45 +11:00
gentoo Make Gentoo package updates work more often 2017-04-22 19:34:11 -05:00
growroot Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
grub2 Fix #1627402: fix grub2 element for ubuntu xenial 2017-02-11 18:44:18 +00:00
hpdsa Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
hwburnin Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
hwdiscovery Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ilo Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-bin Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-static Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
install-types Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ironic-agent Release 1.27.0 2017-02-03 11:49:45 +11:00
iso Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
local-config Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
manifests Set manifest permissions in the image 2017-05-24 15:20:55 +10:00
mellanox Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
modprobe-blacklist Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
no-final-image Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
oat-client Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
openssh-server Release 1.21.1 2017-02-02 20:36:23 +11:00
opensuse Merge "Fix opensuse-minimal element on non-SUSE hosts" 2017-04-07 12:06:31 +00:00
opensuse-minimal Fix opensuse-minimal element on non-SUSE hosts 2017-04-02 19:37:01 -04:00
package-installs Fix package-installs-v2 output 2017-04-07 13:48:53 +10:00
pip-and-virtualenv Skip python3-virtualenv on <= trusty 2017-04-12 06:36:20 +10:00
pip-cache Release 1.25.2 2017-02-02 11:20:00 +11:00
pkg-map Fix package-installs-v2 output 2017-04-07 13:48:53 +10:00
posix Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-29 07:43:46 +11:00
proliant-tools Release 1.27.0 2017-02-03 11:49:45 +11:00
pypi Release 1.27.0 2017-02-03 11:49:45 +11:00
python-brickclient Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
ramdisk Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ramdisk-base Release 1.25.2 2017-02-02 11:20:00 +11:00
rax-nova-agent Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
redhat-common Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
rhel Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
rhel7 Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
rhel-common Merge remote-tracking branch 'origin/master' into merge-branch 2016-11-18 13:53:56 +11:00
rpm-distro Apply setfiles on all mountpoints 2017-05-16 07:51:48 +02:00
runtime-ssh-host-keys Release 1.21.1 2017-02-02 20:36:23 +11:00
select-boot-kernel-initrd Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
selinux-permissive Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
simple-init Have simple-init enable network.service 2017-03-28 19:28:51 +11:00
source-repositories Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
stable-interface-names Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
svc-map Release 1.27.0 2017-02-03 11:49:45 +11:00
sysctl Release 1.25.2 2017-02-02 11:20:00 +11:00
uboot Move elements & lib relative to diskimage_builder package 2016-11-01 17:27:41 -07:00
ubuntu Unify and fix doc of several Debian and Ubuntu elements 2017-04-07 05:56:50 +00:00
ubuntu-common Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
ubuntu-core Run dib-run-parts out of /tmp 2017-04-05 13:11:22 +10:00
ubuntu-minimal Unify and fix doc of several Debian and Ubuntu elements 2017-04-07 05:56:50 +00:00
ubuntu-signed Use sphinx warning-is-error 2017-03-14 14:49:49 +11:00
vm Refactor: block-device filesystem creation, mount and fstab 2017-05-12 13:52:02 +02:00
yum Merge branch 'master' into merge-branch 2017-02-09 13:35:53 +11:00
yum-minimal Refactor: block-device filesystem creation, mount and fstab 2017-05-12 13:52:02 +02:00
zypper Refactor: block-device filesystem creation, mount and fstab 2017-05-12 13:52:02 +02:00
zypper-minimal Refactor: block-device filesystem creation, mount and fstab 2017-05-12 13:52:02 +02:00