From 8c218c38a7fae7e913a211f48a255727af5280f0 Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Tue, 10 May 2011 11:14:41 +0200 Subject: [PATCH] core-dom0-vaio-fixes is now a separate package Also fixes to postun scripts to properly handle updates --- Makefile | 16 ++++++++--- rpm_spec/core-dom0-vaio-fixes.spec | 46 ++++++++++++++++++++++++++++++ rpm_spec/core-dom0.spec | 29 ------------------- version_vaio_fixes | 1 + 4 files changed, 59 insertions(+), 33 deletions(-) create mode 100644 rpm_spec/core-dom0-vaio-fixes.spec create mode 100644 version_vaio_fixes diff --git a/Makefile b/Makefile index 1a319181..6df59981 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ RPMS_DIR=rpm/ VERSION_DOM0 := $(shell cat version_dom0) +VERSION_VAIO_FIXES := $(shell cat version_vaio_fixes) VERSION_VM := $(shell cat version_vm) help: @@ -18,24 +19,31 @@ rpms: rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-proxyvm.spec rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-dom0.spec rpm --addsign \ - $(RPMS_DIR)/x86_64/qubes-core-dom0-*$(VERSION_DOM0)*.rpm \ + $(RPMS_DIR)/x86_64/qubes-core-dom0-$(VERSION_DOM0)*.rpm \ $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*.rpm +rpms-vaio-fixes: + rpmbuild --define "_rpmdir $(RPMS_DIR)" -bb rpm_spec/core-dom0-vaio-fixes.spec + rpm --addsign $(RPMS_DIR)/x86_64/qubes-core-dom0-vaio-fixes-$(VERSION_VAIO_FIXES)*.rpm + update-repo-current: - ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-*$(VERSION_DOM0)*fc13*.rpm ../yum/current-release/current/dom0/rpm/ + ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-$(VERSION_DOM0)*fc13*.rpm ../yum/current-release/current/dom0/rpm/ + ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-vaio-fixes-$(VERSION_VAIO_FIXES)*fc13*.rpm ../yum/current-release/current/dom0/rpm/ ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*fc13*.rpm ../yum/current-release/current/vm/f13/rpm/ ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*fc14*.rpm ../yum/current-release/current/vm/f14/rpm/ cd ../yum && ./update_repo.sh update-repo-current-testing: - ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-*$(VERSION_DOM0)*fc13*.rpm ../yum/current-release/current-testing/dom0/rpm/ + ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-$(VERSION_DOM0)*fc13*.rpm ../yum/current-release/current-testing/dom0/rpm/ + ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-vaio-fixes-$(VERSION_VAIO_FIXES)*fc13*.rpm ../yum/current-release/current-testing/dom0/rpm/ ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*fc13*.rpm ../yum/current-release/current-testing/vm/f13/rpm/ ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*fc14*.rpm ../yum/current-release/current-testing/vm/f14/rpm/ cd ../yum && ./update_repo.sh update-repo-unstable: - ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-*$(VERSION_DOM0)*fc13*.rpm ../yum/current-release/unstable/dom0/rpm/ + ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-$(VERSION_DOM0)*fc13*.rpm ../yum/current-release/unstable/dom0/rpm/ + ln -f $(RPMS_DIR)/x86_64/qubes-core-dom0-vaio-fixes-$(VERSION_VAIO_FIXES)*fc13*.rpm ../yum/current-release/unstable/dom0/rpm/ ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*fc13*.rpm ../yum/current-release/unstable/vm/f13/rpm/ ln -f $(RPMS_DIR)/x86_64/qubes-core-*vm-*$(VERSION_VM)*fc14*.rpm ../yum/current-release/unstable/vm/f14/rpm/ cd ../yum && ./update_repo.sh diff --git a/rpm_spec/core-dom0-vaio-fixes.spec b/rpm_spec/core-dom0-vaio-fixes.spec new file mode 100644 index 00000000..640e8584 --- /dev/null +++ b/rpm_spec/core-dom0-vaio-fixes.spec @@ -0,0 +1,46 @@ +%{!?version: %define version %(cat version_vaio_fixes)} + +Name: qubes-core-dom0-vaio-fixes +Version: %{version} +Release: 1%{?dist} +Summary: Additional scripts for supporting suspend on Vaio Z laptops +Requires: alsa-utils + +Group: Qubes +Vendor: Invisible Things Lab +License: GPL +URL: http://www.qubes-os.org + +%define _builddir %(pwd)/dom0 + +%description +Additional scripts for supporting suspend on Vaio Z laptops. + +Due to broken Linux GPU drivers we need to do some additional actions during +suspend/resume. + +%install +mkdir -p $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d +cp vaio_fixes/00sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ +cp vaio_fixes/99sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ +cp vaio_fixes/01sony-vaio-display $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ +mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d/ +cp vaio_fixes/snd-hda-intel-sony-vaio.conf $RPM_BUILD_ROOT/etc/modprobe.d/ + +%post +grubby --update-kernel=/boot/vmlinuz-2.6.34.1-14.xenlinux.qubes.x86_64 --args="i8042.nopnp=1" + +%triggerin -- kernel +grubby --update-kernel=/boot/vmlinuz-2.6.34.1-14.xenlinux.qubes.x86_64 --args="i8042.nopnp=1" + +%postun +if [ "$1" = 0 ] ; then + # no more packages left + grubby --update-kernel=/boot/vmlinuz-2.6.34.1-14.xenlinux.qubes.x86_64 --remove-args="i8042.nopnp=1" +fi + +%files +/usr/lib64/pm-utils/sleep.d/00sony-vaio-audio +/usr/lib64/pm-utils/sleep.d/99sony-vaio-audio +/usr/lib64/pm-utils/sleep.d/01sony-vaio-display +/etc/modprobe.d/snd-hda-intel-sony-vaio.conf diff --git a/rpm_spec/core-dom0.spec b/rpm_spec/core-dom0.spec index e159543b..d3281e84 100644 --- a/rpm_spec/core-dom0.spec +++ b/rpm_spec/core-dom0.spec @@ -126,13 +126,6 @@ cp pm-utils/01qubes-sync-vms-clock $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ cp pm-utils/01qubes-suspend-netvm $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ cp pm-utils/02qubes-pause-vms $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ -# Optional scripts for Vaio (they go into separate package) -cp vaio_fixes/00sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ -cp vaio_fixes/99sony-vaio-audio $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ -cp vaio_fixes/01sony-vaio-display $RPM_BUILD_ROOT/usr/lib64/pm-utils/sleep.d/ -mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d/ -cp vaio_fixes/snd-hda-intel-sony-vaio.conf $RPM_BUILD_ROOT/etc/modprobe.d/ - mkdir -p $RPM_BUILD_ROOT/var/log/qubes mkdir -p $RPM_BUILD_ROOT/var/run/qubes @@ -297,25 +290,3 @@ fi %{_libdir}/libu2mfn.so /etc/sudoers.d/qubes /etc/xdg/autostart/qubes-guid.desktop - -%package vaio-fixes -Summary: Additional scripts for supporting suspend on Vaio Z laptops -Requires: alsa-utils - -%post vaio-fixes -grubby --update-kernel=/boot/vmlinuz-2.6.34.1-14.xenlinux.qubes.x86_64 --args="i8042.nopnp=1" - -%postun vaio-fixes -grubby --update-kernel=/boot/vmlinuz-2.6.34.1-14.xenlinux.qubes.x86_64 --remove-args="i8042.nopnp=1" - -%description vaio-fixes -Additional scripts for supporting suspend on Vaio Z laptops. - -Due to broken Linux GPU drivers we need to do some additional actions during -suspend/resume. - -%files vaio-fixes -/usr/lib64/pm-utils/sleep.d/00sony-vaio-audio -/usr/lib64/pm-utils/sleep.d/99sony-vaio-audio -/usr/lib64/pm-utils/sleep.d/01sony-vaio-display -/etc/modprobe.d/snd-hda-intel-sony-vaio.conf diff --git a/version_vaio_fixes b/version_vaio_fixes new file mode 100644 index 00000000..32461d59 --- /dev/null +++ b/version_vaio_fixes @@ -0,0 +1 @@ +1.5.25