18 Commits

Author SHA1 Message Date
822fd277d5 Ajout de dépendances pour pygmentize 2022-04-14 11:41:44 +02:00
a821fb141f Correction des dépendances et des options pour rubber 2022-04-14 10:23:37 +02:00
d4547175da Fournir le chemin des fichiers en argument 2022-04-14 08:45:31 +02:00
7b2644b953 Test de chemin générique sans variable 2022-04-13 13:25:32 +02:00
4aecce6094 Le chemin des sources n’est pas complet 2022-04-13 11:18:43 +02:00
2a65d38c37 Mauvaix découpage de la chaîne de caractère 2022-04-13 10:58:15 +02:00
5591c2c0f0 Revert "Test with lighter texlive installation"
This reverts commit 0c09b27b8e.
2022-04-13 09:09:33 +02:00
0c09b27b8e Test with lighter texlive installation 2022-04-13 08:06:50 +02:00
5676297827 Texlive build context 2022-04-11 08:50:13 +02:00
822dc3617c Modification pour compiler les documents latex 2022-04-11 08:50:12 +02:00
0172b4f62c compilation latex WIP 2022-04-11 08:46:36 +02:00
d27cc4bf1b Tex compilation wip 2022-04-11 08:46:36 +02:00
2606a82c17 First idea for compiling tex documents 2022-04-11 08:46:36 +02:00
bb633a212c Étiquetage selinux pour une utilisation non-root 2022-04-11 08:40:46 +02:00
b49c8c8b02 Limit entries created in changelog. 2022-03-31 15:43:21 +02:00
766151eae3 Pour une poignée de profils 2022-03-29 10:42:21 +02:00
f8195ba9f7 Utilisation de wget pour la récupération des certificats LetsEncrypt
Contournement pour https://github.com/moby/buildkit/issues/905
2022-01-28 09:29:29 +01:00
47c7d0ac3c Suppression du hash de commit pour les paquets dev et staging 2022-01-12 15:08:30 +01:00
17 changed files with 165 additions and 11 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

12
hooks/build/texlive/xelatex Executable file
View File

