After we checking in how to upgrade/ rollback the upgrades, now lets see how to get the source code of ostree or rpm-ostree and how to edit it.

you can view the source codes of Ostree or rpm-ostree form following links;

Ostree source code is at;
https://github.com/ostreedev/ostree

rpm-ostree source coad is at;
https://github.com/projectatomic/rpm-ostree

To edit the source codes, you have to get a clone first. to get a clone you can use git clone command.

To get Ostree source code run the following code on your host system terminal;

git clone https://github.com/ostreedev/ostree

 

to get rpm-ostree sourcecode, run the following code o

n your host system terminal;

git clone https://github.com/projectatomic/rpm-ostree

You don’t need to download both rpm-ostree and ostree, If you want you can.

Editing Ostree

Now you have got the ostree source code. Using any text editor, you can now edit codes as you want. after editing the code you have to build it. To first time building have to install some additional software. run following codes to install the additional software.

sudo yum-builddep ostree && yum install redhat-rpm-config

after installing this softwars you are now able to build ostree. To build ostree use following command;

env NOCONFIGURE=1 ./autogen.sh && env ./configure CFLAGS=”-ggdb -O0″ –prefix=/usr –libdir=/usr/lib64 –sysconfdir=/etc –enable-installed-tests –with-dracut=yesbutnoconf –enable-gtk-doc

Now the ostree building was done. But still you have to make it manually. To do it, use make command as follow;

make

Now ostree building is completed! now you can check the ostree with following command.

./ostree

You can check outputs for above command while changing /src/ostree/ot-main.c file.

Using this method you can edit files on ostree and check them.

Editing rpm-ostree

To edit rpm-ostree first you have to get a clone of source code as above described. Then edit using text editor. But to build rpm-ostree you have to install following packages instead of ostree packages.

sudo yum-builddep rpm-ostree && yum install libarchive-devel

Then the building rpm-ostree is also similer to building process of ostree. You can use the same code as above mentioned.

***Please note that all of the content on this post was originally published on champlnx.blogspot.com. We have migrated these posts to www.champlnx.com for your convenience and continued access.

Leave a Reply

Your email address will not be published. Required fields are marked *