Rpmbuild asks for extra dependencies - wildfly

I am trying to build an RPM on Centos 7. I am making a wildfly application into RPM using below SPEC file.
Name: wildfly
Version: 16.0.0.Final
Release: 1%{?dist}
Summary: WildFly Application Server
Group: System Environment/Daemons
License: LGPL 2.1
Source0: %{name}-%{version}.tar.gz
Requires(pre): shadow-utils
Requires: java >= 1.7.0
#Requires: /etc/init.d/functions
Provides: wildfly
%undefine _missing_build_ids_terminate_build
%define __arch_install_post QA_SKIP_RPATHS=2 %{__arch_install_post}
%define __jar_repack 0
%description
WildFly Application Server packaged from the binary distribution.
%prep
%setup -q -n wildfly-%{version}
%install
mkdir -p %{buildroot}/opt/wildfly
cp -R . %{buildroot}/opt/wildfly
mkdir -p %{buildroot}/var/log/wildfly
mkdir -p %{buildroot}/var/run/wildfly
#%post
#alternatives --install /etc/alternatives/wildfly wildfly /opt/wildfly 100
#%postun
#alternatives --remove wildfly /opt/wildfly
%files
%defattr(-,root,root,0755)
%files
%defattr(-,root,root,0755)
%dir /opt/wildfly
/opt/wildfly/appclient
/opt/wildfly/bin
/opt/wildfly/domain
/opt/wildfly/jboss-modules.jar
/opt/wildfly/modules
%attr(-,wildfly,wildfly) /opt/wildfly/standalone
/opt/wildfly/welcome-content
%dir /var/log/wildfly
%dir /var/run/wildfly
%doc /opt/wildfly/copyright.txt
%doc /opt/wildfly/LICENSE.txt
%doc /opt/wildfly/README.txt
%doc /opt/wildfly/docs
%changelog
* Wed Nov 24 2021
- First version being packaged
On building, i noticed that it is taking certain dependencies which i didn't defined in SPEC file.
Requires: /bin/bash /bin/sh libaio.so.1 libaio.so.1()(64bit) libaio.so.1(LIBAIO_0.1) libaio.so.1(LIBAIO_0.1)(64bit) libaio.so.1(LIBAIO_0.4) libaio.so.1(LIBAIO_0.4)(64bit) libc.so.1()(64bit) libc.so.1(SUNW_0.7)(64bit) libc.so.1(SUNW_0.9)(64bit) libc.so.6 libc.so.6()(64bit) libc.so.6(GLIBC_2.0) libc.so.6(GLIBC_2.1.3) libc.so.6(GLIBC_2.10) libc.so.6(GLIBC_2.10)(64bit) libc.so.6(GLIBC_2.2) libc.so.6(GLIBC_2.2.5)(64bit) libdl.so.1()(64bit) libdl.so.1(SUNW_0.7)(64bit) libdl.so.2 libdl.so.2()(64bit) libdl.so.2(GLIBC_2.0) libdl.so.2(GLIBC_2.1) libdl.so.2(GLIBC_2.2.5)(64bit) libgcc_s.so.1()(64bit) rtld(GNU_HASH)
So when I try to install this RPM on Centos 7 machine, it throws the following error.
sudo rpm -ivh wildfly-16.0.0.Final-1.el7.x86_64.rpm
error: Failed dependencies:
libaio.so.1 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.1) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.1)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.4) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libaio.so.1(LIBAIO_0.4)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1(SUNW_0.7)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.1(SUNW_0.9)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.0) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.1.3) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.10) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libc.so.6(GLIBC_2.2) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.1()(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.1(SUNW_0.7)(64bit) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2 is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2(GLIBC_2.0) is needed by wildfly-16.0.0.Final-1.el7.x86_64
libdl.so.2(GLIBC_2.1) is needed by wildfly-16.0.0.Final-1.el7.x86_64
How can I solve the above dependencies issue. I already installed
sudo yum install libaio -y
Still dependencies issues are coming. Please help.

You need to package libaio.so.1 in your RPM as well, and fix the RPATHs to find it. Don't use QA_SKIP_RPATHS unless you know what you're doing - they're there for a reason!
The libc and libdl problems imply you're not using the system compilers and have your own toolchain installed; that's going to be another problem. Is there a reason you can't use the stock gcc?
Further examination makes it look like you're trying to make a "fancy tarball" RPM and not doing the actual compilation with rpmbuild, which can lead to more problems - where did the binaries come from? Another CentOS box, or a different distribution? The SUNW tag in particular worries me.

Related

Systemd service in package is restarted on upgrade

I use debhelper with python setuptools in order to build my packages.
I recently updated the compatibility level 9 to 11 in order to use the systemd timers.
From that moment every time I upgrade the package the service contained is restarted.
I tried to build with the following rules:
#! /usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=my_pkg
export DH_ALWAYS_EXCLUDE=CVS:.svn:.git:.vscode*
export PYBUILD_INTERPRETERS=python3
%:
dh $# --with python3 --buildsystem=pybuild
override_dh_installinit:
dh_installinit --no-stop-on-upgrade --no-restart-on-upgrade --no-restart-after-upgrade --no-start
override_dh_systemd_enable:
dh_systemd_enable --name=my_pkg
override_dh_systemd_start:
dh_systemd_start --no-stop-on-upgrade --no-restart-on-upgrade --no-restart-after-upgrade --no-start
python3 setup.py clean --all
According to the documentation those tags should do what I look for but probably there is something I'm missing:
dh_systemd_start
dh_installinit
Every time I update it the service contained is restarted.
The service is running the update itself so when is restarted the update is left uncompleted.
As expected I was looking in the wrong direction.
The correct option to use is:
dh_installsystemd
change the rule file into:
#! /usr/bin/make -f
#export DH_VERBOSE = 1
export PYBUILD_NAME=my_pkg
export DH_ALWAYS_EXCLUDE=CVS:.svn:.git:.vscode*
export PYBUILD_INTERPRETERS=python3
%:
dh $# --with python3 --buildsystem=pybuild
override_dh_systemd_enable:
dh_systemd_enable --name=my_pkg
override_dh_installsystemd:
dh_installsystemd --no-restart-after-upgrade
override_dh_systemd_start:
python3 setup.py clean --all
I hope this will help someone else in the same situation.

Segfault on mongodb extension 1.1.2/1.1.3-dev with PHP 7 FPM under gentoo

I am heaving a strange problem under gentoo. Mongodb extension is working fine in apache2 and cli, but fpm fails to start:
/etc/init.d/php-fpm restart
* Testing PHP FastCGI Process Manager configuration ...
[30-Jan-2016 13:59:47] NOTICE: configuration file /etc/php/fpm-php7.0/php-fpm.conf test is successful
zend_mm_heap corrupted [ !! ]
php -v
PHP 7.0.2-pl5-gentoo (cli) (built: Jan 30 2016 13:16:21) ( ZTS )
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Here is the info from cli:
php -i|grep mongo
mongodb
mongodb support => enabled
mongodb version => 1.1.3-dev
mongodb stability => devel
libmongoc version => 1.3.1-dev
mongodb.debug => no value => no value
I even compiled mongodb without sasl but the result is the same.
Mongodb extension was manually compiled like this(my system is x86_64):
git clone https://github.com/mongodb/mongo-php-driver.git
cd mongo-php-driver; git submodule sync && git submodule update --init
Run phpize:
phpize --clean
phpize
Remove the aclocal.m4 file:
rm aclocal.m4
Run aclocal and autoconf:
aclocal
autoconf
Now configure, make and install the package:
./configure --without-mongodb_sasl (i tried with and without this)
make
make install
add extension=mongodb.so in php.ini: /etc/php/fpm-php7.0/php.ini
restart php-fpm: /etc/init.d/php-fpm restart
The strangest thing is that if i start php-fpm process with gdb to backtrace the extensions works.
gdb -q /usr/lib/php7.0/bin/php-fpm
Reading symbols from /usr/lib/php7.0/bin/php-fpm...(no debugging symbols found)...done.
(gdb) set args --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
(gdb) run
Starting program: /usr/lib64/php7.0/bin/php-fpm --pid /run/php-fpm.pid --fpm-config /etc/php/fpm-php7.0/php-fpm.conf -c /etc/php/fpm-php7.0/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[Inferior 1 (process 4075) exited normally]
(gdb)
Any help is apreciated
For the sake of the lazy googler, this is fixed in version 1.1.5 of the php-mongodb-driver

letsencrypt-auto certonly does'nt work

no matter which command I use with ./letsencypt-auto the result is always the same as blew, am I missing something here.
here is an output on ./letsencrypt-auto certonly.
[root#tipsycore letsencrypt]# ./letsencrypt-auto certonly
#Bootstrapping dependencies for RedHat-based OSes...
#yum is /usr/bin/yum
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package python-2.6.6-64.el6.x86_64 already installed and latest version
#Package python-devel-2.6.6-64.el6.x86_64 already installed and latest #version
#Package python-virtualenv-1.10.1-1.el6.noarch already installed and latest #version
#Nothing to do
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package gcc-4.4.7-16.el6.x86_64 already installed and latest version
#Package dialog-1.1-9.20080819.1.el6.x86_64 already installed and latest #version
#Package augeas-libs-1.0.0-10.el6.x86_64 already installed and latest version
#Package openssl-devel-1.0.1e-42.el6_7.2.x86_64 already installed and latest #version
#Package libffi-devel-3.0.5-3.2.el6.x86_64 already installed and latest #version
#Package redhat-rpm-config-9.0.3-44.el6.centos.noarch already installed and #latest version
#Package ca-certificates-2015.2.4-65.0.1.el6_6.noarch already installed and #latest version
#Nothing to do
#Loaded plugins: fastestmirror, refresh-packagekit, security
#Setting up Install Process
#Loading mirror speeds from cached hostfile
# * base: mirror.zetup.net
# * epel: ftp.lysator.liu.se
# * extras: mirror.zetup.net
# * updates: mirror.zetup.net
#Package 2:mod_ssl-2.2.15-47.el6.vm.x86_64 already installed and latest #version
#Nothing to do
#WARNING: Python 2.6 support is very experimental at present...
#if you would like to work on improving it, please ensure you have backups
#and then run this script again with the --debug flag!
#[root#tipsycore letsencrypt]#
Try this:
Lets encrypt Centos 6
# yum install centos-release-SCL
# yum install python27 python27-python-devel python27-python-setuptools python27-python-tools python27-python-virtualenv
# ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64/libpython2.7.so.1.0
# ln -s /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0 /usr/lib64/libpython2.7.so
# ll /usr/lib64/libpyt*
lrwxrwxrwx. 1 root root 19 Aug 22 2016 /usr/lib64/libpython2.6.so -> libpython2.6.so.1.0
-r-xr-xr-x. 1 root root 1669840 Aug 18 2016 /usr/lib64/libpython2.6.so.1.0
lrwxrwxrwx 1 root root 51 Mar 1 17:59 /usr/lib64/libpython2.7.so -> /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0
lrwxrwxrwx 1 root root 51 Mar 1 17:59 /usr/lib64/libpython2.7.so.1.0 -> /opt/rh/python27/root/usr/lib64/libpython2.7.so.1.0
# /opt/rh/python27/root/usr/bin/python2.7 -V
Python 2.7.8
# vim ~/.bash_profile
PATH=/opt/rh/python27/root/usr/bin/:$PATH:$HOME/bin
export PATH
# python -V
Python 2.6.6
# source ~/.bash_profile
# python -V
Python 2.7.8
# git clone https://github.com/letsencrypt/letsencrypt
# cd /opt/letsencrypt/
# service nginx stop
# ./letsencrypt-auto certonly --standalone -d <YOUR_DOMAIN.COM>
The problem is (somewhat confusingly) described by the last message you get in the output from letsencrypt-auto:
#WARNING: Python 2.6 support is very experimental at present...
#if you would like to work on improving it, please ensure you have backups
#and then run this script again with the --debug flag!
The LetsEncrypt client you are running requires Python 2.7 or above. You have Python 2.6 installed. I have a blog post describing the way I solved this problem: https://thelastcicada.com/solving-the-python-2-6-issue-for-letencrypt-on-centos-6. Below I will go into further detail and summarize my solution.
I'm going to assume from this issue and the output of your letsencrypt-auto that you are running CentOS 6 or a similar RHEL6-based operating system. This is important because systems tools on CentOS 6 are all based on Python 2.6 (yum in particular is) and your system can therefore not upgrade safely past Python 2.6. CentOS 7 doesn't have this problem and comes packaged with a newer version of Python.
To solve this on CentOS 6, you could run letsencrypt-auto --debug, as noted in the error message, but that just allows you to run the experimental Python 2.6 code that isn't yet well supported. Alternatively, you can use Software Collections to install Python 2.7 on CentOS 6 in it's own environment that can run alongside Python 2.6 and not mess up your system's default Python installation.
The basic steps are:
yum install centos-release-SCL to install the Software Collections package
yum install python27 to install Python 2.7
scl enable python27 "/root/letsencrypt/letsencrypt-auto certonly --agree-tos --webroot --webroot-path /var/www/html/mywebsite.com -d mywebsite.com" to run the LetsEncrypt client using the Python 2.7 version via Software Collections. The flags passed to letsencrypt-auto are typical ones I use when requesting an SSL certificate to install with Nginx - your configuration my vary.
Hope this helps and good luck!

Core dump while running 'rake rails:update:bin' during Rails 4 upgrade

I'm upgrading an existing Rails 3.2 application to Rails 4. I'm using ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux] through rbenv, on Ubuntu 13.04. I was using the '--binstubs' option with Rails 3.2. During the upgrade, I:
upgraded Rails to Rails 4.0.0
upgraded the Gemfile with the latest Rails 4 equivalent gems
ran 'bundle config --delete bin && rm -rf bin'
Running 'rake rails:update:bin' core dumps with the top few lines being:
/home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0039 p:---- s:0128 b:0128 l:000127 d:000127 CFUNC :require
c:0038 p:0010 s:0124 b:0124 l:000116 d:000123 BLOCK /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0037 p:0071 s:0122 b:0122 l:000121 d:000121 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
/home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: [BUG] Segmentation fault
ruby 1.9.3p429 (2013-05-15 revision 40747) [x86_64-linux]
Given the size of the Gem and error output, I have created a gist at https://gist.github.com/grcarey/6109181, that contains the Gemfile and the output from the rake command.
Some ideas on solving this would be greatly appreciated.
---------- Update -----------
Running the command with 'ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]' gives the following few lines in the error output:
-- Control frame information -----------------------------------------------
c:0039 p:---- s:0128 b:0128 l:000127 d:000127 CFUNC :require
c:0038 p:0010 s:0124 b:0124 l:000116 d:000123 BLOCK /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0037 p:0071 s:0122 b:0122 l:000121 d:000121 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
c:0036 p:0019 s:0117 b:0117 l:000116 d:000116 METHOD /home/user/projects/proj_name/.bundle/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
c:0035 p:0011 s:0112 b:0112 l:000111 d:000111 TOP /home/user/projects/proj_name/.bundle/gems/nokogiri-1.6.0/lib/nokogiri/xml.rb:1
c:0034 p:---- s:0110 b:0110 l:000109 d:000109 FINISH
Segmentation fault
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-linux]
Problem solved.
I had been using the bundle binstubs option in Rails 3.2 and I hadn't deleted the project's bundle and bin dirs prior to the upgrade.
After deleting these dirs and re-running bundle install, then running rake rails:update:bin the problem was solved.

