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

libbfio: init at 20221025 #278343

Merged
merged 1 commit into from
Jan 28, 2024
Merged

libbfio: init at 20221025 #278343

merged 1 commit into from
Jan 28, 2024

Conversation

D3vil0p3r
Copy link
Member

@D3vil0p3r D3vil0p3r commented Jan 2, 2024

Description of changes

Dependency for guymager.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/3198

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 2, 2024
@D3vil0p3r D3vil0p3r marked this pull request as ready for review January 2, 2024 23:27
@D3vil0p3r D3vil0p3r mentioned this pull request Jan 3, 2024
13 tasks
@fufexan
Copy link
Contributor

fufexan commented Jan 3, 2024

Result of nixpkgs-review pr 278343 run on x86_64-linux 1

@AndersonTorres
Copy link
Member

You do not like to use git?

Besides, I believe we should ignore the upstream's advice and build it from git repo.

@D3vil0p3r D3vil0p3r requested a review from h7x4 January 21, 2024 14:52
@D3vil0p3r
Copy link
Member Author

You do not like to use git?

Besides, I believe we should ignore the upstream's advice and build it from git repo.

I tried to switch to fetchFromGitHub but in that case I need to insert more lines in the file to build the software. If we retrieve the source by fetchurl as is, it builds automatically the program without adding more lines and we can keep the .nix file more compact.

@fufexan
Copy link
Contributor

fufexan commented Jan 21, 2024

I don't think 2 extra lines make a difference.

@D3vil0p3r
Copy link
Member Author

D3vil0p3r commented Jan 21, 2024

I don't think 2 extra lines make a difference.

I tested the switching to fetchFromGitHub and I tried to test it by autoreconfHook but I'm getting some issues. Apart the building error, the git building instruction requires to run synclibs.sh (that cannot be used because it connects to Internet to retrieve and sync libs) and autogen.sh that tries to search for aclocal in /usr/bin. At configure time, which path I should replace /usr/bin with, that contains aclocal?

PS: why preferring git fetch instead of fetchurl that correctly builds the application in this case?

@fufexan
Copy link
Contributor

fufexan commented Jan 21, 2024

you could do

preConfigure = ''
  substituteInPlace autogen.sh \
    --replace "/usr/bin/aclocal" "${automake}/bin/aclocal"
'';

Automake might also be already included in stdenv but I'm not sure.

@D3vil0p3r
Copy link
Member Author

--replace "/usr/bin/aclocal" "${automake}/bin/aclocal"

Fixed autogen.sh but at building time I get:

this derivation will be built:
  /nix/store/m8b8xcr89wm5xs8lparh2mqzpfb41rj2-libbfio-20221025.drv
