Skip to content

Commit

Permalink
copr: Workaround for CVE-2022-24765 fix
Browse files Browse the repository at this point in the history
Copr runs "make srpm" in a directory not owned by the current user. This
breaks git commands and we get the wrong version number (e.g. 2.4.4-1)
instead of (2.4.4-0.timestamp.githash). The wrong version number break
users and OST, never getting the latest version.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
  • Loading branch information
nirs committed Jun 6, 2022
1 parent f1c0c01 commit a72c680
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .copr/Makefile
Expand Up @@ -9,4 +9,14 @@ srpm:
# Git is required to create release suffix.
# python3-setuptools required for building srpm.
dnf -y install git python3-setuptools

# Workaround for CVE-2022-24765 fix:
#
# fatal: unsafe repository ('/path' is owned by someone else)
#
# Without this build-aux/release is confused, and all builds have same
# build from tag version (e.g. 2.4.4-1.fc35) instead a master build version
# (2.4.4-0.202204031154.git300480e.fc35).
git config --global --add safe.directory "$(shell pwd)"

$(MAKE) srpm OUTDIR=$(outdir)

0 comments on commit a72c680

Please sign in to comment.