Build flatpak package - mono

I'm working to get my application in a flatpak package. My application (https://sourceforge.net/p/audiocuesheet) is a mono build which uses gtk-sharp2. I'm really new to flatpak and started to build a manifest like this:
{
"app-id": "net.sourceforge.audiocuesheet",
"runtime": "org.gnome.Platform",
"runtime-version": "3.26",
"sdk": "org.gnome.Sdk",
"command": "AudioCuesheetEditor",
"modules": [
{
"name": "AudioCuesheetEditor",
"buildsystem": "simple",
"build-commands": [
"cp -r AudioCuesheetEditor /home/sven/Dokumente"
],
"sources": [
{
"type": "archive",
"path": "AudioCuesheetEditor-linux-x64-v2.4.0.zip",
"dest": "AudioCuesheetEditor"
}
]
}
]
}
When I run the flatpack-builder, I get this output:
[sven#localhost flatpak]$ flatpak-builder --force-clean build net.sourceforge.audiocuesheet.json
Downloading sources
Starting build of net.sourceforge.audiocuesheet
Cache miss, checking out last cache hit
========================================================================
Building module AudioCuesheetEditor in /home/sven/Downloads/flatpak/.flatpak-builder/build/AudioCuesheetEditor-16
========================================================================
Archive: /home/sven/Downloads/flatpak/AudioCuesheetEditor-linux-x64-v2.4.0.zip
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/AudioCuesheetEditor
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/AudioCuesheetEditor.exe
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/CHANGELOG.TXT
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/KNOWN_ISSUES.TXT
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-audio.so
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-audio.so.2.3
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-audio.so.2.3.0
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-graphics.so
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-graphics.so.2.3
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-graphics.so.2.3.0
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-network.so
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-network.so.2.3
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-network.so.2.3.0
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-system.so
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-system.so.2.3
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-system.so.2.3.0
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-window.so
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-window.so.2.3
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/libcsfml-window.so.2.3.0
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/LICENCE.TXT
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/locale/de/LC_MESSAGES/AudioCuesheetEditor.mo
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/locale/en/LC_MESSAGES/AudioCuesheetEditor.mo
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/MPG123Wrapper.dll
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/MPG123Wrapper.dll.config
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/README.TXT
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-128.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-16.ico
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-16.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-22.ico
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-22.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-24.ico
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-24.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-32.ico
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-32.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-48.ico
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-48.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/application-x-cue-64.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/audio-volume-high.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/audio-volume-low.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/audio-volume-medium.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/audio-volume-muted.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/icons/emblem-money.png
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/resources/logging.properties
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/samples/Sample_Inputfile.txt
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/samples/Sample_Inputfile2.txt
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/samples/Sample_Project.ace
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-audio-2.dll
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-audio-2.dll.config
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-graphics-2.dll
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-graphics-2.dll.config
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-system-2.dll
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-system-2.dll.config
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-window-2.dll
inflating: AudioCuesheetEditor-linux-x64-v2.4.0/sfmlnet-window-2.dll.config
Running: cp -r AudioCuesheetEditor /home/sven/Dokumente
Committing stage build-AudioCuesheetEditor to cache
Cleaning up
Committing stage cleanup to cache
Finishing app
Error: Command 'AudioCuesheetEditor' not found
So, you see the error I get. "AudioCuesheetEditor" is a wrapper shell script, which starts mono with some parameters, it is generated automatically from monodevelop. But why does the builder not find the script?
Basically my idea for the flatpak package was this:
1. I already have a linux build (x64 or x86) with all dependencies (libraries).
2. Just extract this build (which is available on sourceforge) and copy it to the correct places inside the system.
3. Done
Can somebody tell me, what is going wrong here? Thanks for your help
Sven

You have the right idea:
Just extract this build (which is available on sourceforge) and copy it to the correct places inside the system.
This is correct, but you are not copying them to the correct places. /home/sven/Dokumente is not a valid location inside a Flatpak package, since each Flatpak has its own directory structure which does not include your home directory. Try a path beginning with /app.

Related

RESOLVE - Problem when using assets from database in symfony

I have a little problem when I use an asset.
error capture
In my database I have the link of videos which are stocked in my server and for example one of them is : Commande/test/a/2362022a.mp4, the right path of the file is myProject/public/Commande/test/a/2362022a.mp4
So I try to do this :
<video controls>
<source src="{{ asset(commande.lienVideo)}}" type="video/webm">
</video>
But I have this error :
An exception has been thrown during the rendering of a template ("Asset manifest file "/var/www/html/app_brobro/public/build/manifest.json" does not exist. Did you forget to build the assets with npm or yarn?").
I also try this, but I have got the same error :
<video controls>
<source src="{{ asset('/' ~ commande.lienVideo)}}" type="video/webm">
</video>
I hope someone will have a solution to this ^^
Thanks by advance and have a nice day !
According to our exchanges in comments here is your solution:
As the official Symfony documentation specifies here, you have to build your Webpack with yarn dev by default or npm run build if you prefer npm to manage your front dependencies.
So just run one of them and that's it !

spring cloud config with native file

when config files changed,the config server did not reload the changes.
It can't monitor the native file changes or something wrong?
spring:
profiles:
active: native
cloud:
config:
server:
native:
search-locations: classpath:/conf/, classpath:/conf/licensingservice/
enter image description here
Since that your configuration are packed in your jar if you change a configuration since that it is saved in your classpath the server do not see the modification.
A better option is save these config in an other place outside the classpath.
you can use a configuration like below:
spring:
application:
name: configserver
cloud:
config:
server:
native:
searchLocations: file://${LOCAL_REPO}
in this way you can pilot the place with the environment variable LOCAL_REPO.
Of course I suggest you for the production to move the configuration repository to a git repository that it is a more suitable production ready choice.
I hope that this can help you

Connect MobileFirst Application with sql database

I have made new application Mobilefirst 8.0 using CLI.
I have followed Link to create sql adapter.
Added SQL databse file in root folder of project (root folder/Utils) is this right coz in 7.1 we have to add sql file under server folder.
Also added jdbc lib file in root folder. But when I trying to invoke adapter I am getting "Exception was thrown while invoking procedure: getAccountTransactions2 in adapter: SampleAdapter SQL connection creation failed" in logs.
Can someone let me know what I am doing wrong. Below is my code uploaded in drive.
Code here
Edit: I see what you did... you got it all wrong. You cannot include a "database file" in the application and expect the adapter to "connect" to this database.
Here is a diagram:
[application] ----> [mobilefirst server][adapter] ---> [database].
The application sends a request to the server to call the adapter which will send a request to the database, and then the response propagates back until it reaches the application, which send the original request.
You need to run your database in an actual server, not in the application.
Added SQL databse file in root folder of project (root folder/Utils) is this right coz in 7.1 we have to add sql file under server folder.
I assume you are referring to the connector driver... This is wrong.
In v8.0 you add the connector as a Maven dependency in the adapter's pom.xml file.
Learn about maven dependencies:
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/adapters/creating-adapters/#dependencies
https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html
Depending on your database type, search for a connector in the maven repository site: http://search.maven.org/
Once you found it, add its reference to the pom.xml file and re-build your adapter.
Be sure though to add the correct values for your database, in the adapter.xml file (URL to database, username, password, ...).
For example for MySQL:
pom.xml
<dependencies>
<dependency>
<groupId>com.ibm.mfp</groupId>
<artifactId>adapter-maven-api</artifactId>
<scope>provided</scope>
<version>[8.0.0,9.0.0)</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
</dependencies>
adapter.xml
...
...
<dataSourceDefinition>
<driverClass>com.mysql.jdbc.Driver</driverClass>
<url>jdbc:mysql://localhost:3306/mobilefirst_training</url>
<user>mobilefirst</user>
<password>mobilefirst</password>
</dataSourceDefinition>

set rails fog gem application.yml keys for development environment

I'm using paperclip, fog, figaro gems to upload images to amazon S3. In production works fine as I introduced the env variables in heroku by hand.
But in development, it is suposed to use the env from the aplication.yml file (added to .gitignore). It is not using this file, as in development the ENV[] placed in application.yml do not exist.
I followed several tutorial for this, and in all of them I understand that the ENV[] introduced in applicaction.yml should be used. Am I wrong? Am I missing something? Do I need something else? I read that I can introduce the ENV[] by hand typing export, but I need to know if it is not enough to write them down at application.yml
#config/application.yml
MAPS_API_KEY: 1234googlemapapikey56788
SECRET_KEY_BASE: ab1234567longkeyy2979127401411124
AWS_ACCES_KEY_ID: ACCESSKEYID1234567
AWS_SECRET_ACCESS_KEY: SECRETKEY123456788/jaa\12345
AWS_REGION: eu-west-1
S3_HOST_NAME: s3-eu-west-1.amazonaws.com
development:
FOG_DIRECTORY: example-dev
S3_BUCKET_NAME: example-dev
production:
FOG_DIRECTORY: example-production
S3_BUCKET_NAME: example-production
in development and production I use the same code:
#config/environments/development.rb && config/environments/production.rb
config.paperclip_defaults = {
storage: :s3,
s3_credentials: {
bucket: ENV.fetch('S3_BUCKET_NAME'),
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
s3_region: ENV.fetch('AWS_REGION'),
}
}
In production works fine, and in development I get errors like:
development.rb:54:in `fetch': key not found: "AWS_ACCESS_KEY_ID" (KeyError)
# config/initializers/paperclip.rb
Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
Paperclip::Attachment.default_options[:path] = '/:class/:attachment/:id_partition/:style/:filename'
The config/application.yml you list above has a typo.
The key you want is AWS_ACCESS_KEY_ID, but the copied file uses AWS_ACCES_KEY_ID (where access is missing the second s).
I suspect that should get things working for you again.

What are the official mirrors of the Maven Central Repository?

Does anyone know if a list of known (and working) Maven Central Repository (http://repo1.maven.org/maven2) mirrors?
If not, what mirrors do you use when the central repository is down?
This is taken from #rvxnet's answer and an example of why link-only answer are not desirable. I've taken this from the 2015-05-20 WaybackMachine version of their link:
Official, but not browseable:
https://repo1.maven.org/maven2
Others:
https://maven.antelink.com/content/repositories/central/
Also, there are official instructions for configuring to use mirrors. Essentially, you add to you settings.xml the something like the following:
<mirrors>
<mirror>
<id>planetmirror.com</id>
<name>PlanetMirror Australia</name>
<url>http://downloads.planetmirror.com/pub/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
I just found this:
<mirrors>
<mirror>
<id>google-maven-central</id>
<name>Google Maven Central</name>
<url>https://maven-central.storage.googleapis.com/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
That worked great for me
credit: Failed to get the server archetype by maven
From Using Mirrors for Repositories:
The official Maven 2 repository is at:
http://repo.maven.apache.org/maven2 hosted in the US, or
http://uk.maven.org/maven2 hosted in the UK.
A list of known mirrors is available in the Repository Metadata. These mirrors may not have the same contents and we don't support them in any way.
Also:
The size of the central repository is increasing steadily. To save us bandwidth and you time, mirroring the entire central repository is not allowed (doing so will get you automatically banned). Instead, we suggest you setup a repository manager as a proxy.
Here https://repo.maven.apache.org/maven2/.meta/repository-metadata.xml you can see the following list:
<mirrors>
<!--mirror>
<id>cica.es</id>
<url>http://ftp.cica.es/mirrors/maven2</url>
</mirror-->
<mirror>
<id>repo.exist.com</id>
<url>http://repo.exist.com/maven2</url>
</mirror>
<mirror>
<id>ibiblio.org</id>
<url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url>
</mirror>
<mirror>
<id>ibiblio.net</id>
<url>http://www.ibiblio.net/pub/packages/maven2</url>
</mirror>
<!--mirror>
<id>mirror.netcologne.de</id>
<url>http://mirror.netcologne.de/maven2</url>
</mirror -->
<mirror>
<id>uk.maven.org</id>
<url>http://uk.maven.org/maven2</url>
</mirror>
</mirrors>
This worked for me!
<mirror>
<id>central-secure</id>
<url>https://repo.maven.apache.org/maven2/</url>
<mirrorOf>central</mirrorOf>
</mirror>