[opensuse-packaging] How to disable debug for a local osc build of a new package not existing on OBS server?
Hi, all I'm building a package locally, by using the powerful "osc", I can get lots of useful rpmlint information. But due to "Plenty of reasons", the package can't exist on OBS at all. I'm planning to build it and upload it to my personal dropbox for further use. I created the package by osc mkpac, so actually the package isn't on OBS server until I run "osc ci". And the package can't generate useful debug info because it's a commercial and ugly package, so I decided to turn it off. Then here's the problem: the local package seems to inherit my repository settings automatically, which has debug info on. while because the package isn't on server right now, I can't use command like "osc meta pkg -e" to disable debug info, which actually create the package on server. even if it's an authorized package, doing this will return you a "packge existed" error when you run "osc ci" later. OBS controls the generation of debug info, but it also does so to a theoretically non-exist package. I have checked .osc directory, which has no such settings. So how can I turn debuginfo off for such a package? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
I'm not sure on how to do this for openSUSE but in Fedora/Red Hat you just need the following line in the spec file: %debug_package %{nil} This might also work, it's a matter of testing it. NM No dia 21 de Março de 2012 21:56, Marguerite Su escreveu:
Hi, all
I'm building a package locally, by using the powerful "osc", I can get lots of useful rpmlint information.
But due to "Plenty of reasons", the package can't exist on OBS at all. I'm planning to build it and upload it to my personal dropbox for further use.
I created the package by osc mkpac, so actually the package isn't on OBS server until I run "osc ci".
And the package can't generate useful debug info because it's a commercial and ugly package, so I decided to turn it off.
Then here's the problem:
the local package seems to inherit my repository settings automatically, which has debug info on.
while because the package isn't on server right now, I can't use command like "osc meta pkg -e" to disable debug info, which actually create the package on server. even if it's an authorized package, doing this will return you a "packge existed" error when you run "osc ci" later.
OBS controls the generation of debug info, but it also does so to a theoretically non-exist package.
I have checked .osc directory, which has no such settings.
So how can I turn debuginfo off for such a package? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
-- Nelson Marques // I've stopped trying to understand sandwiches with a third piece of bread in the middle... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
So how can I turn debuginfo off for such a package?
osc build --disable-debuginfo
if you disable debug, do you then need to strip again or will rpm still strip the binary and just remove the debug files? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Thu, Mar 22, 2012 at 8:10 AM, Ammler
So how can I turn debuginfo off for such a package?
osc build --disable-debuginfo
if you disable debug, do you then need to strip again or will rpm still strip the binary and just remove the debug files?
Hi, NM, %debug_package %{nil} does not work, rpmbuild will tell you: error: Package already exists: %package debugsource yet Guido's --disable-debuginfo works very well. To Ammler: I'm redistributing binaries, so the libraries have already been stripped. But if you build without --disable-debuginfo, some of the outputs are: extracting debug info from /home/abuild/rpmbuild/BUILDROOT/Livestation-3.1.0-1.x86_64/opt/Livestation/Livestation.bin *** WARNING: No build ID note found in /home/abuild/rpmbuild/BUILDROOT/Livestation-3.1.0-1.x86_64/opt/Livestation/Livestation.bin WARNING: /opt/Livestation/lib/libavcodec.so.52 is already stripped! WARNING: /opt/Livestation/lib/libavformat.so.52 is already stripped! WARNING: /opt/Livestation/lib/libavutil.so.50 is already stripped! extracting debug info from /home/abuild/rpmbuild/BUILDROOT/Livestation-3.1.0-1.x86_64/opt/Livestation/lib/liblive555.so *** WARNING: No build ID note found in /home/abuild/rpmbuild/BUILDROOT/Livestation-3.1.0-1.x86_64/opt/Livestation/lib/liblive555.so WARNING: /opt/Livestation/lib/libswscale.so.0 is already stripped! cpio: /build/buildd/glibc-2.8~20080505/build-tree/glibc-20080505/csu: Cannot stat: No such file or directory as you can see, it tries to strip libraries. but they're gone with --disable-debuginfo. so I think you have to strip your libraries manually because it seems no strip command is called. Thanks for all your help. Another interesting thing I saw is if you build it normally, with debuginfo on actally cause no error, but if you specify it by adding #KEEP NOSOURCE DEBUGINFO to the header section of specfile. it will stop at the end of the scriptlets I pasted. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Ammler
-
Guido Berhoerster
-
Marguerite Su
-
Nelson Marques