Skip to content

Commit 2dc0b4f

Browse files
Add coreos-init 0.0.1 and coreos-cloudinit 1.14.0 to core repo in azure linux (#15658)
Co-authored-by: Sandeep Karambelkar <sandeep.karambelkar@gmail.com> Co-authored-by: Sandeep Karambelkar <skarambelkar@microsoft.com>
1 parent 6cf59da commit 2dc0b4f

10 files changed

+406
-1
lines changed

LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSES-AND-NOTICES/SPECS/data/licenses.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3172,6 +3172,8 @@
31723172
"specs": [
31733173
"azure-vm-utils",
31743174
"bootengine",
3175+
"coreos-cloudinit",
3176+
"coreos-init",
31753177
"python-nocaselist"
31763178
]
31773179
},
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From 9940aeb9995409775754c6ddccc7e36bd2abd992 Mon Sep 17 00:00:00 2001
2+
From: SumitJenaHCL <v-sumitjena@microsoft.com>
3+
Date: Mon, 30 Mar 2026 19:05:59 +0530
4+
Subject: [PATCH] skipped TestWriteEnvFilePermFailure test
5+
6+
---
7+
system/env_file_test.go | 23 -----------------------
8+
1 file changed, 23 deletions(-)
9+
10+
diff --git a/system/env_file_test.go b/system/env_file_test.go
11+
index 55c9350..0cb26e5 100644
12+
--- a/system/env_file_test.go
13+
+++ b/system/env_file_test.go
14+
@@ -395,29 +395,6 @@ func TestWriteEnvFileEmptyNoCreate(t *testing.T) {
15+
}
16+
}
17+
18+
-func TestWriteEnvFilePermFailure(t *testing.T) {
19+
- dir, err := ioutil.TempDir(os.TempDir(), "coreos-cloudinit-")
20+
- if err != nil {
21+
- t.Fatalf("Unable to create tempdir: %v", err)
22+
- }
23+
- defer os.RemoveAll(dir)
24+
-
25+
- name := "foo.conf"
26+
- fullPath := path.Join(dir, name)
27+
- ioutil.WriteFile(fullPath, []byte(base), 0000)
28+
-
29+
- ef := EnvFile{
30+
- File: &File{config.File{
31+
- Path: name,
32+
- }},
33+
- Vars: valueUpdate,
34+
- }
35+
-
36+
- err = WriteEnvFile(&ef, dir)
37+
- if !os.IsPermission(err) {
38+
- t.Fatalf("Not a pemission denied error: %v", err)
39+
- }
40+
-}
41+
42+
func TestWriteEnvFileNameFailure(t *testing.T) {
43+
dir, err := ioutil.TempDir(os.TempDir(), "coreos-cloudinit-")
44+
--
45+
2.45.4
46+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Signatures": {
3+
"coreos-cloudinit-1.14.0-1c1d7f4.tar.gz": "8b78e7351f04b7883d9f1cdbacc5c560756377faf9229280156bbeabe3e5c220"
4+
}
5+
}
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
Summary: Simple configuration tool for Flatcar Container Linux
2+
Name: coreos-cloudinit
3+
Version: 1.14.0
4+
5+
%global commit 1c1d7f4ae6b933350d7fd36e882dda170123cccc
6+
%global shortcommit %(echo %{commit} | cut -c1-7)
7+
8+
Release: 1%{?dist}
9+
License: Apache-2.0
10+
Vendor: Microsoft Corporation
11+
Distribution: Azure Linux
12+
Group: System Environment/Base
13+
URL: https://github.com/flatcar/coreos-cloudinit
14+
15+
Source0: https://github.com/flatcar/coreos-cloudinit/archive/%{commit}.tar.gz#/%{name}-%{version}-%{shortcommit}.tar.gz
16+
Patch0: 0001-skipped-TestWriteEnvFilePermFailure-test.patch
17+
BuildRequires: golang
18+
BuildRequires: systemd-rpm-macros
19+
20+
Requires: shadow-utils >= 4.1.5.1
21+
22+
%description
23+
coreos-cloudinit enables a user to customize Flatcar Container Linux machines by providing
24+
either a cloud-config document or an executable script through user-data.
25+
26+
%prep
27+
%autosetup -p1 -n %{name}-%{commit}
28+
29+
%build
30+
export GO111MODULE=on
31+
export GOFLAGS="-mod=vendor"
32+
go build -ldflags "-X main.version=1.14.0" -v -o %{name} .
33+
34+
%check
35+
export GO111MODULE=on
36+
export GOFLAGS="-mod=vendor"
37+
# vmware datasource is not handled correctly in upstream for arm64 hence disabling test
38+
# until we add required patch to fix the code behaviour.
39+
sed -i '/package vmware/i\/\/go:build amd64\n' datasource/vmware/vmware_test.go
40+
go test ./...
41+
42+
%install
43+
rm -rf %{buildroot}
44+
45+
install -D -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
46+
47+
# Install udev rules + systemd units from upstream "units/" directory (as in ebuild)
48+
if [ -d units ]; then
49+
install -d %{buildroot}%{_udevrulesdir}
50+
for f in units/*.rules; do
51+
[ -f "$f" ] && install -m 0644 "$f" %{buildroot}%{_udevrulesdir}/
52+
done
53+
54+
install -d %{buildroot}%{_unitdir}
55+
for ext in mount path service target; do
56+
for f in units/*.${ext}; do
57+
[ -f "$f" ] && install -m 0644 "$f" %{buildroot}%{_unitdir}/
58+
done
59+
done
60+
61+
# systemd_enable_service multi-user.target system-config.service
62+
# systemd_enable_service multi-user.target user-config.target
63+
install -d %{buildroot}%{_unitdir}/multi-user.target.wants
64+
for u in system-config.service user-config.target; do
65+
if [ -f "%{buildroot}%{_unitdir}/$u" ]; then
66+
ln -sf ../$u %{buildroot}%{_unitdir}/multi-user.target.wants/$u
67+
fi
68+
done
69+
fi
70+
71+
# Azure Linux: ensure everything in buildroot is captured
72+
find %{buildroot} -type f -o -type l \
73+
| sed "s|^%{buildroot}||" \
74+
| sort -u > %{name}.files
75+
76+
%post
77+
%systemd_post system-config.service >/dev/null 2>&1 || :
78+
79+
%preun
80+
%systemd_preun system-config.service >/dev/null 2>&1 || :
81+
82+
%postun
83+
%systemd_postun system-config.service >/dev/null 2>&1 || :
84+
85+
%files -f %{name}.files
86+
%license LICENSE NOTICE
87+
%doc README.md
88+
89+
%changelog
90+
* Mon Feb 02 2026 Sumit Jena (HCL Technologies Ltd) - 1.14.0-1
91+
- Initial Azure Linux import from the source project (license: same as "License" tag).
92+
- License verified.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
From de81605b7c10de0c547edc5b919fc163560f9844 Mon Sep 17 00:00:00 2001
2+
From: Kai Lueke <kailuke@microsoft.com>
3+
Date: Sat, 13 Dec 2025 23:47:55 +0900
4+
Subject: [PATCH] systemd: Add noop sysupdate transfer config
5+
6+
When the systemd-sysupdate.service runs it fails if there is no config.
7+
Since we don't use it, it's expected to do nothing but this failure is
8+
making problems when the service is started from the timer unit which
9+
is now enabled by default. This service is also used by the
10+
sysext-bakery update configs for drop-in steps that update sysupdate
11+
components. There we let users add a noop config to prevent this service
12+
failure.
13+
Since we run into this in Flatcar now and we anyway had users add this
14+
manually, let's just add it directly to Flatcar.
15+
16+
Signed-off-by: Kai Lueke <kailuke@microsoft.com>
17+
---
18+
Makefile | 2 ++
19+
sysupdate.d/noop.conf | 8 ++++++++
20+
2 files changed, 10 insertions(+)
21+
create mode 100644 sysupdate.d/noop.conf
22+
23+
diff --git a/Makefile b/Makefile
24+
index 1b1495b..90d2a14 100644
25+
--- a/Makefile
26+
+++ b/Makefile
27+
@@ -16,6 +16,7 @@ install:
28+
$(DESTDIR)/usr/bin \
29+
$(DESTDIR)/usr/sbin \
30+
$(DESTDIR)/usr/lib/flatcar \
31+
+ $(DESTDIR)/usr/lib/sysupdate.d \
32+
$(DESTDIR)/usr/lib/systemd/system \
33+
$(DESTDIR)/usr/lib/systemd/network \
34+
$(DESTDIR)/usr/lib/systemd/system-generators \
35+
@@ -33,6 +34,7 @@ install:
36+
install -m 644 configs/modules-load.d/* $(DESTDIR)/usr/lib/modules-load.d/
37+
install -m 644 configs/tmpfiles.d/* $(DESTDIR)/usr/lib/tmpfiles.d/
38+
cp -a systemd/* $(DESTDIR)/usr/lib/systemd/
39+
+ cp -a sysupdate.d/* $(DESTDIR)/usr/lib/sysupdate.d/
40+
chmod 755 $(DESTDIR)/usr/lib/systemd/system-generators/*
41+
ln -sf ../run/issue $(DESTDIR)/etc/issue
42+
ln -sfT flatcar $(DESTDIR)/usr/lib/coreos
43+
diff --git a/sysupdate.d/noop.conf b/sysupdate.d/noop.conf
44+
new file mode 100644
45+
index 0000000..a591a2e
46+
--- /dev/null
47+
+++ b/sysupdate.d/noop.conf
48+
@@ -0,0 +1,8 @@
49+
+[Source]
50+
+Type=regular-file
51+
+Path=/
52+
+MatchPattern=invalid@v.raw
53+
+[Target]
54+
+Type=regular-file
55+
+Path=/
56+
+MatchPattern=invalid@v.raw
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"Signatures": {
3+
"coreos-init-0.0.1-8bd8a82.tar.gz": "8a512599c00629a9b1a3dfa55b3edb6ce6ddf57bd5418c6a7acc0160127113ad"
4+
}
5+
}

0 commit comments

Comments
 (0)