summaryrefslogtreecommitdiff
path: root/pcr/libosinfo-libre
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-12-29 11:19:46 -0200
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2013-12-29 11:20:38 -0200
commitb24ff2ab2649f0c8bf482f0cdf540de4667b4a04 (patch)
tree1f8eee76d0985c70dd19307f8acee5480508010c /pcr/libosinfo-libre
parenta8d24e03f28fd51e47e2053a3bd925a0e7f75c08 (diff)
downloadabslibre-b24ff2ab2649f0c8bf482f0cdf540de4667b4a04.tar.gz
abslibre-b24ff2ab2649f0c8bf482f0cdf540de4667b4a04.tar.bz2
abslibre-b24ff2ab2649f0c8bf482f0cdf540de4667b4a04.zip
fix freedom issue reported by niitotantei => https://labs.parabola.nu/issues/452
Diffstat (limited to 'pcr/libosinfo-libre')
-rw-r--r--pcr/libosinfo-libre/PKGBUILD63
-rw-r--r--pcr/libosinfo-libre/data.patch137
-rw-r--r--pcr/libosinfo-libre/free-distros.patch123
-rw-r--r--pcr/libosinfo-libre/po.patch34
-rw-r--r--pcr/libosinfo-libre/test.patch87
5 files changed, 444 insertions, 0 deletions
diff --git a/pcr/libosinfo-libre/PKGBUILD b/pcr/libosinfo-libre/PKGBUILD
new file mode 100644
index 000000000..8400558c0
--- /dev/null
+++ b/pcr/libosinfo-libre/PKGBUILD
@@ -0,0 +1,63 @@
+# Contributor: Daniel Milewski <niitotantei@gmail.com>
+
+_pkgname='libosinfo'
+pkgname="$_pkgname-libre"
+pkgver='0.2.8'
+pkgrel='1'
+pkgdesc='A GObject based library API for managing information about operating systems, hypervisors and the (virtual) hardware devices they can support, without support for nonfree systems'
+arch=('i686' 'x86_64')
+url='http://libosinfo.org'
+license=('LGPL')
+depends=('glib2' 'libxslt')
+makedepends=('intltool' 'libsoup')
+checkdepends=('check')
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
+replaces=("$_pkgname")
+source=("https://fedorahosted.org/releases/l/i/$_pkgname/$_pkgname-$pkgver.tar.gz" 'data.patch' 'po.patch' 'test.patch'
+ 'free-distros.patch')
+sha256sums=('50cbfcff4548f37b5b7d3328cbc6e96fe6c2a48696e31eec0c819d161e38c643'
+ 'fdfb0753a7cf7865ac2ea5b17145f90d27d70e18c69fba0d60dfb43629ea0dac'
+ 'aab885d2b3a7f91a79efd7ab6f12fe1d4b264afa0fbc200268838b353600b338'
+ 'c4b328f36973931abd71a10a62ec590ef3ba1177486179bc96aa47a22a6d0a42'
+ 'f4b79c44ae4a39325480c2b0af4aa7ed086cc1cab7c9ba1119f50967a9a5f4ca')
+
+prepare() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ rm data/datamaps/windows-lang.xml \
+ data/hypervisors/rhel-xen.xml{,.in} \
+ data/install-scripts/*.xml \
+ data/oses/*.xml{,.in}
+ rm -r test/isodata/*
+
+ patch -Np1 -i "$srcdir/data.patch"
+ patch -Np1 -i "$srcdir/po.patch"
+ patch -Np1 -i "$srcdir/test.patch"
+
+ cd "$srcdir/$_pkgname-$pkgver/po"
+ intltool-update pl
+ intltool-update uk
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ patch -Np1 -i "$srcdir/free-distros.patch"
+}
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ ./configure --prefix=/usr
+ make
+}
+
+check() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ make -k check
+}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir/" install
+}
diff --git a/pcr/libosinfo-libre/data.patch b/pcr/libosinfo-libre/data.patch
new file mode 100644
index 000000000..d37d30671
--- /dev/null
+++ b/pcr/libosinfo-libre/data.patch
@@ -0,0 +1,137 @@
+diff -ruN libosinfo-0.2.8/data/datamaps/Makefile.am libosinfo-0.2.8-libre/data/datamaps/Makefile.am
+--- libosinfo-0.2.8/data/datamaps/Makefile.am 2013-01-09 00:01:25.000000000 +0100
++++ libosinfo-0.2.8-libre/data/datamaps/Makefile.am 2013-12-01 12:15:00.261131308 +0100
+@@ -1,7 +1,6 @@
+
+ datamapdir = $(pkgdatadir)/db/datamaps/
+ datamap_DATA = \
+- windows-lang.xml \
+ x11-keyboard.xml \
+ $(NULL)
+
+diff -ruN libosinfo-0.2.8/data/datamaps/Makefile.in libosinfo-0.2.8-libre/data/datamaps/Makefile.in
+--- libosinfo-0.2.8/data/datamaps/Makefile.in 2013-09-16 18:45:26.000000000 +0200
++++ libosinfo-0.2.8-libre/data/datamaps/Makefile.in 2013-12-01 12:15:07.561496625 +0100
+@@ -326,7 +326,6 @@
+ top_srcdir = @top_srcdir@
+ datamapdir = $(pkgdatadir)/db/datamaps/
+ datamap_DATA = \
+- windows-lang.xml \
+ x11-keyboard.xml \
+ $(NULL)
+
+diff -ruN libosinfo-0.2.8/data/hypervisors/Makefile.am libosinfo-0.2.8-libre/data/hypervisors/Makefile.am
+--- libosinfo-0.2.8/data/hypervisors/Makefile.am 2013-02-14 02:39:37.000000000 +0100
++++ libosinfo-0.2.8-libre/data/hypervisors/Makefile.am 2013-12-01 12:18:54.718635301 +0100
+@@ -1,6 +1,6 @@
+
+ databasedir = $(pkgdatadir)/db/hypervisors/
+-database_in_files = kvm.xml.in qemu.xml.in rhel-xen.xml.in xen.xml.in
++database_in_files = kvm.xml.in qemu.xml.in xen.xml.in
+
+ database_DATA = $(database_in_files:.xml.in=.xml)
+
+diff -ruN libosinfo-0.2.8/data/hypervisors/Makefile.in libosinfo-0.2.8-libre/data/hypervisors/Makefile.in
+--- libosinfo-0.2.8/data/hypervisors/Makefile.in 2013-09-16 18:45:26.000000000 +0200
++++ libosinfo-0.2.8-libre/data/hypervisors/Makefile.in 2013-12-01 12:20:01.822560286 +0100
+@@ -325,7 +325,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ databasedir = $(pkgdatadir)/db/hypervisors/
+-database_in_files = kvm.xml.in qemu.xml.in rhel-xen.xml.in xen.xml.in
++database_in_files = kvm.xml.in qemu.xml.in xen.xml.in
+ database_DATA = $(database_in_files:.xml.in=.xml)
+ EXTRA_DIST = $(database_in_files) $(database_DATA)
+ all: all-am
+diff -ruN libosinfo-0.2.8/data/install-scripts/Makefile.am libosinfo-0.2.8-libre/data/install-scripts/Makefile.am
+--- libosinfo-0.2.8/data/install-scripts/Makefile.am 2013-03-27 23:03:14.000000000 +0100
++++ libosinfo-0.2.8-libre/data/install-scripts/Makefile.am 2013-12-01 12:24:10.160616083 +0100
+@@ -1,12 +1,6 @@
+
+ databasedir = $(pkgdatadir)/db/install-scripts/
+ database_DATA = \
+- fedora.xml \
+- rhel.xml \
+- windows-sif.xml \
+- windows-cmd.xml \
+- windows-reg.xml \
+- windows-unattend.xml \
+ $(NULL)
+
+ EXTRA_DIST = $(database_DATA)
+diff -ruN libosinfo-0.2.8/data/install-scripts/Makefile.in libosinfo-0.2.8-libre/data/install-scripts/Makefile.in
+--- libosinfo-0.2.8/data/install-scripts/Makefile.in 2013-09-16 18:45:26.000000000 +0200
++++ libosinfo-0.2.8-libre/data/install-scripts/Makefile.in 2013-12-01 12:24:20.500882542 +0100
+@@ -326,12 +326,6 @@
+ top_srcdir = @top_srcdir@
+ databasedir = $(pkgdatadir)/db/install-scripts/
+ database_DATA = \
+- fedora.xml \
+- rhel.xml \
+- windows-sif.xml \
+- windows-cmd.xml \
+- windows-reg.xml \
+- windows-unattend.xml \
+ $(NULL)
+
+ EXTRA_DIST = $(database_DATA)
+diff -ruN libosinfo-0.2.8/data/oses/Makefile.am libosinfo-0.2.8-libre/data/oses/Makefile.am
+--- libosinfo-0.2.8/data/oses/Makefile.am 2013-09-10 15:22:50.000000000 +0200
++++ libosinfo-0.2.8-libre/data/oses/Makefile.am 2013-12-01 12:26:24.797757509 +0100
+@@ -1,26 +1,6 @@
+
+ databasedir = $(pkgdatadir)/db/oses/
+ database_in_files = \
+- altlinux.xml.in \
+- centos.xml.in \
+- debian.xml.in \
+- dos.xml.in \
+- fedora.xml.in \
+- freebsd.xml.in \
+- gnome.xml.in \
+- mandriva.xml.in \
+- mandrake.xml.in \
+- netbsd.xml.in \
+- netware.xml.in \
+- macos.xml.in \
+- openbsd.xml.in \
+- opensuse.xml.in \
+- rhl.xml.in \
+- rhel.xml.in \
+- solaris.xml.in \
+- suse.xml.in \
+- ubuntu.xml.in \
+- windows.xml.in \
+ $(NULL)
+
+ database_DATA = $(database_in_files:.xml.in=.xml)
+diff -ruN libosinfo-0.2.8/data/oses/Makefile.in libosinfo-0.2.8-libre/data/oses/Makefile.in
+--- libosinfo-0.2.8/data/oses/Makefile.in 2013-09-16 18:45:26.000000000 +0200
++++ libosinfo-0.2.8-libre/data/oses/Makefile.in 2013-12-01 12:26:32.557686417 +0100
+@@ -326,26 +326,6 @@
+ top_srcdir = @top_srcdir@
+ databasedir = $(pkgdatadir)/db/oses/
+ database_in_files = \
+- altlinux.xml.in \
+- centos.xml.in \
+- debian.xml.in \
+- dos.xml.in \
+- fedora.xml.in \
+- freebsd.xml.in \
+- gnome.xml.in \
+- mandriva.xml.in \
+- mandrake.xml.in \
+- netbsd.xml.in \
+- netware.xml.in \
+- macos.xml.in \
+- openbsd.xml.in \
+- opensuse.xml.in \
+- rhl.xml.in \
+- rhel.xml.in \
+- solaris.xml.in \
+- suse.xml.in \
+- ubuntu.xml.in \
+- windows.xml.in \
+ $(NULL)
+
+ database_DATA = $(database_in_files:.xml.in=.xml)
diff --git a/pcr/libosinfo-libre/free-distros.patch b/pcr/libosinfo-libre/free-distros.patch
new file mode 100644
index 000000000..c69cd3fed
--- /dev/null
+++ b/pcr/libosinfo-libre/free-distros.patch
@@ -0,0 +1,123 @@
+diff -ruN libosinfo-0.2.8-libre/data/oses/Makefile.am libosinfo-0.2.8-libre-free-distros/data/oses/Makefile.am
+--- libosinfo-0.2.8-libre/data/oses/Makefile.am 2013-12-01 13:14:07.267023100 +0100
++++ libosinfo-0.2.8-libre-free-distros/data/oses/Makefile.am 2013-12-01 13:18:29.183029813 +0100
+@@ -1,6 +1,7 @@
+
+ databasedir = $(pkgdatadir)/db/oses/
+ database_in_files = \
++ parabola.xml.in \
+ $(NULL)
+
+ database_DATA = $(database_in_files:.xml.in=.xml)
+diff -ruN libosinfo-0.2.8-libre/data/oses/Makefile.in libosinfo-0.2.8-libre-free-distros/data/oses/Makefile.in
+--- libosinfo-0.2.8-libre/data/oses/Makefile.in 2013-12-01 13:14:07.267023100 +0100
++++ libosinfo-0.2.8-libre-free-distros/data/oses/Makefile.in 2013-12-01 13:18:48.053708302 +0100
+@@ -326,6 +326,7 @@
+ top_srcdir = @top_srcdir@
+ databasedir = $(pkgdatadir)/db/oses/
+ database_in_files = \
++ parabola.xml.in \
+ $(NULL)
+
+ database_DATA = $(database_in_files:.xml.in=.xml)
+diff -ruN libosinfo-0.2.8-libre/data/oses/parabola.xml libosinfo-0.2.8-libre-free-distros/data/oses/parabola.xml
+--- libosinfo-0.2.8-libre/data/oses/parabola.xml 1970-01-01 01:00:00.000000000 +0100
++++ libosinfo-0.2.8-libre-free-distros/data/oses/parabola.xml 2013-12-01 13:26:26.128660679 +0100
+@@ -0,0 +1,42 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<libosinfo version="0.0.1">
++
++ <os id="https://parabolagnulinux.org">
++ <short-id>parabola</short-id>
++ <name>Parabola GNU/Linux-libre</name>
++ <vendor>Parabola Project</vendor>
++ <family>gnu/linux</family>
++
++ <resources arch="all">
++ <minimum>
++ <cpu>1000000000</cpu>
++ <n-cpus>1</n-cpus>
++ <ram>67108864</ram>
++ <storage>524288000</storage>
++ </minimum>
++ <recommended>
++ <cpu>1000000000</cpu>
++ <ram>67108864</ram>
++ <storage>524288000</storage>
++ </recommended>
++ </resources>
++
++ <media arch="x86_64">
++ <url>https://repo.parabolagnulinux.org/iso/2013.09.01/parabola-2013.09.01-dual.iso</url>
++ <iso>
++ <volume-id>PARA_201309</volume-id>
++ </iso>
++ <kernel>parabola/boot/x86_64/vmlinuz</kernel>
++ <initrd>parabola/boot/x86_64/parabolaiso.img</initrd>
++ </media>
++ <media arch="i686">
++ <url>https://repo.parabolagnulinux.org/iso/2013.09.01/parabola-2013.09.01-dual.iso</url>
++ <iso>
++ <volume-id>PARA_201309</volume-id>
++ </iso>
++ <kernel>parabola/boot/i686/vmlinuz</kernel>
++ <initrd>parabola/boot/i686/parabolaiso.img</initrd>
++ </media>
++ </os>
++
++</libosinfo>
+\ No newline at end of file
+diff -ruN libosinfo-0.2.8-libre/data/oses/parabola.xml.in libosinfo-0.2.8-libre-free-distros/data/oses/parabola.xml.in
+--- libosinfo-0.2.8-libre/data/oses/parabola.xml.in 1970-01-01 01:00:00.000000000 +0100
++++ libosinfo-0.2.8-libre-free-distros/data/oses/parabola.xml.in 2013-12-01 13:17:12.086931332 +0100
+@@ -0,0 +1,42 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<libosinfo version="0.0.1">
++
++ <os id="https://parabolagnulinux.org">
++ <short-id>parabola</short-id>
++ <_name>Parabola GNU/Linux-libre</_name>
++ <_vendor>Parabola Project</_vendor>
++ <family>gnu/linux</family>
++
++ <resources arch="all">
++ <minimum>
++ <cpu>1000000000</cpu>
++ <n-cpus>1</n-cpus>
++ <ram>67108864</ram>
++ <storage>524288000</storage>
++ </minimum>
++ <recommended>
++ <cpu>1000000000</cpu>
++ <ram>67108864</ram>
++ <storage>524288000</storage>
++ </recommended>
++ </resources>
++
++ <media arch="x86_64">
++ <url>https://repo.parabolagnulinux.org/iso/2013.09.01/parabola-2013.09.01-dual.iso</url>
++ <iso>
++ <volume-id>PARA_201309</volume-id>
++ </iso>
++ <kernel>parabola/boot/x86_64/vmlinuz</kernel>
++ <initrd>parabola/boot/x86_64/parabolaiso.img</initrd>
++ </media>
++ <media arch="i686">
++ <url>https://repo.parabolagnulinux.org/iso/2013.09.01/parabola-2013.09.01-dual.iso</url>
++ <iso>
++ <volume-id>PARA_201309</volume-id>
++ </iso>
++ <kernel>parabola/boot/i686/vmlinuz</kernel>
++ <initrd>parabola/boot/i686/parabolaiso.img</initrd>
++ </media>
++ </os>
++
++</libosinfo>
+diff -ruN libosinfo-0.2.8-libre/po/POTFILES.in libosinfo-0.2.8-libre-free-distros/po/POTFILES.in
+--- libosinfo-0.2.8-libre/po/POTFILES.in 2013-12-01 13:14:10.297130169 +0100
++++ libosinfo-0.2.8-libre-free-distros/po/POTFILES.in 2013-12-01 13:23:01.616209485 +0100
+@@ -1,3 +1,4 @@
++data/oses/parabola.xml.in
+ data/devices/qemu-ps2.xml.in
+ data/devices/qemu-pci.xml.in
+ data/devices/virtio-pci.xml.in
diff --git a/pcr/libosinfo-libre/po.patch b/pcr/libosinfo-libre/po.patch
new file mode 100644
index 000000000..abd11cb71
--- /dev/null
+++ b/pcr/libosinfo-libre/po.patch
@@ -0,0 +1,34 @@
+diff -ruN libosinfo-0.2.8/po/POTFILES.in libosinfo-0.2.8-libre/po/POTFILES.in
+--- libosinfo-0.2.8/po/POTFILES.in 2013-09-10 15:22:50.000000000 +0200
++++ libosinfo-0.2.8-libre/po/POTFILES.in 2013-12-01 11:54:50.441912252 +0100
+@@ -1,30 +1,9 @@
+-data/oses/netware.xml.in
+-data/oses/solaris.xml.in
+-data/oses/dos.xml.in
+-data/oses/mandrake.xml.in
+-data/oses/mandriva.xml.in
+-data/oses/suse.xml.in
+-data/oses/gnome.xml.in
+-data/oses/rhel.xml.in
+-data/oses/fedora.xml.in
+-data/oses/windows.xml.in
+-data/oses/opensuse.xml.in
+-data/oses/macos.xml.in
+-data/oses/debian.xml.in
+-data/oses/ubuntu.xml.in
+-data/oses/centos.xml.in
+-data/oses/openbsd.xml.in
+-data/oses/freebsd.xml.in
+-data/oses/rhl.xml.in
+-data/oses/netbsd.xml.in
+-data/oses/altlinux.xml.in
+ data/devices/qemu-ps2.xml.in
+ data/devices/qemu-pci.xml.in
+ data/devices/virtio-pci.xml.in
+ data/devices/qemu-usb.xml.in
+ data/hypervisors/kvm.xml.in
+ data/hypervisors/qemu.xml.in
+-data/hypervisors/rhel-xen.xml.in
+ data/hypervisors/xen.xml.in
+ osinfo/osinfo_avatar_format.c
+ osinfo/osinfo_deployment.c
diff --git a/pcr/libosinfo-libre/test.patch b/pcr/libosinfo-libre/test.patch
new file mode 100644
index 000000000..413deb1c0
--- /dev/null
+++ b/pcr/libosinfo-libre/test.patch
@@ -0,0 +1,87 @@
+diff -ruN libosinfo-0.2.8/test/test-isodetect.c libosinfo-0.2.8-libre/test/test-isodetect.c
+--- libosinfo-0.2.8/test/test-isodetect.c 2013-09-10 15:22:50.000000000 +0200
++++ libosinfo-0.2.8-libre/test/test-isodetect.c 2013-12-01 11:44:32.830411240 +0100
+@@ -342,66 +342,6 @@
+ g_object_unref(loader);
+ }
+
+-START_TEST(test_fedora)
+-{
+- test_one("fedora");
+-}
+-END_TEST
+-
+-START_TEST(test_rhel)
+-{
+- test_one("rhel");
+-}
+-END_TEST
+-
+-START_TEST(test_ubuntu)
+-{
+- test_one("ubuntu");
+-}
+-END_TEST
+-
+-START_TEST(test_debian)
+-{
+- test_one("debian");
+-}
+-END_TEST
+-
+-START_TEST(test_windows)
+-{
+- test_one("windows");
+-}
+-END_TEST
+-
+-START_TEST(test_openbsd)
+-{
+- test_one("openbsd");
+-}
+-END_TEST
+-
+-START_TEST(test_opensuse)
+-{
+- test_one("opensuse");
+-}
+-END_TEST
+-
+-START_TEST(test_centos)
+-{
+- test_one("centos");
+-}
+-END_TEST
+-
+-START_TEST(test_gnome)
+-{
+- test_one("gnome");
+-}
+-END_TEST
+-
+-START_TEST(test_altlinux)
+-{
+- test_one("altlinux");
+-}
+-END_TEST
+-
+ static Suite *
+ list_suite(void)
+ {
+@@ -409,16 +349,6 @@
+ TCase *tc = tcase_create("Core");
+ tcase_set_timeout(tc, 20);
+
+- tcase_add_test(tc, test_fedora);
+- tcase_add_test(tc, test_rhel);
+- tcase_add_test(tc, test_ubuntu);
+- tcase_add_test(tc, test_debian);
+- tcase_add_test(tc, test_windows);
+- tcase_add_test(tc, test_openbsd);
+- tcase_add_test(tc, test_opensuse);
+- tcase_add_test(tc, test_centos);
+- tcase_add_test(tc, test_gnome);
+- tcase_add_test(tc, test_altlinux);
+ suite_add_tcase(s, tc);
+ return s;
+ }