spksrc icon indicating copy to clipboard operation
spksrc copied to clipboard

Package for NZBDrone [Request]

Open evtk opened this issue 13 years ago • 733 comments

Hi there,

I don't know if it is even possible to request here, but I would really like to install NZBDrone as package on my synology NAS. Can this be added to the repository?

I read NZBDrone is build on mono, and I have seen an official synology mono package. But I'm no expert and would not know how to use this package to run NZBDrone.

Many thanks!

evtk avatar Oct 03 '13 16:10 evtk

Well, if someone can make it work without a package to test that'd be great.

Diaoul avatar Oct 08 '13 13:10 Diaoul

There is a debian package available:

https://github.com/NzbDrone/NzbDrone/wiki/Installation#linux

But I don't have a clue how to install it on synology.

evtk avatar Oct 09 '13 08:10 evtk

Maybe ...

1 - download deb. 2 - Unzip it 3 - Copy content of folder "data\opt\NzbDrone" on your nas. 4 - run mono package on nas .. 5 - Make a script "mono [Your Path]/NzbDrone.exe"

i am at work so ... will try tonight.

Nonobis avatar Oct 10 '13 14:10 Nonobis

just tried on my syno box... whoops:

DiskStation> mono /volume2/Downloads/NzbDrone/NzbDrone.exe [Info] Bootstrap: Starting NzbDrone Console. Version 2.0.0.691 [Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal *** [Info] MigrationLogger: *** VersionMigration migrating *** [Fatal] ConsoleApp: EPIC FAIL!

System.EntryPointNotFoundException: sqlite3_column_database_name at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_column_database_name (intptr,int) at System.Data.SQLite.SQLite3.ColumnDatabaseName (System.Data.SQLite.SQLiteStatement stmt, Int32 index) [0x00000] in :0 at System.Data.SQLite.SQLiteDataReader.GetStatementColumnParents (System.Data.SQLite.SQLiteBase sql, System.Data.SQLite.SQLiteStatement stmt, Int32 fieldCount, System.Collections.Generic.Dictionary2& parentToColumns, System.Collections.Generic.Dictionary2& columnToParent) [0x00000] in :0 at System.Data.SQLite.SQLiteDataReader.GetSchemaTable (Boolean wantUniqueInfo, Boolean wantDefaultValue) [0x00000] in :0 at System.Data.SQLite.SQLiteDataReader.GetSchemaTable () [0x00000] in :0 at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction missingSchAction, MissingMappingAction missingMapAction, System.Data.Common.DataTableMappingCollection dtMapping) [0x00000] in :0 at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType) [0x00000] in :0 at System.Data.Common.DataAdapter.FillTable (System.Data.DataTable dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, System.Int32& counter) [0x00000] in :0 at System.Data.Common.DataAdapter.FillInternal (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00000] in :0 at System.Data.Common.DataAdapter.Fill (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00000] in :0 at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) [0x00000] in :0 at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet) [0x00000] in :0 at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.Read (System.String template, System.Object[] args) [0x00000] in :0 at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.ColumnExists (System.String schemaName, System.String tableName, System.String columnName) [0x00000] in :0 at FluentMigrator.Runner.VersionLoader.get_AlreadyMadeVersionUnique () [0x00000] in :0 at FluentMigrator.Runner.VersionLoader.LoadVersionInfo () [0x00000] in :0 at FluentMigrator.Runner.VersionLoader..ctor (IMigrationRunner runner, System.Reflection.Assembly assembly, IMigrationConventions conventions) [0x00000] in :0 at FluentMigrator.Runner.MigrationRunner..ctor (System.Reflection.Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor) [0x00000] in :0 at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.MigrateToLatest (System.String connectionString, MigrationType migrationType) [0x00000] in :0 at NzbDrone.Core.Datastore.DbFactory.Create (MigrationType migrationType) [0x00000] in :0 at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase (IContainer container) [0x00000] in :0 at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupArguments args, IUserAlert userAlert) [0x00000] in :0 at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x00000] in :0

evtk avatar Oct 10 '13 18:10 evtk

make a report on their issue tracker maybe they could patch the soft.

Nonobis avatar Oct 11 '13 05:10 Nonobis

I have done so:

http://forums.nzbdrone.com/discussion/588/nzbdrone-as-synology-package

Let's see what happens!

evtk avatar Oct 11 '13 09:10 evtk

Open a ticket to Synology and have them to update sqlite. Seems there's no other way unless recompile mono with our sqlite. I'd like to avoid recompile every package Synology can't compile properly...

Diaoul avatar Oct 17 '13 12:10 Diaoul

Allright, thanks. I will contact synology and post any results here.

evtk avatar Oct 17 '13 18:10 evtk

this is the answer on updating sqlite.

Unfortunately there is no announced plan to support this feature at the moment. I apologize for your inconvenience. However, I have passed this message to our developers and product management group. They will have more research on such feature. Thank you for bringing this issue to our attention.

evtk avatar Oct 21 '13 18:10 evtk

