Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible_lza_repair
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Digital Preservation
ansible_lza_repair
Commits
a93f3682
Commit
a93f3682
authored
4 years ago
by
Jörg Sachse
Browse files
Options
Downloads
Patches
Plain Diff
feat: install repairtools from Debian package repository instead of manually compiling them
parent
e7d1a428
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
handlers/main.yml
+10
-0
10 additions, 0 deletions
handlers/main.yml
tasks/install-repair-tools.yml
+24
-21
24 additions, 21 deletions
tasks/install-repair-tools.yml
templates/tiff_treatment_loop/compile_checkit.sh.j2
+0
-64
0 additions, 64 deletions
templates/tiff_treatment_loop/compile_checkit.sh.j2
with
34 additions
and
85 deletions
handlers/main.yml
+
10
−
0
View file @
a93f3682
---
---
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html
-
name
:
systemctl daemon-reload
-
name
:
systemctl daemon-reload
systemd
:
systemd
:
daemon-reload
:
"
yes"
daemon-reload
:
"
yes"
# https://docs.ansible.com/ansible/latest/collections/ansible/builtin/systemd_module.html
-
name
:
restart repairtools
systemd
:
name
:
"
{{
item
}}"
state
:
restarted
loop
:
-
"
repair_daemon_ddz.service"
-
"
repair_daemon_digas.service"
This diff is collapsed.
Click to expand it.
tasks/install-repair-tools.yml
+
24
−
21
View file @
a93f3682
...
@@ -16,13 +16,33 @@
...
@@ -16,13 +16,33 @@
tags
:
[
apt
]
tags
:
[
apt
]
when
:
"
ansible_facts['distribution']
==
'Debian'"
when
:
"
ansible_facts['distribution']
==
'Debian'"
-
name
:
cleanup legacy tools
file
:
path
:
"
{{
item
}}"
state
:
absent
loop
:
-
"
/usr/local/bin/checkit_tiff"
-
"
/usr/local/bin/fixit_tiff"
-
"
/home/{{
vault_service_user
}}/.cache/SLUB_LZA_Reparaturtool.cache"
notify
:
restart repairtools
-
name
:
install repairtool (package dependencies are encoded in the package)
-
name
:
install repairtool (package dependencies are encoded in the package)
apt
:
apt
:
name
:
[
name
:
[
'
libslub-lza-repair-perl'
'
libslub-lza-repair-perl'
,
'
checkit_tiff'
,
'
fixit_tiff'
]
]
state
:
present
state
:
present
tags
:
[
repairtools
,
apt
]
tags
:
[
apt
]
-
name
:
install checkit_tiff config
copy
:
src
:
"
/usr/share/checkit_tiff/example_configs/cit_tiff6_baseline_SLUB.cfg"
dest
:
"
/etc/cit_tiff6_baseline_SLUB.cfg"
owner
:
"
{{
vault_service_user
}}"
group
:
"
{{
vault_service_user
}}"
mode
:
0600
-
name
:
create caching directory
-
name
:
create caching directory
file
:
file
:
...
@@ -35,22 +55,6 @@
...
@@ -35,22 +55,6 @@
-
"
/home/{{
vault_service_user
}}/.cache/"
-
"
/home/{{
vault_service_user
}}/.cache/"
-
"
/home/{{
vault_service_user
}}/.config/repair/bin/"
-
"
/home/{{
vault_service_user
}}/.config/repair/bin/"
-
"
/home/{{
vault_service_user
}}/.config/repair/cfg/"
-
"
/home/{{
vault_service_user
}}/.config/repair/cfg/"
tags
:
[
repairtools
]
### TIFF-REPAIR-TOOLS INSTALLIEREN ###
-
name
:
checkit_tiff und fixit_tiff kompilieren und installieren (1/2)
template
:
src
:
"
tiff_treatment_loop/compile_checkit.sh.j2"
dest
:
"
/tmp/compile_checkit.sh"
mode
:
"
0544"
register
:
checkit_tiff_result
tags
:
[
repairtools
]
-
name
:
checkit_tiff und fixit_tiff kompilieren und installieren (2/2)
command
:
bash /tmp/compile_checkit.sh &> /tmp/compile_checkit.log
# noqa 301
#when: checkit_tiff_result.changed
#tags: [repairtools, molecule-notest]
tags
:
[
repairtools
]
-
name
:
Symlinks zu Binaries und Configs für checkit_tiff und fixit_tiff erstellen
-
name
:
Symlinks zu Binaries und Configs für checkit_tiff und fixit_tiff erstellen
file
:
file
:
...
@@ -60,10 +64,9 @@
...
@@ -60,10 +64,9 @@
owner
:
"
{{
vault_service_user
}}"
owner
:
"
{{
vault_service_user
}}"
group
:
"
{{
vault_service_user
}}"
group
:
"
{{
vault_service_user
}}"
with_items
:
with_items
:
-
src
:
"
/usr/
local/
bin/checkit_tiff"
-
src
:
"
/usr/bin/checkit_tiff"
dest
:
"
/home/{{
vault_service_user
}}/.config/repair/bin/checkit_tiff"
dest
:
"
/home/{{
vault_service_user
}}/.config/repair/bin/checkit_tiff"
-
src
:
"
/usr/
local/
bin/fixit_tiff"
-
src
:
"
/usr/bin/fixit_tiff"
dest
:
"
/home/{{
vault_service_user
}}/.config/repair/bin/fixit_tiff"
dest
:
"
/home/{{
vault_service_user
}}/.config/repair/bin/fixit_tiff"
-
src
:
"
/etc/cit_tiff6_baseline_SLUB.cfg"
-
src
:
"
/etc/cit_tiff6_baseline_SLUB.cfg"
dest
:
"
/home/{{
vault_service_user
}}/.config/repair/cfg/cit_tiff6_baseline_SLUB.cfg"
dest
:
"
/home/{{
vault_service_user
}}/.config/repair/cfg/cit_tiff6_baseline_SLUB.cfg"
tags
:
[
repairtools
]
This diff is collapsed.
Click to expand it.
templates/tiff_treatment_loop/compile_checkit.sh.j2
deleted
100644 → 0
+
0
−
64
View file @
e7d1a428
#!/usr/bin/env bash
set
-ex
FIXIT_PATH
=
"fixit_tiff"
GITDIR
=
"/tmp/git/"
CHECKIT_TIFF_GITREPO
=
"{{ vault_checkit_tiff_gitrepo }}"
FIXIT_TIFF_GITREPO
=
"{{ vault_fixit_tiff_gitrepo }}"
# CHECKIT_TIFF_PLUGIN_GITREPO="{{ vault_checkit_tiff_plugin_gitrepo }}"
# DEB_PACKAGES="git make cmake build-essential libpcre3 libpcre3-dev libtiff5 libtiff5-dev"
DEB_PACKAGES
=
"git make cmake build-essential libpcre3-dev libtiff5-dev"
[[
-d
"
${
GITDIR
}
"
]]
&&
rm
-r
"
${
GITDIR
}
"
&&
echo
"removed
${
GITDIR
}
"
mkdir
"
${
GITDIR
}
"
&&
cd
"
${
GITDIR
}
"
pwd
apt-get
install
-y
${
DEB_PACKAGES
}
# THIS IS A BAD IDEA!!! ONLY SKIP CERTIFICATE VALIDATION IF THERE'S NO OTHER
# ALTERNATIVE!!!
export
GIT_SSL_NO_VERIFY
=
true
# git clone ${CHECKIT_TIFF_PLUGIN_GITREPO}
# cd ./checkit_tiff_plugin4rosetta || ( echo "Couldn't cd to ./checkit_tiff_plugin4rosetta, exiting." && exit 1 )
# tag_current=$( head deploy_checkit_tiff/Dockerfile | grep -Fv '#' | grep -F "checkit_tiff_current_version=" | cut -d "=" -f 2 )
tag_current
=
"{{ checkit_tiff_version }}"
# compile checkit_tiff CURRENT version
cd
"
${
GITDIR
}
"
||
(
echo
"Couldn't cd to
$GITDIR
, exiting."
&&
exit
1
)
git clone
"
${
CHECKIT_TIFF_GITREPO
}
"
cd
"
${
GITDIR
}
checkit_tiff
${
CHECKIT_CURRENT_NAME
}
/"
git checkout
"tags/
${
tag_current
}
"
mkdir
build/
&&
cd
build/
#cmake ../src/
cmake
-DCMAKE_C_FLAGS
=
"-O3 -s -Wno-unused-function -fstack-check -fstack-protector-strong -Wformat -Werror=format-security"
../src/
make
-j
cp
checkit_tiff /usr/local/bin/checkit_tiff
&&
\
chown
lza.lza /usr/local/bin/checkit_tiff
&&
\
chmod
0700 /usr/local/bin/checkit_tiff
cp
../example_configs/cit_tiff6_baseline_SLUB.cfg /etc/cit_tiff6_baseline_SLUB.cfg
&&
\
chown
lza.lza /usr/local/etc/cit_tiff6_baseline_SLUB.cfg
&&
\
chmod
0600 /usr/local/etc/cit_tiff6_baseline_SLUB.cfg
# compile fixit_tiff
cd
${
GITDIR
}
||
(
echo
"Couldn't cd to
$GITDIR
, exiting."
&&
exit
1
)
git clone
"
${
FIXIT_TIFF_GITREPO
}
"
mkdir
-p
${
FIXIT_PATH
}
/build/
&&
cd
${
FIXIT_PATH
}
/build/
cmake ../src/
make
-j
cp
fixit_tiff /usr/local/bin/fixit_tiff
&&
\
chown
lza.lza /usr/local/bin/fixit_tiff
&&
\
chmod
0700 /usr/local/bin/fixit_tiff
# cleanup
apt-get purge
-y
${
DEB_PACKAGES
}
apt-get clean
-y
apt-get autoremove
-y
rm
-r
/tmp/git/
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment