[521] | 1 | Summary: X.Org X11 filesystem layout |
---|
| 2 | Summary(ja): X.Org X11 ファイルシステムレイアウト |
---|
| 3 | Name: xorg-x11-filesystem |
---|
[3585] | 4 | Version: 7.6 |
---|
[521] | 5 | Release: 1%{?_dist_release} |
---|
| 6 | License: MIT/X11 |
---|
| 7 | Group: System Environment/Base |
---|
| 8 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 9 | |
---|
| 10 | Requires(pre): filesystem >= 2.4 |
---|
| 11 | Obsoletes: XOrg-devel < 7.0 |
---|
| 12 | |
---|
| 13 | %description |
---|
| 14 | This package provides some directories which are required by other |
---|
| 15 | packages which comprise the modularized X.Org X11R7 X Window System |
---|
| 16 | release. This package must be installed during OS installation |
---|
| 17 | or upgrade, in order to force the creation of these directories, |
---|
| 18 | and replace any legacy symbolic links that might be present in old |
---|
| 19 | locations, which could result in upgrade failures. |
---|
| 20 | |
---|
| 21 | %prep |
---|
| 22 | %install |
---|
| 23 | rm -rf $RPM_BUILD_ROOT |
---|
| 24 | |
---|
| 25 | # NOTE: Do not replace these with _libdir or _includedir macros, they are |
---|
| 26 | # intentionally explicit. |
---|
[3585] | 27 | mkdir -p "$RPM_BUILD_ROOT%{_libdir}/X11" |
---|
| 28 | mkdir -p "$RPM_BUILD_ROOT%{_includedir}/X11" |
---|
[521] | 29 | mkdir -p "$RPM_BUILD_ROOT%{_datadir}/X11" |
---|
| 30 | mkdir -p "$RPM_BUILD_ROOT%{_bindir}" |
---|
| 31 | |
---|
| 32 | UPGRADE_CMD="%{_bindir}/xorg-x11-filesystem-upgrade" |
---|
| 33 | |
---|
| 34 | # NOTE: The quoted 'EOF' is required to disable variable interpolation |
---|
| 35 | cat > "$RPM_BUILD_ROOT/${UPGRADE_CMD}" <<'EOF' |
---|
| 36 | #!/bin/bash |
---|
| 37 | # |
---|
| 38 | # Modular X.Org X11R7 filesystem upgrade script. |
---|
| 39 | # |
---|
| 40 | # If any of the following dirs are symlinks, remove them and create a dir |
---|
| 41 | # in its place. This is required, so that modular X packages get installed |
---|
| 42 | # into a real directory, and do not follow old compatibility symlinks |
---|
| 43 | # provided in previous releases of the operating system. |
---|
| 44 | # |
---|
| 45 | # NOTE: Do not replace these with _libdir or _includedir macros, they are |
---|
| 46 | # intentionally explicit. |
---|
[3585] | 47 | for dir in %{_includedir}/X11 %{_libdir}/X11 ; do |
---|
[521] | 48 | [ -L "$dir" ] && rm -f -- "$dir" &> /dev/null |
---|
| 49 | done |
---|
[3585] | 50 | for dir in %{_includedir}/X11 %{_libdir}/X11 ; do |
---|
[521] | 51 | [ ! -d "$dir" ] && mkdir -p "$dir" &> /dev/null |
---|
| 52 | done |
---|
| 53 | exit 0 |
---|
| 54 | EOF |
---|
| 55 | |
---|
| 56 | chmod 0755 "$RPM_BUILD_ROOT/${UPGRADE_CMD}" |
---|
| 57 | |
---|
| 58 | |
---|
| 59 | %clean |
---|
| 60 | rm -rf $RPM_BUILD_ROOT |
---|
| 61 | |
---|
| 62 | %pre |
---|
| 63 | # NOTE: Do not replace these with _libdir or _includedir macros, they are |
---|
| 64 | # intentionally explicit. |
---|
| 65 | # Remove old symlinks if present, and replace them with directories. |
---|
[3585] | 66 | for dir in %{_includedir}/X11 %{_libdir}/X11 ; do |
---|
[521] | 67 | [ -L "$dir" ] && rm -f -- "$dir" &> /dev/null |
---|
| 68 | done |
---|
[3585] | 69 | for dir in %{_includedir}/X11 %{_libdir}/X11 ; do |
---|
[521] | 70 | [ ! -d "$dir" ] && mkdir -p "$dir" &> /dev/null |
---|
| 71 | done |
---|
| 72 | exit 0 |
---|
| 73 | |
---|
| 74 | %files |
---|
| 75 | %defattr(-,root,root,-) |
---|
| 76 | # NOTE: These are explicitly listed intentionally, instead of using rpm |
---|
| 77 | # macros, as these exact locations are required for compatibility |
---|
| 78 | # regardless of what _libdir or _includedir point to. |
---|
[3585] | 79 | %dir %{_libdir}/X11 |
---|
| 80 | %dir %{_includedir}/X11 |
---|
[521] | 81 | %dir %{_datadir}/X11 |
---|
| 82 | %dir %{_bindir}/xorg-x11-filesystem-upgrade |
---|
| 83 | %{_bindir}/xorg-x11-filesystem-upgrade |
---|
| 84 | |
---|
| 85 | %changelog |
---|
[3585] | 86 | * Sun Apr 17 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 7.6-1 |
---|
| 87 | - remove BuildArch: noarch |
---|
| 88 | - bump version to 7.6-1 |
---|
| 89 | |
---|
[521] | 90 | * Tue Apr 07 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 7.4-1 |
---|
| 91 | - spec in utf-8 |
---|
| 92 | - bump version to 7.4-1 |
---|
| 93 | |
---|
| 94 | * Thu Apr 17 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 7.3-1 |
---|
| 95 | - own %%{_datadir}/X11 |
---|
| 96 | - Obsoletes: XOrg-devel < 7.0 |
---|
| 97 | |
---|
| 98 | * Sat Jan 12 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 7.1-0vl1 |
---|
| 99 | - initial build for Vine Linux based on fodora package. |
---|
| 100 | |
---|
| 101 | * Mon Jul 10 2006 Mike A. Harris <mharris@redhat.com> 7.1-2.fc6 |
---|
| 102 | - Reword package description for (#189648) |
---|
| 103 | |
---|
| 104 | * Wed Jun 21 2006 Mike A. Harris <mharris@redhat.com> 7.1-1 |
---|
| 105 | - Bumped version to 7.1-1 and rebuilt for X11R7.1. |
---|
| 106 | |
---|
| 107 | * Thu Feb 09 2006 Mike A. Harris <mharris@redhat.com> 7.0-1 |
---|
| 108 | - Bumped version to 7.0-1 and rebuilt. |
---|
| 109 | |
---|
| 110 | * Tue Nov 22 2005 Mike A. Harris <mharris@redhat.com> 0.99.2-3 |
---|
| 111 | - Ok, even though I _tested_ it, and it worked.. the previous build had a |
---|
| 112 | broken post, preun, and postun script, due to copy and paste error. Ugh. |
---|
| 113 | Also, the script in /usr/bin was broken due to heredoc variable |
---|
| 114 | interpolation, which I turned off this time so it is generated correctly. |
---|
| 115 | I removed the post, preun, postun scripts as they are overkill anyway. |
---|
| 116 | The bug in 0.99.2-2 might cause upgrade or uninstall of the package to |
---|
| 117 | fail and require manual uninstallation with --noscripts. Oops. This |
---|
| 118 | is what "rawhide" means boys and girls. |
---|
| 119 | - Added "Requires(pre): filesystem >= 2.3.7-1", to avoid problems with older |
---|
| 120 | versions of it, and to allow packages that need this workaround to only |
---|
| 121 | have to set a dependency on xorg-x11-filesystem instead of both packages. |
---|
| 122 | |
---|
| 123 | * Mon Nov 21 2005 Mike A. Harris <mharris@redhat.com> 0.99.2-2 |
---|
| 124 | - Updated scripts so that they create the directory even if the symlink was |
---|
| 125 | not present, to ensure that the dir exists first and avoid theoretical |
---|
| 126 | case in which, in a single transaction, xorg-x11-filesystem gets installed, |
---|
| 127 | no symlink or dir is present causing the symlink test to fail, so no dir |
---|
| 128 | gets created, then another package in the transaction set installs a |
---|
| 129 | symlink, then a package tries to install a dir and fails. This should |
---|
| 130 | guarantee now that these two dirs are really really dirs, not symlinks |
---|
| 131 | for sure for sure. |
---|
| 132 | |
---|
| 133 | * Mon Nov 21 2005 Mike A. Harris <mharris@redhat.com> 0.99.2-1 |
---|
| 134 | - Initial build. |
---|
| 135 | - Package creates the directories /usr/lib/X11 and /usr/include/X11 and owns |
---|
| 136 | them as properly flagged dirs in the file manifest. |
---|
| 137 | - Added identical pre/post/preun/postun scripts which test to see if any of |
---|
| 138 | of each of /usr/include/X11 /usr/lib/X11 /usr/lib64/X11 |
---|