Hi everyone,
I'm starting to develop Anaconda but when I modify source code, I don't know how to test what I changed.
I did follow this URL: http://fedoraproject.org/wiki/Anaconda/Stage2DevelopmentGuide#Testing_Change...
But it's not work...This is my top level of installation dir: dr-xr-xr-x 4 asianux asianux 52 May 7 2014 addons dr-xr-xr-x 3 asianux asianux 17 May 7 2014 EFI -r--r--r-- 1 asianux asianux 8266 Apr 4 2014 EULA -r--r--r-- 1 asianux asianux 18092 Mar 6 2012 GPL dr-xr-xr-x 3 asianux asianux 54 Nov 27 11:44 images dr-xr-xr-x 2 asianux asianux 4096 May 7 2014 isolinux dr-xr-xr-x 2 asianux asianux 41 May 7 2014 LiveOS -r--r--r-- 1 asianux asianux 108 May 7 2014 media.repo dr-xr-xr-x 2 asianux asianux 225280 Nov 27 11:34 Packages dr-xr-xr-x 24 asianux asianux 4096 May 7 2014 release-notes dr-xr-xr-x 2 asianux asianux 4096 May 7 2014 repodata drwxrwxr-x 2 asianux asianux 42 Nov 27 11:44 RHupdates -r--r--r-- 1 asianux asianux 3375 Apr 1 2014 RPM-GPG-KEY-redhat-beta -r--r--r-- 1 asianux asianux 3211 Apr 1 2014 RPM-GPG-KEY-redhat-release -r--r--r-- 1 asianux asianux 1568 May 7 2014 TRANS.TBL
and RHupdates dir: -rw-r--r-- 1 root root 49196 Nov 27 08:51 source.py -rw-r--r-- 1 root root 26766 Nov 27 09:30 welcome.glade
I use NFS + PXE install method. I heard it's easy to test Anaconda. This is my PXE configuration file: label linux menu label ^Install system menu default kernel vmlinuz append initrd=initrd.img ip=dhcp inst.repo=nfs:nfsvers=4:x.x.x.x:/RHEL7/
So could you tell me what's wrong I did? And if there is any other ways to test Anaconda, please help me.
Thanks everyone !!!
On Thu, 2014-11-27 at 11:58 +0700, Jack Ngo wrote:
Hi everyone,
Hi,
I'm starting to develop Anaconda but when I modify source code, I don't know how to test what I changed.
I did follow this URL: http://fedoraproject.org/wiki/Anaconda/Stage2DevelopmentGuide#Testing_Change...
Wow, that's terribly outdated! I'll try to fix the page, but until that, here is a guide for the new, easy process:
1. find out which version of anaconda you want to create and updates.img for (the version without your changes) 2. run the scripts/makeupdates script with specifying the version from step 1 as e.g.:
$ scripts/makeupdates -t anaconda-19.31.99-1
3. upload the updates.img file created by step 2 to a webserver or copy it to the toplevel directory of your repository
3.1 if using a webserver for updates.img, append inst.updates=URL_OF_YOUR_UPDATES_IMG
to boot options.
The new updates.img format is a gzipped cpio archive and it is applied to the installation tree. So you can even modify things outside of Anaconda. A very useful option for the makeupdates scripts is '-a' which allows you to add an RPM (extracted) to the updates.img.
Hope this helps and works for you. If you have any questions, feel free to ask here or on IRC freenode/#anaconda.
Sorry, I've replied in another title. Sorry again for spam.
Hi Vratislav Podzimek,
First, thank you very much for helping me.
But I did follow you and after reboot PXE Client, nothing changed :(
1. I find Anaconda version (anaconda-19.31.79-1)
2. Run scripts/makeupdates script: $ scripts/makeupdates -t anaconda-19.31.79-1
3. Upload updates.img into my webserver (/var/www/html/)
3.1 Append inst.updates=http://x.x.x.x/updates.img
I changed a very simple code to test, remove "WELCOME TO" in welcome.glade
But when I reboot PXE Client to test, nothing changed.
Did I miss something? Hmm, I have a question....how many updates.img I have to create? one for version without my changes and one for version with my changes, right? But I only use one Anaconda version: 19.31.79-1
On Fri, 2014-11-28 at 10:13 +0700, Jack Ngo wrote:
Sorry, I've replied in another title. Sorry again for spam.
Hi Vratislav Podzimek,
First, thank you very much for helping me.
But I did follow you and after reboot PXE Client, nothing changed :(
I find Anaconda version (anaconda-19.31.79-1)
Run scripts/makeupdates script: $ scripts/makeupdates -t
anaconda-19.31.79-1
- Upload updates.img into my webserver (/var/www/html/)
3.1 Append inst.updates=http://x.x.x.x/updates.img
I changed a very simple code to test, remove "WELCOME TO" in welcome.glade
I think you picked one of a few places in the codebase that don't make the change visible. That string is translated, updated and whatever in some places in the code, so it may have happened that your change just wasn't visible. Try changing e.g. the "Starting anaconda..." message in the main 'anaconda' script.
But when I reboot PXE Client to test, nothing changed.
What should definitely change if the updates.img works is that if you switch to tty2 (Ctrl+Alt+F2) and run 'ls /tmp/updates', there should be something. If that directory doesn't exist or is empty
Did I miss something? Hmm, I have a question....how many updates.img I have to create? one for version without my changes and one for version with my changes, right? But I only use one Anaconda version: 19.31.79-1
I think you didn't miss anything. And you only need a single updates.img for the version you are testing. But if you want to test only your changes, it is not good to create the updates.img on the rhel7-branch of anaconda's sources, because that branch contains many other changes. To isolated your changes, you can create your own branch, do the changes there and then create an updates.img on your new branch. Something like:
$ git checkout -b my_branch anaconda-19.31.79-1 ...do your changes here... $ scripts/makeupdates -t anaconda-19.31.79-1
Hope you have better luck this time. If anything still goes wrong the best way to get help is on our #anaconda IRC channel @ FreeNode.
anaconda-devel@lists.stg.fedoraproject.org