bitbake error does not apply (enforce with -f)? - append

I'm adding new patch to gstreamer-plugin-bad.
I use below command to create my patch.
git diff A B > 0040-forenex-victor.patch
Then I move it to source/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad
After that, I add a line in source/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.%.bbappend
SRC_URI_append = " \
file://0001-gstreamer-gl.pc.in-don-t-append-GL_CFLAGS-to-CFLAGS.patch \
file://0001-gst-plugins-bad-fix-incorrect-wayland-protocols-dir.patch \
file://0001-mpegtsmux-Need-get-pid-when-create-streams.patch \
file://0002-mpeg4videoparse-Need-detect-picture-coding-type-when.patch \
file://0003-mpegvideoparse-Need-detect-picture-coding-type-when-.patch \
file://0004-modifiy-the-videoparse-rank.patch \
file://0005-glfilter-Lost-frame-rate-info-when-fixate-caps.patch \
file://0006-camerabin-Add-one-property-to-set-sink-element-for-v.patch \
file://0007-Fix-for-gl-plugin-not-built-in-wayland-backend.patch \
file://0008-Support-fb-backend-for-gl-plugins.patch \
file://0009-Change-wayland-default-res-to-1024x768.patch \
file://0010-gl-wayland-fix-loop-test-hang-in-glimagesink.patch \
file://0011-Fix-glimagesink-wayland-resize-showed-blurred-screen.patch \
file://0012-Add-directviv-to-glimagesink-to-improve-playback-per.patch \
file://0013-MMFMWK-6930-glplugin-Accelerate-gldownload-with.patch \
file://0014-support-video-crop-for-glimagesink.patch \
file://0015-Add-fps-print-in-glimagesink.patch \
file://0016-glcolorconvert-convert-YUV-to-RGB-use-directviv.patch \
file://0017-glwindow-work-around-for-no-frame-when-imxplayer-use.patch \
file://0018-glcolorconvert-fix-MRT-cannot-work-in-GLES3.0.patch \
file://0019-qmlglplugin-Add-i.mx-specific-code.patch \
file://0020-videocompositor-Remove-output-format-alpha-check.patch \
file://0021-Add-ion-memory-support-for-glupload.patch \
file://0022-Add-ion-dmabuf-support-in-gldownload.patch \
file://0023-qmlglsrc-some-enhancements-for-qmlglsrc.patch \
file://0025-opencv-Add-video-stitching-support-based-on-Open-CV.patch \
file://0026-player-Add-configuration-for-enabling-accurate-seeks.patch \
file://0027-player-Add-get-track-number-media-info-API.patch \
file://0028-Specific-patches-for-gstplayer-API.patch \
file://0029-player-Add-overlayvideorenderer-video-sink.patch \
file://0030-player-Add-get-video-snapshot-API.patch \
file://0032-gstplayer-Add-gst_player_get_state-API.patch \
file://0033-gstplayer-Add-play-stop-sync-API.patch \
file://0035-Fix-6slevk-build-break-when-egl-is-disabled.patch \
file://0036-gst-player-fix-gst-player-failed-to-load-external-su.patch \
file://0037-opencv-allow-compilation-against-3.2.0.patch \
file://0038-MMFMWK-7554-glupload-fix-memory-leak-when-use-a-GVal.patch \
file://0039-glupload-passthrough-composition-caps-features-in-ph.patch \
file://0040-forenex-victor.patch \
"
However, when I bitbake fsl-image-qt5 I got below error.
WARNING: /mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta-sdk/recipes-fsl/images/fsl-image-qt5.bb.do_compile is tainted from a forced run | ETA: 0:00:09
WARNING: /mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta- bsp/recipes-kernel/linux/linux-imx_4.9.11.bb.do_compile is tainted from a forced run
Initialising tasks: 100% |############################################################################### ################################################################################ #####################################| Time: 0:00:12
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: gstreamer1.0-plugins-bad-1.10.4-r0 do_patch: Command Error: 'quilt -- quiltrc /mnt/raid/forenex/yocto2.4/build-wayland-q/tmp/sysroots/x86_64- linux/etc/quiltrc push' exited with 0 Output:
Applying patch 0040-forenex-victor.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/avfvideosrc.m b/oriavfvideosrc.m
|index fdb7b49..4955953 100644
|--- a/avfvideosrc.m
|+++ b/oriavfvideosrc.m
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
Patch 0040-forenex-victor.patch does not apply (enforce with -f)
ERROR: gstreamer1.0-plugins-bad-1.10.4-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /mnt/raid/forenex/yocto2.4/build-wayland-q/tmp/work/cortexa9hf-neon-mx6qdl-poky-linux-gnueabi/gstreamer1.0- plugins-bad/1.10.4-r0/temp/log.do_patch.11145
ERROR: Task (/mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb:do_patch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5943 tasks of which 5942 didn't need to be rerun and 1 failed.
Summary: 1 task failed:
/mnt/raid/forenex/yocto2.4/sources/meta-fsl-bsp-release/imx/meta- bsp/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.10.4.bb:do_patch
Summary: There were 2 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
Did I miss anything?

Your steps are correct, however I doubt the way you are generating the patch. You seem to have copied the original file and made changes to original file and then diffing the two. I think an easier way would be to use quit process to generate the patch as described here

Related

Google - Shaka | Deleting SegmentTimeline in manifest.mpd after restart container

Shaka is running inside docker container. When I restarted container, SegmentTimeline part in manifest.mpd file deleting. Is possible appending old SegmentTimeline to new manifest.mpd file or recover it when I restarted?
Operating System:
NAME="CentOS Linux"
VERSION="7 (Core)"
Shaka Packager Version:
google/shaka-packager:v2.5.1
You can find out my configuration file below:
CH_PATH=/some/path/$CH_NAME
/usr/bin/packager \
'in=udp://127.0.0.1:'$PORT',stream=audio,init_segment='$CH_PATH'/audio_init.m4s,segment_template='$CH_PATH'/audio_$Time$.m4s' \
'in=udp://127.0.0.1:'$PORT',stream=video,init_segment='$CH_PATH'/h264_360p_init.m4s,segment_template='$CH_PATH'/h264_360p_$Time$.m4s' \
'in=udp://127.0.0.1:'$(($PORT + 1))',stream=video,init_segment='$CH_PATH'/h264_540p_init.m4s,segment_template='$CH_PATH'/h264_540p_$Time$.m4s' \
'in=udp://127.0.0.1:'$(($PORT + 2))',stream=video,init_segment='$CH_PATH'/h264_720p_init.m4s,segment_template='$CH_PATH'/h264_720p_$Time$.m4s' \
'in=udp://127.0.0.1:'$(($PORT + 3))',stream=video,init_segment='$CH_PATH'/h264_1080p_init.m4s,segment_template='$CH_PATH'/h264_1080p_$Time$.m4s' \
--enable_widevine_encryption \
--key_server_url ************ \
--content_id ********** \
--signer ********** \
--aes_signing_key ************ \
--aes_signing_iv ************* \
--mpd_output $CH_PATH/manifest.mpd \
--hls_playlist_type LIVE \
--hls_master_playlist_output $CH_PATH/mn.m3u8 \
--time_shift_buffer_depth 43200 \
--preserved_segments_outside_live_window 43200

Vault plugin error: unable to determine plugin type

I am getting this error:
Error writing data to sys/plugins/catalog/example-auth-plugin: Error making API request.
URL: PUT http://127.0.0.1:1234/v1/sys/plugins/catalog/example-auth-plugin
Code: 500. Errors:
* 1 error occurred:
* unable to determine plugin type
After running this command:
# vault write sys/plugins/catalog/example-auth-plugin \
> sha_256="${SHA256}" \
> command="vault-auth-plugin-example"
I am running everything in a container.
podman run \
--rm \
--cap-add=IPC_LOCK \
-p '8200:8200' \
-e 'VAULT_ADDR=127.0.0.1:1234' \
-e 'VAULT_DEV_LISTEN_ADDRESS=127.0.0.1:1234' \
-v './data/:/var/lib/vault' \
-v './code/vault-auth-plugin-example:/etc/vault/plugins/vault-auth-plugin-example' \
-e 'VAULT_LOCAL_CONFIG={"backend": {"file": {"path": "/vault/file"}}, "log_level": "debug", "disable_mlock": true, "listener": [{"tcp": {"tls_disable": true}}], "plugin_directory": "/etc/vault/plugins/", "default_lease_ttl": "168h", "max_lease_ttl": "720h"}' \
--name=dev-pam-vault \
vaultplugin
Vault version: Vault v1.3.0
I did run this command first:
export SHA256=$(shasum -a 256 "/etc/vault/plugins/vault-auth-plugin-example" | cut -d' ' -f1)
I also tried:
# vault write sys/plugins/catalog/example-auth-plugin \
> sha_256="${SHA256}" \
> command="vault-auth-plugin-example"
But then I get this error:
Error writing data to sys/plugin/catalog/example-auth-plugin: Error making API request.
URL: PUT http://127.0.0.1:1234/v1/sys/plugin/catalog/example-auth-plugin
Code: 404. Errors:
* 1 error occurred:
* unsupported path
Any ideas?
Thank you in advance.

Build all packages for an image

Is it possible to build all of the packages for a specific image? I know I can build packages individually, but ideally would like to build all of them at once, through a single command.
Alternatively, is there a way to prevent the do_rootfs task from being executed for a particular image.
Cheers, Donal
First make an image that contains a packagegroup (or just list your dependencies there).
$ cat sources/meta-custom/recipes-custom/images/only-packages-image.bb
SUMMARY = "All dependencies no image"
LICENSE = "CLOSED"
version = "##DISTRO_VERSION##"
BB_SCHEDULER = "speed"
# option 1 - packagegroup, package list can be reused in real image
CORE_IMAGE_BASE_INSTALL += "\
packagegroup_all-depends \
"
# option 2 - list deps here, package list can not be reused in real image
CORE_IMAGE_BASE_INSTALL += "\
lshw \
systemd \
cronie \
glibc \
sqlite \
bash \
python3-dev \
python3-2to3 \
python3-misc \
python3-pyvenv \
python3-modules \
python3-pip \
wget \
apt \
pciutils \
file \
tree \
\
wpa-supplicant \
dhcpcd \
networkmanager \
curl-dev \
curl \
hostapd \
iw \
"
# remove the rootfs step
do_rootfs() {
}
Second make your packagegroup if you opted to reuse the list of packages
$ cat sources/meta-custom/recipes-custom/packagegroups/packagegroup-alldeps.bb
PACKAGE_ARCH = "${MACHINE_ARCH}"
inherit packagegroup
RDEPENDS_${PN} = " \
lshw \
systemd \
cronie \
glibc \
sqlite \
bash \
python3-dev \
python3-2to3 \
python3-misc \
python3-pyvenv \
python3-modules \
python3-pip \
wget \
apt \
pciutils \
file \
tree \
\
wpa-supplicant \
dhcpcd \
networkmanager \
curl-dev \
curl \
hostapd \
iw \
"
Finally build your new image placeholder
$ bitbake only-packages-image
In Yocto >=4.0 this is actually pretty easy to achieve. The packagegroup method did not work for me at all.
I don't know if this works in older versions though.
Create a new file in your custom layer, e.g. meta-custom/classes/norootfs.bbclass and put the following lines in there (as far as I noticed the order does not matter):
deltask do_deploy
deltask do_image
deltask do_rootfs
deltask do_image_complete
deltask do_image_setscene
then in your meta-custom/recipes-core/images/myimage.bb add norootfs to your other inherit commands
e.g. the most basic one
inherit core-image norootfs
You will notice your number of tasks decreasing by a fair amount (mine from ~4700 to ~3000) and there is no complete rootfs image anymore in build/tmp/deploy/images, except for bzImage and modules, just the plain ipk files in build/tmp/deploy/ipk.
I got this information by looking at https://docs.yoctoproject.org/ref-manual/tasks.html?highlight=do_image and .bbclass files in meta/classes where deltask is frequently used.

During SDK build: environment-setup.d/ conflicts between attempted installs

I am trying to build an image for beaglebone that contains Qt5, as well as generate the SDK for this image.
Problem
my problem is, that the build fails the do_populate_sdk task to create the SDK with the following error:
Error: Transaction check error:
file /opt/poky/2.3.1/sysroots/x86_64-pokysdk-linux/environment-setup.d conflicts between attempted installs of nativesdk-cmake-3.7.2-r0.x86_64_nativesdk and nativesdk-qtbase-tools-5.8.0+git0+49dc9aa409-r0.x86_64_nativesdk
A little further up the stream I encountered the following error message:
ERROR: Could not invoke dnf. Command '/home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my_machine-poky-linux-gnueabi/my-image-dev/1.0-r0/recipe-sysroot-native/usr/bin/dnf [...] ' returned 1:
Added oe-repo repo from file:///home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my-machine-poky-linux-gnueabi/my-image-dev/1.0-r0/oe-rootfs-repo.
Last metadata expiration check: 0:00:00 ago on Wed Aug 16 11:47:27 2017 UTC.
Dependencies resolved.
What I have
To configure my image I followed the advice here as well as similar posts stating the same elsewhere on the web. This is my (shortened and slightly redacted) image bb-file:
SUMMARY = "..."
LICENSE = "MIT"
IMAGE_LINGUAS = "en-us"
inherit core-image
# for populate_sdk to create a valid toolchain
inherit populate_sdk populate_sdk_qt5
CORE_OS = "..."
KERNEL_EXTRA_INSTALL = "..."
WIFI_SUPPORT = "..."
DEV_SDK_INSTALL = " \
binutils \
binutils-symlinks \
coreutils \
cpp \
cpp-symlinks \
diffutils \
file \
g++ \
g++-symlinks \
gdb \
gdbserver \
gcc \
gcc-symlinks \
gettext \
git \
ldd \
libstdc++ \
libstdc++-dev \
libtool \
make \
perl-modules \
pkgconfig \
python-modules \
python3-modules \
"
DEV_EXTRAS = "..."
EXTRA_TOOLS_INSTALL = " \
acpid \
bc \
bzip2 \
cursor-blink \
devmem2 \
dosfstools \
emmc-installer \
ethtool \
findutils \
i2c-tools \
iperf3 \
htop \
less \
memtester \
nano \
netcat \
procps \
rsync \
sysfsutils \
tcpdump \
unzip \
util-linux \
util-linux-blkid \
wget \
zip \
"
MQTT = "..."
ROOTFS_POSTPROCESS_COMMAND += "..."
QT_TOOLS = " \
qtbase \
qtbase-dev \
qtbase-mkspecs \
qtbase-plugins \
qtbase-tools \
qtserialport-dev \
qtserialport-mkspecs \
qt5-env \
"
QT5_PKGS = " \
qt3d \
qt3d-dev \
...
qtxmlpatterns \
qtxmlpatterns-dev \
qtxmlpatterns-mkspecs \
"
FONTS = "..."
TSLIB = "... "
ADDITIONAL_PKGS = "..."
QT_TEST_APPS = "..."
IMAGE_INSTALL += " \
${CORE_OS} \
${DEV_SDK_INSTALL} \
${DEV_EXTRAS} \
${EXTRA_TOOLS_INSTALL} \
${KERNEL_EXTRA_INSTALL} \
${FONTS} \
${QT_TOOLS} \
${QT5_PKGS} \
${QT_TEST_APPS} \
${MQTT} \
${WIFI_SUPPORT} \
${TSLIB} \
${ADDITIONAL_PKGS} \
"
IMAGE_FEATURES_append = " dev-pkgs"
export IMAGE_BASENAME = "my-image-dev"
I also set DISTRO_FEATURES_remove = "busybox x11 wayland" as well as DISTRO_FEATURES_append = " systemd opengl aufs" in my local.conf.
The build runs fine if I remove the inherit populate_sdk_qt5 line, but of course I don't get make for my SDK in this case.
What I found out
I found different people having the same problem (example here) but no-one ever got an answer.
I checked the nativesdk-cmake as well as the nativesdk-qtbase_git recipes (both unchanged standards) to see where the files get created, and neither looks problematic to me:
natives-qtbase_git.bb:
fakeroot do_generate_qt_environment_file() {
mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d/
script=${D}${SDKPATHNATIVE}/environment-setup.d/qt5.sh
echo 'export PATH=${OE_QMAKE_PATH_HOST_BINS}:$PATH' > $script
echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script
echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script
echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script
echo 'export OE_QMAKE_CC=$CC' >> $script
echo 'export OE_QMAKE_CXX=$CXX' >> $script
echo 'export OE_QMAKE_LINK=$CXX' >> $script
echo 'export OE_QMAKE_AR=$AR' >> $script
echo 'export QT_CONF_PATH=${OE_QMAKE_PATH_HOST_BINS}/qt.conf' >> $script
echo 'export OE_QMAKE_LIBDIR_QT=`qmake -query QT_INSTALL_LIBS`' >> $script
echo 'export OE_QMAKE_INCDIR_QT=`qmake -query QT_INSTALL_HEADERS`' >> $script
echo 'export OE_QMAKE_MOC=${OE_QMAKE_PATH_HOST_BINS}/moc' >> $script
echo 'export OE_QMAKE_UIC=${OE_QMAKE_PATH_HOST_BINS}/uic' >> $script
echo 'export OE_QMAKE_RCC=${OE_QMAKE_PATH_HOST_BINS}/rcc' >> $script
echo 'export OE_QMAKE_QDBUSCPP2XML=${OE_QMAKE_PATH_HOST_BINS}/qdbuscpp2xml' >> $script
echo 'export OE_QMAKE_QDBUSXML2CPP=${OE_QMAKE_PATH_HOST_BINS}/qdbusxml2cpp' >> $script
echo 'export OE_QMAKE_QT_CONFIG=`qmake -query QT_INSTALL_LIBS`${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script
echo 'export OE_QMAKE_PATH_HOST_BINS=${OE_QMAKE_PATH_HOST_BINS}' >> $script
echo 'export QMAKESPEC=`qmake -query QT_INSTALL_LIBS`${QT_DIR_NAME}/mkspecs/linux-oe-g++' >> $script
# Use relocable sysroot
sed -i -e 's:${SDKPATHNATIVE}:$OECORE_NATIVE_SYSROOT:g' $script
}
cmake-3.7.2.bb:
do_install_append_class-nativesdk() {
mkdir -p ${D}${datadir}/cmake
install -m 644 ${WORKDIR}/OEToolchainConfig.cmake ${D}${datadir}/cmake/
mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d
install -m 644 ${WORKDIR}/environment.d-cmake.sh ${D}${SDKPATHNATIVE}/environment-setup.d/cmake.sh
}
environment.d-cmake.sh:
alias cmake="cmake -DCMAKE_TOOLCHAIN_FILE=$OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake"
For the sake of trying I went ahead and executed the
/home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my_machine-poky-linux-gnueabi/my-image-dev/1.0-r0/recipe-sysroot-native/usr/bin/dnf
script from
/home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my_machine-poky-linux-gnueabi/my-image-dev/1.0-r0/recipe-sysroot-native
which got me the following error message:
Traceback (most recent call last):
File "/home/ubuntu/workspace/bbb/build-toaster-2/tmp/work/my-machine-poky-linux-gnueabi/my-image-dev/1.0-r0/recipe-sysroot-native/usr/bin/dnf.real", line 57, in <module>
from dnf.cli import main
ImportError: No module named 'dnf'
The dnf module seems to exist though:
<path as above>/recipe-sysroot-native$ find -name dnf
./usr/lib/python3.5/site-packages/dnf
./usr/bin/dnf
./etc/dnf
./etc/bash_completion.d/dnf
./etc/logrotate.d/dnf
Can you see anything that I am doing wrong? I am absolutely clueless...
I'm building an SDK with cmake and Qt5 without any problem...
Your issue seems to stem from dnf, and as I'm building with ipk without any issue, there might very well be a bug in the rpm handling in OpenEmbedded.
Could you try to rebuild with:
PACKAGE_CLASSES = "package_ipk"
in your local.conf and see it that helps?
Edit:
Anders' answer provides a more elegant solution by switching the packaging class. If you can, check out his approach before trying this workaround.
I found a workaround that worked for me but is no ideal solution. I am posting it anyway, in case it helps someone:
I figured out, that the nativesdk-cmake package somehow collided with the Qt one. Therefor I created a nativesdk-packagegroup-sdk-host.bbappend file in my custom layer, with the following content:
RDEPENDS_${PN}_remove = "\
nativesdk-cmake \
"
This removes the cmake dependency from the SDK build, which works for my purposes. But this merely solves the symptoms not the problem. So I am glad for any other solution.
Just try and add DIRFILES = "" in nativesdk-qtbase.bb (you should rather set up a clean and tidy nativesdk-qtbase.bbappend in your custom layer with DIRFILES = "").
This works around clashes due to RPM directory ownership for this RPM, which is a default policy in standard RPM packaging. See package_rpm.bbclass for details # python write_specfile () { .... walk_files method.
Note: DIRFILES must be defined but left empty for this to work on the current package.
Voila.
Cheers.
As so61pi mentioned, RPM has strict checking for files/directories. In my case, after installing nativesdk-qtbase the environment.d folder had permissions 775 whereas nativesk-cmake created that same folder with 755.
I don't know if this was caused due to the fact that the function generate_qt_environment_file is being executed in a fakeroot environment, but I fixed it by adding its function body to the do_install function and removing generate_qt_environment_file.
Not sure if this is the correct fix though. I noticed some other recipes use the fakeroot keyword and others don't. I wonder why...
RPM has strict checking for files/directories. environment-setup.d directory in your question may have different mode or user between the 2 packages.
You could check function rpmfilesCompare for the exact checks that RPM performs.

post-commit mails using gmail (SVN)

I've spent a lot of time yet. But I'm still stuck.
I run Ubuntu 12.04.
I have set up SVN and it's working fine. Now I want to send nice E-Mails on each commit, so I installd svnnotify and applied the --css-inlne patch. (post).
Less secure access is on, I can send E-Mails using phpmailer.
After many hours spent on googleing I ask you.
I've tried the following:
post-commit:
#!/bin/sh
REV=$2
REPO=$1
/usr/local/bin/trac-admin /var/www/trac/htdocs/share changeset added "svn" $REV
# email notifications for commits
/usr/bin/svnnotify --repos-path "$REPO" --revision "$REV" \
--smtp smtp.gmail.com \
--smtp-port 587 \
--smtp-user noreply#donbolli.ch \
--smtp-pass pass \
--smtp-tls \
--to receiver#gmail.com \
--from noreply#donbolli.ch \
--with-diff \
--subject-cx \
--subject-prefix 'Share: ' \
--handler HTML::ColorDiff \
--css-inline
2>&1 &
exit 0
Results in:
donbolli#luna585:~$ ./post-commit /var/www/svn/share 9
Couldn't start TLS: SSL connect attempt failed because of handshake problems error:1409442E:SSL routines:SSL3_READ_BYTES:tlsv1 alert protocol version
at /usr/share/perl5/SVN/Notify.pm line 2390.
So I was looking for this error, but found nothing.
So I tried another approach
post-commit:
#!/bin/sh
REV=$2
REPO=$1
/usr/local/bin/trac-admin /var/www/trac/htdocs/share changeset added "svn" $REV
# email notifications for commits
/usr/bin/svnnotify --repos-path "$REPO" --revision "$REV" \
--sendmail /home/donbolli/sendmail.py \
--to receiver#gmail.com \
--from noreply#donbolli.ch \
--with-diff \
--subject-cx \
--subject-prefix 'Share: ' \
--handler HTML::ColorDiff \
--css-inline
2>&1 &
exit 0
Results in
donbolli#luna585:~$ ./post-commit /var/www/svn/share 9
Can't exec "/home/donbolli/sendmail.py": No such file or directory at /usr/share/perl5/SVN/Notify.pm line 2332.
Cannot exec /home/donbolli/sendmail.py: No such file or directory
But the file exists (and is 755)
donbolli#luna585:~$ cat /home/donbolli/sendmail.py
#!/usr/bin/perl
use MIME::Lite;
use Net::SMTPS;
my $msg = MIME::Lite ->new (
From => 'noreply#donbolli.ch',
To => 'receiver#gmail.com',
Type => 'text/html; charset=UTF-8'
);
...
my post-commit;
#!/bin/sh
REV=$2
REPO=$1
/usr/local/bin/trac-admin /var/www/trac/htdocs/share changeset added "svn" $REV
# email notifications for commits
/usr/bin/svnnotify --repos-path "$REPO" --revision "$REV" \
--sendmail /usr/sbin/sendmail \
--to recriver#gmail.com \
--from noreply#donbolli.ch \
--with-diff \
--subject-cx \
--subject-prefix 'Share: ' \
--handler HTML::ColorDiff \
--css-inline
2>&1 &
exit 0
Works after I followed the sendmail instructions.
Thanks to xxfelixxx
install sendmail