Need to exclude a file from RPM spec file and avoid the .rpmsave extention - rpm-spec

I have a spec file as below
%files
/ovn/*
%exclude /ovn/python/splash/static/favicon.ico
On upgrade of a image I don't want to replace my favicon.ico if already exists so I want to exclude that file on upgrade but it is making the existing file as
favicon.ico.rpmsave.
How to avoid .rpmsave extension?

A file that is defined as a configuration file will be replaced in that way. In the %files section they are either %config or %config(noreplace).

Related

how to add binary file to buildroot generated image?

How can i include a pre-built binary file into buildroot generated image?
I have tried to include the binary file into appropriate folder in build_dir but every time i try to do make the image is being created without the file.
You can use a root filesystem overlay.
See chapter Project-specific customization in the Buildroot manual.
Just in case someone is looking for a easy fix you can add the files to buildroot-dir/files folder. The file should match the exact directory structure. For example you want to put the file in /usr/bin in the image then keep the file in buildroot-dir/files/usr/bin and rebuild the image.

Is it possible to rename a file during copy with Nuspec files node

I am currently working on changing our codebase to use Nuget. As part of the process the copying of ressources to the output directory should be moved from postbuild events in the projects to the files tag in the .nuspec file.
For the particular project the ressource was called Resources.resx and is renamed to something more specific during the copy (yes I know great programming - not mine and not my place to change it).
Is it possible to change the filename using the file node in nuspec or do I need to keep a postbuild in this case?
My attemp of renaming it with the target property fails:
< file src="foo/bar.resx" target="foo/foobar.resx"/>
creates the following output:
"foo/foobar.resx/bar.rex"
I found a familiar problem on github but it was rejected due to being posted on a dead branch and not trying to rename a file but change its type.
https://github.com/NuGet/Home/issues/2019
Thanks for the help
This functionality is not built into NuGet. The only conceivable way to do this would be to implement a powershell script (install.ps1) that would handle the rename of both the file and the csproj.
Late to the party, but this looks like it could work:
From: https://learn.microsoft.com/en-us/nuget/reference/nuspec
Renaming a content file in the package
Source file:
ie\css\style.css
.nuspec entry:
<file src="ie\css\style.css" target="Content\css\ie.css" />
Packaged result:
content\css\ie.css
Edit:
I found this post (https://stackoverflow.com/a/45601252/182888) where it says:
Note: The File extension in src and target must match or the specified target will be treated like a directory.
So keep that in mind or it might trip you up.

How to change TypeLite Output Directory

Currently all of my TypeScript typings are located under Scripts/typings/Library. By default, TypeLite is just under Scripts. Is there a way to specify the output directory so it is under a custom Library name? ie Scripts/typings/MyCSharpProj?
TypeLite uses T4 templates for generating output files and I am afraid it isn't possible to change the output directory for the template. The output file is always generated alongside the template.
If you move Manager.ttinclude TypeLite.tt and TypeLite.Net4.tt to another directory and the output files will be generated there.

Marking files as config files in CPack

When creating RPM packages: How do I tell CPack to treat a file as config file so it won't get overridden when updating the RPM?
The %config directive is used in rpm-spec for that case. Is there something like this in CPack?
As of now, files specified with an absolute path will get marked with %config, files with a relative path are marked as 'normal' files.
A quick look at what appears to be the CPack documentation doesn't show me anything that looks like it is directly relevant or helpful here.
However, if you are using a new enough version of CMake (2.8.1+ it looks like) or apply the patch yourself it looks like you can manually specify the spec file to build by using CPACK_RPM_USER_BINARY_SPECFILE.

Where are Doxygen output files put?

I have just run Doxygen from the command line and am unsure where it put it...
It doesn't show up in the directory I ran it from
Is there an easy way to find it?
From the Doxygen manual:
The default output directory is the directory in which doxygen is started. The root directory to which the output is written can be changed using the OUTPUT_DIRECTORY. The format specific directory within the output directory can be selected using the HTML_OUTPUT, RTF_OUTPUT, LATEX_OUTPUT, XML_OUTPUT, and MAN_OUTPUT tags of the configuration file. If the output directory does not exist, doxygen will try to create it for you (but it will not try to create a whole path recursively, like mkdir -p does).
If you are having some problems getting it to do what you want use doxywizard it makes writing the configuration file much easier.