revert /media -> /run/media change - as it is more fragile than useful (#965918)

This commit is contained in:
Ondřej Vašík 2014-08-14 16:08:05 +02:00
parent 293135dd8d
commit 9eb51a1e51

View File

@ -1,7 +1,7 @@
Summary: The basic directory layout for a Linux system
Name: filesystem
Version: 3.2
Release: 30%{?dist}
Release: 31%{?dist}
License: Public Domain
URL: https://fedorahosted.org/filesystem
Group: System Environment/Base
@ -33,7 +33,7 @@ cd %{buildroot}
mkdir -p boot dev \
etc/{X11/{applnk,fontpath.d},xdg/autostart,opt,pm/{config.d,power.d,sleep.d},xinetd.d,skel,sysconfig,pki,bash_completion.d} \
home mnt opt proc root run/media srv sys tmp \
home media mnt opt proc root run srv sys tmp \
usr/{bin,games,include,%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{debug/usr,games,locale,modules,sse2},libexec,local/{bin,etc,games,lib,%{_lib},sbin,src,share/{applications,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x},info},libexec,include,},sbin,share/{aclocal,appdata,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,licenses,man/man{1,2,3,4,5,6,7,8,9,n,1x,2x,3x,4x,5x,6x,7x,8x,9x,0p,1p,3p},mime-info,misc,omf,pixmaps,sounds,themes,xsessions,X11,wayland-sessions},src,src/kernels,src/debug} \
var/{adm,empty,gopher,lib/{games,misc,rpm-state},local,log,nis,preserve,spool/{mail,lpd},tmp,db,cache,opt,games,yp}
@ -41,7 +41,6 @@ mkdir -p boot dev \
#ln -snf etc/sysconfig etc/default
ln -snf ../var/tmp usr/tmp
ln -snf spool/mail var/mail
ln -snf run/media media
ln -snf usr/bin bin
ln -snf usr/sbin sbin
ln -snf usr/lib lib
@ -136,23 +135,11 @@ posix.symlink("../.dwz", "/usr/lib/debug/usr/.dwz")
posix.symlink("usr/sbin", "/usr/lib/debug/sbin")
posix.symlink("usr/%{_lib}", "/%{_lib}")
posix.mkdir("/run")
posix.mkdir("/run/media")
st = posix.stat("/media")
if st and st.type == "link" then
os.remove("/media")
end
posix.mkdir("/var")
--#/media magic to be on the safe side - to prevent loss of userdata until F24
path = "/media"
st = posix.stat(path)
if st and st.type == "directory" then
status = os.rename(path, path .. ".rpmmoved")
if not status then
suffix = 0
while not status do
suffix = suffix + 1
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
end
os.rename(path, path .. ".rpmmoved")
end
end
posix.symlink("run/media", "/media")
posix.symlink("../run", "/var/run")
posix.symlink("../run/lock", "/var/lock")
return 0
@ -168,7 +155,6 @@ restorecon /boot 2>/dev/null >/dev/null || :
restorecon /proc 2>/dev/null >/dev/null || :
restorecon /dev 2>/dev/null >/dev/null || :
restorecon /media 2>/dev/null >/dev/null || :
restorecon /run/media 2>/dev/null >/dev/null || :
%files -f filelist
%defattr(0755,root,root,-)
@ -196,8 +182,7 @@ restorecon /run/media 2>/dev/null >/dev/null || :
%dir /opt
%attr(555,root,root) /proc
%attr(550,root,root) /root
%dir /run
/run/media
/run
/sbin
/srv
%attr(555,root,root) /sys
@ -279,6 +264,10 @@ restorecon /run/media 2>/dev/null >/dev/null || :
/var/yp
%changelog
* Mon Aug 11 2014 Ondrej Vasik <ovasik@redhat.com> - 3.2-31
- revert /media -> /run/media change - as it is more fragile
than useful (#965918)
* Wed Jul 30 2014 Ondrej Vasik <ovasik@redhat.com> - 3.2-30
- fix wrong redirection of restorecon stderr (#1124623)