Synth: Introducing new custom package repository builder for FreeBSD and DragonFly

No not on this machine and any of my others,

Did you know you can share this synth repository with all your machines?
You can use one machine for synth and then add a pkg repository conf file on your other machines that point to it. That will save a ton of time (all have to have the same ABI though, e.g. FreeBSD 10.2/amd64)
 
You were informed incorrectly. on FreeBSD, a package is only made with the explicit "make package" command. (On pkgsrc a package is always made and this is arguably a better approach). most users with standard defaults don't have packages on their machine when they build from source. Things are installed directly from the stage directory and registered I think.

by the way, since you will be using the prebuilt option, it's not actually going to build that many ports. It will download most of them (or all of them if you don't have custom options). When it gets to the install stage, pkg will see that they are the same as what is already installed and just ignore them.

This also says that ports creates packages, here see #4:
http://www.wonkity.com/~wblock/docs/html/pkg.html

Yes I am looking forward to trying using the [N] - prebuilt option. I am interested in seeing how much time is saved. I am optimistic that using ports to first-time build a program and then using synth to maintain updates on the system will be a winning combination. I use older hardware and after a month or so a GNOME3 machine can take easily over 12 to 16 hours (might be closer to 24 hours) to update.

Stay tuned....I just need to wait a few weeks for more updates to hit the ports tree. :)
 
wblock@'s FAQ is not correct. You can test for yourself. packages have a ".txz" extension, right?
Build and install a port from source, then try something like " find <wrkdir> -name "*.txz". You won't find anything.
I also checked the pkg cache dir and no txz file is added after a test install.
 
Okay, so if you are right, then anytime I install a port using make then the next time I run synth its gonna burp saying I need to 'do' that one. So can I use one of those synth options, maybe synth build port, to actually build the port. can I use synth to set any options I want and it will build for me? Would I need to turn off the [N] option, or like during synth upgrade-system it automatic determine that options have been changed and build locally? (Or no options have been changed, and download the pre-built package?)
 
Okay, so if you are right, then anytime I install a port using make then the next time I run synth its gonna burp saying I need to 'do' that one.
Well, if you use synth(1), you wouldn't use " make" anymore, other than " make config" to customize options.

Example: say you want to install 3 ports. You would:
# synth install <port1> <port2> <port3>

There are other combinations but that would be the most efficient.

But yes, if you build/install via make(1), then synth(1) will want to rebuild it the next time you run # synth upgrade-system
 
I don't get an error.
It just doesn't seem to finish compiling:

Bildschirmfoto_2016_01_28_um_13_23_04.png
 
1) There is a build log for every build. Check the logs directory (see # synth configure if you don't know where it is)
2) How do you know it wasn't working? maybe it was linking which takes a long time.
 
Also it would be helpful to know things about your machine (arch, memory, filesystem, cpu, etc) old/new/powerful/creaky
 
1) there is a build log for every build. Check the logs directory (see synth configure if you don't know where it is)
2) how do you know it wasn't working? maybe it was linking which takes a long time.
I'm sorry, I'm taking everything back.
After 40 minutes, the build finished.
I was just too impatient.

But this is what I got when it was finished:

Code:
Scanning existing packages.
Scanning entire ports tree.
mktemp: mkstemp failed on /tmp/[username]/portslicense.867hCAMO: No such file or directory
make: "/xports/Mk/bsd.licenses.mk" line 510: warning: "mktemp -ut portslicense" returned non-zero status
progress: 70.76%
culprit: devel/p5-Perl-Unsafe-Signals
Scan aborted for an unknown reason.
bad input for 'Value: ""
Failed to scan ports tree   (Synth must exit)

I'm on FreeBSD 10.2-RELEASE-p11 on a vServer:
2 Cores (Intel Xeon E5-26xxV3)
6GB RAM
SSD
 
How clean is your ports tree? Other than possibly distfiles and packages directory, is there anything installed in the tree that it did not come with?

Finally, does that portlicense message mean anything to you at all?
 
I am also interested in this "/tmp/basbebe"
do you have a non standard tmp area or something like that?
 
i am also interested in this "/tmp/[username]"
do you have a non standard tmp area or something like that?
No I don't…
how clean is your ports tree? Other than possibly distfiles and packages directory, is there anything installed in the tree that it did not come with?

finally, does that portlicense message mean anything to you at all?
I didn't add anything to the ports tree by myself, it should be clean besides your exceptions.
port license doesn't mean anything to me…
 
You don't find a tmp subdirectory with the same name as your username in the forum kind of coincidental?
 
I don't care about your username, removing it is not help.,
it's that mktemp(1) wants to use /tmp/[username] and that's not normal. There must be something in environment or some kind of setting causing that.
 
You were informed incorrectly. on FreeBSD, a package is only made with the explicit "make package" command. (On pkgsrc a package is always made and this is arguably a better approach).

most users with standard defaults don't have packages on their machine when they build from source. Things are installed directly from the stage directory and registered I think.

Yes, a common source of confusion in FreeBSD ports is package creation vs. package registration. The latter is of course always done when you do make install on a port by calling pkg-register(8). The former, creating an actual package file is only done as you say when make package is used.
 
I set the env(1) variable manual to /tmp

The rest of the error remains:

Code:
Querying system about current package installations.
Stand by, comparing installed packages against the ports tree.
Stand by, updating external repository catalogs ... pkg: file:///var/synth/live_packages/meta.txz: No such file or directory
pkg: file:///var/synth/live_packages/packagesite.txz: No such file or directory
Failed!
The external repository could not be updated.
No prebuilt packages will be used as a result.
Scanning existing packages.
After inspection, it has been determined that there are no packages that
require rebuilding; the task is therefore complete.
Scanning entire ports tree.
progress: 69.80%
culprit: devel/p5-Perl-Unsafe-Signals
Scan aborted for an unknown reason.
bad input for 'Value: ""
Failed to scan ports tree   (Synth must exit)
 
Hmm, it think synth(1) is external repository. We can trouble shoot that later, for now turn option [N] off to get rid of the first set of errors (I probably need to add an additional guard in Synth to prevent it).

I'm not sure what's wrong with
devel/p5-Perl-Unsafe-Signals yet
 
wblock's faq is not correct. You can test for yourself. packages have a ".txz" extension, right?

This is semantics. If it wasn't a package, a built port could not be installed by the package system. That it is not saved as a separate package file is a different matter.

I am willing to reword that document on pkg(8) if it can be explained more clearly.
 
basbebe can you tell me output of this command?
/usr/bin/make -C /usr/ports/devel/p5-Perl-Unsafe-Signals -VPKGVERSION -VPKGFILE:T -VMAKE_JOBS_NUMBER -VIGNORE -VFETCH_DEPENDS -VEXTRACT_DEPENDS -VPATCH_DEPENDS -VBUILD_DEPENDS -VLIB_DEPENDS -VRUN_DEPENDS -VSELECTED_OPTIONS -VDESELECTED_OPTIONS -V_INCLUDE_USES_SCONS_MK -VUSE_LINUX

Note that I edited it, it was missing /usr/ports after -C
 
Last edited by a moderator:
This is semantics. If it wasn't a package, a built port could not be installed by the package system. That it is not saved as a separate package file is a different matter.

I am willing to reword that document on pkg(8) if it can be explained more clearly.
I disagree it's semantics. Making a package is a specific thing with specific meaning. A package is not being made. The installation occurs directly from stage directory.

Case in point: if a package is being made, where is it?
 
Back
Top