Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patching fails on FreeBSD #414

Closed
sanmai-NL opened this issue Jan 24, 2013 · 16 comments
Closed

Patching fails on FreeBSD #414

sanmai-NL opened this issue Jan 24, 2013 · 16 comments

Comments

@sanmai-NL
Copy link

FreeBSD 9.0-RELEASE-p4 FreeBSD 9.0-RELEASE-p4 #0 r243333: Tue Nov 20 16:34:30 CET 2012 /usr/obj/usr/src/sys/MYKERNEL amd64

opam update

Synchronizing /root/.opam/repo/default with http://opam.ocamlpro.com.
Everything is up-to-date.

opam upgrade

Already up-to-date.

opam install ocsigenserver

The following actions will be performed:

  • install dbm.1.0 [required by ocsigenserver]
  • install ocamlnet.3.6.0 [required by ocsigenserver]
  • install tyxml.2.2.0 [required by ocsigenserver]
  • install ocsigenserver.2.2.0
    4 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
    Do you want to continue ? [Y/n] Y

=-=-= dbm.1.0 =-=-=
The archive for dbm.1.0 is in the local cache.
Extracting /root/.opam/archives/dbm.1.0+opam.tar.gz.
Applying hasgotfix.patch.

=-=-= ocamlnet.3.6.0 =-=-=
The archive for ocamlnet.3.6.0 is in the local cache.
Extracting /root/.opam/archives/ocamlnet.3.6.0+opam.tar.gz.
Applying ocamlnet-ocaml4.diff.

Due to some errors while processing { ocamlnet.3.6.0, dbm.1.0 }, the following actions will NOT be proceeded:

  • install ocsigenserver.2.2.0
  • install tyxml.2.2.0

==== ERROR [while installing dbm.1.0] ====
Internal error:
Application of /root/.opam/system/build/dbm.1.0/hasgotfix.patch failed: can not determine the correct patch level.

==== ERROR [while installing ocamlnet.3.6.0] ====
Internal error:
Application of /root/.opam/system/build/ocamlnet.3.6.0/ocamlnet-ocaml4.diff failed: can not determine the correct patch level.
'opam install ocsigenserver' failed.

patch -v

Patch version 2.1

@samoht
Copy link
Member

samoht commented Jan 25, 2013

opam is doing

patch -p<n> -i <file> [--dryrun]

Maybe --dryrun is not supported there ? Do you know if there are any replacements on BSD systems ?

@sanmai-NL
Copy link
Author

Hi Thomas,

According to
http://www.freebsd.org/cgi/man.cgi?query=patch&sektion=1&apropos=0&manpath=FreeBSD+9.0-RELEASE

You can use:

   *-C,*  *--check*
    see what would happen, but don't do it.

Hopefully it will be fixed soon! :)

Best,
Sander

On 25-01-13 17:47, Thomas Gazagnaire wrote:

opam is doing

|patch -p -i [--dryrun]
|

Maybe |--dryrun| is not supported there ? Do you know if there are any
replacements on BSD systems ?


Reply to this email directly or view it on GitHub
https://github.com/OCamlPro/opam/issues/414#issuecomment-12709187.

@dbuenzli
Copy link
Contributor

Note sure about that, but if maybe if you stick to posix you can replace the --dry-run with -o /dev/null

@samoht
Copy link
Member

samoht commented Jan 28, 2013

I've added -o /dev/null in 751b4ea

@sanmai-NL can you test with the latest trunk ? I don't have any BSD box to test whether this works or nor.

@sanmai-NL
Copy link
Author

It does not work, or so it seems:

opam install ocsigenserver

