index : releng | |
Archlinux32 release engineering | gitolite user |
summaryrefslogtreecommitdiff |
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-02-03 20:34:49 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-02-03 20:34:49 +0100 |
commit | 2ff8e857a3f6d1772012f4c7cfee74b4c35c2f39 (patch) | |
tree | 2482d9ad394a0a0732f8dec95ef1a914380e1dec /build-all | |
parent | ae993074a1d70e169a419320fe203790b319c43b (diff) |
-rwxr-xr-x | build-all | 66 |
@@ -17,11 +17,15 @@ # parameters CONFIG="releng" ARCH="i686" +#ARCH = "dual" +DESC="i686 only" +#DESC="dual bootable" DATE=$(date +%Y.%m.%d) ISO="archlinux32-${DATE}-${ARCH}.iso" SIGNATURE="${ISO}.sig" TORRENT="${ISO}.torrent" -TORRENT_SERVER="archlinux32.org" +TORRENT_SERVER="localhost" +#TORRENT_SERVER="archlinux32.org" WEBSITE_DIR="/srv/http/archlinux32.org" MIRROR_DIR="/srv/http/mirror/mirror.archlinux32.org" ARCHISOS_DIR="${MIRROR_DIR}/archisos/" @@ -31,7 +35,6 @@ MIRROR_GROUP='mirror' SIGN_KEY='16194A82231E9EF823562181C8E8F5A0AF9BA7E7' # Archlinux 32 Release Key <release@archlinux32.org> #SIGN_KEY='33CA3597B0D161AAE4173F65C17F1214114574A4' -WEB_DIR="/srv/http/archlinux32.org" base_dir=$( readlink -e "${0%/*}" @@ -61,31 +64,36 @@ cleanup() { trap cleanup EXIT # build the ISO -#echo "Building ISO.." -#"${base_dir}/build-iso" --config="${CONFIG}" --arch "${ARCH}" \ -# --output-dir="${ARCHISOS_DIR}" --iso "${ISO}" +echo "Building ISO.." +"${base_dir}/build-iso" --config="${CONFIG}" --arch "${ARCH}" \ + --output-dir="${ARCHISOS_DIR}" --iso "${ISO}" # sign ISO echo "Signing ISO.." -#pushd "${ARCHISOS_DIR}" -#rm -rf "${ISO}.sig" -#gpg --local-user "${SIGN_KEY}" --batch --no-tty --detach-sign "${ISO}" </dev/null -#popd +pushd "${ARCHISOS_DIR}" +rm -rf "${ISO}.sig" +gpg --local-user "${SIGN_KEY}" --batch --no-tty --detach-sign "${ISO}" </dev/null +popd # checksum the ISO and the signature echo "Updating checksum files.." -#pushd "${ARCHISOS_DIR}" -#files=("${ISO}" "${ISO}.sig") -#for file in "${files[@]}"; do -# echo $file -# [ ! -f sha512sums ] || sed -i "/${file}$/d" sha512sums -# sha512sum "${file}" >> sha512sums -# [ ! -f md5sums ] || sed -i "/${file}$/d" md5sums -# md5sum "${file}" >> md5sums -#done -#sort -k2,2 sha512sums --output sha512sums -#sort -k2,2 md5sums --output md5sums -#popd +pushd "${ARCHISOS_DIR}" +[ ! -f sha512sums ] || sed -i "/${ISO}$/d" sha512sums +sha512sum "${ISO}" >> sha512sums +[ ! -f md5sums ] || sed -i "/${ISO}$/d" md5sums +md5sum "${ISO}" >> md5sums +sort -k2,2 sha512sums --output sha512sums +sort -k2,2 md5sums --output md5sums +popd + +# check sanity of ISO +echo "Checking ISO.." +"${base_dir}/check-iso" --output-dir "${ARCHISOS_DIR}" --check --expected-sign-key "${SIGN_KEY}" +if [ $? = 1 ]; then + >&2 echo "The ISO file '${iso}' is not sane. Not continuing!" + #~ rm -f "${iso}" + exit 1 +fi # date used for torrents and commit message date=$(echo "${ISO}" \ @@ -94,18 +102,22 @@ date=$(echo "${ISO}" \ ) # generate torrents (currently broken) -#echo "Generating torrents.." -#bash -x "${base_dir}/al32-mktorrent.sh" -d "${torrent_date}" -t "hefur@${TORRENT_SERVER}:" "${ARCH}" +echo "Generating torrents.." +#~ bash -x "${base_dir}/al32-mktorrent.sh" -d "${date}" -t "hefur@${TORRENT_SERVER}:" "${ARCH}" # update web page echo "Updating website.." -git -C "${WEB_DIR}" pull --ff-only +git -C "${WEBSITE_DIR}" reset --hard +git -C "${WEBSITE_DIR}" pull --ff-only "${base_dir}/update-website" \ --website-dir="${WEBSITE_DIR}" \ --mirror-dir="${MIRROR_DIR}" \ - --update-iso -git -C "${WEB_DIR}" commit 'download/index.html' -m 'download/index.html: new isos ('"${date}"')' -git -C "${WEB_DIR}" push + --iso="${ISO}" \ + --update-iso \ + --update-mirrors + +#~ git -C "${WEBSITE_DIR}" commit 'download/index.html' -m 'download/index.html: new isos ('"${date}"')' +#~ git -C "${WEBSITE_DIR}" push # when did we last updates the date +%s > "${ARCHISOS_DIR}/lastupdate" |