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

Update from main to latest #31

Merged
merged 14 commits into from
Mar 21, 2024
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
branches:
- main
- latest
- 15.x-x86_64
- 14.x-x86_64
- 14.x-x86
- 13.x-x86_64
Expand All @@ -24,6 +25,7 @@ on:
branches:
- main
- latest
- 15.x-x86_64
- 14.x-x86_64
- 14.x-x86
- 13.x-x86_64
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
FROM scratch
MAINTAINER "innovarew <innovarew at github.com> (c) Copyright 2022"
LABEL author="@author innovarew <innovarew at github.com> (c) Copyright 2022."
ARG TC_VER=14.x-x86_64
ARG TC_VER=15.x-x86_64

ADD data/rootfs-$TC_VER.tar.xz /

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#

# Set tinycore release
TC_URL=http://tinycorelinux.net/14.x/x86_64/
TC_URL=http://tinycorelinux.net/15.x/x86_64/
TC_VER=$(shell echo "${TC_URL}" | awk -F/ '{print $$4"-"$$5}')

all: rootfs build run
Expand Down
7 changes: 7 additions & 0 deletions data/rootfs-10.x-x86_64.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: innovarew <innovarew @ users.noreply.github.com>
Subject: [PATCH] innovarew/docker-tinycore: data/rootfs-10.x-x86_64.patch

---
diff --git a/data/root/usr/bin/tce-load b/data/root/usr/bin/tce-load
---
--- a/data/root/usr/bin/tce-load 2022-09-15 14:21:36.023392786 +0200
+++ b/data/root/usr/bin/tce-load 2022-09-15 14:26:05.504617088 +0200
@@ -9,6 +9,7 @@
Expand Down
8 changes: 8 additions & 0 deletions data/rootfs-13.x-x86_64.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: innovarew <innovarew @ users.noreply.github.com>
Subject: [PATCH] innovarew/docker-tinycore: data/rootfs-13.x-x86_64.patch

---
diff --git a/data/root/usr/bin/tce-load b/data/root/usr/bin/tce-load

---
--- a/data/root/usr/bin/tce-load 2022-08-30 08:31:42.991023502 +0200
+++ b/data/root/usr/bin/tce-load 2022-08-30 08:44:49.504582953 +0200
@@ -9,6 +9,7 @@
Expand Down
8 changes: 8 additions & 0 deletions data/rootfs-14.x-x86_64.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: innovarew <innovarew @ users.noreply.github.com>
Subject: [PATCH] innovarew/docker-tinycore: data/rootfs-14.x-x86_64.patch

---
diff --git a/data/root/usr/bin/tce-load b/data/root/usr/bin/tce-load

---
--- a/data/root/usr/bin/tce-load 2022-08-30 08:31:42.991023502 +0200
+++ b/data/root/usr/bin/tce-load 2022-08-30 08:44:49.504582953 +0200
@@ -9,6 +9,7 @@
Expand Down
1 change: 1 addition & 0 deletions data/rootfs-15.x-x86_64.patch
Binary file added data/rootfs-15.x-x86_64.tar.xz
Binary file not shown.
29 changes: 19 additions & 10 deletions scripts/tc-docker
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
# v1.0 Initial version
#
# 26/08/2023 innovarew
# v1.1 Bump version
# v1.1 Bump version x86_64
#
# 02/02/2024 innovarew
# v1.2 Bump version x86
#

PROGNAME=${0##*/}
Expand All @@ -26,9 +29,15 @@ PROGURL="https://github.com/innovarew/docker-tinycore"
set -euf

TC_ARCH=${TC_ARCH:-x86_64}
TC_URL=${TC_URL:-http://tinycorelinux.net/14.x/${TC_ARCH}}
ISO_URL=${ISO_URL:-$TC_URL/release/TinyCorePure64-current.iso}
TC_URL=${TC_URL:-http://tinycorelinux.net/15.x/${TC_ARCH}}
TC_ISO=${TC_ISO:-$TC_URL/release/TinyCorePure64-current.iso}
TCZ_URL=$TC_URL/tcz
TC_CPIO=${TC_CPIO:-corepure64.gz}

if [ "$TC_ARCH" = "x86" ]; then
TC_CPIO=core.gz
TC_ISO=$TC_URL/release/TinyCore-current.iso
fi

TCE_DIR=$PWD/data/tce/optional
if grep -qi tinycore /etc/os-release
Expand All @@ -43,10 +52,10 @@ tce_rootfs_init()
TC_TAR="rootfs-$TC_VER.tar.xz"
TC_PATCH="rootfs-$TC_VER.patch"

echo "# $ISO_URL"
echo "# $TC_ISO"
(
rm -r data/tce
mkdir -p $TCE_DIR
mkdir -p "$TCE_DIR"

rm -rf data/root
rm -rf data/tinycore
Expand All @@ -64,25 +73,25 @@ tce_rootfs_init()
tce_install liblzma.tcz "$PWD/root/"
tce_install squashfs-tools.tcz "$PWD/root/"

patch -p2 < $TC_PATCH
patch -p2 < "$TC_PATCH"
)

(cd data/root; tar cJf "../$TC_TAR" .)
}

tce_rootfs_unpack()
{
ISO_FILE="${ISO_URL##*/}"
ISO_FILE="${TC_ISO##*/}"

wget -qc "$ISO_URL"
# wget -qc "$ISO_URL.md5.txt" && md5sum -c $(basename "$ISO_URL.md5.txt")
wget -qc "$TC_ISO"
# wget -qc "$TC_ISO.md5.txt" && md5sum -c $(basename "$TC_ISO.md5.txt")

if [ ! -d "tinycore" ]
then
mkdir -p tinycore
7z x -otinycore "$ISO_FILE" >/dev/null
mkdir -p root
(cd root; zcat ../tinycore/boot/corepure64.gz | cpio --extract)
(cd root; zcat "../tinycore/boot/$TC_CPIO" | cpio --extract)
fi
}

Expand Down
Loading