The following actions will be performed:

  • install ocamlfind.1.3.3 [required by ocsigenserver]
  • install cryptokit.1.6 [required by ocsigenserver]
  • install pcre-ocaml.6.2.5 [required by ocsigenserver]
  • install react.0.9.4 [required by ocsigenserver]
  • install sqlite3-ocaml.2.0.3 [required by ocsigenserver]
  • install ssl.0.4.6 [required by ocsigenserver]
  • install lwt.2.4.3 [required by ocsigenserver]
  • install ocamlnet.3.6.0 [required by ocsigenserver]
  • install tyxml.2.2.0 [required by ocsigenserver]
  • install ocsigenserver.2.2.0
    10 to install | 0 to reinstall | 0 to upgrade | 0 to downgrade | 0 to remove
    Do you want to continue ? [Y/n] Y

=-=-= ocamlfind.1.3.3 =-=-=
The archive for ocamlfind.1.3.3 is in the local cache.
Extracting /root/.opam/archives/ocamlfind.1.3.3+opam.tar.gz.
Building ocamlfind.1.3.3:
./configure -bindir /root/.opam/4.01.0dev+trunk/bin -sitelib /root/.opam/4.01.0dev+trunk/lib -mandir /root/.opam/4.01.0dev+trunk/man -config /root/.opam/4.01.0dev+trunk/lib/findlib.conf
gmake all
gmake opt
gmake install
ocamlfind remove dbm
Installing ocamlfind.1.3.3.

=-=-= cryptokit.1.6 =-=-=
The archive for cryptokit.1.6 is in the local cache.
Extracting /root/.opam/archives/cryptokit.1.6+opam.tar.gz.
Building cryptokit.1.6:
gmake
gmake install
Installing cryptokit.1.6.

=-=-= pcre-ocaml.6.2.5 =-=-=
The archive for pcre-ocaml.6.2.5 is in the local cache.
Extracting /root/.opam/archives/pcre-ocaml.6.2.5+opam.tar.gz.
Building pcre-ocaml.6.2.5:
gmake
gmake install
Installing pcre-ocaml.6.2.5.

=-=-= react.0.9.4 =-=-=
The archive for react.0.9.4 is in the local cache.
Extracting /root/.opam/archives/react.0.9.4+opam.tar.gz.
Building react.0.9.4:
ocaml setup.ml -configure --prefix /root/.opam/4.01.0dev+trunk
ocaml setup.ml -build
ocaml setup.ml -install
Installing react.0.9.4.

=-=-= sqlite3-ocaml.2.0.3 =-=-=
Downloading http://opam.ocamlpro.com/archives/sqlite3-ocaml.2.0.3+opam.tar.gz.
Extracting /root/.opam/archives/sqlite3-ocaml.2.0.3+opam.tar.gz.
Building sqlite3-ocaml.2.0.3:
ocaml setup.ml -configure
ocaml setup.ml -build
ocaml setup.ml -install
Installing sqlite3-ocaml.2.0.3.

=-=-= ssl.0.4.6 =-=-=
The archive for ssl.0.4.6 is in the local cache.
Extracting /root/.opam/archives/ssl.0.4.6+opam.tar.gz.
Building ssl.0.4.6:
./configure --prefix /root/.opam/4.01.0dev+trunk
gmake
gmake install
Installing ssl.0.4.6.

=-=-= lwt.2.4.3 =-=-=
The archive for lwt.2.4.3 is in the local cache.
Extracting /root/.opam/archives/lwt.2.4.3+opam.tar.gz.
Building lwt.2.4.3:
./configure --disable-libev --enable-react --enable-ssl --enable-unix --enable-extra --enable-preemptive --disable-glib
gmake build
gmake install
Installing lwt.2.4.3.

=-=-= ocamlnet.3.6.0 =-=-=
The archive for ocamlnet.3.6.0 is in the local cache.
Extracting /root/.opam/archives/ocamlnet.3.6.0+opam.tar.gz.
Applying ocamlnet-ocaml4.diff.

Due to some errors while processing ocamlnet.3.6.0, the following actions will NOT be proceeded:

  • install ocsigenserver.2.2.0
  • install tyxml.2.2.0

