From d66825093abefb5eddc89f8b2a474cd2920902a4 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Oct 31 2016 17:11:39 +0000 Subject: Use %autopatch instead of doing our own custom git-am trick There's some quirks here. We have a .gitignore we'd like to use, so we need to copy that in before doing git-init. But the git-init happens in %autosetup if you pass it -S git, so we can't do that. Also we want to blow away any .git directory inside the tarball, otherwise the initial commit will fail. So, unpack, nuke .git, copy in .gitignore, then manually do the rest of %autosetup. --- diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 1ee715b..5c2563c 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -45,7 +45,7 @@ Summary: X.Org X11 X server Name: xorg-x11-server Version: 1.19.0 -Release: 0.4%{?gitdate:.%{gitdate}}%{dist} +Release: 0.5%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -333,30 +333,13 @@ Xserver source code needed to build VNC server (Xvnc) %prep -%setup -q -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} -#setup -q -n %{pkgname}-%{version} - -#if 0%{?gitdate} -%if 0 -git checkout -b fedora -sed -i 's/git/&+ssh/' .git/config -if [ -z "$GIT_COMMITTER_NAME" ]; then - git config user.email "x@fedoraproject.org" - git config user.name "Fedora X Ninjas" -fi -%else -git init -if [ -z "$GIT_COMMITTER_NAME" ]; then - git config user.email "x@fedoraproject.org" - git config user.name "Fedora X Ninjas" -fi +%autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} +rm -rf .git cp %{SOURCE1} .gitignore -git add . -git commit -a -q -m "%{version} baseline." -%endif - -# Apply all the patches. -git am -p1 %{patches} < /dev/null +# ick +%global __scm git +%{expand:%__scm_setup_git -q} +%autopatch %if %{with_hw_servers} && 0%{?stable_abi} # check the ABI in the source against what we expect. @@ -608,6 +591,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Mon Oct 31 2016 Adam Jackson - 1.19.0-0.5.20161026 +- Use %%autopatch instead of doing our own custom git-am trick + * Fri Oct 28 2016 Hans de Goede - 1.19.0-0.4.20161026 - Add missing Requires: libXfont2-devel to -devel sub-package (rhbz#1389711)