fix(valkey): changed compilation recipe to account for noexec /tmp rules

This commit is contained in:
NaeiKinDus 2025-04-21 00:00:00 +00:00
parent 68a0e385c2
commit 2c68a0c168
Signed by: WoodSmellParticle
GPG key ID: 8E52ADFF7CA8AE56

View file

@ -8,11 +8,15 @@
cache_valid_time: 3600 cache_valid_time: 3600
pkg: pkg:
- build-essential - build-essential
- dpkg-dev
- gcc
- git - git
- libc6-dev
- libjemalloc2 - libjemalloc2
- libjemalloc-dev - libjemalloc-dev
- libssl-dev - libssl-dev
- libsystemd-dev - libsystemd-dev
- make
- python3-cryptography - python3-cryptography
- ssl-cert - ssl-cert
- name: gather facts - name: gather facts
@ -40,13 +44,27 @@
version: "{{ valkey_version | default('latest') }}" version: "{{ valkey_version | default('latest') }}"
github_token: "{{ valkey_github_token }}" github_token: "{{ valkey_github_token }}"
repository: "valkey-io/valkey" repository: "valkey-io/valkey"
creates: "{{ valkey_binary_filepath | default('/usr/local/bin/valkey-server') }}" creates: "{{ valkey_install_dir }}/src"
cmds: cmds:
- tar -zxf {asset_dirname}/{asset_filename} - tar -zxf {asset_dirname}/{asset_filename}
- 'mv $(find . -maxdepth 1 -name valkey-io-valkey\* -type d) {{ valkey_install_dir }}/src'
- name: compile Valkey (some tweaks taken from Valkey's Dockerfile
become: true
args:
chdir: '{{ valkey_install_dir }}/src'
ansible.builtin.shell: '{{ item }}'
loop:
- 'make distclean || true'
- |- - |-
cd $(find . -maxdepth 1 -name valkey-io-valkey\* -type d); extraJemallocConfigureFlags="--build=$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)";
make -j $(nproc) BUILD_TLS=yes USE_SYSTEMD=yes && case $(dpkg --print-architecture) in
make install amd64 | i386 | x32) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=12" ;;
*) extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-page=16" ;;
esac;
extraJemallocConfigureFlags="$extraJemallocConfigureFlags --with-lg-hugepage=21";
sed -ri 's!cd jemalloc && ./configure !&'"$extraJemallocConfigureFlags"' !' ./deps/Makefile;
- 'make -j $(nproc) BUILD_TLS=yes USE_SYSTEMD=yes'
- make install
- name: create directories - name: create directories
become: true become: true
ansible.builtin.file: ansible.builtin.file: