On Mon, Nov 11, 2013 at 1:36 PM, Austin Lavinghouse
<aelav...@go.olemiss.edu> wrote:
> On Mon, Nov 11, 2013 at 1:23 PM, Stephen Herr <sh...@redhat.com> wrote:
>> Oh, and upon re-reading I realized: You can't skip spacewalk-java-lib.
>> That's the rpm that contains all the really important stuff. What client are
>> you breaking by installing it?
>>
>> Another thing to consider is that if you installed the Spacewalk 2.0 rpms
>> you probably want to be making your changes on top of the SPACEWALK-2.0
>> branch, not master. The code in master may have been updated to rely on
>> changes made in other packages, for example the database schema, and may
>> break if installed on a 2.0 system. Once you have your changes working on
>> the SPACEWALK-2.0 branch it would probably be a clean merge over to master.
>>
>> -Stephen
>
> Thanks for noticing that! I'll pull the 2.0 branch and start working
> from there, using the same stop - change - commit - tito - rpm - start
> process.
>

Alright, that worked just fine! Thanks Stephen. For posterity's sake,
here are the steps to modify the code and test your changes (this
isn't documented anywhere that I could find):

1. Setup Spacewalk on the system you want to develop on.
2. Use git to clone from the repo. Make sure you are working in the
same branch as the installed system's version; for example, use
--branch=SPACEWALK-2.0.
3. Modify whatever code you would like. Make sure you use "git add
<file_modified>" and then "git commit -m '<message>'."
4. Navigate to the closest directory upwards with a .spec file.
5. Run "tito build --test --rpm". The --test flag prevents you from
building from the original repo, and uses your commits instead.
6. Navigate to /tmp/tito, and install the package(s) using "rpm -ivh
--replacefiles <package_name>".
7. Restart Spacewalk using "/usr/sbin/spacewalk-service restart" to
start from the new packages.

Note this doesn't mean you shouldn't write the appropriate tests for
the code. Thanks again for the help!
A. E. Lavinghouse

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to