solettaproject / soletta-dev-app

Soletta Development Application
Apache License 2.0
7 stars 13 forks source link

patch task fails while 'bitbake soletta-dev-app' #122

Closed js333031 closed 8 years ago

js333031 commented 8 years ago

meta-soletta = "master:0c6cb1aa7e6b79f61a940b0b6f95424981681d97"

NOTE: Preparing RunQueue NOTE: Checking sstate mirror object availability (for 112 objects) NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks ERROR: soletta-dev-app-1_beta9-r0 do_patch: Command Error: 'quilt --quiltrc /media/development/edison/yocto/ostro/ostro-os/build/tmp-glibc/sysroots/x86_64-linux/etc/quiltrc push' exited with 1 Output: Applying patch 0001-Add-firewall-rules-to-allow-access.patch patching file scripts/units/soletta-dev-app-server.service.in Hunk #1 FAILED at 3. 1 out of 1 hunk FAILED -- rejects in file scripts/units/soletta-dev-app-server.service.in Patch 0001-Add-firewall-rules-to-allow-access.patch does not apply (enforce with -f) ERROR: soletta-dev-app-1_beta9-r0 do_patch: Function failed: patch_do_patch ERROR: Logfile of failure stored in: /media/development/edison/yocto/ostro/ostro-os/build/tmp-glibc/work/edison-ostro-linux/soletta-dev-app/1_beta9-r0/temp/log.do_patch.14428 ERROR: Task 1 (/media/development/edison/yocto/ostro/ostro-os/meta-soletta/recipes-soletta/dev-app/soletta-dev-app_git.bb, do_patch) failed with exit code '1'

js333031 commented 8 years ago

I worked around this issue by modifying ./tmp-glibc/work/edison-ostro-linux/soletta-dev-app/1_beta9-r0/soletta-dev-app/scripts/units/soletta-dev-app-server.service.in

Change to that file is addition of 1> /dev/null 2>&1 to this line: ExecStart=/usr/bin/NODE_BIN_NAME PATH/server/app.js 1> /dev/null 2>&1

js333031 commented 8 years ago

My systemd script now looks like below. Otherwise, iptables wasn't running at right time, resulting in external connections being blocked by firewall on Ostro.

[Unit] Description=Run Soletta Development Application server Wants=network-online.target After=network.target network-online.target

[Service]

StandardOutput=null

ExecStartPre=/usr/sbin/iptables -w -A INPUT -p tcp --dport 80 -j ACCEPT ExecStartPre=/usr/sbin/ip6tables -w -A INPUT -p tcp --dport 80 -j ACCEPT

ExecStart=/usr/bin/node /opt/soletta-dev-app/server/app.js 1> /dev/null 2>&1

ExecStart=/usr/bin/node /opt/soletta-dev-app/server/app.js ExecStopPost=/usr/sbin/iptables -w -D INPUT -p tcp --dport 80 -j ACCEPT ExecStopPost=/usr/sbin/ip6tables -w -D INPUT -p tcp --dport 80 -j ACCEPT Environment="NODE_ENV=production"

[Install] WantedBy=multi-user.target root@edison:~#

brunobottazzini commented 8 years ago

@js333031,

I have opened the PR https://github.com/ostroproject/meta-ostro/pull/215 in Ostro to fix this patch problem.

Thank you very much

brunobottazzini commented 8 years ago

Hello @js333031 the patch https://github.com/ostroproject/meta-ostro/pull/215/files was merged.

And the next update in https://github.com/ostroproject/ostro-os should fix this issue