This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository buildscripts. from 95cd5f1 bin/sbuild-deb-package: switch to httpredir.debian.org from http.debian.net. new f0e7d4d bin/build-rpm-package: handle *SUSE repositories differently than the other ones. new 76c51bf bin/createsusetagsrepo: add cleanup_repo routine for removing dangling symlinks and creating new ones. new 0fb41ab bin/build-rpm-package: use more quotes in non-SUSE upload section. The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: bin/build-rpm-package | 88 ++++++++++++++++++++++++++++++++++++++---------- bin/createsusetagsrepo | 23 +++++++++++++ 2 files changed, 93 insertions(+), 18 deletions(-) -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit f0e7d4d537684e87f3650b1abc716c42705ed9cf Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Nov 24 08:05:09 2016 +0100 bin/build-rpm-package: handle *SUSE repositories differently than the other ones. With this commit, the data layout for *SUSE repositories will change and the createsusetagsrepo script will be used instead of createrepo, thus creating/updating SUSE-tags based repositories instead of rpm-md-based repositories. --- bin/build-rpm-package | 88 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 70 insertions(+), 18 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index c6735f4..58f92dc 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -958,29 +958,81 @@ upload_packages() { if [ "${l_ARCH}" = "i386" ]; then l_ARCH="i586" fi - fi - # create remote directories in archive - 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}" - 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata" + # create remote directories in archive + 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/${PROJECT}'" - # remove rpm packages of the same name (pattern) - 0</dev/null ssh "${REPOS_SERVER}" "rm -f -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/*.rpm" + # remove rpm packages of the same name (pattern) + 0</dev/null ssh "${REPOS_SERVER}" "rm -f -- '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/${PROJECT}/'*.rpm" - # copy (s)rpms into repo - cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" - scp *.rpm "${REPOS_SERVER}:${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/" || true + # copy (s)rpms into repo + cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" + scp *.rpm "${REPOS_SERVER}:'${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/${PROJECT}/'" || true - CREATEREPO_OPTS="" - typeset gpg_sign_with="${GPG_KEY}" - if [ "${l_DIST}" = "epel" ] && [ "${l_CODENAME}" = "5" ]; then - CREATEREPO_OPTS="-s sha" - gpg_sign_with="${GPG_KEY_EPEL5}" - fi - 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/ && createrepo ${CREATEREPO_OPTS} ." + typeset distro_string="" + if [ "${l_DIST}" = "opensuse" ]; then + distro_string="OpenSuSE:" + [ "${l_CODENAME}" -gt "13" ] && distro_string="${distro_string}Leap:" + distro_string="${distro_string}${l_CODENAME}" + else + distro_string="SLE:" + + # Split up version in major version and service pack. + typeset -i major="0" + typeset -i sp="0" + typeset -i i="0" + typeset other="" + typeset -a read_arr + while IFS='.' read -ra read_arr; do + for i in "${read_arr[@]}"; do + if [ "${i}" = "0" ]; then + major="${read_arr[${i}]}" + + [ "${major}" != "${read_arr[${i}]}" ] && { + echo "Major SUSE version is not a valid integer, aborting." >&2 + exit 1 + } + elif [ "${i}" = "1" ]; then + sp="${read_arr[${i}]}" + + [ "${sp}" != "${read_arr[${i}]}" ] && { + echo "SUSE service pack version is not a valid integer, aborting." >&2 + exit 1 + } + else + other="${other}.${read_arr[${i}]}" + fi + done + done <<< "${l_CODENAME}" - 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata && rm -f -- repomd.xml.asc && gpg -a -u ${gpg_sign_with} --detach-sign repomd.xml" 1>/dev/null 2>/dev/null - 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata && test -e repomd.xml.key || gpg -a --output repomd.xml.key --export ${gpg_sign_with}" + distro_string="${distro_string}${major}" + [ "${sp}" -gt "0" ] && distro_string="${distro_string}:SP${sp}" + [ -n "${other}" ] && distro_string="${distro_string}${other}" + fi + 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/{$l_CODENAME}/${COMPONENT}/' && createsusetagsrepo . '${distro_string}' '${l_CODENAME}'" + else + # create remote directories in archive + 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}" + 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata" + + # remove rpm packages of the same name (pattern) + 0</dev/null ssh "${REPOS_SERVER}" "rm -f -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/*.rpm" + + # copy (s)rpms into repo + cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" + scp *.rpm "${REPOS_SERVER}:${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/" || true + + typeset createrepo_opts="" + typeset gpg_sign_with="${GPG_KEY}" + if [ "${l_DIST}" = "epel" ] && [ "${l_CODENAME}" = "5" ]; then + createrepo_opts="-s sha" + gpg_sign_with="${GPG_KEY_EPEL5}" + fi + 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/ && createrepo ${createrepo_opts} ." + + 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata && rm -f -- repomd.xml.asc && gpg -a -u ${gpg_sign_with} --detach-sign repomd.xml" 1>/dev/null 2>/dev/null + 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata && test -e repomd.xml.key || gpg -a --output repomd.xml.key --export ${gpg_sign_with}" + fi fi done done -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 76c51bf10a33b9256118a7d620de3507eb999811 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Nov 24 08:39:29 2016 +0100 bin/createsusetagsrepo: add cleanup_repo routine for removing dangling symlinks and creating new ones. --- bin/createsusetagsrepo | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/bin/createsusetagsrepo b/bin/createsusetagsrepo index 7c53d30..76c8f9c 100755 --- a/bin/createsusetagsrepo +++ b/bin/createsusetagsrepo @@ -30,6 +30,27 @@ error () { exit "1" } +cleanup_repo () { + typeset arch="" + for arch in "SRPM" "i586" "x86_64" "armhf" "ppc64" "ppc64le"; do + # Skip arches not available in this repository. + [ -d "${arch}" ] || continue + + pushd "${arch}" + + # Remove broken links. + find -L . -name '.' -o -type 'd' -prune -o -type 'l' -execdir rm -- '{}' + + + # Create new ones. + typeset file="" + for file in */*.rpm; do + ln -sv -- "${file}" "$(basename "${file}")" + done + + popd + done +} + create_metadata () { rm -rf -- "media.1" "descr" mkdir -- "media.1" "descr" @@ -91,6 +112,8 @@ test -z "${component}" && usage cd "${repo_top_dir}" || error "Unable to switch to provided repository top directory '${repo_top_dir}'." +cleanup_repo + create_metadata create_package_descr -o descr -x /dev/null -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository buildscripts. commit 0fb41abf69fee498cdab2110768fcb31b4b44f03 Author: Mihai Moldovan <ionic@ionic.de> Date: Thu Nov 24 08:41:56 2016 +0100 bin/build-rpm-package: use more quotes in non-SUSE upload section. --- bin/build-rpm-package | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/build-rpm-package b/bin/build-rpm-package index 58f92dc..3226c68 100755 --- a/bin/build-rpm-package +++ b/bin/build-rpm-package @@ -1012,15 +1012,15 @@ upload_packages() { 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/{$l_CODENAME}/${COMPONENT}/' && createsusetagsrepo . '${distro_string}' '${l_CODENAME}'" else # create remote directories in archive - 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}" - 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata" + 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}'" + 0</dev/null ssh "${REPOS_SERVER}" "mkdir -p -- '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata'" # remove rpm packages of the same name (pattern) - 0</dev/null ssh "${REPOS_SERVER}" "rm -f -- ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/*.rpm" + 0</dev/null ssh "${REPOS_SERVER}" "rm -f -- '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/'*.rpm" # copy (s)rpms into repo cd "${PKGDIST}/${l_DIST}/${l_CODENAME}/${l_ARCH}" - scp *.rpm "${REPOS_SERVER}:${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/" || true + scp *.rpm "${REPOS_SERVER}:'${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/rpms/${PROJECT}/'" || true typeset createrepo_opts="" typeset gpg_sign_with="${GPG_KEY}" @@ -1028,10 +1028,10 @@ upload_packages() { createrepo_opts="-s sha" gpg_sign_with="${GPG_KEY_EPEL5}" fi - 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/ && createrepo ${createrepo_opts} ." + 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/' && createrepo '${createrepo_opts}' '.'" - 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata && rm -f -- repomd.xml.asc && gpg -a -u ${gpg_sign_with} --detach-sign repomd.xml" 1>/dev/null 2>/dev/null - 0</dev/null ssh "${REPOS_SERVER}" "cd ${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata && test -e repomd.xml.key || gpg -a --output repomd.xml.key --export ${gpg_sign_with}" + 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata' && rm -f -- 'repomd.xml.asc' && gpg -a -u '${gpg_sign_with}' --detach-sign 'repomd.xml'" 1>/dev/null 2>/dev/null + 0</dev/null ssh "${REPOS_SERVER}" "cd '${RPM_REPOS_BASE}/${l_DIST}/${l_CODENAME}/${COMPONENT}/${l_ARCH}/repodata' && test -e 'repomd.xml.key' || gpg -a --output 'repomd.xml.key' --export '${gpg_sign_with}'" fi fi done -- Alioth's /srv/git/code.x2go.org/buildscripts.git//..//_hooks_/post-receive-email on /srv/git/code.x2go.org/buildscripts.git