Repository navigation
Fix Tvheadend and ffmpeg for DMS 7 - #4545
Conversation
|
On the dsm 6.x the version upgrade worked. (probably because the revision number is newer) |
14c5127 to
ce7d822
Compare
|
|
@publicarray I quickly went over this PR and at first glance things looked OK. I'll have another look at it over the week-end and from there might be able to propose experimental package on my github for the community to play with so we get some feedbacks. |
|
I would like to see this merged asap, as ejabberd depends on expat too (#4333). |
a87fb11 to
9490964
Compare
expat: use release archive SynoCommunity#4545 (comment)
9490964 to
8415fcf
Compare
th0ma7
left a comment
There was a problem hiding this comment.
Here's a first review.
Still compiling in the background in the lookout for issues.
|
As for |
|
as #4539 is now on the master branch, you have to remove |
expat: use release archive SynoCommunity#4545 (comment)
0984d46 to
01fb395
Compare
th0ma7
left a comment
There was a problem hiding this comment.
I noticed a few variables needing adjusting in the code below in order to get closer to standard.
Perhaps a bit of it is out of scope of this PR...
But timing would be good I believe to go over them now.
Let me know what you think.
| TRUNC_DIR=$(echo "${REAL_DIR}" | cut -c9-28) | ||
| CHECK_VAR=$(echo "${REAL_DIR}" | cut -c29-32) | ||
| # Replace any remaining target links in log files first | ||
| sed -i -e "s,/var/packages/tvheadend/target,/usr/local/tvheadend,g" "${file}" |
There was a problem hiding this comment.
And here it would be better off using ${SYNOPKG_PKGDEST} par of sed.
There was a problem hiding this comment.
This sed command will work in DSM7 but the path won't be available. Why is it needed anyway? Why can't the app do its thing in /var/packages/tvheadend?
The /usr/local/{package} folder is old DSM5 stuff and not supported on DSM7.
There was a problem hiding this comment.
Honestly I have no clue.
I guess this sed could just be removed entirely.
There was a problem hiding this comment.
I tried to find a sample in SYNOPKG_PKGVAR}/dvr/log but I don't see any. I guess I need to have a receiver and start a recording.(which I don't have)
There was a problem hiding this comment.
But I do :)
Got the following on my DSM6:
root@th0ma7-nas:/var/packages/tvheadend/target/var/dvr# tree -d
.
├── autorec
├── config
└── log
3 directories
Honestly I've been wishing to rework all this for a year but never took the time to do so. The backup/recovery process does not work, period.
- For instance the
/var/packages/tvheadend/target/var/configreferences to/usr/local/tvheadendshould beseded to/var/package/tvheadend(clearly the "binary matches" isn't good in the grep below):
# grep -R "/usr/local/tvheadend" *
Binary file bin/tvheadend matches
var/channel/config/65ab00d40fe4addffdf4babbc3b390d4: "icon": "file://usr/local/tvheadend/.xmltv/",
var/channel/config/f87d3e9167eceb6d6f13e9ab7739f0cb: "icon": "file://usr/local/tvheadend/.xmltv/",
var/channel/config/0cdf1b095014ab7990f9c8569a69270b: "icon": "file://usr/local/tvheadend/.xmltv/",
var/channel/config/1fbe2fe151b5c6d9f555a69ce61af02f: "icon": "file://usr/local/tvheadend/.xmltv/",
var/channel/config/3b1392ac0539b5b4a400b0d81d4e34eb: "icon": "file://usr/local/tvheadend/.xmltv/",
var/config: "chiconpath": "file://usr/local/tvheadend/.xmltv/",
var/config: "muxconfpath": "/usr/local/tvheadend/share/tvheadend/data/dvb-scan/",
- This entire directory (e.g.
/var/packages/tvheadend/target/var) needs to be backup/restored along with creating a recoverysomething-config-backup-date.tar.bzin order to recover as needed.
My personal backup script: https://raw.githubusercontent.com/th0ma7/synology/master/tvheadend-backup.sh - There is a caching directory
/var/packages/tvheadend/target/cachethat needs to be recovered as well. It would benefit from being located elsewhere under/volume1/...from a user defined param at installation time.
# du -hs cache var
24M cache
14M var
- And also having a few scripts & configs that needs to be added manually that I should add to the default package...
BTW, just got my tvheadend and ffmpeg packages ready for DSM7... in theory ready for testing :)
There was a problem hiding this comment.
@publicarray I found what the issue is...
Directories accesscontrol and passwd are now located under /var/packages/tvheadend/target/var -> /volume1/@appstore/tvheadend/var) where the password/a927e30a755504f9784f23a4efac5109 looks like:
{
"enabled": true,
"username": "admin",
"password2": "@password@",
"wizard": true
}
Moving both directories (accesscontrol and passwd) to /var/packages/tvheadend/var -> /volume1/@appdata/tvheadend) then manually fixing the password solved the isse:
mv /volume1/@appstore/tvheadend/var/* /volume1/@appdata/tvheadend/.
wizard_password=$(echo -n "TVHeadend-Hide-${wizard_password:=admin}" | openssl enc -a)
sed -i -e "s/@password@/${wizard_password}/g" /var/packages/tvheadend/var/a927e30a755504f9784f23a4efac5109
EDIT: Thus the issue lies either with the changes of ${SYNOPKG_PKGDEST} vs ${SYNOPKG_PKGVAR}... or how the tvheadend_extra_install part of the Makefile is being done.
There was a problem hiding this comment.
@publicarray reminder on this.
I've looked at compile options but can't see something obvious that allows moving around theses two directories...
I'll try to have another look at it later and see if I can come-up with a fix somehow.
--prefix=DIR$ Installation root [/usr/local]
--bindir=DIR Install binaries in DIR [${prefix}/bin]
--libdir=DIR Install libraries in DIR [${prefix}/lib]
--mandir=DIR Install man pages in DIR [${datadir}/man]
--datadir=DIR Install data files in DIR [${prefix}/share]
There was a problem hiding this comment.
@publicarray and @hgy59 I believe I have found where the issue is.
And may have found a second one actually... or food for thought.
First issue:
It relates to $(STAGING_DIR) where the entire content is being tgz and ends-up being installed over to /var/packages/tvheadend/target/ (appstore). Although it happens that work-*/staging/var containing both accesscontrol and passwd that should follow the $(SYNOPKG_PKGVAR) and end-up into /var/packages/tvheadend/var (appdata) where all the automatically generated files also end-up going.
An idea to circumvent this:
- From the
Makefile, install files understaging/appdatausing a new variable such as$(STAGING_SPKVAR). - installer script go over all files & directories in
staging/appdata. Ifinstalljust copy to/var/packages/tvheadend/varelse perhaps something as trivial as arsyncno-overwrite over the directory (which could be used for all cases actually). Depending of DSM the destination folder is set fromSYNOPKG_PKGVARso it should always work.
Second issue: (not sure about this one)
I wonder if it would make sense to extend solution proposed for the first issue to add variables for $(STAGING_SPKHOME), $(STAGING_SPKETC) and $(STAGING_SPKTEMP) and use rsync to copy files over the end-state location?
There was a problem hiding this comment.
Or a simple work-around is to move the accesscontrol & passwd directory creation and file copying at the service-setup.sh level.
There was a problem hiding this comment.
@hgy59 and @publicarray Got a working solution.
Will provide a separate PR to address this later today.
|
@th0ma7 If you want you can add #4551 to this PR*, so we can see green(er) ✔️ s (I initially thought that it was more difficult, so I did not even attempt it, shame on me :) but good work!) * just checkout this branch and add your commits (I use github's cli: |
|
@publicarray Awesome! There now only |
|
regarding But |
expat: use release archive SynoCommunity#4545 (comment)
expat: use release archive SynoCommunity#4545 (comment)
Based on feedbacks from previous maintainer remove unecessary code to manage faulty root directory recordings. Ref: SynoCommunity#4545 (comment)
th0ma7
left a comment
There was a problem hiding this comment.
I now recall where we left...
Basically the PR was ready, besides this.
Issue is on DSM7: the following files gets installed in /var/packages/tvheadend/target/var while all the tvheadend tree ends-up going under /var/package/tvheadend/var.
As such, it doesn't work as the web server can't find the access and passwd files.
We need #4579 (or any other viable solution) to solve this.
fix ffmpeg (libaom) in newer gcc versions opencv/opencv#10032
pkgverify.cpp:225 Failed to load pkg info, version=[4.3.20201011~9ed76c0-26], correct-format=[^\d+(\.\d+){0,5}(-\d+)?$]
pkgverify.cpp:278 Failed to verify package, spk=[/volume1/@tmp/upload_tmp.122880] result=[{"action":"prepare","beta":false,"betaIncoming":false,"error":{"code":261,"description":"invalid package info content"},"installReboot":false,"package":"tvheadend","packageName":"Tvheadend","stage":"prepare","success":false}]
Based on feedbacks from previous maintainer remove unecessary code to manage faulty root directory recordings. Ref: SynoCommunity#4545 (comment)
|
As this solves all build errors I recommend moving ahead and to merge it. @hgy59 and/or @ymartin59 are you ok with this PR? |
* [ffmpeg] vaapi access fix ffmpeg (libaom) in newer gcc versions opencv/opencv#10032 * chromaprint, comskip, tvheadend: Add to "video-driver" group * libvpc: Apply fix for ARMv5 for all DSM versions for that arch * tvheadend: dsm7 remove commands that require root and remove busybox * tvheadend use archive for faster downloading * tvheadend: revert to githash based file name and update cmake flags * tvheadend: remove ${INST_LOG} and fix shellcheck SC2006 (legacy backticks) * Tvheadend: cleanup service-setup.sh, drop DSM5 support * chromaprint: Fix building on DSM7 * tvheadend: Use PR SynoCommunity#4579 to manage /var content * tvheadend: Enable fontconfig and fix postinst issue * tvheadend: Remove legacy root dir recording fix Based on feedbacks from previous maintainer remove unecessary code to manage faulty root directory recordings. Ref: SynoCommunity#4545 (comment) * tvheadend: fontconfig links are already all good using latest * fix tvh install (as SynoCommunity#4579 is not merged yet) Co-authored-by: Sebastian Schmidt <publicarray> Co-authored-by: Vincent Fortier <[email protected]> Co-authored-by: hgy59 <[email protected]>
Motivation: cherry-picked commits from dsm7-packages branch and added fixes to uriparser and tvheadend version number
Linked issues: #4524
Checklist
all-supportedcompleted successfully