@ -0,0 +1,12 @@
#!/usr/bin/env bash
pushd /src
document_root=${PROJECT}
for tex in ./presentations/${document_root}/*.tex
do
rubber --inplace -c shell_escape --unsafe --module=xelatex "$tex"
cp "${tex%.tex}.pdf" /dist/
# faire quelque chose pour le programme de la formation
done
popd

View File

@ -16,11 +16,11 @@ EOF
echo "ENV DEBIAN_FRONTEND=noninteractive" >> Dockerfile
echo "RUN apt-get update && apt-get install --yes --no-install-recommends openssl ca-certificates" >> Dockerfile
echo "RUN apt-get update && apt-get install --yes --no-install-recommends wget openssl ca-certificates" >> Dockerfile
for cert in $CERTS; do
filename=$(basename "$cert")
echo "ADD $cert $DESTDIR/$filename" >> Dockerfile
echo "RUN wget -O '$DESTDIR/$filename' $cert" >> Dockerfile
echo "RUN openssl x509 -in '$DESTDIR/$filename' -inform PEM -out '$DESTDIR/$filename.crt'" >> Dockerfile
done

View File

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -e
echo 'ENV DEBIAN_FRONTEND=noninteractive' >> Dockerfile
echo 'RUN apt-get update && apt-get install --yes texlive-full' >> Dockerfile
echo 'RUN apt-get update && apt-get install --yes make' >> Dockerfile
echo 'RUN apt-get update && apt-get install --yes fonts-liberation fonts-liberation2' >> Dockerfile
echo 'RUN apt-get update && apt-get install --yes python3-setuptools python-setuptools python3-pygments python-pygments' >> Dockerfile
echo 'RUN apt-get update && apt-get install --yes rubber' >> Dockerfile
echo 'ENV DEBIAN_FRONTEND=' >> Dockerfile

View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
if [ -e './datasets/fonts' ]
then
for font_file in $(find . -wholename "./datasets/fonts/*.ttf")
do
echo 'COPY datasets/fonts/$font_file /root/.fonts/$font_file' >> Dockerfile
done
fi
exit 0

View File

@ -0,0 +1,13 @@
#!/bin/bash
function move_output_to_dist {
find . -name "$1" -type f -print0 | xargs -0r mv -t /dist/
}
# Create new directory
mkdir -p /dist
# Move generated files
move_output_to_dist "*.pdf"
tamarin_success "Done :-)"

View File

@ -181,6 +181,7 @@ function packager_from_commit {
}
function next_version {
set -x
commit="$1"
# upstream version is given by most recent of release or pkg tag
previous_pkg="$(git describe --long --match='pkg/*' $commit 2>/dev/null)"
@ -204,6 +205,7 @@ function next_version {
version="$(get_upstream_version_from_tag $previous_release)-1"
elif [ -n "$previous_pkg" ]
then
distance_from_pkg=$(get_distance_from_tag "$previous_pkg" "$commit")
distance=$distance_from_pkg
version="$(get_upstream_version_from_tag $previous_pkg)-$(expr $(get_package_version_from_tag $previous_pkg) + 1)"
else
@ -212,9 +214,10 @@ function next_version {
fi
if [ "$package_level" = 'dev' ] || [ "$package_level" = 'staging' ]
then
version="${version}~${package_level}+${distance}~$(get_short_hash $commit)"
version="${version}~${package_level}+${distance}"
fi
echo $version
set +x
}
function gen_changelog_entry {
@ -257,9 +260,15 @@ function gen_changelog_entry {
}
function gen_changelog() {
limit=10
while gen_changelog_entry $ceiling_commit
do
limit=`expr $limit - 1`
echo $changelog_entry
if [ "$limit" -le 0 ]
then
break
fi
done
}

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
cd src

View File

@ -55,6 +55,10 @@ def get_workspace_subdir(subdir):
os.makedirs(dir_path, exist_ok=True)
return dir_path
def get_datasets_dir():
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../datasets")
def run(cmd, captureOutput=False, pty=False, debug=False, **kwargs):
"""Execute an arbitrary command on the system"""
if debug:

15
package
View File

@ -84,7 +84,7 @@ if __name__ == "__main__":
build_workspace = tamarin.get_workspace_subdir('tmp/build_{:d}'.format(pid))
shutil.copytree(tamarin.get_utils_dir(), os.path.join(build_workspace, 'utils'))
shutil.copytree(tamarin.get_datasets_dir(), os.path.join(build_workspace, 'datasets'))
base_image = args.base if args.base != '' else profile['profile']['default_image']
image_tag = build_image(build_workspace, base_image, args.profile, profile, debug=args.debug, rebuild=args.rebuild)
@ -108,16 +108,17 @@ if __name__ == "__main__":
# volumes definition
docker_args += [
"-v", "{:s}:/src:ro".format(project_dir),
"-v", "{:s}:/dist".format(output_dir),
"-v", "{:s}:/src:z,ro".format(project_dir),
"-v", "{:s}:/dist:z".format(output_dir),
"-v", "{:s}:/tamarin/datasets:z".format(tamarin.get_datasets_dir()),
]
if not args.no_lib_mounts:
docker_args += [
"-v", "{:s}:/tamarin/hooks:ro".format(tamarin.get_hooks_dir()),
"-v", "{:s}:/tamarin/lib:ro".format(tamarin.get_lib_dir()),
"-v", "{:s}:/tamarin/profiles:ro".format(tamarin.get_profiles_dir()),
"-v", "{:s}:/tamarin/utils:ro".format(tamarin.get_utils_dir())
"-v", "{:s}:/tamarin/hooks:z,ro".format(tamarin.get_hooks_dir()),
"-v", "{:s}:/tamarin/lib:z,ro".format(tamarin.get_lib_dir()),
"-v", "{:s}:/tamarin/profiles:z,ro".format(tamarin.get_profiles_dir()),
"-v", "{:s}:/tamarin/utils:z,ro".format(tamarin.get_utils_dir())
]
# Use environment proxy if defined

30
profiles/eole-2.7.0.conf Normal file
View File

@ -0,0 +1,30 @@
# Configuration générale du profil
[profile]
# Image Docker par défaut
default_image=ubuntu:bionic
# Configuration de l'étape de pré-construction du conteneur
[containerbuild]
hooks=
containerbuild/debian/install-build-essential,
containerbuild/debian/install-git,
# Configuration de l'étape de pré-construction du paquet
[prebuild]
hooks=
prebuild/debian/copy-sources-to-workspace,
prebuild/debian/run-project-hooks,
prebuild/debian/load-project-db,
prebuild/debian/complete-project-db,
prebuild/eole/create-changelog,
prebuild/debian/install-build-depends
# Configuration de l'étape de construction du paquet
[build]
hooks=build/debian/build
# Configuration de l'étape de post-construction du paquet
[postbuild]
hooks=
postbuild/debian/run-project-hooks,
postbuild/debian/export-dist

View File

@ -17,7 +17,6 @@ hooks=
prebuild/debian/load-project-db,
prebuild/debian/complete-project-db,
prebuild/eole/create-changelog,
prebuild/eole/add-package-version-suffix,
prebuild/debian/install-build-depends
# Configuration de l'étape de construction du paquet

30
profiles/eole-2.8.1.conf Normal file
View File

@ -0,0 +1,30 @@
# Configuration générale du profil
[profile]
# Image Docker par défaut
default_image=ubuntu:focal
# Configuration de l'étape de pré-construction du conteneur
[containerbuild]
hooks=
containerbuild/debian/install-build-essential,
containerbuild/debian/install-git,
# Configuration de l'étape de pré-construction du paquet
[prebuild]
hooks=
prebuild/debian/copy-sources-to-workspace,
prebuild/debian/run-project-hooks,
prebuild/debian/load-project-db,
prebuild/debian/complete-project-db,
prebuild/eole/create-changelog,
prebuild/debian/install-build-depends
# Configuration de l'étape de construction du paquet
[build]
hooks=build/debian/build
# Configuration de l'étape de post-construction du paquet
[postbuild]
hooks=
postbuild/debian/run-project-hooks,
postbuild/debian/export-dist

28
profiles/texlive.conf Normal file
View File

@ -0,0 +1,28 @@
# Configuration générale du profil
[profile]
# Image Docker par défaut
default_image=ubuntu:focal
# Configuration de létape de pré-construction du conteneur
[containerbuild]
hooks=
containerbuild/texlive/add-packages,
containerbuild/texlive/add-ressources,
# Configuration de létape de pré-compilation des documents
[prebuild]
hooks=
prebuild/debian/copy-sources-to-workspace,
prebuild/debian/run-project-hooks,
prebuild/debian/load-project-db,
prebuild/texlive/complete-project-db,
# Configuration de létape de compilation du document
[build]
hooks=build/texlive/xelatex
# Configuration de létape de post-compilation du document
[postbuild]
hooks=
postbuild/debian/run-project-hooks,
postbuild/texlive/export-dist,