summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2019-04-11 10:34:28 +0200
committerStefan Metzmacher <metze@samba.org>2019-04-18 12:09:33 +0000
commit0b2bbeb5dd91d1c9f1da32a893a194a84e9e5b83 (patch)
tree605099996a727bb8d15a233e75d67486cc28298c /bootstrap
parent31f5b75120b4d543195ce704970d8e4dcd58addb (diff)
downloadsamba-0b2bbeb5dd91d1c9f1da32a893a194a84e9e5b83.tar.gz
bootstrap/config.py: add a hind how to rebuild generated files
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/config.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/bootstrap/config.py b/bootstrap/config.py
index e4566a6c8a9..e56fb30f887 100644
--- a/bootstrap/config.py
+++ b/bootstrap/config.py
@@ -172,9 +172,17 @@ PKGS = [
DEB_PKGS = COMMON + [pkg for pkg, _ in PKGS if pkg]
RPM_PKGS = COMMON + [pkg for _, pkg in PKGS if pkg]
+GENERATED_MARKER = r"""
+#
+# This file is generated by 'bootstrap/template.py --render'
+# See also bootstrap/config.py
+#
+"""
+
APT_BOOTSTRAP = r"""
#!/bin/bash
+{GENERATED_MARKER}
set -xueo pipefail
export DEBIAN_FRONTEND=noninteractive
@@ -191,6 +199,7 @@ apt-get -y clean
YUM_BOOTSTRAP = r"""
#!/bin/bash
+{GENERATED_MARKER}
set -xueo pipefail
yum -y -q update
@@ -206,6 +215,7 @@ yum clean all
DNF_BOOTSTRAP = r"""
#!/bin/bash
+{GENERATED_MARKER}
set -xueo pipefail
dnf -y -q update
@@ -218,6 +228,7 @@ dnf clean all
ZYPPER_BOOTSTRAP = r"""
#!/bin/bash
+{GENERATED_MARKER}
set -xueo pipefail
zypper --non-interactive refresh
@@ -236,6 +247,7 @@ fi
# A generic shell script to setup locale
LOCALE_SETUP = r"""
#!/bin/bash
+{GENERATED_MARKER}
set -xueo pipefail
# refer to /usr/share/i18n/locales
@@ -288,6 +300,7 @@ fi
DOCKERFILE = r"""
+{GENERATED_MARKER}
FROM {docker_image}
# pass in with --build-arg while build
@@ -324,6 +337,8 @@ VAGRANTFILE_SNIPPET = r"""
# global Vagrantfile with snippets for all dists
VAGRANTFILE_GLOBAL = r"""
+{GENERATED_MARKER}
+
Vagrant.configure("2") do |config|
config.ssh.insert_key = false
@@ -508,6 +523,7 @@ def expand_family_dists(family):
config['name'] = name
config['home'] = join(OUT, name)
config['family'] = family['name']
+ config['GENERATED_MARKER'] = GENERATED_MARKER
# replace dist specific pkgs
replace = config.get('replace', {})
@@ -564,7 +580,10 @@ def render_vagrantfile(dists):
dists[dist]['vagrantfile_snippet']
for dist in sorted(dists.keys())]
- return VAGRANTFILE_GLOBAL.format(vagrantfile_snippets=''.join(snippets))
+ return VAGRANTFILE_GLOBAL.format(
+ vagrantfile_snippets=''.join(snippets),
+ GENERATED_MARKER=GENERATED_MARKER
+ )
VAGRANTFILE = render_vagrantfile(DISTS)