From d7108cad0903be904ab4a1d0abe8e890b1596265 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 2 Mar 2014 12:46:20 +0000 Subject: [PATCH] Add non-upstream patch to move virt-builder configuration to /etc/virt-builder/ --- ...os-configuration-to-etc-virt-builder.patch | 40 +++++++++++++++++++ libguestfs.spec | 10 +++++ 2 files changed, 50 insertions(+) create mode 100644 0001-builder-Move-repos-configuration-to-etc-virt-builder.patch diff --git a/0001-builder-Move-repos-configuration-to-etc-virt-builder.patch b/0001-builder-Move-repos-configuration-to-etc-virt-builder.patch new file mode 100644 index 0000000..608c9e5 --- /dev/null +++ b/0001-builder-Move-repos-configuration-to-etc-virt-builder.patch @@ -0,0 +1,40 @@ +From f108f373eacdc9436f8345d928b69c8f3035dc23 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Sun, 2 Mar 2014 12:42:34 +0000 +Subject: [PATCH] builder: Move repos configuration to + /etc/virt-builder/repos.d/ + +--- + builder/Makefile.am | 2 +- + builder/paths.ml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/builder/Makefile.am b/builder/Makefile.am +index a539e91..e3da2ca 100644 +--- a/builder/Makefile.am ++++ b/builder/Makefile.am +@@ -243,7 +243,7 @@ DISTCLEANFILES = .depend + + # virt-builder's default repository + +-repoconfdir = $(sysconfdir)/xdg/virt-builder/repos.d ++repoconfdir = $(sysconfdir)/virt-builder/repos.d + repoconf_DATA = libguestfs.conf libguestfs.gpg + + # Build a small C index validator program. +diff --git a/builder/paths.ml b/builder/paths.ml +index e4f0c7b..2eeebeb 100644 +--- a/builder/paths.ml ++++ b/builder/paths.ml +@@ -35,7 +35,7 @@ let xdg_config_home ~prog = + let xdg_config_dirs ~prog = + let dirs = + try Sys.getenv "XDG_CONFIG_DIRS" +- with Not_found -> "/etc/xdg" in ++ with Not_found -> "/etc" in + let dirs = string_nsplit ":" dirs in + let dirs = List.filter (fun x -> x <> "") dirs in + List.map (fun x -> x // prog) dirs +-- +1.8.5.3 + diff --git a/libguestfs.spec b/libguestfs.spec index 39b09c1..f2bf66d 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -27,6 +27,10 @@ License: LGPLv2+ URL: http://libguestfs.org/ Source0: http://libguestfs.org/download/1.25-development/%{name}-%{version}.tar.gz +# Non-upstream patch to move virt-builder configuration files to +# /etc/virt-builder. +Patch1: 0001-builder-Move-repos-configuration-to-etc-virt-builder.patch + # Basic build requirements: BuildRequires: perl(Pod::Simple) BuildRequires: perl(Pod::Man) @@ -670,6 +674,8 @@ for %{name}. %prep %setup -q +%patch1 -p1 + if [ "$(getenforce | tr '[A-Z]' '[a-z]')" != "disabled" ]; then # For sVirt to work, the local temporary directory we use in the # tests must be labelled the same way as /tmp. @@ -928,6 +934,10 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/run/libguestfs %files tools-c %doc README %config(noreplace) %{_sysconfdir}/libguestfs-tools.conf +%dir %{_sysconfdir}/virt-builder +%dir %{_sysconfdir}/virt-builder/repos.d +%config %{_sysconfdir}/virt-builder/repos.d/libguestfs.conf +%config %{_sysconfdir}/virt-builder/repos.d/libguestfs.gpg %{_mandir}/man5/libguestfs-tools.conf.5* %{_bindir}/guestfish %{_mandir}/man1/guestfish.1*