Merge lp:~mvo/snappy/snappy-snapfs-fix-os-image-build into lp:~snappy-dev/snappy/snappy-moved-to-github

Proposed by Michael Vogt
Status: Needs review
Proposed branch: lp:~mvo/snappy/snappy-snapfs-fix-os-image-build
Merge into: lp:~snappy-dev/snappy/snappy-moved-to-github
Prerequisite: lp:~mvo/snappy/snappy-snapfs-boot-ok
Diff against target: 37 lines (+6/-4)
2 files modified
pkg/snapfs/snapfs.go (+0/-1)
snappy/build.go (+6/-3)
To merge this branch: bzr merge lp:~mvo/snappy/snappy-snapfs-fix-os-image-build
Reviewer Review Type Date Requested Status
Sergio Schvezov Approve
Review via email: mp+275198@code.launchpad.net

Commit message

Preserve uid/gid in the squashfs images to allow creating proper os/kernel snaps.

To post a comment you must log in.
Revision history for this message
Sergio Schvezov (sergiusens) wrote :

this was the culprit i hope

review: Approve
790. By Michael Vogt

snappy/build.go: ensure build preserves the permissions

Unmerged revisions

790. By Michael Vogt

snappy/build.go: ensure build preserves the permissions

789. By Michael Vogt

pkg/snapfs/snapfs.go: remove -all-root from mksquashfs

788. By Michael Vogt

partition/bootloader_grub.go: use the right grub-env when globalrootdir is set

787. By Michael Vogt

snappy/kernel.go: use GlobalRootDir in unpackKernel

786. By Michael Vogt

partition/bootloader.go: do not crash if there is no otherRootPartition

785. By Michael Vogt

merged lp:snappy

784. By Michael Vogt

add boot-ok for new-style all-snaps

783. By Michael Vogt

disallow removal of the active kernel and os

782. By Michael Vogt

remove kernel assets in /boot/ on snap removal

781. By Michael Vogt

show a reboot required message (not complete yet)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'pkg/snapfs/snapfs.go'
2--- pkg/snapfs/snapfs.go 2015-10-21 15:06:18 +0000
3+++ pkg/snapfs/snapfs.go 2015-10-21 15:06:18 +0000
4@@ -160,7 +160,6 @@
5 return runCommand(
6 "mksquashfs",
7 ".", fullSnapPath,
8- "-all-root",
9 "-noappend",
10 "-comp", "xz")
11 })
12
13=== modified file 'snappy/build.go'
14--- snappy/build.go 2015-10-11 11:09:36 +0000
15+++ snappy/build.go 2015-10-21 15:06:18 +0000
16@@ -441,7 +441,10 @@
17
18 // handle dirs
19 if info.IsDir() {
20- return os.Mkdir(dest, info.Mode())
21+ if err := os.Mkdir(dest, info.Mode()); err != nil {
22+ return err
23+ }
24+ return os.Chown(dest, int(info.Sys().(*syscall.Stat_t).Uid), int(info.Sys().(*syscall.Stat_t).Gid))
25 }
26
27 // handle char/block devices
28@@ -467,8 +470,8 @@
29 // whee
30 return nil
31 }
32- // sigh. ok, copy it is.
33- return helpers.CopyFile(path, dest, helpers.CopyFlagDefault)
34+ // CopySpecialFile preserves permissions and owner
35+ return helpers.CopySpecialFile(path, dest)
36 })
37 }
38

Subscribers

People subscribed via source and target branches