Coder Social home page Coder Social logo

Comments (20)

martymac avatar martymac commented on May 22, 2024

Hello Wanda,

Unfortunately, I am not a user of Homebrew so I won't be able to create a tap for fpart. Anyway, I would be happy to integrate it if someone provided one to me :)

Anyone interested in contributing ?

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

I can definitely give it a shot! I will research and get back to you :D

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

I created a homebrew-fpart repository, and then ran

$ brew create https://github.com/martymac/fpart/archive/fpart-1.1.0.tar.gz

to create

/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/fpart.rb

which I then copied to the repository directory:
$ cp /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/fpart.rb ./homebrew-fpart/Formula/

However, I have a few questions:

  1. In order to publish to the homebrew-core (as seen in the section on Contributing), one needs to have a test within the Formula; what kind of test can be done to ensure that fpart has been installed correctly, other than ensuring the output is equal to the help text:
$ fpart
Please specify either -n, -f or -s.
Usage: fpart [OPTIONS] -n num | -f files | -s size [FILE or DIR...]
Sort and pack files into partitions.

General options:
  -h	this help
  -V	print version
...
  1. I see the file generated by brew create has calls to cmake commented out; shall I just delete these lines, since in the fpart repo README.md the only calls you use are autoreconf -i, ./configure, make, and make install (as root).

from fpart.

martymac avatar martymac commented on May 22, 2024

Hello Wanda,

Good news, thanks for your contribution :)

  1. Maybe you can trigger a simple 'fpart -V' which displays the current version as well as build options ?

  2. Yes, I presume you can, fpart does not use CMake at all

Once you have everything ready (and if you want), just tell me, I'll import your work into the contribs/package/homebrew directory.

Thanks again :)

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

Ahhhh, well I guess the issue is that in the Homebrew docs, they say:

We want tests that don’t require any user input and test the basic functionality of the application. For example foo build-foo input.foo is a good test and (despite their widespread use) foo --version and foo --help are bad tests. However, a bad test is better than no test at all.

Is there some sort of simple operation that I could perform and validate the output of other than running fpart -V? I'm only familiar with using fpsync that comes with fpart (which is actually my intention for wanting to be able to install this - to have access to fpsync).

Thank you for working through this with me! This is my first time actually contributing something to a repo, so I'm kind of pumped, not gonna lie πŸ˜€

from fpart.

martymac avatar martymac commented on May 22, 2024

Hello Wanda,

You can use that simple one-liner :

touch "${HOME}/.fpart-test" && fpart -n 1 -y ".fpart-test" "${HOME}" 2>/dev/null | grep -q "0 (0): ${HOME}/.fpart-test"

that will create an empty file in ${HOME} and then use fpart to pack it in a single partition. That will ensure that fpart works, can crawl the filesystrem and output a partition.

Best regards,
Ganael.

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

Absolutely brilliant!! Thank you, Ganael; I'll keep you posted when I push to the homebrew-fpart repo and the results for testing and subsequently installing fpart using brew!

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

Hey Ganael, I've got a quick question for you: when I try to run fpart in the terminal as you have described, i.e.

touch "${HOME}/.fpart-test" && fpart -n 1 -y ".fpart-test" "${HOME}" 2>/dev/null | grep -q "0 (0): ${HOME}/.fpart-test"

The command hangs. I attempted to break it apart and test, and observed that

fpart -n 1 -y ".fpart-test" "${HOME}"

gives no output, despite the file .fpart-test existing in the home directory. I thought perhaps it was because the point you were attempting to create the partition at, i.e. ${HOME}, might be problematic, so I did mkdir ${HOME}/tmpDir and attempted to run

fpart -n 1 -y ".fpart-test" "${HOME}/tmpDir"

The command executed, but no output was forthcoming, and ~/tmpDir was empty.

Is there an issue because I'm not using fpart correctly as per its usage:

Usage: fpart [OPTIONS] -n num | -f files | -s size [FILE or DIR...]

from fpart.

martymac avatar martymac commented on May 22, 2024

Hello Wanda,

Weird... You are using fpart the right way.

Can you add verbose options to see what's happening? :

$ fpart -vv -n 1 -y ".fpart-test" "${HOME}/tmpDir"

Maybe you can also try using a fixed directory first, such as /tmp instead of ${HOME}.

Hope this helps,
Regards,

Ganael.

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

Here ya go, Ganael!

$ pwd
/Users/wboyer

$ echo ${HOME}
/Users/wboyer

$ ls -lahe .fpart-test 
-rw-r--r--  1 wboyer  CORP\Domain Users     0B 28 Aug 17:02 .fpart-test

$ fpart -vv -n 1 -y ".fpart-test" "${HOME}/tmpDir"
Examining filesystem...
0 file(s) found.

$ ls -lahe ~/tmpDir/
total 0
drwxr-xr-x   2 wboyer  CORP\Domain Users    64B 29 Aug 09:12 .
drwxr-xr-x@ 84 wboyer  CORP\Domain Users   2.6K 29 Aug 09:12 ..
 0: group:everyone deny delete

So I'm not sure if it's actually creating the partition... Should I create a separate bug report and poke around at this later today?

from fpart.

martymac avatar martymac commented on May 22, 2024

Hello Wanda,

Your .fpart-test file is in "${HOME}" while you are asking fpart to work on "${HOME}/tmpDir".

Either move .fpart-test to "${HOME}/tmpDir" or start fpart that way :

$ fpart -vv -n 1 -y ".fpart-test" "${HOME}"

It should now find the .fpart-test file and display (on stdout) a single partition with that file inside.

Best regards,

Ganael.

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

Oh gosh I'm so sorry! I don't know how fpart works - only have used your fpsync!!! Thank you for walking me through this :D

EDIT: Works like a charm!

$ fpart -vv -n 1 -y ".fpart-test" "${HOME}/tmpDir"
Examining filesystem...
/Users/wboyer/tmpDir/.fpart-test
1 file(s) found.
Sorting entries...
Part #0: size = 0, 1 file(s)
Writing output lists...
0 (0): /Users/wboyer/tmpDir/.fpart-test
Cleaning up...

from fpart.

martymac avatar martymac commented on May 22, 2024

Great, good news :)

from fpart.

martymac avatar martymac commented on May 22, 2024

Hello Wanda,

Is everything working fine regarding that issue ? Is the homebrew package working now or do you still need help ?

Ganael.

from fpart.

kabamwboyer avatar kabamwboyer commented on May 22, 2024

Hey @martymac ! Sorry for the delay; things have been a bit crazy at work, and since the needs of the project went in another direction, I haven't taken time on my own to get this working and tested... I'll keep you posted next week if I can eke some time for this task!

from fpart.

martymac avatar martymac commented on May 22, 2024

Hello Wanda,

OK, no pb :) Thanks for the update !

Best regards,

Ganael.

from fpart.

martymac avatar martymac commented on May 22, 2024

I'll close that bur report for now, feel free to re-open it if necessary.

from fpart.

benstiglitz avatar benstiglitz commented on May 22, 2024

FYI, I took a stab at this: Homebrew/homebrew-core#62573.

from fpart.

martymac avatar martymac commented on May 22, 2024

Hello @benstiglitz,

Good news, thanks!

from fpart.

martymac avatar martymac commented on May 22, 2024

@kabamwboyer, @benstiglitz,

Thanks again for your contribution!

from fpart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.