install from rpm
dragonfly-net opened this issue · 5 comments
When i build rpm package via rpmbuild and install it to other host, i got error
Failed to start LDAP authentication helper for Nginx.
ls -la /var/log/nginx-ldap-auth/
total 4
drwxr-x--- 2 root root 6 Apr 9 12:46 .
But after
chown -R nginx-ldap-auth /var/log/nginx-ldap-auth
it starts good.
Could you please post your .spec file and rpmbuild command output?
rpm -qlp $resulting_package
would also be nice to see.
In the spec we have /var/log/nginx-ldap-auth/daemon.log
file is created which you don't have.
Spec file from git
git clone https://github.com/nginxinc/nginx-ldap-auth
then
cp nginx-ldap-auth/rpm/nginx-ldap-auth.spec rpmbuild/SPECS/
mv nginx-ldap-auth nginx-ldap-auth-0.0.5
tar -czf nginx-ldap-auth-release-0.0.5.tar.gz nginx-ldap-auth-0.0.5
mv *.gz rpmbuild/SOURCES/
cd rpmbuild/SPECS/
rpmbuild -bb nginx-ldap-auth.spec
$ rpm -qlp ../RPMS/x86_64/nginx-ldap-auth-0.0.5-1.el7.x86_64.rpm
/etc/default/nginx-ldap-auth
/etc/logrotate.d/nginx-ldap-auth
/usr/bin/nginx-ldap-auth-daemon
/usr/lib/systemd/system/nginx-ldap-auth.service
/usr/share/doc/nginx-ldap-auth-0.0.5
/usr/share/doc/nginx-ldap-auth-0.0.5/LICENSE
/usr/share/doc/nginx-ldap-auth-0.0.5/README.md
/usr/share/doc/nginx-ldap-auth-0.0.5/backend-sample-app.py
/usr/share/doc/nginx-ldap-auth-0.0.5/nginx-ldap-auth.conf
/var/log/nginx-ldap-auth
/var/log/nginx-ldap-auth/daemon.log
Then same host, from root
[root@delta ~]# rpm -Uvh /home/builder/rpmbuild/RPMS/x86_64/nginx-ldap-auth-0.0.5-1.el7.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:nginx-ldap-auth-0.0.5-1.el7 ################################# [100%]
warning: user nginx-ldap-auth does not exist - using root
warning: group nginx-ldap-auth does not exist - using root
[root@delta ~]# ls -la /var/log/nginx-ldap-auth/
total 8
drwxr-x---. 2 root root 4096 Apr 11 10:11 .
drwxr-xr-x. 12 root root 4096 Apr 11 10:13 ..
[root@delta ~]#
In the spec we have /var/log/nginx-ldap-auth/daemon.log file is created which you don't have.
Even if logfile was installed, it can be logrotated, we need valid user on dir.
build log
https://pastebin.com/Aj3uEcct
Could you please try building and installing the RPM package once again? Now everything should be OK.
Feedback timeout.