diff --git a/openbox-calc-layer.patch b/openbox-calc-layer.patch deleted file mode 100644 index 9f00bbb..0000000 --- a/openbox-calc-layer.patch +++ /dev/null @@ -1,36 +0,0 @@ -From https://bugzilla.icculus.org/show_bug.cgi?id=6669#c2 - -diff --git a/openbox/client.c b/openbox/client.c -index 3ff278ae..ac4ff827 100644 ---- a/openbox/client.c -+++ b/openbox/client.c -@@ -2702,9 +2702,10 @@ static void client_calc_layer_internal(ObClient *self) - void client_calc_layer(ObClient *self) - { - GList *it; -+ GList *list = g_list_copy(stacking_list); - - /* skip over stuff above fullscreen layer */ -- for (it = stacking_list; it; it = g_list_next(it)) -+ for (it = list; it; it = g_list_next(it)) - if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break; - - /* find the windows in the fullscreen layer, and mark them not-visited */ -@@ -2717,7 +2718,7 @@ void client_calc_layer(ObClient *self) - client_calc_layer_internal(self); - - /* skip over stuff above fullscreen layer */ -- for (it = stacking_list; it; it = g_list_next(it)) -+ for (it = list; it; it = g_list_next(it)) - if (window_layer(it->data) <= OB_STACKING_LAYER_FULLSCREEN) break; - - /* now recalc any windows in the fullscreen layer which have not -@@ -2728,6 +2729,8 @@ void client_calc_layer(ObClient *self) - !WINDOW_AS_CLIENT(it->data)->visited) - client_calc_layer_internal(it->data); - } -+ -+ g_list_free(it); - } - - gboolean client_should_show(ObClient *self) diff --git a/openbox-kf5menu.patch b/openbox-kf5menu.patch deleted file mode 100644 index 1c3c9e5..0000000 --- a/openbox-kf5menu.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up openbox-3.6.1/data/xsession/openbox-kde-session.in.kf5menu openbox-3.6.1/data/xsession/openbox-kde-session.in ---- openbox-3.6.1/data/xsession/openbox-kde-session.in.kf5menu 2011-10-16 18:13:18.000000000 +0200 -+++ openbox-3.6.1/data/xsession/openbox-kde-session.in 2020-11-09 10:42:43.755217411 +0100 -@@ -8,7 +8,7 @@ if test -n "$1"; then - fi - - # Set the prefix for the menu layout to use --export XDG_MENU_PREFIX="kde-4-" -+export XDG_MENU_PREFIX="kf5-" - - # Clean up after GDM - xprop -root -remove _NET_NUMBER_OF_DESKTOPS \ diff --git a/openbox-python3.patch b/openbox-python3.patch deleted file mode 100644 index f17bef3..0000000 --- a/openbox-python3.patch +++ /dev/null @@ -1,113 +0,0 @@ -diff -up openbox-3.6.1/data/autostart/openbox-xdg-autostart.python3 openbox-3.6.1/data/autostart/openbox-xdg-autostart ---- openbox-3.6.1/data/autostart/openbox-xdg-autostart.python3 2013-04-17 14:27:27.000000000 +0200 -+++ openbox-3.6.1/data/autostart/openbox-xdg-autostart 2018-04-17 15:52:23.849765020 +0200 -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - - # openbox-xdg-autostart runs things based on the XDG autostart specification - # Copyright (C) 2008 Dana Jansens -@@ -28,9 +28,9 @@ try: - from xdg.DesktopEntry import DesktopEntry - from xdg.Exceptions import ParsingError - except ImportError: -- print -- print >>sys.stderr, "ERROR:", ME, "requires PyXDG to be installed" -- print -+ print() -+ print("ERROR:", ME, "requires PyXDG to be installed", file=sys.stderr) -+ print() - sys.exit(1) - - def main(argv=sys.argv): -@@ -51,7 +51,7 @@ def main(argv=sys.argv): - try: - autofile = AutostartFile(path) - except ParsingError: -- print "Invalid .desktop file: " + path -+ print("Invalid .desktop file: " + path) - else: - if not autofile in files: - files.append(autofile) -@@ -99,9 +99,9 @@ class AutostartFile: - - def _alert(self, str, info=False): - if info: -- print "\t ", str -+ print("\t ", str) - else: -- print "\t*", str -+ print("\t*", str) - - def _showInEnvironment(self, envs, verbose=False): - default = not self.de.getOnlyShowIn() -@@ -146,9 +146,9 @@ class AutostartFile: - - def display(self, envs): - if self._shouldRun(envs): -- print "[*] " + self.de.getName() -+ print("[*] " + self.de.getName()) - else: -- print "[ ] " + self.de.getName() -+ print("[ ] " + self.de.getName()) - self._alert("File: " + self.path, info=True) - if self.de.getExec(): - self._alert("Executes: " + self.de.getExec(), info=True) -@@ -165,33 +165,33 @@ class AutostartFile: - os.chdir(here) - - def show_help(): -- print "Usage:", ME, "[OPTION]... [ENVIRONMENT]..." -- print -- print "This tool will run xdg autostart .desktop files" -- print -- print "OPTIONS" -- print " --list Show a list of the files which would be run" -- print " Files which would be run are marked with an asterix" -- print " symbol [*]. For files which would not be run," -- print " information is given for why they are excluded" -- print " --help Show this help and exit" -- print " --version Show version and copyright information" -- print -- print "ENVIRONMENT specifies a list of environments for which to run autostart" -- print "applications. If none are specified, only applications which do not " -- print "limit themselves to certain environments will be run." -- print -- print "ENVIRONMENT can be one or more of:" -- print " GNOME Gnome Desktop" -- print " KDE KDE Desktop" -- print " ROX ROX Desktop" -- print " XFCE XFCE Desktop" -- print " Old Legacy systems" -+ print("Usage:", ME, "[OPTION]... [ENVIRONMENT]...") -+ print() -+ print("This tool will run xdg autostart .desktop files") -+ print() -+ print("OPTIONS") -+ print(" --list Show a list of the files which would be run") -+ print(" Files which would be run are marked with an asterix") -+ print(" symbol [*]. For files which would not be run,") -+ print(" information is given for why they are excluded") -+ print(" --help Show this help and exit") -+ print(" --version Show version and copyright information") -+ print() -+ print("ENVIRONMENT specifies a list of environments for which to run autostart") -+ print("applications. If none are specified, only applications which do not ") -+ print("limit themselves to certain environments will be run.") -+ print -+ print("ENVIRONMENT can be one or more of:") -+ print(" GNOME Gnome Desktop") -+ print(" KDE KDE Desktop") -+ print(" ROX ROX Desktop") -+ print(" XFCE XFCE Desktop") -+ print(" Old Legacy systems") - print - - def show_version(): -- print ME, VERSION -- print "Copyright (c) 2008 Dana Jansens" -+ print(ME, VERSION) -+ print("Copyright (c) 2008 Dana Jansens") - print - - if __name__ == "__main__": diff --git a/openbox.spec b/openbox.spec index 9e1d7f4..7598925 100644 --- a/openbox.spec +++ b/openbox.spec @@ -1,30 +1,24 @@ Name: openbox Version: 3.6.1 -Release: 31%{?dist} +Release: 5%{?dist} Summary: A highly configurable and standards-compliant X11 window manager -License: GPL-2.0-or-later +Group: User Interface/Desktops +License: GPLv2+ URL: http://openbox.org Source0: http://openbox.org/dist/%{name}/%{name}-%{version}.tar.xz Source1: http://icculus.org/openbox/tools/setlayout.c Source2: xdg-menu Source3: menu.xml Source4: terminals.menu -Patch1: openbox-python3.patch -Patch2: openbox-kf5menu.patch -Patch3: openbox-calc-layer.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} # required by xdg-menu and xdg-autostart scripts -Requires: python3-pyxdg -# used by xdg-menu for icon support (optional) -Suggests: python3-gobject +Requires: pyxdg # as discussed in https://bugzilla.redhat.com/860997 Requires: redhat-menus -BuildRequires: make -BuildRequires: gcc BuildRequires: gettext BuildRequires: desktop-file-utils BuildRequires: pango-devel @@ -54,11 +48,13 @@ actions, multi-head/Xinerama support, and dynamically generated "pipe menus." For a full list of the FreeDesktop.org standards with which it is compliant, please see the COMPLIANCE file in the included documentation of this package. For a graphical configuration editor, you'll need to install the obconf +package. For a graphical menu editor, you'll need to install the obmenu package. %package devel Summary: Development files for %{name} +Group: Development/Libraries Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: pkgconfig Requires: pango-devel @@ -72,6 +68,7 @@ developing applications that use %{name}. %package libs Summary: Shared libraries for %{name} +Group: Development/Libraries %description libs The %{name}-libs package contains shared libraries used by %{name}. @@ -79,8 +76,13 @@ The %{name}-libs package contains shared libraries used by %{name}. %package kde Summary: KDE integration for %{name} +Group: User Interface/Desktops Requires: %{name} = %{version}-%{release} +%if 0%{?fedora} > 21 Requires: plasma-workspace +%else +Requires: kdebase-workspace +%endif BuildArch: noarch %description kde @@ -90,9 +92,6 @@ KDE session. %prep %setup -q -%patch -P1 -p1 -b .python3 -%patch -P2 -p1 -b .kf5menu -%patch -P3 -p1 -b .calc-layer %build @@ -101,12 +100,12 @@ KDE session. ## Fix RPATH hardcoding. sed -ie 's|^hardcode_libdir_flag_spec=.*$|hardcode_libdir_flag_spec=""|g' libtool sed -ie 's|^runpath_var=LD_RUN_PATH$|runpath_var=DIE_RPATH_DIE|g' libtool -%make_build +make %{?_smp_mflags} -gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS -o setlayout %{SOURCE1} -lX11 +gcc %{optflags} -o setlayout %{SOURCE1} -lX11 %install -%make_install +make install DESTDIR=%{buildroot} install setlayout %{buildroot}%{_bindir} install -p %{SOURCE2} %{buildroot}%{_libexecdir}/openbox-xdg-menu @@ -170,90 +169,14 @@ rm -rf %{buildroot}%{_datadir}/doc/%{name} %{_datadir}/xsessions/%{name}-kde.desktop %{_mandir}/man1/%{name}-kde-session*.1* -%ldconfig_scriptlets libs + +%post libs -p /sbin/ldconfig + + +%postun libs -p /sbin/ldconfig + %changelog -* Thu Jul 16 2026 Fedora Release Engineering - 3.6.1-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Fri Jan 16 2026 Fedora Release Engineering - 3.6.1-30 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild - -* Thu Jul 24 2025 Fedora Release Engineering - 3.6.1-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Fri Jan 17 2025 Fedora Release Engineering - 3.6.1-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Thu Jul 18 2024 Fedora Release Engineering - 3.6.1-27 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 3.6.1-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 3.6.1-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Thu Jul 20 2023 Fedora Release Engineering - 3.6.1-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jun 13 2023 Leigh Scott - 3.6.1-23 -- Rebuild fo new imlib2 - -* Thu Apr 27 2023 Miroslav Lichvar - 3.6.1-22 -- fix crash with new glib (#2178299) - -* Thu Jan 19 2023 Fedora Release Engineering - 3.6.1-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Jul 22 2022 Fedora Release Engineering - 3.6.1-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Thu Jan 20 2022 Fedora Release Engineering - 3.6.1-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Thu Jul 22 2021 Fedora Release Engineering - 3.6.1-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jan 26 2021 Fedora Release Engineering - 3.6.1-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Mon Nov 09 2020 Miroslav Lichvar - 3.6.1-16 -- update XDG menu prefix in KDE session script (#1851755) -- drop obsolete KDE4 requirement - -* Tue Jul 28 2020 Fedora Release Engineering - 3.6.1-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jan 29 2020 Fedora Release Engineering - 3.6.1-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Wed Oct 09 2019 Miroslav Lichvar - 3.6.1-13 -- remove obmenu from description - -* Thu Jul 25 2019 Fedora Release Engineering - 3.6.1-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 3.6.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 3.6.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Apr 17 2018 Miroslav Lichvar - 3.6.1-9 -- fix pyxdg requirement - -* Tue Apr 17 2018 Miroslav Lichvar - 3.6.1-8 -- switch packaged python scripts to python3 - -* Mon Feb 26 2018 Miroslav Lichvar - 3.6.1-7 -- build setlayout with hardening LDFLAGS (#1548830) -- use macro for ldconfig scriptlets -- add gcc to build requirements - -* Thu Feb 08 2018 Fedora Release Engineering - 3.6.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - * Thu Aug 03 2017 Fedora Release Engineering - 3.6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/xdg-menu b/xdg-menu index ccd0efd..b3e5da0 100644 --- a/xdg-menu +++ b/xdg-menu @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/python # # Copyright (C) 2008 Red Hat, Inc. # @@ -26,8 +26,6 @@ from xml.sax.saxutils import escape icons = True try: - import gi - gi.require_version('Gtk', '3.0') from gi.repository import Gtk except ImportError: icons = False @@ -56,7 +54,7 @@ def icon_attr(entry): return '' def escape_utf8(s): - if sys.version_info[0] < 3 and isinstance(s, unicode): + if isinstance(s, unicode): s = s.encode('utf-8', 'xmlcharrefreplace') return escape(s) @@ -65,25 +63,25 @@ def entry_name(entry): def walk_menu(entry): if isinstance(entry, xdg.Menu.Menu) and entry.Show is True: - print('' \ + print '' \ % (entry_name(entry), entry_name(entry), - escape_utf8(icon_attr(entry)))) - list(map(walk_menu, entry.getEntries())) - print('') + escape_utf8(icon_attr(entry))) + map(walk_menu, entry.getEntries()) + print '' elif isinstance(entry, xdg.Menu.MenuEntry) and entry.Show is True: name = entry_name(entry.DesktopEntry) - print(' ' % (name.replace('"', ''), - escape_utf8(icon_attr(entry.DesktopEntry)))) + print ' ' % (name.replace('"', ''), + escape_utf8(icon_attr(entry.DesktopEntry))) command = re.sub(' -caption "%c"| -caption %c', ' -caption "%s"' % name, escape_utf8(entry.DesktopEntry.getExec())) command = re.sub(' [^ ]*%[fFuUdDnNickvm]', '', command) if entry.DesktopEntry.getTerminal(): command = 'xterm -title "%s" -e %s' % (name, command) - print(' ' + \ - '%s' % command) - print(' ') + print ' ' + \ + '%s' % command + print ' ' if len(sys.argv) > 1: menufile = sys.argv[1] + '.menu' @@ -102,7 +100,7 @@ if icons: menu = xdg.Menu.parse(menufile) -print('') -print('') -list(map(walk_menu, menu.getEntries())) -print('') +print '' +print '' +map(walk_menu, menu.getEntries()) +print ''