Skip to content

Commit 588652d

Browse files
committed
Apply missing sys/random.h fix on Debian 9 and Ubuntu 16
Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 5b1fb36 commit 588652d

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

deps-packaging/git/cfbuild-git.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ case "$OS" in
3131
# 15:05:28 #include <sys/random.h>
3232
# 15:05:28 ^
3333
# 15:05:28 compilation terminated.
34-
patch -p1 < %{_topdir}/SOURCES/fix_git_on_rhel7.patch
34+
patch -p1 < %{_topdir}/SOURCES/fix_git_on_old_platforms.patch
3535
fi
3636
;;
3737
esac

deps-packaging/git/debian/rules

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@ install: build
2323
dh_clean -k
2424
dh_installdirs
2525

26+
case "$OS" in
27+
# Fixes the following compilation error on debian 9, ubuntu 16:
28+
# 15:05:28 compat/posix.h:159:24: fatal error: sys/random.h: No such file or directory
29+
# 15:05:28 #include <sys/random.h>
30+
# 15:05:28 ^
31+
# 15:05:28 compilation terminated.
32+
ubuntu)
33+
if [ $(echo $OS_VERSION | cut -d. -f1) = 16 ]
34+
then
35+
patch -p1 < $(CURDIR)/fix_git_on_old_platforms.patch
36+
fi
37+
;;
38+
debian)
39+
if [ $(echo $OS_VERSION | cut -d. -f1) = 9 ]
40+
then
41+
patch -p1 < $(CURDIR)/fix_git_on_old_platforms.patch
42+
fi
43+
;;
44+
esac
45+
2646
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
2747

2848
rm -rf $(CURDIR)/debian/tmp$(PREFIX)/lib/perl*

0 commit comments

Comments
 (0)