Skip to content
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
40 changes: 14 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,46 @@ clean:
sudo rm -fr buildroot buildroot-prepare .commit-*

PROXY=
VERSION=1
VERSION=15.4
ARCH=x86_64
platform_METADATA=metadata.platform
sdk_METADATA=metadata.sdk

repo/config:
ostree init --repo=repo --mode=bare-user

exportrepo/config:
ostree init --repo=exportrepo --mode=archive-z2

repo/refs/heads/base/org.openSUSE.Runtime/$(ARCH)/$(VERSION): repo/config leap-42.1.kiwi config.sh
repo/refs/heads/base/org.openSUSE.Platform/$(ARCH)/$(VERSION): repo/config leap-15.4.kiwi config.sh
sudo rm -rf buildroot
sudo kiwi --profile="runtime" system prepare --root=$$PWD/buildroot --description=$$PWD
sudo kiwi --profile="platform" system prepare --root=$$PWD/buildroot --description=$$PWD
sudo ./prepare-to-ostree.sh
sudo ostree --repo=repo commit -s 'initial build' -b base/org.openSUSE.Runtime/$(ARCH)/$(VERSION) --tree=dir=$$PWD/buildroot-prepare
sudo ostree --repo=repo commit -s 'initial build' -b base/org.openSUSE.Platform/$(ARCH)/$(VERSION) --tree=dir=$$PWD/buildroot-prepare
sudo chown -R `whoami` repo

repo/refs/heads/base/org.openSUSE.Sdk/$(ARCH)/$(VERSION): repo/config leap-42.1.kiwi config.sh
repo/refs/heads/base/org.openSUSE.Sdk/$(ARCH)/$(VERSION): repo/config leap-15.4.kiwi config.sh
sudo rm -rf buildroot
sudo kiwi --profile="sdk" system prepare --root=$$PWD/buildroot --description=$$PWD
sudo ./prepare-to-ostree.sh
sudo ostree --repo=repo commit -s 'initial build' -b base/org.openSUSE.Sdk/$(ARCH)/$(VERSION) --tree=dir=$$PWD/buildroot-prepare
sudo chown -R `whoami` repo

repo/refs/heads/runtime/org.openSUSE.Runtime/$(ARCH)/$(VERSION): repo/refs/heads/base/org.openSUSE.Runtime/$(ARCH)/$(VERSION) metadata.runtime
./commit-subtree.sh base/org.openSUSE.Runtime/$(ARCH)/$(VERSION) runtime/org.openSUSE.Runtime/$(ARCH)/$(VERSION) metadata.runtime /usr files

repo/refs/heads/runtime/org.openSUSE.Runtime.Var/$(ARCH)/$(VERSION): repo/refs/heads/base/org.openSUSE.Runtime/$(ARCH)/$(VERSION) metadata.runtime
./commit-subtree.sh base/org.openSUSE.Runtime/$(ARCH)/$(VERSION) runtime/org.openSUSE.Runtime.Var/$(ARCH)/$(VERSION) metadata.runtime /var files /usr/share/rpm files/lib/rpm
repo/refs/heads/runtime/org.openSUSE.Platform/$(ARCH)/$(VERSION): repo/refs/heads/base/org.openSUSE.Platform/$(ARCH)/$(VERSION) metadata.platform
./commit-subtree.sh base/org.openSUSE.Platform/$(ARCH)/$(VERSION) runtime/org.openSUSE.Platform/$(ARCH)/$(VERSION) metadata.platform /usr files

repo/refs/heads/runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION): repo/refs/heads/base/org.openSUSE.Sdk/$(ARCH)/$(VERSION) metadata.sdk
./commit-subtree.sh base/org.openSUSE.Sdk/$(ARCH)/$(VERSION) runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION) metadata.sdk /usr files

repo/refs/heads/runtime/org.openSUSE.Sdk.Var/$(ARCH)/$(VERSION): repo/refs/heads/base/org.openSUSE.Sdk/$(ARCH)/$(VERSION) metadata.sdk
./commit-subtree.sh base/org.openSUSE.Sdk/$(ARCH)/$(VERSION) runtime/org.openSUSE.Sdk.Var/$(ARCH)/$(VERSION) metadata.sdk /var files /usr/share/rpm files/lib/rpm

