diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-05-11 04:58:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2021-05-12 07:02:37 +0000 |
commit | df729d12f734badf4479934b492bef1ed5659802 (patch) | |
tree | c5b903dfb1cfdfec98caa4a06df7eb3fc1656f36 /web | |
parent | Adding debian. (diff) | |
download | progress-linux-tools-df729d12f734badf4479934b492bef1ed5659802.tar.xz progress-linux-tools-df729d12f734badf4479934b492bef1ed5659802.zip |
Adding web.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'web')
-rw-r--r-- | web/.gitignore | 2 | ||||
-rwxr-xr-x | web/BFH-check-missing-builds.sh | 29 | ||||
-rwxr-xr-x | web/check-missing-builds.sh | 19 | ||||
-rw-r--r-- | web/ignore.txt | 14 | ||||
-rwxr-xr-x | web/todo.sh | 11 | ||||
-rwxr-xr-x | web/update | 177 | ||||
l--------- | web/update.buster | 1 | ||||
l--------- | web/update.buster-backports | 1 | ||||
l--------- | web/update.engywuck | 1 | ||||
l--------- | web/update.engywuck-backports | 1 | ||||
l--------- | web/update.fuchur | 1 | ||||
l--------- | web/update.fuchur-backports | 1 |
12 files changed, 258 insertions, 0 deletions
diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..c625e37 --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,2 @@ +downstream.* +upstream.* diff --git a/web/BFH-check-missing-builds.sh b/web/BFH-check-missing-builds.sh new file mode 100755 index 0000000..9a175a2 --- /dev/null +++ b/web/BFH-check-missing-builds.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +set -e + +if [ -z "${USER}" ] +then + echo -n "User: " + read USER +fi + +if [ -z "${PASSWORD}" ] +then + echo -n "Password: " + read -s PASSWORD +fi + +PACKAGES="$(wget -q https://${USER}:${PASSWORD}@git.bfh.science/packages/ -O - | grep "sublevel-repo'><a title=" | sed -e "s|^.*<a title='||g" -e "s|'.*$||")" + +echo +echo "Present in git, missing debs:" + +for PACKAGE in ${PACKAGES} +do + if ! wget -q https://apt.bfh.science/archive/${PACKAGE}/current_amd64 -O /dev/null 2>&1 && \ + ! wget -q https://apt.bfh.science/archive/${PACKAGE}/current_all -O /dev/null 1>&1 + then + echo " ${PACKAGE}" + fi +done diff --git a/web/check-missing-builds.sh b/web/check-missing-builds.sh new file mode 100755 index 0000000..35caa12 --- /dev/null +++ b/web/check-missing-builds.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +set -e + +DISTRIBUTION="engywuck" +DISTRIBUTION="engywuck-backports" + +PACKAGES="$(wget -q https://git.progress-linux.org/packages/${DISTRIBUTION}/ -O - | grep "sublevel-repo'><a title=" | sed -e "s|^.*<a title='||g" -e "s|'.*$||")" + +echo "Present in git, missing debs:" + +for PACKAGE in ${PACKAGES} +do + if ! wget -q https://apt.progress-linux.org/archive/${DISTRIBUTION}/${PACKAGE}/current_amd64 -O /dev/null 2>&1 && \ + ! wget -q https://apt.progress-linux.org/archive/${DISTRIBUTION}/${PACKAGE}/current_all -O /dev/null 2>&1 + then + echo " ${PACKAGE}" + fi +done diff --git a/web/ignore.txt b/web/ignore.txt new file mode 100644 index 0000000..043810b --- /dev/null +++ b/web/ignore.txt @@ -0,0 +1,14 @@ +# progress-linux +cryptsetup 2:2.3.4-1+exp1 +e2fsprogs 1.46~WIP.2019.10.03-1 +icu 68.1-1 +libgit2 1.0.1+dfsg.1-1 +libreoffice 1:7.1.0~alpha1-1 +openssl 3.0.0~~alpha4-1 + +# obsolete +llvm-toolchain-8 1:8.0.1-10~progress5+u1 +tty-server 0.0~git20201105.50b9367+ds-1~progress5+u1 + +# bfh +octave 6.0.90-1 diff --git a/web/todo.sh b/web/todo.sh new file mode 100755 index 0000000..4c5b675 --- /dev/null +++ b/web/todo.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +clear + +git clean -dxf + +./update.engywuck +./update.engywuck-backports + +./update.fuchur +./update.fuchur-backports diff --git a/web/update b/web/update new file mode 100755 index 0000000..a73d6a9 --- /dev/null +++ b/web/update @@ -0,0 +1,177 @@ +#!/bin/sh + +set -e + +RED="\033[1;33;31m" +GREEN="\033[1;33;32m" +YELLOW="\033[1;33;33m" +BLUE="\033[1;33;34m" +WHITE="\033[1;33;37m" +NORMAL="\033[0m" + +# FIXME: getopt +# FIXME: -f for forced indices download + +MODE="$(basename ${0} | awk -F. '{ print $2 }')" + +case "${MODE}" in + engywuck) + UPSTREAM_DISTRIBUTIONS="buster buster-updates buster-proposed-updates" + DOWNSTREAM_DISTRIBUTION="engywuck" + DOWNSTREAM_MIRROR="https://apt.progress-linux.org/packages" + DOWNSTREAM_TAG="progress" + ;; + + engywuck-backports) + UPSTREAM_DISTRIBUTIONS="bullseye bullseye-updates bullseye-proposed-updates" + DOWNSTREAM_DISTRIBUTION="engywuck-backports" + DOWNSTREAM_MIRROR="https://apt.progress-linux.org/packages" + DOWNSTREAM_TAG="progress" + ;; + + fuchur) + UPSTREAM_DISTRIBUTIONS="bullseye bullseye-updates bullseye-proposed-updates" + DOWNSTREAM_DISTRIBUTION="fuchur" + DOWNSTREAM_MIRROR="https://apt.progress-linux.org/packages" + DOWNSTREAM_TAG="progress" + ;; + + fuchur-backports) + UPSTREAM_DISTRIBUTIONS="sid experimental" + DOWNSTREAM_DISTRIBUTION="fuchur-backports" + DOWNSTREAM_MIRROR="https://apt.progress-linux.org/packages" + DOWNSTREAM_TAG="progress" + ;; + + buster) + UPSTREAM_DISTRIBUTIONS="buster buster-updates buster-proposed-updates" + DOWNSTREAM_DISTRIBUTION="buster" + DOWNSTREAM_MIRROR="https://apt.bfh.science/packages" + DOWNSTREAM_TAG="bfh" + ;; + + buster-backports) + UPSTREAM_DISTRIBUTIONS="sid experimental" + DOWNSTREAM_DISTRIBUTION="buster-backports" + DOWNSTREAM_MIRROR="https://apt.bfh.science/packages" + DOWNSTREAM_TAG="bfh" + ;; +esac + +UPSTREAM_SECTIONS="main contrib non-free" +UPSTREAM_MIRROR="http://debian.ethz.ch/debian" + +DOWNSTREAM_SECTIONS="main contrib non-free" + +Download_downstream_sources () +{ + # Download downstream sources +# if [ -e "downstream.${MODE}.sources" ] && [ "$(( $(stat -c %Y downstream.${MODE}.sources) + ( 4 * 3600 ) ))" -lt "$(date +%s)" ] +# then +# # file is older than 4 hours + rm -f "downstream.${MODE}.sources" +# fi + + if [ ! -e "downstream.${MODE}.sources" ] + then + for SECTION in ${DOWNSTREAM_SECTIONS} + do + wget -q -O - "${DOWNSTREAM_MIRROR}/dists/${DOWNSTREAM_DISTRIBUTION}/${SECTION}/source/Sources.xz" | xz -d >> "downstream.${MODE}.sources" + done + fi +} + +Download_upstream_sources () +{ + # Download upstream sources + if [ -e "upstream.${MODE}.sources" ] && [ "$(( $(stat -c %Y upstream.${MODE}.sources) + ( 4 * 3600 ) ))" -lt "$(date +%s)" ] + then + # file is older than 4 hours + rm -f "upstream.${MODE}.sources" + fi + + if [ ! -e "upstream.${MODE}.sources" ] + then + for DISTRIBUTION in ${UPSTREAM_DISTRIBUTIONS} + do + case "${DISTRIBUTION}" in + *-*) + ;; + + *) + if wget -q -O /dev/null "http://security.debian.org/dists/${DISTRIBUTION}/updates/Release" + then + for SECTION in ${UPSTREAM_SECTIONS} + do + wget -q -O - "http://security.debian.org/dists/${DISTRIBUTION}/updates/${SECTION}/source/Sources.xz" | xz -d >> "upstream.${MODE}.sources" + done + fi + ;; + esac + + for SECTION in ${UPSTREAM_SECTIONS} + do + wget -q -O - "${UPSTREAM_MIRROR}/dists/${DISTRIBUTION}/${SECTION}/source/Sources.xz" | xz -d >> "upstream.${MODE}.sources" + done + done + fi +} + +Download_downstream_sources +Download_upstream_sources + +# Process downstream sources +DOWNSTREAM_PACKAGES="$(awk '/^Package: / { print $2 }' downstream.${MODE}.sources | sort -u)" + +echo "################################################################################" +echo "${DOWNSTREAM_DISTRIBUTION}" +echo "################################################################################" + +echo -n "Comparing versions... " + +for PACKAGE in ${DOWNSTREAM_PACKAGES} +do + DOWNSTREAM_VERSION="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" downstream.${MODE}.sources | awk '/^Version: / { print $2 }')" + UPSTREAM_VERSION="$(sed -n "/^Package: ${PACKAGE}$/,/^Version:/p" upstream.${MODE}.sources | awk '/^Version: / { print $2 }' | sort -rV | head -n1)" + + if echo ${UPSTREAM_VERSION} | grep -qs '-' + then + # package is non-native + DOWNSTREAM="$(echo ${DOWNSTREAM_VERSION} | sed -e "s|~${DOWNSTREAM_TAG}.*||" -e "s|${DOWNSTREAM_TAG}.*||")" + else + # package is native + DOWNSTREAM="$(echo ${DOWNSTREAM_VERSION} | sed -e "s|-0.0~${DOWNSTREAM_TAG}.*||" -e "s|-0.*${DOWNSTREAM_TAG}.*||")" + fi + + if grep -qs "^${PACKAGE} ${UPSTREAM_VERSION}$" ignore.txt + then + continue + fi + + if [ -z "${UPSTREAM_VERSION}" ] && grep -qs "^${PACKAGE} ${DOWNSTREAM_VERSION}$" ignore.txt + then + continue + fi + + if [ -z "${UPSTREAM_VERSION}" ] + then + echo "${BLUE}${PACKAGE}${NORMAL} '!${DOWNSTREAM_VERSION}'" + continue + fi + + # comparing versions + if dpkg --compare-versions ${UPSTREAM_VERSION} eq ${DOWNSTREAM} + then + echo -n "." + elif dpkg --compare-versions ${UPSTREAM_VERSION} gt ${DOWNSTREAM} + then + echo "${RED}${PACKAGE}${NORMAL} '${UPSTREAM_VERSION} >> ${DOWNSTREAM_VERSION}'" + elif dpkg --compare-versions ${UPSTREAM_VERSION} lt ${DOWNSTREAM} + then + echo "${YELLOW}${PACKAGE}${NORMAL} '${UPSTREAM_VERSION} << ${DOWNSTREAM_VERSION}'" + else + echo "${PACKAGE}: internal error" + fi +done + +echo " done." diff --git a/web/update.buster b/web/update.buster new file mode 120000 index 0000000..77c430a --- /dev/null +++ b/web/update.buster @@ -0,0 +1 @@ +update
\ No newline at end of file diff --git a/web/update.buster-backports b/web/update.buster-backports new file mode 120000 index 0000000..77c430a --- /dev/null +++ b/web/update.buster-backports @@ -0,0 +1 @@ +update
\ No newline at end of file diff --git a/web/update.engywuck b/web/update.engywuck new file mode 120000 index 0000000..77c430a --- /dev/null +++ b/web/update.engywuck @@ -0,0 +1 @@ +update
\ No newline at end of file diff --git a/web/update.engywuck-backports b/web/update.engywuck-backports new file mode 120000 index 0000000..77c430a --- /dev/null +++ b/web/update.engywuck-backports @@ -0,0 +1 @@ +update
\ No newline at end of file diff --git a/web/update.fuchur b/web/update.fuchur new file mode 120000 index 0000000..77c430a --- /dev/null +++ b/web/update.fuchur @@ -0,0 +1 @@ +update
\ No newline at end of file diff --git a/web/update.fuchur-backports b/web/update.fuchur-backports new file mode 120000 index 0000000..77c430a --- /dev/null +++ b/web/update.fuchur-backports @@ -0,0 +1 @@ +update
\ No newline at end of file |