Patching Open Monograph Press 1.1.1-1

Hi,
I have unpacked omp-1.1.1-1 and am trying to install the patch files available on your site:
omp (patch) and pkp-lib (patch) according to the instructions in the Readme file;
the patch program (Debian linux) has the following complaints when I try the dry runs:
expected files are missing eg. .gitmodules (not part of the tar file ?)
and reversed or previously applied patch detected. See below for patch output.

Patching omp

ubz-dih@ask:/usr/local/omp-1.1.1-1$ patch -p1 --dry-run < omp2.patch
can’t find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|diff --git a/.gitmodules b/.gitmodules
|index f008877…c24e35c 100644
|— a/.gitmodules

+++ b/.gitmodules

File to patch:

ubz-dih@ask:/usr/local/omp-1.1.1-1/lib/pkp$ sudo patch -p1 --dry-run < ~/ompLib.patch
[sudo] password for ubz-dih:
checking file classes/form/validation/FormValidatorListbuilder.inc.php
Reversed (or previously applied) patch detected! Assume -R? [n] n
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored
checking file classes/manager/form/PKPAnnouncementForm.inc.php
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
5 out of 5 hunks ignored
checking file classes/notification/managerDelegate/AuditorRequestNotificationManager.inc.php
checking file classes/notification/managerDelegate/CopyeditAssignmentNotificationManager.inc.php
checking file classes/notification/managerDelegate/signoff/BaseSignoffNotificationManager.inc.php
checking file classes/notification/managerDelegate/signoff/SignoffNotificationManager.inc.php
checking file classes/submission/SubmissionDAO.inc.php
checking file controllers/api/file/PKPManageFileApiHandler.inc.php
checking file controllers/grid/users/reviewer/form/ReviewerForm.inc.php
checking file controllers/tab/settings/siteSetup/form/SiteSetupForm.inc.php
checking file js/controllers/grid/settings/user/form/UserFormHandler.js
Reversed (or previously applied) patch detected! Assume -R? [n] m
Apply anyway? [n] m
Skipping patch.
2 out of 2 hunks ignored
checking file lib/adodb/datadict/datadict-postgres.inc.php
checking file pages/user/RegistrationHandler.inc.php
can’t find file to patch at input line 489
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:

|diff --git a/plugins/citationLookup/isbndb/tests/filter/IsbndbNlm30CitationSchemaFilterTest.inc.php b/plugins/citationLookup/isbndb/tests/filter/IsbndbNlm30CitationSchemaFilterTest.inc.php
|index 563ada1…e0e7c17 100644
|— a/plugins/citationLookup/isbndb/tests/filter/IsbndbNlm30CitationSchemaFilterTest.inc.php

+++ b/plugins/citationLookup/isbndb/tests/filter/IsbndbNlm30CitationSchemaFilterTest.inc.php

File to patch:

Hi @DavidHoloshla,

If you’re not working from git, then .gitmodules won’t exist and you can skip that part of the patch. The rest looks like it’s applying at least partially. Where did the patch come from?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

The patches came from your web site under patches for version 1.1.1-1. I downloaded them using a browser and I also try cut and pasting the contents to files on my computer with similar results.

I tried to clone your repository as well but I ran into lots of problems so I would prefer using the patch command.
Regards,
David Holoshka

Hi @DavidHoloshla,

The best thing to do is to use git – it’ll make your life a lot easier in the long run. But if you want to apply the patches yourself, you should be able to tell the patch tool to skip the patch, or else remove the part of the patch that refers to .gitmodules from the patch file before applying.

If you do want to use git, but run into problems, feel free to describe them here; I’ll see if I can give some guidance.

Regards,
Alec Smecher
Public Knowledge Project Team