exportrepo/refs/heads/runtime/org.openSUSE.Runtime/$(ARCH)/$(VERSION): repo/refs/heads/runtime/org.openSUSE.Runtime/$(ARCH)/$(VERSION) exportrepo/config
ostree pull-local --repo=exportrepo repo runtime/org.openSUSE.Runtime/$(ARCH)/$(VERSION)
flatpak build-update-repo exportrepo
./commit-subtree.sh base/org.openSUSE.Sdk/$(ARCH)/$(VERSION) runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION) metadata.sdk /usr files /usr/share/rpm files/lib/rpm

exportrepo/refs/heads/runtime/org.openSUSE.Runtime.Var/$(ARCH)/$(VERSION): repo/refs/heads/runtime/org.openSUSE.Runtime.Var/$(ARCH)/$(VERSION) exportrepo/config
ostree pull-local --repo=exportrepo repo runtime/org.openSUSE.Runtime.Var/$(ARCH)/$(VERSION)
exportrepo/refs/heads/runtime/org.openSUSE.Platform/$(ARCH)/$(VERSION): repo/refs/heads/runtime/org.openSUSE.Platform/$(ARCH)/$(VERSION) exportrepo/config
ostree pull-local --repo=exportrepo repo runtime/org.openSUSE.Platform/$(ARCH)/$(VERSION)
flatpak build-update-repo exportrepo

exportrepo/refs/heads/runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION): repo/refs/heads/runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION) exportrepo/config
ostree pull-local --repo=exportrepo repo runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION)
flatpak build-update-repo exportrepo

exportrepo/refs/heads/runtime/org.openSUSE.Sdk.Var/$(ARCH)/$(VERSION): repo/refs/heads/runtime/org.openSUSE.Sdk.Var/$(ARCH)/$(VERSION) exportrepo/config
ostree pull-local --repo=exportrepo repo runtime/org.openSUSE.Sdk.Var/$(ARCH)/$(VERSION)
flatpak build-update-repo exportrepo

platform: exportrepo/refs/heads/runtime/org.openSUSE.Runtime/$(ARCH)/$(VERSION) exportrepo/refs/heads/runtime/org.openSUSE.Runtime.Var/$(ARCH)/$(VERSION)
platform: exportrepo/refs/heads/runtime/org.openSUSE.Platform/$(ARCH)/$(VERSION)

sdk: exportrepo/refs/heads/runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION) exportrepo/refs/heads/runtime/org.openSUSE.Sdk.Var/$(ARCH)/$(VERSION)
sdk: exportrepo/refs/heads/runtime/org.openSUSE.Sdk/$(ARCH)/$(VERSION)

2 changes: 1 addition & 1 deletion commit-subtree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ while (( "$#" )); do
ostree checkout --repo=repo --subpath=$1 -U $SRC_COMMIT $DIR/$2
shift 2
done
ostree commit --repo=repo --no-xattrs --owner-uid=0 --owner-gid=0 --link-checkout-speedup -s "Commit" --branch $DST_COMMIT $DIR
cat $METADATA | xargs -0 -I XXX ostree commit --repo=repo --no-xattrs --owner-uid=0 --owner-gid=0 --link-checkout-speedup -s "Commit" --branch $DST_COMMIT $DIR --add-metadata-string xa.metadata=XXX
rm -rf $DIR
23 changes: 13 additions & 10 deletions leap-42.1.kiwi → leap-15.4.kiwi
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>

