How do I install a patch? (Linux server)

I need very detailed instructions on how to install a patch.

Current version OJS 2.4.6.0

Patch is https://github.com/pkp/ojs/commit/902eb75d6f5f2158f86af064f124130ee5c0d777.diff

I’m hosted on a Godaddy Linux server, with cPanel

Again, I need thorough instructions as am new at this :smile:

Many thanks!

Hi @tee808,

Normally you’d log into the server via secure shell, then most servers will already have the patch tool available to use. In that case directions like these would be what you’d follow…

http://jungels.net/articles/diff-patch-ten-minutes.html

Unfortunately, I don’t think Godaddy provides secure shell access. In that case, your easiest way will be to dowload the files you need to modify, change them on your local machine, then re-upload the modified copy. It’ll be easier to visualize what’s changing by looking at the patch at this link:

You’ll need to change templates/about/editorialPolicies.tpl in this case. The reddish lines indicate removals, and the green ones indicate additions.

For more complicated patches, you could download and use the “patch” tool on your local machine – but in this case a quick text edit is enough, I think.

Regards,
Alec Smecher
Public Knowledge Project Team

Awesome, fixed, thanks so much.

Earlier, I discovered another broken link on that page. So while I was
there I fixed that too. You might need to add to next patch.

I had to change

anchor=“SectionPolicies”

to

anchor=“sectionPolicies”

Seems to be case sensitive.

Many thanks again.

Hi @tee808,

Right, good spotting. I’ve committed that change.

Regards,
Alec Smecher
Public Knowledge Project Team

Dear Mr Alec.

I already installing Ojs 2.4.8 then trying to patch it (ubuntu), somehow in my terminal apear like this :

"root@Ativbook:/var/www/backup# patch -p1 < 248-ojs.patch
patching file classes/admin/form/JournalSiteSettingsForm.inc.php
Reversed (or previously applied) patch detected! Assume -R? [n] "

it is the correct to patch OJS? Would you help me, send me some instruction how to patch step by step.

Regards

@rindoherdianto, see this post:

Note that patch based upgrading is discouraged in favor of “full package” upgrades.

1 Like