Debian package installation for python3 - cherrypy

As recommended by the Debian policy, it may exist a python3-cherrypy deb installer for CherryPy, but, obviously, it does not.
I am using fpm to build the packages of my application. This excellent tool extracts the dependencies from the setup.py of the application and uses the python prefix to manage the dependencies (python- and python3-). CherryPy is the only package I am using that is not complying to this policy ...
I searched in the CherryPy project documentations and I googled to find out if I miss something, but no success.
I suppose that I am not the only one that faced this situation and I am asking what is the best strategy. Re-package / rename CherryPy "standard" deb ? Build a specific deb for my application ?

Related

Using KDE frameworks and Qt Creator installed without apt

A similar question has already been asked here Starting with KDE Frameworks 5 and Qt Creator. However, the answer still hasn't clarified my doubts. So here is the problem: on Linux (Ubuntu) there are two ways to install Qt, first is to use apt (sudo apt install qt5-default) and the other one is to download Qt from the official website. Now when you install using the first way Qt is installed by defualt /usr/lib and the second way in the home folder (or in /opt if you ran the installed with administrator privileges).
Now I would like to integrate KDE Frameworks 5 in my project so on the official website it is suggested to use:
sudo apt install framework
And then you can just include that in your project by QT += framework. The problem is I installed Qt using the second way (downloading from the website) and as a result Qt Creator always return Project ERROR: Unknown module(s) in QT: framework. This I believe is because Qt doesn't seem to be aware of the fact that the modules are in /usr/lib/x86_64-linux-gnu/qt5/mkspecs/modules/ instead it probably looks for them somewhere else.
How do I solve this problem with a permanent solution? I cannot install Qt using apt because I would like to use the latest version which usually in not immediately available in the default repositories.
Ok so after a looking a lot, a solution has been suggested here https://forum.qt.io/topic/104861/how-to-use-kde-frameworks-with-qt-creator/8
Essentially Qt, if not installed through the system's repositories, is unable to find the KF5 modules. In order to fix this you can add a QMAKEPATH environment build variable to your project that tells Qt where it should look for the module, in my case this was in
/usr/lib/x86_64-linux-gnu/qt5

Update the local debian packages using ansible

I am trying to come up with a deployment strategy in developer environments using Ansible.
I have a few builds (node.js) coming out every day usually in the form of debian packages.
Eg: my_product_1.0.0_33.deb is the corresponding debian for build#33.
I am trying to automate the deployment on existing as well as new environments using Ansible. So what is the preferred way of updating the build packages using Ansible?
Eg: my_product_1.0.0_44.deb is my new build with build id #44 which I want to install on top of the existing build.
I am going through the Ansible documentation and below mentioned is the way I think will work for now.
Check if any package of "my_product" is installed and if not installed, install the latest debian.
If yes, check if the right build id of my_product is installed
If yes, don't restart the service and leave as is
If no, uninstall the existing package, install the new build debian and restart the service.
Is this the preferred approach of updating the debian packages in an environment or is there a better way to do this in Ansible?
The debian packages I receive are not hosted in any repository and are local .deb files.
Is this the preferred approach of updating the debian packages in an
environment or is there a better way to do this in Ansible?
This is a reasonably common approach. It could be simplified a bit by hosting your debs on an internal repo, but that's not necessary.
In general, you don't need to do things like "check if a package is installed and if not, install the latest version". You just specify the package name to the apt module and it handles the conditional logic for you.
For restarting the service if a new version has been deployed, look into handlers.

How to create RPMs under Windows only by useing install free binaries or .net?

I am looking for a lightweight method to create rpm packages under MS Windows environments.
Actually I use Cygwin. I generate the rpm by using cmake(cpack). For cmake I need to install gcc to bypass the compiler check. For the rpm generation I have the rpm & rpm-build packages installed. When I am checking the size of the Cygwin dir it is around 2.2GByte. Quite a lot for generating a "simple" rpm.
Is there a "better" way to generate RPMs? Maybe in .net etc.?
I know I'm a bit late to the party, but I've started the dotnet-packaging project, which allows you to create RPM and Debian packages on any platform that hosts .NET/.NET Core. So that includes Windows.
You can either use it as a library or as a .NET command-line utility (e.g. you could just run dotnet rpm on your project and it would create a RPM file for you).
https://github.com/qmfrederik/dotnet-packaging has the code and a getting started guide, let me know if that works.

Linux standalone 'installation' of Postgresql

For easy deployment, I'd like to ship an installation of Postgres as part of the application. Is it possible to include an already compiled and runnable version of Postgres that can be launched as process? I was able to do such thing with a Windows and MacOS version, but haven't found anything about Linux on that matter yet. Perhaps someone has tried this before and can share some insights...
You haven't stated what linux OS you're using.
Assuming it's a Redhat variant why not package your application as an RPM package? You could then declare a dependency on the standard Postgres package which would be automatically installed yum. Same principle applies if you're using Debian based systems, just a different packaging format.
From the user's perspective the OS's native packaging format is always the easiest way to install your application. Just requires effort to package it properly.
You can find cross-platform binaries from these pages on PostgreSQL official website:
For easy GUI .run installers, use links provided at http://www.enterprisedb.com/products-services-training/pgdownload.
If your target machine has no X installed on it, or you want to automate installation process with shell scripts, then you can download RPM or Deb packages from http://community.openscg.com/se/postgresql/packages.jsp
I found these links on http://www.postgresql.org/download/linux/ubuntu/, under "Cross distribution packages" and "Graphical installer".
I quote from those pages:
Note: The cross distribution packages do not fully integrate with the platform-specific packaging systems.
You must have root priviliges to install these packages, however, none of your systems library files will be altered. The supporting libraries that these binaries require are included locally as part of the install. This is the "special sauce" that allows identical binaries to run on different linux distro's.

Port a debian package to YUM for CentOS

I have a project that runs on Debian and uses many packages provided from the Debian repositories.
Because of demand, I've looked into porting the project to CentOS, but found that many of the packages I require are completely missing - at least 10 dependencies would have to be compiled manually at install time on the users machine.
My question is, what is the best way to create an installer for the user's machine? Should I use automake tools (with the standard ./configure, make, make install), to compile the required libraries, or is this a non-standard approach. Note that my app doesn't actually need to be compiled since it is written in Python, so is it weird to do a "make", when you're not compiling your own app?
Should the configure script just warn the user that package X is missing, and let them handle the rest?
Should I roll my own dependency checker by runng pkg-config manually a few times for each library required, and exit if something is missing?
I'm quite new to this, so any tips to get me moving in the right direction are appreciated.
Edit: I am familiar with RPM and yum for red hat base distros, but CentOS is missing many multimedia packages that I require. An example of one of my package dependencies is "liquidsoap" which is a programmable audio engine: http://savonet.sourceforge.net/
This is available on Debian, but not Redhat/Centos
See this link on CentOS package management.
http://wiki.centos.org/PackageManagement/Yum
CentOS is redhat based and does not use .deb packages by default. However apt package management has been ported to tons of platforms, you may be able to use a port for centOS
If you use YUM whatever packages you need will be there for your application as redhat distros need all the same things that any other distro does.
EDIT: To get the details out of comments
Packages not available on the target platform either have to be built (possibly as a port) on the target platform and then shipped in the ported package (in this case YUM), or code needs to be modified and forked to use packages which already are available on the target platform. The choice depends on which is worse, or which is even possible given your constraints.

Resources