Bug 230665 - net/ceph: fix error in rc.d script
Summary: net/ceph: fix error in rc.d script
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Jason E. Hale
URL:
Keywords:
Depends on:
Blocks: 230579
  Show dependency treegraph
 
Reported: 2018-08-16 08:37 UTC by Willem Jan Withagen
Modified: 2018-08-24 07:59 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Willem Jan Withagen 2018-08-16 08:37:28 UTC
The rc.c/ceph script uses too many paramters.

Index: net/ceph/files/ceph.in
===================================================================
--- net/ceph/files/ceph.in      (revision 476830)
+++ net/ceph/files/ceph.in      (working copy)
@@ -32,5 +32,5 @@
 restart_cmd="%%PREFIX%%/bin/init-ceph $*"
 condrestart_cmd="%%PREFIX%%/bin/init-ceph $*"

-run_rc_command "$1" "$*"
+run_rc_command "$1"
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2018-08-20 10:44:17 UTC
I'll take this to avoid bumping PORTREVISON twice for some other issues listed below.

The checksum and size for ceph-ceph-erasure-code-corpus-2d7d78b_GH0.tar.gz is wrong. It looks like it got changed in r474922 even though the git hash did not change. I am coming up with what the port had before:
SHA256 (ceph-ceph-erasure-code-corpus-2d7d78b_GH0.tar.gz) = 466f7185015df8d13f8b2b9a17ee30ab419bcd667284ce2b6d32a1128c4640f1
SIZE (ceph-ceph-erasure-code-corpus-2d7d78b_GH0.tar.gz) = 3634266

Also, I am working an update for security/cryptopp. This port has it listed in LIB_DEPENDS even though it does not use it. In the main CMakeLists.txt for ceph, it will only use cryptopp if nss is explicitly disabled. I plan on removing the cryptopp dependency because there are API changes and this will be one less port to worry about. You could make an option for it, but ceph would have to check the new pkgconfig file that will be provided by cryptopp to see whether it was built with assembly optimizations or not.

Next time, please add your patches as an attachment and not as a comment. Thanks!
Comment 2 Willem Jan Withagen 2018-08-20 11:50:19 UTC
(In reply to Jason E. Hale from comment #1)
Hi Jason,

Thanx for picking this up.

I will check again in my builds but could very well be that you are correct, and that this is a leftover from previous requirement. And I never noticed that it became a possible selection for either one. On the other hand, if it builds, it builds. ;-) 
If you fix it, I'll work from that further.

This has gone thru poudriere, which should have complained about the wrong size and checksum. So I have no idea where that went wrong.
Comment 3 Jason E. Hale freebsd_committer freebsd_triage 2018-08-20 12:17:54 UTC
(In reply to Willem Jan Withagen from comment #2)

Poudriere doesn't re-download and check distfiles. If you had a corrupt distfile in your distfiles cache and it matched the distinfo file, then poudriere would not complain as long as it extracted. When doing an update, it is usually a good idea after running 'make makesum' to run 'make distclean' and download again to make sure the checksums match.

Before doing that, you should backup your old distfiles for the port so you can check for corruption or security compromise against the new ones. https://www.freebsd.org/doc/en/books/porters-handbook/dads-rerolling-distfiles.html
Comment 4 Willem Jan Withagen 2018-08-20 14:51:17 UTC
(In reply to Jason E. Hale from comment #1)

I also found the cause for the "removal" of cryptopp:
From:
    https://github.com/ceph/ceph/pull/23650

  add Findcryptopp.cmake back
  cryptopp support was dropped in #20015, but it's required by
  src/msg/async/dpdk/TCP.h, which #include <cryptopp/md5.h>
  so, to fix the FTBFS of WITH_DPDK=ON, we need to bring
  Findcryptopp.cmake back. it was also removed in #20015.

And https://github.com/ceph/ceph/pull/20015 goes: 
  our cryptopp implementation was broken with the change to c++17, 
  and the cost of fixing it likely outweighs the utility of keeping it around

Now we currently do not build with DPDK, so it is safe to remove for the time being.
Comment 5 commit-hook freebsd_committer freebsd_triage 2018-08-24 07:46:24 UTC
A commit references this bug:

Author: jhale
Date: Fri Aug 24 07:45:54 UTC 2018
New revision: 477944
URL: https://svnweb.freebsd.org/changeset/ports/477944

Log:
  - Fix rc.d script (too many parameters)
  - Fix distinfo (checksum and size were corrupted in last update)
  - Remove security/crytopp dependency that the port does not use
  - Fix typo in IGNORE message
  - Move pkgconf dependency to USES
  - Depend on python ports correctly
  - Remove CMAKE_BUILD_TYPE - it already is set to "Release" by the framework
  - Bump PORTREVISION for dependency changes

  PR:		230665
  Submitted by:	Willem Jan Withagen <wjw@digiware.nl> (maintainer)

Changes:
  head/net/ceph/Makefile
  head/net/ceph/distinfo
  head/net/ceph/files/ceph.in
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2018-08-24 07:47:28 UTC
Committed, thanks!
Comment 7 Willem Jan Withagen 2018-08-24 07:59:51 UTC
(In reply to Jason E. Hale from comment #6)

You too for patching up all the rough edges.