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

fsarchiver 0.8.7 (new formula) #192565

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

fsarchiver 0.8.7 (new formula) #192565

wants to merge 1 commit into from

Conversation

phreed
Copy link

@phreed phreed commented Oct 1, 2024

Develop Formulae: fsarchiver

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

There are some remaining issues I would like some guidance on.

  • The make which should be used does not properly include headers from dependencies (see the discussion)
  • This is not my package, I need to communicate with the owner

@phreed phreed marked this pull request as draft October 1, 2024 23:50
@github-actions github-actions bot added automerge-skip `brew pr-automerge` will skip this pull request autosquash Automatically squash pull request commits according to Homebrew style. new formula PR adds a new formula to Homebrew/homebrew-core labels Oct 1, 2024
Copy link
Contributor

github-actions bot commented Oct 1, 2024

Thanks for contributing to Homebrew! 🎉 It looks like you're having trouble with a CI failure. See our contribution guide for help. You may be most interested in the section on dealing with CI failures. You can find the CI logs in the Checks tab of your pull request.

@chenrui333 chenrui333 changed the title Develop Formulae: fsarchiver fsarchiver 0.8.7 (new formula) Oct 2, 2024
Formula/f/fsarchiver.rb Outdated Show resolved Hide resolved
Formula/f/fsarchiver.rb Outdated Show resolved Hide resolved
Formula/f/fsarchiver.rb Outdated Show resolved Hide resolved
Formula/f/fsarchiver.rb Outdated Show resolved Hide resolved
end

test do
system bin/"fsarchiver", "usage"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you propose a more substantial test than checking the version or calling for help? These tests rarely ever fail even for broken installations.

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.

Ref. https://docs.brew.sh/Formula-Cookbook#add-a-test-to-the-formula

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know, most fsarchiver runs need root access and mess with disks.
I will see if there are any partitions which can be accessed without root access.

Copy link
Member

@carlocab carlocab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've applied some of my suggestions since you seem to be having a rough time here. I'll have a look at the failures later to find the right fix for some of the things I've removed.

@carlocab carlocab added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Oct 2, 2024
@carlocab
Copy link
Member

carlocab commented Oct 2, 2024

  configure: error: Unsupported system type darwin24.0.0

I guess this should be Linux-only?

@phreed
Copy link
Author

phreed commented Oct 2, 2024

  configure: error: Unsupported system type darwin24.0.0

I guess this should be Linux-only?

Yes, this is Linux-only.
How is that indicated?

@phreed
Copy link
Author

phreed commented Oct 2, 2024

I have copied the build problem info from the discussion:

When I run

brew install --build-from-source fsarchiver --debug

I get the error,

BuildError: Failed executing: make
1. raise
2. ignore
3. backtrace
4. irb
5. shell
Choose an action:

I choose shell and do the following:

cd src
make -d fsarchiver-fs_ext2.o

This reproduces the error.

Makefile:795: update target 'fsarchiver-fs_ext2.o' due to: target does not exist
echo "  CC      " fsarchiver-fs_ext2.o;gcc -DHAVE_CONFIG_H -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I. -I..    -g -O2 -Wall -std=gnu99 -rdynamic -ggdb -I/home/linuxbrew/.linuxbrew/Cellar/xz/5.6.2/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/ext2fs -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/et -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/et -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/e2p -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/util-linux/2.40.2/include/blkid -I/home/linuxbrew/.linuxbrew/Cellar/util-linux/2.40.2/include/uuid -g -O2 -c -o fsarchiver-fs_ext2.o `test -f 'fs_ext2.c' || echo './'`fs_ext2.c
Putting child 0x56030a182a10 (fsarchiver-fs_ext2.o) PID 213582 on the chain.
Recipe of 'fsarchiver-fs_ext2.o' is being run.
Live child 0x56030a182a10 (fsarchiver-fs_ext2.o) PID 213582 
  CC       fsarchiver-fs_ext2.o
fs_ext2.c:23:10: fatal error: ext2fs.h: No such file or directory
   23 | #include <ext2fs.h>
      |          ^~~~~~~~~~
compilation terminated.

However if I run the compile by hand.

gcc -DHAVE_CONFIG_H -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -I. -I..    -g -O2 -Wall -std=gnu99 -rdynamic -ggdb -I/home/linuxbrew/.linuxbrew/Cellar/xz/5.6.2/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/ext2fs -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/et -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/et -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include/e2p -I/home/linuxbrew/.linuxbrew/Cellar/e2fsprogs/1.47.1/include -I/home/linuxbrew/.linuxbrew/Cellar/util-linux/2.40.2/include/blkid -I/home/linuxbrew/.linuxbrew/Cellar/util-linux/2.40.2/include/uuid -g -O2 -c -o fsarchiver-fs_ext2.o `test -f 'fs_ext2.c' || echo './'`fs_ext2.c

It compiles and produces the object file (with warnings).

fs_ext2.c: In function ‘extfs_getinfo’:
fs_ext2.c:454:52: warning: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination? [-Wsizeof-pointer-memaccess]
  454 |         strncpy(label, super->s_volume_name, sizeof(super->s_volume_name));
      |                                                    ^
fs_ext2.c: In function ‘extfs_mkfs’:
fs_ext2.c:226:39: warning: ‘%s’ directive output may be truncated writing up to 2047 bytes into a region of size 64 [-Wformat-truncation=]
  226 |         snprintf(uuid, sizeof(uuid), "%s", buffer);
      |                                       ^~   ~~~~~~
fs_ext2.c:226:9: note: ‘snprintf’ output between 1 and 2048 bytes into a destination of size 64
  226 |         snprintf(uuid, sizeof(uuid), "%s", buffer);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

How does running the compile from the makefile produce a different result?

@phreed
Copy link
Author

phreed commented Oct 2, 2024

It appears the version of make being run is crippled (or modified) in some way.

When I select (5) the shell, cd src.
The following version of make, appears to build everything properly.

/home/linuxbrew/.linuxbrew/opt/make/bin/make all

This version is installed by brew install make.

The following make which is the one found in the PATH during the build, produces the include errors mentioned above.

/var/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/shims/linux/super/make

When I ask for the version information the two report the same information.

@github-actions github-actions bot added linux-only Formula depends on Linux and removed automerge-skip `brew pr-automerge` will skip this pull request autosquash Automatically squash pull request commits according to Homebrew style. labels Oct 2, 2024
Signed-off-by: Patrick Linnane <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. linux-only Formula depends on Linux new formula PR adds a new formula to Homebrew/homebrew-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants