Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: FreeBSD port

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    12

    FreeBSD port

    Hi all,

    I've been working with others on finally bringing the FreeBSD port up to date. The code is now synced up to September 30th, but we're seeing issues whenever a scan is instigated. The following is the log from a scan:

    Code:
    [16-10-11 16:18:01.5167] main::main (205) Starting Logitech Media Server scanner (v7.9.0, TRUNK, UNKNOWN) perl 5.020003
    [16-10-11 16:18:01.5713] Slim::Schema::Storage::throw_exception (122) Error: DBI Exception: DBD::SQLite::db do failed: SQL logic error or missing database
    cannot ATTACH database within transaction [for Statement "ATTACH '/var/db/logitechmediaserver/cache/persist.db' AS persistentdb"]
    [16-10-11 16:18:01.5715] Slim::Schema::Storage::throw_exception (122) Backtrace:
    
       frame 0: Slim::Utils::Log::logBacktrace (/usr/local/share/logitechmediaserver/Slim/Schema/Storage.pm line 122)
       frame 1: Slim::Schema::Storage::throw_exception (/usr/local/share/logitechmediaserver/CPAN/DBIx/Class/Storage/DBI.pm line 1007)
       frame 2: DBIx::Class::Storage::DBI::__ANON__ (/usr/local/share/logitechmediaserver/CPAN/DBIx/Class/Storage/DBI.pm line 974)
       frame 3: DBIx::Class::Storage::DBI::_do_query (/usr/local/share/logitechmediaserver/CPAN/DBIx/Class/Storage/DBI.pm line 945)
       frame 4: DBIx::Class::Storage::DBI::connect_call_do_sql (/usr/local/share/logitechmediaserver/CPAN/DBIx/Class/Storage/DBI.pm line 927)
    The file is definitely there:

    -rw-r--r-- 1 slimserv slimserv 3105792 17 Sep 23:15 /var/db/logitechmediaserver/cache/persist.db

    I also have a full collection, which I populated in the last revision of the port which was running at 7.7.5, so I know the database is working.

    The full log is here, in case it helps http://pastebin.com/g34QfaGr

    Does anyone have any ideas of where we should be looking to fix this? It seems to be affecting all users at the moment.

    Regards,

    Mark

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,872

    FreeBSD port

    > I've been working with others on finally bringing the FreeBSD port up to

    Are your modifications/additions available somewhere?

    > date. The code is now synced up to September 30th, but we're seeing
    > issues whenever a scan is instigated. The following is the log from a
    > scan:


    Does this problem only show up in the scanner?

    > [16-10-11 16:18:01.5167] main::main (205) Starting Logitech Media Server scanner (v7.9.0, TRUNK, UNKNOWN) perl 5.020003


    You should add a "Slim::Utils::OS::Custom" module to customize some of
    the LMS behaviour and eg. report revision etc.

    > The file is definitely there:
    >
    > -rw-r--r-- 1 slimserv slimserv 3105792 17 Sep 23:15
    > /var/db/logitechmediaserver/cache/persist.db


    Is the scanner run as the same slimserv(er|ice) user?

    --

    Michael

  3. #3
    Junior Member
    Join Date
    Sep 2012
    Posts
    12

    > Are your modifications/additions available somewhere?


    Sure, they're in the official repo unfortunately, this was missed when testing the 7.7.5 upgrade which was never released.

    https://github.com/freebsd/freebsd-p...echmediaserver


    > Does this problem only show up in the scanner?


    Yes, as far as I know. I was running the scanner from the front end using the rescan button. I guess others were doing the initial scan, as they would not have a database in place as they have not been running 7.7.5. Other functionality seems fine, I'm able to serve files over dnla and to my Squeezebox touch. Also able to control the Squeezebox.


    > You should add a "Slim::Utils::OS::Custom" module to customize some of
    > the LMS behaviour and eg. report revision etc.


    Will take a look at it. The revisions currently in the build are:

    Code:
    Logitech:slimserver:c835a1f 
    Logitech:slimserver-vendor:14cc392:vendor

    > Is the scanner run as the same slimserv(er|ice) user?


    Nothing explicit has been done to set a user for slimserv. If it's triggered from the server, e.g. via the GUI, or in initial setup, I would expect it to be running as slimserv.


    Mark

  4. #4
    Junior Member
    Join Date
    May 2016
    Posts
    6
    > Are your modifications/additions available somewhere?

    The FreeBSD port (which includes patch, build, install instructions) is available at the GitHub link provided above by Mark.

    For those who aren't familiar with FreeBSD ports, I will explain how the current port Makefile works:
    • Installs dependencies defined in BUILD_DEPENDS, LIB_DEPENDS and USES variables
    • Downloads source from GitHub for Logitech/slimserver and Logitech/slimserver-vendor
    • Extracts Logitech/slimserver to directory ${WRKSRC} and Logitech/slimserver-vendor to directory ${WRKSRC_vendor}
    • patches ${WRKSRC} with all patches from files/patch-* and ${WRKSRC_vendor} with patches from file files/vendorpatch-*
    • Builds slimserver-vendor dependencies with cd ${WRKSRC_vendor}/CPAN && ./buildme.sh
    • Installs slimserver files by copying the entire ${WRKSRC} directory to a staging directory
    • Deletes any files/directories from the staging directory which are for a different version of perl or binaries / perl modules for other operating systems
    • Creates a symlink at /var/db/logitechmediaserver which points to INSTALLDIR/Cache
    • Installs configuration files, creating a CONFFILE.sample default version and CONFFILE user editable version
    • Installs INSTALLDIR/Slim/Utils/OS/Custom.pm and INSTALLDIR/custom-convert.conf (found in the port files/ directory)
    • Installs logfile rotating instructions in /usr/local/etc/newsyslog.conf.d/logitechmediaserver.conf (found in the port files/ directory)
    • Ensures INSTALLDIR/Bin/dbish is installed as an executable script
    • Installs slimserver_vendor built dependencies by copying directory ${WRKSRC_vendor}/CPAN/build/arch to INSTALLDIR/CPAN/arch
    • Installs remaining slimserver_vendor built dependencies by copying all contents of ${WRKSRC_vendor}/CPAN/build/5.20/lib/perl5/* into INSTALLDIR/CPAN/arch/5.20/
    • Installs changelog, installation instructions and license details to /usr/local/share/doc/logitechmediaserver/


    The final list of files installed can be seen here (note that variables surrounded by %% are replaced by the ports system):
    https://github.com/freebsd/freebsd-p...rver/pkg-plist

    > You should add a "Slim::Utils::OS::Custom" module to customize some of the LMS behaviour and eg. report revision etc.

    The port already does this. See the file contents here:
    https://github.com/freebsd/freebsd-p...s/Custom.pm.in

    Note that any variables surrounded with %% are replaced by the correct values by the port.

    > Is the scanner run as the same slimserv(er|ice) user?

    The rc script which starts the slimserver.pl perl script is executed with the arguments --user=${u} --group=${g} (which equates to the dedicated user/group "slimserv" in the default port installation).
    Not sure if the slimserver.pl script calls the scanner.pl script as the same user or not?
    https://github.com/freebsd/freebsd-p...mediaserver.in

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,872

    FreeBSD port

    >> You should add a "Slim::Utils::OS::Custom" module to customize some of
    > the LMS behaviour and eg. report revision etc.
    >
    > The port already does this. See the file contents here:
    > https://github.com/freebsd/freebsd-p...s/Custom.pm.in
    >
    > Note that any variables surrounded with %% are replaced by the correct
    > values by the port.


    You should probably try to populate a revisions.txt file in the
    installations root folder to get rid of the "TRUNK@UNKNOWN" in the
    information page.

    As for the initial question: you asked why the scanner was failing with
    some transaction related error, when you do apply a patch to change the
    autocommit mode. Maybe you should remove that patch and come back with
    the problem you tried to resolve there?...

    --

    Michael

  6. #6
    Quote Originally Posted by mherger View Post
    As for the initial question: you asked why the scanner was failing with
    some transaction related error, when you do apply a patch to change the
    autocommit mode. Maybe you should remove that patch and come back with
    the problem you tried to resolve there?...
    I just moved "patch-dbix-class-bug.diff" out of the way, this is the patch that disabled "auto commit" mode. It looks like this has resolved the issue on my system

  7. #7
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    19,872

    FreeBSD port

    > I just moved "patch-dbix-class-bug.diff" out of the way, this is the
    > patch that disabled "auto commit" mode. It looks like this has resolved
    > the issue on my system


    Surprise, surprise :-). Thanks for testing.

    --

    Michael

  8. #8
    Junior Member
    Join Date
    Sep 2012
    Posts
    12
    Quote Originally Posted by mherger View Post

    > I just moved "patch-dbix-class-bug.diff" out of the way, this is the[color=blue]

    Surprise, surprise :-). Thanks for testing.
    Thanks for the help, that patch was inherited from the old port - we left it in as it was assumed to be there for a good reason. In this case that apparently no longer applies.

    Mark

  9. #9
    Junior Member
    Join Date
    May 2016
    Posts
    6

    [RESOLVED] Removed patch-dbix-class-bug.diff

    patch-dbix-class-bug.diff has been removed from the FreeBSD port in the commit below:
    https://svnweb.freebsd.org/ports?vie...evision=423998

    Thanks for your help troubleshooting this one!

  10. #10
    Senior Member
    Join Date
    Dec 2009
    Location
    Hilden, Germany
    Posts
    135
    Anything new about this?

    I still get CPAN errors:
    Code:
    ===>  Installing for logitechmediaserver-7.9.1.g2017.07.11
    ===>  Checking if logitechmediaserver already installed
    ===>   Registering installation for logitechmediaserver-7.9.1.g2017.07.11
    pkg-static: Unable to access file /usr/ports/audio/logitechmediaserver/work/stage/usr/local/share/logitechmediaserver/CPAN/arch/5.24/Audio/Cuefile/Parser.pm:No such file or directory
    pkg-static: Unable to access file /usr/ports/audio/logitechmediaserver/work/stage/usr/local/share/logitechmediaserver/CPAN/arch/5.24/amd64-freebsd-thread-multi/IO/Interface.pm:No such file or directory
    pkg-static: Unable to access file /usr/ports/audio/logitechmediaserver/work/stage/usr/local/share/logitechmediaserver/CPAN/arch/5.24/amd64-freebsd-thread-multi/IO/Interface/Simple.pm:No such file or directory
    pkg-static: Unable to access file /usr/ports/audio/logitechmediaserver/work/stage/usr/local/share/logitechmediaserver/CPAN/arch/5.24/amd64-freebsd-thread-multi/JSON/XS.pm:No such file or directory
    pkg-static: Unable to access file /usr/ports/audio/logitechmediaserver/work/stage/usr/local/share/logitechmediaserver/CPAN/arch/5.24/amd64-freebsd-thread-
    
    ...
    
    pkg-static: lstat(/usr/ports/audio/logitechmediaserver/work/stage/usr/local/share/logitechmediaserver/CPAN/arch/5.24/amd64-freebsd-thread-multi/auto/YAML/LibYAML/): No such file or directory
    *** Error code 74
    
    Stop.
    make[1]: stopped in /usr/ports/audio/logitechmediaserver
    *** Error code 1
    
    Stop.
    make: stopped in /usr/ports/audio/logitechmediaserver

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •