Discussion:
[Ltib] RPM archive is empty after ./ltib -m scdeploy command
L P
2015-01-08 10:17:34 UTC
Permalink
I am hoping someone, or a few more knowledgeable programmers, can provide an answer.


Problem Statement


I have two packages that successfully build and install, scbuild and scinstall, respectively.

The files listed in the .spec file were found, copied, and stored in the correct directories in the tmp folder. Files were confirmed.


However, after executing scdeploy [./ltib -m scdeploy -p <pkg>], the <pkg>.rpm has a file size of 1.3KB and is empty, far less than the 12MB.


What is the possible reason(s) this could occur?


Details:


File Specification Type A:


The 20 packages that successfully generate a RPM package containing files have a general file list, i.e.

%files

%defattr (-,root,root)

%(pfx)/*


The two packages that generate empty RPM packages were modified to list the individual files as a “best coding practice” and provide traceability.


File Specification Type B:


%files

%defattr (-,root,root)

%{pfx}%{libdir}/libgstaudio-%{majorminor}.so


.





To summarize, File Type A generates a proper RPM package, while Type B generates RPM packages that are empty (file size = 1.3KB).


Other Details


TI vendor BSP

Cross-compilation to ARM processor

Modifying spec files to add support for additional Gstreamer plugins

Disto: Ubuntu 14.04.01

LTIB version 1.93



Thank you,


Leo


Sent from Windows Mail
Stuart Hughes
2015-01-08 12:59:55 UTC
Permalink
Hi Leo,

I think the problem is with your %files section rather than an issue
with scdeploy. I don't think your file selector is picking up any
files. This could be because one of the terms in
%{libdir}/libgstaudio-%{majorminor}.so does not expand correctly, or
because the path is not quite right.

Here's something you could try: clone your built project (rsync -av
/path/to/project project_clone) and then:

cd project_clone
rm -rf rpm/BUILD/_pkg_dir_
../ltib -p _pkg_

then take a look at the package itself. I suspect you'll find the fully
built package is also small. If it is, then the problem is with the
%files clause.

My advice would be to use the recommended ltib template pattern of:
%files
%defattr (-,root,root)
%(pfx)/*

I am aware of all the things you can do in RPM spec files, but the idea
was to keep the .spec files as simple as possible and only use them in ltib.

Regards, Stuart
Post by L P
I am hoping someone, or a few more knowledgeable programmers, can provide an answer.
Problem Statement
I have two packages that successfully build and install, scbuild and
scinstall, respectively.
The files listed in the .spec file were found, copied, and stored in
the correct directories in the tmp folder. Files were confirmed.
However, after executing scdeploy [./ltib -m scdeploy -p <pkg>], the
<pkg>.rpm has a file size of 1.3KB and is empty, far less than the 12MB.
What is the possible reason(s) this could occur?
_Details:_
The 20 packages that successfully generate a RPM package containing
files have a general file list, i.e.
%files
%defattr (-,root,root)
%(pfx)/*
The two packages that generate empty RPM packages were modified to
list the individual files as a "best coding practice" and
provide traceability.
%files
%defattr (-,root,root)
%{pfx}%{libdir}/libgstaudio-%{majorminor}.so
....
To summarize, File Type A generates a proper RPM package, while Type B
generates RPM packages that are empty (file size = 1.3KB).
_Other Details_
TI vendor BSP
Cross-compilation to ARM processor
Modifying spec files to add support for additional Gstreamer plugins
Disto: Ubuntu 14.04.01
LTIB version 1.93
Thank you,
Leo
Sent from Windows Mail
_______________________________________________
LTIB home page: http://ltib.org
Ltib mailing list
https://lists.nongnu.org/mailman/listinfo/ltib
L P
2015-01-08 13:21:07 UTC
Permalink
Stuart,


Thank you for your response. I concur with your assessment. Shortly after posting my initial question, I discovered a few “quirks”.


1. The # does not effectively mask comments or undesired code.

Example


%files

#makeinstall


The makeinstall command will be processed generating an a series of error statements

- The file must begin with ‘/’.


2. Additionally, adding a wildcard to file appendix, libgstaudio-%{majorminor}.so* creates two issues with the interpreter.


The variable %{majorminor} is not transformed to 0.10, although ‘%define majorminor 0.10’ is defined in the spec file.



3. After replacing the %{majorminor} with ‘0.10’, effectively hardcoding the [Gstreamer] file spec, only several files were packed.

It is quite bewildering and too much time has been lost. Echo statements outside of the %files directive verified the correct expansion.


In retrospect, using %{pfx}/* is an effective solution for packing but the programmer loses visibility as to which files were packed.


There doesn't seem to be a programmatic solution for verification or am I incorrect?

If the files stored in the tmp folder were archived directly into a .RPM, this appear to be ideal and consistent with intuition.


Once again Stuart, “Thank you for your response”.




Sent from Windows Mail





From: Stuart Hughes
Sent: ‎Thursday‎, ‎January‎ ‎08‎, ‎2015 ‎8‎:‎00‎ ‎AM
To: L P
Cc: ***@nongnu.org





Hi Leo,

I think the problem is with your %files section rather than an issue with scdeploy. I don't think your file selector is picking up any files. This could be because one of the terms in %{libdir}/libgstaudio-%{majorminor}.so does not expand correctly, or because the path is not quite right.

Here's something you could try: clone your built project (rsync -av /path/to/project project_clone) and then:

cd project_clone
rm -rf rpm/BUILD/_pkg_dir_
../ltib -p _pkg_

then take a look at the package itself. I suspect you'll find the fully built package is also small. If it is, then the problem is with the %files clause.

My advice would be to use the recommended ltib template pattern of:
%files
%defattr (-,root,root)
%(pfx)/*

I am aware of all the things you can do in RPM spec files, but the idea was to keep the .spec files as simple as possible and only use them in ltib.

Regards, Stuart


On 08/01/15 10:17, L P wrote:



I am hoping someone, or a few more knowledgeable programmers, can provide an answer.




Problem Statement




I have two packages that successfully build and install, scbuild and scinstall, respectively.

The files listed in the .spec file were found, copied, and stored in the correct directories in the tmp folder. Files were confirmed.




However, after executing scdeploy [./ltib -m scdeploy -p <pkg>], the <pkg>.rpm has a file size of 1.3KB and is empty, far less than the 12MB.




What is the possible reason(s) this could occur?




Details:




File Specification Type A:




The 20 packages that successfully generate a RPM package containing files have a general file list, i.e.

%files

%defattr (-,root,root)

%(pfx)/*




The two packages that generate empty RPM packages were modified to list the individual files as a “best coding practice” and provide traceability.




File Specification Type B:




%files

%defattr (-,root,root)

%{pfx}%{libdir}/libgstaudio-%{majorminor}.so


.





To summarize, File Type A generates a proper RPM package, while Type B generates RPM packages that are empty (file size = 1.3KB).




Other Details




TI vendor BSP

Cross-compilation to ARM processor

Modifying spec files to add support for additional Gstreamer plugins

Disto: Ubuntu 14.04.01

LTIB version 1.93







Thank you,




Leo


Sent from Windows Mail






_______________________________________________
LTIB home page: http://ltib.org

Ltib mailing list
***@nongnu.org
https://lists.nongnu.org/mailman/listinfo/ltib

Loading...