diff --git a/Makefile b/Makefile index 17830e1..4bafa43 100644 --- a/Makefile +++ b/Makefile @@ -5,8 +5,10 @@ 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 @@ -14,49 +16,35 @@ repo/config: 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) diff --git a/commit-subtree.sh b/commit-subtree.sh index 9ad58a7..aa0abe4 100755 --- a/commit-subtree.sh +++ b/commit-subtree.sh @@ -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 diff --git a/leap-42.1.kiwi b/leap-15.4.kiwi similarity index 90% rename from leap-42.1.kiwi rename to leap-15.4.kiwi index 64c5a20..6dd23c6 100644 --- a/leap-42.1.kiwi +++ b/leap-15.4.kiwi @@ -1,16 +1,16 @@ - + Frederic Crozat fcrozat@suse.com - Flatpak runtime and Sdk, based on Leap 42.1 JeOS + Flatpak runtime and Sdk, based on Leap 15.4 JeOS - 1.42.1 + 15.4 zypper en_US us.map.gz @@ -21,16 +21,17 @@ - + - + - + + @@ -72,16 +73,18 @@ - + + + @@ -111,9 +114,9 @@ - + - + @@ -160,7 +163,7 @@ --> - + diff --git a/metadata.runtime b/metadata.platform similarity index 59% rename from metadata.runtime rename to metadata.platform index 74a51bc..e7e9e91 100644 --- a/metadata.runtime +++ b/metadata.platform @@ -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 diff --git a/metadata.sdk b/metadata.sdk index 049b2c8..b178077 100644 --- a/metadata.sdk +++ b/metadata.sdk @@ -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 diff --git a/prepare-to-ostree.sh b/prepare-to-ostree.sh index 3c779e7..3d2f3d0 100755 --- a/prepare-to-ostree.sh +++ b/prepare-to-ostree.sh @@ -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