Failed to build a Conda package: missing gtkdocize in conda-builder gitlab-ci environment - gtk

I am using an automatic package creation pipeline in gitlab-ci, to build Conda packages for software we use in my company.
One of the software we use relies on gtkdocize, and checks for it in the
configure script. It is only needed for the build, not for the execution.
So, I am not able to build the package because the conda-builder image does
not contain this program.
I am new to Conda, and gitlab-ci, and I imagine conda-builder is a generic
Docker image for building Conda packages in general. How can I add a package
to "my" conda-builder image ?
Or maybe there is a build dependency I am missing in my recipe ? I cannot
find where gtkdocize can come from.
Any help would be appreciated.

The gtkdocize binary is used to set up an Autotools-based project using gtk-doc for generating the API reference. You will need to install whatever package provides gtkdocize; on Debian/Ubuntu, the package is called gtk-doc-tools, whereas on Fedora it's called gtk-doc.

Related

Yocto check which packages are installed on target system

I have a Yocto system where I'm running some Chef InSpec scans. Chef InSpec offers a command to check if a package is installed, however, that doesn't work with Yocto (I imagine it would if you'd install a package manager, but I don't want to do that). What would be the best way to check if a certain package is installed on the system?
I know that bitbake can show every package that would be in the built image, but I need to check on the target system. Is there a way I can get this information from bitbake from within a recipe that would just route the output into a file on the rootfs? Or is there a better approach without installing a package manager on the target system?
Inside the folder tmp/deploy/images/$MACHINE/${IMAGE}/
You should see a file named with manifest extension. It is often named like this : [image-name]-[image-version].manifest"
In this file you will find all packages that are present in your linux image built with Yocto, so packages that will be deployed in your target.

how to add sample run mode for package installation

I want to install a package (mypackage-1.0-local.zip) only for local environment. This package should not be installed in any other environments.Same as OOTB 'samplecontent'/'nosamplecontent' runmodes.
So for this I do not know how to achieve this. If I start AEM server with 'local' runmode then how package manager service will know whether to install this package or not based on runmode?
If you are maintaining this in code, you can try to use /apps/${site}/install.${runmode} and place the package in that folder to install a package only to instances matching the run-mode.
e.g. Packages kept under /apps/${site}/install.author will be installed only in author instances.

Programming in Swift on Linux

I would like to prepare the environment for working with Swift on Ubuntu 16.04.
I installed Swift and Atom editor.
I installed the Script package, which allows me to run code from the Atom editor.
Generally it is nice when I compile and run one file (Ctrl+Shift+B shortcut).
The problem is when I would like to build a project composed of several files.
Classes defined in the other files (not the one I compile) are not visible (compilation error).
Is it possible to configure the editor to compile and run the entire project?
How to import external library, eg ObjectMapper ?
You can use the Atom package build. It allows you to create custom build commands and such by using common build providers. You can build with a Makefile or JSON or CSON or YAML or even Javascript. It provides enough flexibility that you can build just about anything. Just make your build file so that it points to all the files to build with the right compiler (probably swiftc in your case). With a Javascript build file, you can even specify a command to run before and after the build, say, to run your newly built program.
There's a great open source project I have been watching called Marathon. It's a package manager and they have been Working on a deployment on linux. I'm not sure how much success they have had, but you can follow along here and maybe help out.
https://github.com/JohnSundell/Marathon/issues/37
Edit: It looks like it does work on linux!
git clone https://github.com/JohnSundell/Marathon.git
$ cd Marathon
$ swift build -c release
$ cp -f .build/release/Marathon /usr/local/bin/marathon
For dependencies, you should use Swift Package Manager.
You can check how Vapor is built - it is prepared for build apps for Ubuntu too.
Also, Vapor toolbox would help you with other projects
https://docs.vapor.codes/2.0/getting-started/install-on-ubuntu/
You can build a Swift project using VS Code + Swift Development Environment extension
If steps on the link above are not clear enough, I've put more details in a blog post

Component-preload.js generation

