rpm-spec

date command is giving erroneous output while using inside rpm spec file

℡╲_俬逩灬. 提交于 2021-02-20 05:00:52
问题 I have to perform some necessary steps before installing my package, such as taking back up of previous datastore snapshot. For that purpose I'm using a %pre script as follows. %pre #!/bin/sh -------- -------- stamp=`date +%Y%m%d%H%M%S` echo ${stamp} ------------- ------------- The output is as follows: 20161103123325OURCE It is printing some random characters along with date. "OURCE" is not present anywhere in my spec file. The same script works perfectly as standalone. The platform is

date command is giving erroneous output while using inside rpm spec file

我的梦境 提交于 2021-02-20 05:00:49
问题 I have to perform some necessary steps before installing my package, such as taking back up of previous datastore snapshot. For that purpose I'm using a %pre script as follows. %pre #!/bin/sh -------- -------- stamp=`date +%Y%m%d%H%M%S` echo ${stamp} ------------- ------------- The output is as follows: 20161103123325OURCE It is printing some random characters along with date. "OURCE" is not present anywhere in my spec file. The same script works perfectly as standalone. The platform is

Why does %autosetup perform patching BEFORE extracting sources?

ⅰ亾dé卋堺 提交于 2021-01-27 11:52:26
问题 I have a very straightforward arrangement -- one source tarball, one patch: Source: http://...../foo-%{version}.tar.gz Patch: my-patch-for-foo.diff ... %prep %autosetup -v -n bar-%{version} However, when I attempt to use the %autosetup in the %prep step, rpmbuild attempts to patch first -- before extracting: /bin/cat ..../SOURCES/my-patch-for-foo.diff | /usr/bin/patch Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8PV0PY + umask 022 + cd /.... + LANG=C + export LANG + unset DISPLAY + cd /....

Why does %autosetup perform patching BEFORE extracting sources?

你。 提交于 2021-01-27 11:51:50
问题 I have a very straightforward arrangement -- one source tarball, one patch: Source: http://...../foo-%{version}.tar.gz Patch: my-patch-for-foo.diff ... %prep %autosetup -v -n bar-%{version} However, when I attempt to use the %autosetup in the %prep step, rpmbuild attempts to patch first -- before extracting: /bin/cat ..../SOURCES/my-patch-for-foo.diff | /usr/bin/patch Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8PV0PY + umask 022 + cd /.... + LANG=C + export LANG + unset DISPLAY + cd /....

Why does %autosetup perform patching BEFORE extracting sources?

牧云@^-^@ 提交于 2021-01-27 11:49:08
问题 I have a very straightforward arrangement -- one source tarball, one patch: Source: http://...../foo-%{version}.tar.gz Patch: my-patch-for-foo.diff ... %prep %autosetup -v -n bar-%{version} However, when I attempt to use the %autosetup in the %prep step, rpmbuild attempts to patch first -- before extracting: /bin/cat ..../SOURCES/my-patch-for-foo.diff | /usr/bin/patch Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8PV0PY + umask 022 + cd /.... + LANG=C + export LANG + unset DISPLAY + cd /....

RPM Spec file conditional Requires per distribution AFTER build

前提是你 提交于 2021-01-27 10:41:31
问题 I want to build RPM files and I want them to be commonly used and beeing not depending on which distribution is installed. Now I found a requirement which name is different on RHEL and SLES. I found this as possible solution: %if 0%{?suse_version} Requires: jdk >= 2000:1.8.0_00-fcs, netcat, telnet, at %else Requires: jdk >= 2000:1.8.0_00-fcs, nc, telnet, at %endif But my problem with is, that it's an if query for the Build process, what I wish to have is depending on the distribution I

Distutils, older rpm, and customized spec file

孤者浪人 提交于 2020-01-05 08:42:37
问题 I finally got my program packaged in a RPM on Fedora 14 yesterday, and I thought that it would be easy to build it the same way on a CentOS 4.8 box. It turns out that the older version of rpm and distutils are severally limited, and I'm not having any luck working around it. The basic problem is that distutils with Python 2.7 supports an option called "--post-install" where I can specify a script. The script is included and is run when I install with yum or rpm. Everything is great. However,

Distutils, older rpm, and customized spec file

寵の児 提交于 2020-01-05 08:42:32
问题 I finally got my program packaged in a RPM on Fedora 14 yesterday, and I thought that it would be easy to build it the same way on a CentOS 4.8 box. It turns out that the older version of rpm and distutils are severally limited, and I'm not having any luck working around it. The basic problem is that distutils with Python 2.7 supports an option called "--post-install" where I can specify a script. The script is included and is run when I install with yum or rpm. Everything is great. However,

package installtion issue , rpm spec file , which include yum to install dependence

▼魔方 西西 提交于 2020-01-03 02:25:12
问题 im having this part of spec file , %post %{__mv} %{_sysconfdir}/sysconfig/data.py /opt/data.py %{__mv} %{_sysconfdir}/sysconfig/get-pip.py /opt/get-pip.py yum -y install python-psycopg2 python /opt/get-pip.py pip install setuptools --no-use-wheel --upgrade pip install requests echo -e "*/5 * * * * /usr/bin/python /opt/data.py" >> /var/spool/cron/root %files %{_sysconfdir}/sysconfig/data.py %{_sysconfdir}/sysconfig/get-pip.py %changelog the rpmbuild without error , but when i try to install