Accepting request 523349 from network:time

1

OBS-URL: https://build.opensuse.org/request/show/523349
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/pcfclock?expand=0&rev=22
This commit is contained in:
Dominique Leuenberger 2017-09-12 17:56:05 +00:00 committed by Git OBS Bridge
commit a0d344961f
3 changed files with 34 additions and 8 deletions

14
pcfclock-linux-4.12.patch Normal file
View File

@ -0,0 +1,14 @@
--- linux/pcfclock.c 2017-09-11 15:57:45.230073000 +0200
+++ linux/pcfclock.c 2017-09-11 15:58:29.134762000 +0200
@@ -59,7 +59,11 @@
#include <linux/device.h>
#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
+#include <linux/uaccess.h>
+#else
#include <asm/uaccess.h>
+#endif
#include <linux/semaphore.h>
/* Major device number */

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon Sep 11 15:19:41 UTC 2017 - jengelh@inai.de
- Enable parallel building. Remove redundant %clean section.
Use %configure call.
-------------------------------------------------------------------
Mon Sep 11 15:59:24 CEST 2017 - ro@suse.de
- added patch pcfclock-linux-4.12.patch
to fix build with kernel 4.12
include linux/uaccess.h instead of asm/uaccess.h starting
with linux kernel version 4.12
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Feb 27 01:18:00 CET 2015 - ro@suse.de Fri Feb 27 01:18:00 CET 2015 - ro@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package pcfclock # spec file for package pcfclock
# #
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -32,6 +32,7 @@ Patch1: pcfclock-module_param.patch
Patch2: pcfclock-no_devfs.patch Patch2: pcfclock-no_devfs.patch
Patch3: pcfclock-include.patch Patch3: pcfclock-include.patch
Patch4: pcfclock-linux-3.19.patch Patch4: pcfclock-linux-3.19.patch
Patch5: pcfclock-linux-4.12.patch
BuildRequires: kernel-source BuildRequires: kernel-source
BuildRequires: kernel-syms BuildRequires: kernel-syms
BuildRequires: module-init-tools BuildRequires: module-init-tools
@ -71,20 +72,20 @@ more than 1500 kilometers.
%patch2 %patch2
%patch3 %patch3
%patch4 %patch4
%patch5
mkdir source mkdir source
mkdir obj mkdir obj
cp -a linux/pcfclock.c %{SOURCE1} \ cp -a linux/pcfclock.c %{SOURCE1} \
source source
%build %build
CFLAGS=$RPM_OPT_FLAGS \ %configure --without-linux
./configure --prefix=/usr --mandir=%{_mandir} --without-linux make %{?_smp_mflags}
make
for flavor in %flavors_to_build; do for flavor in %flavors_to_build; do
rm -rf obj/$flavor rm -rf obj/$flavor
cp -r source obj/$flavor cp -r source obj/$flavor
make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \ make -C /usr/src/linux-obj/%_target_cpu/$flavor modules \
M=$PWD/obj/$flavor M=$PWD/obj/$flavor %{?_smp_mflags}
done done
%install %install
@ -120,7 +121,4 @@ systemd-tmpfiles --create /usr/lib/tmpfiles.d/pcfclock.conf
/usr/lib/tmpfiles.d/pcfclock.conf /usr/lib/tmpfiles.d/pcfclock.conf
%endif %endif
%clean
rm -rf %{buildroot}
%changelog %changelog