Merge lp:~sil2100/livecd-rootfs/dangling-vmlinuz into lp:livecd-rootfs

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 1710
Proposed branch: lp:~sil2100/livecd-rootfs/dangling-vmlinuz
Merge into: lp:livecd-rootfs
Diff against target: 42 lines (+8/-3)
2 files modified
debian/changelog (+6/-1)
live-build/auto/build (+2/-2)
To merge this branch: bzr merge lp:~sil2100/livecd-rootfs/dangling-vmlinuz
Reviewer Review Type Date Requested Status
Steve Langasek Needs Fixing
Review via email: mp+345679@code.launchpad.net

Commit message

Avoid issues of hard-linking to a symbolic vmlinuz as this can lead to a dangling symlink.

Description of the change

Avoid issues of hard-linking to a symbolic vmlinuz as this can lead to a dangling symlink.

When working on raspi3 support for ubuntu-image, I was running a cross-compilation live-build through u-i of the raspi3 rootfs and noticed the build crashing on the two lines attempting to chmod a just-hardlinked $PREFIX.kernel file. Since in this case binary/boot/vmlinuz was a relative symlink, the generated hard-link was also a symlink to a non-existing path in that directory. I guess it's anyway safer to make sure we're not hard-linking in such cases.

To post a comment you must log in.
1670. By Łukasz Zemczak

Merge trunk

1671. By Łukasz Zemczak

Merge trunk

Revision history for this message
Steve Langasek (vorlon) :
review: Needs Fixing
1672. By Łukasz Zemczak

Don't overcomplicate bash conditionals.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2018-10-29 17:48:42 +0000
3+++ debian/changelog 2018-10-31 10:18:33 +0000
4@@ -1,12 +1,17 @@
5 livecd-rootfs (2.543) UNRELEASED; urgency=medium
6
7+ [ Cody Shepherd ]
8 * Ensure pre-seeded snaps are now published in the image manifests.
9 * Include grub efi packages in manifests for uefi images.
10
11 [ Aleksandr Bogdanov ]
12 * vagrant: disabling automatic console log file
13
14- -- Cody Shepherd <cody.shepherd@canonical.com> Mon, 22 Oct 2018 10:16:19 -0700
15+ [ Łukasz 'sil2100' Zemczak ]
16+ * Avoid issues of hard-linking to a symbolic vmlinuz as this can lead to a
17+ dangling symlink.
18+
19+ -- Łukasz 'sil2100' Zemczak <lukasz.zemczak@ubuntu.com> Tue, 18 Sep 2018 10:21:30 +0200
20
21 livecd-rootfs (2.542) cosmic; urgency=medium
22
23
24=== modified file 'live-build/auto/build'
25--- live-build/auto/build 2018-10-23 17:32:52 +0000
26+++ live-build/auto/build 2018-10-31 10:18:33 +0000
27@@ -849,13 +849,13 @@
28 NUMFLAVOURS="$(set -- $LB_LINUX_FLAVOURS; echo $#)"
29 if [ "$NUMFLAVOURS" = 1 ] && [ "$LB_LINUX_FLAVOURS" != "none" ]; then
30 # only one kernel flavour
31- if [ -e "binary/$INITFS/vmlinuz" ]; then
32+ if [ -f "binary/$INITFS/vmlinuz" ]; then
33 ln "binary/$INITFS/vmlinuz" "$PREFIX.kernel"
34 chmod 644 "$PREFIX.kernel"
35 else
36 ln -sf "$PREFIX.kernel-$LB_LINUX_FLAVOURS" "$PREFIX.kernel"
37 fi
38- if [ -e "binary/$INITFS/initrd.lz" ]; then
39+ if [ -f "binary/$INITFS/initrd.lz" ]; then
40 ln "binary/$INITFS/initrd.lz" "$PREFIX.initrd"
41 chmod 644 "$PREFIX.initrd"
42 else

Subscribers

People subscribed via source and target branches