That's the reason we build our own packages, if something needs an update we update it. So it seems the solution is to build mono from scratch using spksrc. If someone's up to it let me know.

Diaoul avatar Oct 21 '13 18:10 Diaoul

I want to kick a bit of life in this issue. It seems that sql lite 3 has been updated by Synology on the DSM software, so i'm curious to see ift it would be able to get working now?

NAS> sqlite3 SQLite version 3.8.1 2013-10-17 12:57:35

Currently with latest sqlite installed still the same error :(

Senaxx avatar Jan 12 '14 00:01 Senaxx

@Diaoul does having SQLite version 3.8.1 2013-10-17 make this package a real possibility now? I would be happy to test a package out. Thanks for your help!

maxrogers avatar Jan 16 '14 00:01 maxrogers

is there any word if this will now be possible with this new version of SQlite?

danfozzy avatar Feb 02 '14 20:02 danfozzy

Ive just tried while running DSM 5 and ive gotten something similar

Tried with available libs below and added the OSX one for a laugh, still no joy. libsqlite3.0.dylib libsqlite3.so libsqlite3.so.0 libsqlite3.so.0.8.6

/volume1/@appstore/NzbDrone> mono --debug NzbDrone.exe [Info] Bootstrap: Starting NzbDrone Console. Version 2.0.0.1181 [Info] ps: Starting ps -p 21113 -o args= [Error] ps: /bin/ps: invalid option -- 'p' [Error] ps: BusyBox v1.16.1 (2014-01-20 02:24:47 CST) multi-call binary. [Error] ps: Usage: ps
[Error] ps: Report process status [Error] ps: Options: [Error] ps: w Wide output [Info] MigrationLogger: *** Migrating data source=/root/.config/NzbDrone/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal *** [Info] MigrationLogger: *** VersionMigration migrating ***

[Fatal] ConsoleApp: EPIC FAIL!

System.EntryPointNotFoundException: sqlite3_column_database_name at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_column_database_name (intptr,int) at System.Data.SQLite.SQLite3.ColumnDatabaseName (System.Data.SQLite.SQLiteStatement stmt, Int32 index) [0x00000] in :0 at System.Data.SQLite.SQLiteDataReader.GetStatementColumnParents (System.Data.SQLite.SQLiteBase sql, System.Data.SQLite.SQLiteStatement stmt, Int32 fieldCount, System.Collections.Generic.Dictionary2& parentToColumns, System.Collections.Generic.Dictionary2& columnToParent) [0x00000] in :0 at System.Data.SQLite.SQLiteDataReader.GetSchemaTable (Boolean wantUniqueInfo, Boolean wantDefaultValue) [0x00000] in :0 at System.Data.SQLite.SQLiteDataReader.GetSchemaTable () [0x00000] in :0 at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType, MissingSchemaAction missingSchAction, MissingMappingAction missingMapAction, System.Data.Common.DataTableMappingCollection dtMapping) [0x0003b] in /source/Mono/src/mcs/class/System.Data/System.Data.Common/DataAdapter.cs:284 at System.Data.Common.DataAdapter.BuildSchema (IDataReader reader, System.Data.DataTable table, SchemaType schemaType) [0x00000] in /source/Mono/src/mcs/class/System.Data/System.Data.Common/DataAdapter.cs:257 at System.Data.Common.DataAdapter.FillTable (System.Data.DataTable dataTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords, System.Int32& counter) [0x00011] in /source/Mono/src/mcs/class/System.Data/System.Data.Common/DataAdapter.cs:428 at System.Data.Common.DataAdapter.FillInternal (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x0009b] in /source/Mono/src/mcs/class/System.Data/System.Data.Common/DataAdapter.cs:533 at System.Data.Common.DataAdapter.Fill (System.Data.DataSet dataSet, System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) [0x00000] in /source/Mono/src/mcs/class/System.Data/System.Data.Common/DataAdapter.cs:589 at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet, Int32 startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command, CommandBehavior behavior) [0x0004e] in /source/Mono/src/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs:337 at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet) [0x00000] in /source/Mono/src/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs:265 at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.Read (System.String template, System.Object[] args) [0x00032] in c:\Community\tommarien\fluentmigrator\src\FluentMigrator.Runner\Processors\Sqlite\SqliteProcessor.cs:197 at FluentMigrator.Runner.Processors.Sqlite.SqliteProcessor.ColumnExists (System.String schemaName, System.String tableName, System.String columnName) [0x00000] in c:\Community\tommarien\fluentmigrator\src\FluentMigrator.Runner\Processors\Sqlite\SqliteProcessor.cs:52 at FluentMigrator.Runner.VersionLoader.get_AlreadyMadeVersionUnique () [0x00000] in c:\Community\tommarien\fluentmigrator\src\FluentMigrator.Runner\VersionLoader.cs:109 at FluentMigrator.Runner.VersionLoader.LoadVersionInfo () [0x00050] in c:\Community\tommarien\fluentmigrator\src\FluentMigrator.Runner\VersionLoader.cs:127 at FluentMigrator.Runner.VersionLoader..ctor (IMigrationRunner runner, System.Reflection.Assembly assembly, IMigrationConventions conventions) [0x00066] in c:\Community\tommarien\fluentmigrator\src\FluentMigrator.Runner\VersionLoader.cs:40 at FluentMigrator.Runner.MigrationRunner..ctor (System.Reflection.Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor) [0x000d6] in c:\Community\tommarien\fluentmigrator\src\FluentMigrator.Runner\MigrationRunner.cs:86 at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.MigrateToLatest (System.String connectionString, MigrationType migrationType) [0x000c4] in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Core\Datastore\Migration\Framework\MigrationController.cs:53 at NzbDrone.Core.Datastore.DbFactory.Create (MigrationType migrationType) [0x00049] in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Core\Datastore\DbFactory.cs:74 at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase (IContainer container) [0x00000] in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Core\Datastore\DbFactory.cs:32 at NzbDrone.Host.Bootstrap.Start (ApplicationModes applicationModes, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x00012] in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Host\Bootstrap.cs:65 at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, IUserAlert userAlert, System.Action`1 startCallback) [0x00064] in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Host\Bootstrap.cs:39 at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x0000f] in m:\BuildAgent1\work\328d72309b633a8\src\NzbDrone.Console\ConsoleApp.cs:19

Press any key to exit...

kevinmce avatar Mar 04 '14 12:03 kevinmce

@kevinmce, you got me motivated, so I installed Synology DMS 5.0 in a virtual machine (vmware) and gave it a go also. I am now stuck at the exact same error as you (above:)

System.EntryPointNotFoundException: sqlite3_column_database_name

I am willing to try whatever on this test (virtual machine) so if anyone has any ideas. Throw them at me!

My sqlite version on DSM 5.0beta: DStest> sqlite3 SQLite version 3.8.0.2 2013-09-03 17:11:13

Mono info: DStest> mono -V Mono JIT compiler version 2.11.1 ((no/426188e Mon Jan 13 12:11:24 CST 2014)

Mediainfo: DStest> mediainfo --version MediaInfo Command line, MediaInfoLib - v0.7.61

maxrogers avatar Mar 04 '14 23:03 maxrogers

If you don't want to test on your live Synology box like me, I posted a method for setting up a virtual DSM 5.0 here:

http://forums.nzbdrone.com/discussion/comment/3758#Comment_3758

maxrogers avatar Mar 05 '14 00:03 maxrogers

Humm, ive been looking up the virtual machine also yesterday. It makes me wonder was buying the synology really worth the 550 euro. I could have built a home server for a lot less.

I think requesting support from the synocommunity guys would help. They should be familiar with the issues when creating these packages.

kevinmce avatar Mar 05 '14 07:03 kevinmce

So here is what I have been able to figure out.

It seems that sqlite defaults to not include/enable the column metadata function when compiled. This means that, the sqlite on the synology doesn't include that function. Hence the error we are getting:

System.EntryPointNotFoundException: sqlite3_column_database_name

So..... this means that we either need to get synology to update sqlite on DSM5.0 to include the column_metadata function when compiled or we compile sqlite ourselves with the function. As near as I can figure, adding this flag will compile with the needed feature:

CPPFLAGS="-D SQLITE_ENABLE_COLUMN_METADATA"

I have been trying to compile a version myself but I don't know what I am doing (never really done this before.) You can cross-compile for synology on linux. Here is what I have been trying to follow to do it:

http://usdl.synology.com/download/ds/userguide/Synology_DiskStation_Manager_3rd_Party_Apps_Developer_Guide.pdf

Anyways, I am out of my depth here.....

maxrogers avatar Mar 05 '14 18:03 maxrogers

See this comment here: https://bugzilla.xamarin.com/show_bug.cgi?id=327#c4 (where I found the info about sqlite not compiling with that feature.)

Edit: from sqlite: http://www.sqlite.org/c3ref/column_database_name.html

"These APIs are only available if the library was compiled with the SQLITE_ENABLE_COLUMN_METADATA C-preprocessor symbol."

const char sqlite3_column_database_name(sqlite3_stmt,int); const void sqlite3_column_database_name16(sqlite3_stmt,int); const char sqlite3_column_table_name(sqlite3_stmt,int); const void sqlite3_column_table_name16(sqlite3_stmt,int); const char sqlite3_column_origin_name(sqlite3_stmt,int); const void sqlite3_column_origin_name16(sqlite3_stmt,int);

maxrogers avatar Mar 05 '14 18:03 maxrogers

Nice find Max!

One step closer!(fingers crossed) I unfortunately know probably less about compiling than you.

Ill look into it also, but just reading the first bit and im lost.

Edit: Requested some help over at the synology fourms: http://forum.synology.com/enu/viewtopic.php?f=27&t=75217&p=284643&hilit=nzbdrone#p284643

kevinmce avatar Mar 05 '14 19:03 kevinmce