[gnome-build-meta/abderrahim/systemd-repart: 2/2] Use systemd-repart instead of eos-repartition




commit a5f32f2298adfac48b5a38009f5c2bd694e26e00
Author: Abderrahim Kitouni <abderrahim kitouni codethink co uk>
Date:   Wed Oct 5 17:00:25 2022 +0200

    Use systemd-repart instead of eos-repartition
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-build-meta/-/merge_requests/1801>

 elements/boards/generic/initramfs/deps.bst         |  1 -
 elements/boards/pinebook-pro/image.bst             |  3 ---
 elements/boards/pinephone-pro/image.bst            |  1 -
 elements/boards/pinephone-pro/initramfs.bst        |  1 -
 elements/boards/pinephone/image.bst                |  1 -
 elements/boards/pinephone/initramfs.bst            |  1 -
 elements/boards/raspberrypi-4/image.bst            |  3 ---
 elements/boards/raspberrypi-4/initramfs.bst        |  1 -
 elements/boards/raspberrypi-4/initramfs/deps.bst   |  1 -
 elements/boards/rock64/image.bst                   |  3 ---
 elements/vm/common-deps.bst                        |  1 +
 elements/vm/eos-repartition.bst                    | 24 ----------------------
 elements/vm/image.bst                              |  1 +
 elements/vm/initramfs.bst                          |  1 -
 elements/vm/initramfs/deps.bst                     |  1 -
 elements/vm/systemd-repart-config.bst              | 17 +++++++++++++++
 .../raspberrypi-4/repair-mbr/module-setup.sh       |  1 -
 .../vm/eos-repartition/fix-sector-size-issue.patch | 13 ------------
 18 files changed, 19 insertions(+), 56 deletions(-)
---
diff --git a/elements/boards/generic/initramfs/deps.bst b/elements/boards/generic/initramfs/deps.bst
index 65752f3d1..b6b002132 100644
--- a/elements/boards/generic/initramfs/deps.bst
+++ b/elements/boards/generic/initramfs/deps.bst
@@ -14,4 +14,3 @@ depends:
 - freedesktop-sdk.bst:components/linux-firmware.bst
 - freedesktop-sdk.bst:components/wireless-regdb-bin.bst
 - core-deps/libostree.bst
-- vm/eos-repartition.bst
diff --git a/elements/boards/pinebook-pro/image.bst b/elements/boards/pinebook-pro/image.bst
index 46a222bd5..e762e7dee 100644
--- a/elements/boards/pinebook-pro/image.bst
+++ b/elements/boards/pinebook-pro/image.bst
@@ -114,8 +114,5 @@ config:
     cd /genimage
     genimage --rootpath "%{sysroot}" --inputpath "%{indep-libdir}/u-boot/%{board}"
 
-  - |
-    sfdisk --part-attrs /genimage/images/disk.img 2 55
-
   - |
     qemu-img convert -O qcow2 -f raw /genimage/images/disk.img "%{install-root}/disk.qcow2"
diff --git a/elements/boards/pinephone-pro/image.bst b/elements/boards/pinephone-pro/image.bst
index 89414e229..b7b1d7dd3 100644
--- a/elements/boards/pinephone-pro/image.bst
+++ b/elements/boards/pinephone-pro/image.bst
@@ -115,6 +115,5 @@ config:
   - | 
     cd /genimage
     genimage --rootpath "%{sysroot}" --inputpath "%{indep-libdir}/u-boot/%{board}"
-    sfdisk --part-attrs /genimage/images/disk.img 2 55
     mv /genimage/images/disk.img %{install-root}/disk.img
     xz ${XZFLAGS} %{install-root}/disk.img
diff --git a/elements/boards/pinephone-pro/initramfs.bst b/elements/boards/pinephone-pro/initramfs.bst
index efde2a735..4f3194786 100644
--- a/elements/boards/pinephone-pro/initramfs.bst
+++ b/elements/boards/pinephone-pro/initramfs.bst
@@ -43,7 +43,6 @@ config:
            --kver "${version}" \
            --add ostree \
            --add plymouth \
-           --add eos-repartition \
            --add-drivers "rockchipdrm panfrost panel_simple analogix_dp pwm_bl drm_kms_helper" \
            --install 'fsck.ext4' \
            "%{install-root}/usr/lib/modules/${version}/initramfs"
diff --git a/elements/boards/pinephone/image.bst b/elements/boards/pinephone/image.bst
index fd6e5b919..da81e0df1 100644
--- a/elements/boards/pinephone/image.bst
+++ b/elements/boards/pinephone/image.bst
@@ -115,6 +115,5 @@ config:
   - | 
     cd /genimage
     genimage --rootpath "%{sysroot}" --inputpath "%{indep-libdir}/u-boot/%{board}"
-    sfdisk --part-attrs /genimage/images/disk.img 2 55
     mv /genimage/images/disk.img %{install-root}/disk.img
     xz ${XZFLAGS} %{install-root}/disk.img
diff --git a/elements/boards/pinephone/initramfs.bst b/elements/boards/pinephone/initramfs.bst
index e29599a47..3aab6deaf 100644
--- a/elements/boards/pinephone/initramfs.bst
+++ b/elements/boards/pinephone/initramfs.bst
@@ -43,7 +43,6 @@ config:
            --kver "${version}" \
            --add ostree \
            --add plymouth \
-           --add eos-repartition \
            --add-drivers "rockchipdrm panfrost panel_simple analogix_dp pwm_bl drm_kms_helper" \
            --install 'fsck.ext4' \
            "%{install-root}/usr/lib/modules/${version}/initramfs"