building '/nix/store/m8b8xcr89wm5xs8lparh2mqzpfb41rj2-libbfio-20221025.drv'...
Running phase: unpackPhase
unpacking source archive /nix/store/ghap8zhvsh5vm1wsibghj3cgq8zssr1k-source
source root is source
Running phase: patchPhase
patching script interpreter paths in autogen.sh
autogen.sh: interpreter directive changed from "#!/bin/sh" to "/nix/store/7dpxg7ki7g8ynkdwcqf493p2x8divb4i-bash-5.2-p15/bin/sh"
Copying file ABOUT-NLS
Copying file config.rpath
Copying file m4/gettext.m4
Copying file m4/host-cpu-c-abi.m4
Copying file m4/iconv.m4
Copying file m4/intlmacosx.m4
Copying file m4/lib-ld.m4
Copying file m4/lib-link.m4
Copying file m4/lib-prefix.m4
Copying file m4/nls.m4
Copying file m4/po.m4
Copying file m4/progtest.m4
Copying file po/Makefile.in.in
Copying file po/Makevars.template
Copying file po/Rules-quot
Copying file po/boldquot.sed
Copying file po/[email protected]
Copying file po/[email protected]
Copying file po/insert-header.sin
Copying file po/quot.sed
Copying file po/remove-potcdate.sin
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:19: installing './compile'
configure.ac:16: installing './config.guess'
configure.ac:16: installing './config.sub'
configure.ac:11: installing './install-sh'
configure.ac:11: installing './missing'
Makefile.am: installing './INSTALL'
configure.ac:126: error: required file 'libcerror/Makefile.in' not found
configure.ac:127: error: required file 'libcthreads/Makefile.in' not found
configure.ac:128: error: required file 'libcdata/Makefile.in' not found
configure.ac:129: error: required file 'libclocale/Makefile.in' not found
configure.ac:130: error: required file 'libcnotify/Makefile.in' not found
configure.ac:131: error: required file 'libcsplit/Makefile.in' not found
configure.ac:132: error: required file 'libuna/Makefile.in' not found
configure.ac:133: error: required file 'libcfile/Makefile.in' not found
configure.ac:134: error: required file 'libcpath/Makefile.in' not found
Makefile.am:3: error: required directory ./libcerror does not exist
Makefile.am:3: error: required directory ./libcthreads does not exist
Makefile.am:3: error: required directory ./libcdata does not exist
Makefile.am:3: error: required directory ./libclocale does not exist
Makefile.am:3: error: required directory ./libcnotify does not exist
Makefile.am:3: error: required directory ./libcsplit does not exist
Makefile.am:3: error: required directory ./libuna does not exist
Makefile.am:3: error: required directory ./libcfile does not exist
Makefile.am:3: error: required directory ./libcpath does not exist
libbfio/Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: error: automake failed with exit status: 1
Running phase: autoreconfPhase
autoreconf: export WARNINGS=
autoreconf: Entering directory '.'
autoreconf: running: autopoint --force
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
autoreconf: configure.ac: not using Intltool
autoreconf: configure.ac: not using Gtkdoc
autoreconf: running: aclocal --force -I m4
autoreconf: running: /nix/store/6l70ci1c50jrvq0gnln9nn0s9ji5bhl6-autoconf-2.71/bin/autoconf --force
autoreconf: running: /nix/store/6l70ci1c50jrvq0gnln9nn0s9ji5bhl6-autoconf-2.71/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:19: installing './compile'
configure.ac:11: installing './missing'
configure.ac:126: error: required file 'libcerror/Makefile.in' not found
configure.ac:127: error: required file 'libcthreads/Makefile.in' not found
configure.ac:128: error: required file 'libcdata/Makefile.in' not found
configure.ac:129: error: required file 'libclocale/Makefile.in' not found
configure.ac:130: error: required file 'libcnotify/Makefile.in' not found
configure.ac:131: error: required file 'libcsplit/Makefile.in' not found
configure.ac:132: error: required file 'libuna/Makefile.in' not found
configure.ac:133: error: required file 'libcfile/Makefile.in' not found
configure.ac:134: error: required file 'libcpath/Makefile.in' not found
Makefile.am:3: error: required directory ./libcerror does not exist
Makefile.am:3: error: required directory ./libcthreads does not exist
Makefile.am:3: error: required directory ./libcdata does not exist
Makefile.am:3: error: required directory ./libclocale does not exist
Makefile.am:3: error: required directory ./libcnotify does not exist
Makefile.am:3: error: required directory ./libcsplit does not exist
Makefile.am:3: error: required directory ./libuna does not exist
Makefile.am:3: error: required directory ./libcfile does not exist
Makefile.am:3: error: required directory ./libcpath does not exist
libbfio/Makefile.am: installing './depcomp'
autoreconf: error: automake failed with exit status: 1
error: builder for '/nix/store/m8b8xcr89wm5xs8lparh2mqzpfb41rj2-libbfio-20221025.drv' failed with exit code 1;
       last 10 log lines:
       > Makefile.am:3: error: required directory ./libcthreads does not exist
       > Makefile.am:3: error: required directory ./libcdata does not exist
       > Makefile.am:3: error: required directory ./libclocale does not exist
       > Makefile.am:3: error: required directory ./libcnotify does not exist
       > Makefile.am:3: error: required directory ./libcsplit does not exist
       > Makefile.am:3: error: required directory ./libuna does not exist
       > Makefile.am:3: error: required directory ./libcfile does not exist
       > Makefile.am:3: error: required directory ./libcpath does not exist
       > libbfio/Makefile.am: installing './depcomp'
       > autoreconf: error: automake failed with exit status: 1
       For full logs, run 'nix log /nix/store/m8b8xcr89wm5xs8lparh2mqzpfb41rj2-libbfio-20221025.drv'.

Not sure if it could be an upstream bug on their GitHub repo src files.

@fufexan
Copy link
Contributor

fufexan commented Jan 21, 2024

Looks like building it from source requires also building many other of their projects that this one depends on.
The build process is also inflexible since they rely on the source paths being present in the build directory.

I suggest simply building it from the tarball they provide in the release if you don't have the time/motivation to work around their build system and package everything they have in Nix.

@D3vil0p3r
Copy link
Member Author

Looks like building it from source requires also building many other of their projects that this one depends on. The build process is also inflexible since they rely on the source paths being present in the build directory.

I suggest simply building it from the tarball they provide in the release if you don't have the time/motivation to work around their build system and package everything they have in Nix.

Thanks. I can also contact them but also in case they agree to change their source files, it will require time. The package.nix in this PR is already using the tarball and it works correctly.

@fufexan
Copy link
Contributor

fufexan commented Jan 21, 2024

I can also contact them but also in case they agree to change their source files, it will require time.

Unlikely, as they also target Windows and macOS, which, to my knowledge, don't have pkg-config (which is how you usually find libraries in Linux).

@D3vil0p3r
Copy link
Member Author

I can also contact them but also in case they agree to change their source files, it will require time.

Unlikely, as they also target Windows and macOS, which, to my knowledge, don't have pkg-config (which is how you usually find libraries in Linux).

Ok. So, what would you suggest to move on?

@fufexan
Copy link
Contributor

fufexan commented Jan 21, 2024

I think the PR in its current form is the best way to go.

@felixalbrigtsen
Copy link
Member

felixalbrigtsen commented Jan 27, 2024

Seems to build on MacOS now:

Result of nixpkgs-review pr 278343 run on aarch64-darwin 1

1 package built:
  • libbfio

@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 27, 2024
@D3vil0p3r
Copy link
Member Author

@felixalbrigtsen @h7x4 should I rollback the last commit?

@h7x4
Copy link
Member

h7x4 commented Jan 27, 2024

should I rollback the last commit?

Not entirely sure what you're asking. There's only one commit?

@D3vil0p3r
Copy link
Member Author

should I rollback the last commit?

Not entirely sure what you're asking. There's only one commit?

Oh sorry. I confused with dc3dd PR. Nevermind ^^ LGTM

@h7x4
Copy link
Member

h7x4 commented Jan 27, 2024

I'm a bit confused about the license. It says LGPLv3+ in the readme, but there's both COPYING.LESSER (LGPLv3+) and COPYING (GPLv3+). I can't seem to find any files explicitly licensed under GPLv3 though... Should we ask upstream for clarification?

@D3vil0p3r
Copy link
Member Author

D3vil0p3r commented Jan 27, 2024

I'm a bit confused about the license. It says LGPLv3+ in the readme, but there's both COPYING.LESSER (LGPLv3+) and COPYING (GPLv3+). I can't seem to find any files explicitly licensed under GPLv3 though... Should we ask upstream for clarification?

In the README is reported: License: LGPLv3+. But I think we can assign both of them inside the meta.information.

@h7x4
Copy link
Member

h7x4 commented Jan 27, 2024

But I think we can assign both of them inside the meta.information.

I guess that's the best solution, just in case the other license happens to be used for some file far into the source code, either now or in the future.

@D3vil0p3r
Copy link
Member Author

But I think we can assign both of them inside the meta.information.

I guess that's the best solution, just in case the other license happens to be used for some file far into the source code, either now or in the future.

@h7x4 fixed.

@h7x4 h7x4 merged commit 8a536b4 into NixOS:master Jan 28, 2024
23 checks passed
Copy link
Contributor

Successfully created backport PR for release-23.11:

@D3vil0p3r D3vil0p3r deleted the patch-6 branch January 28, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants