handle bin/lib/lib64 symlinks in /usr/lib/debug (#974130), KSievers: fix yum installroot ending up with directories in /var instead of the expected symlinks to /run, create all symlinked dirs as pretrans
This commit is contained in:
parent
de22b9b233
commit
5a403cd705
@ -1,7 +1,7 @@
|
||||
Summary: The basic directory layout for a Linux system
|
||||
Name: filesystem
|
||||
Version: 3.2
|
||||
Release: 13%{?dist}
|
||||
Release: 15%{?dist}
|
||||
License: Public Domain
|
||||
URL: https://fedorahosted.org/filesystem
|
||||
Group: System Environment/Base
|
||||
@ -33,9 +33,9 @@ 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 media mnt opt proc root run/lock srv sys tmp \
|
||||
home media mnt opt proc root run srv sys tmp \
|
||||
usr/{bin,etc,games,include,%{_lib}/{games,sse2,tls,X11,pm-utils/{module.d,power.d,sleep.d}},lib/{debug,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,applications,augeas/lenses,backgrounds,desktop-directories,dict,doc,empty,games,ghostscript/conf.d,gnome,icons,idl,info,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},src,src/kernels,src/debug} \
|
||||
var/{adm,empty,gopher,lib/{games,misc,rpm-state},local,lock/subsys,log,nis,preserve,run,spool/{mail,lpd},tmp,db,cache,opt,games,yp}
|
||||
var/{adm,empty,gopher,lib/{games,misc,rpm-state},local,log,nis,preserve,spool/{mail,lpd},tmp,db,cache,opt,games,yp}
|
||||
|
||||
#do not create the symlink atm.
|
||||
#ln -snf etc/sysconfig etc/default
|
||||
@ -45,6 +45,8 @@ ln -snf usr/bin bin
|
||||
ln -snf usr/sbin sbin
|
||||
ln -snf usr/lib lib
|
||||
ln -snf usr/%{_lib} %{_lib}
|
||||
ln -snf ../run var/run
|
||||
ln -snf ../run/lock var/lock
|
||||
|
||||
sed -n -f %{buildroot}/iso_639.sed /usr/share/xml/iso-codes/iso_639.xml \
|
||||
>%{buildroot}/iso_639.tab
|
||||
@ -105,31 +107,30 @@ done
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%pretrans -p <lua>
|
||||
--#
|
||||
--# If we are running in pretrans in a fresh root, there is no /usr and symlinks.
|
||||
--# We cannot be sure, to be the very first rpm in the transaction list,
|
||||
--# so, let's create the toplevel symlinks here and the directories they point to.
|
||||
--# When our rpm is unpacked by cpio, it will set all permissions and modes later.
|
||||
--#
|
||||
|
||||
if posix.stat("/usr") == nil then
|
||||
posix.mkdir("/usr")
|
||||
end
|
||||
|
||||
for i,dir in ipairs({"/lib", "/%{_lib}", "/sbin", "/bin"}) do
|
||||
if posix.stat("/usr"..dir) == nil then
|
||||
posix.mkdir("/usr"..dir)
|
||||
if posix.stat(dir, "mode") == nil then
|
||||
posix.symlink("usr"..dir, dir)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return 0
|
||||
|
||||
%post -p <lua>
|
||||
--# If we are running in pretrans in a fresh root, there is no /usr and
|
||||
--# symlinks. We cannot be sure, to be the very first rpm in the
|
||||
--# transaction list. Let's create the needed base directories and symlinks
|
||||
--# here, to place the files from other packages in the right locations.
|
||||
--# When our rpm is unpacked by cpio, it will set all permissions and modes
|
||||
--# later.
|
||||
posix.mkdir("/usr")
|
||||
posix.mkdir("/usr/bin")
|
||||
posix.mkdir("/usr/sbin")
|
||||
posix.mkdir("/usr/lib")
|
||||
posix.mkdir("/usr/lib/debug")
|
||||
posix.mkdir("/usr/%{_lib}")
|
||||
posix.symlink("usr/bin", "/bin")
|
||||
posix.symlink("usr/sbin", "/sbin")
|
||||
posix.symlink("usr/lib", "/lib")
|
||||
posix.symlink("usr/bin", "/usr/lib/debug/bin")
|
||||
posix.symlink("usr/lib", "/usr/lib/debug/lib")
|
||||
posix.symlink("usr/%{_lib}", "/usr/lib/debug/%{_lib}")
|
||||
posix.symlink("usr/sbin", "/usr/lib/debug/sbin")
|
||||
posix.symlink("usr/%{_lib}", "/%{_lib}")
|
||||
posix.mkdir("/run")
|
||||
posix.symlink("../run", "/var/run")
|
||||
posix.symlink("../run/lock", "/var/lock")
|
||||
return 0
|
||||
|
||||
%files -f filelist
|
||||
%defattr(0755,root,root,-)
|
||||
@ -217,14 +218,13 @@ posix.symlink("../run/lock", "/var/lock")
|
||||
/var/gopher
|
||||
/var/lib
|
||||
/var/local
|
||||
%ghost %dir %attr(755,root,root) /var/lock
|
||||
%ghost /var/lock/subsys
|
||||
/var/lock
|
||||
/var/log
|
||||
/var/mail
|
||||
/var/nis
|
||||
/var/opt
|
||||
/var/preserve
|
||||
%ghost %attr(755,root,root) /var/run
|
||||
/var/run
|
||||
%dir /var/spool
|
||||
%attr(755,root,root) /var/spool/lpd
|
||||
%attr(775,root,mail) /var/spool/mail
|
||||
@ -232,6 +232,19 @@ posix.symlink("../run/lock", "/var/lock")
|
||||
/var/yp
|
||||
|
||||
%changelog
|
||||
* Wed Jun 19 2013 Ondrej Vasik <ovasik@redhat.com> - 3.2.15
|
||||
- handle bin/lib/lib64 symlinks in /usr/lib/debug (#974130)
|
||||
|
||||
* Tue Jun 18 2013 Kay Sievers <kay@redhat.com> - 3.2-14
|
||||
- fix yum installroot ending up with directories in /var
|
||||
instead of the expected symlinks to /run
|
||||
- ship /var/run and /var/lock as plain symlinks
|
||||
- do not handle /var/lock/subsys, it is always on tmpfs
|
||||
- create all symlinked directories and their targets
|
||||
in pretrans to make sure other packages install into
|
||||
the right place, even if filesystem.rpm is not the
|
||||
first package installed in the transaction
|
||||
|
||||
* Sat May 11 2013 Ondrej Vasik <ovasik@redhat.com> 3.2-13
|
||||
- move /var/spool/uucp to uucp package (#961952)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user