75ee81
%global pkgname xinit
75ee81
75ee81
Summary:    X.Org X11 X Window System xinit startup scripts
75ee81
Name:       xorg-x11-%{pkgname}
75ee81
Version:    1.4.0
75ee81
Release:    11%{?dist}
75ee81
License:    MIT
75ee81
URL:        https://www.x.org
75ee81
75ee81
Source0:    https://xorg.freedesktop.org/archive/individual/app/%{pkgname}-%{version}.tar.bz2
75ee81
Source10:   xinitrc-common
75ee81
Source11:   xinitrc
75ee81
Source12:   Xclients
75ee81
Source13:   Xmodmap
75ee81
Source14:   Xresources
75ee81
# NOTE: Xsession is used by xdm/kdm/gdm and possibly others, so we keep it
75ee81
#       here instead of the xdm package.
75ee81
Source16:   Xsession
75ee81
Source17:   localuser.sh
75ee81
Source18:   xinit-compat.desktop
75ee81
Source19:   xinit-compat
75ee81
75ee81
# Fedora specific patches
75ee81
Patch1: xinit-1.0.2-client-session.patch
75ee81
Patch5: 0003-startx-Make-startx-auto-display-select-work-with-per.patch
75ee81
# Fedora specific patch to match the similar patch in the xserver
75ee81
Patch6: xinit-1.3.4-set-XORG_RUN_AS_USER_OK.patch
75ee81
75ee81
# The build process uses cpp (the C preprocessor) to do some text
75ee81
# processing on several files that are not C or C++. However, these
75ee81
# files have '.cpp' extensions, which causes cpp to preprocess them
75ee81
# using cc1plus, which is part of gcc-c++. We could patch the build
75ee81
# to pass '-xc' or '-xassembler-with-cpp' to cpp to avoid this, but
75ee81
# doing so actually causes the processing to be done differently
75ee81
# somehow, and a bunch of empty lines to show up at the top of
75ee81
# startx (which is one of the files so processed). So it seems better
75ee81
# to just BuildRequire gcc-c++ for now, so the processing is done as
75ee81
# it was before. See https://bugs.freedesktop.org/show_bug.cgi?id=107368
75ee81
# for more on this.
75ee81
BuildRequires:  make
75ee81
BuildRequires:  automake gcc gcc-c++
75ee81
BuildRequires:  pkgconfig(x11)
75ee81
BuildRequires:  dbus-devel
75ee81
75ee81
# NOTE: startx needs xauth in order to run, but that is not picked up
75ee81
#       automatically by rpm.  (Bug #173684)
75ee81
Requires:   xorg-x11-xauth
75ee81
# next two are for localuser.sh
75ee81
Requires:   coreutils
75ee81
Requires:   xhost
75ee81
75ee81
Provides:   %{pkgname} = %{version}
75ee81
75ee81
%description
75ee81
X.Org X11 X Window System xinit startup scripts.
75ee81
75ee81
%package session
75ee81
Summary:    Display manager support for ~/.xsession and ~/.Xclients
75ee81
75ee81
%description session
75ee81
Allows legacy ~/.xsession and ~/.Xclients files to be used from display
75ee81
managers.
75ee81
75ee81
%prep
75ee81
%setup -q -n %{pkgname}-%{version}
75ee81
%patch1 -p1
75ee81
%patch5 -p1
75ee81
%patch6 -p1
75ee81
75ee81
%build
75ee81
%configure
75ee81
make %{?_smp_mflags}
75ee81
75ee81
%install
75ee81
%make_install
75ee81
install -p -m644 -D %{SOURCE18} $RPM_BUILD_ROOT%{_datadir}/xsessions/xinit-compat.desktop
75ee81
75ee81
# Install Red Hat custom xinitrc, etc.
75ee81
{
75ee81
    mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit
75ee81
75ee81
    install -p -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc-common
75ee81
75ee81
    for script in %{SOURCE11} %{SOURCE12} %{SOURCE16} ; do
75ee81
        install -p -m 755 $script $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/${script##*/}
75ee81
    done
75ee81
75ee81
    install -p -m 644 %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xmodmap
75ee81
    install -p -m 644 %{SOURCE14} $RPM_BUILD_ROOT%{_sysconfdir}/X11/Xresources
75ee81
75ee81
    mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d
75ee81
    install -p -m 755 %{SOURCE17} $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/xinitrc.d/localuser.sh
75ee81
75ee81
    mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xinit/Xclients.d
75ee81
75ee81
    mkdir -p $RPM_BUILD_ROOT%{_libexecdir}
75ee81
    install -p -m 755 %{SOURCE19} $RPM_BUILD_ROOT%{_libexecdir}
75ee81
}
75ee81
75ee81
%files
75ee81
%doc COPYING README ChangeLog
75ee81
%{_bindir}/startx
75ee81
%{_bindir}/xinit
75ee81
%dir %{_sysconfdir}/X11/xinit
75ee81
%{_sysconfdir}/X11/xinit/xinitrc
75ee81
%{_sysconfdir}/X11/xinit/xinitrc-common
75ee81
%config(noreplace) %{_sysconfdir}/X11/Xmodmap
75ee81
%config(noreplace) %{_sysconfdir}/X11/Xresources
75ee81
%dir %{_sysconfdir}/X11/xinit/Xclients.d
75ee81
%{_sysconfdir}/X11/xinit/Xclients
75ee81
%{_sysconfdir}/X11/xinit/Xsession
75ee81
%dir %{_sysconfdir}/X11/xinit/xinitrc.d
75ee81
%{_sysconfdir}/X11/xinit/xinitrc.d/*
75ee81
%{_mandir}/man1/startx.1*
75ee81
%{_mandir}/man1/xinit.1*
75ee81
75ee81
%files session
75ee81
%{_libexecdir}/xinit-compat
75ee81
%{_datadir}/xsessions/xinit-compat.desktop
75ee81
75ee81
%changelog
75ee81
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.4.0-11
75ee81
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
75ee81
  Related: rhbz#1991688
75ee81
75ee81
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.4.0-10
75ee81
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
75ee81
75ee81
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-9
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
75ee81
75ee81
* Thu Nov  5 11:00:56 AEST 2020 Peter Hutterer <peter.hutterer@redhat.com> - 1.4.0-8
75ee81
- Add BuildRequires for make
75ee81
75ee81
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-7
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
75ee81
75ee81
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-6
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
75ee81
75ee81
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-5
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
75ee81
75ee81
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-4
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
75ee81
75ee81
* Tue Jul 24 2018 Adam Williamson <awilliam@redhat.com> - 1.4.0-3
75ee81
- Rebuild with gcc-c++ (build without it succeeded but was broken)
75ee81
75ee81
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-2
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
75ee81
75ee81
* Mon Mar 12 2018 Adam Jackson <ajax@redhat.com> - 1.4.0-1
75ee81
- xinit 1.4.0
75ee81
75ee81
* Mon Feb 19 2018 Peter Hutterer <peter.hutterer@redhat.com> 1.3.4-18
75ee81
- Add BR for automake and gcc
75ee81
75ee81
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-17
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
75ee81
75ee81
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-16
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
75ee81
75ee81
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-15
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
75ee81
75ee81
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-14
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
75ee81
75ee81
* Wed Dec 14 2016 Hans de Goede <hdegoede@redhat.com> - 1.3.4-13
75ee81
- Check for all 3 of SSH_AGENT, SSH_AGENT_PID and SSH_AUTH_SOCK to fix
75ee81
  a regression introduced by the previous fix (rhbz#1352339)
75ee81
75ee81
* Mon Aug 29 2016 Hans de Goede <hdegoede@redhat.com> - 1.3.4-12
75ee81
- Drop 0001-startx-Pass-nolisten-tcp-by-default.patch this is the
75ee81
  server default now
75ee81
- Check for SSH_AUTH_SOCK not SSH_AGENT in xinitrc-common (rhbz#1352339)
75ee81
75ee81
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.4-11
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
75ee81
75ee81
* Wed Jan 20 2016 Peter Hutterer <peter.hutterer@redhat.com>
75ee81
- s/define/global/
75ee81
75ee81
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.4-10
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
75ee81
75ee81
* Mon May 18 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-9
75ee81
- Fix typo in Xsession file (rhbz#1222299)
75ee81
75ee81
* Thu Apr 30 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-8
75ee81
- Only set XORG_RUN_AS_USER_OK when no vt is specified (#1203780)
75ee81
75ee81
* Fri Mar 20 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-7
75ee81
- Fix startx auto display select not working when a Xserver started by
75ee81
  gdm is running
75ee81
75ee81
* Wed Mar 18 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-6
75ee81
- Set XORG_RUN_AS_USER_OK when starting X on the current tty, to run X
75ee81
  to run without root rights when possible
75ee81
75ee81
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.3.4-5
75ee81
- Rebuilt for Fedora 23 Change
75ee81
  https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
75ee81
75ee81
* Tue Feb  3 2015 Hans de Goede <hdegoede@redhat.com> - 1.3.4-4
75ee81
- xinitrc-common: Do not override SSH_AGENT if already set (rhbz#1067676)
75ee81
75ee81
* Thu Jan 22 2015 Simone Caronni <negativo17@gmail.com> - 1.3.4-3
75ee81
- Xorg without root rights breaks by streams redirection (#1177513).
75ee81
- Format SPEC file; trim changelog.
75ee81
75ee81
* Wed Oct  1 2014 Hans de Goede <hdegoede@redhat.com> - 1.3.4-2
75ee81
- Add support for MATE to Xclients (#1147905)
75ee81
75ee81
* Thu Sep 11 2014 Hans de Goede <hdegoede@redhat.com> - 1.3.4-1
75ee81
- New upstream release 1.3.4
75ee81
- Resolves #806491 #990213 #1006029
75ee81
- Remove stale ck-xinit-session references from xinitrc-common (#910969)
75ee81
- Make startx pass "-nolisten tcp" by default, use -listen as server
75ee81
  option to disable this (#1111684)
75ee81
- Teach Xclients script about lxde (#488602)
75ee81
75ee81
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-13
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
75ee81
75ee81
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-12
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
75ee81
75ee81
* Tue Mar 25 2014 Hans de Goede <hdegoede@redhat.com> - 1.3.2-11
75ee81
- Fix startx ignoring a server or display passed on the cmdline (#960955)
75ee81
- Drop Fedora custom patch to unset XDG_SESSION_COOKIE, this was only for CK
75ee81
75ee81
* Thu Jan 23 2014 Dave Airlie <airlied@redhat.com> 1.3.2-10
75ee81
- fix for ppc64le enable (#1056742)
75ee81
75ee81
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-9
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
75ee81
75ee81
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-8
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
75ee81
75ee81
* Mon Oct 01 2012 Kevin Fenzi <kevin@scrye.com> 1.3.2-7
75ee81
- Add patch to not switch tty's, so systemd-logind works right with startx. 
75ee81
- Partially Fixes bug #806491 
75ee81
75ee81
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.2-6
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
75ee81
75ee81
* Thu Apr 26 2012 Adam Jackson <ajax@redhat.com> 1.3.2-5
75ee81
- xinit 1.3.2
75ee81
75ee81
* Thu Mar 08 2012 Adam Jackson <ajax@redhat.com> 1.3.1-5
75ee81
- Rebuild
75ee81
75ee81
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-3
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
75ee81
75ee81
* Wed Nov 16 2011 Adam Jackson <ajax@redhat.com> 1.3.1-2
75ee81
- Drop ConsoleKit integration, being removed in F17
75ee81
75ee81
* Mon Jul 25 2011 Matěj Cepl <mcepl@redhat.com> - 1.3.1-1
75ee81
- New upstream version. Patches updated.
75ee81
75ee81
* Sat May 28 2011 Matěj Cepl <mcepl@redhat.com> - 1.0.9-21
75ee81
- xinitrc-common sources ~/.profile (Bug 551508)
75ee81
75ee81
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.9-20
75ee81
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild