diff options
Diffstat (limited to 'zarb-ml/mageia-dev/2012-September/018919.html')
-rw-r--r-- | zarb-ml/mageia-dev/2012-September/018919.html | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/2012-September/018919.html b/zarb-ml/mageia-dev/2012-September/018919.html new file mode 100644 index 000000000..5a7fda7e9 --- /dev/null +++ b/zarb-ml/mageia-dev/2012-September/018919.html @@ -0,0 +1,143 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-dev] ANNOUNCE: The /usr move cometh! <---- Instructions + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20ANNOUNCE%3A%20The%20/usr%20move%20cometh%21%20%3C----%20Instructions&In-Reply-To=%3C5061AF4B.1030504%40colin.guthr.ie%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="018914.html"> + <LINK REL="Next" HREF="018922.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-dev] ANNOUNCE: The /usr move cometh! <---- Instructions</H1> + <B>Colin Guthrie</B> + <A HREF="mailto:mageia-dev%40mageia.org?Subject=Re%3A%20%5BMageia-dev%5D%20ANNOUNCE%3A%20The%20/usr%20move%20cometh%21%20%3C----%20Instructions&In-Reply-To=%3C5061AF4B.1030504%40colin.guthr.ie%3E" + TITLE="[Mageia-dev] ANNOUNCE: The /usr move cometh! <---- Instructions">mageia at colin.guthr.ie + </A><BR> + <I>Tue Sep 25 15:19:07 CEST 2012</I> + <P><UL> + <LI>Previous message: <A HREF="018914.html">[Mageia-dev] ANNOUNCE: The /usr move cometh! <---- Instructions +</A></li> + <LI>Next message: <A HREF="018922.html">[Mageia-dev] ANNOUNCE: The /usr move cometh! <---- Instructions +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#18919">[ date ]</a> + <a href="thread.html#18919">[ thread ]</a> + <a href="subject.html#18919">[ subject ]</a> + <a href="author.html#18919">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>'Twas brillig, and Thierry Vignaud at 25/09/12 11:07 did gyre and gimble: +><i> On 9 September 2012 20:42, Colin Guthrie <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-dev">mageia at colin.guthr.ie</A>> wrote: +</I>>>><i> Those cannot be done anymore. +</I>>>><i> Now updating rpm in order to be able to sole the unifiedsystemdir depends +</I>>>><i> pulls filesystem... +</I>>>><i> Classic egg & chicken issue... +</I>>><i> +</I>>><i> Yes, this has been a problem for a while now in Cauldron. But not many +</I>>><i> users are asking this question these days, so the likely path now is +</I>>><i> from mga2 -> cauldron which is probably where the effort should be focused. +</I>><i> +</I>><i> BTW I tested live upgrade from FC17 to FC18. +</I>><i> It works smoothly if you don't have third party packages. +</I>><i> in FC there's no need for a special boot, everything is hanled by filesystem +</I>><i> package's pre/post scripts: +</I>><i> +</I>><i> $ rpm -q --scripts filesystem -v +</I>><i> pretrans scriptlet (using <lua>): +</I>><i> --# +</I>><i> --# If we are running in pretrans in a fresh root, there is no /usr +</I>><i> and symlinks. +</I>><i> --# We cannot be sure, to be the very first rpm in the transaction list, +</I>><i> --# so, let's create the toplevel symlinks here and the directories +</I>><i> they point to. +</I>><i> --# When our rpm is unpacked by cpio, it will set all permissions and +</I>><i> modes later. +</I>><i> --# +</I>><i> +</I>><i> if posix.stat("/usr") == nil then +</I>><i> posix.mkdir("/usr") +</I>><i> end +</I>><i> +</I>><i> for i,dir in ipairs({"/lib", "/lib64", "/sbin", "/bin"}) do +</I>><i> if posix.stat("/usr"..dir) == nil then +</I>><i> posix.mkdir("/usr"..dir) +</I>><i> if posix.stat(dir, "mode") == nil then +</I>><i> posix.symlink("usr"..dir, dir) +</I>><i> end +</I>><i> end +</I>><i> end +</I>><i> +</I>><i> return 0 +</I>><i> postinstall scriptlet (using <lua>): +</I>><i> posix.symlink("../run", "/var/run") +</I>><i> posix.symlink("../run/lock", "/var/lock") +</I> +We have pretty much the same script in our package if you look, but this +does not process the move transition itself (i.e. there is nothing to +move content from /bin to /usr/bin before rmdir'ing the dir and +replacing it with a symlink). + +What this script achieves is to ensure that the filesystem layout is +correct when installing the very first packages e.g. in a chroot. This +is needed because some packages (not filesystem.rpm) may package a file +/bin/foo. rpm does not guarentee ordering of the package installation +transaction so if we install the foo package (which will trigger the +installation of filesystem) we cannot guarentee that filesystem will be +installed before foo and thus we need to prevent the creation of the +/bin dir that would happen if foo was installed first. + +The comments in the script explain this pretty clearly. + + +Regarding what does the actual move of files, I cannot say but if it +happens automatically on a yum upgrade I'd certainly be interested to +know how it's done without breaking things... Also I'm surprised that +rpm let you do the upgrade as fedora have the same checks on their +filesystem rpm as we do (i.e. it refuses to install if the /bin + +friends are NOT symlinks)... so I'd be interested to know how this is +done... + +Col + + + +-- + +Colin Guthrie +colin(at)mageia.org +<A HREF="http://colin.guthr.ie/">http://colin.guthr.ie/</A> + +Day Job: + Tribalogic Limited <A HREF="http://www.tribalogic.net/">http://www.tribalogic.net/</A> +Open Source: + Mageia Contributor <A HREF="http://www.mageia.org/">http://www.mageia.org/</A> + PulseAudio Hacker <A HREF="http://www.pulseaudio.org/">http://www.pulseaudio.org/</A> + Trac Hacker <A HREF="http://trac.edgewall.org/">http://trac.edgewall.org/</A> +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="018914.html">[Mageia-dev] ANNOUNCE: The /usr move cometh! <---- Instructions +</A></li> + <LI>Next message: <A HREF="018922.html">[Mageia-dev] ANNOUNCE: The /usr move cometh! <---- Instructions +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#18919">[ date ]</a> + <a href="thread.html#18919">[ thread ]</a> + <a href="subject.html#18919">[ subject ]</a> + <a href="author.html#18919">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://www.mageia.org/mailman/listinfo/mageia-dev">More information about the Mageia-dev +mailing list</a><br> +</body></html> |