Ask Your Question
0

how to use source dvd

asked 2014-08-16 04:10:24 -0600

Tiger gravatar image

i m download fedora 20 source dvd that size is approximate 9GB now any one can guide that how to use that dvd or how to see source code gedit or any software or command and how to compile.....

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2014-08-16 04:34:35 -0600

abadrinath gravatar image

updated 2014-08-16 19:09:59 -0600

Try this link for information:

http://forums.fedoraforum.org/showthread.php?t=296850

Basically, you will need to mount it as an iso:

# mount -p loop a.iso /mnt/user/Mountpoint

This iso is not an install media, rather an option for developers to edit the source of Fedora. Then, you will need to compile all the core packages. I don't recommend this to newbies.

To see the contents of this folder, execute:

# ls -lrt /mnt/user/Mountpoint

In there, you will see a bunch of .src.rpms and configuration files to compile. To view the contents (or metadata) of the source rpm:

# rpm --query --package --info foo-1.0-1.src.rpm

Then, to extract the rpm from its source,

# rpm2cpio foo-1.0-1.src.rpm | cpio --extract --make-directories --verbose

After extracting, you will receive a .tar.gz or other archive in a directory like /usr/src/.../...

# cd /usr/src/fedora/SOURCES/

Next, extract the archive:

# tar -xvzf foo-1.0-1.tar.gz

Compile!

# ./configure

OR

# make

First, check this for more info:

http://hacktux.com/fedora/source/rpm ( Note: skip the 'Get the source' part)

After that, follow this detailed guide of building source rpms:

http://vdt.cs.wisc.edu/internal/native/using-srpm.html

Or, you could use:

http://wiki.centos.org/HowTos/RebuildSRPM

To build your custom kernel, check:

https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_Kernel_from_the_source_RPM

HTH.

edit flag offensive delete link more

Comments

i know this is not a install media but i want to see the source code of any Software but can u tell me that how to see the source code

Tiger gravatar imageTiger ( 2014-08-16 13:12:17 -0600 )edit
0

answered 2014-08-16 13:29:57 -0600

hedayat gravatar image

As @hello said, you can loop mount the iso file to access its contents. Then, to see the source code of package X (e.g. gedit), you should locate its corresponding .src.rpm package (e.g. gedit-3.10.4-1.fc20.src.rpm).

To see the source code, you should extract it from the .src.rpm package. You can either use rpmdev-extract (or an application like Gnome's Archive Manager (file-roller)), or you can "install" the .src.rpm package using rpm -ivh command (you don't need to do it as root). "Installing" an .src.rpm package actually extracts its contents including it's source code archive into rpm related directories (if you install as a regular user, the contents will be extracted into ~/rpmbuild/ directory). You should be able to find the source code and any patches inside SOURCES/ sub-directory.

To compile the .src.rpm package as is, you can use rpmbuild --rebuild SRC_RPM_FILE.src.rpm. It might need some dependencies you don't have, which you can install manually or using yum-builddep command. To build the source code after modifying it, you can use the .spec file extracted from .src.rpm with the updated source archive (or new patch files) using rpmbuild command. For more information, I'd suggest you to inspect rpmbuild man page.

You might also try to build the package manually using the manual inside the source archive (usually a README or INSTALL file contains instructions for building the source code). This can vary for different packages.

edit flag offensive delete link more

Comments

Ooops, didn't see your answer. I sorta said the same thing. Sorry!

abadrinath gravatar imageabadrinath ( 2014-08-16 19:11:19 -0600 )edit

That's fine!

hedayat gravatar imagehedayat ( 2014-08-16 19:39:54 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-08-16 04:10:24 -0600

Seen: 266 times

Last updated: Aug 16 '14