rpm-spec

Create log file when installing rpm

∥☆過路亽.° 提交于 2019-12-10 23:04:39
问题 What the best way to create a log file in an rpm spec file? The service I'm creating runs under an unprivileged user so cannot create files in /var/log/. 回答1: You could create /var/log/myservice/ directory and make it owned by your user. Inside %install or make install: (ignoring buildroot & such) install -d /var/log/myservice -o serviceuser -m 750 This assumes you are running your service similarly to apache which often runs as user apache and still puts logs in var/log/apache Then add the

Unexpected RPM conflict on %config(noreplace) files

那年仲夏 提交于 2019-12-10 21:51:51
问题 I'm creating my own RPM using rpmbuild . My RPM contains config files which should never get overridden , even if the RPM contains a new version of these config files. To archive this, I tagged these with %config(noreplace) /opt/mypackage/etc/* in the spec file. According to the documentation and this site, a locally modified file will never get overridden in this case which is exactly what I want. However, when doing the following operations: Install version 1 of the RPM Change configuration

Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)

主宰稳场 提交于 2019-12-10 21:07:34
问题 I am trying to compile Tizen source code. The compilation tools uses the rpm build environment. While compiling specific package I'm getting an rpm build issue "Bad exit status from /var/tmp/rpm-tmp.b1DgAt (%build)" Here is my build log Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg_PushUrlRequestListener.cpp.o [ 8s] [ 69%] Building CXX object CMakeFiles/osp-messaging.dir src/FMsg_WapPushManagerImpl.cpp.o [ 8s] [ 71%] Building CXX object CMakeFiles/osp-messaging.dir/src/FMsg

RPM spec %post doesn't execute in rpmbuild

邮差的信 提交于 2019-12-10 19:35:47
问题 Given the minimal RPM spec file, that should only execute a %post stanza: $ cat ~/RPMBUILD/SPECS/test.spec Name: None Version: 1.0 Release: 1 Summary: Bla License: Proprietary %description Bla %prep %build %install %clean %post echo ">>> Inside post <<<" %files However, the echo from the %post is not executed: $ rpmbuild -v -bb ~/RPMBUILD/SPECS/test.spec Executing(%prep): /bin/sh -e /home/ronbarak/RPMBUILD/tmp/rpm-tmp.IvhCZs + umask 022 + cd /home/ronbarak/RPMBUILD/BUILD + LANG=C + export

symlink in particular directory using rpm spec

馋奶兔 提交于 2019-12-10 17:21:42
问题 rpm created using spec file will create directory "directory1" and all files in /var/lib/directory1. For another use case i want to create another directory in "/var/lib" which should be a symlink to directory1. eg: cd /var/lib/ ls -la directory2 -> directory1 directory1 how is it possible to do achieve this without using absolute paths in spec file? 回答1: %install mkdir -p %{buildroot}/%{_sharedstatedir}/directory1 ln -s directory1 %{buildroot}/%{_sharedstatedir}/directory2 %files %{

Version Controlling rpm spec files

好久不见. 提交于 2019-12-10 17:18:02
问题 I'm configuring a build machine to produce rpms for a large number of very similar projects. The spec file for each project is slightly different, both in name and sometimes in dependencies and other attributes. Each project has its own git repository containing the project files. These spec files only exist and truthfully are only useful to the build system itself; each project can be installed manually, but I package into rpms for ease of automated deployment. The build system itself also

Pyinstaller, hidden -imports, WebSocketError

妖精的绣舞 提交于 2019-12-10 12:05:20
问题 I just run into an error that said "No module name socketio", after adding it to the hidden imports I get "No module name server" and after adding to the hidden imports socketio.server I get the new one and so on... Is there another way to add every import my application needs? However if I have to go this way, how can I add import: from .exceptions import WebSocketError, since geventwebsocket.exceptions.WebSocketError is not working. [EDIT] Here is more informations. My application works

RPM spec to require specific RHEL release

。_饼干妹妹 提交于 2019-12-08 17:06:34
In an RPM spec file, what is a good way of requiring a minimum RHEL distribuition? I tried to make RHEL 6.3 a prerequisite using: Requires: redhat-release-server-6Server >= 6.3 This blocks the install on 6.2 and 6.3 with: error: Failed dependencies: redhat-release-server-6Server >= 6.3 is needed by my.package-1.2.0-0.x86_64 I also tried: Requires: redhat-release >= 6.3 which did not fail the dependecy check on either 6.2 or 6.3. The redhat-release-server-6Server-6.3.0.3.el6.x86_64 (on my system) seems to be a good candidate as a prerequisite. See http://rhn.redhat.com/errata/RHEA-2012-0971

How do you make _topdir relative to the location of the .spec file when building an RPM?

荒凉一梦 提交于 2019-12-08 14:42:06
问题 I have a .spec file that relies on a variable called _topdir . Right now when you checkout the SRPM source from git, you have to go and change where _topdir is pointing to to get the rpmbuild to function correctly. # We need the following line so that RPM can find the BUILD and SOURCES and RPMS dirs. %define _topdir /root/projects/my-project/my-project-srpm/ How do you specify that _topdir should be relative to the location of the .spec file so that _topdir isn't hard coded? 回答1: specify your

Is there a way to log activities done by a rpm?

我们两清 提交于 2019-12-06 15:58:12
I am trying to log the activities done by my rpm, but unable to find a way to do it. I am looking for some way to do it through the spec file itself. If there are 5 steps my rpm performs, I need a way to log these steps and their results to a log. I found this after a brief google search - http://www.rpm.org/wiki/RpmLog . It seems like this work is still underway(?). I was able to create a directory to save the logs following this , but how do I actually write something to a log file in this specially created directory? Some statements I should add to the spec file? Ravindra Mijar I was able