<image schemaversion="6.3" name="LimeJeOS-Leap-42.1">
<image schemaversion="6.3" name="openSUSE-Leap-15.4-JeOS">
<description type="system">
<author>Frederic Crozat</author>
<contact>fcrozat@suse.com</contact>
<specification>
Flatpak runtime and Sdk, based on Leap 42.1 JeOS
Flatpak runtime and Sdk, based on Leap 15.4 JeOS
</specification>
</description>
<preferences>
<type image="tbz" />
<version>1.42.1</version>
<version>15.4</version>
<packagemanager>zypper</packagemanager>
<locale>en_US</locale>
<keytable>us.map.gz</keytable>
Expand All @@ -21,16 +21,17 @@
</preferences>
<profiles>
<profile name="sdk" description="Flatpack sdk"/>
<profile name="runtime" description="Flatpack runtime"/>
<profile name="platform" description="Flatpack runtime"/>
</profiles>
<users group="root">
<user password="$1$wYJUgpM5$RXMMeASDc035eX.NbYWFl0" home="/root" name="root"/>
</users>
<repository type="yast2" imageinclude="true">
<source path="obs://leap/42.1/repo/oss"/>
<source path="http://download.opensuse.org/distribution/leap/15.4/repo/oss/"/>
</repository>
<packages type="image">
<packages type="image" profiles="platform">
<package name="ca-certificates-mozilla"/> <!-- OPENSUSE: needed for https -->
<package name="bash-sh"/>
<package name="tar"/>
<package name="timezone"/>
<package name="elfutils"/>
Expand Down Expand Up @@ -72,16 +73,18 @@
<package name="Mesa-libGL1"/>
<package name="libgdbm4"/>
<package name="libGLU1"/>
<package name="libGLEW1_13"/>
<package name="libGLEW2_2"/>
<!-- pulseaudio-->
<package name="libpulse0"/>
<package name="libpulse-mainloop-glib0"/>
</packages>
<packages type="bootstrap" profiles="sdk">
<package name="bash-sh"/>
<package name="valgrind"/>
<package name="strace"/>
<package name="gdb"/>
<package name="cpio"/>
<package name="rpm"/>
<package name="rpm-build"/>
<package name="zypper"/>
<package name="gcc"/>
Expand Down Expand Up @@ -111,9 +114,9 @@
<package name="libXxf86vm-devel"/>
<package name="libXfont-devel"/>
<package name="libfontenc-devel"/>
<package name="mesa-libEGL-devel"/>
<package name="Mesa-libEGL-devel"/>
<package name="libgbm-devel"/>
<package name="mesa-libGL-devel"/>
<package name="Mesa-libGL-devel"/>
<package name="glu-devel"/>
<package name="glew-devel"/>
<package name="libpulse-devel"/>
Expand Down Expand Up @@ -160,7 +163,7 @@
<package name="systemd-presets-branding-openSUSE"/>
-->
</packages>
<packages type="delete" profiles="runtime">
<packages type="delete" profiles="platform">
<package name="perl"/>
<package name="sysvinit-tools"/>
<package name="aaa_base"/>
Expand Down
6 changes: 3 additions & 3 deletions metadata.runtime → metadata.platform
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Runtime]
name=org.openSUSE.Runtime/x86_64/1
runtime=org.flatpak.Runtime/x86_64/1
sdk=org.openSUSE.Sdk/x86_64/1
name=org.openSUSE.Platform
runtime=org.openSUSE.Platform/x86_64/15.4
sdk=org.openSUSE.Sdk/x86_64/15.4

[Environment]
LD_LIBRARY_PATH=/app/lib64
Expand Down
6 changes: 3 additions & 3 deletions metadata.sdk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Runtime]
name=org.openSUSE.Sdk/x86_64/20160625
runtime=org.openSUSE.Runtime/x86_64/20160625
sdk=org.openSUSE.Sdk/x86_64/20160625
name=org.openSUSE.Sdk
runtime=org.openSUSE.Platform/x86_64/15.4
sdk=org.openSUSE.Sdk/x86_64/15.4

[Environment]
LD_LIBRARY_PATH=/app/lib64
Expand Down
22 changes: 11 additions & 11 deletions prepare-to-ostree.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ TARGET=buildroot-prepare
rm -fr $TARGET
mkdir $TARGET
mkdir $TARGET/{var,dev,proc,run,sys,sysroot}
ln -s ../var/opt $TARGET/opt
ln -s ../var/srv $TARGET/srv
ln -s ../var/mnt $TARGET/mnt
ln -s ../var/roothome $TARGET/root
ln -s ../var/home $TARGET/home
ln -s ../run/media $TARGET/media
ln -s ../sysroot/ostree $TARGET/ostree
ln -s ../sysroot/tmp $TARGET/tmp
ln -s buildroot/var/opt $TARGET/opt
ln -s buildroot/var/srv $TARGET/srv
ln -s buildroot/var/mnt $TARGET/mnt
ln -s buildroot/var/roothome $TARGET/root
ln -s buildroot/var/home $TARGET/home
ln -s buildroot/run/media $TARGET/media
ln -s buildroot/sysroot/ostree $TARGET/ostree
ln -s buildroot/sysroot/tmp $TARGET/tmp

mv buildroot/usr $TARGET/usr
mv buildroot/etc $TARGET/etc
cp -r buildroot/usr $TARGET/usr
cp -r buildroot/etc $TARGET/etc
ln -s var/lib/rpm $TARGET/usr/share/rpm
mv $TARGET/usr/local $TARGET/var/usrlocal
cp -r $TARGET/usr/local $TARGET/var/usrlocal