[RELEASE] src2pkg-2.9

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
White ninja
White ninja
Posts: 15
Joined: 26 Aug 2013, 14:14
Distribution: KISS
Location: Dreieich

Re: [RELEASE] src2pkg-2.9

Post#16 by amigo » 27 Dec 2013, 17:57

Sorry, I hadn't seen the replies and questions.
First, when src2pkg fails during 'fake_install' with this error:
FATAL! Running 'make install'
You can see that both DESTDIR and JAIL have been tried. So time to try one of the other three methods, -UNION, -SAFE or -REAL.
Or, since you seemt convinced that DESTDIR is supported you can use:
src2pkg -i='make build ARCH=x86-32 [COMP=gcc] DESTDIR=/root/di/ install'

In short, use '-e=????' to add options to the configure command,
'-m=????' to change the 'make' command, and
'-i=???' to change the install command.

DESTDIR is the default method, but src2pkg tries to detect the presence of DESTDIR in the Makefiles. Somtimes it is there (in an included file) and src2pkg doesn't find it. So, it tries to use the JAIL method which isolates (tries) the file output from 'make install' into a subdir. With some builds this will also fail. The next method to try is -UNION, then -SAFE. As a last resort the -REAL method actually installs the files just like the real 'make install' command, but tracks the file creation. -SAFE is the same thing, excpet that any files which would be overwritten by 'make install' get backed up first, and then restored after copying the new files out into the package tree.

Only -DESTDIR and -JAIL can be used if you are running src2pkg as a normal user. You must be root to use -UNION, -SAFE or -REAL.

I don not encourage using src2pkg to convert binary packages from other formats. It does a good job of it, but it makes it quite easy to build from source -even if you are no wizard at compiling. In most cases, you should use a src2pkg build script for the package so that a record is kept of how it gets configured, etc. You can easily do that like this:
src2pkg -N -Q name-of-tarball
Then you can start the build with simply:
src2pkg -X

When you create the recipe with src2pkg -N -Q, you can already input any config, make, install commands so they will be written to the script:
src2pkg -N -Q -i='make build ARCH=x86-32 [COMP=gcc] DESTDIR=/root/di/ install' name-of-tarball

And, when running src2pkg -X for the first build, add the -A option so that created database files get copied into the PWD for your perusal and/or manual editing.

About src2pkg-dnd and terminal-wrapper. I seem to have gotten something mis-placed there with /usr/bin/src2pkg-dnd. That one was supposed to be for Puppy linux which uses rxvt instead of xterm. There is another version of src2pkg-dnd which should work for you if you are using xterm. It is in the documents inside src2pkg-dnd.tar.bz2. src2pkg-dnd was developed for use with the ROX-Filer as an AppDir, though it has proven to work elsewhere -you should be able to use it woth other filers if they support drag-n-drop. Just dropping a source archive or src2pkg build script on it should work. Still, the beats way to run src2pkg is from a terminal, and use a separate subdir to build from so you can see easier any files that get created during the build.


Re: [RELEASE] src2pkg-2.9

Post#17 by fullmoonremix » 23 Nov 2015, 18:30

Salutations... :good:

Scr2pkg "libsentry" setup error... (Oops?)

I'm using tcc... it doesn't recognize the "dumpversion" and "dumpmachine" options in pre_process. :wall:
Is there a workaround for this so I can create "libsentry"?

"Issue" #1...

## below are sub-functions called by pre_process
# this function figures out the architecture and CFLAGS
get_flags() {
if [[ $(gcc -dumpversion) > 3.4 ]] ; then

"Issue" #2...

# find build, host and target
if ! [[ $BUILD_OS ]] ; then
BUILD_OS=$(gcc -dumpmachine)

Best Regards,,, :beer:

Post Reply