You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.2 KiB
33 lines
1.2 KiB
#!/bin/bash
|
|
|
|
DISTRIB="$1"
|
|
TDE_VERSION="$2"
|
|
ARCH="$3"
|
|
|
|
[ -z "${TDE_VERSION}" ] && TDE_VERSION="14.0.5"
|
|
[ -z "${ARCH}" ] && ARCH="x86_64"
|
|
|
|
IMAGE="trinity.${DISTRIB}.${ARCH}:${TDE_VERSION}"
|
|
DIST="$(sed -n ${DISTRIB}/rpmmacros -e "/%dist/ s|.* ||p")"
|
|
|
|
mkdir -p "${HOME}/rpmbuild/RPMS/RPMS${DIST}.tde-${TDE_VERSION}"
|
|
mkdir -p "${HOME}/rpmbuild/SRPMS/SRPMS${DIST}.tde-${TDE_VERSION}"
|
|
mkdir -p "/dev/shm/docker"
|
|
|
|
docker run -t -i --rm --privileged \
|
|
-h "${IMAGE}" \
|
|
--name "${IMAGE//:/-}" \
|
|
-v /dev/shm/docker:/tmp:z \
|
|
-u trinity \
|
|
-e TMPPATH=/tmp \
|
|
-e TDE_VERSION=${TDE_VERSION} \
|
|
-w /home/trinity/tde/tde-packaging.r14.0.x/redhat \
|
|
-v ${HOME}/.gnupg:/home/trinity/.gnupg \
|
|
-v ${HOME}/tde/tde-packaging.r14.0.x:/home/trinity/tde/tde-packaging.r14.0.x \
|
|
-v ${HOME}/tde/tde-packaging.master:/home/trinity/tde/tde-packaging.master \
|
|
-v ${HOME}/tde/tde-patches:/home/trinity/tde/tde-patches \
|
|
-v ${HOME}/tde/tde-tarballs:/home/trinity/tde/tde-tarballs \
|
|
-v ${HOME}/rpmbuild/RPMS/RPMS${DIST}.tde-${TDE_VERSION}:/home/trinity/rpmbuild/RPMS.tde-${TDE_VERSION} \
|
|
-v ${HOME}/rpmbuild/SRPMS/SRPMS${DIST}.tde-${TDE_VERSION}:/home/trinity/rpmbuild/SRPMS.tde-${TDE_VERSION} \
|
|
"${IMAGE}" setarch ${ARCH} bash
|