Commit f9a5f699 authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Various tweaks for auto-building on build.gnome.org

parent 5e94c304
......@@ -7,8 +7,7 @@ packages/SOURCES/*.tar.xz
packages/SOURCES/*.tar.bz2
freedesktop-sdk-base
build
repository
release
repo
packages/BUILD/
packages/BUILD_XXXXX/
packages/RPMS/
......
srcdir = $(CURDIR)
builddir = $(CURDIR)
FREEDESKTOP_VERSION=0.1
FREEDESKTOP_VERSION=1.0
GNOME_VERSION=3.16
ARCH=x86_64
IMAGES=freedesktop-sdk-base/build/$(ARCH)/images
IMAGEDIR=freedesktop-sdk-base/images/$(ARCH)
SPECS=packages/SPECS
NOARCH=packages/RPMS/noarch
BASE_HASH=46466befa88445480f51815e7ae1f2232963836d
BASE_HASH=8e6d1e5b50a962710a63f544531b6676513ed565
EXTRA_NAME=
DELTAS=
GPG_KEY=
GPG_HOME=
all: gnome-platform.tar.gz gnome-sdk.tar.gz
SDK_BASE_IMAGE=$(IMAGES)/freedesktop-contents-sdk-$(ARCH)-$(BASE_HASH).tar.gz
PLATFORM_BASE_IMAGE=$(IMAGES)/freedesktop-contents-platform-$(ARCH)-$(BASE_HASH).tar.gz
SDK_BASE_IMAGE=$(IMAGEDIR)/freedesktop-contents-sdk-$(ARCH)-$(BASE_HASH).tar.gz
PLATFORM_BASE_IMAGE=$(IMAGEDIR)/freedesktop-contents-platform-$(ARCH)-$(BASE_HASH).tar.gz
images:
$(SDK_BASE_IMAGE) $(PLATFORM_BASE_IMAGE) images:
if test ! -d freedesktop-sdk-base; then \
git clone https://github.com/alexlarsson/freedesktop-sdk-base.git;\
git clone git://git.gnome.org/freedesktop-sdk-base;\
fi
(cd freedesktop-sdk-base; git pull;)
(cd freedesktop-sdk-base; make;)
(cd freedesktop-sdk-base && \
git fetch origin && \
git checkout $(BASE_HASH) && \
make)
NULL=
......@@ -123,19 +129,19 @@ gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz: gnome-platform-packages $(NOA
./clear_root.sh
repository:
ostree init --mode=archive-z2 --repo=repository
ostree init --mode=archive-z2 --repo=repo
commit-freedesktop-platform: repository freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz
./commit.sh repository freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz metadata.freedesktop-platform org.freedesktop.Platform $(ARCH) $(FREEDESKTOP_VERSION)
commit-freedesktop-platform: repo freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz
./commit.sh repo freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz metadata.freedesktop-platform org.freedesktop.Platform$(EXTRA_NAME) $(ARCH) $(FREEDESKTOP_VERSION)
commit-freedesktop-sdk: repository freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
./commit.sh repository freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz metadata.freedesktop-sdk org.freedesktop.Sdk $(ARCH) $(FREEDESKTOP_VERSION)
commit-freedesktop-sdk: repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
./commit.sh repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz metadata.freedesktop-sdk org.freedesktop.Sdk$(EXTRA_NAME) $(ARCH) $(FREEDESKTOP_VERSION)
commit-platform: repository gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz
./commit.sh repository gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz metadata.platform org.gnome.Platform $(ARCH) $(GNOME_VERSION)
commit-platform: repo gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz
./commit.sh repo gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz metadata.platform org.gnome.Platform$(EXTRA_NAME) $(ARCH) $(GNOME_VERSION)
commit-sdk: repository gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
./commit.sh repository gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz metadata.sdk org.gnome.Sdk $(ARCH) $(GNOME_VERSION)
commit-sdk: repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
./commit.sh repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz metadata.sdk org.gnome.Sdk$(EXTRA_NAME) $(ARCH) $(GNOME_VERSION)
commit-gnome: commit-sdk commit-platform
echo done
......@@ -146,28 +152,10 @@ commit-freedesktop: commit-freedesktop-sdk commit-freedesktop-platform
commit: commit-gnome commit-freedesktop
echo done
release/repo:
ostree init --mode=archive-z2 --repo=release/repo
release-commit-freedesktop-platform: release/repo freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz
./commit.sh release/repo freedesktop-platform.tar.gz freedesktop-platform-rpmdb.tar.gz metadata.freedesktop-platform org.freedesktop.Platform $(ARCH) $(FREEDESKTOP_VERSION)
release-commit-freedesktop-sdk: release/repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz
./commit.sh release/repo freedesktop-sdk.tar.gz freedesktop-sdk-rpmdb.tar.gz metadata.freedesktop-sdk org.freedesktop.Sdk $(ARCH) $(FREEDESKTOP_VERSION)
release-commit-platform: release/repo gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz
./commit.sh release/repo gnome-platform.tar.gz gnome-platform-rpmdb.tar.gz metadata.platform org.gnome.Platform $(ARCH) $(GNOME_VERSION)
release-commit-sdk: release/repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz
./commit.sh release/repo gnome-sdk.tar.gz gnome-sdk-rpmdb.tar.gz metadata.sdk org.gnome.Sdk $(ARCH) $(GNOME_VERSION)
release-commit-gnome: release-commit-sdk release-commit-platform
echo done
release-commit-freedesktop: release-commit-freedesktop-sdk release-commit-freedesktop-platform
echo done
release-commit: release-commit-gnome release-commit-freedesktop
echo done
untag:
./untag.sh repo org.freedesktop.Platform $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
./untag.sh repo org.freedesktop.Sdk $(ARCH) $(FREEDESKTOP_VERSION) $(EXTRA_NAME)
./untag.sh repo org.gnome.Platform $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
./untag.sh repo org.gnome.Sdk $(ARCH) $(GNOME_VERSION) $(EXTRA_NAME)
-include rpm-dependencies.P
......@@ -8,6 +8,8 @@ NAME=$5
ARCH=$6
VERSION=$7
REV=`git rev-parse HEAD`
rm -rf build/commit
mkdir -p build/commit
rm -rf build/commit-locales
......@@ -16,6 +18,14 @@ echo "extracting ${TAR}"
tar xf ${TAR} -C build/commit
cp ${METADATA} build/commit/metadata
COMMIT_ARGS="--repo=${REPO} --owner-uid=0 --owner-gid=0 --no-xattrs"
if [ "x${GPG_KEY}" != "x" ]; then
COMMIT_ARGS="${COMMIT_ARGS} --gpg-sign=${GPG_KEY}"
fi
if [ "x${GPG_HOME}" != "x" ]; then
COMMIT_ARGS="${COMMIT_ARGS} --gpg-homedir=${GPG_HOME}"
fi
echo "extracting locales"
for F in build/commit/files/share/locale/*; do
BASENAME=`basename $F`
......@@ -39,12 +49,12 @@ for F in build/commit/files/lib/locale/*; do
done
echo "commiting runtime/${NAME}/${ARCH}/${VERSION}"
ostree commit --repo=${REPO} --branch=runtime/${NAME}/${ARCH}/${VERSION} --owner-uid=0 --owner-gid=0 --disable-fsync --no-xattrs -s "release" build/commit
ostree commit ${COMMIT_ARGS} --branch=runtime/${NAME}/${ARCH}/${VERSION} -s "build of ${REV}" build/commit
for F in build/commit-locales/*; do
LOCALE=`basename $F`
echo "commiting runtime/${NAME}.Locale.$LOCALE/${ARCH}/${VERSION}"
ostree commit --repo=${REPO} --branch=runtime/${NAME}.Locale.$LOCALE/${ARCH}/${VERSION} --owner-uid=0 --owner-gid=0 --disable-fsync --no-xattrs -s "release" $F
ostree commit ${COMMIT_ARGS} --branch=runtime/${NAME}.Locale.$LOCALE/${ARCH}/${VERSION} -s "build of ${REV}" $F
done
rm -rf build/commit
......@@ -52,9 +62,9 @@ mkdir -p build/commit
echo "extracting ${TAR_VAR}"
tar xf ${TAR_VAR} -C build/commit
echo "commiting runtime/${NAME}.Var/${ARCH}/${VERSION}"
ostree commit --repo=${REPO} --branch=runtime/${NAME}.Var/${ARCH}/${VERSION} --owner-uid=0 --owner-gid=0 --disable-fsync --no-xattrs -s "release" build/commit
ostree commit ${COMMIT_ARGS} --branch=runtime/${NAME}.Var/${ARCH}/${VERSION} -s "build of ${REV}" build/commit
if [ ${REPO} == "release/repo" ]; then
if [ "x${DELTAS}" != "x" ]; then
echo "commiting generating deltas"
ostree static-delta generate --repo=${REPO} --min-fallback-size 1 --empty runtime/${NAME}/x86_64/$VERSION
ostree static-delta generate --repo=${REPO} --min-fallback-size 1 --empty runtime/${NAME}.Var/x86_64/$VERSION
......
[Runtime]
runtime=org.freedesktop.Platform/x86_64/0.1
sdk=org.freedesktop.Sdk/x86_64/0.1
runtime=org.freedesktop.Platform/x86_64/1.0
sdk=org.freedesktop.Sdk/x86_64/1.0
[Extension org.freedesktop.Platform.GL]
directory=lib/GL
......
[Runtime]
runtime=org.freedesktop.Platform/x86_64/0.1
sdk=org.freedesktop.Sdk/x86_64/0.1
runtime=org.freedesktop.Platform/x86_64/1.0
sdk=org.freedesktop.Sdk/x86_64/1.0
[Extension org.freedesktop.Sdk.GL]
directory=lib/GL
......
#!/bin/sh
export REPO=$1
export NAME=$2
export ARCH=$3
export VERSION=$4
export TAG=$5
COMMIT_ARGS="--repo=${REPO}"
if [ "x${GPG_KEY}" != "x" ]; then
COMMIT_ARGS="${COMMIT_ARGS} --gpg-sign=${GPG_KEY}"
fi
if [ "x${GPG_HOME}" != "x" ]; then
COMMIT_ARGS="${COMMIT_ARGS} --gpg-homedir=${GPG_HOME}"
fi
for ORIG_BRANCH in `(cd ${REPO}/refs/heads/; echo runtime/${NAME}${TAG}*/${ARCH}/${VERSION})`; do
export NEW_BRANCH=`echo ${ORIG_BRANCH} | sed s/${TAG}//`;
export COMMITMSG=`ostree show --repo=${REPO} ${ORIG_BRANCH} | tail -n +4 | head -n 1 | sed -e 's/^[ \t]*//'`
ostree commit ${COMMIT_ARGS} --tree=ref=${ORIG_BRANCH} -b ${NEW_BRANCH} -s "${COMMITMSG}"
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment