add libcacard, -25

This commit is contained in:
Alon Levy 2012-12-03 11:52:36 +02:00
parent 2daa1c5706
commit d1c1d00a45
3 changed files with 175 additions and 2 deletions

View File

@ -0,0 +1,25 @@
From 3bf390b736e7befd0fbcd252ef5ac6dffd26cf03 Mon Sep 17 00:00:00 2001
From: Alon Levy <alevy@redhat.com>
Date: Wed, 28 Nov 2012 16:38:43 +0200
Subject: [PATCH] libcacard: fix missing symbols in libcacard.so
---
libcacard/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libcacard/Makefile b/libcacard/Makefile
index 63990b7..58e5731 100644
--- a/libcacard/Makefile
+++ b/libcacard/Makefile
@@ -7,7 +7,7 @@ libcacard_includedir=$(includedir)/cacard
$(call set-vpath, $(SRC_PATH))
# objects linked into a shared library, built with libtool with -fPIC if required
-QEMU_OBJS=$(oslib-obj-y) qemu-timer-common.o $(trace-obj-y)
+QEMU_OBJS=$(oslib-obj-y) qemu-timer-common.o iov.o cutils.o qemu-user.o $(trace-obj-y)
QEMU_OBJS_LIB=$(patsubst %.o,%.lo,$(QEMU_OBJS))
QEMU_CFLAGS+=-I../
--
1.8.0

View File

@ -0,0 +1,93 @@
From 373d00412f13f280619fd161e780cd5da5dfc1a3 Mon Sep 17 00:00:00 2001
From: Alon Levy <alevy@redhat.com>
Date: Thu, 29 Nov 2012 14:11:19 +0200
Subject: [PATCH] configure: move vscclient binary under libcacard
build rule is in top level Makefile like other tools.
build rule also exists in libcacard for installation purposes. This was
fixed in a better way in 1.3.0-rc2
---
Makefile | 4 ++--
Makefile.objs | 11 ++++++-----
configure | 2 +-
libcacard/Makefile | 6 +++++-
4 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/Makefile b/Makefile
index dd11e3c..13c1693 100644
--- a/Makefile
+++ b/Makefile
@@ -168,8 +168,8 @@ qemu-io$(EXESUF): qemu-io.o cmd.o $(tools-obj-y) $(block-obj-y)
qemu-bridge-helper$(EXESUF): qemu-bridge-helper.o
-vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) $(tools-obj-y) qemu-timer-common.o libcacard/vscclient.o
- $(call quiet-command,$(CC) $(LDFLAGS) -o $@ $^ $(libcacard_libs) $(LIBS)," LINK $@")
+libcacard/vscclient$(EXESUF): $(libcacard-y) $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o iov.o cutils.o qemu-user.o libcacard/vscclient.o
+libcacard/vscclient$(EXESUF): LIBS += $(libcacard_libs)
fsdev/virtfs-proxy-helper$(EXESUF): fsdev/virtfs-proxy-helper.o fsdev/virtio-9p-marshal.o oslib-posix.o $(trace-obj-y)
fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
diff --git a/Makefile.objs b/Makefile.objs
index 4412757..92d6b4a 100644
--- a/Makefile.objs
+++ b/Makefile.objs
@@ -206,11 +206,12 @@ $(trace-obj-y): $(GENERATED_HEADERS)
######################################################################
# smartcard
-libcacard-y += libcacard/cac.o libcacard/event.o
-libcacard-y += libcacard/vcard.o libcacard/vreader.o
-libcacard-y += libcacard/vcard_emul_nss.o
-libcacard-y += libcacard/vcard_emul_type.o
-libcacard-y += libcacard/card_7816.o
+libcacard-base-y += cac.o event.o
+libcacard-base-y += vcard.o vreader.o
+libcacard-base-y += vcard_emul_nss.o
+libcacard-base-y += vcard_emul_type.o
+libcacard-base-y += card_7816.o
+libcacard-y = $(addprefix libcacard/,$(libcacard-base-y))
common-obj-$(CONFIG_SMARTCARD_NSS) += $(libcacard-y)
diff --git a/configure b/configure
index 950912a..64b8aa7 100755
--- a/configure
+++ b/configure
@@ -3073,7 +3073,7 @@ if test "$softmmu" = yes ; then
fi
fi
if test "$smartcard_nss" = "yes" ; then
- tools="vscclient\$(EXESUF) $tools"
+ tools="libcacard/vscclient\$(EXESUF) $tools"
fi
fi
diff --git a/libcacard/Makefile b/libcacard/Makefile
index 9ce3117..88ed064 100644
--- a/libcacard/Makefile
+++ b/libcacard/Makefile
@@ -44,6 +44,10 @@ libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
< $(libcacard_srcpath)/libcacard.pc.in > libcacard.pc,\
" GEN $@")
+VSCCLIENT_QEMU_OBJS=$(addprefix ../,$(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o iov.o cutils.o qemu-user.o)
+vscclient$(EXESUF): $(VSCCLIENT_QEMU_OBJS) $(libcacard-base-y) vscclient.o
+vscclient$(EXESUF): LIBS += $(libcacard_libs)
+
.PHONY: install-libcacard
install-libcacard: libcacard.pc libcacard.la vscclient
@@ -51,7 +55,7 @@ install-libcacard: libcacard.pc libcacard.la vscclient
$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
- $(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
+ $(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient$(EXESUF) "$(DESTDIR)$(bindir)"
$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
for inc in *.h; do \
--
1.8.0.1

View File

@ -109,7 +109,7 @@
Summary: QEMU is a FAST! processor emulator Summary: QEMU is a FAST! processor emulator
Name: qemu Name: qemu
Version: 1.2.0 Version: 1.2.0
Release: 24%{?dist} Release: 25%{?dist}
# Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped # Epoch because we pushed a qemu-1.0 package. AIUI this can't ever be dropped
Epoch: 2 Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD License: GPLv2+ and LGPLv2+ and BSD
@ -485,6 +485,10 @@ Patch804: 0804-wip-hw-qxl-inject-interrupts-in-any-state.patch
# 38f419f (configure: Fix CONFIG_QEMU_HELPERDIR generation, 2012-10-17) # 38f419f (configure: Fix CONFIG_QEMU_HELPERDIR generation, 2012-10-17)
Patch805: 0805-configure-Fix-CONFIG_QEMU_HELPERDIR-generation.patch Patch805: 0805-configure-Fix-CONFIG_QEMU_HELPERDIR-generation.patch
# libcacard
Patch1001: 1001-libcacard-fix-missing-symbols-in-libcacard.so.patch
Patch1002: 1002-configure-move-vscclient-binary-under-libcacard.patch
BuildRequires: SDL-devel BuildRequires: SDL-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: which BuildRequires: which
@ -902,6 +906,29 @@ This package contains some diagnostics and debugging tools for KVM,
such as kvm_stat. such as kvm_stat.
%endif %endif
%package -n libcacard
Summary: Common Access Card (CAC) Emulation
Group: Development/Libraries
%description -n libcacard
Common Access Card (CAC) emulation library.
%package -n libcacard-tools
Summary: CAC Emulation tools
Group: Development/Libraries
Requires: libcacard = %{epoch}:%{version}-%{release}
%description -n libcacard-tools
CAC emulation tools.
%package -n libcacard-devel
Summary: CAC Emulation devel
Group: Development/Libraries
Requires: libcacard = %{epoch}:%{version}-%{release}
%description -n libcacard-devel
CAC emulation development files.
%prep %prep
%setup -q -n qemu-kvm-%{version} %setup -q -n qemu-kvm-%{version}
@ -1227,6 +1254,10 @@ such as kvm_stat.
%patch804 -p1 %patch804 -p1
%patch805 -p1 %patch805 -p1
# libcacard
%patch1001 -p1
%patch1002 -p1
%build %build
%if %{with kvmonly} %if %{with kvmonly}
buildarch="%{kvm_target}-softmmu" buildarch="%{kvm_target}-softmmu"
@ -1260,6 +1291,7 @@ sed -i.debug 's/"-g $CFLAGS"/"$CFLAGS"/g' configure
dobuild() { dobuild() {
./configure \ ./configure \
--prefix=%{_prefix} \ --prefix=%{_prefix} \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \ --sysconfdir=%{_sysconfdir} \
--interp-prefix=%{_prefix}/qemu-%%M \ --interp-prefix=%{_prefix}/qemu-%%M \
--audio-drv-list=pa,sdl,alsa,oss \ --audio-drv-list=pa,sdl,alsa,oss \
@ -1293,6 +1325,8 @@ dobuild() {
echo "===" echo "==="
make V=1 %{?_smp_mflags} $buildldflags make V=1 %{?_smp_mflags} $buildldflags
make V=1 %{?_smp_mflags} $buildldflags libcacard.la
make V=1 %{?_smp_mflags} $buildldflags libcacard/vscclient
} }
# This is kind of confusing. We run ./configure + make twice here to # This is kind of confusing. We run ./configure + make twice here to
@ -1488,6 +1522,10 @@ install -m 0644 %{SOURCE11} $RPM_BUILD_ROOT%{_udevdir}
install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/qemu install -m 0644 %{SOURCE12} $RPM_BUILD_ROOT%{_sysconfdir}/qemu
chmod u+s $RPM_BUILD_ROOT%{_libexecdir}/qemu-bridge-helper chmod u+s $RPM_BUILD_ROOT%{_libexecdir}/qemu-bridge-helper
make %{?_smp_mflags} $buildldflags DESTDIR=$RPM_BUILD_ROOT install-libcacard
find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
find $RPM_BUILD_ROOT -name "libcacard.so*" -exec chmod +x \{\} \;
%check %check
make check make check
@ -1570,7 +1608,6 @@ fi
%doc %{qemudocdir}/LICENSE %doc %{qemudocdir}/LICENSE
%dir %{_datadir}/%{name}/ %dir %{_datadir}/%{name}/
%{_datadir}/%{name}/keymaps/ %{_datadir}/%{name}/keymaps/
%{_bindir}/vscclient
%{_mandir}/man1/qemu.1* %{_mandir}/man1/qemu.1*
%{_mandir}/man1/virtfs-proxy-helper.1* %{_mandir}/man1/virtfs-proxy-helper.1*
%{_bindir}/virtfs-proxy-helper %{_bindir}/virtfs-proxy-helper
@ -1821,7 +1858,25 @@ fi
%{_mandir}/man1/qemu-img.1* %{_mandir}/man1/qemu-img.1*
%{_mandir}/man8/qemu-nbd.8* %{_mandir}/man8/qemu-nbd.8*
%files -n libcacard
%defattr(-,root,root,-)
%{_libdir}/libcacard.so.*
%files -n libcacard-tools
%defattr(-,root,root,-)
%{_bindir}/vscclient
%files -n libcacard-devel
%defattr(-,root,root,-)
%{_includedir}/cacard
%{_libdir}/libcacard.so
%{_libdir}/pkgconfig/libcacard.pc
%changelog %changelog
* Wed Nov 28 2012 Alon Levy <alevy@redhat.com> - 2:1.2.0-25
* Merge libcacard into qemu, since they both use the same sources now.
* Thu Nov 22 2012 Paolo Bonzini <pbonzini@redhat.com> - 2:1.2.0-24 * Thu Nov 22 2012 Paolo Bonzini <pbonzini@redhat.com> - 2:1.2.0-24
- Move vscclient to qemu-common, qemu-nbd to qemu-img - Move vscclient to qemu-common, qemu-nbd to qemu-img