From faa153d41e58f0e655a658c1d45c4e5547b475fc Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 13 Nov 2014 14:57:50 +0100 Subject: [PATCH] Move pid directory to /run/autodist providing systemd tmpfiles.d configuration --- Makefile | 5 +++-- autodist | 2 +- etc/cron.hourly/60-autodist-update | 4 ++-- etc/cron.hourly/65-autoport-native | 4 ++-- etc/cron.hourly/66-autoport-chroot | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index dd85ac4..64ad61e 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ mandir = ${prefix}/usr/share/man sysconfigdir= ${sysconfdir}/sysconfig configdir = ${sysconfdir}/autodist localstatedir= /var -piddir= ${localstatedir}/run/autodist +piddir= /run/autodist cgidir = ${localstatedir}/www/cgi-bin htmldir = ${localstatedir}/www/html @@ -62,9 +62,9 @@ install-dirs: @$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/install/{ok,failed} @$(INSTALL_DIR) $(DESTDIR)$(pck_logdir)/send/{ok,failed} @$(INSTALL_DIR) $(DESTDIR)$(pck_statedir)/RPM/{SPECS,SRPMS,BUILD,SOURCES,RPMS/{noarch,i586,ppc,x86_64,arm}} - @$(INSTALL_DIR) $(DESTDIR)$(piddir) @$(INSTALL_DIR) $(DESTDIR)$(libexecdir) @$(INSTALL_DIR) $(DESTDIR)$(localstatedir)/webbuild/{cache,home,notes,tmp,users} + @$(INSTALL_DIR) $(DESTDIR)$(prefix)/lib/tmpfiles.d/ install-programs: @$(INSTALL_SCRIPT) autodist $(DESTDIR)$(bindir)/autodist @@ -101,6 +101,7 @@ install-data: @$(INSTALL_DATA) autospec-conf $(DESTDIR)$(pck_statedir)/.autospec @$(INSTALL_DATA) autodist-bashrc $(DESTDIR)$(pck_statedir)/.bashrc @$(INSTALL_DATA) autodist-bash_profile $(DESTDIR)$(pck_statedir)/.bash_profile + @$(INSTALL_DATA) autodist-tmpfilesd $(DESTDIR)$(prefix)/lib/tmpfiles.d/autodist.conf @touch $(DESTDIR)$(pck_statedir)/template/autoupdate/auto.success @touch $(DESTDIR)$(pck_statedir)/template/autoupdate/auto.skip diff --git a/autodist b/autodist index 267b736..efb0302 100755 --- a/autodist +++ b/autodist @@ -94,7 +94,7 @@ CONFIGFILE=$SYSCONFDIR/config SCRIPT_UPDATE_SPECFILE=$SCRIPTDIR/update-specfile SCRIPT_UPDATE_SPECFILE_CUSTOM=$SCRIPTDIR/update-specfile-custom AUTOSPEC_CMD="/usr/bin/autospec" -PIDFILE="/var/run/autodist/autodist.pid" +PIDFILE="/run/autodist/autodist.pid" # Configuration defaults normally overriden in configuration file AUTOBUILD_MAXNUM=50 diff --git a/etc/cron.hourly/60-autodist-update b/etc/cron.hourly/60-autodist-update index bc00053..6d695d1 100755 --- a/etc/cron.hourly/60-autodist-update +++ b/etc/cron.hourly/60-autodist-update @@ -1,7 +1,7 @@ #!/bin/bash # # autodist autoupdate hourly cron script -# (c) 2008-2013 by Silvan Calarco +# (c) 2008-2014 by Silvan Calarco # . /etc/autodist/config . /etc/sysconfig/autoport @@ -18,7 +18,7 @@ fi exit 0 } -PIDFILE=/var/run/autodist/autodist.pid +PIDFILE=/run/autodist/autodist.pid HOUR=`date +%H` [ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1 diff --git a/etc/cron.hourly/65-autoport-native b/etc/cron.hourly/65-autoport-native index 58a7729..6ff14db 100755 --- a/etc/cron.hourly/65-autoport-native +++ b/etc/cron.hourly/65-autoport-native @@ -1,7 +1,7 @@ #!/bin/bash # # openmamba-autobuild-autoport daily cron script -# (c) 2008-2012 by Silvan Calarco +# (c) 2008-2014 by Silvan Calarco # #. /etc/sysconfig/openmamba-central . /etc/sysconfig/autoport @@ -14,7 +14,7 @@ ME=`basename $0` exit 0 } -PIDFILE=/var/run/autodist/autoport.pid +PIDFILE=/run/autodist/autoport.pid HOUR=`date +%H` [ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1 diff --git a/etc/cron.hourly/66-autoport-chroot b/etc/cron.hourly/66-autoport-chroot index 4258fd4..7752d52 100755 --- a/etc/cron.hourly/66-autoport-chroot +++ b/etc/cron.hourly/66-autoport-chroot @@ -14,7 +14,7 @@ ME=`basename $0` exit 0 } -PIDFILE=/var/run/autodist/autoport.pid +PIDFILE=/run/autodist/autoport.pid HOUR=`date +%H` [ "`uname -m`" = "x86_64" ] && HOST_IS_X86_64=1