[packages/osquery] don't detect pld linux as ubuntu
glen
glen at pld-linux.org
Sat Jul 25 13:59:35 CEST 2015
commit 04a227fdde98fa864b0791a2e2ea9efa48cae60c
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sat Jul 25 14:58:46 2015 +0300
don't detect pld linux as ubuntu
upstreamed: https://github.com/facebook/osquery/pull/1388
osquery.spec | 2 ++
platform.patch | 30 ++++++++++++++++++++++++++++++
2 files changed, 32 insertions(+)
---
diff --git a/osquery.spec b/osquery.spec
index d65d82b..f4a3c17 100644
--- a/osquery.spec
+++ b/osquery.spec
@@ -8,6 +8,7 @@ Source0: https://github.com/facebook/osquery/archive/%{version}/%{name}-%{versio
# Source0-md5: af772f7fe7b9b9a3e8ef2abfa69c2d04
Source1: https://github.com/osquery/third-party/archive/%{version}/%{name}-third-party-%{version}.tar.gz
# Source1-md5: 940f351cef7965b0f57df70d54885ded
+Patch0: platform.patch
URL: https://osquery.io/
BuildRequires: boost-devel
BuildRequires: bzip2-devel
@@ -43,6 +44,7 @@ network connections, browser plugins, hardware events or file hashes.
%prep
%setup -q -a1
+%patch0 -p1
mv third-party-%{version}/* third-party
diff --git a/platform.patch b/platform.patch
new file mode 100644
index 0000000..f3ead82
--- /dev/null
+++ b/platform.patch
@@ -0,0 +1,30 @@
+https://github.com/facebook/osquery/pull/1388
+--- osquery-1.5.0/tools/lib.sh~ 2015-07-20 12:37:24.000000000 +0300
++++ osquery-1.5.0/tools/lib.sh 2015-07-25 14:46:16.031405751 +0300
+@@ -9,7 +9,7 @@
+
+ ORACLE_RELEASE=/etc/oracle-release
+ SYSTEM_RELEASE=/etc/system-release
+-UBUNTU_RELEASE=/etc/lsb-release
++LSB_RELEASE=/etc/lsb-release
+
+ function platform() {
+ local __out=$1
+@@ -25,7 +25,7 @@
+ elif [[ -n `grep -o "Amazon Linux" $SYSTEM_RELEASE 2>/dev/null` ]]; then
+ FAMILY="redhat"
+ eval $__out="amazon"
+- elif [[ -f "$UBUNTU_RELEASE" ]]; then
++ elif [[ -f "$LSB_RELEASE" ]] && grep -q 'DISTRIB_ID=Ubuntu' $LSB_RELEASE; then
+ FAMILY="debian"
+ eval $__out="ubuntu"
+ else
+@@ -49,7 +49,7 @@
+ elif [[ $1 = "amazon" ]]; then
+ eval $__out=`grep -o "release 20[12][0-9]\.[0-9][0-9]" $SYSTEM_RELEASE | sed 's/release /amazon/g'`
+ elif [[ $1 = "ubuntu" ]]; then
+- eval $__out=`grep DISTRIB_CODENAME $UBUNTU_RELEASE | awk -F'=' '{print $2}'`
++ eval $__out=`awk -F= '/DISTRIB_CODENAME/ { print $2 }' $LSB_RELEASE`
+ elif [[ $1 = "darwin" ]]; then
+ eval $__out=`sw_vers -productVersion | awk -F '.' '{print $1 "." $2}'`
+ elif [[ $1 = "freebsd" ]]; then
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/osquery.git/commitdiff/04a227fdde98fa864b0791a2e2ea9efa48cae60c
More information about the pld-cvs-commit
mailing list