diff --git a/elements/boards/raspberrypi-4/image.bst b/elements/boards/raspberrypi-4/image.bst
index ab8e88140..a207c85e6 100644
--- a/elements/boards/raspberrypi-4/image.bst
+++ b/elements/boards/raspberrypi-4/image.bst
@@ -134,8 +134,5 @@ config:
     cd /genimage
     genimage --rootpath "%{sysroot}"
 
-  - |
-    sfdisk --part-attrs /genimage/images/disk.img 2 55
-
   - |
     qemu-img convert -O qcow2 -f raw /genimage/images/disk.img "%{install-root}/disk.qcow2"
diff --git a/elements/boards/raspberrypi-4/initramfs.bst b/elements/boards/raspberrypi-4/initramfs.bst
index 1352b9ded..3a8f2d9cd 100644
--- a/elements/boards/raspberrypi-4/initramfs.bst
+++ b/elements/boards/raspberrypi-4/initramfs.bst
@@ -43,7 +43,6 @@ config:
            --kver "${version}" \
            --add ostree \
            --add plymouth \
-           --add eos-repartition \
            --add-drivers "rockchipdrm panfrost panel_simple analogix_dp pwm_bl drm_kms_helper" \
            --install 'fsck.ext4' \
            "%{install-root}/usr/lib/modules/${version}/initramfs"
diff --git a/elements/boards/raspberrypi-4/initramfs/deps.bst 
b/elements/boards/raspberrypi-4/initramfs/deps.bst
index 96255b3b9..2213822d5 100644
--- a/elements/boards/raspberrypi-4/initramfs/deps.bst
+++ b/elements/boards/raspberrypi-4/initramfs/deps.bst
@@ -17,5 +17,4 @@ depends:
 - freedesktop-sdk.bst:components/wireless-regdb-bin.bst
 
 - core-deps/libostree.bst
-- vm/eos-repartition.bst
 - boards/raspberrypi-4/repair-mbr.bst
diff --git a/elements/boards/rock64/image.bst b/elements/boards/rock64/image.bst
index 41cea2433..ad4a7fdfa 100644
--- a/elements/boards/rock64/image.bst
+++ b/elements/boards/rock64/image.bst
@@ -115,8 +115,5 @@ config:
     cd /genimage
     genimage --rootpath "%{sysroot}" --inputpath "%{indep-libdir}/u-boot/%{board}"
 
-  - |
-    sfdisk --part-attrs /genimage/images/disk.img 2 55
-
   - |
     qemu-img convert -O qcow2 -f raw /genimage/images/disk.img "%{install-root}/disk.qcow2"
diff --git a/elements/vm/common-deps.bst b/elements/vm/common-deps.bst
index f3ac9ff61..c9758600d 100644
--- a/elements/vm/common-deps.bst
+++ b/elements/vm/common-deps.bst
@@ -20,6 +20,7 @@ depends:
 - vm/spice-vdagent.bst
 - vm/wpa-supplicant-config.bst
 - vm/nsswitch-config.bst
+- vm/systemd-repart-config.bst
 
 - vm/fish.bst
 - vm/nss-mdns.bst
diff --git a/elements/vm/image.bst b/elements/vm/image.bst
index 32e73d38c..70a43be34 100644
--- a/elements/vm/image.bst
+++ b/elements/vm/image.bst
@@ -118,6 +118,7 @@ config:
     rm -rf genimage.cfg images/ tmp/
 
   # FIXME: Propose support for part attrs in genimage project
+  # This is needed for eos-installer to recognize the image
   - sfdisk --part-attrs %{install-root}/disk.img 2 55
 
   - xz ${XZFLAGS} %{install-root}/disk.img
diff --git a/elements/vm/initramfs.bst b/elements/vm/initramfs.bst
index 440cb4318..404d447b2 100644
--- a/elements/vm/initramfs.bst
+++ b/elements/vm/initramfs.bst
@@ -43,7 +43,6 @@ config:
            --kver "${version}" \
            --add ostree \
            --add plymouth \
-           --add eos-repartition \
            --install 'fsck.ext4' \
            "%{install-root}/usr/lib/modules/${version}/initramfs"
 
diff --git a/elements/vm/initramfs/deps.bst b/elements/vm/initramfs/deps.bst
index 7e5cd5c5f..aa874b84d 100644
--- a/elements/vm/initramfs/deps.bst
+++ b/elements/vm/initramfs/deps.bst
@@ -14,5 +14,4 @@ depends:
 - freedesktop-sdk.bst:components/linux-firmware.bst
 - core-deps/libostree.bst
 - vm/plymouth-gnome-theme.bst
-- vm/eos-repartition.bst
 
diff --git a/elements/vm/systemd-repart-config.bst b/elements/vm/systemd-repart-config.bst
new file mode 100644
index 000000000..239ebe681
--- /dev/null
+++ b/elements/vm/systemd-repart-config.bst
@@ -0,0 +1,17 @@
+kind: manual
+
+build-depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+
+config:
+  build-commands:
+  - |
+    cat > 50-root.conf << END
+    [Partition]
+    Type=root
+    GrowFileSystem=yes
+    END
+
+  install-commands:
+  - install -m644 -Dt %{install-root}%{indep-libdir}/repart.d 50-root.conf
+
diff --git a/files/boards/raspberrypi-4/repair-mbr/module-setup.sh 
b/files/boards/raspberrypi-4/repair-mbr/module-setup.sh
index a0b1d7fbc..0712b4858 100755
--- a/files/boards/raspberrypi-4/repair-mbr/module-setup.sh
+++ b/files/boards/raspberrypi-4/repair-mbr/module-setup.sh
@@ -4,7 +4,6 @@ check() {
 
 depends() {
     echo systemd
-    echo eos-repartition
 }
 
 install() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]