Help creating a Calibre PBI file: "Failed creating ZFS base dataset"

Status
Not open for further replies.

forumuser

Dabbler
Joined
May 22, 2015
Messages
10
Hello,

I'm a FreeNAS/BSD newbie trying to create a PBI file for the Calibre E-book library software. I already have a jail setup and I installed calibre from command line. I also modified the /etc/rc.conf so that the service starts up automatically on boot. So far everything works great and I can see Calibre Content Server is working perfectly. What I want to do is try to package this as a PBI so that others can use this more easily.

I'm trying to follow the instructions on creating a PBI file in FreeBSD here:
http://wiki.pcbsd.org/index.php/PBI_Module_Builder_Guide/10.0/en

and I'm also extracting whatever info I can from here:
http://www.freenas.org/whats-new/2013/04/freenas-plugins-everything-you-ever-wanted-to-know.html

Note: These are both for different versions of FreeBSD/NAS.

The problem I'm having is that after running the pbi_makeport command, it downloads the files correctly but isn't able to make the zfs dataset. I run this command in the Calibre jail:

# pbi_makeport -o /usr/local/mypbi/ deskutils/calibre

...
Status Legend:
(OK):download completed.
Creating ZFS /usr/pbi/.pbi-world-amd64 dataset...
zfs create -o mountpoint=/usr/pbi/.pbi-world-amd64 -p
createZFSDataset: newds = "", mp = "/usr/pbi/.pbi-world-amd64", ma = ""
createZFSDataset: ARCH = "amd64"
ERROR: Failed creating ZFS base dataset​


Does anyone know what might be going on, or how to create PBI files?

I'm using FreeNAS-9.3-STABLE-201505130355

Thanks.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
are you trying to make a PBI in the jail? as far as I know this doesn't work, at least with the PBI tools on FreeBSD 9.X

whenever I build PBIs it's on a host freebsd system. I use a freebsd VM in virtualbox, but you could probably also do this on your freenas host.
 

forumuser

Dabbler
Joined
May 22, 2015
Messages
10
Ok, so I have FreeBSD 9.3 Release installed in a VM and I installed pbi-manager.

I run the command:

root@freebsd:/usr/local/my_pbi # pbi_makeport -o /usr/local/my_pbi deskutils/calibre​


But it ends with the following error:

Building the PBI chroot environment... This may take a while...
Using svn://svn.freebsd.org/base/releng/9.0 for sources
Checking out FreeBSD sources from svn://svn.freebsd.org/base/releng/9.0
Running buildworld / installworld
pbi_makeport: Buildworld failed! Logfile saved: /usr/pbi/.buildWorldLog​

Checking the log file I see this at the end:

>>> Building an up-to-date make(1)
--------------------------------------------------------------
/usr/obj/usr/pbi/.tmpSRC.13297/make.amd64/usr/pbi/.tmpSRC.13297/usr.bin/make created for /usr/pbi/.tmpSRC.13297/usr.bin/make
rm -f .depend
mkdep -f .depend -a -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 /usr/pbi
echo make: /usr/pbi/.worldTarget.13297/usr/lib/libc.a >> .depend
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
cc -O2 -pipe -I/usr/pbi/.tmpSRC.13297/usr.bin/make -DMAKE_VERSION=\"5200408120\" -DDEFSHELLNAME=\"sh\" -std=gnu99 -fstack-protector -
make: don't know how to make /usr/pbi/.worldTarget.13297/usr/lib/libc.a. Stop
*** [make] Error code 2

Stop in /usr/pbi/.tmpSRC.13297.
*** [upgrade_checks] Error code 1

Stop in /usr/pbi/.tmpSRC.13297.​


Any ideas?

Thanks.
 

forumuser

Dabbler
Joined
May 22, 2015
Messages
10
Ok, I've given up on this. The problem is that each package that is too old and everything seems to want a specific version number. I've tried to use portdowngrade and manually move files around but so far it's just been a mess. I'll document my steps here incase it helps anyone else.

Creating a PBI file from a port (FreeNAS):

Prep:
1. Download this iso for FreeBSD 9.3: FreeBSD-9.3-RELEASE-amd64-disc1.iso (http://ftp.freebsd.org/pub/FreeBSD/releases/ISO-IMAGES/9.3/)
2. Install it into virtualbox (make sure it has decent ram and CPUs since it will compile stuff, I have 4GB ram and 4 core)​

PBI:
3. pkg install devel/subversion
4. pkg install sysutils/pbimaker​

Calibre:
5. pkg install deskutils/calibre
6. Make a folder to hold the PBI, ie: /usr/local/temp
7. go into the temp folder, then run: pbimaker -9 /usr/ports/deskutils/calibre/​

(the -9 targets BSD 9.x)

Now it will start going through a bunch of stuff, but you it will get to an error when it can't find a specific version:

ex. "Python-2.7.9.tar.xz is not in /usr/ports/lang/python27/distinfo"

ok, so I found that file, downloaded it and did sha256 to get the hash, then I updated that file with the correct version, hash and file name. That worked.

ex2. "/usr/ports/graphics/ImageMagick/work/stage/usr/local/lib/perl5/site_perl/5.20/mach/auto/Image/Magick/" not found. The folder structure was actually: "/usr/ports/graphics/ImageMagick/work/stage/usr/local/lib/perl5/site_perl/mach/5.20/auto/Image/Magick". So I manually moved the folders around to fix it.

Now there is a problem in the pearl5 library and another not being able to find the ImageMagick.bs file.

I'll bet that after that there will be more problems. Basically, freeBSD 9.3 is so old the packages/repos are not synced very well.

I guess theoretically someone could create a PBI for something else, but at least Calibre seems to have too many dependencies.
 

forumuser

Dabbler
Joined
May 22, 2015
Messages
10
ah, that looks good. So two questions:

1. How did you install pbi_makeport (and the related pbi commands)
2. How did you update/downgrade all of your ports to the September 20, 2014 tree?

Just want to make sure I've got the same dev environment as you.
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
ah, that looks good. So two questions:

1. How did you install pbi_makeport (and the related pbi commands)
2. How did you update/downgrade all of your ports to the September 20, 2014 tree?

Just want to make sure I've got the same dev environment as you.
1) once you have done (2) below you can just built it from ports.
2) I did some svn commands to get the commit, I just googled it and found something I think from the freebsd forums.
 
Status
Not open for further replies.
Top