[PATCH] Works for both bash and zsh now
by Lucius Hu
Please review this patch instead of the one I earlier.
In the last patch, zsh will have a red end character if the last
command has non-zero exit code. And I added this functionality to
bash as well.
I also wrap the code in functions so and made the variable local.
Also, I used the hooks in bash and zsh.
---
50-prompt.sh | 84 +++++++++++++++++++++++++++++++++++++---------------
1 file changed, 60 insertions(+), 24 deletions(-)
diff --git a/50-prompt.sh b/50-prompt.sh
index 753f418..5fba2de 100644
--- a/50-prompt.sh
+++ b/50-prompt.sh
@@ -1,25 +1,61 @@
-if [ -n "$ZSH_VERSION" ]; then
- exit 0
+# Set prompt and title (for interactive shells only)
+if [ "$(expr $- : '.*i')" -ne 0 ]; then
+ # this works for sh and bash
+ if [ -z "$ZSH_VERSION" ]; then
+ __stateless_prompt() {
+ local EXIT="$?" # exit code of last command
+ local BLUE="\[\e[38;5;39m\]"
+ local RED="\[\e[31m\]"
+ local ORANGE="\[\e[38;5;208m\]"
+ local WHITE="\[\e[0m\]"
+ # endchar and username
+ local endchar="\$${WHITE}" # $ for non-root users
+ local username="${BLUE}\u${WHITE}" # blue(39) for non-root
+ if [ "$UID" = "0" ]; then
+ endchar="#${WHITE}" # # for root user
+ username="${RED}\u${WHITE}" # red for root
+ fi
+ if [ "$EXIT" -eq 0 ]; then
+ endchar="${WHITE}$endchar" # White enchar as default
+ else
+ endchar="${RED}$endchar" # Red endchar for error
+ fi
+ # hostname in orange
+ local host="${ORANGE}\H${WHITE}"
+ # current directory in blue(39)
+ local dir="${BLUE}\w${WHITE}"
+ # set prompt
+ export PS1="${username}@${host} ${dir} ${endchar} "
+ # set window title for xterm
+ if [ "${TERM:0:5}" = "xterm" ]; then
+ export PS1="\[\e]2;\u@\H :: \w\a\]$PS1"
+ fi
+ }
+ export PROMPT_COMMAND=__stateless_prompt
+ else
+ # this works for zsh
+ __stateless_prompt() { # set prompt
+ # endchar
+ # use red if last command has non-zero exit
+ # use # for root and $ for non-root users
+ local root_endch="%(?.#.%F{red}#%f)"
+ local other_endch="%(?.$.%F{red}$%f)"
+ local endchar="%(#.${root_endch}.${other_endch})"
+ # use red for root and blue(39) for non-root users
+ local username="%F{%(#.red.39)}%n%f"
+ # hostname in orange
+ local host="%F{208}%m%f"
+ # current directory in blue(39)
+ local dir="%F{39}%~%f"
+ export PS1="${username}@${host} ${dir} ${endchar} "
+ }
+ __stateless_title () { # for xterm, set window title
+ if [ "${TERM:0:5}" = "xterm" ]; then
+ print -Pn "\e]2;%n@%m :: %~\a"
+ fi
+ }
+ autoload -Uz add-zsh-hook
+ add-zsh-hook preexec __stateless_prompt
+ add-zsh-hook precmd __stateless_title
+ fi
fi
-
-endchar="\$"
-if [ "$UID" = "0" ]; then
- endchar="#"
-fi
-
-# Blue
-BG="\[\e[38;5;39m\]"
-# RGBA index:
-#BG="\[\e[38;2;255;142;58m\]"
-
-# Orange
-FG="\[\e[38;5;208m\]"
-# RGBA index:
-#FG="\[\e[38;2;0;174;255m\]"
-
-export PS1="$BG\u\[\e[0m\]@$FG\H ${BG}\w ${BG}$endchar \[\e[0;0m\]"
-if [ "${TERM:0:5}" = "xterm" ]; then
- export PS1="\[\e]2;\u@\H :: \w\a\]$PS1"
-fi
-
-shopt -s checkwinsize
--
2.21.0
1 year, 10 months
[PATCH clr-bundles] openstack-common: remove unneeded 'futures' package
by Patrick McCarty
The 'futures' package provides concurrent.futures, which has been
available since Python 3.2. OpenStack is currently using Python 3.6, so
this bundle does not require the package.
Signed-off-by: Patrick McCarty <patrick.mccarty(a)intel.com>
---
bundles/openstack-common | 1 -
1 file changed, 1 deletion(-)
diff --git a/bundles/openstack-common b/bundles/openstack-common
index 836e14ee..dc08c82e 100644
--- a/bundles/openstack-common
+++ b/bundles/openstack-common
@@ -18,7 +18,6 @@ debtcollector
elixir
funcsigs
functools32
-futures
include(haproxy)
iso8601
jsonschema
--
2.21.0
1 year, 10 months
[PATCH] Works for both bash and zsh now; Bugs fixed
by Lucius Hu
This is a part of a bigger plan that bourne compatible shells shall
have a same set of default profiles.
This patch shall be applied on `50-prompt.sh` in
`clearlinux-pkgs/filesystem`, it includes the following:
1. It would be set the prompt correctly for both bash and zsh.
Currently the prompt for bash is defined here, but the prompt for
zsh is set in `/usr/share/defaults/. Moreover, their prompts are
not identical.
2. The color for bash prompt is not set correctly, it's fixed here.
3. The end character for zsh is not set correctly, as well as the
color, which are both fixed now.
4. When the terminal is xterm*, this file sets the title for both
bash and zsh. Currently the prompt for bash is defined here, but
it's not set for zsh.
5. Refactored variable names to increase readability.
This patch will requires the changes in the following:
1. `profile.x86_64` and `profile.i386` in `clearlinux-pkgs/filesystem`
shall not set anything related to prompt.
2. `0001-stateless-configuration.patch` in `clearlinux-pkgs/zsh`
shall be patched so that `zshrc` won't set the prompt.
This has been tested locally for sh (aliased to bash), bash, and zsh.
---
50-prompt.sh | 70 ++++++++++++++++++++++++++++++++++------------------
1 file changed, 46 insertions(+), 24 deletions(-)
diff --git a/50-prompt.sh b/50-prompt.sh
index 753f418..94709ae 100644
--- a/50-prompt.sh
+++ b/50-prompt.sh
@@ -1,25 +1,47 @@
-if [ -n "$ZSH_VERSION" ]; then
- exit 0
+# Set prompt (for interactive bash and zsh shells only)
+if [ "$PS1" ]; then
+ if [ -n "$BASH_VERSION" ]; then
+ BLUE="\[\e[38;5;39m\]" # Blue
+ RED="\[\e[31m\]" #Red
+ ORANGE="\[\e[38;5;208m\]" # Orange
+ WHITE="\[\e[0m\]"
+ # endchar and username
+ # Use red for root and blue(39) for non-root users
+ username="${BLUE}\u${WHITE}"
+ endchar="${BLUE}\$${WHITE}" # $ for normal users
+ if [ "$UID" = "0" ]; then
+ username="${BLUE}\u${WHITE}"
+ endchar="${RED}#${WHITE}" # # for root user
+ fi
+ # host in orange
+ host="${ORANGE}\H${WHITE}"
+ # current directory in blue(39)
+ dir="${BLUE}\w${WHITE}"
+ # set prompt
+ export PS1="${username}@${host} ${dir} ${endchar} "
+ # set window title for xterm
+ if [ "${TERM:0:5}" = "xterm" ]; then
+ export PS1="\[\e]2;\u@\H :: \w\a\]$PS1"
+ fi
+ elif [ -n "$ZSH_VERSION" ]; then
+ # endchar
+ root_endch="%(?.#.%F{red}#%f)"
+ other_endch="%(?.$.%F{red}$%f)"
+ endchar="%(#.${root_endch}.${other_endch})"
+ # use red for root and blue(39) for non-root users
+ username="%F{%(#.red.39)}%n%f"
+ # host in orange
+ host="%F{208}%m%f"
+ # current directory in blue(39)
+ dir="%F{39}%~%f"
+ export PS1="${username}@${host} ${dir} ${endchar} "
+ # For xterm, set window title
+ if [ "${TERM:0:5}" = "xterm" ]; then
+ autoload -Uz add-zsh-hook
+ _stateless_precmd () {
+ print -Pn "\e]0;%n@%m :: %~\a$PS1"
+ }
+ add-zsh-hook precmd _stateless_precmd
+ fi
+ fi
fi
-
-endchar="\$"
-if [ "$UID" = "0" ]; then
- endchar="#"
-fi
-
-# Blue
-BG="\[\e[38;5;39m\]"
-# RGBA index:
-#BG="\[\e[38;2;255;142;58m\]"
-
-# Orange
-FG="\[\e[38;5;208m\]"
-# RGBA index:
-#FG="\[\e[38;2;0;174;255m\]"
-
-export PS1="$BG\u\[\e[0m\]@$FG\H ${BG}\w ${BG}$endchar \[\e[0;0m\]"
-if [ "${TERM:0:5}" = "xterm" ]; then
- export PS1="\[\e]2;\u@\H :: \w\a\]$PS1"
-fi
-
-shopt -s checkwinsize
--
2.21.0
1 year, 10 months
[PATCH opencv] Enable vulkan compute and testing-extras package
by Kevron Rees
---
cmake_args | 4 ++
extras | 1 -
opencv.spec | 175 ++++++++++++++++++++++++++++++++++++++++++++++++-
release | 2 +-
testing_extras | 76 +++++++++++++++++++++
5 files changed, 255 insertions(+), 3 deletions(-)
create mode 100644 testing_extras
diff --git a/cmake_args b/cmake_args
index 261efec..ae253df 100644
--- a/cmake_args
+++ b/cmake_args
@@ -10,12 +10,16 @@
-DWITH_TBB=ON
-DWITH_OPENMP=ON
-DWITH_VA=ON
+-DWITH_VULKAN=ON
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo
-DWITH_GSTREAMER=1
-DINSTALL_PYTHON_EXAMPLES=1
-DCPU_DISPATCH=AVX,AVX2,AVX512_SKX
-DLIB_SUFFIX=
-DBUILD_EXAMPLES=ON
+-DBUILD_TESTS=ON
+-DBUILD_PERF_TESTS=ON
+-DINSTALL_TESTS=ON
-DINSTALL_C_EXAMPLES=ON
-DINSTALL_PYTHON_EXAMPLES=ON
-DBUILD_JAVA=ON
diff --git a/extras b/extras
index e8b91b8..d1c4a33 100644
--- a/extras
+++ b/extras
@@ -118,4 +118,3 @@
/usr/share/OpenCV4/samples/tapi/squares.cpp
/usr/share/OpenCV4/samples/tapi/tvl1_optical_flow.cpp
/usr/share/OpenCV4/samples/tapi/ufacedetect.cpp
-
diff --git a/opencv.spec b/opencv.spec
index 63f8448..b8cdab9 100644
--- a/opencv.spec
+++ b/opencv.spec
@@ -5,7 +5,7 @@
%define keepstatic 1
Name : opencv
Version : 4.1.0
-Release : 90
+Release : 91
URL : https://github.com/opencv/opencv/archive/4.1.0/opencv-4.1.0.tar.gz
Source0 : https://github.com/opencv/opencv/archive/4.1.0/opencv-4.1.0.tar.gz
Summary : Open Source Computer Vision Library
@@ -145,6 +145,14 @@ Requires: python3-core
python3 components for the opencv package.
+%package testing-extras
+Summary: testing-extras components for the opencv package.
+Group: Default
+
+%description testing-extras
+testing-extras components for the opencv package.
+
+
%prep
%setup -q -n opencv-4.1.0
%patch1 -p1
@@ -183,12 +191,16 @@ export CXXFLAGS_USE="$CXXFLAGS -fprofile-use -fprofile-dir=pgo -fprofile-correct
-DWITH_TBB=ON \
-DWITH_OPENMP=ON \
-DWITH_VA=ON \
+-DWITH_VULKAN=ON \
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
-DWITH_GSTREAMER=1 \
-DINSTALL_PYTHON_EXAMPLES=1 \
-DCPU_DISPATCH=AVX,AVX2,AVX512_SKX \
-DLIB_SUFFIX= \
-DBUILD_EXAMPLES=ON \
+-DBUILD_TESTS=ON \
+-DBUILD_PERF_TESTS=ON \
+-DINSTALL_TESTS=ON \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DBUILD_JAVA=ON \
@@ -228,12 +240,16 @@ export CXXFLAGS="$CXXFLAGS -march=haswell -m64"
-DWITH_TBB=ON \
-DWITH_OPENMP=ON \
-DWITH_VA=ON \
+-DWITH_VULKAN=ON \
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
-DWITH_GSTREAMER=1 \
-DINSTALL_PYTHON_EXAMPLES=1 \
-DCPU_DISPATCH=AVX,AVX2,AVX512_SKX \
-DLIB_SUFFIX= \
-DBUILD_EXAMPLES=ON \
+-DBUILD_TESTS=ON \
+-DBUILD_PERF_TESTS=ON \
+-DINSTALL_TESTS=ON \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DBUILD_JAVA=ON \
@@ -271,12 +287,16 @@ export CXXFLAGS="$CXXFLAGS -march=skylake-avx512 -m64 "
-DWITH_TBB=ON \
-DWITH_OPENMP=ON \
-DWITH_VA=ON \
+-DWITH_VULKAN=ON \
-DCMAKE_BUILD_TYPE=ReleaseWithDebInfo \
-DWITH_GSTREAMER=1 \
-DINSTALL_PYTHON_EXAMPLES=1 \
-DCPU_DISPATCH=AVX,AVX2,AVX512_SKX \
-DLIB_SUFFIX= \
-DBUILD_EXAMPLES=ON \
+-DBUILD_TESTS=ON \
+-DBUILD_PERF_TESTS=ON \
+-DINSTALL_TESTS=ON \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DBUILD_JAVA=ON \
@@ -330,6 +350,81 @@ cp %{buildroot}/usr/lib/python3.7/site-packages/cv2/python-2.7/cv2.so %{buildroo
%files bin
%defattr(-,root,root,-)
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_calib3d
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_core
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_dnn
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_features2d
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_imgcodecs
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_imgproc
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_objdetect
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_photo
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_stitching
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_video
+%exclude /usr/bin/haswell/avx512_1/opencv_perf_videoio
+%exclude /usr/bin/haswell/avx512_1/opencv_test_calib3d
+%exclude /usr/bin/haswell/avx512_1/opencv_test_core
+%exclude /usr/bin/haswell/avx512_1/opencv_test_dnn
+%exclude /usr/bin/haswell/avx512_1/opencv_test_features2d
+%exclude /usr/bin/haswell/avx512_1/opencv_test_flann
+%exclude /usr/bin/haswell/avx512_1/opencv_test_highgui
+%exclude /usr/bin/haswell/avx512_1/opencv_test_imgcodecs
+%exclude /usr/bin/haswell/avx512_1/opencv_test_imgproc
+%exclude /usr/bin/haswell/avx512_1/opencv_test_ml
+%exclude /usr/bin/haswell/avx512_1/opencv_test_objdetect
+%exclude /usr/bin/haswell/avx512_1/opencv_test_photo
+%exclude /usr/bin/haswell/avx512_1/opencv_test_stitching
+%exclude /usr/bin/haswell/avx512_1/opencv_test_video
+%exclude /usr/bin/haswell/avx512_1/opencv_test_videoio
+%exclude /usr/bin/haswell/opencv_perf_calib3d
+%exclude /usr/bin/haswell/opencv_perf_core
+%exclude /usr/bin/haswell/opencv_perf_dnn
+%exclude /usr/bin/haswell/opencv_perf_features2d
+%exclude /usr/bin/haswell/opencv_perf_imgcodecs
+%exclude /usr/bin/haswell/opencv_perf_imgproc
+%exclude /usr/bin/haswell/opencv_perf_objdetect
+%exclude /usr/bin/haswell/opencv_perf_photo
+%exclude /usr/bin/haswell/opencv_perf_stitching
+%exclude /usr/bin/haswell/opencv_perf_video
+%exclude /usr/bin/haswell/opencv_perf_videoio
+%exclude /usr/bin/haswell/opencv_test_calib3d
+%exclude /usr/bin/haswell/opencv_test_core
+%exclude /usr/bin/haswell/opencv_test_dnn
+%exclude /usr/bin/haswell/opencv_test_features2d
+%exclude /usr/bin/haswell/opencv_test_flann
+%exclude /usr/bin/haswell/opencv_test_highgui
+%exclude /usr/bin/haswell/opencv_test_imgcodecs
+%exclude /usr/bin/haswell/opencv_test_imgproc
+%exclude /usr/bin/haswell/opencv_test_ml
+%exclude /usr/bin/haswell/opencv_test_objdetect
+%exclude /usr/bin/haswell/opencv_test_photo
+%exclude /usr/bin/haswell/opencv_test_stitching
+%exclude /usr/bin/haswell/opencv_test_video
+%exclude /usr/bin/haswell/opencv_test_videoio
+%exclude /usr/bin/opencv_perf_calib3d
+%exclude /usr/bin/opencv_perf_core
+%exclude /usr/bin/opencv_perf_dnn
+%exclude /usr/bin/opencv_perf_features2d
+%exclude /usr/bin/opencv_perf_imgcodecs
+%exclude /usr/bin/opencv_perf_imgproc
+%exclude /usr/bin/opencv_perf_objdetect
+%exclude /usr/bin/opencv_perf_photo
+%exclude /usr/bin/opencv_perf_stitching
+%exclude /usr/bin/opencv_perf_video
+%exclude /usr/bin/opencv_perf_videoio
+%exclude /usr/bin/opencv_test_calib3d
+%exclude /usr/bin/opencv_test_core
+%exclude /usr/bin/opencv_test_dnn
+%exclude /usr/bin/opencv_test_features2d
+%exclude /usr/bin/opencv_test_flann
+%exclude /usr/bin/opencv_test_highgui
+%exclude /usr/bin/opencv_test_imgcodecs
+%exclude /usr/bin/opencv_test_imgproc
+%exclude /usr/bin/opencv_test_ml
+%exclude /usr/bin/opencv_test_objdetect
+%exclude /usr/bin/opencv_test_photo
+%exclude /usr/bin/opencv_test_stitching
+%exclude /usr/bin/opencv_test_video
+%exclude /usr/bin/opencv_test_videoio
/usr/bin/haswell/avx512_1/opencv_annotation
/usr/bin/haswell/avx512_1/opencv_interactive-calibration
/usr/bin/haswell/avx512_1/opencv_version
@@ -1040,3 +1135,81 @@ cp %{buildroot}/usr/lib/python3.7/site-packages/cv2/python-2.7/cv2.so %{buildroo
%files python3
%defattr(-,root,root,-)
/usr/lib/python3*/*
+
+%files testing-extras
+%defattr(-,root,root,-)
+/usr/bin/haswell/avx512_1/opencv_perf_calib3d
+/usr/bin/haswell/avx512_1/opencv_perf_core
+/usr/bin/haswell/avx512_1/opencv_perf_dnn
+/usr/bin/haswell/avx512_1/opencv_perf_features2d
+/usr/bin/haswell/avx512_1/opencv_perf_imgcodecs
+/usr/bin/haswell/avx512_1/opencv_perf_imgproc
+/usr/bin/haswell/avx512_1/opencv_perf_objdetect
+/usr/bin/haswell/avx512_1/opencv_perf_photo
+/usr/bin/haswell/avx512_1/opencv_perf_stitching
+/usr/bin/haswell/avx512_1/opencv_perf_video
+/usr/bin/haswell/avx512_1/opencv_perf_videoio
+/usr/bin/haswell/avx512_1/opencv_test_calib3d
+/usr/bin/haswell/avx512_1/opencv_test_core
+/usr/bin/haswell/avx512_1/opencv_test_dnn
+/usr/bin/haswell/avx512_1/opencv_test_features2d
+/usr/bin/haswell/avx512_1/opencv_test_flann
+/usr/bin/haswell/avx512_1/opencv_test_highgui
+/usr/bin/haswell/avx512_1/opencv_test_imgcodecs
+/usr/bin/haswell/avx512_1/opencv_test_imgproc
+/usr/bin/haswell/avx512_1/opencv_test_ml
+/usr/bin/haswell/avx512_1/opencv_test_objdetect
+/usr/bin/haswell/avx512_1/opencv_test_photo
+/usr/bin/haswell/avx512_1/opencv_test_stitching
+/usr/bin/haswell/avx512_1/opencv_test_video
+/usr/bin/haswell/avx512_1/opencv_test_videoio
+/usr/bin/haswell/opencv_perf_calib3d
+/usr/bin/haswell/opencv_perf_core
+/usr/bin/haswell/opencv_perf_dnn
+/usr/bin/haswell/opencv_perf_features2d
+/usr/bin/haswell/opencv_perf_imgcodecs
+/usr/bin/haswell/opencv_perf_imgproc
+/usr/bin/haswell/opencv_perf_objdetect
+/usr/bin/haswell/opencv_perf_photo
+/usr/bin/haswell/opencv_perf_stitching
+/usr/bin/haswell/opencv_perf_video
+/usr/bin/haswell/opencv_perf_videoio
+/usr/bin/haswell/opencv_test_calib3d
+/usr/bin/haswell/opencv_test_core
+/usr/bin/haswell/opencv_test_dnn
+/usr/bin/haswell/opencv_test_features2d
+/usr/bin/haswell/opencv_test_flann
+/usr/bin/haswell/opencv_test_highgui
+/usr/bin/haswell/opencv_test_imgcodecs
+/usr/bin/haswell/opencv_test_imgproc
+/usr/bin/haswell/opencv_test_ml
+/usr/bin/haswell/opencv_test_objdetect
+/usr/bin/haswell/opencv_test_photo
+/usr/bin/haswell/opencv_test_stitching
+/usr/bin/haswell/opencv_test_video
+/usr/bin/haswell/opencv_test_videoio
+/usr/bin/opencv_perf_calib3d
+/usr/bin/opencv_perf_core
+/usr/bin/opencv_perf_dnn
+/usr/bin/opencv_perf_features2d
+/usr/bin/opencv_perf_imgcodecs
+/usr/bin/opencv_perf_imgproc
+/usr/bin/opencv_perf_objdetect
+/usr/bin/opencv_perf_photo
+/usr/bin/opencv_perf_stitching
+/usr/bin/opencv_perf_video
+/usr/bin/opencv_perf_videoio
+/usr/bin/opencv_test_calib3d
+/usr/bin/opencv_test_core
+/usr/bin/opencv_test_dnn
+/usr/bin/opencv_test_features2d
+/usr/bin/opencv_test_flann
+/usr/bin/opencv_test_highgui
+/usr/bin/opencv_test_imgcodecs
+/usr/bin/opencv_test_imgproc
+/usr/bin/opencv_test_ml
+/usr/bin/opencv_test_objdetect
+/usr/bin/opencv_test_photo
+/usr/bin/opencv_test_stitching
+/usr/bin/opencv_test_video
+/usr/bin/opencv_test_videoio
diff --git a/release b/release
index d61f00d..7fe4e49 100644
--- a/release
+++ b/release
@@ -1 +1 @@
-90
+91
diff --git a/testing_extras b/testing_extras
new file mode 100644
index 0000000..d526ead
--- /dev/null
+++ b/testing_extras
@@ -0,0 +1,76 @@
+files = ['/usr/bin/haswell/avx512_1/opencv_perf_calib3d',
+ '/usr/bin/haswell/avx512_1/opencv_perf_core',
+ '/usr/bin/haswell/avx512_1/opencv_perf_dnn',
+ '/usr/bin/haswell/avx512_1/opencv_perf_features2d',
+ '/usr/bin/haswell/avx512_1/opencv_perf_imgcodecs',
+ '/usr/bin/haswell/avx512_1/opencv_perf_imgproc',
+ '/usr/bin/haswell/avx512_1/opencv_perf_objdetect',
+ '/usr/bin/haswell/avx512_1/opencv_perf_photo',
+ '/usr/bin/haswell/avx512_1/opencv_perf_stitching',
+ '/usr/bin/haswell/avx512_1/opencv_perf_video',
+ '/usr/bin/haswell/avx512_1/opencv_perf_videoio',
+ '/usr/bin/haswell/avx512_1/opencv_test_calib3d',
+ '/usr/bin/haswell/avx512_1/opencv_test_core',
+ '/usr/bin/haswell/avx512_1/opencv_test_dnn',
+ '/usr/bin/haswell/avx512_1/opencv_test_features2d',
+ '/usr/bin/haswell/avx512_1/opencv_test_flann',
+ '/usr/bin/haswell/avx512_1/opencv_test_highgui',
+ '/usr/bin/haswell/avx512_1/opencv_test_imgcodecs',
+ '/usr/bin/haswell/avx512_1/opencv_test_imgproc',
+ '/usr/bin/haswell/avx512_1/opencv_test_ml',
+ '/usr/bin/haswell/avx512_1/opencv_test_objdetect',
+ '/usr/bin/haswell/avx512_1/opencv_test_photo',
+ '/usr/bin/haswell/avx512_1/opencv_test_stitching',
+ '/usr/bin/haswell/avx512_1/opencv_test_video',
+ '/usr/bin/haswell/avx512_1/opencv_test_videoio',
+ '/usr/bin/haswell/opencv_perf_calib3d',
+ '/usr/bin/haswell/opencv_perf_core',
+ '/usr/bin/haswell/opencv_perf_dnn',
+ '/usr/bin/haswell/opencv_perf_features2d',
+ '/usr/bin/haswell/opencv_perf_imgcodecs',
+ '/usr/bin/haswell/opencv_perf_imgproc',
+ '/usr/bin/haswell/opencv_perf_objdetect',
+ '/usr/bin/haswell/opencv_perf_photo',
+ '/usr/bin/haswell/opencv_perf_stitching',
+ '/usr/bin/haswell/opencv_perf_video',
+ '/usr/bin/haswell/opencv_perf_videoio',
+ '/usr/bin/haswell/opencv_test_calib3d',
+ '/usr/bin/haswell/opencv_test_core',
+ '/usr/bin/haswell/opencv_test_dnn',
+ '/usr/bin/haswell/opencv_test_features2d',
+ '/usr/bin/haswell/opencv_test_flann',
+ '/usr/bin/haswell/opencv_test_highgui',
+ '/usr/bin/haswell/opencv_test_imgcodecs',
+ '/usr/bin/haswell/opencv_test_imgproc',
+ '/usr/bin/haswell/opencv_test_ml',
+ '/usr/bin/haswell/opencv_test_objdetect',
+ '/usr/bin/haswell/opencv_test_photo',
+ '/usr/bin/haswell/opencv_test_stitching',
+ '/usr/bin/haswell/opencv_test_video',
+ '/usr/bin/haswell/opencv_test_videoio',
+ '/usr/bin/opencv_perf_calib3d',
+ '/usr/bin/opencv_perf_core',
+ '/usr/bin/opencv_perf_dnn',
+ '/usr/bin/opencv_perf_features2d',
+ '/usr/bin/opencv_perf_imgcodecs',
+ '/usr/bin/opencv_perf_imgproc',
+ '/usr/bin/opencv_perf_objdetect',
+ '/usr/bin/opencv_perf_photo',
+ '/usr/bin/opencv_perf_stitching',
+ '/usr/bin/opencv_perf_video',
+ '/usr/bin/opencv_perf_videoio',
+ '/usr/bin/opencv_test_calib3d',
+ '/usr/bin/opencv_test_core',
+ '/usr/bin/opencv_test_dnn',
+ '/usr/bin/opencv_test_features2d',
+ '/usr/bin/opencv_test_flann',
+ '/usr/bin/opencv_test_highgui',
+ '/usr/bin/opencv_test_imgcodecs',
+ '/usr/bin/opencv_test_imgproc',
+ '/usr/bin/opencv_test_ml',
+ '/usr/bin/opencv_test_objdetect',
+ '/usr/bin/opencv_test_photo',
+ '/usr/bin/opencv_test_stitching',
+ '/usr/bin/opencv_test_video',
+ '/usr/bin/opencv_test_videoio'
+]
\ No newline at end of file
--
2.21.0
1 year, 10 months
[PATCH open-vm-tools] Enable fuse block device
by William Douglas
Fixups for enabling fuse and correcting the setuid utility to actually
be setuid/gid/sticky in order for it to open device nodes and launch
the vmware daemon with the correct permissions.
---
Looking through the setuid wrapper it looked safe, just operating off of hardcoded paths (after getting sbindir from the system) and hard coded options.
Thanks to Antonio for the patch inspiration and service file!
---
.gitignore | 1 +
attrs | 1 +
configure | 2 --
install_append | 3 +++
open-vm-tools.spec | 30 +++++++++++++++++++++++-------
pkgconfig_add | 2 ++
release | 2 +-
symbols | 1 +
used_libs | 17 ++++++++++-------
vmware-vmblock-fuse.service | 12 ++++++++++++
10 files changed, 54 insertions(+), 17 deletions(-)
create mode 100644 attrs
create mode 100644 vmware-vmblock-fuse.service
diff --git a/.gitignore b/.gitignore
index fd14cc3..edbcfda 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,3 +11,4 @@ build.log.round*
commitmsg
results/
rpms/
+for-review.txt
diff --git a/attrs b/attrs
new file mode 100644
index 0000000..8b3cd5c
--- /dev/null
+++ b/attrs
@@ -0,0 +1 @@
+7755 root root /usr/bin/vmware-user-suid-wrapper
diff --git a/configure b/configure
index 1b53ba4..b4f8cd8 100644
--- a/configure
+++ b/configure
@@ -1,6 +1,4 @@
---without-gtkmm
--without-dnet
---without-gtkmm3
--without-gtk2
--with-gtk3
--with-pam-prefix=/usr/share
diff --git a/install_append b/install_append
index 0cb9596..77b60ae 100644
--- a/install_append
+++ b/install_append
@@ -1,3 +1,6 @@
rm %{buildroot}/sbin/mount.vmhgfs
mkdir -p %{buildroot}//usr/lib/systemd/system/multi-user.target.wants
ln -s ../open-vm-tools.service %{buildroot}//usr/lib/systemd/system/multi-user.target.wants
+ln -s ../vmware-vmblock-fuse.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
+mkdir -p %{buildroot}/usr/share/xdg/autostart
+ln -s ../../../defaults/open-vm-tools/xdg/autostart/vmware-user.desktop %{buildroot}/usr/share/xdg/autostart
diff --git a/open-vm-tools.spec b/open-vm-tools.spec
index cdfbdb5..b2c6c66 100644
--- a/open-vm-tools.spec
+++ b/open-vm-tools.spec
@@ -4,10 +4,11 @@
#
Name : open-vm-tools
Version : 10.3.5
-Release : 26
+Release : 28
URL : https://github.com/vmware/open-vm-tools/releases/download/stable-10.3.5/o...
Source0 : https://github.com/vmware/open-vm-tools/releases/download/stable-10.3.5/o...
Source1 : open-vm-tools.service
+Source2 : vmware-vmblock-fuse.service
Summary : Library for unpacking and executing VMware Guest Customization package.
Group : Development/Tools
License : BSD-2-Clause CDDL-1.0 GPL-2.0 LGPL-2.1 MIT
@@ -24,6 +25,7 @@ BuildRequires : automake
BuildRequires : automake-dev
BuildRequires : compat-fuse-soname2-dev
BuildRequires : doxygen
+BuildRequires : fuse
BuildRequires : fuse-dev
BuildRequires : gettext-bin
BuildRequires : glib-dev
@@ -37,6 +39,7 @@ BuildRequires : libtool-dev
BuildRequires : m4
BuildRequires : openssl-dev
BuildRequires : pkg-config-dev
+BuildRequires : pkgconfig(gtkmm-3.0)
BuildRequires : pkgconfig(ice)
BuildRequires : pkgconfig(libdrm)
BuildRequires : pkgconfig(libtirpc)
@@ -98,6 +101,7 @@ Requires: open-vm-tools-lib = %{version}-%{release}
Requires: open-vm-tools-bin = %{version}-%{release}
Requires: open-vm-tools-data = %{version}-%{release}
Provides: open-vm-tools-devel = %{version}-%{release}
+Requires: open-vm-tools = %{version}-%{release}
%description dev
dev components for the open-vm-tools package.
@@ -156,10 +160,13 @@ export http_proxy=http://127.0.0.1:9/
export https_proxy=http://127.0.0.1:9/
export no_proxy=localhost,127.0.0.1,0.0.0.0
export LANG=C
-export SOURCE_DATE_EPOCH=1546268181
-%reconfigure --disable-static --without-gtkmm \
---without-dnet \
---without-gtkmm3 \
+export SOURCE_DATE_EPOCH=1559065312
+export GCC_IGNORE_WERROR=1
+export CFLAGS="$CFLAGS -fno-lto "
+export FCFLAGS="$CFLAGS -fno-lto "
+export FFLAGS="$CFLAGS -fno-lto "
+export CXXFLAGS="$CXXFLAGS -fno-lto "
+%reconfigure --disable-static --without-dnet \
--without-gtk2 \
--with-gtk3 \
--with-pam-prefix=/usr/share \
@@ -178,7 +185,7 @@ export no_proxy=localhost,127.0.0.1,0.0.0.0
make VERBOSE=1 V=1 %{?_smp_mflags} check
%install
-export SOURCE_DATE_EPOCH=1546268181
+export SOURCE_DATE_EPOCH=1559065312
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/share/package-licenses/open-vm-tools
cp COPYING %{buildroot}/usr/share/package-licenses/open-vm-tools/COPYING
@@ -230,10 +237,14 @@ cp xferlogs/COPYING %{buildroot}/usr/share/package-licenses/open-vm-tools/xferlo
%make_install
mkdir -p %{buildroot}/usr/lib/systemd/system
install -m 0644 %{SOURCE1} %{buildroot}/usr/lib/systemd/system/open-vm-tools.service
+install -m 0644 %{SOURCE2} %{buildroot}/usr/lib/systemd/system/vmware-vmblock-fuse.service
## install_append content
rm %{buildroot}/sbin/mount.vmhgfs
mkdir -p %{buildroot}//usr/lib/systemd/system/multi-user.target.wants
ln -s ../open-vm-tools.service %{buildroot}//usr/lib/systemd/system/multi-user.target.wants
+ln -s ../vmware-vmblock-fuse.service %{buildroot}/usr/lib/systemd/system/multi-user.target.wants
+mkdir -p %{buildroot}/usr/share/xdg/autostart
+ln -s ../../../defaults/open-vm-tools/xdg/autostart/vmware-user.desktop %{buildroot}/usr/share/xdg/autostart
## install_append end
%files
@@ -242,9 +253,11 @@ ln -s ../open-vm-tools.service %{buildroot}//usr/lib/systemd/system/multi-user.
%files autostart
%defattr(-,root,root,-)
/usr/lib/systemd/system/multi-user.target.wants/open-vm-tools.service
+/usr/lib/systemd/system/multi-user.target.wants/vmware-vmblock-fuse.service
%files bin
%defattr(-,root,root,-)
+%attr(7755,root,root) /usr/bin/vmware-user-suid-wrapper
/usr/bin/mount.vmhgfs
/usr/bin/vmhgfs-fuse
/usr/bin/vmtoolsd
@@ -255,7 +268,6 @@ ln -s ../open-vm-tools.service %{buildroot}//usr/lib/systemd/system/multi-user.
/usr/bin/vmware-rpctool
/usr/bin/vmware-toolbox-cmd
/usr/bin/vmware-user
-/usr/bin/vmware-user-suid-wrapper
/usr/bin/vmware-vmblock-fuse
/usr/bin/vmware-xferlogs
@@ -282,6 +294,7 @@ ln -s ../open-vm-tools.service %{buildroot}//usr/lib/systemd/system/multi-user.
/usr/share/open-vm-tools/messages/ko/vmtoolsd.vmsg
/usr/share/open-vm-tools/messages/zh_CN/toolboxcmd.vmsg
/usr/share/pam.d/vmtoolsd
+/usr/share/xdg/autostart/vmware-user.desktop
%files dev
%defattr(-,root,root,-)
@@ -335,6 +348,7 @@ ln -s ../open-vm-tools.service %{buildroot}//usr/lib/systemd/system/multi-user.
/usr/lib64/open-vm-tools/plugins/vmsvc/libresolutionKMS.so
/usr/lib64/open-vm-tools/plugins/vmsvc/libtimeSync.so
/usr/lib64/open-vm-tools/plugins/vmsvc/libvmbackup.so
+/usr/lib64/open-vm-tools/plugins/vmusr/libdndcp.so
%files license
%defattr(0644,root,root,0755)
@@ -388,4 +402,6 @@ ln -s ../open-vm-tools.service %{buildroot}//usr/lib/systemd/system/multi-user.
%files services
%defattr(-,root,root,-)
%exclude /usr/lib/systemd/system/multi-user.target.wants/open-vm-tools.service
+%exclude /usr/lib/systemd/system/multi-user.target.wants/vmware-vmblock-fuse.service
/usr/lib/systemd/system/open-vm-tools.service
+/usr/lib/systemd/system/vmware-vmblock-fuse.service
diff --git a/pkgconfig_add b/pkgconfig_add
index 97b67fc..c81f093 100644
--- a/pkgconfig_add
+++ b/pkgconfig_add
@@ -1,7 +1,9 @@
# This file contains additional pkgconfig build requirements that did
# not get picked up automatically. One name per line, no whitespace.
+gtkmm-3.0
x11
ice
xtst
udev
libtirpc
+
diff --git a/release b/release
index 6f4247a..9902f17 100644
--- a/release
+++ b/release
@@ -1 +1 @@
-26
+28
diff --git a/symbols b/symbols
index 100b791..218ac4b 100644
--- a/symbols
+++ b/symbols
@@ -268,6 +268,7 @@ libhgfs.so.0:HgfsUpdateNodeAppendFlag
libhgfs.so.0:HgfsUpdateNodeFileDesc
libhgfs.so.0:HgfsUpdateNodeNames
libhgfs.so.0:HgfsUpdateNodeServerLock
+libhgfs.so.0:HgfsUri_ConvertFromPathToHgfsUri
libhgfs.so.0:HgfsValidateRenameFile
libhgfs.so.0:HgfsValidateReplySize
libhgfs.so.0:futimes
diff --git a/used_libs b/used_libs
index e2d292e..0da250e 100644
--- a/used_libs
+++ b/used_libs
@@ -1,17 +1,12 @@
ld-linux-x86-64.so.2
-libICE.so.6
-libSM.so.6
libX11.so.6
-libXext.so.6
-libXi.so.6
-libXinerama.so.1
-libXrandr.so.2
-libXrender.so.1
libXtst.so.6
libatk-1.0.so.0
+libatkmm-1.6.so.1
libc.so.6
libcairo-gobject.so.2
libcairo.so.2
+libcairomm-1.0.so.1
libcrypt.so.1
libcrypto.so.1.1
libdl.so.2
@@ -20,19 +15,27 @@ libfuse.so.2
libgcc_s.so.1
libgdk-3.so.0
libgdk_pixbuf-2.0.so.0
+libgdkmm-3.0.so.1
libgio-2.0.so.0
+libgiomm-2.4.so.1
libglib-2.0.so.0
+libglibmm-2.4.so.1
libgmodule-2.0.so.0
libgobject-2.0.so.0
libgthread-2.0.so.0
libgtk-3.so.0
+libgtkmm-3.0.so.1
libicudata.so.63
libicui18n.so.63
libicuuc.so.63
+libm.so.6
libmspack.so.0
libpango-1.0.so.0
libpangocairo-1.0.so.0
+libpangomm-1.4.so.1
libpthread.so.0
librt.so.1
+libsigc-2.0.so.0
libssl.so.1.1
+libstdc++.so.6
libudev.so.1
diff --git a/vmware-vmblock-fuse.service b/vmware-vmblock-fuse.service
new file mode 100644
index 0000000..9e4d2a3
--- /dev/null
+++ b/vmware-vmblock-fuse.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Open Virtual Machine Tools (vmware-vmblock-fuse)
+ConditionVirtualization=vmware
+
+[Service]
+Type=simple
+RuntimeDirectory=vmblock-fuse
+RuntimeDirectoryMode=755
+ExecStart=/usr/bin/vmware-vmblock-fuse -d -f -o subtype=vmware-vmblock,default_permissions,allow_other /run/vmblock-fuse
+
+[Install]
+WantedBy=multi-user.target
--
2.21.0
1 year, 10 months
[PATCH] Add /usr/share/defaults/etc/profile to be sourced
by Lucius Hu
From: Lucius Hu <lebensterben(a)users.noreply.github.com>
Please disregard my previous submit.
The correct order of profiles to be sourced shall be the default profile
'/usr/share/defaults/etc/profile', the system admin overrides
'/etc/profile', and the per-user profile '$HOME/.profile'.
---
lightdm-session | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lightdm-session b/lightdm-session
index 4a2a25e..6934da9 100644
--- a/lightdm-session
+++ b/lightdm-session
@@ -5,7 +5,7 @@
echo "Running X session wrapper"
# Load profile
-for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
+for file in "/usr/share/defaults/etc/profile" "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
--
2.21.0
1 year, 10 months
[PATCH] Change the order of startup profiles
by Lucius Hu
From: Lucius Hu <lebensterben(a)users.noreply.github.com>
---
data/Xsession.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/data/Xsession.in b/data/Xsession.in
index 110d393..8ac0d92 100755
--- a/data/Xsession.in
+++ b/data/Xsession.in
@@ -30,8 +30,8 @@ command="$@"
echo "$0: Beginning session setup..."
# First read /etc/profile and .profile
-test -f /etc/profile && . /etc/profile
test -f /usr/share/defaults/etc/profile && . /usr/share/defaults/etc/profile
+test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
--
2.21.0
1 year, 10 months
[PATCH] Add /usr/share/defaults/etc/profile to be sourced
by Lucius Hu
This makes the `lightdm-session` to be consistent with `Xsession` of `gdm`.
---
lightdm-session | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lightdm-session b/lightdm-session
index 4a2a25e..d8fa964 100644
--- a/lightdm-session
+++ b/lightdm-session
@@ -5,7 +5,7 @@
echo "Running X session wrapper"
# Load profile
-for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
+for file in "/etc/profile" "/usr/share/defaults/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
--
2.21.0
1 year, 10 months
[PATCH clr-bundles] Make linux-iot-dev real bundles
by Miguel Bernal Marin
---
bundles/linux-iot-lts2018-dev | 7 +++++++
bundles/linux-iot-lts2018-sos-dev | 7 +++++++
packages | 2 --
3 files changed, 14 insertions(+), 2 deletions(-)
create mode 100644 bundles/linux-iot-lts2018-dev
create mode 100644 bundles/linux-iot-lts2018-sos-dev
diff --git a/bundles/linux-iot-lts2018-dev b/bundles/linux-iot-lts2018-dev
new file mode 100644
index 00000000..3186f2f9
--- /dev/null
+++ b/bundles/linux-iot-lts2018-dev
@@ -0,0 +1,7 @@
+# [TITLE]: linux-iot-lts2018-dev
+# [DESCRIPTION]: Files for building modules against IoT LTS2018 kernel.
+# [STATUS]: WIP
+# [CAPABILITIES]:
+# [TAGS]: Developer Tools, kernel
+# [MAINTAINER]: Bernal Marin, Miguel <miguel.bernal.marin(a)linux.intel.com>
+linux-iot-lts2018-dev
diff --git a/bundles/linux-iot-lts2018-sos-dev b/bundles/linux-iot-lts2018-sos-dev
new file mode 100644
index 00000000..1537767e
--- /dev/null
+++ b/bundles/linux-iot-lts2018-sos-dev
@@ -0,0 +1,7 @@
+# [TITLE]: linux-iot-lts2018-sos-dev
+# [DESCRIPTION]: Files for building modules against IoT LTS2018 SOS kernel.
+# [STATUS]: WIP
+# [CAPABILITIES]:
+# [TAGS]: Developer Tools, kernel
+# [MAINTAINER]: Bernal Marin, Miguel <miguel.bernal.marin(a)linux.intel.com>
+linux-iot-lts2018-sos-dev
diff --git a/packages b/packages
index 320eb186..a397e9ad 100644
--- a/packages
+++ b/packages
@@ -17,5 +17,3 @@
#
# This file should remain sorted.
#
-linux-iot-lts2018-dev # programs for developing Linux iot LTS 2018 version
-linux-iot-lts2018-sos-dev # programs for developing Linux iot SOS LTS 2018 version
--
2.21.0
1 year, 10 months
[PATCH clr-bundles] bootloader-extras: add cpio from new kernel
by Miguel Bernal Marin
Add native-current and mainline-vanilla cpio files, and sort names.
---
bundles/bootloader-extras | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/bundles/bootloader-extras b/bundles/bootloader-extras
index 80164344..84a90086 100644
--- a/bundles/bootloader-extras
+++ b/bundles/bootloader-extras
@@ -4,7 +4,13 @@
# [CAPABILITIES]:
# [TAGS]: Security, Tools and Utilities,
# [MAINTAINER]: Hernandez Gutierrez, Josue David <josue.d.hernandez.gutierrez(a)intel.com>
+
+# main package
clr-init
+
+# kernel modules
linux-cpio
-linux-lts2018-cpio
+linux-current-cpio
linux-lts2017-cpio
+linux-lts2018-cpio
+linux-mainline-cpio
--
2.21.0
1 year, 10 months