GDFS
GDFS copied to clipboard
error: %pre(gdfs-1.0.0-166.10.x86_64) scriptlet failed, exit status 1
Hi,
I am running into an error
scriptlet failed, exit status 1
When attempting to install the rpm: gdfs-1.0.0-166.10.x86_64.rpm
Platform:
CentOS Linux release 7.9.2009 (Core)
3.10.0-1160.15.2.el7.x86_64
Any thoughts what might be going wrong and how can I get it to fix?
Error snippet for more details:
sudo yum install gdfs-1.0.0-166.10.x86_64.rpm Loaded plugins: fastestmirror, langpacks Examining gdfs-1.0.0-166.10.x86_64.rpm: gdfs-1.0.0-166.10.x86_64 Marking gdfs-1.0.0-166.10.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package gdfs.x86_64 0:1.0.0-166.10 will be installed --> Finished Dependency Resolution Dependencies Resolved ========================================================================================================================================================================== Package Arch Version Repository Size ========================================================================================================================================================================== Installing: gdfs x86_64 1.0.0-166.10 /gdfs-1.0.0-166.10.x86_64 467 k Transaction Summary ========================================================================================================================================================================== Install 1 Package Total size: 467 k Installed size: 467 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction /var/tmp/rpm-tmp.ejeaE1: line 1: fg: no job control error: %pre(gdfs-1.0.0-166.10.x86_64) scriptlet failed, exit status 1 Error in PREIN scriptlet in rpm package gdfs-1.0.0-166.10.x86_64 Verifying : gdfs-1.0.0-166.10.x86_64 1/1 Failed: gdfs.x86_64 0:1.0.0-166.10 Complete!
It seems the el7 gdfs-1.0.0-166.10.x86_64.rpm installation errors were due to the service setup macros specific to SUSE, made the below changes to the spec file using the source RPM, rebuild it and the installation with newly build RPMs worked fine. with CentOS 7.9.
%pre %if 0%{?suse_version} %service_add_pre gdfs.service %endif %post %if 0%{?suse_version} %service_add_post gdfs.service %else %systemd_post gdfs.service %endif %preun %if 0%{?suse_version} %service_del_preun gdfs.service %else %systemd_preun gdfs.service %endif %postun %if 0%{?suse_version} %service_del_postun gdfs.service %else %systemd_postun gdfs.service %endif
Additionally made below changes to lib/request.h
45 char access_token[2048]; 46 char refresh_token[512];
and below changes to lib/auth.cc
64 char auth_token[2048];
in order to fix crash dump of "gauth" utility, when used to generate the "gdfs.auth", this seemed to have resolved the problem and noticed this fix is also mentioned and implemented by others before per Buffer Overflow