Trying to install meteor on centos 5

OS: Red Hat Enterprise Linux Server release 5.5 (Tikanga)
Trying to run this command to install meteor:
curl install.meteor.com | /bin/sh
============= Output Error ===============
Installing /tmp/meteor-install-Nv47529/meteor-0.3.6-1.x86_64.rpm
error: Failed dependencies:
libc.so.6(GLIBC_2.6)(64bit) is needed by meteor-0.3.6-1.x86_64
libc.so.6(GLIBC_2.7)(64bit) is needed by meteor-0.3.6-1.x86_64
libc.so.6(GLIBC_2.9)(64bit) is needed by meteor-0.3.6-1.x86_64
libstdc++.so.6(GLIBCXX_3.4.9)(64bit) is needed by meteor-0.3.6-1.x86_64
Installation failed.
============= Output Error ===============
glib is missing showing but check glib using
rpm -qa --qf="%{n}-%{v}-%{r}.%{arch}\n" | grep glibc | sort
showing me
compat-glibc-2.3.4-2.26.i386
compat-glibc-2.3.4-2.26.x86_64
compat-glibc-headers-2.3.4-2.26.x86_64
glibc-2.5-49.el5_5.7.i686
glibc-2.5-49.el5_5.7.x86_64
glibc-common-2.5-49.el5_5.7.x86_64
glibc-devel-2.5-49.el5_5.7.i386
glibc-devel-2.5-49.el5_5.7.x86_64
glibc-headers-2.5-49.el5_5.7.x86_64
glibc-utils-2.5-49.el5_5.7.x86_64
so any idea what is the issue?
GLIBC_2.6 is required by the RPM, you only have GLIBC_2.5 so you need to upgrade.
Alternatively, this dependency may be more strict than it needs to be; try packing Meteor yourself.