#!/bin/sh -e _version="$1" echo "Clean up sources" rm -rf cockpit echo "Cloning cockpit.git" git clone https://github.com/cockpit-project/cockpit.git cd cockpit echo -n "Checking tag ${_version}... " if ! git tag | grep -w ${_version}; then echo "fail" exit 1 else echo "ok" fi echo "Checkout tag ${_version}" git checkout ${_version} echo "Patching souurces" # FIXME # Remove GOST patches for MSVSphere 8 # As it is unsupported by system rm ../0001-Added-support-GOST-and-PAM-GOST-profiles-for-crypto-.patch rm ../0009-Change-chpasswd-to-passwd-to-support-PAM-crypto-algo.patch git am ../000*.patch echo "Fix version in tools/make-dist" sed -i "s@VERSION=\"\$(git describe.*@VERSION=${_version}@" tools/make-dist echo "Make dist" tools/make-dist cd .. cp cockpit/tmp/build-dist/cockpit-${_version}.tar.xz . sha1sum cockpit-${_version}.tar.xz