==== ERROR [while installing ocamlnet.3.6.0] ====
Internal error:
Application of /root/.opam/4.01.0dev+trunk/build/ocamlnet.3.6.0/ocamlnet-ocaml4.diff failed: can not determine the correct patch level.
'opam install ocsigenserver' failed.

@samoht
Copy link
Member

samoht commented Jan 28, 2013

Do you have the latest version of OPAM ?

@sanmai-NL
Copy link
Author

I have done update / upgrade again before, the result was something
along the lines of 'nothing to update / upgrade'.

On 28-01-13 17:16, Thomas Gazagnaire wrote:

Do you have the latest version of OPAM ?


Reply to this email directly or view it on GitHub
https://github.com/OCamlPro/opam/issues/414#issuecomment-12789451.

@samoht
Copy link
Member

samoht commented Jan 28, 2013

How did you install OPAM at the first place ? The fix is in the git repository. I'll try to make a 0.9.2 release at the end of the week.

@sanmai-NL
Copy link
Author

I just downloaded a tarball.

@samoht
Copy link
Member

samoht commented Jan 28, 2013

So then you can try to use https://github.com/OCamlPro/opam/archive/master.tar.gz

@sanmai-NL
Copy link
Author

Using the git repo tarball, 'opam install ocsigenserver' hangs like this:
=-=-= dbm.1.0 =-=-=
Downloading http://opam.ocamlpro.com/archives/dbm.1.0+opam.tar.gz.
Extracting /root/.opam/archives/dbm.1.0+opam.tar.gz.
Applying hasgotfix.patch.
File to patch:

After pressing Enter:

No file found--skip this patch? [n] y

Then it continues. But now a necessary patch isn't being applied, is it?

This is the standard "patch" utility interface: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/patch.html Is there a POSIX compliance switch perhaps? As a last resort, is it possible to use platform-specific command line parameters to "patch"?

Is there a way to display the full patch command that is used? Then I can debug the problem on this FreeBSD server myself.

@samoht
Copy link
Member

samoht commented Jan 28, 2013

Hum ... if you give me the command to run to test whether a patch can apply at depth n, I can implement that, this way it would be quicker. patch -p<N> -o /dev/null patch.diff -f maybe ?

@sanmai-NL
Copy link
Author

If I could give you the command it would certainly be quicker, but that is not the case. According to the FreeBSD manpage that I referred to, the form of the command line parameters to "patch" is either "[origfile [patchfile]]", or no parameters and piping the patchfile via stdin. Also the -f option must be prior to the filenames or after the filenames and a " + ". I am not experienced with this so I can only offer you the documentation or to test it out in practice.

@samoht
Copy link
Member

samoht commented Jan 29, 2013

ok I've got access to freeBSD machine and it seems that -t -C is the way to go. I'll push that shortly.

@sanmai-NL
Copy link
Author

Thanks!

On 29-01-13 16:54, Thomas Gazagnaire wrote:

ok I've got access to freeBSD machine and it seems that |-t -C| is the
way to go. I'll push that shortly.


Reply to this email directly or view it on GitHub
https://github.com/OCamlPro/opam/issues/414#issuecomment-12841250.

@avsm
Copy link
Member

avsm commented Jan 29, 2013

I'm trying to add FreeBSD to the Jenkins build pool, except that the Jenkins port appears broken atm unfortunately. I'll work through it soon and hopefully the quality of OPAM ports should increase (/cc @pgj )

On 29 Jan 2013, at 15:55, Sander M notifications@github.com wrote:

Thanks!

On 29-01-13 16:54, Thomas Gazagnaire wrote:

ok I've got access to freeBSD machine and it seems that |-t -C| is the
way to go. I'll push that shortly.


Reply to this email directly or view it on GitHub
https://github.com/OCamlPro/opam/issues/414#issuecomment-12841250.


Reply to this email directly or view it on GitHub.

@samoht samoht closed this as completed in 3d91f03 Jan 29, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants