diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:46:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:46:56 +0000 |
commit | 8e79ad9f544d1c4a0476e0d96aef0496ca7fc741 (patch) | |
tree | cda1743f5820600fd8c638ac7f034f917ac8c381 /etc | |
parent | Initial commit. (diff) | |
download | sbuild-8e79ad9f544d1c4a0476e0d96aef0496ca7fc741.tar.xz sbuild-8e79ad9f544d1c4a0476e0d96aef0496ca7fc741.zip |
Adding upstream version 0.85.6.upstream/0.85.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'etc')
-rw-r--r-- | etc/.gitignore | 1 | ||||
-rw-r--r-- | etc/Makefile.am | 53 | ||||
-rw-r--r-- | etc/example.sbuildrc | 118 | ||||
-rwxr-xr-x | etc/sbuild-debian-developer-setup-update-all | 106 | ||||
-rw-r--r-- | etc/sbuild-debuild.conf | 16 |
5 files changed, 294 insertions, 0 deletions
diff --git a/etc/.gitignore b/etc/.gitignore new file mode 100644 index 0000000..94e71ff --- /dev/null +++ b/etc/.gitignore @@ -0,0 +1 @@ +profiles diff --git a/etc/Makefile.am b/etc/Makefile.am new file mode 100644 index 0000000..bc70408 --- /dev/null +++ b/etc/Makefile.am @@ -0,0 +1,53 @@ +# sbuild Makefile template +# +# +# Copyright © 2004-2008 Roger Leigh <rleigh@debian.org> +# +# sbuild is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# sbuild is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see +# <http://www.gnu.org/licenses/>. +# +##################################################################### + +include $(top_srcdir)/scripts/global.mk + +sbuildsysconfdir = $(SBUILD_SYSCONF_DIR) +sbuildsysconf_DATA = sbuild.conf + +builddsysconfdir = $(BUILDD_SYSCONF_DIR) +builddsysconf_DATA = buildd.conf + +exampleconfdir = $(docdir)/examples +exampleconf_DATA = example.sbuildrc sbuild-debian-developer-setup-update-all + +SETUP = + +sbuild.conf: $(abs_top_srcdir)/tools/sbuild-dumpconfig + PERL5LIB=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib \ + $< sbuild config > $@ + +buildd.conf: $(abs_top_srcdir)/tools/sbuild-dumpconfig + PERL5LIB=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib \ + $< buildd config > $@ + +schrootsetupdir = $(SCHROOT_SYSCONF_DIR)/setup.d +schrootsetup_SCRIPTS = $(SETUP) + +CLEANFILES = \ + sbuild.conf \ + buildd.conf + +EXTRA_DIST = \ + $(exampleconf_DATA) \ + $(SETUP) \ + sbuild-debuild.conf diff --git a/etc/example.sbuildrc b/etc/example.sbuildrc new file mode 100644 index 0000000..035fa0a --- /dev/null +++ b/etc/example.sbuildrc @@ -0,0 +1,118 @@ +# example for ~/.sbuildrc. (Also see /etc/sbuild/sbuild.conf.) -*- Perl -*- +# +# Default settings are commented out. +# Additional options found in /etc/sbuild/sbuild.conf may be +# overridden here. + + +## +## DPKG-BUILDPACKAGE OPTIONS +## + +# Name to use as override in .changes files for the Maintainer: field +# Defaults to the DEBEMAIL environment variable, if set, or else the +# Maintainer: field will not be overridden unless set here. +#$maintainer_name='Francesco Paolo Lovergine <frankie@debian.org>'; + +# Name to use as override in .changes file for the Changed-By: field. +#$uploader_name='Francesco Paolo Lovergine <frankie@debian.org>'; + +# Key ID to use in .changes for the current upload. +# It overrides both $maintainer_name and $uploader_name +#$key_id='Francesco Paolo Lovergine <frankie@debian.org>'; + +# PGP-related option to pass to dpkg-buildpackage. Usually neither .dsc +# nor .changes files shall be signed automatically. +#$pgp_options = ['-us', '-uc']; + +# By default, do not build a source package (binary only build). +# Set to 1 to force creation of a source package, but note that +# this is inappropriate for binary NMUs, where the option will +# always be disabled. +#$build_source = 0; + +# By default, the -s option only includes the .orig.tar.gz when needed +# (i.e. when the Debian revision is 0 or 1). By setting this option +# to 1, the .orig.tar.gz will always be included when -s is used. +# This is equivalent to --force-orig-source. +#$force_orig_source = 0; + +# PATH to set when running dpkg-buildpackage. +#$path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/games"; + +# This command is run with the dpkg-buildpackage command line passed to it +# (in the chroot, if doing a chrooted build). It is used by the sparc buildd +# (which is sparc64) to call the wrapper script that sets the environment to +# sparc (32-bit). It could be used for other build environment setup scripts +# +#$build_env_cmnd = ""; + + +## +## SBUILD BEHAVIOUR +## + +# Default distribution. By default, no distribution is defined, and +# the user must specify it with the -d option. However, a default may +# be configured here if desired. Users must take care not to upload +# to the wrong distribution when this option is set, for example +# experimental packages will be built for upload to unstable when this +# is not what is required. +#$distribution = 'unstable'; + +# Default chroot (defaults to distribution[-arch][-sbuild]) +#$chroot = 'unstable-powerpc-sbuild'; + +# When to purge the build directory afterwards; possible values are "never", +# "successful", and "always" +#$purge_build_directory="successful"; + +# sbuild behaviour; possible values are "user" (exit status reports +# build failures) and "buildd" (exit status does not report build +# failures) for use in a buildd setup. +#$sbuild_mode = "user"; + + +## +## TIMEOUTS +## + +# Time to wait for a source dependency lock. The default is 1 minute. +#$srcdep_lock_wait = 1; # 1 minute + +# Time (in minutes) of inactivity after which a build is terminated. Activity +# is measured by output to the log file. +#$stalled_pkg_timeout = 150; + +# Some packages may exceed the general timeout (e.g. redirecting output to +# a file) and need a different timeout. Below are some examples. +#%individual_stalled_pkg_timeout = (smalleiffel => 300, +# jade => 300, +# atlas => 300, +# glibc => 1000, +# 'gcc-3.3' => 300, +# kwave => 600); +# + +## +## FILE AND DIRECTORY LOCATIONS +## + +# This option is deprecated. Directory for chroot symlinks and sbuild +# logs. Defaults to the current directory if unspecified. It is used +# as the location of chroot symlinks (obsolete) and for current build +# log symlinks and some build logs. There is no default; if unset, it +# defaults to the current working directory. $HOME/build is another +# common configuration. +#$build_dir = undef; + +# Directory for writing build logs to +#$log_dir = "$HOME/logs"; + +# Directory for writing build statistics to +#$stats_dir = "$HOME/stats"; + + +# don't remove this, Perl needs it: +1; + diff --git a/etc/sbuild-debian-developer-setup-update-all b/etc/sbuild-debian-developer-setup-update-all new file mode 100755 index 0000000..9605e45 --- /dev/null +++ b/etc/sbuild-debian-developer-setup-update-all @@ -0,0 +1,106 @@ +#!/bin/sh +# Example script for automatically updating sbuild chroots +# +# Simply create a crontab /etc/cron.d/sbuild-update-all and specify the +# schedule that you want to use. The behaviour of this script can be influenced +# by the following evironment variables: +# +# PATTERN glob pattern to match the chroot config name against, in +# directory /etc/schroot/chroot.d/. +# +# Default: *-sbuild +# +# UPDATEARGS The arguments with which sbuild-update will be invoked. +# +# Default: --update --dist-upgrade --autoclean --autoremove +# +# LOGFILE Log file to write to. These files are not rotated, you must set +# this up yourself. See logrotate(8) +# +# Default: /var/log/sbuild-update-all.log +# +# This script will refuse to run if another instance of it is running. In fact, +# it will refuse to run if there is an active chroot session (regardless of +# whether it is related to the matched patterns or not). Care for this must be +# taken when scheduling cron jobs, as crontabs are processed sequentially (with +# regards to variable assignment), but jobs are executed in parallel. +# +# Examples +# ======== +# +# 1. Update all sbuild chroots four times a day (at 00:15/06:15/12:15/18:15): +# +# 15 */6 * * * root /usr/share/doc/sbuild/examples/sbuild-debian-developer-setup-update-all +# +# 2. Update all sid sbuild chroots daily, and all jessie sbuild chroots weekly, +# and log the latter to a separate file: +# +# PATTERN = sid-*-sbuild +# @daily root /usr/share/doc/sbuild/examples/sbuild-debian-developer-setup-update-all +# +# PATTERN = jessie-*-sbuild +# LOGFILE = /var/log/wheezy-chroot-update.log +# @weekly root /usr/share/doc/sbuild/examples/sbuild-debian-developer-setup-update-all +# +# The following will NOT work. Both of these jobs are executed at 00:15, so +# the second one will refuse to run: +# +# PATTERN = foo-* +# 15 0 * * * root /usr/share/doc/sbuild/examples/sbuild-debian-developer-setup-update-all +# +# PATTERN = bar-* +# 15 0 * * * root /usr/share/doc/sbuild/examples/sbuild-debian-developer-setup-update-all + + +# Output of sbuild-update invocations will be written to this file +LOGFILE=${LOGFILE:-/var/log/sbuild-update-all.log} + +# Arguments passed to sbuild-update +UPDATEARGS=${UPDATEARGS:-"--update --dist-upgrade --autoclean --autoremove"} + +# chroot config names are identified by this pattern +PATTERN=${PATTERN:-*-sbuild-*} + + +# Open logfile for output, make sure we're the only instance active +exec 8>>$LOGFILE +if ! flock -x -n 8 +then + echo "$0: another instance is already running" + exit 1 +fi +# Redirect stdout to logfile +exec 9>&1 +exec 1>&8 + +if ! ls /etc/schroot/chroot.d/$PATTERN >/dev/null 2>&1 +then + echo "No chroots defined" + exit 0 +fi + +for fullname in /etc/schroot/chroot.d/$PATTERN +do + confname=`basename $fullname | sed -e "s/-sbuild-.*//"` + + # Check for *any* active session and skip if there is one. + # chroots can share common factors, for example an LVM volume, so it's + # better to be safe than sorry. + if [ -n "`schroot -l --all-sessions`" ] + then + echo "Active schroot session, will not continue" + break + fi + + echo "****** `date` ******" + echo "Action: sbuild-update $UPDATEARGS $confname" + + if ! sbuild-update $UPDATEARGS $confname + then + echo "ERROR: failed to update $confname" + continue + fi +done + +# Release lock and undo redirections +exec 8>&- 1>&9 9>&- diff --git a/etc/sbuild-debuild.conf b/etc/sbuild-debuild.conf new file mode 100644 index 0000000..4e34e0a --- /dev/null +++ b/etc/sbuild-debuild.conf @@ -0,0 +1,16 @@ +# sbuild-debuild.conf: global sbuild-debuild settings. -*- Perl -*- + +# Various options with their defaults used with sbuild-debuild +# $dpkg_buildpackage_opts = ['-S','-us','-uc',]; +# $dpkg_buildpackage_extra_opts = []; +# $sbuild_opts = []; +# $sbuild_extra_opts = []; +# $lintian_opts = []; +# $lintian_extra_opts = []; +# $no_lintian = 0; +# $pre_dpkg_buildpackage_commands = []; +# $pre_sbuild_commands = []; +# $pre_lintian_commands = []; +# $pre_exit_commands = []; + +1; |