From 1c249683186f92c1baa8908bc5904935d934ac59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret?= Date: Thu, 25 Jan 2018 12:20:40 +0100 Subject: [PATCH 1/4] Create .spec.in and Source0 --- rpm_spec/{core-agent.spec => core-agent.spec.in} | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) rename rpm_spec/{core-agent.spec => core-agent.spec.in} (98%) diff --git a/rpm_spec/core-agent.spec b/rpm_spec/core-agent.spec.in similarity index 98% rename from rpm_spec/core-agent.spec rename to rpm_spec/core-agent.spec.in index c97afe6..c79a3ed 100644 --- a/rpm_spec/core-agent.spec +++ b/rpm_spec/core-agent.spec.in @@ -23,9 +23,6 @@ %define qubes_services qubes-core qubes-core-netvm qubes-core-early qubes-firewall qubes-iptables qubes-updates-proxy qubes-qrexec-agent qubes-updates-proxy-forwarder %define qubes_preset_file 75-qubes-vm.preset -%{!?version: %define version %(cat version)} -%{!?backend_vmm: %define backend_vmm %(echo $BACKEND_VMM)} - %define scriptletfuns is_static() { \ [ -f "%{_unitdir}/$1" ] && ! grep -q '^[[].nstall]' "%{_unitdir}/$1" \ } \ @@ -104,7 +101,7 @@ restore_units() { \ } \ Name: qubes-core-agent -Version: %{version} +Version: @VERSION@ Release: 1%{dist} Summary: The Qubes core files for VM @@ -158,8 +155,9 @@ BuildRequires: pandoc BuildRequires: xen-devel BuildRequires: libX11-devel BuildRequires: qubes-utils-devel >= 3.1.3 -BuildRequires: qubes-libvchan-%{backend_vmm}-devel +BuildRequires: qubes-libvchan-@BACKEND_VMM@-devel BuildRequires: pam-devel +Source0: %{name}-%{version}.tar.gz %description The Qubes core files for installation inside a Qubes VM. @@ -277,17 +275,15 @@ Requires: Thunar %description thunar Thunar support for Qubes VM tools +%if 0%{?qubes_builder} %define _builddir %(pwd) +%endif %define kde_service_dir /usr/share/kde4/services %define kde5_service_dir /usr/share/kservices5/ServiceMenus %prep -# we operate on the current directory, so no need to unpack anything -# symlink is to generate useful debuginfo packages -rm -f %{name}-%{version} -ln -sf . %{name}-%{version} -%setup -T -D +%setup -q %build for dir in qubes-rpc qrexec misc; do From e5cf780dbd772be9398c2a6203d3d750ec76cf1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret?= Date: Sun, 28 Jan 2018 11:26:44 +0100 Subject: [PATCH 2/4] Remove _builddir --- rpm_spec/core-agent.spec.in | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/rpm_spec/core-agent.spec.in b/rpm_spec/core-agent.spec.in index c79a3ed..786a025 100644 --- a/rpm_spec/core-agent.spec.in +++ b/rpm_spec/core-agent.spec.in @@ -275,10 +275,6 @@ Requires: Thunar %description thunar Thunar support for Qubes VM tools -%if 0%{?qubes_builder} -%define _builddir %(pwd) -%endif - %define kde_service_dir /usr/share/kde4/services %define kde5_service_dir /usr/share/kservices5/ServiceMenus @@ -467,7 +463,7 @@ sed 's/^net.ipv4.ip_forward.*/#\0/' -i /etc/sysctl.conf %post qrexec %systemd_post qubes-qrexec-agent.service -%post thunar +%post thunar if [ "$1" = 1 ]; then # There is no system-wide Thunar custom actions. There is only a default # file and a user file created from the default one. Qubes actions need @@ -504,7 +500,7 @@ fi %preun qrexec %systemd_preun qubes-qrexec-agent.service -%postun thunar +%postun thunar if [ "$1" = 0 ]; then if [ -f /etc/xdg/Thunar/uca.xml ] ; then mv /etc/xdg/Thunar/uca.xml{,.uninstall} From 59fa7efcc32fcab8a243ebed7aebcdb3f2a42c90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret?= Date: Tue, 3 Apr 2018 21:38:13 +0200 Subject: [PATCH 3/4] spec.in: add changelog placeholder --- rpm_spec/core-agent.spec.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rpm_spec/core-agent.spec.in b/rpm_spec/core-agent.spec.in index 786a025..5775d82 100644 --- a/rpm_spec/core-agent.spec.in +++ b/rpm_spec/core-agent.spec.in @@ -959,3 +959,6 @@ if [ "x$changed" != "x" ] then systemctl daemon-reload fi + +%changelog +@CHANGELOG@ From 6036f1f65b86f171f90a6a259ec0b9f2fb23b9ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret?= Date: Wed, 4 Apr 2018 16:33:40 -0400 Subject: [PATCH 4/4] spec.in: fix %if expressions and remove useless conditions --- rpm_spec/core-agent.spec.in | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/rpm_spec/core-agent.spec.in b/rpm_spec/core-agent.spec.in index 5775d82..a158628 100644 --- a/rpm_spec/core-agent.spec.in +++ b/rpm_spec/core-agent.spec.in @@ -109,14 +109,9 @@ Group: Qubes Vendor: Invisible Things Lab License: GPL URL: http://www.qubes-os.org -%if %{fedora} < 22 -Requires: yum-plugin-post-transaction-actions -%endif -%if %{fedora} >= 18 -# Fedora >= 18 defaults to firewalld, which isn't supported nor needed by Qubes + Conflicts: firewalld -%endif -Requires: xdg-utils +Requires: xdg-utils Requires: qubes-utils >= 3.1.3 Requires: qubes-utils-libs >= 4.0.16 Requires: initscripts @@ -137,7 +132,7 @@ Requires: zenity Requires: qubes-core-agent-qrexec Requires: qubes-libvchan Requires: qubes-db-vm -%if 0%{fedora} >= 23 +%if 0%{?fedora} >= 23 Requires: python3-dnf-plugins-qubes-hooks %else Requires: python2-dnf-plugins-qubes-hooks @@ -172,7 +167,7 @@ DNF plugin for Qubes specific post-installation actions: * notify dom0 that updates were installed * refresh applications shortcut list -%if 0%{fedora} >= 23 +%if 0%{?fedora} >= 23 %package -n python3-dnf-plugins-qubes-hooks Summary: DNF plugin for Qubes specific post-installation actions BuildRequires: python3-devel @@ -679,7 +674,7 @@ rm -f %{name}-%{version} %files -n python2-dnf-plugins-qubes-hooks %{python2_sitelib}/dnf-plugins/* -%if 0%{fedora} >= 23 +%if 0%{?fedora} >= 23 %files -n python3-dnf-plugins-qubes-hooks %{python3_sitelib}/dnf-plugins/* %endif