autodist-cleanold: replace cron script with executable run by autoport-launcher

This commit is contained in:
Silvan Calarco 2024-05-13 18:23:03 +02:00
parent 9904607872
commit 0979292b54
6 changed files with 22 additions and 12 deletions

View File

@ -69,6 +69,7 @@ install-dirs:
install-programs: install-programs:
@$(INSTALL_SCRIPT) autodist $(DESTDIR)$(bindir)/autodist @$(INSTALL_SCRIPT) autodist $(DESTDIR)$(bindir)/autodist
@$(INSTALL_SCRIPT) autodist-cleanold $(DESTDIR)$(bindir)/autodist-cleanold
@$(INSTALL_SCRIPT) autodist-git $(DESTDIR)$(bindir)/autodist-git @$(INSTALL_SCRIPT) autodist-git $(DESTDIR)$(bindir)/autodist-git
@$(INSTALL_SCRIPT) autodist-inspect $(DESTDIR)$(bindir)/autodist-inspect @$(INSTALL_SCRIPT) autodist-inspect $(DESTDIR)$(bindir)/autodist-inspect
@$(INSTALL_SCRIPT) autodist-launcher $(DESTDIR)$(bindir)/autodist-launcher @$(INSTALL_SCRIPT) autodist-launcher $(DESTDIR)$(bindir)/autodist-launcher
@ -103,7 +104,6 @@ install-data:
@$(INSTALL_SCRIPT) etc/sysconfig/autoport $(DESTDIR)$(sysconfdir)/sysconfig/autoport @$(INSTALL_SCRIPT) etc/sysconfig/autoport $(DESTDIR)$(sysconfdir)/sysconfig/autoport
@$(INSTALL_SCRIPT) etc/cron.hourly/60-autodist-update $(DESTDIR)$(sysconfdir)/cron.hourly/ @$(INSTALL_SCRIPT) etc/cron.hourly/60-autodist-update $(DESTDIR)$(sysconfdir)/cron.hourly/
@$(INSTALL_SCRIPT) etc/cron.hourly/65-autoport $(DESTDIR)$(sysconfdir)/cron.hourly/ @$(INSTALL_SCRIPT) etc/cron.hourly/65-autoport $(DESTDIR)$(sysconfdir)/cron.hourly/
@$(INSTALL_SCRIPT) etc/cron.daily/40-autodist-cleanold $(DESTDIR)$(sysconfdir)/cron.daily/
@$(INSTALL_SCRIPT) etc/cron.daily/45-autodist-git-sync $(DESTDIR)$(sysconfdir)/cron.daily/ @$(INSTALL_SCRIPT) etc/cron.daily/45-autodist-git-sync $(DESTDIR)$(sysconfdir)/cron.daily/
@$(INSTALL_SCRIPT) etc/logrotate.d/webbuild $(DESTDIR)$(sysconfdir)/logrotate.d/webbuild @$(INSTALL_SCRIPT) etc/logrotate.d/webbuild $(DESTDIR)$(sysconfdir)/logrotate.d/webbuild
@$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec @$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec

View File

@ -5,7 +5,7 @@
# #
# Released under the terms of the GNU GPL release 3 license # Released under the terms of the GNU GPL release 3 license
# #
VERSION=1.5.2 VERSION=1.5.3
me=(${0##*/} $VERSION "Tue Jan 26 2016") me=(${0##*/} $VERSION "Tue Jan 26 2016")
exec 3>`readlink /proc/self/fd/0` exec 3>`readlink /proc/self/fd/0`

View File

@ -2,13 +2,11 @@
[ -e /etc/autodist/config ] && . /etc/autodist/config [ -e /etc/autodist/config ] && . /etc/autodist/config
[ -e /etc/sysconfig/autoport ] && . /etc/sysconfig/autoport [ -e /etc/sysconfig/autoport ] && . /etc/sysconfig/autoport
RPMS_CTIME_OLD="+3" [ "${RPMS_CTIME_OLD}" -a "${SRPMS_CTIME_OLD}" -a "${SOURCES_CTIME_OLD}" \
BUILD_CTIME_OLD="+3" -a "${BUILD_CTIME_OLD}" -a "${TMP_CTIME_OLD}" ] || {
SOURCES_CTIME_OLD="+7" echo "autodist-cleanold: ERROR: *_CTIME_OLD variables need to be set in config; cleaning skipped."
SOURCES_ARCHIVES_CTIME_OLD="+7" exit 0
SOURCES_PATCH_CTIME_OLD="+365" }
SRPMS_CTIME_OLD="+3"
TMP_CTIME_OLD="+2"
function clean() { function clean() {
dir=$1 dir=$1

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
# autoport -- batch cross-build tool based on autodist # autoport -- batch cross-build tool based on autodist
# Copyright (C) 2011-2023 by Silvan Calarco <silvan.calarco@mambasoft.it> # Copyright (C) 2011-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
# #
# Released under the terms of the GNU GPL release 3 license # Released under the terms of the GNU GPL release 3 license
# #
VERSION=1.5.2 VERSION=1.5.3
BASE_REPOSITORY=base BASE_REPOSITORY=base
PORT_REPOSITORY=base PORT_REPOSITORY=base

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# autoport launcher # autoport launcher
# (c) 2021 by Silvan Calarco <silvan.calarco@mambasoft.it> # (c) 2021-2024 by Silvan Calarco <silvan.calarco@mambasoft.it>
# #
#. /etc/sysconfig/openmamba-central #. /etc/sysconfig/openmamba-central
. /etc/sysconfig/autoport . /etc/sysconfig/autoport
@ -17,6 +17,8 @@ i=$1
[ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1 [ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1
autodist-cleanold
[ "${AUTOPORT_DISABLE[$i]}" -a "${AUTOPORT_DISABLE[$i]}" != "0" ] && exit 0 [ "${AUTOPORT_DISABLE[$i]}" -a "${AUTOPORT_DISABLE[$i]}" != "0" ] && exit 0
PIDFILE=/run/autodist/autoport-launcher-${i}.pid PIDFILE=/run/autodist/autoport-launcher-${i}.pid

View File

@ -26,6 +26,16 @@ AUTOPORT_IGNORE_LIST=""
AUTODIST_REBUILDOLD_MAX=20 AUTODIST_REBUILDOLD_MAX=20
AUTODIST_REBUILDOLD_FROMDATE=20090101 AUTODIST_REBUILDOLD_FROMDATE=20090101
#AUTODIST_GIT_SYNC=1 #AUTODIST_GIT_SYNC=1
# Variables used by autodist-cleanold
RPMS_CTIME_OLD="+3"
BUILD_CTIME_OLD="+3"
SOURCES_CTIME_OLD="+7"
SOURCES_ARCHIVES_CTIME_OLD="+7"
SOURCES_PATCH_CTIME_OLD="+365"
SRPMS_CTIME_OLD="+3"
TMP_CTIME_OLD="+2"
# #
# Set to disable autodist-repository and use local list # Set to disable autodist-repository and use local list
# #