0

I have found several interesting links talking about a CPack generator for FreeBSD.

I would like to generate FreeBSD packages; however, whenever I attempt to generate TXZ archives (as directed by the instructions), the generated package isn't compatible with the pkg utility on FreeBSD. They miss the manifest file.

Obviously, CPack is generating raw archives, not pkg-ready archives. I assume I must be missing a step.

However, none of the links above talk about any such step.

Therefore,

How can I tell CPack to generate a FreeBSD-ready package?

2
  • How to tell CPack to use the FreeBSD generator?" - Use the command cpack -G FreeBSD.
    – Tsyvarev
    Jan 20, 2021 at 18:56
  • @Tsyvarev CPack Error: Could not create CPack generator: FreeBSD, then it lists all generators available (none of which seem related to any BSD)
    – Sampi
    Jan 20, 2021 at 19:28

1 Answer 1

2

(Original author of that code here)

So, there's two things in play here:

  • you need to be on FreeBSD (so that you have libpkg, which is needed to do the building)
  • you need to build the devel/cmake package with OPTIONS CPACK (which is not the default)

So:

  • cd /usr/ports/devel/cmake
  • make configure and select CPACK
  • make && make install

Then @Tsyvarev's comment will be the right answer. For the record, the support was deemed experimental, the library API unstable, and the pkg authors have asked me to re-vamp the code to use the current libpkg API so they can drop the old one. Time, though, is the limiting factor.

2
  • Alright, following these steps did show the options - in all caps though (FREEBSD). But I'm getting a segmentation fault when I try to pack ;-;
    – Sampi
    Jan 21, 2021 at 1:23
  • Do you need help with maintaining that code? I'd like to help you if you want. I wanted to integrate FreeBSD packaging in a project's CI and your work is my best bet
    – Sampi
    Jan 21, 2021 at 1:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.