Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cross-compatibility of used dependencies #46

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.PHONY: all clean

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are adding PHONY then let's add all PHONY targets. I believe targets root, image, iso are PHONY as well

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense


LOCAL_DIR ?= $(shell readlink -m $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
WORK_DIR ?= $(LOCAL_DIR)/work
Expand Down
14 changes: 7 additions & 7 deletions create-live-image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

set -eux -o pipefail

Expand Down Expand Up @@ -33,7 +33,7 @@ trap "cleanup ${MNTDIR}" 0 1 2 3 6 15
truncate -s 16G "${IMG}"

# have static UUIDs to make partition table reproducible
/usr/sbin/sfdisk "$IMG" <<EOF || exit 1
sfdisk "$IMG" <<EOF || exit 1
label: gpt
label-id: f4796a2a-e377-45bd-b539-d6d49e569055

Expand All @@ -44,7 +44,7 @@ size=10000MiB, type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=693244e6-3e07-47b
type=0FC63DAF-8483-4772-8E79-3D69D8477DE4, uuid=9b06e23f-74bb-4c49-b83d-d3b0c0c2bb01, name="Golem storage"
EOF

IMG_LOOP=$(/sbin/losetup -P -f --show "$IMG")
IMG_LOOP=$(losetup -P -f --show "$IMG")
EFI_IMG_DEV=${IMG_LOOP}p1
BIOS_IMG_DEV=${IMG_LOOP}p2
CONF_DEV=${IMG_LOOP}p3
Expand All @@ -54,10 +54,10 @@ STORAGE_DEV=${IMG_LOOP}p5
udevadm settle --exit-if-exists="$IMG_DEV"

# Creating filesystems
/sbin/mkfs.vfat "${EFI_IMG_DEV}"
/sbin/mkfs.fat -F32 "${CONF_DEV}"
/sbin/mkfs.ext4 -U 90a495f3-c8ce-45c6-97ac-3bd5edf3aebd -q -F "${IMG_DEV}"
/sbin/mkfs.ext4 -q -F "${STORAGE_DEV}"
mkfs.vfat "${EFI_IMG_DEV}"
mkfs.fat -F32 "${CONF_DEV}"
mkfs.ext4 -U 90a495f3-c8ce-45c6-97ac-3bd5edf3aebd -q -F "${IMG_DEV}"
mkfs.ext4 -q -F "${STORAGE_DEV}"

mkdir -p "${MNTDIR}"
mount "${IMG_DEV}" "${MNTDIR}"
Expand Down
2 changes: 1 addition & 1 deletion get-merged-rootfs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Command-line tool that simplifies the process of extracting Docker images
# and their root filesystem layers. It saves provided image to a tarball and then
Expand Down