All of lore.kernel.org
 help / color / mirror / Atom feed
From: kai@gnukai.com (Kai Meyer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Query about custom fedora build process
Date: Thu, 08 Sep 2011 10:00:02 -0600	[thread overview]
Message-ID: <4E68E682.8080208@gnukai.com> (raw)
In-Reply-To: <CAKuUYSynsCN34PFGDXJTMHZJexNiXFWLpcBCb+BoVFWC1MGzoA@mail.gmail.com>

Some programs (like VIM) modify file in-place. Some programs (I think 
'perl -pie' may do this) will read the file into memory, and when it's 
time to write the file back out, it deletes the original, and writes the 
new one. They made a note of this in the wiki article:
"Using vim on FC14, it treated the hard link as a hard link and thus the 
above technique failed. It was necessary to repeat the original copy 
used for the .orig directory for the .new directory. Note that this uses 
twice the space."

Perhaps there's a trick to vim to work around it, but I don't know of any.

My suggestion would be to hardlink the entire source tree, and then 
afterwards delete the destination hard links for the files you want to 
modify, and re-copy (normal copy) the original files again.

-Kai Meyer

On 09/07/2011 04:16 PM, Vaibhav Jain wrote:
> Hi,
>
> I am trying to build a custom fedora kernel on a fedora (FC15) machine 
> by reading the
> article: http://fedoraproject.org/wiki/Building_a_custom_kernel
> but  i am unable to make any progress as my changes are not getting 
> reflected.
> So I have query about the procedure given in the article. The article 
> asks to first create
> hardliks between files in .new and .orig directories and then to make 
> changes and to .new directory and to
> generate a patch by a diff between the .orig and .new directories. But 
> I am just wondering if the
> files in both the directories are hardlinks then how can diff work 
> because after changing a file in .new directory
> the file in .orig directory should also change.
>
> cp -r ~/rpmbuild/BUILD/kernel-2.6.$ver.$fedver/linux-2.6.$ver.$arch ~/rpmbuild/BUILD/kernel-2.6.$ver$fedver.orig
> cp -al ~/rpmbuild/BUILD/kernel-2.6.$ver.$fedver.orig ~/rpmbuild/BUILD/kernel-2.6.$ver.$fedver.new
>
> cd ~/rpmbuild/BUILD
> diff -uNrp kernel-2.6.$ver.$fedver.orig kernel-2.6.$ver.$fedver.new>  ../SOURCES/linux-2.6-my-new-patch.patch
>
>
> Thanks
> Vaibhav Jain
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110908/0e925f75/attachment.html 

      reply	other threads:[~2011-09-08 16:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 22:16 Query about custom fedora build process Vaibhav Jain
2011-09-08 16:00 ` Kai Meyer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E68E682.8080208@gnukai.com \
    --to=kai@gnukai.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.