Bug 218174

Summary: sysutils/ffs2recov: fix MASTER_SITES, add WWW, change MAINTAINER
Product: Ports & Packages Reporter: Chris Hutchinson <portmaster>
Component: Individual Port(s)Assignee: Nikolai Lifanov <lifanov>
Status: Closed FIXED    
Severity: Affects Some People CC: lifanov
Priority: --- Keywords: easy, patch, patch-ready
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn diff for sysutils/ffs2recov
none
QA LOG to prove the changes work
none
poudriere testport log
none
ffs2recov with fix for CURRENT
none
ffs2recov with fix for CURRENT none

Description Chris Hutchinson 2017-03-27 22:58:32 UTC
Created attachment 181250 [details]
svn diff for sysutils/ffs2recov

I see the source for sysutils/ffs2recov has gone
missing, and it's otherwise unmaintained.
This is an attempt to fix that.

Changes
provide reliable MASTERSITES
add WWW, MAINTAINER

That's it!

Please find the svn diff sysutils_ffs2recov.diff attached.
For bonus points, I'm also adding a QA LOG to prove it works! :)

Thanks!

--Chris
Comment 1 Chris Hutchinson 2017-03-27 22:59:18 UTC
Created attachment 181251 [details]
QA LOG to prove the changes work
Comment 2 Nikolai Lifanov freebsd_committer freebsd_triage 2017-04-02 22:18:45 UTC
I'm trying to build it on 12-CURRENT and it doesn't work.
Can you either fix it or add ONLY_FOR_* to explain what it does build on please?

--- inode.o ---
inode.c:85:18: error: use of undeclared identifier 'NDADDR'
        direct_maxblk = NDADDR;
                        ^
inode.c:86:28: error: use of undeclared identifier 'NDADDR'
        single_maxblk = (uint64_t)NDADDR + nindir;
                                  ^
inode.c:87:28: error: use of undeclared identifier 'NDADDR'
        double_maxblk = (uint64_t)NDADDR + nindir * nindir;
                                  ^
inode.c:88:28: error: use of undeclared identifier 'NDADDR'
        triple_maxblk = (uint64_t)NDADDR + nindir * nindir * nindir;
                                  ^
inode.c:296:31: error: use of undeclared identifier 'NDADDR'
                        bzero((char *)data + dlen, dblksize(&disk->d_fs, inode, i));
                                                   ^
inode.c:75:13: note: expanded from macro 'dblksize'
        (((lbn) >= NDADDR || (dip)->di_size >= smalllblktosize(fs, (lbn) + 1)) \
                   ^
inode.c:299:28: error: use of undeclared identifier 'NDADDR'
                                  (char *)data + dlen, dblksize(&disk->d_fs, inode, i));
                                                       ^
inode.c:75:13: note: expanded from macro 'dblksize'
        (((lbn) >= NDADDR || (dip)->di_size >= smalllblktosize(fs, (lbn) + 1)) \
                   ^
inode.c:315:8: error: use of undeclared identifier 'NDADDR'
        len = dblksize(&disk->d_fs, inode, blk);
              ^
inode.c:75:13: note: expanded from macro 'dblksize'
        (((lbn) >= NDADDR || (dip)->di_size >= smalllblktosize(fs, (lbn) + 1)) \
                   ^
7 errors generated.
*** [inode.o] Error code 1
Comment 3 Chris Hutchinson 2017-04-05 18:25:09 UTC
(In reply to Nikolai Lifanov from comment #2)
> I'm trying to build it on 12-CURRENT and it doesn't work.
> Can you either fix it or add ONLY_FOR_* to explain what it does build on
> please?
> 
> --- inode.o ---
    ...
> 7 errors generated.
> *** [inode.o] Error code 1

Well that's odd. I know for a fact that it builds on -CURRENT (12).
As that's what my development box is running.
What platform (ARCH) are you attempting to build/test on? I'm
on amd64.

Thanks!

--Chris
Comment 4 Nikolai Lifanov freebsd_committer freebsd_triage 2017-04-05 19:28:09 UTC
Created attachment 181512 [details]
poudriere testport log

Please see this testport log. I was able to reproduce it on a fresh head and with a fresh ports tree.
Comment 6 Nikolai Lifanov freebsd_committer freebsd_triage 2017-04-05 19:51:07 UTC
This is the cause:
https://svnweb.freebsd.org/base?view=revision&revision=313780
Comment 7 Nikolai Lifanov freebsd_committer freebsd_triage 2017-04-05 19:55:42 UTC
Created attachment 181514 [details]
ffs2recov with fix for CURRENT

Here is a patch similar to your submission but also fixes build on CURRENT.
Comment 8 Nikolai Lifanov freebsd_committer freebsd_triage 2017-04-05 19:57:09 UTC
Let me know what you think about the fix.
Comment 9 Nikolai Lifanov freebsd_committer freebsd_triage 2017-04-06 00:15:11 UTC
Created attachment 181524 [details]
ffs2recov with fix for CURRENT

better fix
Comment 10 Chris Hutchinson 2017-04-06 04:14:55 UTC
(In reply to Nikolai Lifanov from comment #8)
> Let me know what you think about the fix.

Are you kidding? I think it's *wonderful*. :-)
After seeing your findings. I decided I'd better up my
current revision on my dev box. I'd have submitted my
findings/proposal(s) already. But it's currently in a
build session; updating the kernel/world && ports.

Thanks Nikolai! I really appreciate your taking the
time to do all this!!!

Approved! :-)

--Chris
Comment 11 Nikolai Lifanov freebsd_committer freebsd_triage 2017-04-10 19:15:03 UTC
Committed, thanks!

No problem! Sorry for the delay, I missed the update in my email :)
Comment 12 commit-hook freebsd_committer freebsd_triage 2017-04-10 19:15:05 UTC
A commit references this bug:

Author: lifanov
Date: Mon Apr 10 19:14:14 UTC 2017
New revision: 438197
URL: https://svnweb.freebsd.org/changeset/ports/438197

Log:
  unbreak sysutils/ffs2recov

  o fix MASTER_SITES
  o add WWW
  o assign maintainership to submitter
  o fix on CURRENT

  PR:		218174
  Submitted by:	Chris Hutchinson <portmaster@bsdforge.com>

Changes:
  head/sysutils/ffs2recov/Makefile
  head/sysutils/ffs2recov/files/
  head/sysutils/ffs2recov/files/patch-inode.c
  head/sysutils/ffs2recov/pkg-descr