Solved How to maintain ports with modified code?

jronald

Active Member

Reaction score: 9
Messages: 165

e.g.
make fetch
modify source code
make install

later
portsnap fetch extract or portsnap fetch update may cover my modification
Is there any mechanism like merge for ports?
 

JohnnySorocil

Member

Reaction score: 5
Messages: 28

I usually have ports tree in git and create my own branch which is periodically rebased to master.
Something like this:
Code:
git clone https://github.com/freebsd/freebsd-ports
mv freebsd-ports /usr/ports
cd /usr/ports
git checkout -b my-branch
...
git pull ; git rebase origin/master
It is nothing fancy, but it works, I am used to git, and no more need for portdowngrade so it's another plus.
Also, as others already said: pkg lock -y <custom package> so it doesn't get replaced with stock one after pkg upgrade.
 

Michael-O

Member

Reaction score: 8
Messages: 27

I would stop using portsnap snap immediately and switch to Subversion or Git retrieval. As recommended use "pkg lock" and put patches into files/. This what I do with several ports for now.
 
Top