Bug 443882

Summary: libfdt package request
Product: [Fedora] Fedora Reporter: Hollis Blanchard <hollis>
Component: dtcAssignee: Josh Boyer <jwboyer>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: jforbes, jwboyer, pbonzini, tony
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-28 14:42:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to build libfdt and libfdt-devel packages
none
correct patch
none
patch upgrading to upstream 1.3.0
none
upgrade to 1.3.0, fix FTBFS and provide a libfdt subpackage none

Description Hollis Blanchard 2008-04-23 20:40:32 UTC
Description of problem:
The dtc package does not include libfdt. Could it, or could a separate libfdt
package be created?

Comment 1 Josh Boyer 2008-04-24 00:47:56 UTC
To be clear, you're looking for libfdt.a and the libfdt.h and fdt.h header files
in a subpackage, correct?

Could you offer a little rationale for providing libfdt.a as static libraries
require and exception before they are allowed to be packaged per:

http://fedoraproject.org/wiki/PackagingDrafts/StaticLibraryPolicy

Comment 2 Hollis Blanchard 2008-04-24 03:53:31 UTC
A static library is not necessary, since I'm primarily concerned with qemu and
that can use a shared library.

(I don't expect that this library package will be used by freestanding
environments, such as firmware or the kernel.)

Comment 3 David Woodhouse 2008-04-24 05:30:16 UTC
A shared library needs an soname, so we'd want to fix that upstream. Then it
would be perfectly reasonable to ship it.

Comment 4 Jerone Young 2008-05-06 15:51:17 UTC
So a way to do this is to create a Makefile something like this for libfdt:

# Makefile.libfdt
#
# This is not a complete Makefile of itself.  Instead, it is designed to
# be easily embeddable into other systems of Makefiles.
#
LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c
LIBFDT_INCLUDES = fdt.h libfdt.h
LIBFDT_EXTRA = libfdt_internal.h
LIBFDT_LIB = libfdt/libfdt.a
LIBFDT_SHARED_LIB=libfdt.so

LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o)

CFLAGS += -I .

$(LIBFDT_objdir)/$(LIBFDT_LIB): $(addprefix $(LIBFDT_objdir)/,$(LIBFDT_OBJS))

$(LIBFDT_SHARED_LIB): $(LIBFDT_OBJS)
        $(CC) -shared -o $(LIBFDT_SHARED_LIB) $^

clean:
        rm -f $(LIBFDT_SHARED_LIB)


Comment 5 Bug Zapper 2008-05-14 10:02:11 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 Hollis Blanchard 2008-11-17 22:38:12 UTC
Is this held up waiting for an soname from the upstream dtc project?

Comment 7 Josh Boyer 2008-11-17 23:58:05 UTC
(In reply to comment #6)
> Is this held up waiting for an soname from the upstream dtc project?

Mostly.  I could just make the soname match the dtc version that libfdt is built from since it's being split out of there.  However, we'd probably want a common scheme across the various distros, so having upstream do the sonaming would be best.

Comment 8 Hollis Blanchard 2008-11-18 16:43:45 UTC
Are you going to contact the upstream project about this, or are you waiting for me to do it?

I had mistakenly thought this package was ready to go for F10. :(

Comment 9 Bug Zapper 2008-11-26 02:13:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Josh Boyer 2009-01-12 14:21:53 UTC
(In reply to comment #8)
> Are you going to contact the upstream project about this, or are you waiting
> for me to do it?
> 
> I had mistakenly thought this package was ready to go for F10. :(

I worked with upstream and there are patches accepted now that create a libfdt shared library.

I'll see if we can get a git snapshot into rawhide that installs these sometime this week.

Comment 11 Bug Zapper 2009-11-18 12:28:49 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 12 Bug Zapper 2009-12-18 06:07:10 UTC
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 13 Tony Breeds 2010-01-06 01:01:14 UTC
(In reply to comment #10)
> I worked with upstream and there are patches accepted now that create a libfdt
> shared library.
> 
> I'll see if we can get a git snapshot into rawhide that installs these sometime
> this week.  

Do we want a dtc-libfdt subpackage?

Comment 14 Bug Zapper 2010-03-15 11:59:33 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 15 Paolo Bonzini 2011-04-21 10:19:45 UTC
Created attachment 493776 [details]
patch to build libfdt and libfdt-devel packages

Backport of the upstream patch on top of 1.2.0.  I also fixed the installation (patch sent upstream) and included here the changes to the spec file.

rpmlint results for new packages:

libfdt.x86_64: W: invalid-url URL: http://dtc.ozlabs.org/
    <urlopen error [Errno -2] Name or service not known>
libfdt.x86_64: W: one-line-command-in-%post /sbin/ldconfig
libfdt.x86_64: W: one-line-command-in-%postun /sbin/ldconfig
libfdt-devel.x86_64: W: invalid-url URL: http://dtc.ozlabs.org/
    <urlopen error [Errno -2] Name or service not known>
libfdt-devel.x86_64: W: no-documentation

Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=3015609

Comment 16 Paolo Bonzini 2011-04-21 10:23:34 UTC
Created attachment 493782 [details]
correct patch

This is the patch that I really used for the Koji build.

Comment 17 Paolo Bonzini 2011-04-21 10:26:55 UTC
Comment on attachment 493782 [details]
correct patch

Ah, the patch was the same both times but Bugzilla is apparently removing "++" lines from libfdt-so.patch.  Trying to remove the "patch" flag.

Comment 18 Paolo Bonzini 2011-05-16 12:23:50 UTC
Created attachment 499125 [details]
patch upgrading to upstream 1.3.0

This updated spec-only patch upgrades to upstream 1.3.0 and provides a new libfdt package.

Comment 19 Paolo Bonzini 2011-05-31 14:55:50 UTC
Created attachment 502015 [details]
upgrade to 1.3.0, fix FTBFS and provide a libfdt subpackage

GCC 4.6 introduces a couple of errors due to -Wunused-but-set-variable.  Disable -Werror until they are fixed.

Comment 20 Josh Boyer 2011-06-28 14:42:01 UTC
I took the latest patch and adjusted it a bit by fixing the errors instead of disabling the -Werror.  This build now has dtc 1.3.0 and the libfdt subpackages:

http://koji.fedoraproject.org/koji/buildinfo?buildID=250692

Thanks for the help!