This session my goal is to delve into the creation of a spec file from the ground up (scratch). In the initial stages of this file creation process I have encountered a few errors, due to a few typos that were made in the spec file...fixed. Now another issue has poked its head, I continue to receive rpm build errors, such as the following:
Making install in fe-text
make[3]: Entering directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[4]: Entering directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
test -z "/usr/bin" || /bin/mkdir -p "irssi/usr/bin"
/bin/mkdir: cannot create directory `irssi': Not a directory
make[4]: *** [install-binPROGRAMS] Error 1
make[4]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15'
make: *** [install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.Fe7ScR (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.Fe7ScR (%install)
Making install in fe-text
make[3]: Entering directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[4]: Entering directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
test -z "/usr/bin" || /bin/mkdir -p "irssi/usr/bin"
/bin/mkdir: cannot create directory `irssi': Not a directory
make[4]: *** [install-binPROGRAMS] Error 1
make[4]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[3]: *** [install-am] Error 2
make[3]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src/fe-text'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15/src'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/home/sbr/rpmbuild/BUILD/irssi-0.8.15'
make: *** [install] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.Fe7ScR (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.Fe7ScR (%install)
Well I was stumped for a bit , upon encountering a number of build errors. However, I reached out to Chris Tyler for some assistance with the problem, I was facing. It so happen that as the build error states - # /bin/mkdir: cannot create directory `irssi': Not a directory, as Chris Tyler pointed out to me, the make install line spec file was pointed to the wrong path. At the time of the build my make install path was set as DESTDIR=irssi (which obviously is not the correct directory). What the path was changed to reflect, and should have been from the beginning is DESTDIR=$RPM_BUILD_ROOT. Once I change to the correct path, I had some issues regarding missing macros in my spec file...please stay tuned for future details regardiing my progression with this build.
As a continuation to my ongoing learning curve. I interestingly enough came across an issue, where I was prompted with an error message of "error: Installed (but unpackaged) file(s) found:" ---> followed by a long listing of files that needed to be identified in the spec file based on the proper file path or predefined macros eg. %{_bindir}/* specifies files for /usr/bin directory. My concern was with the setting of the path in my spec file to reflect /usr/share/doc/irssi and /usr/share/irssi (not knowing the problems it may or may not create). As you can see irssi reside in the same path for both directories.
However, I was able to resolve that issue with the assistance of Chris Tyler who offered a number of strategic steps to overcome and/or prevent any potential problems in the unforseen future. I added the following lines to my spec file and everything checked out good as illustrated by the results below: (1) Spec changes (2) Recent outputted results after making the changes and running rpmbuild -ba <specfile name>
Snippet of recent output
libpthread.so.0(GLIBC_2.2.5)(64bit) libresolv.so.2()(64bit) libtinfo.so.5()(64bit) libutil.so.1()(64bit) perl(Carp) perl(DynaLoader) perl(Exporter) perl(strict) perl(vars) rtld(GNU_HASH)
As a continuation to my ongoing learning curve. I interestingly enough came across an issue, where I was prompted with an error message of "error: Installed (but unpackaged) file(s) found:" ---> followed by a long listing of files that needed to be identified in the spec file based on the proper file path or predefined macros eg. %{_bindir}/* specifies files for /usr/bin directory. My concern was with the setting of the path in my spec file to reflect /usr/share/doc/irssi and /usr/share/irssi (not knowing the problems it may or may not create). As you can see irssi reside in the same path for both directories.
However, I was able to resolve that issue with the assistance of Chris Tyler who offered a number of strategic steps to overcome and/or prevent any potential problems in the unforseen future. I added the following lines to my spec file and everything checked out good as illustrated by the results below: (1) Spec changes (2) Recent outputted results after making the changes and running rpmbuild -ba <specfile name>
Snippet of recent output
libpthread.so.0(GLIBC_2.2.5)(64bit) libresolv.so.2()(64bit) libtinfo.so.5()(64bit) libutil.so.1()(64bit) perl(Carp) perl(DynaLoader) perl(Exporter) perl(strict) perl(vars) rtld(GNU_HASH)
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/sbr/rpmbuild/BUILDROOT/irssi-0.8.15-1.fc12.x86_64
Wrote: /home/sbr/rpmbuild/SRPMS/irssi-0.8.15-1.fc12.src.rpm
Wrote: /home/sbr/rpmbuild/RPMS/x86_64/irssi-0.8.15-1.fc12.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.4OqPri
+ umask 022
+ cd /home/sbr/rpmbuild/BUILD
+ cd irssi-0.8.15
+ rm -rf /home/sbr/rpmbuild/BUILDROOT/irssi-0.8.15-1.fc12.x86_64
+ exit 0
Wrote: /home/sbr/rpmbuild/SRPMS/irssi-0.8.15-1.fc12.src.rpm
Wrote: /home/sbr/rpmbuild/RPMS/x86_64/irssi-0.8.15-1.fc12.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.4OqPri
+ umask 022
+ cd /home/sbr/rpmbuild/BUILD
+ cd irssi-0.8.15
+ rm -rf /home/sbr/rpmbuild/BUILDROOT/irssi-0.8.15-1.fc12.x86_64
+ exit 0
As mentioned the latest output above occured since I made a few changes to my spec file with the assistance of Chris and one of my other colleagues...looks good...moving on to running the rpmlint command to test for errors with the rpm package created...will let you know how that goes.
Well I ran rpmlint on the spec file, RPMS and SRPMS directory, and crossed my fingers hoping for no errors. Unfortunately today wasn't the day that would see me successfully finish my build of irssi. I provided a view of the error message received, when I executed the rpmlint command (below). The result of the test 8 errors and 33 warnings. Not the outcome I wanted.
My course of action now involves determining what these errors mean, and find a way to safely fix them.
No comments:
Post a Comment