We are about to close a SAPUI5 application, one of the last steps is to make a Component-Preload.js file to improve performance. I read different guides around the web, all of them need Node.js that I have installed. I'm not expert about that package and I can't figure how to make one of that guides work. I'm developing with NetBeans. As far as I see there is not an official tool (am I right?) to generate that file. Can someone with more experience than me suggest a working, well-explained guide to perform that task?
I don't know if this could help, that's my working tree:
There are several main ways of doing it.
You can use SAP Web IDE to generate it. This assumes that you are using WebIDE to develop your application (which is not true based on your question). The regular version of WebIDE generates this file during the "client build" just before application deployment.
The "multi cloud" version of WebIDE can use a grunt build to do it. You can find more info here if you are interested: https://www.sap.com/developer/tutorials/webide-grunt-basic.html.
Use the new UI5 command line tools (https://npmjs.com/package/#ui5/cli):
Run npm i -g #ui5/cli to install the tools globally.
Open the root of your project with your terminal.
Run ui5 build preload to build the preload.
Use the #sap/grunt-sapui5-bestpractice-build pre-configured grunt tasks. The downside is that they are more-or-less black boxes which do not allow that much customisation. You can find an example setup on SAP's GitHub repository jenkins-pipelines. In a nutshell:
You need to define an .npmrc file which adds the #sap npm registry: #sap:registry=https://npm.sap.com.
Run a npm init command such that you generate a package.json file. This file describes your application and your dependencies (runtime dependencies and dev dependencies; you will only have dev dependencies for now, as you just want to build your app). Make sure to mark the package as private. See the npm docu (at the end of the license chapter).
Then you can install grunt and the build configuration: npm i grunt -D and npm i #sap/grunt-sapui5-bestpractice-build -D.
Lastly you need to define a simple Gruntfile (you can then run the build by just running grunt):
module.exports = function (grunt) {
'use strict';
grunt.loadNpmTasks('#sap/grunt-sapui5-bestpractice-build');
grunt.registerTask('default', [
'lint',
'clean',
'build'
]);
};
You can use the official grunt_openui5 plugin to generate the preload file(s). In order to be able to do this, you need to have node installed:
Create a package.json (e.g. through npm init).
Install grunt by writting in the console: npm install grunt-cli --save-dev.
Install the official openui5 grunt plugin: npm install grunt-openui5 --save-dev.
Now you have all the tools necessary, you just need to tell grunt what it has to do. You should create a Gruntfile.js in the root of your project. In this file you should configure the grunt openui5 task as described in the official github page (I linked it above). You can find a similar file here (it has more build steps like minification and copying the result files in a separate directory).
You can then run the grunt build by simply running grunt <task_name> in the console. If you registered your build task as the grunt default task (like in the sample file: grunt.registerTask('default', [...]);) then you just have to write grunt.
I think you should be able to integrate such a command line script (i.e. to run grunt) inside your IDE as an external tool.
You can use the unofficial gulp-openui5 tool to generate it. I would not recommend this if you are not already using gulp for your builds (as it is not a tool built by SAP). The procedure is the same, but using gulp for building the app instead of grunt (so you need to install node, npm init, install gulp, create the Gulpfile, etc).
Note that for most of the above methods, you need nodejs, which you can download and install from here: https://nodejs.org/en/download/.

How do you install Swift package binaries after building them?

After building a package how do you install it on the system?
For example, I'm trying to install Swift language server but I have no idea what to do after swift build. Do I have to copy executables and libraries manually?
In CMake/make world there is always a make install step. Is there anything similar in Swift package manager? There doesn't seem to be an install command or something similar. Am I missing something?
Swift Package Manager produces plain executables, in .build/debug or .build/release directory. You can see the last line in its output Linking .build/debug/<the name of the main module in the Package>.
If not specified otherwise, you can just run the result executable, as any other executable, by typing its path in the command line and providing parameters as needed.
Swift Package Manager does not support custom scripts or targets, like install, deploy etc. If there is a need for installation/deployment automation, it should be done by additional scripts or tools, like Makefile.